/* =====================================================================
   Extra home sections (approved design; loaded on the home page only, after home-page.css):
   product-quiz (.hx-quiz), shop-by-budget (.hx-budget), daily-deal (.hx-deal), scratch-coupon (.hx-scratch),
   launch-teaser (.hx-launch), products-compare (.hx-compare). Every rule starts with the section's class (or the
   shared .hx-* pieces inside them). The page zoom on .home scales everything from 768px; the space between the
   sections is the shared home spacing (home-page.css). Products use the theme's cards.
   ===================================================================== */
:is(.hx-quiz, .hx-budget, .hx-deal, .hx-scratch, .hx-launch, .hx-compare) {
	--hx-ink: #121826;
	--hx-body: #344054;
	--hx-muted: #667085;
	--hx-line: #e6e9ef;
	--hx-field: #f4f6f9;
	--hx-surface: #ffffff;
	--hx-ok: #1b7a34;
	--hx-sale: #c4302f;
	--hx-dark: #121826;
	--hx-on-dark: #ffffff;
	--hx-accent: var(--primary-color, #3b82f6);
	--hx-soft: #eef4fe;
	--hx-soft: color-mix(in srgb, var(--primary-color, #3b82f6) 9%, #ffffff);
	color: var(--hx-ink);
}
/* the card that holds a section's content: the phone width design, at most 760 local px wide on wide screens */
:is(.hx-quiz, .hx-budget, .hx-deal, .hx-scratch, .hx-launch, .hx-compare) .hx-card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0 12px;
	padding: 14px;
	border-radius: 20px;
	background-color: var(--hx-surface);
	text-align: start;
}
@media (min-width: 768px) {
	:is(.hx-quiz, .hx-deal, .hx-scratch, .hx-launch, .hx-compare) .hx-card {
		max-width: 760px;
		margin: 0 auto;
	}
	.hx-budget .hx-card {
		margin: 0;
	}
}
/* buttons */
:is(.hx-quiz, .hx-budget, .hx-deal, .hx-scratch, .hx-launch, .hx-compare) .hx-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	height: 46px;
	margin: 0;
	padding: 0 18px;
	border: 0;
	border-radius: 14px;
	background-color: var(--hx-accent);
	color: var(--second-color, #ffffff);
	font-size: 13.5px;
	font-weight: var(--w-btn);
	cursor: pointer;
}
:is(.hx-quiz, .hx-budget, .hx-deal, .hx-scratch, .hx-launch, .hx-compare) .hx-btn.is-ghost {
	background-color: var(--hx-soft);
	color: var(--hx-accent);
}
:is(.hx-quiz, .hx-budget, .hx-deal, .hx-scratch, .hx-launch, .hx-compare) .hx-btn[disabled] {
	opacity: .45;
	cursor: default;
}
:is(.hx-quiz, .hx-budget, .hx-deal, .hx-scratch, .hx-launch, .hx-compare) .hx-btn[hidden] { display: none; }
:is(.hx-quiz, .hx-budget, .hx-deal, .hx-scratch, .hx-launch, .hx-compare) :is(button, a, input):focus-visible {
	outline: 2px solid var(--hx-accent);
	outline-offset: 2px;
}
/* loading cards */
:is(.hx-quiz, .hx-budget) .hx-skel {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 8px;
	border-radius: 16px;
	background-color: var(--hx-surface);
}
:is(.hx-quiz, .hx-budget) .hx-skel i {
	display: block;
	aspect-ratio: 1;
	border-radius: 14px;
	background-color: var(--hx-field);
}
:is(.hx-quiz, .hx-budget) .hx-skel b {
	display: block;
	width: 70%;
	height: 10px;
	border-radius: 6px;
	background-color: var(--hx-field);
}
:is(.hx-quiz, .hx-budget) .hx-skel b + b { width: 40%; }
@media (prefers-reduced-motion: no-preference) {
	:is(.hx-quiz, .hx-budget) .hx-skel :is(i, b) { animation: hx-pulse 1.2s ease-in-out infinite alternate; }
}
@keyframes hx-pulse { to { opacity: .55; } }
/* the empty state icon */
:is(.hx-quiz, .hx-budget) .hx-empty-ic {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 14px;
	background-color: var(--hx-soft);
	color: var(--hx-accent);
}

/* ---------- 1) product quiz ---------- */
.hx-quiz .hx-quiz-dots {
	display: flex;
	gap: 5px;
}
.hx-quiz .hx-quiz-dots i {
	flex: 1 1 0;
	height: 4px;
	border-radius: 4px;
	background-color: var(--hx-line);
}
.hx-quiz .hx-quiz-dots i.is-on { background-color: var(--hx-accent); }
.hx-quiz .hx-quiz-step {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.hx-quiz .hx-quiz-step[hidden],
.hx-quiz .hx-quiz-result[hidden],
.hx-quiz :is(.hx-quiz-empty, .hx-quiz-error)[hidden] { display: none; }
.hx-quiz .hx-quiz-count {
	color: var(--hx-muted);
	font-size: 11px;
}
.hx-quiz .hx-quiz-q {
	color: var(--hx-ink);
	font-size: 16px;
	font-weight: 800;
	line-height: 1.4;
	outline: none;
}
.hx-quiz .hx-quiz-ans {
	display: grid;
	gap: 8px;
	margin-top: 8px;
}
.hx-quiz .hx-quiz-a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	min-height: 52px;
	margin: 0;
	padding: 6px 14px;
	border: 0;
	border-radius: 14px;
	background-color: var(--hx-field);
	color: var(--hx-ink);
	font-size: 13.5px;
	font-weight: 500;
	line-height: 1.5;
	text-align: start;
	cursor: pointer;
}
.hx-quiz .hx-quiz-a:hover { background-color: var(--hx-soft); }
.hx-quiz .hx-quiz-a svg.ico { color: var(--hx-muted); }
.hx-quiz .hx-quiz-back {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	align-self: flex-start;
	margin: 6px 0 0;
	padding: 4px 0;
	border: 0;
	background: none;
	color: var(--hx-muted);
	font-size: 12px;
	cursor: pointer;
}
.hx-quiz .hx-quiz-result {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.hx-quiz .hx-quiz-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}
.hx-quiz .hx-quiz-grid:empty { display: none; }
/* the theme's card comes in its grid column (.product-item-slide col-6 ...): the column fills its cell here */
:is(.hx-quiz, .hx-budget) :is(.hx-quiz-grid, .hx-budget-grid) > .product-item-slide {
	flex: none;
	width: auto;
	max-width: none;
	margin: 0;
	padding: 0;
}
:is(.hx-quiz, .hx-budget) :is(.hx-quiz-grid, .hx-budget-grid) > .product-item-slide > .block-product {
	width: 100%;
	height: 100%;
}
@media (min-width: 768px) {
	.hx-quiz .hx-quiz-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.hx-quiz .hx-quiz-empty,
.hx-quiz .hx-quiz-error {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 12px 0;
	color: var(--hx-body);
	font-size: 13px;
	text-align: center;
}
.hx-quiz .hx-quiz-empty a { color: var(--hx-accent); font-weight: 700; }
.hx-quiz .hx-quiz-error .hx-btn { width: auto; height: 38px; }
.hx-quiz .hx-quiz-foot {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* ---------- 2) shop by budget ---------- */
.hx-budget .hx-budget-wrap {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.hx-budget .hx-budget-top {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 10px;
}
.hx-budget .hx-budget-amount {
	color: var(--hx-ink);
	font-size: 30px;
	font-weight: 800;
	line-height: 1.2;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
.hx-budget .hx-budget-cur { font-size: 18px; }
.hx-budget .hx-budget-count {
	color: var(--hx-muted);
	font-size: 11.5px;
	white-space: nowrap;
}
.hx-budget .hx-budget-range {
	width: 100%;
	height: 28px;
	margin: 0;
	accent-color: var(--hx-accent);
	direction: ltr;
	cursor: pointer;
}
.hx-budget .hx-budget-quick {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.hx-budget .hx-chip {
	display: inline-flex;
	align-items: center;
	height: 34px;
	margin: 0;
	padding: 0 13px;
	border: 0;
	border-radius: 999px;
	background-color: var(--hx-field);
	color: var(--hx-body);
	font-size: 12.5px;
	white-space: nowrap;
	cursor: pointer;
}
.hx-budget .hx-chip.is-on {
	background-color: var(--hx-soft);
	color: var(--hx-accent);
	font-weight: 700;
}
.hx-budget .hx-chip[hidden] { display: none; }
.hx-budget .hx-budget-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	margin: 0 12px;
}
.hx-budget .hx-budget-grid:empty { display: none; }
@media (min-width: 768px) {
	.hx-budget .hx-budget-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
}
@media (min-width: 1024px) {
	.hx-budget .hx-budget-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.hx-budget .hx-budget-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 14px 0;
	color: var(--hx-body);
	font-size: 13px;
	text-align: center;
}
.hx-budget .hx-budget-empty[hidden] { display: none; }
.hx-budget .hx-budget-all {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	align-self: center;
	color: var(--hx-accent);
	font-size: 13px;
	font-weight: 700;
}
.hx-budget .hx-budget-all[hidden] { display: none; }

/* the dark timer boxes (daily deal, launch) */
:is(.hx-deal, .hx-launch) .hx-timer {
	display: flex;
	gap: 6px;
	direction: ltr;
}
:is(.hx-deal, .hx-launch) .hx-timer > span {
	min-width: 46px;
	padding: 6px 4px;
	border-radius: 12px;
	background-color: var(--hx-dark);
	color: var(--hx-on-dark);
	text-align: center;
	line-height: 1.2;
}
:is(.hx-deal, .hx-launch) .hx-timer b {
	display: block;
	font-size: 17px;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}
:is(.hx-deal, .hx-launch) .hx-timer small {
	display: block;
	font-size: 9.5px;
	opacity: .75;
}

/* ---------- 3) daily deal ---------- */
.hx-deal[hidden] { display: none; }
.hx-deal .hx-deal-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}
.hx-deal .hx-deal-titles {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1.4;
}
.hx-deal .hx-deal-badge {
	color: var(--hx-muted);
	font-size: 11.5px;
}
.hx-deal .hx-deal-title {
	color: var(--hx-ink);
	font-size: 15px;
	font-weight: 800;
}
.hx-deal .hx-deal-slot {
	position: relative;
}
.hx-deal .hx-deal-slot[hidden] { display: none; }
.hx-deal .hx-deal-slot > .block-product.pc--hor {
	padding: 0;
	background: none;
}
.hx-deal .hx-deal-soon {
	display: none;
	color: var(--hx-accent);
	font-size: 12px;
	font-weight: 700;
}
/* a coming day: blurred, without the add button or the quick buttons */
.hx-deal .hx-deal-slot.is-preview .pc-media { filter: blur(8px); }
.hx-deal .hx-deal-slot.is-preview :is(.pc-end, .pc-cta, .pc-actions, .pc-price) { visibility: hidden; }
.hx-deal .hx-deal-slot.is-preview .pc-name a { pointer-events: none; }
.hx-deal .hx-deal-slot.is-preview .hx-deal-soon { display: block; margin-top: 6px; }
.hx-deal .hx-deal-days {
	display: flex;
	gap: 5px;
}
.hx-deal .hx-deal-day {
	flex: 1 1 0;
	min-width: 0;
	margin: 0;
	padding: 6px 0;
	border: 0;
	border-radius: 10px;
	background-color: var(--hx-field);
	color: var(--hx-muted);
	font-size: 10.5px;
	text-align: center;
	cursor: pointer;
}
.hx-deal .hx-deal-day.is-today {
	background-color: var(--hx-dark);
	color: var(--hx-on-dark);
	font-weight: 700;
}
.hx-deal .hx-deal-day.is-pick {
	box-shadow: inset 0 0 0 1.5px var(--hx-accent);
	color: var(--hx-accent);
}
.hx-deal .hx-deal-day:is(.is-past, .is-none) {
	opacity: .45;
	cursor: default;
}

/* ---------- 4) scratch coupon ---------- */
.hx-scratch .hx-sc {
	position: relative;
	display: grid;
	place-items: center;
	height: 120px;
	overflow: hidden;
	border-radius: 16px;
	background-color: var(--hx-soft);
	text-align: center;
}
.hx-scratch .hx-sc-under {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 0 12px;
}
.hx-scratch .hx-sc-line {
	color: var(--hx-body);
	font-size: 12.5px;
}
.hx-scratch .hx-sc-code {
	color: var(--hx-accent);
	font-size: 24px;
	font-weight: 800;
	letter-spacing: .06em;
	direction: ltr;
	user-select: all;
}
.hx-scratch .hx-sc-canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	touch-action: none;                 /* scratching does not move the page; around the card it scrolls as usual */
	cursor: grab;
	transition: opacity .35s ease;
}
.hx-scratch .hx-sc.is-open .hx-sc-canvas {
	opacity: 0;
	pointer-events: none;
}
.hx-scratch .hx-sc-row {
	display: flex;
	gap: 8px;
}
/* «reveal» without scratching: visible to the keyboard and screen readers when focused, always with reduced motion */
.hx-scratch .hx-sc-reveal:not(:focus-visible) {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.hx-scratch .hx-sc-reveal[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) {
	.hx-scratch .hx-sc-reveal:not(:focus-visible) {
		position: static;
		width: auto;
		height: 46px;
		clip: auto;
	}
	.hx-scratch .hx-sc-row .hx-btn { flex: 1 1 0; }
	.hx-scratch .hx-sc-canvas { transition: none; }
}

/* ---------- 5) product launch ---------- */
.hx-launch[hidden] { display: none; }
.hx-launch .hx-launch-pre,
.hx-launch .hx-launch-live {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.hx-launch :is(.hx-launch-pre, .hx-launch-live)[hidden] { display: none; }
.hx-launch .hx-launch-row {
	display: flex;
	align-items: center;
	gap: 12px;
}
.hx-launch .hx-launch-titles {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	line-height: 1.45;
}
.hx-launch .hx-launch-badge {
	color: var(--hx-muted);
	font-size: 11.5px;
}
.hx-launch .hx-launch-title {
	color: var(--hx-ink);
	font-size: 15px;
	font-weight: 800;
}
.hx-launch .hx-launch-text {
	color: var(--hx-body);
	font-size: 12.5px;
}
.hx-launch .hx-launch-name {
	color: var(--hx-body);
	font-size: 12.5px;
	font-weight: 700;
}
.hx-launch .hx-launch-pic {
	flex: 0 0 76px;
	width: 76px;
	height: 76px;
	overflow: hidden;
	border-radius: 16px;
	background-color: var(--hx-field);
}
.hx-launch .hx-launch-pic img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.hx-launch.is-blur .hx-launch-pic img {
	filter: blur(9px) saturate(.6);
	transform: scale(1.15);             /* no sharp edge around the blur */
}
.hx-launch .hx-timer > span { flex: 1 1 0; }
.hx-launch .hx-launch-remind.is-done {
	background-color: var(--hx-soft);
	color: var(--hx-accent);
}
.hx-launch .hx-launch-card > .product-item-slide {
	width: auto;
	max-width: 260px;
	margin: 0;
	padding: 0;
}
.hx-launch .hx-launch-card > .block-product.pc--hor {
	padding: 0;
	background: none;
}

/* ---------- 6) products compare ---------- */
.hx-compare .hx-cmp-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}
.hx-compare .hx-cmp-title {
	color: var(--hx-ink);
	font-size: 15px;
	font-weight: 800;
}
.hx-compare .hx-cmp-sub {
	display: block;
	color: var(--hx-muted);
	font-size: 12px;
}
.hx-compare .hx-cmp-diff {
	flex: none;
	height: 32px;
	margin: 0;
	padding: 0 12px;
	border: 0;
	border-radius: 999px;
	background-color: var(--hx-field);
	color: var(--hx-body);
	font-size: 12px;
	cursor: pointer;
}
.hx-compare .hx-cmp-diff[aria-pressed='true'] {
	background-color: var(--hx-soft);
	color: var(--hx-accent);
	font-weight: 700;
}
.hx-compare .hx-cmp-table {
	display: block;
	width: 100%;
	margin: 0;
	border-collapse: separate;
}
.hx-compare .hx-cmp-table :is(thead, tbody) { display: block; }
/* every row: equal columns; a row's title sits small and centred above its values */
.hx-compare .hx-cmp-table tr {
	display: grid;
	grid-template-columns: repeat(var(--hx-cols, 2), minmax(0, 1fr));
	gap: 0 8px;
}
.hx-compare .hx-cmp-heads { gap: 8px; }
.hx-compare .hx-cmp-heads th { padding: 0; font-weight: 400; }
.hx-compare .hx-cmp-p {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 8px;
	border: 1.5px solid var(--hx-line);
	border-radius: 16px;
	background: none;
	color: var(--hx-ink);
	cursor: pointer;
}
.hx-compare .hx-cmp-p.is-on { border-color: var(--hx-accent); }
.hx-compare .hx-cmp-img {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: 12px;
	background-color: var(--hx-field);
}
.hx-compare .hx-cmp-img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.hx-compare .hx-cmp-name {
	font-size: 12.5px;
	font-weight: 700;
	line-height: 1.45;
	text-align: center;
	overflow-wrap: anywhere;            /* long names wrap, never cut */
}
.hx-compare .hx-cmp-row {
	padding: 9px 0;
	border-bottom: 1px solid var(--hx-line);
}
.hx-compare .hx-cmp-row th {
	grid-column: 1 / -1;
	padding: 0 0 3px;
	color: var(--hx-muted);
	font-size: 11px;
	font-weight: 400;
	text-align: center;
}
.hx-compare .hx-cmp-row td {
	padding: 0;
	border: 0;
	color: var(--hx-body);
	font-size: 13px;
	text-align: center;
	overflow-wrap: anywhere;
}
.hx-compare .hx-cmp-row.is-price td {
	color: var(--hx-ink);
	font-weight: 800;
}
.hx-compare .hx-cmp-row.is-price td.is-low { color: var(--hx-ok); }
.hx-compare.is-diff .hx-cmp-row[data-same] { display: none; }
.hx-compare .hx-cmp-ctas .hx-btn { width: 100%; }
.hx-compare .hx-cmp-ctas .hx-btn[hidden] { display: none; }
.hx-compare .hx-cmp-ctas .hx-btn span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
