/** Header compare action and widget. */
.stp-header-main__actions .stp-header-compare {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: inherit;
}

.stp-header-main__actions .stp-header-compare *,
.stp-header-main__actions .stp-header-compare *::before,
.stp-header-main__actions .stp-header-compare *::after {
	box-sizing: border-box;
}

.stp-header-main__actions .stp-header-compare .stp-header-action--compare {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 42px;
	width: 42px;
	min-width: 42px;
	height: 42px;
	min-height: 42px;
	padding: 0;
	color: #111827;
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	text-decoration: none;
	box-shadow: none;
	outline: none;
	cursor: pointer;
	transition:
		border-color 0.16s ease,
		background-color 0.16s ease;
}

.stp-header-main__actions .stp-header-compare .stp-header-action--compare:hover,
.stp-header-main__actions .stp-header-compare .stp-header-action--compare:focus,
.stp-header-main__actions .stp-header-compare .stp-header-action--compare[aria-expanded="true"] {
	color: #111827;
	background: #ffffff;
	border-color: #cbd5e1;
	text-decoration: none;
	box-shadow: none;
	outline: none;
}

.stp-header-main__actions .stp-header-compare .stp-header-action--compare:focus-visible {
	outline: 2px solid #111827;
	outline-offset: 2px;
}

.stp-header-main__actions .stp-header-compare .stp-header-action__icon {
	display: block;
	width: 22px;
	height: 22px;
	object-fit: contain;
	filter: none;
	opacity: 1;
	transform: none;
	transition: none;
}

.stp-header-main__actions .stp-header-compare .stp-header-action__badge {
	position: absolute;
	top: -8px;
	right: -8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 17px;
	height: 17px;
	padding: 0 5px;
	color: #ffffff;
	background: #16a34a;
	border: 2px solid #ffffff;
	border-radius: 999px;
	font-size: 10px;
	font-weight: 900;
	line-height: 1;
	text-align: center;
	white-space: nowrap;
}

.stp-header-compare__dropdown {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	z-index: 9999;
	width: min(384px, calc(100vw - 28px));
	background: #ffffff;
	border: 1px solid rgba(15, 23, 42, 0.1);
	border-radius: 16px;
	box-shadow: none;
}

.stp-header-compare__dropdown[hidden] {
	display: none !important;
}

.stp-header-compare__dropdown::before {
	position: absolute;
	top: -6px;
	right: 14px;
	width: 12px;
	height: 12px;
	content: "";
	background: #ffffff;
	border-top: 1px solid rgba(15, 23, 42, 0.1);
	border-left: 1px solid rgba(15, 23, 42, 0.1);
	transform: rotate(45deg);
}

.stp-header-compare-widget {
	display: grid;
	gap: 0;
	overflow: hidden;
	color: #111827;
	background: #ffffff;
	border-radius: 16px;
}

.stp-header-compare-widget__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 15px 18px;
	border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.stp-header-compare-widget__head strong {
	display: block;
	color: #111827;
	font-size: 16px;
	font-weight: 900;
	line-height: 1.2;
}

.stp-header-compare-widget__head span {
	color: #64748b;
	font-size: 12px;
	font-weight: 800;
	line-height: 1.2;
	white-space: nowrap;
}

.stp-header-compare-widget__empty {
	margin: 0;
	padding: 22px 18px;
	color: #64748b;
	font-size: 13px;
	line-height: 1.55;
	text-align: center;
}

.stp-header-compare-widget__list {
	display: grid;
	max-height: 252px;
	margin: 0;
	padding: 8px;
	list-style: none;
	overflow-y: auto;
	scrollbar-width: thin;
}

.stp-header-compare-widget__list::-webkit-scrollbar {
	width: 6px;
}

.stp-header-compare-widget__list::-webkit-scrollbar-thumb {
	background: rgba(100, 116, 139, 0.34);
	border-radius: 999px;
}

.stp-header-compare-widget__list::-webkit-scrollbar-track {
	background: transparent;
}

.stp-header-compare-widget__item {
	position: relative;
	display: grid;
	grid-template-columns: 62px minmax(0, 1fr) 28px;
	gap: 11px;
	align-items: center;
	min-height: 76px;
	margin: 0;
	padding: 8px;
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	transition:
		background-color 0.16s ease,
		border-color 0.16s ease;
}

.stp-header-compare-widget__item + .stp-header-compare-widget__item {
	margin-top: 8px;
}

.stp-header-compare-widget__item:hover,
.stp-header-compare-widget__item:focus-within {
	background: #fff7ed;
	border-color: #fed7aa;
}

.stp-header-compare-widget__thumb {
	display: grid;
	place-items: center;
	width: 62px;
	height: 62px;
	background: #f8fafc;
	border: 1px solid #eef2f7;
	border-radius: 10px;
	overflow: hidden;
}

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

.stp-header-compare-widget__meta {
	display: grid;
	gap: 6px;
	min-width: 0;
}

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

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

.stp-header-compare-widget__meta span {
	color: #111827;
	font-size: 12px;
	font-weight: 800;
	line-height: 1.2;
}

.stp-header-compare-widget__remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	padding: 0;
	color: #ef4444;
	background: #fff1f2;
	border: 1px solid #fecdd3;
	border-radius: 999px;
	font-size: 16px;
	font-weight: 900;
	line-height: 1;
	cursor: pointer;
}

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

.stp-header-compare-widget__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	padding: 14px 18px 16px;
	border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.stp-header-compare-widget__button,
.stp-header-compare-widget__button:visited {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 10px 14px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 900;
	line-height: 1;
	text-decoration: none !important;
	cursor: pointer;
	box-shadow: none;
	transition:
		background-color 0.16s ease,
		border-color 0.16s ease;
}

.stp-header-compare-widget__button--primary {
	color: #ffffff !important;
	background: #ff5a00;
	border: 1px solid #ff5a00;
}

.stp-header-compare-widget__button--primary:hover,
.stp-header-compare-widget__button--primary:focus {
	color: #ffffff !important;
	background: #ea580c;
	border-color: #ea580c;
	text-decoration: none !important;
	outline: none;
}

.stp-header-compare-widget__button--ghost {
	color: #ef4444 !important;
	background: #fff5f5;
	border: 1px solid #fecaca;
}

.stp-header-compare-widget__button--ghost:hover,
.stp-header-compare-widget__button--ghost:focus {
	color: #ffffff !important;
	background: #ef4444;
	border-color: #ef4444;
	text-decoration: none !important;
	outline: none;
}

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

@media (max-width: 1024px) {
	.stp-header-compare__dropdown {
		right: 50%;
		transform: translateX(50%);
	}

	.stp-header-compare__dropdown::before {
		right: 50%;
		margin-right: -6px;
	}
}

@media (max-width: 767px) {
	.stp-header-main__actions .stp-header-compare .stp-header-action--compare {
		flex-basis: 40px;
		width: 40px;
		min-width: 40px;
		height: 40px;
		min-height: 40px;
		border-radius: 12px;
	}

	.stp-header-main__actions .stp-header-compare .stp-header-action__icon {
		width: 21px;
		height: 21px;
	}
}

@media (max-width: 640px) {
	.stp-header-compare__dropdown {
		position: fixed;
		top: var(--stp-compare-dropdown-top, 72px);
		left: 24px;
		right: 24px;
		width: auto;
		max-width: none;
		max-height: calc(100vh - var(--stp-compare-dropdown-top, 72px) - 12px);
		transform: none;
		border-radius: 14px;
		overflow: hidden;
	}

	.stp-header-compare__dropdown::before {
		display: none;
	}

	.stp-header-compare-widget {
		max-height: inherit;
	}

	.stp-header-compare-widget__head {
		padding: 12px 14px;
	}

	.stp-header-compare-widget__head strong {
		font-size: 14px;
	}

	.stp-header-compare-widget__list {
		max-height: min(232px, calc(100vh - var(--stp-compare-dropdown-top, 72px) - 116px));
		padding: 8px;
	}

	.stp-header-compare-widget__item {
		grid-template-columns: 54px minmax(0, 1fr) 26px;
		gap: 9px;
		min-height: 70px;
		padding: 7px;
	}

	.stp-header-compare-widget__thumb {
		width: 54px;
		height: 54px;
	}

	.stp-header-compare-widget__meta a {
		font-size: 12.5px;
	}

	.stp-header-compare-widget__actions {
		padding: 12px 14px;
	}
}


/* Final compare widget polish: no shade effects and stable hover bridge. */
.stp-header-compare__dropdown {
	box-shadow: none !important;
}

.stp-header-compare::after {
	position: absolute;
	top: 100%;
	left: -8px;
	right: -8px;
	height: 12px;
	content: "";
}

@media (max-width: 1024px) {
	.stp-header-compare__dropdown {
		top: calc(100% + 10px);
	}
}

@media (max-width: 640px) {
	.stp-header-compare__dropdown {
		top: calc(var(--stp-compare-dropdown-top, 72px) + 10px);
		max-height: calc(100vh - var(--stp-compare-dropdown-top, 72px) - 22px);
	}
}


/* Final widget button hover and no-shade correction. */
.stp-header-compare__dropdown,
.stp-header-compare-widget {
	box-shadow: none !important;
	filter: none !important;
	backdrop-filter: none !important;
}

.stp-header-compare-widget__button--primary:hover,
.stp-header-compare-widget__button--primary:focus {
	color: #ffffff !important;
	background: #ea580c !important;
	border-color: #ea580c !important;
}


/* Latest compare widget correction: show 3 items and scroll the rest. */
.stp-header-compare-widget__list {
	max-height: 260px !important;
	overflow-y: auto !important;
	overscroll-behavior: contain;
}

.stp-header-compare-widget__item {
	min-height: 76px;
}

.stp-header-compare-widget__item:hover,
.stp-header-compare-widget__item:focus-within {
	background: #f8fafc !important;
	border-color: #d9e2ec !important;
}

.stp-header-compare-widget__button--primary:hover,
.stp-header-compare-widget__button--primary:focus {
	color: #ffffff !important;
	background: #d9480f !important;
	border-color: #d9480f !important;
}

@media (max-width: 640px) {
	.stp-header-compare-widget__list {
		max-height: 244px !important;
	}
}
