/**
 * Compare page styles.
 *
 * @package SunTechPortal
 */

body.stp-compare-page-active .entry-title,
body.stp-compare-page-active .wp-block-post-title,
body.stp-compare-page-active main > h1:first-child {
	display: none !important;
}

body.stp-compare-page-active {
	background: #f3f4f6;
}

.stp-compare-page,
.stp-compare-page * {
	box-sizing: border-box;
}

.stp-compare-page {
	width: min(1500px, calc(100vw - 40px));
	margin: -20px auto 70px;
	color: #111827;
}

.stp-compare-page__hero,
.stp-compare-page__panel {
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 18px;
	box-shadow: none;
}

.stp-compare-page__hero {
	display: flex;
	gap: 20px;
	align-items: center;
	justify-content: space-between;
	margin: 0 0 20px;
	padding: 24px 28px;
}

.stp-compare-page__hero span {
	display: block;
	margin: 0 0 6px;
	color: #ff5a00;
	font-size: 12px;
	font-weight: 900;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.stp-compare-page__hero h1 {
	margin: 0;
	color: #111827;
	font-size: clamp(28px, 3vw, 42px);
	font-weight: 900;
	line-height: 1.05;
}

.stp-compare-page__hero p {
	margin: 8px 0 0;
	color: #64748b;
	font-size: 14px;
	line-height: 1.6;
}

.stp-compare-page__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 0 20px;
	color: #111827;
	background: #f8fafc;
	border: 1px solid #e5e7eb;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 900;
	white-space: nowrap;
}

.stp-compare-page__panel {
	padding: 24px;
	overflow: hidden;
}

.stp-compare-page__head {
	display: flex;
	gap: 20px;
	align-items: flex-start;
	justify-content: space-between;
	padding: 0 0 18px;
	border-bottom: 1px solid #e5e7eb;
}

.stp-compare-page__head h2 {
	margin: 0 0 6px;
	color: #111827;
	font-size: 18px;
	font-weight: 900;
	line-height: 1.2;
}

.stp-compare-page__head p {
	margin: 0;
	color: #64748b;
	font-size: 13px;
	line-height: 1.5;
}

.stp-compare-page__actions {
	display: inline-flex;
	gap: 10px;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: nowrap;
}

.stp-compare-page__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 0 20px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 900;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition:
		background-color 0.16s ease,
		border-color 0.16s ease,
		color 0.16s ease;
}

.stp-compare-page__button--shop {
	color: #ffffff;
	background: #16a34a;
	border: 1px solid #16a34a;
}

.stp-compare-page__button--shop:hover,
.stp-compare-page__button--shop:focus {
	color: #ffffff;
	background: #15803d;
	border-color: #15803d;
}

.stp-compare-page__button--clear {
	color: #ffffff;
	background: #ef4444;
	border: 1px solid #ef4444;
}

.stp-compare-page__button--clear:hover,
.stp-compare-page__button--clear:focus {
	color: #ffffff;
	background: #dc2626;
	border-color: #dc2626;
}

.stp-compare-page__button:disabled {
	cursor: not-allowed;
	opacity: 0.55;
}

.stp-compare-page__empty {
	padding: 42px 20px;
	color: #64748b;
	font-size: 14px;
	text-align: center;
}

.stp-compare-page__table-wrap {
	overflow-x: auto;
	margin: 22px -4px 0;
	padding: 0 4px 4px;
}

.stp-compare-page__table {
	width: 100%;
	min-width: 760px;
	border-collapse: separate;
	border-spacing: 0;
}

.stp-compare-page__table th,
.stp-compare-page__table td {
	padding: 16px;
	vertical-align: top;
	background: #ffffff;
	border-bottom: 1px solid #e5e7eb;
}

.stp-compare-page__table th {
	width: 170px;
	color: #111827;
	font-size: 13px;
	font-weight: 900;
	text-align: left;
	background: #f8fafc;
}

.stp-compare-page__table td {
	min-width: 210px;
	color: #111827;
	font-size: 13px;
	font-weight: 700;
}

.stp-compare-page__product {
	display: grid;
	gap: 10px;
	min-width: 0;
}

.stp-compare-page__image {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 1 / 0.76;
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	overflow: hidden;
}

.stp-compare-page__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.stp-compare-page__title {
	display: -webkit-box;
	overflow: hidden;
	color: #2563eb;
	font-size: 14px;
	font-weight: 900;
	line-height: 1.35;
	text-decoration: none;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.stp-compare-page__title:hover,
.stp-compare-page__title:focus {
	color: #1d4ed8;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.stp-compare-page__remove {
	justify-self: start;
	padding: 0;
	color: #ef4444;
	background: transparent;
	border: 0;
	font-size: 12px;
	font-weight: 900;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

@media (max-width: 960px) {
	.stp-compare-page {
		width: min(100%, calc(100vw - 24px));
		margin-top: -20px;
	}

	.stp-compare-page__hero,
	.stp-compare-page__head {
		align-items: stretch;
		flex-direction: column;
	}

	.stp-compare-page__actions {
		width: 100%;
		justify-content: flex-end;
	}
}

@media (max-width: 600px) {
	.stp-compare-page {
		width: min(100%, calc(100vw - 18px));
		margin-bottom: 44px;
	}

	.stp-compare-page__hero,
	.stp-compare-page__panel {
		border-radius: 14px;
	}

	.stp-compare-page__hero {
		padding: 20px;
	}

	.stp-compare-page__panel {
		padding: 18px;
	}

	.stp-compare-page__actions {
		gap: 8px;
	}

	.stp-compare-page__button {
		flex: 1 1 0;
		min-width: 0;
		padding: 0 12px;
	}
}


/* Modern compare page polish without blur/shade effects. */
.stp-compare-page__panel {
	border-color: #dfe5ec;
}

.stp-compare-page__table-wrap {
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	overflow: auto;
}

.stp-compare-page__table th {
	position: sticky;
	left: 0;
	z-index: 2;
	background: #f8fafc;
}

.stp-compare-page__table tr:first-child th,
.stp-compare-page__table tr:first-child td {
	border-top: 0;
}

.stp-compare-page__table tr:hover th,
.stp-compare-page__table tr:hover td {
	background: #fff7ed;
}

.stp-compare-page__product {
	align-items: stretch;
}

.stp-compare-page__remove {
	justify-self: start;
	min-height: 34px;
	padding: 0 14px;
	color: #ef4444;
	background: #fff1f2;
	border: 1px solid #fecdd3;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 900;
	cursor: pointer;
}

.stp-compare-page__remove:hover,
.stp-compare-page__remove:focus {
	color: #ffffff;
	background: #ef4444;
	border-color: #ef4444;
	outline: none;
}

@media (max-width: 767px) {
	.stp-compare-page {
		width: min(100% - 24px, 1500px);
	}

	.stp-compare-page__hero,
	.stp-compare-page__head {
		align-items: stretch;
		flex-direction: column;
	}

	.stp-compare-page__actions {
		justify-content: flex-start;
	}
}


/* Final spacing and full-width balance correction. */
body.stp-compare-page-active .stp-compare-page {
	position: relative !important;
	left: 50% !important;
	width: min(1500px, calc(100vw - 40px)) !important;
	max-width: none !important;
	margin: -140px 0 70px !important;
	transform: translateX(-50%) !important;
}

body.stp-compare-page-active .stp-compare-page__hero,
body.stp-compare-page-active .stp-compare-page__panel,
body.stp-compare-page-active .stp-compare-page__table-wrap {
	box-shadow: none !important;
	filter: none !important;
	backdrop-filter: none !important;
}

body.stp-compare-page-active .stp-compare-page__table-wrap {
	width: 100%;
	margin: 22px 0 0;
	padding: 0;
}

body.stp-compare-page-active .stp-compare-page__table {
	min-width: 980px;
}

@media (max-width: 960px) {
	body.stp-compare-page-active .stp-compare-page {
		width: min(100vw - 24px, 1500px) !important;
		margin-top: -120px !important;
	}
}

@media (max-width: 600px) {
	body.stp-compare-page-active .stp-compare-page {
		width: min(100vw - 18px, 1500px) !important;
		margin-top: -110px !important;
		margin-bottom: 44px !important;
	}
}


/* Latest modern compare page redesign: clean, balanced, no blur/shade. */
body.stp-compare-page-active .stp-compare-page {
	width: min(1500px, calc(100vw - 40px)) !important;
	margin-top: -140px !important;
}

body.stp-compare-page-active .stp-compare-page__hero,
body.stp-compare-page-active .stp-compare-page__panel {
	background: #ffffff !important;
	border: 1px solid #dfe5ec !important;
	border-radius: 18px !important;
	box-shadow: none !important;
	filter: none !important;
	backdrop-filter: none !important;
}

.stp-compare-page__hero {
	padding: 26px 30px !important;
}

.stp-compare-page__panel {
	padding: 28px !important;
}

.stp-compare-page__head {
	align-items: center !important;
	padding-bottom: 20px !important;
	border-bottom-color: #dfe5ec !important;
}

.stp-compare-page__head h2 {
	font-size: 20px !important;
}

.stp-compare-page__actions {
	gap: 12px !important;
}

.stp-compare-page__button {
	min-height: 44px !important;
	padding: 0 22px !important;
	border-radius: 14px !important;
}

body.stp-compare-page-active .stp-compare-page__table-wrap {
	margin-top: 24px !important;
	border: 1px solid #dfe5ec !important;
	border-radius: 18px !important;
	background: #ffffff !important;
	box-shadow: none !important;
	overflow: auto !important;
}

.stp-compare-page__table {
	border-collapse: separate !important;
	border-spacing: 0 !important;
}

.stp-compare-page__table th,
.stp-compare-page__table td {
	padding: 18px !important;
	background: #ffffff !important;
	border-bottom: 1px solid #e7ebf0 !important;
	border-right: 1px solid #eef2f7 !important;
}

.stp-compare-page__table tr:last-child th,
.stp-compare-page__table tr:last-child td {
	border-bottom: 0 !important;
}

.stp-compare-page__table th {
	width: 170px !important;
	background: #f8fafc !important;
	color: #0f172a !important;
	font-size: 13px !important;
	letter-spacing: 0.01em;
}

.stp-compare-page__table tr:hover th,
.stp-compare-page__table tr:hover td {
	background: #ffffff !important;
}

.stp-compare-page__table tr:hover th {
	background: #f8fafc !important;
}

.stp-compare-page__table tr:first-child td {
	padding-top: 22px !important;
	background: #ffffff !important;
}

.stp-compare-page__product {
	align-items: start !important;
	gap: 12px !important;
}

.stp-compare-page__image {
	width: 100% !important;
	max-width: 210px !important;
	background: #ffffff !important;
	border: 1px solid #dfe5ec !important;
	border-radius: 16px !important;
}

.stp-compare-page__title {
	max-width: 230px;
	color: #2563eb !important;
	font-size: 14px !important;
	line-height: 1.4 !important;
}

.stp-compare-page__title:hover,
.stp-compare-page__title:focus {
	color: #1d4ed8 !important;
	text-decoration: underline !important;
	text-decoration-color: #1d4ed8 !important;
}

.stp-compare-page__remove {
	min-height: 32px !important;
	padding: 0 13px !important;
	color: #ef4444 !important;
	background: #fff5f5 !important;
	border: 1px solid #fecaca !important;
	border-radius: 999px !important;
	text-decoration: none !important;
}

.stp-compare-page__remove:hover,
.stp-compare-page__remove:focus {
	color: #ffffff !important;
	background: #ef4444 !important;
	border-color: #ef4444 !important;
}

@media (max-width: 960px) {
	body.stp-compare-page-active .stp-compare-page {
		width: min(100vw - 24px, 1500px) !important;
		margin-top: -120px !important;
	}

	.stp-compare-page__panel {
		padding: 22px !important;
	}
}

@media (max-width: 600px) {
	body.stp-compare-page-active .stp-compare-page {
		width: min(100vw - 18px, 1500px) !important;
		margin-top: -110px !important;
	}

	.stp-compare-page__hero,
	.stp-compare-page__panel {
		border-radius: 14px !important;
	}

	.stp-compare-page__button {
		min-height: 40px !important;
		padding: 0 12px !important;
	}
}
