/* =========================================
   Compare Page
   File: assets/css/compare-page.css
========================================= */

.hdaf-compare-page {
	width: min(1500px, calc(100vw - 60px));
	max-width: 1500px;
	margin: -40px auto 56px;
	padding: 0;
	box-sizing: border-box;
	clear: both;
}

.hdaf-compare-page *,
.hdaf-compare-page *::before,
.hdaf-compare-page *::after {
	box-sizing: border-box;
}

.hdaf-compare-page__hero {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	width: 100%;
	min-height: 154px;
	margin: 0 0 20px;
	padding: 30px 34px;
	border: 1px solid rgba(15, 23, 42, .08);
	border-radius: 22px;
	background: linear-gradient(135deg, #fff 0%, #fff7f1 100%);
}

.hdaf-compare-page__eyebrow {
	display: inline-flex;
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #ff6500;
}

.hdaf-compare-page__title {
	margin: 0;
	font-size: clamp(28px, 3vw, 42px);
	font-weight: 800;
	line-height: 1.08;
	letter-spacing: -0.02em;
	color: #111827;
}

.hdaf-compare-page__sub {
	max-width: 760px;
	margin: 10px 0 0;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.6;
	color: #64748b;
}

.hdaf-compare-page__meta {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 118px;
	height: 118px;
	border: 1px solid rgba(255, 101, 0, .18);
	border-radius: 999px;
	background: #fff;
	text-align: center;
}

.hdaf-compare-page__meta strong {
	display: block;
	font-size: 40px;
	font-weight: 800;
	line-height: 1;
	color: #ff6500;
}

.hdaf-compare-page__meta span {
	display: block;
	margin-top: 5px;
	font-size: 12px;
	font-weight: 700;
	color: #64748b;
}

.hdaf-compare-page__body {
	width: 100%;
	margin: 0;
}

.hdaf-compare-page__toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	margin: 0 0 18px;
	padding: 18px 22px;
	border: 1px solid rgba(15, 23, 42, .08);
	border-radius: 18px;
	background: #fff;
}

.hdaf-compare-page__toolbar strong {
	display: block;
	font-size: 17px;
	font-weight: 700;
	color: #111827;
}

.hdaf-compare-page__toolbar span {
	display: block;
	margin-top: 4px;
	font-size: 13px;
	font-weight: 400;
	color: #64748b;
}

.hdaf-compare-page__clear,
.hdaf-compare-empty__btn,
.hdaf-compare-product__view,
.hdaf-compare-product__cart {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 0 18px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.15;
	text-align: center;
	text-decoration: none !important;
	box-shadow: none !important;
	cursor: pointer;
}

.hdaf-compare-page__clear {
	border: 1px solid rgba(239, 68, 68, .24);
	background: #fff;
	color: #ef4444;
}

.hdaf-compare-page__clear:hover {
	border-color: rgba(239, 68, 68, .42);
	background: #fff7f7;
	color: #dc2626;
}

.hdaf-compare-products {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 18px;
	width: 100%;
	margin: 0;
}

.hdaf-compare-product {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 18px;
	border: 1px solid rgba(15, 23, 42, .08);
	border-radius: 20px;
	background: #fff;
}

.hdaf-compare-product__remove {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 1px solid rgba(239, 68, 68, .24);
	border-radius: 999px;
	background: #fff1f2;
	color: #ff4d5e;
	font-size: 24px;
	line-height: 1;
	box-shadow: none !important;
	cursor: pointer;
}

.hdaf-compare-product__remove:hover {
	background: #ffe4e6;
	color: #e11d48;
}

.hdaf-compare-product__image {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 1 / .78;
	margin: 0 0 18px;
	padding: 12px;
	border: 1px solid rgba(15, 23, 42, .07);
	border-radius: 16px;
	background: #fff;
	overflow: hidden;
}

.hdaf-compare-product__image img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}

.hdaf-compare-product__title {
	margin: 0 0 12px;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.32;
	color: #2563eb;
}

.hdaf-compare-product__title a {
	color: #2563eb !important;
	font-weight: 700 !important;
	text-decoration: none !important;
}

.hdaf-compare-product__title a:hover,
.hdaf-compare-product__title a:focus {
	color: #1d4ed8 !important;
	text-decoration: underline !important;
	text-underline-offset: 3px;
}

.hdaf-compare-product__price {
	margin: 0 0 16px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
	color: #111827;
}

.hdaf-compare-product__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin: auto 0 18px;
}

.hdaf-compare-product__view {
	border: 2px solid #111;
	background: #fff;
	color: #111 !important;
}

.hdaf-compare-product__view:hover {
	background: #111;
	color: #fff !important;
}

.hdaf-compare-product__cart {
	border: 1px solid #ff6500;
	background: #ff6500;
	color: #fff !important;
}

.hdaf-compare-product__cart:hover {
	background: #e85b00;
	border-color: #e85b00;
	color: #fff !important;
}

.hdaf-compare-product__specs {
	display: grid;
	gap: 0;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(15, 23, 42, .08);
	border-radius: 14px;
	overflow: hidden;
	background: #fff;
}

.hdaf-compare-product__spec {
	display: grid;
	grid-template-columns: minmax(92px, .72fr) minmax(0, 1fr);
	margin: 0;
	border-bottom: 1px solid rgba(15, 23, 42, .07);
}

.hdaf-compare-product__spec:last-child {
	border-bottom: 0;
}

.hdaf-compare-product__spec dt,
.hdaf-compare-product__spec dd {
	min-width: 0;
	margin: 0;
	padding: 10px 11px;
	font-size: 12px;
	line-height: 1.35;
	color: #111827;
}

.hdaf-compare-product__spec dt {
	background: #f8fafc;
	font-weight: 700;
}

.hdaf-compare-product__spec dd {
	font-weight: 400;
	color: #334155;
	overflow-wrap: anywhere;
}

.hdaf-compare-empty {
	padding: 36px 24px;
	border: 1px solid rgba(15, 23, 42, .08);
	border-radius: 22px;
	background: #fff;
	text-align: center;
}

.hdaf-compare-empty__title {
	margin: 0 0 8px;
	font-size: 22px;
	font-weight: 800;
	color: #111827;
}

.hdaf-compare-empty__text {
	max-width: 520px;
	margin: 0 auto 18px;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.6;
	color: #64748b;
}

.hdaf-compare-empty__btn {
	border: 1px solid #ff6500;
	background: #ff6500;
	color: #fff !important;
}

/* Hide theme/default page title for Compare page fallback */
body:has(.hdaf-compare-page) .entry-title,
body:has(.hdaf-compare-page) .page-title {
	display: none !important;
}

@media (max-width: 1530px) {
	.hdaf-compare-page {
		width: calc(100vw - 60px);
	}
}

@media (max-width: 1180px) {
	.hdaf-compare-page {
		width: calc(100vw - 32px);
		margin-top: -40px;
	}

	.hdaf-compare-page__hero {
		padding: 24px;
	}

	.hdaf-compare-products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.hdaf-compare-product__spec {
		grid-template-columns: minmax(104px, .62fr) minmax(0, 1fr);
	}
}

@media (max-width: 640px) {
	.hdaf-compare-page {
		width: calc(100vw - 24px);
	}

	.hdaf-compare-page__hero {
		display: block;
		padding: 22px 18px;
	}

	.hdaf-compare-page__meta {
		margin-top: 18px;
	}

	.hdaf-compare-page__toolbar {
		align-items: flex-start;
		flex-direction: column;
	}

	.hdaf-compare-page__clear {
		width: 100%;
	}

	.hdaf-compare-products {
		grid-template-columns: 1fr;
	}

	.hdaf-compare-product__actions {
		grid-template-columns: 1fr;
	}

	.hdaf-compare-product__spec {
		grid-template-columns: 1fr;
	}

	.hdaf-compare-product__spec dt {
		padding-bottom: 4px;
	}

	.hdaf-compare-product__spec dd {
		padding-top: 4px;
	}
}


/* Final responsive compare hero polish */
@media (max-width: 1180px) {
	.hdaf-compare-page__hero {
		align-items: flex-start;
		min-height: 0;
		padding: 18px 20px;
		border-radius: 18px;
	}

	.hdaf-compare-page__title {
		font-size: clamp(24px, 3.2vw, 32px);
	}

	.hdaf-compare-page__sub {
		margin-top: 7px;
		font-size: 14px;
		line-height: 1.45;
	}

	.hdaf-compare-page__meta {
		display: none !important;
	}
}

@media (max-width: 767px) {
	.hdaf-compare-page__hero {
		display: block;
		padding: 16px 16px;
		border-radius: 16px;
	}

	.hdaf-compare-page__eyebrow {
		margin-bottom: 6px;
		font-size: 11px;
	}

	.hdaf-compare-page__title {
		font-size: 24px;
		line-height: 1.1;
	}

	.hdaf-compare-page__sub {
		max-width: none;
		margin-top: 6px;
		font-size: 13px;
		line-height: 1.42;
	}

	.hdaf-compare-page__meta {
		display: none !important;
	}
}

@media (max-width: 420px) {
	.hdaf-compare-page__hero {
		padding: 15px 14px;
	}
}
