/*!
 * EcomDeals front-end stylesheet
 *
 * Every colour, radius, space and font reads from the custom properties
 * generated by ECOMD_design_tokens() in inc/enqueue.php. Nothing here
 * hard-codes a brand value, so the Customizer stays authoritative.
 *
 * 1.  Base and reset
 * 2.  Layout, container and grid
 * 3.  Buttons, pills and badges
 * 4.  Header and navigation
 * 5.  Search and suggestions
 * 6.  Coupon card
 * 7.  Reveal modal, voting, toasts
 * 8.  Store cards, directory and store page
 * 9.  Product cards
 * 10. Hero, filters, category row
 * 11. Single coupon, panels, FAQ, prose
 * 12. Forms and notices
 * 13. Empty states, pagination, widgets, footer
 * 14. Dark mode
 * 15. Print
 */

/* ---------------------------------------------------------------------
   1. Base and reset
   ------------------------------------------------------------------ */

*,
*::before,
*::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	/* Sticky header height, so in-page anchors are not hidden behind it. */
	scroll-padding-top: 100px;
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
	}
}

body {
	margin: 0;
	background: var(--ecomd-bg);
	color: var(--ecomd-text);
	font-family: var(--ecomd-font-body);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	/* Nothing in this design is meant to scroll sideways. */
	overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a {
	color: var(--ecomd-text);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: color .15s ease;
}

a:hover { color: var(--ecomd-primary-dark); }

h1, h2, h3, h4, h5 {
	font-family: var(--ecomd-font-display);
	line-height: 1.1;
	letter-spacing: -0.025em;
	margin: 0 0 .5em;
	font-weight: 800;
	color: var(--ecomd-black);
	text-wrap: balance;
}

/* Page heading: 28-34 mobile, 34-42 tablet, 48-64 desktop. */
h1 { font-size: clamp(1.75rem, 1.05rem + 2.9vw, 3.5rem); }

/* Section heading: 24-28 mobile, 26-32 tablet, 32-42 desktop. */
h2 { font-size: clamp(1.5rem, 1.15rem + 1.5vw, 2.375rem); font-weight: 700; }

h3 { font-size: clamp(1.125rem, 1.05rem + .35vw, 1.375rem); font-weight: 700; }
h4 { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; }

p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }

strong, b { font-weight: 600; }

:focus-visible {
	outline: 3px solid var(--ecomd-black);
	outline-offset: 2px;
	border-radius: var(--ecomd-radius-sm);
}

/* Focus on a green surface needs the inverse, or it disappears. */
.ecomd-btn--primary:focus-visible,
.ecomd-coupon__stub :focus-visible {
	outline-color: var(--ecomd-black);
}

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.ecomd-skip {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 200;
	background: var(--ecomd-black);
	color: #fff;
	padding: var(--ecomd-space-3) var(--ecomd-space-5);
	border-radius: 0 0 var(--ecomd-radius) 0;
	font-weight: 600;
}

.ecomd-skip:focus { left: 0; color: #fff; }

/* ---------------------------------------------------------------------
   2. Layout, container and grid
   ------------------------------------------------------------------ */

.ecomd-container {
	width: min(100% - 32px, var(--ecomd-container));
	margin-inline: auto;
}

@media (max-width: 640px) {
	.ecomd-container { width: min(100% - 32px, var(--ecomd-container)); }
}

.ecomd-section { padding: clamp(2.5rem, 1.5rem + 3vw, 5rem) 0; }
.ecomd-section--tight { padding-block: var(--ecomd-space-8); }

/* Main plus sidebar. The sidebar is a fixed-ish rail so the coupon column
   keeps its width instead of collapsing on mid-size laptops. */
.ecomd-layout {
	display: grid;
	gap: var(--ecomd-space-8);
	align-items: start;
	padding-bottom: var(--ecomd-space-16);
}

.ecomd-layout--sidebar { grid-template-columns: 1fr; }

@media (min-width: 1024px) {
	.ecomd-layout--sidebar { grid-template-columns: 300px minmax(0, 1fr); }
	.ecomd-layout--sidebar .ecomd-sidebar { order: 1; }
	.ecomd-layout--sidebar .ecomd-main { order: 2; }
	.ecomd-layout--sidebar.is-left { grid-template-columns: 300px minmax(0, 1fr); }
	.ecomd-layout--sidebar.is-left .ecomd-main { order: 2; }
	.ecomd-layout--sidebar.is-left .ecomd-sidebar { order: 1; }
}

.ecomd-main { min-width: 0; }

.ecomd-sidebar {
	min-width: 0;
	display: grid;
	gap: var(--ecomd-space-5);
}

@media (min-width: 1024px) {
	.ecomd-sidebar {
		position: sticky;
		top: 96px;
	}
}

/* Auto-fit grids: no fixed column counts, so nothing ever breaks between
   the tested breakpoints. */
.ecomd-grid {
	display: grid;
	gap: var(--ecomd-space-5);
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
}

.ecomd-grid--2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.ecomd-grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.ecomd-grid--4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.ecomd-grid--5,
.ecomd-grid--6 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); }

.ecomd-pagehead {
	padding: clamp(2rem, 1.2rem + 2.5vw, 3.5rem) 0 var(--ecomd-space-6);
}

.ecomd-pagehead__title { margin-bottom: var(--ecomd-space-3); }

.ecomd-pagehead__text {
	color: var(--ecomd-muted);
	font-size: clamp(1rem, .96rem + .2vw, 1.0625rem);
	max-width: 68ch;
	margin: 0;
}

.ecomd-pagehead__meta {
	color: var(--ecomd-muted);
	font-size: .875rem;
	font-weight: 500;
	margin-top: var(--ecomd-space-3);
}

.ecomd-sectionhead {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--ecomd-space-3) var(--ecomd-space-5);
	margin-bottom: var(--ecomd-space-6);
}

.ecomd-sectionhead__title { margin: 0; }

.ecomd-sectionhead__lead {
	flex-basis: 100%;
	color: var(--ecomd-muted);
	margin: 0;
	max-width: 70ch;
}

.ecomd-sectionhead__link {
	font-weight: 600;
	font-size: .9375rem;
	white-space: nowrap;
	text-decoration: none;
	border-bottom: 2px solid var(--ecomd-primary);
	padding-bottom: 2px;
}

.ecomd-sectionhead__link:hover { border-bottom-color: var(--ecomd-black); }

/* ---------------------------------------------------------------------
   3. Buttons, pills and badges
   ------------------------------------------------------------------ */

.ecomd-btn {
	--btn-bg: var(--ecomd-black);
	--btn-fg: #fff;
	--btn-border: var(--btn-bg);

	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--ecomd-space-2);
	/* 44px minimum touch target throughout. */
	min-height: 44px;
	padding: var(--ecomd-space-3) var(--ecomd-space-6);
	background: var(--btn-bg);
	color: var(--btn-fg);
	border: 1px solid var(--btn-border);
	border-radius: var(--ecomd-radius-pill);
	font: inherit;
	font-weight: 600;
	font-size: .9375rem;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease, transform .15s ease, color .15s ease;
}

.ecomd-btn:hover { color: var(--btn-fg); transform: translateY(-2px); }
.ecomd-btn:active { transform: translateY(0); }

.ecomd-btn--primary {
	--btn-bg: var(--ecomd-primary);
	--btn-fg: var(--ecomd-on-primary);
}

.ecomd-btn--primary:hover { --btn-bg: var(--ecomd-primary-dark); }

.ecomd-btn--dark {
	--btn-bg: var(--ecomd-black);
	--btn-fg: #fff;
}

.ecomd-btn--dark:hover { --btn-bg: #2A2C26; }

/* Kept as an alias so existing templates that ask for an accent button
   still render correctly. */
.ecomd-btn--accent {
	--btn-bg: var(--ecomd-black);
	--btn-fg: #fff;
}

.ecomd-btn--accent:hover { --btn-bg: var(--ecomd-primary); --btn-fg: var(--ecomd-on-primary); }

.ecomd-btn--ghost {
	--btn-bg: transparent;
	--btn-fg: var(--ecomd-text);
	--btn-border: var(--ecomd-border);
}

.ecomd-btn--ghost:hover {
	--btn-bg: var(--ecomd-card);
	--btn-border: var(--ecomd-black);
}

.ecomd-btn--disabled,
.ecomd-btn[disabled] {
	--btn-bg: var(--ecomd-bg);
	--btn-fg: var(--ecomd-muted);
	--btn-border: var(--ecomd-border);
	cursor: not-allowed;
	pointer-events: none;
}

.ecomd-btn--sm { min-height: 38px; padding: var(--ecomd-space-2) var(--ecomd-space-4); font-size: .875rem; }
.ecomd-btn--lg { min-height: 52px; padding: var(--ecomd-space-4) var(--ecomd-space-8); font-size: 1rem; }
.ecomd-btn--block { width: 100%; }

.ecomd-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 12px;
	border-radius: var(--ecomd-radius-pill);
	background: var(--ecomd-bg);
	color: var(--ecomd-muted);
	border: 1px solid var(--ecomd-border);
	font-size: .8125rem;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
	white-space: nowrap;
}

a.ecomd-pill:hover { border-color: var(--ecomd-black); color: var(--ecomd-black); }

.ecomd-pill--verified {
	background: var(--ecomd-success-soft);
	color: var(--ecomd-success);
	border-color: transparent;
}

.ecomd-pill--exclusive,
.ecomd-pill--featured {
	background: var(--ecomd-primary-soft);
	color: var(--ecomd-on-primary);
	border-color: transparent;
}

.ecomd-pill--expiring {
	background: var(--ecomd-danger-soft);
	color: var(--ecomd-danger);
	border-color: transparent;
}

.ecomd-pill--expired {
	background: var(--ecomd-bg);
	color: var(--ecomd-muted);
}

.ecomd-pills {
	display: flex;
	flex-wrap: wrap;
	gap: var(--ecomd-space-2);
	margin: var(--ecomd-space-3) 0 0;
	padding: 0;
	list-style: none;
}

/* ---------------------------------------------------------------------
   4. Header and navigation
   ------------------------------------------------------------------ */

.ecomd-header {
	background: var(--ecomd-card);
	border-bottom: 1px solid var(--ecomd-border);
	position: relative;
	z-index: 60;
}

.ecomd-header--sticky {
	position: sticky;
	top: 0;
}

.ecomd-header__bar {
	display: flex;
	align-items: center;
	gap: var(--ecomd-space-5);
	min-height: 76px;
}

@media (min-width: 1024px) {
	.ecomd-header__bar { min-height: 84px; gap: var(--ecomd-space-8); }
}

.ecomd-brand {
	display: inline-flex;
	align-items: center;
	gap: var(--ecomd-space-3);
	text-decoration: none;
	flex-shrink: 0;
}

.ecomd-brand__mark {
	width: 38px;
	height: 38px;
	border-radius: 11px;
	background: var(--ecomd-primary);
	color: var(--ecomd-on-primary);
	display: grid;
	place-items: center;
	font-weight: 800;
	font-size: 1.1rem;
	flex-shrink: 0;
}

.ecomd-brand__name {
	font-family: var(--ecomd-font-display);
	font-weight: 800;
	font-size: 1.25rem;
	letter-spacing: -0.03em;
	color: var(--ecomd-black);
	line-height: 1.1;
}

.ecomd-brand__tagline {
	display: block;
	font-size: .75rem;
	font-weight: 500;
	color: var(--ecomd-muted);
	letter-spacing: 0;
}

.ecomd-nav { display: none; }

@media (min-width: 1024px) {
	.ecomd-nav { display: block; }

	.ecomd-nav ul {
		display: flex;
		align-items: center;
		gap: var(--ecomd-space-2);
		list-style: none;
		margin: 0;
		padding: 0;
	}

	.ecomd-nav a {
		display: inline-flex;
		align-items: center;
		min-height: 44px;
		padding: 0 var(--ecomd-space-4);
		border-radius: var(--ecomd-radius-pill);
		font-weight: 600;
		font-size: .9375rem;
		text-decoration: none;
		color: var(--ecomd-text);
	}

	.ecomd-nav a:hover { background: var(--ecomd-bg); }

	.ecomd-nav .current-menu-item > a,
	.ecomd-nav .current_page_item > a {
		background: var(--ecomd-primary-soft);
		color: var(--ecomd-black);
	}
}

.ecomd-header__actions {
	display: flex;
	align-items: center;
	gap: var(--ecomd-space-2);
	margin-left: auto;
	flex-shrink: 0;
}

.ecomd-header__search { display: none; flex: 1 1 auto; max-width: 380px; min-width: 0; }
@media (max-width: 1023px) {
	.ecomd-header__search.is-open { display: block; position: absolute; left: var(--ecomd-space-4); right: var(--ecomd-space-4); top: calc(100% + 8px); max-width: none; z-index: 130; }
}
@media (min-width: 1024px) { .ecomd-header__search { display: block; } }

.ecomd-iconbtn {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: var(--ecomd-radius-pill);
	border: 1px solid transparent;
	background: transparent;
	color: var(--ecomd-text);
	cursor: pointer;
	position: relative;
	text-decoration: none;
	transition: background-color .15s ease;
}

.ecomd-iconbtn:hover { background: var(--ecomd-bg); color: var(--ecomd-black); }

.ecomd-iconbtn__count {
	position: absolute;
	top: 2px;
	right: 2px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: var(--ecomd-radius-pill);
	background: var(--ecomd-primary);
	color: var(--ecomd-on-primary);
	font-size: .6875rem;
	font-weight: 700;
	display: grid;
	place-items: center;
}

@media (min-width: 1024px) {
	.ecomd-header__toggle { display: none; }
}

.ecomd-header__mobilesearch {
	display: none;
	padding-bottom: var(--ecomd-space-4);
}

.ecomd-header__mobilesearch.is-open { display: block; }

@media (min-width: 1024px) {
	.ecomd-header__mobilesearch { display: none !important; }
}

/* Off-canvas drawer */

.ecomd-drawer {
	position: fixed;
	inset: 0;
	z-index: 120;
	visibility: hidden;
	opacity: 0;
	transition: opacity .2s ease, visibility .2s ease;
}

.ecomd-drawer.is-open { visibility: visible; opacity: 1; }

.ecomd-drawer__scrim {
	position: absolute;
	inset: 0;
	background: rgba(17, 18, 15, .45);
	border: 0;
	width: 100%;
	cursor: pointer;
}

.ecomd-drawer__panel {
	position: absolute;
	inset-block: 0;
	right: 0;
	width: min(88vw, 380px);
	background: var(--ecomd-card);
	padding: var(--ecomd-space-5);
	overflow-y: auto;
	overscroll-behavior: contain;
	transform: translateX(100%);
	transition: transform .25s ease;
	display: flex;
	flex-direction: column;
	gap: var(--ecomd-space-5);
}

.ecomd-drawer.is-open .ecomd-drawer__panel { transform: translateX(0); }

.ecomd-drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--ecomd-space-4);
}

.ecomd-drawer nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--ecomd-space-1);
}

.ecomd-drawer nav a {
	display: flex;
	align-items: center;
	min-height: 48px;
	padding: 0 var(--ecomd-space-4);
	border-radius: var(--ecomd-radius);
	font-weight: 600;
	text-decoration: none;
}

.ecomd-drawer nav a:hover { background: var(--ecomd-bg); }

body.ecomd-locked { overflow: hidden; }

/* ---------------------------------------------------------------------
   5. Search and suggestions
   ------------------------------------------------------------------ */

.ecomd-search { position: relative; }

.ecomd-search__field {
	display: flex;
	align-items: center;
	gap: var(--ecomd-space-2);
	background: var(--ecomd-bg);
	border: 1px solid var(--ecomd-border);
	border-radius: var(--ecomd-radius-pill);
	padding: 0 var(--ecomd-space-2) 0 var(--ecomd-space-5);
	transition: border-color .15s ease, background-color .15s ease;
}

.ecomd-search__field:focus-within {
	border-color: var(--ecomd-black);
	background: var(--ecomd-card);
}

.ecomd-search input[type="search"],
.ecomd-search input[type="text"] {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 48px;
	border: 0;
	background: none;
	font: inherit;
	font-size: .9375rem;
	color: inherit;
	outline: none;
	padding: 0;
}

.ecomd-search button[type="submit"] {
	flex-shrink: 0;
	min-height: 38px;
	padding: 0 var(--ecomd-space-5);
	border: 0;
	border-radius: var(--ecomd-radius-pill);
	background: var(--ecomd-primary);
	color: var(--ecomd-on-primary);
	font: inherit;
	font-weight: 600;
	font-size: .875rem;
	cursor: pointer;
}

.ecomd-search button[type="submit"]:hover { background: var(--ecomd-primary-dark); }

.ecomd-suggest {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	z-index: 90;
	background: var(--ecomd-card);
	border: 1px solid var(--ecomd-border);
	border-radius: var(--ecomd-radius-lg);
	box-shadow: var(--ecomd-shadow-lg);
	padding: var(--ecomd-space-2);
	max-height: min(60vh, 440px);
	overflow-y: auto;
	display: none;
}

.ecomd-suggest.is-open { display: block; }

.ecomd-suggest__group + .ecomd-suggest__group { border-top: 1px solid var(--ecomd-border); margin-top: var(--ecomd-space-2); padding-top: var(--ecomd-space-2); }

.ecomd-suggest__title {
	font-size: .6875rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--ecomd-muted);
	padding: var(--ecomd-space-2) var(--ecomd-space-3);
	margin: 0;
}

.ecomd-suggest__item {
	display: flex;
	align-items: center;
	gap: var(--ecomd-space-3);
	padding: var(--ecomd-space-3);
	border-radius: var(--ecomd-radius);
	text-decoration: none;
	color: inherit;
}

.ecomd-suggest__item:hover,
.ecomd-suggest__item.is-active { background: var(--ecomd-bg); }

.ecomd-suggest__item img {
	width: 34px;
	height: 34px;
	object-fit: contain;
	border-radius: var(--ecomd-radius-sm);
	flex-shrink: 0;
}

.ecomd-suggest__label { font-weight: 600; font-size: .9375rem; }
.ecomd-suggest__meta { display: block; font-size: .8125rem; color: var(--ecomd-muted); font-weight: 500; }

/* ---------------------------------------------------------------------
   6. Coupon card

   One component, three layouts. The horizontal layout is
   [ value block | body | CTA ] on wide screens and stacks to
   [ value block ] / [ body ] / [ CTA ] under 640px, which is what the
   brief asks for at 480. The stub keeps the ticket idea but is now a
   flat lime block rather than a perforated edge, to match the premium
   minimal reference rather than a novelty ticket.
   ------------------------------------------------------------------ */

.ecomd-coupons {
	display: grid;
	gap: var(--ecomd-space-4);
}

.ecomd-coupons--grid {
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	gap: var(--ecomd-space-5);
}

.ecomd-coupon {
	position: relative;
	background: var(--ecomd-card);
	border: 1px solid var(--ecomd-border);
	border-radius: var(--ecomd-radius-lg);
	box-shadow: var(--ecomd-shadow-sm);
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
	display: grid;
	overflow: hidden;
}

.ecomd-coupon:hover {
	transform: translateY(-3px);
	box-shadow: var(--ecomd-shadow-lg);
	border-color: transparent;
}

.ecomd-coupon.is-expired { opacity: .78; }
.ecomd-coupon.is-expired:hover { transform: none; box-shadow: var(--ecomd-shadow-sm); }

/* The value block. Lime by default; neutral once expired. */
.ecomd-coupon__stub {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	padding: var(--ecomd-space-5) var(--ecomd-space-4);
	background: var(--ecomd-primary);
	color: var(--ecomd-on-primary);
	text-align: center;
}

.is-expired .ecomd-coupon__stub {
	background: var(--ecomd-bg);
	color: var(--ecomd-muted);
}

.ecomd-coupon__value {
	font-family: var(--ecomd-font-display);
	font-weight: 800;
	font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2rem);
	line-height: 1;
	letter-spacing: -0.04em;
}

.ecomd-coupon__valuelabel {
	font-size: .6875rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	opacity: .72;
}

.ecomd-coupon__body {
	padding: var(--ecomd-space-5);
	display: flex;
	flex-direction: column;
	gap: var(--ecomd-space-2);
	min-width: 0;
}

.ecomd-coupon__store {
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var(--ecomd-muted);
}

.ecomd-coupon__title {
	font-family: var(--ecomd-font-display);
	font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem);
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.015em;
	margin: 0;
	color: var(--ecomd-black);
}

.ecomd-coupon__title a { text-decoration: none; color: inherit; }
.ecomd-coupon__title a:hover { color: var(--ecomd-primary-dark); }

.ecomd-coupon__excerpt {
	color: var(--ecomd-muted);
	font-size: .9375rem;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ecomd-coupon__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--ecomd-space-2) var(--ecomd-space-3);
	font-size: .8125rem;
	font-weight: 500;
	color: var(--ecomd-muted);
	margin-top: auto;
	padding-top: var(--ecomd-space-1);
}

.ecomd-coupon__badges {
	display: flex;
	flex-wrap: wrap;
	gap: var(--ecomd-space-2);
}

.ecomd-coupon__actions {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: center;
	gap: var(--ecomd-space-2);
	padding: var(--ecomd-space-5);
}

.ecomd-coupon__logo {
	width: 56px;
	height: 56px;
	object-fit: contain;
	border-radius: var(--ecomd-radius-sm);
	flex-shrink: 0;
}

/* The reveal button: dark pill with the masked code peeking out of a
   dashed right edge, so it still reads as a coupon code. */
.ecomd-reveal {
	position: relative;
	display: inline-flex;
	align-items: stretch;
	min-height: 48px;
	border: 0;
	border-radius: var(--ecomd-radius-pill);
	background: var(--ecomd-black);
	color: #fff;
	font: inherit;
	font-weight: 700;
	font-size: .9375rem;
	cursor: pointer;
	overflow: hidden;
	transition: background-color .15s ease, transform .15s ease;
	width: 100%;
}

.ecomd-reveal:hover {
	background: var(--ecomd-primary);
	color: var(--ecomd-on-primary);
	transform: translateY(-2px);
}

.ecomd-reveal__label {
	display: grid;
	place-items: center;
	padding: 0 var(--ecomd-space-5);
	flex: 1 1 auto;
	white-space: nowrap;
}

.ecomd-reveal__code {
	display: grid;
	place-items: center;
	padding: 0 var(--ecomd-space-4);
	background: rgba(255, 255, 255, .14);
	border-left: 2px dashed rgba(255, 255, 255, .45);
	font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
	font-size: .8125rem;
	letter-spacing: .06em;
	flex-shrink: 0;
}

.ecomd-reveal:hover .ecomd-reveal__code {
	background: rgba(17, 18, 15, .1);
	border-left-color: rgba(17, 18, 15, .3);
}

.ecomd-fav {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: var(--ecomd-radius-pill);
	border: 1px solid var(--ecomd-border);
	background: var(--ecomd-card);
	color: var(--ecomd-muted);
	cursor: pointer;
	transition: color .15s ease, border-color .15s ease, background-color .15s ease;
	flex-shrink: 0;
}

.ecomd-fav:hover { color: var(--ecomd-black); border-color: var(--ecomd-black); }
.ecomd-fav.is-active { color: var(--ecomd-danger); border-color: var(--ecomd-danger); background: var(--ecomd-danger-soft); }

/* --- List / horizontal layout ------------------------------------- */

.ecomd-coupon--list,
.ecomd-coupon--horizontal {
	grid-template-columns: 132px minmax(0, 1fr) minmax(160px, auto);
	align-items: stretch;
}

.ecomd-coupon--list .ecomd-coupon__actions,
.ecomd-coupon--horizontal .ecomd-coupon__actions {
	min-width: 180px;
}

/* --- Grid layout --------------------------------------------------- */

.ecomd-coupon--grid,
.ecomd-coupon--featured {
	grid-template-rows: auto 1fr auto;
}

.ecomd-coupon--grid .ecomd-coupon__stub,
.ecomd-coupon--featured .ecomd-coupon__stub {
	flex-direction: row;
	align-items: baseline;
	justify-content: flex-start;
	gap: var(--ecomd-space-2);
	padding: var(--ecomd-space-4) var(--ecomd-space-5);
	text-align: left;
}

.ecomd-coupon--grid .ecomd-coupon__actions,
.ecomd-coupon--featured .ecomd-coupon__actions {
	padding-top: 0;
}

.ecomd-coupon--featured {
	border-color: var(--ecomd-black);
	box-shadow: var(--ecomd-shadow);
}

/* --- Compact ------------------------------------------------------- */

.ecomd-coupon--compact { grid-template-columns: 92px minmax(0, 1fr); }
.ecomd-coupon--compact .ecomd-coupon__body { padding: var(--ecomd-space-4); }
.ecomd-coupon--compact .ecomd-coupon__excerpt { display: none; }
.ecomd-coupon--compact .ecomd-coupon__actions { grid-column: 1 / -1; padding-top: 0; }
.ecomd-coupon--compact .ecomd-coupon__value { font-size: 1.25rem; }

/* --- Stacking. Everything becomes one column below 640. ------------ */

@media (max-width: 860px) {
	.ecomd-coupon--list,
	.ecomd-coupon--horizontal {
		grid-template-columns: 116px minmax(0, 1fr);
	}

	.ecomd-coupon--list .ecomd-coupon__actions,
	.ecomd-coupon--horizontal .ecomd-coupon__actions {
		grid-column: 1 / -1;
		flex-direction: row;
		align-items: center;
		padding-top: 0;
		min-width: 0;
	}

	.ecomd-coupon--list .ecomd-reveal,
	.ecomd-coupon--horizontal .ecomd-reveal { flex: 1 1 auto; }
}

@media (max-width: 640px) {
	.ecomd-reveal { min-width: 0; }
	.ecomd-reveal__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; padding-inline: var(--ecomd-space-4); }
	.ecomd-reveal__code { max-width: 42%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-inline: var(--ecomd-space-3); }
	.ecomd-coupon,
	.ecomd-coupon--list,
	.ecomd-coupon--horizontal,
	.ecomd-coupon--compact,
	.ecomd-coupon--mobile {
		grid-template-columns: 1fr;
	}

	.ecomd-coupon__stub {
		flex-direction: row;
		align-items: baseline;
		justify-content: flex-start;
		gap: var(--ecomd-space-2);
		padding: var(--ecomd-space-3) var(--ecomd-space-5);
		text-align: left;
	}

	.ecomd-coupon__body { padding: var(--ecomd-space-4) var(--ecomd-space-5); }
	.ecomd-coupon__actions { padding: 0 var(--ecomd-space-5) var(--ecomd-space-5); }
	.ecomd-coupon--compact .ecomd-coupon__excerpt { display: -webkit-box; }
	.ecomd-coupon__excerpt { font-size: .9375rem; }
}

/* ---------------------------------------------------------------------
   7. Reveal modal, voting, toasts
   ------------------------------------------------------------------ */

.ecomd-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: grid;
	place-items: center;
	padding: max(16px, 3vw);
	visibility: hidden;
	opacity: 0;
	transition: opacity .18s ease, visibility .18s ease;
	overscroll-behavior: contain;
}

.ecomd-modal.is-open { visibility: visible; opacity: 1; }

.ecomd-modal__scrim {
	position: absolute;
	inset: 0;
	background: rgba(8, 10, 9, .72);
	border: 0;
	width: 100%;
	cursor: pointer;
	backdrop-filter: blur(5px);
}

/* Keep the reveal dialog above every theme/header stacking context. */
body.ecomd-modal-open { overflow: hidden; }

.ecomd-modal__panel {
	position: relative;
	width: min(100%, 520px);
	max-height: calc(100dvh - 32px);
	overflow-y: auto;
	background: var(--ecomd-card);
	border: 1px solid rgba(255,255,255,.12);
	border-radius: 20px;
	box-shadow: 0 24px 70px rgba(0,0,0,.35);
	padding: 36px 28px 28px;
	text-align: center;
	transform: translateY(8px) scale(.97);
	transition: transform .18s ease;
}

.ecomd-modal.is-open .ecomd-modal__panel { transform: translateY(0) scale(1); }

.ecomd-modal__close {
	position: absolute;
	top: var(--ecomd-space-3);
	right: var(--ecomd-space-3);
	width: 40px;
	height: 40px;
	border-radius: var(--ecomd-radius-pill);
	border: 0;
	background: var(--ecomd-bg);
	color: var(--ecomd-text);
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
}

.ecomd-modal__close:hover { background: var(--ecomd-border); }

.ecomd-modal__logo {
	width: 72px;
	height: 72px;
	object-fit: contain;
	margin: 0 auto var(--ecomd-space-4);
	border-radius: var(--ecomd-radius);
}

.ecomd-modal__title {
	font-size: 1.25rem;
	font-weight: 700;
	margin: 0 0 var(--ecomd-space-2);
	line-height: 1.3;
}

.ecomd-modal__lead {
	color: var(--ecomd-muted);
	font-size: .9375rem;
	margin: 0 0 var(--ecomd-space-5);
}

.ecomd-code {
	display: flex;
	align-items: stretch;
	gap: 0;
	border: 2px dashed var(--ecomd-border);
	border-radius: var(--ecomd-radius);
	background: var(--ecomd-primary-soft);
	overflow: hidden;
	margin-bottom: var(--ecomd-space-4);
}

.ecomd-code__value {
	flex: 1 1 auto;
	min-width: 0;
	display: grid;
	place-items: center;
	padding: var(--ecomd-space-4) var(--ecomd-space-3);
	font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
	font-size: clamp(1.125rem, 1rem + .8vw, 1.5rem);
	font-weight: 700;
	letter-spacing: .1em;
	color: var(--ecomd-black);
	word-break: break-all;
	/* Selectable, because some people prefer to copy by hand. */
	user-select: all;
}

.ecomd-code__copy {
	flex-shrink: 0;
	min-width: 92px;
	border: 0;
	border-left: 2px dashed var(--ecomd-border);
	background: var(--ecomd-black);
	color: #fff;
	font: inherit;
	font-weight: 700;
	font-size: .875rem;
	cursor: pointer;
	padding: 0 var(--ecomd-space-4);
	transition: background-color .15s ease;
}

.ecomd-code__copy:hover { background: var(--ecomd-primary); color: var(--ecomd-on-primary); }
.ecomd-code__copy.is-copied { background: var(--ecomd-success); color: #fff; }

.ecomd-modal__meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--ecomd-space-2);
	margin-top: var(--ecomd-space-5);
	font-size: .8125rem;
	color: var(--ecomd-muted);
}

.ecomd-vote {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: var(--ecomd-space-3);
	margin-top: var(--ecomd-space-5);
	padding-top: var(--ecomd-space-5);
	border-top: 1px solid var(--ecomd-border);
}

.ecomd-vote__label {
	font-size: .875rem;
	font-weight: 600;
	color: var(--ecomd-muted);
	flex-basis: 100%;
	text-align: center;
}

.ecomd-vote__btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 40px;
	padding: 0 var(--ecomd-space-4);
	border-radius: var(--ecomd-radius-pill);
	border: 1px solid var(--ecomd-border);
	background: var(--ecomd-card);
	font: inherit;
	font-weight: 600;
	font-size: .875rem;
	cursor: pointer;
}

.ecomd-vote__btn:hover { border-color: var(--ecomd-black); }
.ecomd-vote__btn.is-active { background: var(--ecomd-primary-soft); border-color: var(--ecomd-primary); }
.ecomd-vote__rate { font-weight: 700; color: var(--ecomd-success); }

/* Toasts */

.ecomd-toasts {
	position: fixed;
	left: 50%;
	bottom: var(--ecomd-space-6);
	transform: translateX(-50%);
	z-index: 200;
	display: grid;
	gap: var(--ecomd-space-2);
	width: min(92vw, 360px);
	pointer-events: none;
}

.ecomd-toast {
	background: var(--ecomd-black);
	color: #fff;
	padding: var(--ecomd-space-3) var(--ecomd-space-5);
	border-radius: var(--ecomd-radius-pill);
	font-size: .875rem;
	font-weight: 600;
	text-align: center;
	box-shadow: var(--ecomd-shadow-lg);
	animation: ecomd-toast-in .22s ease;
}

@keyframes ecomd-toast-in {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: translateY(0); }
}

/* ---------------------------------------------------------------------
   8. Store cards, directory and store page
   ------------------------------------------------------------------ */

.ecomd-store {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--ecomd-space-2);
	padding: var(--ecomd-space-5) var(--ecomd-space-4);
	background: var(--ecomd-card);
	border: 1px solid var(--ecomd-border);
	border-radius: var(--ecomd-radius-lg);
	text-decoration: none;
	text-align: center;
	color: inherit;
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.ecomd-store:hover {
	transform: translateY(-3px);
	box-shadow: var(--ecomd-shadow-lg);
	border-color: transparent;
	color: inherit;
}

.ecomd-store__logo {
	display: grid;
	place-items: center;
	width: 100%;
	height: 64px;
}

.ecomd-store__logo img { max-height: 64px; width: auto; object-fit: contain; }

.ecomd-store__placeholder {
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	border-radius: var(--ecomd-radius);
	background: var(--ecomd-primary-soft);
	color: var(--ecomd-black);
	font-family: var(--ecomd-font-display);
	font-weight: 800;
	font-size: 1.5rem;
}

.ecomd-store__name {
	font-weight: 700;
	font-size: .9375rem;
	line-height: 1.3;
	color: var(--ecomd-black);
}

.ecomd-store__count {
	font-size: .8125rem;
	font-weight: 500;
	color: var(--ecomd-muted);
}

/* A-Z directory */

.ecomd-alphabet {
	display: flex;
	flex-wrap: wrap;
	gap: var(--ecomd-space-2);
	list-style: none;
	margin: 0 0 var(--ecomd-space-8);
	padding: 0;
}

.ecomd-alphabet a,
.ecomd-alphabet span {
	display: grid;
	place-items: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 var(--ecomd-space-2);
	border-radius: var(--ecomd-radius);
	border: 1px solid var(--ecomd-border);
	background: var(--ecomd-card);
	font-weight: 700;
	font-size: .9375rem;
	text-decoration: none;
	color: var(--ecomd-text);
}

.ecomd-alphabet a:hover,
.ecomd-alphabet a.is-current {
	background: var(--ecomd-primary);
	border-color: var(--ecomd-primary);
	color: var(--ecomd-on-primary);
}

.ecomd-alphabet span[aria-disabled] { color: var(--ecomd-border); background: transparent; }

.ecomd-letterblock { margin-bottom: var(--ecomd-space-10); scroll-margin-top: 110px; }

.ecomd-letterblock__title {
	font-size: 1.5rem;
	margin: 0 0 var(--ecomd-space-4);
	padding-bottom: var(--ecomd-space-3);
	border-bottom: 2px solid var(--ecomd-primary);
	display: inline-block;
	min-width: 48px;
}

.ecomd-letterblock ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--ecomd-space-2) var(--ecomd-space-5);
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
}

.ecomd-letterblock li a { text-decoration: none; font-weight: 500; }
.ecomd-letterblock li a:hover { color: var(--ecomd-primary-dark); }
.ecomd-letterblock em { color: var(--ecomd-muted); font-style: normal; font-size: .8125rem; }

/* --- Store hero ---------------------------------------------------- */

.ecomd-storehero {
	background: var(--ecomd-card);
	border: 1px solid var(--ecomd-border);
	border-radius: var(--ecomd-radius-xl);
	padding: clamp(1.25rem, .9rem + 1.6vw, 2.5rem);
	margin-bottom: var(--ecomd-space-8);
	box-shadow: var(--ecomd-shadow-sm);
}

.ecomd-storehero__banner {
	width: 100%;
	max-height: 200px;
	object-fit: cover;
	border-radius: var(--ecomd-radius);
	margin-bottom: var(--ecomd-space-6);
}

.ecomd-storehero__inner {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	gap: var(--ecomd-space-6);
	align-items: center;
}

.ecomd-storehero__logo {
	width: clamp(80px, 8vw, 128px);
	height: clamp(80px, 8vw, 128px);
	object-fit: contain;
	border: 1px solid var(--ecomd-border);
	border-radius: var(--ecomd-radius-lg);
	padding: var(--ecomd-space-3);
	background: #fff;
}

.ecomd-storehero__title {
	font-size: clamp(1.75rem, 1.2rem + 2.2vw, 3rem);
	margin: 0 0 var(--ecomd-space-3);
}

.ecomd-storehero__badges {
	display: flex;
	flex-wrap: wrap;
	gap: var(--ecomd-space-2);
	margin-bottom: var(--ecomd-space-3);
}

.ecomd-storehero .ecomd-pagehead__text { margin-bottom: 0; }

.ecomd-storehero__stats {
	display: flex;
	flex-wrap: wrap;
	gap: var(--ecomd-space-6);
	margin-top: var(--ecomd-space-5);
	padding-top: var(--ecomd-space-5);
	border-top: 1px solid var(--ecomd-border);
}

.ecomd-stat__num {
	display: block;
	font-family: var(--ecomd-font-display);
	font-size: 1.5rem;
	font-weight: 800;
	line-height: 1.1;
	color: var(--ecomd-black);
}

.ecomd-stat__label {
	font-size: .8125rem;
	font-weight: 500;
	color: var(--ecomd-muted);
}

.ecomd-storehero__actions {
	display: flex;
	flex-direction: column;
	gap: var(--ecomd-space-2);
	min-width: 200px;
}

@media (max-width: 900px) {
	.ecomd-storehero__inner {
		grid-template-columns: auto minmax(0, 1fr);
	}

	.ecomd-storehero__actions {
		grid-column: 1 / -1;
		flex-direction: row;
		min-width: 0;
	}

	.ecomd-storehero__actions .ecomd-btn { flex: 1 1 auto; }
}

@media (max-width: 560px) {
	.ecomd-storehero__inner {
		grid-template-columns: 1fr;
		text-align: center;
		justify-items: center;
	}

	.ecomd-storehero__badges,
	.ecomd-storehero__stats { justify-content: center; }
	.ecomd-storehero .ecomd-pagehead__text { text-align: center; }
	.ecomd-storehero__stats { gap: var(--ecomd-space-5); width: 100%; justify-content: space-around; }
}

/* ---------------------------------------------------------------------
   9. Product cards
   ------------------------------------------------------------------ */

.ecomd-product {
	display: flex;
	flex-direction: column;
	background: var(--ecomd-card);
	border: 1px solid var(--ecomd-border);
	border-radius: var(--ecomd-radius-lg);
	overflow: hidden;
	transition: transform .18s ease, box-shadow .18s ease;
}

.ecomd-product:hover { transform: translateY(-3px); box-shadow: var(--ecomd-shadow-lg); }

.ecomd-product__media {
	aspect-ratio: 4 / 3;
	background: var(--ecomd-bg);
	display: grid;
	place-items: center;
	overflow: hidden;
}

.ecomd-product__media img { width: 100%; height: 100%; object-fit: cover; }

.ecomd-product__body {
	padding: var(--ecomd-space-4);
	display: flex;
	flex-direction: column;
	gap: var(--ecomd-space-2);
	flex: 1 1 auto;
}

.ecomd-product__title { font-size: 1rem; font-weight: 600; margin: 0; line-height: 1.35; }
.ecomd-product__title a { text-decoration: none; color: inherit; }

.ecomd-product__prices { display: flex; align-items: baseline; gap: var(--ecomd-space-2); margin-top: auto; }
.ecomd-product__price { font-family: var(--ecomd-font-display); font-size: 1.25rem; font-weight: 800; color: var(--ecomd-black); }
.ecomd-product__old { text-decoration: line-through; color: var(--ecomd-muted); font-size: .875rem; }

.ecomd-product__save {
	background: var(--ecomd-primary);
	color: var(--ecomd-on-primary);
	border-radius: var(--ecomd-radius-pill);
	padding: 3px 10px;
	font-size: .75rem;
	font-weight: 700;
}

/* ---------------------------------------------------------------------
   10. Hero, filters, category row
   ------------------------------------------------------------------ */

.ecomd-hero {
	padding: clamp(2.5rem, 1.5rem + 4vw, 6rem) 0 clamp(2rem, 1.5rem + 2vw, 4rem);
}

.ecomd-hero__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: var(--ecomd-space-2);
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--ecomd-muted);
	margin-bottom: var(--ecomd-space-5);
}

.ecomd-hero__eyebrow::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--ecomd-primary);
}

.ecomd-hero__title {
	font-size: clamp(2.125rem, 1.2rem + 4.2vw, 4rem);
	max-width: 20ch;
	margin-bottom: var(--ecomd-space-5);
}

/* The lime highlight behind a phrase, as in the reference. box-decoration-break
   keeps the highlight intact when the phrase wraps onto a second line. */
.ecomd-hl {
	background: var(--ecomd-primary);
	color: var(--ecomd-on-primary);
	padding: 0 .18em;
	border-radius: 4px;
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
}

.ecomd-hero__text {
	font-size: clamp(1rem, .95rem + .35vw, 1.1875rem);
	color: var(--ecomd-muted);
	max-width: 56ch;
	margin-bottom: var(--ecomd-space-8);
}

.ecomd-hero__search { max-width: 640px; margin-bottom: var(--ecomd-space-6); }

.ecomd-hero__stats {
	display: flex;
	flex-wrap: wrap;
	gap: var(--ecomd-space-8);
	margin-top: var(--ecomd-space-8);
}

/* Feature cards: 01 / 02 / 03 / 04 with alternating treatments. */

.ecomd-features {
	display: grid;
	gap: var(--ecomd-space-5);
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.ecomd-feature {
	display: flex;
	flex-direction: column;
	gap: var(--ecomd-space-4);
	padding: clamp(1.5rem, 1.2rem + 1vw, 2.25rem);
	border-radius: var(--ecomd-radius-xl);
	border: 1px solid var(--ecomd-border);
	background: var(--ecomd-card);
	min-height: 260px;
	transition: transform .18s ease;
}

.ecomd-feature:hover { transform: translateY(-4px); }

.ecomd-feature__num {
	font-family: var(--ecomd-font-display);
	font-size: 2.5rem;
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.04em;
	opacity: .28;
}

.ecomd-feature__title { font-size: 1.375rem; margin: 0; }

.ecomd-feature__text {
	color: var(--ecomd-muted);
	font-size: .9375rem;
	margin: 0;
	margin-top: auto;
}

.ecomd-feature--dark {
	background: var(--ecomd-black);
	border-color: var(--ecomd-black);
	color: #fff;
}

.ecomd-feature--dark .ecomd-feature__title { color: #fff; }
.ecomd-feature--dark .ecomd-feature__text { color: rgba(255, 255, 255, .72); }
.ecomd-feature--dark .ecomd-feature__num { opacity: .4; }

.ecomd-feature--lime {
	background: var(--ecomd-primary);
	border-color: var(--ecomd-primary);
	color: var(--ecomd-on-primary);
}

.ecomd-feature--lime .ecomd-feature__title { color: var(--ecomd-on-primary); }
.ecomd-feature--lime .ecomd-feature__text { color: rgba(17, 18, 15, .7); }
.ecomd-feature--lime .ecomd-feature__num { opacity: .35; }

.ecomd-feature--soft { background: var(--ecomd-bg); }

/* Filter bar and chips */

.ecomd-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--ecomd-space-3);
	margin-bottom: var(--ecomd-space-6);
}

.ecomd-chips {
	display: flex;
	gap: var(--ecomd-space-2);
	flex: 1 1 auto;
	min-width: 0;
	/* Horizontal scroll here is intentional: it is the chip rail. */
	overflow-x: auto;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	padding-bottom: 2px;
}

.ecomd-chips::-webkit-scrollbar { display: none; }

.ecomd-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 42px;
	padding: 0 var(--ecomd-space-4);
	border-radius: var(--ecomd-radius-pill);
	border: 1px solid var(--ecomd-border);
	background: var(--ecomd-card);
	color: var(--ecomd-text);
	font-weight: 600;
	font-size: .875rem;
	text-decoration: none;
	white-space: nowrap;
	flex-shrink: 0;
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease;
}

.ecomd-chip:hover { border-color: var(--ecomd-black); color: var(--ecomd-text); }

.ecomd-chip.is-active,
.ecomd-chip[aria-pressed="true"] {
	background: var(--ecomd-primary);
	border-color: var(--ecomd-primary);
	color: var(--ecomd-on-primary);
}

.ecomd-chip__count { font-weight: 500; opacity: .7; font-size: .8125rem; }

.ecomd-filters__sort {
	display: flex;
	align-items: center;
	gap: var(--ecomd-space-2);
	flex-shrink: 0;
}

.ecomd-filters__sort label { font-size: .8125rem; font-weight: 600; color: var(--ecomd-muted); }

.ecomd-filters select {
	min-height: 42px;
	padding: 0 var(--ecomd-space-8) 0 var(--ecomd-space-4);
	border: 1px solid var(--ecomd-border);
	border-radius: var(--ecomd-radius-pill);
	background: var(--ecomd-card);
	font: inherit;
	font-weight: 600;
	font-size: .875rem;
	color: inherit;
	cursor: pointer;
	appearance: none;
	background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
	background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
	background-size: 6px 6px, 6px 6px;
	background-repeat: no-repeat;
}

.ecomd-filters__count {
	font-size: .875rem;
	color: var(--ecomd-muted);
	font-weight: 500;
	flex-basis: 100%;
}

/* Category row */

.ecomd-catrow {
	display: flex;
	gap: var(--ecomd-space-3);
	overflow-x: auto;
	scrollbar-width: none;
	padding-bottom: var(--ecomd-space-2);
}

.ecomd-catrow::-webkit-scrollbar { display: none; }
.ecomd-catrow--wrap { flex-wrap: wrap; overflow: visible; }

.ecomd-cat {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: var(--ecomd-space-4) var(--ecomd-space-5);
	min-width: 160px;
	border-radius: var(--ecomd-radius-lg);
	border: 1px solid var(--ecomd-border);
	background: var(--ecomd-card);
	text-decoration: none;
	color: inherit;
	flex-shrink: 0;
	transition: transform .18s ease, border-color .18s ease;
}

.ecomd-cat:hover { transform: translateY(-3px); border-color: var(--ecomd-black); color: inherit; }
.ecomd-cat__name { font-weight: 700; font-size: .9375rem; color: var(--ecomd-black); }
.ecomd-cat__count { font-size: .8125rem; color: var(--ecomd-muted); font-weight: 500; }

/* ---------------------------------------------------------------------
   11. Single coupon, panels, FAQ, prose
   ------------------------------------------------------------------ */

.ecomd-breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--ecomd-space-2);
	list-style: none;
	margin: 0;
	padding: var(--ecomd-space-6) 0 0;
	font-size: .8125rem;
	color: var(--ecomd-muted);
	font-weight: 500;
}

.ecomd-breadcrumbs li { display: flex; align-items: center; gap: var(--ecomd-space-2); }
.ecomd-breadcrumbs li + li::before { content: "/"; color: var(--ecomd-border); }
.ecomd-breadcrumbs a { color: var(--ecomd-muted); text-decoration: none; }
.ecomd-breadcrumbs a:hover { color: var(--ecomd-black); text-decoration: underline; }
.ecomd-breadcrumbs [aria-current] { color: var(--ecomd-text); }

.ecomd-panel {
	background: var(--ecomd-card);
	border: 1px solid var(--ecomd-border);
	border-radius: var(--ecomd-radius-lg);
	padding: clamp(1.25rem, 1rem + 1vw, 2rem);
	margin-bottom: var(--ecomd-space-5);
}

.ecomd-panel__title {
	font-size: 1.25rem;
	margin: 0 0 var(--ecomd-space-4);
	padding-bottom: var(--ecomd-space-3);
	border-bottom: 1px solid var(--ecomd-border);
}

/* Readable measure. The brief asks for 70-80 characters. */
.ecomd-prose { max-width: 74ch; }
.ecomd-prose > * { max-width: 100%; }

.ecomd-prose h2 { font-size: 1.5rem; margin-top: var(--ecomd-space-8); }
.ecomd-prose h3 { font-size: 1.1875rem; margin-top: var(--ecomd-space-6); }
.ecomd-prose p { margin-bottom: var(--ecomd-space-4); }
.ecomd-prose li { margin-bottom: var(--ecomd-space-2); }
.ecomd-prose a { color: var(--ecomd-primary-dark); font-weight: 500; }

.ecomd-prose img { border-radius: var(--ecomd-radius); margin: var(--ecomd-space-5) 0; }

.ecomd-prose blockquote {
	margin: var(--ecomd-space-6) 0;
	padding: var(--ecomd-space-4) var(--ecomd-space-6);
	border-left: 3px solid var(--ecomd-primary);
	background: var(--ecomd-bg);
	border-radius: 0 var(--ecomd-radius) var(--ecomd-radius) 0;
	color: var(--ecomd-muted);
}

/* Tables inside SEO content need to survive small screens. */
.ecomd-prose table {
	width: 100%;
	border-collapse: collapse;
	margin: var(--ecomd-space-5) 0;
	font-size: .9375rem;
	display: block;
	overflow-x: auto;
}

.ecomd-prose th,
.ecomd-prose td {
	border: 1px solid var(--ecomd-border);
	padding: var(--ecomd-space-3) var(--ecomd-space-4);
	text-align: left;
}

.ecomd-prose th { background: var(--ecomd-bg); font-weight: 600; }

.ecomd-note {
	background: var(--ecomd-primary-soft);
	border: 1px solid var(--ecomd-primary);
	border-radius: var(--ecomd-radius);
	padding: var(--ecomd-space-4) var(--ecomd-space-5);
	margin: var(--ecomd-space-5) 0;
}

.ecomd-note p:last-child { margin-bottom: 0; }

/* FAQ accordion, native details/summary so it works without JS. */

.ecomd-faq details {
	border: 1px solid var(--ecomd-border);
	border-radius: var(--ecomd-radius);
	margin-bottom: var(--ecomd-space-3);
	background: var(--ecomd-card);
	overflow: hidden;
}

.ecomd-faq summary {
	cursor: pointer;
	padding: var(--ecomd-space-4) var(--ecomd-space-10) var(--ecomd-space-4) var(--ecomd-space-5);
	font-weight: 600;
	font-size: 1rem;
	list-style: none;
	position: relative;
	min-height: 56px;
	display: flex;
	align-items: center;
}

.ecomd-faq summary::-webkit-details-marker { display: none; }

.ecomd-faq summary::after {
	content: "";
	position: absolute;
	right: var(--ecomd-space-5);
	top: 50%;
	width: 9px;
	height: 9px;
	border-right: 2px solid var(--ecomd-muted);
	border-bottom: 2px solid var(--ecomd-muted);
	transform: translateY(-70%) rotate(45deg);
	transition: transform .18s ease;
}

.ecomd-faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.ecomd-faq summary:hover { background: var(--ecomd-bg); }

.ecomd-faq details > *:not(summary) {
	padding: 0 var(--ecomd-space-5) var(--ecomd-space-5);
	color: var(--ecomd-muted);
	margin: 0;
	max-width: 74ch;
}

.ecomd-embed { border-radius: var(--ecomd-radius); overflow: hidden; }
.ecomd-embed iframe { width: 100%; min-height: 320px; border: 0; display: block; }

/* Sticky CTA on a single coupon, mobile only. */

.ecomd-stickycta { display: none; }

@media (max-width: 860px) {
	.ecomd-stickycta {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 90;
		display: flex;
		align-items: center;
		gap: var(--ecomd-space-3);
		padding: var(--ecomd-space-3) var(--ecomd-space-4);
		padding-bottom: max(var(--ecomd-space-3), env(safe-area-inset-bottom));
		background: var(--ecomd-card);
		border-top: 1px solid var(--ecomd-border);
		box-shadow: 0 -4px 20px rgba(17, 18, 15, .08);
	}

	.ecomd-stickycta > :first-child { flex: 1 1 auto; }
	body.ecomd-has-stickycta { padding-bottom: 84px; }
}

/* Article cards */

.ecomd-article {
	display: flex;
	flex-direction: column;
	background: var(--ecomd-card);
	border: 1px solid var(--ecomd-border);
	border-radius: var(--ecomd-radius-lg);
	overflow: hidden;
	transition: transform .18s ease, box-shadow .18s ease;
}

.ecomd-article:hover { transform: translateY(-3px); box-shadow: var(--ecomd-shadow-lg); }
.ecomd-article__media { aspect-ratio: 16 / 9; background: var(--ecomd-bg); }
.ecomd-article__media img { width: 100%; height: 100%; object-fit: cover; }
.ecomd-article__body { padding: var(--ecomd-space-5); display: flex; flex-direction: column; gap: var(--ecomd-space-2); flex: 1 1 auto; }
.ecomd-article__title { font-size: 1.125rem; margin: 0; line-height: 1.35; }
.ecomd-article__title a { text-decoration: none; color: inherit; }
.ecomd-article__meta { font-size: .8125rem; color: var(--ecomd-muted); font-weight: 500; }
.ecomd-article__excerpt { color: var(--ecomd-muted); font-size: .9375rem; margin: 0; }
.ecomd-article__hero { border-radius: var(--ecomd-radius-lg); margin-bottom: var(--ecomd-space-6); }

/* ---------------------------------------------------------------------
   12. Forms and notices
   ------------------------------------------------------------------ */

.ecomd-form { display: grid; gap: var(--ecomd-space-5); }
.ecomd-form__row { display: grid; gap: var(--ecomd-space-2); }
.ecomd-form__grid { display: grid; gap: var(--ecomd-space-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

.ecomd-form label { font-weight: 600; font-size: .9375rem; }

.ecomd-form input[type="text"],
.ecomd-form input[type="email"],
.ecomd-form input[type="url"],
.ecomd-form input[type="date"],
.ecomd-form input[type="password"],
.ecomd-form select,
.ecomd-form textarea {
	width: 100%;
	min-height: 48px;
	padding: var(--ecomd-space-3) var(--ecomd-space-4);
	border: 1px solid var(--ecomd-border);
	border-radius: var(--ecomd-radius);
	background: var(--ecomd-card);
	font: inherit;
	color: inherit;
}

.ecomd-form textarea { min-height: 130px; resize: vertical; }

.ecomd-form input:focus,
.ecomd-form select:focus,
.ecomd-form textarea:focus {
	outline: none;
	border-color: var(--ecomd-black);
	box-shadow: 0 0 0 3px var(--ecomd-primary-soft);
}

.ecomd-form__hint { font-size: .8125rem; color: var(--ecomd-muted); }
.ecomd-form__honey { position: absolute; left: -9999px; }

.ecomd-notice {
	padding: var(--ecomd-space-4) var(--ecomd-space-5);
	border-radius: var(--ecomd-radius);
	background: var(--ecomd-primary-soft);
	border: 1px solid var(--ecomd-primary);
	margin-bottom: var(--ecomd-space-5);
	font-size: .9375rem;
}

.ecomd-notice--success { background: var(--ecomd-success-soft); border-color: var(--ecomd-success); }
.ecomd-notice--error { background: var(--ecomd-danger-soft); border-color: var(--ecomd-danger); }

/* ---------------------------------------------------------------------
   13. Empty states, pagination, widgets, footer
   ------------------------------------------------------------------ */

.ecomd-empty {
	text-align: center;
	padding: clamp(2.5rem, 2rem + 3vw, 5rem) var(--ecomd-space-5);
	background: var(--ecomd-card);
	border: 1px dashed var(--ecomd-border);
	border-radius: var(--ecomd-radius-xl);
}

.ecomd-empty__title { font-size: 1.375rem; margin: 0 0 var(--ecomd-space-2); }
.ecomd-empty__text { color: var(--ecomd-muted); max-width: 48ch; margin: 0 auto var(--ecomd-space-5); }

.ecomd-pagination { margin-top: var(--ecomd-space-8); }

.ecomd-pagination ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--ecomd-space-2);
	list-style: none;
	margin: 0;
	padding: 0;
}

.ecomd-pagination a,
.ecomd-pagination span {
	display: grid;
	place-items: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 var(--ecomd-space-3);
	border-radius: var(--ecomd-radius);
	border: 1px solid var(--ecomd-border);
	background: var(--ecomd-card);
	font-weight: 600;
	font-size: .9375rem;
	text-decoration: none;
	color: var(--ecomd-text);
}

.ecomd-pagination a:hover { border-color: var(--ecomd-black); }

.ecomd-pagination .current {
	background: var(--ecomd-primary);
	border-color: var(--ecomd-primary);
	color: var(--ecomd-on-primary);
}

.ecomd-widget {
	background: var(--ecomd-card);
	border: 1px solid var(--ecomd-border);
	border-radius: var(--ecomd-radius-lg);
	padding: var(--ecomd-space-5);
}

.ecomd-widget__title {
	font-size: 1.0625rem;
	margin: 0 0 var(--ecomd-space-4);
	padding-bottom: var(--ecomd-space-3);
	border-bottom: 1px solid var(--ecomd-border);
}

.ecomd-widget ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--ecomd-space-1); }

.ecomd-widget li a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--ecomd-space-3);
	min-height: 42px;
	padding: var(--ecomd-space-2) var(--ecomd-space-3);
	border-radius: var(--ecomd-radius-sm);
	text-decoration: none;
	font-size: .9375rem;
	font-weight: 500;
}

.ecomd-widget li a:hover { background: var(--ecomd-bg); }
.widget__count { color: var(--ecomd-muted); font-size: .8125rem; font-weight: 600; }

.ecomd-widget-coupons { display: grid; gap: var(--ecomd-space-2); }

.ecomd-widget-coupon {
	display: flex;
	align-items: center;
	gap: var(--ecomd-space-3);
	padding: var(--ecomd-space-3);
	border-radius: var(--ecomd-radius);
	text-decoration: none;
	color: inherit;
}

.ecomd-widget-coupon:hover { background: var(--ecomd-bg); color: inherit; }
.ecomd-widget-coupon img { width: 40px; height: 40px; object-fit: contain; border-radius: var(--ecomd-radius-sm); flex-shrink: 0; }
.ecomd-widget-coupon strong { display: block; font-size: .875rem; font-weight: 600; line-height: 1.35; }
.ecomd-widget-coupon span span { font-size: .75rem; color: var(--ecomd-muted); }

/* On mobile the sidebar becomes collapsible sections rather than a
   long tail of cards the visitor has to scroll past. */
@media (max-width: 1023px) {
	.ecomd-sidebar .ecomd-widget { padding: 0; }

	.ecomd-sidebar .ecomd-widget__title {
		margin: 0;
		padding: var(--ecomd-space-4) var(--ecomd-space-5);
		border-bottom: 0;
		cursor: pointer;
	}

	.ecomd-sidebar .ecomd-widget > *:not(.ecomd-widget__title) {
		padding: 0 var(--ecomd-space-5) var(--ecomd-space-5);
	}
}

.ecomd-newsletter {
	background: var(--ecomd-black);
	color: #fff;
	border-radius: var(--ecomd-radius-xl);
	padding: clamp(2rem, 1.5rem + 2.5vw, 3.5rem);
	text-align: center;
}

.ecomd-newsletter h2 { color: #fff; }
.ecomd-newsletter p { color: rgba(255, 255, 255, .72); max-width: 52ch; margin-inline: auto; }

.ecomd-newsletter form {
	display: flex;
	flex-wrap: wrap;
	gap: var(--ecomd-space-3);
	max-width: 480px;
	margin: var(--ecomd-space-6) auto 0;
}

.ecomd-newsletter input[type="email"] {
	flex: 1 1 220px;
	min-height: 52px;
	padding: 0 var(--ecomd-space-5);
	border: 1px solid rgba(255, 255, 255, .25);
	border-radius: var(--ecomd-radius-pill);
	background: rgba(255, 255, 255, .08);
	color: #fff;
	font: inherit;
}

.ecomd-newsletter input::placeholder { color: rgba(255, 255, 255, .5); }

.ecomd-footer {
	background: var(--ecomd-card);
	border-top: 1px solid var(--ecomd-border);
	padding: var(--ecomd-space-16) 0 var(--ecomd-space-8);
	margin-top: var(--ecomd-space-8);
}

.ecomd-footer__grid {
	display: grid;
	gap: var(--ecomd-space-8);
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
}

.ecomd-footer h3 { font-size: .8125rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ecomd-muted); margin-bottom: var(--ecomd-space-4); }
.ecomd-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--ecomd-space-2); }
.ecomd-footer a { text-decoration: none; font-size: .9375rem; color: var(--ecomd-text); }
.ecomd-footer a:hover { color: var(--ecomd-primary-dark); }
.ecomd-footer__about { color: var(--ecomd-muted); font-size: .9375rem; max-width: 40ch; }

.ecomd-footer__social { display: flex; gap: var(--ecomd-space-2); margin-top: var(--ecomd-space-4); }

.ecomd-footer__social a {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: var(--ecomd-radius-pill);
	border: 1px solid var(--ecomd-border);
	font-weight: 700;
	font-size: .875rem;
}

.ecomd-footer__social a:hover { background: var(--ecomd-primary); border-color: var(--ecomd-primary); color: var(--ecomd-on-primary); }

.ecomd-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--ecomd-space-4);
	margin-top: var(--ecomd-space-12);
	padding-top: var(--ecomd-space-6);
	border-top: 1px solid var(--ecomd-border);
	font-size: .875rem;
	color: var(--ecomd-muted);
}

.ecomd-footer__bottom ul { display: flex; flex-wrap: wrap; gap: var(--ecomd-space-5); }

/* ---------------------------------------------------------------------
   14. Dark mode
   ------------------------------------------------------------------ */

html[data-theme="dark"] {
	--ecomd-bg: #121310;
	--ecomd-card: #1B1D18;
	--ecomd-text: #F2F3EF;
	--ecomd-muted: #9DA097;
	--ecomd-border: #2C2F27;
	--ecomd-black: #F2F3EF;
	--ecomd-primary-soft: #232A16;
	--ecomd-success-soft: #1B2A14;
	--ecomd-danger-soft: #2E1917;
	--ecomd-shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
	--ecomd-shadow: 0 2px 8px rgba(0, 0, 0, .35);
	--ecomd-shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
}

html[data-theme="dark"] .ecomd-btn--dark,
html[data-theme="dark"] .ecomd-btn--accent,
html[data-theme="dark"] .ecomd-reveal,
html[data-theme="dark"] .ecomd-code__copy {
	background: var(--ecomd-primary);
	color: var(--ecomd-on-primary);
}

html[data-theme="dark"] .ecomd-newsletter,
html[data-theme="dark"] .ecomd-feature--dark {
	background: #23261E;
	border-color: #23261E;
}

html[data-theme="dark"] .ecomd-storehero__logo { background: #fff; }

/* ---------------------------------------------------------------------
   15. Print
   ------------------------------------------------------------------ */

@media print {
	.ecomd-header,
	.ecomd-footer,
	.ecomd-sidebar,
	.ecomd-stickycta,
	.ecomd-filters,
	.ecomd-pagination,
	.ecomd-drawer,
	.ecomd-toasts { display: none !important; }

	body { background: #fff; }
	.ecomd-coupon { break-inside: avoid; border: 1px solid #999; box-shadow: none; }
	.ecomd-modal { position: static; visibility: visible; opacity: 1; }
	.ecomd-modal__scrim { display: none; }
}

/* ---------------------------------------------------------------------
   16. Template class names

   The markup in template-parts/ uses these names. They are defined here
   rather than renamed in twenty templates, which would risk breaking the
   JS selectors and the tracking hooks that already target them.
   ------------------------------------------------------------------ */

.ecomd-site { display: flex; flex-direction: column; min-height: 100dvh; }
.ecomd-site > main { flex: 1 0 auto; }

/* Section header */
.ecomd-section__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--ecomd-space-3) var(--ecomd-space-5);
	margin-bottom: var(--ecomd-space-6);
}

.ecomd-section__title { margin: 0; }

.ecomd-section__lead {
	flex-basis: 100%;
	color: var(--ecomd-muted);
	margin: var(--ecomd-space-2) 0 0;
	max-width: 70ch;
}

.ecomd-section__link {
	font-weight: 600;
	font-size: .9375rem;
	white-space: nowrap;
	text-decoration: none;
	border-bottom: 2px solid var(--ecomd-primary);
	padding-bottom: 2px;
}

.ecomd-section__link:hover { border-bottom-color: var(--ecomd-black); }

/* Breadcrumbs */
.ecomd-crumbs { padding: var(--ecomd-space-6) 0 0; }

.ecomd-crumbs ol {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--ecomd-space-2);
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: .8125rem;
	font-weight: 500;
	color: var(--ecomd-muted);
}

.ecomd-crumbs li { display: flex; align-items: center; gap: var(--ecomd-space-2); }
.ecomd-crumbs li + li::before { content: "/"; color: var(--ecomd-border); }
.ecomd-crumbs a { color: var(--ecomd-muted); text-decoration: none; }
.ecomd-crumbs a:hover { color: var(--ecomd-black); text-decoration: underline; }
.ecomd-crumbs [aria-current] { color: var(--ecomd-text); }

/* Badges on a coupon card. These share the pill shape but carry meaning,
   so each state gets its own colour rather than one generic grey. */
.ecomd-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px 10px;
	border-radius: var(--ecomd-radius-pill);
	background: var(--ecomd-bg);
	color: var(--ecomd-muted);
	border: 1px solid var(--ecomd-border);
	font-size: .75rem;
	font-weight: 700;
	line-height: 1.4;
	white-space: nowrap;
}

.ecomd-badge--verified {
	background: var(--ecomd-success-soft);
	color: var(--ecomd-success);
	border-color: transparent;
}

.ecomd-badge--exclusive,
.ecomd-badge--featured,
.ecomd-badge--popular {
	background: var(--ecomd-primary-soft);
	color: var(--ecomd-on-primary);
	border-color: transparent;
}

.ecomd-badge--expiring {
	background: var(--ecomd-danger-soft);
	color: var(--ecomd-danger);
	border-color: transparent;
}

.ecomd-badge--expired { background: var(--ecomd-bg); color: var(--ecomd-muted); }

/* Search form */
.ecomd-search {
	position: relative;
	display: flex;
	align-items: center;
	gap: var(--ecomd-space-2);
	background: var(--ecomd-bg);
	border: 1px solid var(--ecomd-border);
	border-radius: var(--ecomd-radius-pill);
	padding: 0 var(--ecomd-space-2) 0 var(--ecomd-space-4);
	transition: border-color .15s ease, background-color .15s ease;
}

.ecomd-search:focus-within { border-color: var(--ecomd-black); background: var(--ecomd-card); }

.ecomd-search__icon { display: grid; place-items: center; color: var(--ecomd-muted); flex-shrink: 0; }

.ecomd-search__input {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 48px;
	border: 0;
	background: none;
	font: inherit;
	font-size: .9375rem;
	color: inherit;
	outline: none;
	padding: 0;
}

.ecomd-search__submit {
	flex-shrink: 0;
	min-height: 38px;
	padding: 0 var(--ecomd-space-5);
	border: 0;
	border-radius: var(--ecomd-radius-pill);
	background: var(--ecomd-primary);
	color: var(--ecomd-on-primary);
	font: inherit;
	font-weight: 700;
	font-size: .875rem;
	cursor: pointer;
	transition: background-color .15s ease;
}

.ecomd-search__submit:hover { background: var(--ecomd-primary-dark); }

.ecomd-search__results {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	z-index: 90;
	background: var(--ecomd-card);
	border: 1px solid var(--ecomd-border);
	border-radius: var(--ecomd-radius-lg);
	box-shadow: var(--ecomd-shadow-lg);
	padding: var(--ecomd-space-2);
	max-height: min(60vh, 440px);
	overflow-y: auto;
}

.ecomd-search__results[hidden] { display: none; }

/* Header helpers used by the markup and the JS. */
.ecomd-header--sticky { position: sticky; top: 0; }
.ecomd-header { position: relative; z-index: 100; }
.ecomd-header--static { position: relative; }
.ecomd-header.is-pinned { box-shadow: var(--ecomd-shadow); }

.ecomd-nav__list {
	display: flex;
	align-items: center;
	gap: var(--ecomd-space-1);
	list-style: none;
	margin: 0;
	padding: 0;
}

.ecomd-themetoggle svg { width: 20px; height: 20px; }

/* Filters markup */
.ecomd-filters__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--ecomd-space-3);
	width: 100%;
}

.ecomd-filters__check {
	display: inline-flex;
	align-items: center;
	gap: var(--ecomd-space-2);
	min-height: 42px;
	padding: 0 var(--ecomd-space-4);
	border: 1px solid var(--ecomd-border);
	border-radius: var(--ecomd-radius-pill);
	background: var(--ecomd-card);
	font-size: .875rem;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
}

.ecomd-filters__check:has(input:checked) {
	background: var(--ecomd-primary);
	border-color: var(--ecomd-primary);
	color: var(--ecomd-on-primary);
}

.ecomd-filters__check input { accent-color: var(--ecomd-on-primary); }

.ecomd-filters__toggle { display: none; }

@media (max-width: 767px) {
	.ecomd-filters__toggle {
		display: inline-flex;
		width: 100%;
		justify-content: space-between;
	}

	/* Collapse the filter panel behind a button on phones so the coupon
	   list starts near the top of the viewport. */
	.ecomd-filters__row {
		display: none;
		flex-direction: column;
		align-items: stretch;
		padding: var(--ecomd-space-4);
		background: var(--ecomd-card);
		border: 1px solid var(--ecomd-border);
		border-radius: var(--ecomd-radius-lg);
	}

	.ecomd-filters.is-open .ecomd-filters__row { display: flex; }
	.ecomd-filters__row select,
	.ecomd-filters__row .ecomd-filters__check { width: 100%; }
}

/* Single coupon header block */
.ecomd-single-coupon {
	background: var(--ecomd-card);
	border: 1px solid var(--ecomd-border);
	border-radius: var(--ecomd-radius-xl);
	padding: clamp(1.25rem, 1rem + 1.4vw, 2.25rem);
	margin-bottom: var(--ecomd-space-5);
}

.ecomd-single-coupon__top {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: var(--ecomd-space-5);
	align-items: center;
}

.ecomd-single-coupon__logo {
	width: 88px;
	height: 88px;
	object-fit: contain;
	border: 1px solid var(--ecomd-border);
	border-radius: var(--ecomd-radius);
	padding: var(--ecomd-space-2);
	background: #fff;
}

.ecomd-single-coupon__value {
	display: inline-flex;
	align-items: baseline;
	gap: var(--ecomd-space-2);
	background: var(--ecomd-primary);
	color: var(--ecomd-on-primary);
	border-radius: var(--ecomd-radius);
	padding: var(--ecomd-space-3) var(--ecomd-space-5);
	font-family: var(--ecomd-font-display);
	font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem);
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1;
}

@media (max-width: 560px) {
	.ecomd-single-coupon__top { grid-template-columns: 1fr; }
}

/* Terms toggle on a card */
.ecomd-coupon__terms-toggle {
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	font-size: .8125rem;
	font-weight: 600;
	color: var(--ecomd-muted);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.ecomd-coupon__terms-toggle:hover { color: var(--ecomd-black); }

.ecomd-coupon__terms {
	font-size: .8125rem;
	color: var(--ecomd-muted);
	background: var(--ecomd-bg);
	border-radius: var(--ecomd-radius-sm);
	padding: var(--ecomd-space-3);
	margin: 0;
}

.ecomd-coupon__terms[hidden] { display: none; }

/* Voting markup */
.ecomd-vote__q { flex-basis: 100%; text-align: center; font-size: .875rem; font-weight: 600; color: var(--ecomd-muted); margin: 0; }
.ecomd-vote__result { flex-basis: 100%; text-align: center; font-size: .875rem; font-weight: 600; color: var(--ecomd-success); }
.ecomd-vote__btn--no.is-active { background: var(--ecomd-danger-soft); border-color: var(--ecomd-danger); }

/* Modal markup */
.ecomd-modal__store { font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ecomd-muted); margin-bottom: var(--ecomd-space-2); }
.ecomd-modal__go { width: 100%; }
.ecomd-modal__note { font-size: .8125rem; color: var(--ecomd-muted); margin: var(--ecomd-space-4) 0 0; }
.ecomd-modal__terms { font-size: .8125rem; color: var(--ecomd-muted); text-align: left; margin-top: var(--ecomd-space-4); }
.ecomd-modal__vote { margin-top: var(--ecomd-space-4); }

/* Meta state colours used on cards and the single view. */
.ecomd-meta--ok { color: var(--ecomd-success); font-weight: 600; }
.ecomd-meta--warn { color: var(--ecomd-danger); font-weight: 600; }

/* Misc */
.ecomd-empty__mark { width: 64px; height: 48px; margin: 0 auto var(--ecomd-space-4); color: var(--ecomd-border); }
.ecomd-hero__links { display: flex; flex-wrap: wrap; gap: var(--ecomd-space-3); margin-top: var(--ecomd-space-6); }
.ecomd-loadmore { display: grid; place-items: center; margin-top: var(--ecomd-space-6); }
.ecomd-no-sidebar .ecomd-layout--sidebar { grid-template-columns: 1fr; }
.ecomd-detail { display: grid; gap: var(--ecomd-space-2); }
.ecomd-stores { align-items: stretch; }
.ecomd-comments { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--ecomd-space-5); }
.ecomd-woo { min-width: 0; }

.ecomd-coupons--list,
.ecomd-coupons--compact,
.ecomd-coupons--mobile { grid-template-columns: 1fr; }

.ecomd-coupon__head { display: flex; align-items: center; gap: var(--ecomd-space-3); }

.ecomd-coupon__head .ecomd-coupon__logo {
	width: 44px;
	height: 44px;
	border: 1px solid var(--ecomd-border);
	padding: 3px;
	background: #fff;
}

/* ---------------------------------------------------------------------
   17. Fixes found in 1.1.0 review

   Inline SVG icons in the markup carry no width, height or stroke of
   their own. Without these rules the browser falls back to a 300x150
   replaced-element box with a black fill, which is why the clock and
   tick icons rendered as large black blobs on the coupon cards.
   ------------------------------------------------------------------ */

.ecomd-coupon__meta svg,
.ecomd-meta--ok svg,
.ecomd-meta--warn svg {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
	display: inline-block;
	vertical-align: -2px;
}

.ecomd-coupon__meta > span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.ecomd-fav svg,
.ecomd-iconbtn svg,
.ecomd-themetoggle svg,
.ecomd-search__icon svg,
.ecomd-drawer svg,
.ecomd-header svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.ecomd-fav svg { width: 18px; height: 18px; }
.ecomd-fav.is-active svg { fill: currentColor; }
.ecomd-search__icon svg { width: 18px; height: 18px; }

/* The skip link markup uses .skip-link, not .ecomd-skip. Without a rule it
   rendered as visible body text at the top of every page. */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 200;
	background: var(--ecomd-black);
	color: #fff;
	padding: var(--ecomd-space-3) var(--ecomd-space-5);
	border-radius: 0 0 var(--ecomd-radius) 0;
	font-weight: 600;
	text-decoration: none;
}

.skip-link:focus {
	left: 0;
	color: #fff;
}

/* The value block is a fixed-width column. Long labels such as
   "COUPON CODE" were overflowing it and landing on top of the badges,
   so the text now wraps and centres inside the block instead. */
.ecomd-coupon__stub {
	overflow-wrap: anywhere;
	text-align: center;
	min-width: 0;
}

.ecomd-coupon__valuelabel {
	max-width: 100%;
	line-height: 1.25;
	word-break: normal;
	overflow-wrap: anywhere;
}

.ecomd-coupon--list .ecomd-coupon__stub,
.ecomd-coupon--horizontal .ecomd-coupon__stub {
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: var(--ecomd-space-4) var(--ecomd-space-3);
}

/* The hero action column reserved 200px even when it held only the save
   button, which left a large hole between the title and the heart. */
.ecomd-storehero__actions { min-width: 0; }
.ecomd-storehero__actions:has(.ecomd-btn) { min-width: 0; }


/* ---------------------------------------------------------------------
   18. The reveal card

   This is what the new tab lands on after a Get code click, so it has to
   read like a popup even though it is a normal page section.
   ------------------------------------------------------------------ */

.ecomd-revealcard {
	background: var(--ecomd-card);
	border: 1px solid var(--ecomd-border);
	border-radius: var(--ecomd-radius-xl);
	box-shadow: var(--ecomd-shadow-lg);
	padding: clamp(1.5rem, 1.2rem + 1.6vw, 2.5rem);
	margin-bottom: var(--ecomd-space-6);
	text-align: center;
	scroll-margin-top: 110px;
}

.ecomd-revealcard__eyebrow {
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--ecomd-muted);
	margin: 0 0 var(--ecomd-space-4);
}

.ecomd-revealcard__logo {
	width: 72px;
	height: 72px;
	object-fit: contain;
	margin: 0 auto var(--ecomd-space-3);
	border: 1px solid var(--ecomd-border);
	border-radius: var(--ecomd-radius);
	padding: var(--ecomd-space-2);
	background: #fff;
}

.ecomd-revealcard__title {
	font-size: clamp(1.25rem, 1.1rem + .7vw, 1.625rem);
	margin: 0 0 var(--ecomd-space-5);
}

.ecomd-revealcard .ecomd-code { max-width: 420px; margin-inline: auto; }

.ecomd-revealcard__hint {
	font-size: .8125rem;
	color: var(--ecomd-muted);
	margin: 0 0 var(--ecomd-space-5);
}

.ecomd-revealcard .ecomd-btn--block { max-width: 420px; margin-inline: auto; }

.ecomd-revealcard__meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--ecomd-space-2);
	margin-top: var(--ecomd-space-5);
}

.ecomd-revealcard__terms {
	text-align: left;
	max-width: 480px;
	margin: var(--ecomd-space-5) auto 0;
	font-size: .875rem;
	color: var(--ecomd-muted);
}

.ecomd-revealcard__terms summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }

/* ---------------------------------------------------------------------
   19. Mobile: drop what does not earn its space

   Below 768px the page should be the offers and almost nothing else.
   These blocks either repeat information shown elsewhere or are simply
   too heavy for a phone.
   ------------------------------------------------------------------ */

@media (max-width: 767px) {
	/* Decorative and duplicated blocks. */
	.ecomd-storehero__banner,
	.ecomd-hero__stats,
	.ecomd-coupon__terms-toggle,
	.ecomd-sectionhead__lead,
	.ecomd-section__lead { display: none; }

	/* The hero already carries the counts, so the sidebar panel repeating
	   them is pure scrolling on a phone. */
	.ecomd-sidebar .ecomd-store-info { display: none; }

	/* Breadcrumbs: keep the parent link and the current page, drop the
	   middle of the trail rather than wrapping onto three lines. */
	.ecomd-crumbs li:not(:first-child):not(:last-child) { display: none; }

	/* Tighter rhythm throughout. */
	.ecomd-section { padding: var(--ecomd-space-8) 0; }
	.ecomd-layout { gap: var(--ecomd-space-6); padding-bottom: var(--ecomd-space-10); }
	.ecomd-panel { padding: var(--ecomd-space-5); }
	.ecomd-storehero { padding: var(--ecomd-space-5); margin-bottom: var(--ecomd-space-6); }

	/* Two stats, not four. */
	.ecomd-storehero__stats > *:nth-child(n + 3) { display: none; }
	.ecomd-storehero__stats { gap: var(--ecomd-space-8); }

	/* Related shops: one row, not two. */
	.ecomd-stores > *:nth-child(n + 5) { display: none; }

	/* Footer columns stack, and the long blurb goes. */
	.ecomd-footer { padding: var(--ecomd-space-10) 0 var(--ecomd-space-6); }
	.ecomd-footer__about { display: none; }
	.ecomd-footer__grid { gap: var(--ecomd-space-6); }

	.ecomd-prose { max-width: 100%; }
	.ecomd-prose h2 { margin-top: var(--ecomd-space-6); }
}

@media (max-width: 480px) {
	/* At this width the excerpt pushes the CTA below the fold. */
	.ecomd-coupon__excerpt { display: none; }

	/* One stat is enough on the narrowest phones. */
	.ecomd-storehero__stats > *:nth-child(n + 3) { display: none; }

	.ecomd-coupon__value { font-size: 1.5rem; }
	.ecomd-reveal__code { display: none; }
}

/* A reusable pair, for anything added later. */
@media (max-width: 767px) { .ecomd-hide-mobile { display: none !important; } }
@media (min-width: 768px) { .ecomd-only-mobile { display: none !important; } }


/* ---------------------------------------------------------------------
   19. Mobile overflow hardening

   The theme must never create a horizontal page scroll. A single child
   with a long URL, unbroken affiliate code, oversized embed, flex item,
   or third-party widget can otherwise make the viewport pan sideways on
   iOS/Android even when body overflow is hidden.
   ------------------------------------------------------------------ */
html,
body {
	width: 100%;
	max-width: 100%;
	overflow-x: clip;
}

@supports not (overflow: clip) {
	html,
	body { overflow-x: hidden; }
}

body,
.ecomd-site,
.ecomd-site > main,
.ecomd-header,
.ecomd-footer,
.ecomd-container,
.ecomd-main,
.ecomd-sidebar,
.ecomd-section,
.ecomd-section > *,
.ecomd-layout,
.ecomd-grid,
.ecomd-coupons {
	max-width: 100%;
	min-width: 0;
}

.ecomd-container {
	inline-size: min(100% - 32px, var(--ecomd-container));
}

img,
svg,
video,
canvas,
iframe,
embed,
object {
	max-inline-size: 100%;
}

iframe,
embed,
object {
	max-width: 100%;
}

pre,
code,
kbd,
samp {
	max-width: 100%;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.ecomd-prose,
.ecomd-prose p,
.ecomd-prose li,
.ecomd-card,
.ecomd-widget,
.ecomd-storehero,
.ecomd-single-coupon,
.ecomd-article,
.ecomd-notice,
.ecomd-empty {
	min-width: 0;
	max-width: 100%;
	overflow-wrap: anywhere;
}

/* Flex/grid children are allowed to shrink instead of forcing the page
   wider than the viewport. */
.ecomd-header__bar > *,
.ecomd-header__actions > *,
.ecomd-section__head > *,
.ecomd-storehero__inner > *,
.ecomd-single-coupon__top > *,
.ecomd-coupon > *,
.ecomd-coupon__actions > *,
.ecomd-widget-coupon > *,
.ecomd-footer__grid > *,
.ecomd-newsletter form > * {
	min-width: 0;
}

.custom-logo-link,
.custom-logo {
	max-width: 100%;
	height: auto;
}

.ecomd-brand {
	min-width: 0;
	max-width: 100%;
}

.ecomd-brand > span:last-child,
.ecomd-brand__name {
	min-width: 0;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ecomd-reveal__label {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ecomd-reveal__code {
	min-width: 0;
	max-width: 45%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ecomd-section__link,
.ecomd-badge,
.ecomd-pill {
	max-width: 100%;
}

.ecomd-search,
.ecomd-search__field,
.ecomd-search__input {
	min-width: 0;
	max-width: 100%;
}

/* The horizontal category row is intentionally scrollable. Keep that
   scrolling local to the row rather than allowing the document itself to
   become wider. */
.ecomd-catrow {
	max-width: 100%;
	overscroll-behavior-inline: contain;
}

/* Third-party/SEO content frequently contains wide tables. */
.ecomd-prose table,
.ecomd-prose .table-responsive {
	max-width: 100%;
}

@media (max-width: 767px) {
	.ecomd-container {
		width: calc(100% - 32px);
		max-width: calc(100% - 32px);
	}

	.ecomd-header__bar {
		gap: var(--ecomd-space-2);
		max-width: 100%;
	}

	.ecomd-header__actions {
		min-width: 0;
		max-width: 100%;
		gap: 2px;
	}

	.ecomd-header__actions .ecomd-btn {
		max-width: 92px;
		padding-inline: 10px;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.ecomd-brand__tagline {
		display: none;
	}

	.ecomd-brand__name {
		max-width: min(42vw, 170px);
	}

	.ecomd-storehero,
	.ecomd-single-coupon,
	.ecomd-newsletter,
	.ecomd-revealcard {
		max-width: 100%;
	}

	.ecomd-storehero__actions,
	.ecomd-storehero__actions .ecomd-btn {
		min-width: 0;
		max-width: 100%;
	}

	.ecomd-coupon__actions,
	.ecomd-coupon__body,
	.ecomd-coupon__stub {
		min-width: 0;
		max-width: 100%;
	}

	.ecomd-stickycta {
		max-width: 100vw;
	}
}

@media (max-width: 380px) {
	.ecomd-container {
		width: calc(100% - 24px);
		max-width: calc(100% - 24px);
	}

	.ecomd-header__bar {
		min-height: 64px;
	}

	.ecomd-brand__mark {
		width: 34px;
		height: 34px;
	}

	.ecomd-brand__name {
		font-size: 1.05rem;
		max-width: 34vw;
	}

	.ecomd-header__actions .ecomd-btn {
		max-width: 76px;
		padding-inline: 7px;
		font-size: .75rem;
	}

	.ecomd-iconbtn {
		width: 40px;
		height: 40px;
	}
}


/* ---------------------------------------------------------------------
   20. Compact store header / conversion-first UX
   The previous store hero consumed too much vertical space. Keep the
   identity, trust signal, CTA and key counts, but reduce padding, logo,
   typography and stat spacing. This override also keeps long content from
   expanding the layout unexpectedly.
   ------------------------------------------------------------------ */
.ecomd-storehero {
	padding: 1.25rem 1.5rem;
	margin-bottom: 1.5rem;
	border-radius: 20px;
}

.ecomd-storehero__inner {
	gap: 1.25rem;
}

.ecomd-storehero__logo {
	width: 88px;
	height: 88px;
	padding: .65rem;
	border-radius: 16px;
}

.ecomd-storehero__title {
	font-size: clamp(1.7rem, 1.35rem + 1.3vw, 2.45rem);
	line-height: 1.05;
	margin-bottom: .55rem;
}

.ecomd-storehero__badges {
	margin-bottom: .35rem;
}

.ecomd-storehero .ecomd-pagehead__text {
	display: none;
}

.ecomd-storehero__actions {
	min-width: 170px;
	gap: .5rem;
}

.ecomd-storehero__actions .ecomd-btn--lg {
	min-height: 48px;
	padding: .75rem 1.25rem;
	font-size: .95rem;
}

.ecomd-storehero__stats {
	gap: 2rem;
	margin-top: 1rem;
	padding-top: 1rem;
}

.ecomd-stat__num {
	font-size: 1.3rem;
}

.ecomd-stat__label {
	font-size: .75rem;
}

@media (max-width: 900px) {
	.ecomd-storehero {
		padding: 1.1rem 1.25rem;
	}
	.ecomd-storehero__logo {
		width: 76px;
		height: 76px;
	}
	.ecomd-storehero__actions {
		min-width: 0;
	}
}

@media (max-width: 560px) {
	.ecomd-storehero {
		padding: 1rem;
		border-radius: 16px;
	}
	.ecomd-storehero__inner {
		gap: .8rem;
	}
	.ecomd-storehero__logo {
		width: 68px;
		height: 68px;
		border-radius: 14px;
	}
	.ecomd-storehero__title {
		font-size: 1.65rem;
	}
	.ecomd-storehero__badges {
		gap: .35rem;
	}
	.ecomd-storehero__stats {
		gap: 1rem;
		margin-top: .8rem;
		padding-top: .8rem;
	}
	.ecomd-stat__num {
		font-size: 1.15rem;
	}
	.ecomd-stat__label {
		font-size: .7rem;
	}
}


/* Store editorial sidebar: compact, trust-first and responsive. */
.ecomd-sidebar--store { align-content: start; }
.ecomd-author-card { padding: 20px; }
.ecomd-author-card__top { display: flex; align-items: center; gap: 14px; }
.ecomd-author-card__avatar { width: 64px; height: 64px; min-width: 64px; border-radius: 50%; object-fit: cover; border: 1px solid var(--ecomd-border); display: block; }
.ecomd-author-card__initial { display: grid; place-items: center; background: var(--ecomd-bg); color: var(--ecomd-text); font-size: 1.35rem; font-weight: 800; }
.ecomd-author-card__identity { min-width: 0; }
.ecomd-author-card__eyebrow { display: block; color: var(--ecomd-muted); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }
.ecomd-author-card__name { margin: 0; font-size: 1rem; line-height: 1.25; overflow-wrap: anywhere; }
.ecomd-author-card__name a { color: inherit; text-decoration: none; }
.ecomd-author-card__name a:hover { text-decoration: underline; }
.ecomd-author-card__role { display: block; margin-top: 3px; color: var(--ecomd-muted); font-size: .8rem; }
.ecomd-author-card__bio { margin: 14px 0 0; color: var(--ecomd-muted); font-size: .86rem; line-height: 1.55; }
.ecomd-author-card__reviewed { display: flex; gap: 7px; align-items: center; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--ecomd-border); color: var(--ecomd-muted); font-size: .76rem; line-height: 1.4; }
.ecomd-author-card__reviewed span { color: var(--ecomd-success); font-weight: 800; }
.ecomd-sidebar__lead { margin: -7px 0 10px; color: var(--ecomd-muted); font-size: .8rem; line-height: 1.4; }
.ecomd-related-stores { padding: 18px; }
.ecomd-related-stores__list { display: grid; gap: 4px; }
.ecomd-related-store { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 9px 7px; border-radius: var(--ecomd-radius-sm); text-decoration: none; color: inherit; }
.ecomd-related-store:hover { background: var(--ecomd-bg); color: inherit; }
.ecomd-related-store img, .ecomd-related-store__placeholder { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 9px; object-fit: contain; border: 1px solid var(--ecomd-border); background: #fff; }
.ecomd-related-store__placeholder { display: grid; place-items: center; font-size: 1rem; font-weight: 800; color: var(--ecomd-muted); }
.ecomd-related-store__body { min-width: 0; flex: 1 1 auto; }
.ecomd-related-store__body strong, .ecomd-related-store__body span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ecomd-related-store__body strong { font-size: .86rem; line-height: 1.3; }
.ecomd-related-store__body span { margin-top: 2px; color: var(--ecomd-muted); font-size: .73rem; }
.ecomd-related-store__arrow { flex: 0 0 auto; color: var(--ecomd-muted); font-size: 1rem; }

@media (max-width: 1023px) {
  .ecomd-author-card { padding: 18px; }
  .ecomd-related-stores { padding: 18px; }
}

@media (max-width: 767px) {
  .ecomd-sidebar--store { gap: var(--ecomd-space-4); }
  .ecomd-author-card { padding: 16px; }
  .ecomd-author-card__avatar { width: 56px; height: 56px; min-width: 56px; }
  .ecomd-author-card__bio { font-size: .82rem; }
  .ecomd-related-stores { padding: 16px; }
}


/* ---------------------------------------------------------------------
   21. Store page desktop rail + compact mobile hero
   ------------------------------------------------------------------ */
@media (min-width: 1024px) {
  .ecomd-layout--store-page {
    grid-template-columns: 300px minmax(0, 1fr);
    gap: clamp(1.5rem, 2vw, 2.25rem);
    align-items: start;
  }
  .ecomd-layout--store-page .ecomd-sidebar {
    order: 1;
    position: sticky;
    top: 88px;
    max-height: calc(100vh - 104px);
    overflow: auto;
    scrollbar-width: thin;
    padding-bottom: 8px;
  }
  .ecomd-layout--store-page .ecomd-main { order: 2; }
  .ecomd-store-related-bottom { display: none; }

  /* The desktop rail is the contextual store information surface. */
  .ecomd-sidebar--store .ecomd-widget {
    background: var(--ecomd-card);
    border: 1px solid var(--ecomd-border);
    border-radius: var(--ecomd-radius-lg);
    overflow: hidden;
    box-shadow: var(--ecomd-shadow-sm);
  }
  .ecomd-sidebar--store .ecomd-author-card { padding: 18px; }
  .ecomd-sidebar--store .ecomd-related-stores { padding: 16px; }
  .ecomd-sidebar--store .ecomd-widget-coupons { padding: 0 16px 16px; }
  .ecomd-sidebar--store .ecomd-widget__title { padding: 16px 16px 10px; }
}

@media (max-width: 1023px) {
  /* Store editorial rail is desktop-only. Mobile should go directly from
     the compact hero into the offers and supporting content. */
  .ecomd-layout--store-page .ecomd-sidebar { display: none !important; }
  .ecomd-layout--store-page { display: block; }
  .ecomd-layout--store-page .ecomd-main { width: 100%; }
}

@media (max-width: 560px) {
  .ecomd-storehero {
    padding: 12px 14px 10px;
    margin-bottom: 16px;
    border-radius: 14px;
  }
  .ecomd-storehero__inner {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    grid-template-areas:
      "logo identity"
      "actions actions";
    gap: 8px 10px;
    align-items: center;
    text-align: left;
    justify-items: stretch;
  }
  .ecomd-storehero__inner > div:nth-child(1) { grid-area: logo; }
  .ecomd-storehero__inner > div:nth-child(2) { grid-area: identity; min-width: 0; }
  .ecomd-storehero__inner > div:nth-child(3) { grid-area: actions; }
  .ecomd-storehero__logo {
    width: 52px;
    height: 52px;
    padding: 6px;
    border-radius: 10px;
  }
  .ecomd-storehero__title {
    font-size: 1.3rem;
    line-height: 1.08;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .ecomd-storehero__badges {
    gap: 4px;
    margin: 0;
    max-width: 100%;
    overflow: hidden;
    flex-wrap: nowrap;
  }
  .ecomd-storehero__badges .ecomd-badge {
    font-size: .64rem;
    line-height: 1.6;
    padding: 2px 6px;
    white-space: nowrap;
    flex: 0 0 auto;
  }
  .ecomd-storehero__actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: stretch;
    gap: 7px;
    min-width: 0;
  }
  .ecomd-storehero__actions .ecomd-btn--lg {
    min-height: 38px;
    height: 38px;
    padding: .55rem .9rem;
    font-size: .82rem;
    flex: 1 1 auto;
  }
  .ecomd-storehero__actions .ecomd-fav {
    width: 38px;
    height: 38px;
    min-width: 38px;
    flex: 0 0 38px;
  }
  .ecomd-storehero__stats {
    gap: 0;
    margin-top: 8px;
    padding-top: 8px;
    justify-content: stretch;
  }
  .ecomd-storehero__stats > div {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
  }
  .ecomd-stat__num { font-size: 1rem; }
  .ecomd-stat__label { font-size: .62rem; }
}


/* ---------------------------------------------------------------------
   22. Store page layout audit - authoritative responsive rules
   ------------------------------------------------------------------ */

/* Desktop: content first, contextual rail on the RIGHT. */
.ecomd-layout--store-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.ecomd-layout--store-page > .ecomd-main { min-width: 0; order: 1; }
.ecomd-layout--store-page > .ecomd-sidebar { min-width: 0; order: 2; }

@media (min-width: 1024px) {
  .ecomd-layout--store-page {
    grid-template-columns: minmax(0, 1fr) 292px;
    gap: 28px;
  }
  .ecomd-layout--store-page > .ecomd-main { order: 1; }
  .ecomd-layout--store-page > .ecomd-sidebar {
    order: 2;
    position: sticky;
    top: 88px;
    max-height: calc(100vh - 104px);
    overflow: auto;
    scrollbar-width: thin;
    padding-bottom: 4px;
  }
  .ecomd-store-related-bottom { display: none !important; }

  /* Give the coupon cards a readable desktop width instead of full-page bars. */
  .ecomd-layout--store-page .ecomd-coupons--list {
    width: min(100%, 900px);
  }
  .ecomd-layout--store-page .ecomd-section__head {
    align-items: end;
  }

  /* Sidebar is intentionally visually subordinate to the offer column. */
  .ecomd-sidebar--store > .ecomd-widget {
    background: var(--ecomd-card);
    border: 1px solid var(--ecomd-border);
    border-radius: var(--ecomd-radius-lg);
    box-shadow: var(--ecomd-shadow-sm);
    overflow: hidden;
  }
}

/* Tablet/mobile: one predictable vertical flow. */
@media (max-width: 1023px) {
  .ecomd-layout--store-page {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }
  .ecomd-layout--store-page > .ecomd-main,
  .ecomd-layout--store-page > .ecomd-sidebar {
    width: 100%;
    order: initial;
  }
  .ecomd-layout--store-page > .ecomd-main { order: 1; }
  .ecomd-layout--store-page > .ecomd-sidebar {
    order: 2;
    position: static;
    max-height: none;
    overflow: visible;
    display: grid !important;
  }
  .ecomd-store-related-bottom { display: none !important; }
}

/* Compact mobile store hero: logo + title + actions, no oversized block. */
@media (max-width: 767px) {
  .ecomd-layout--store-page { gap: 16px; padding-bottom: 32px; }

  .ecomd-layout--store-page .ecomd-storehero {
    padding: 12px 14px 10px;
    margin-bottom: 14px;
    border-radius: 14px;
  }
  .ecomd-layout--store-page .ecomd-storehero__inner {
    display: grid !important;
    grid-template-columns: 52px minmax(0, 1fr) !important;
    grid-template-areas:
      "logo identity"
      "actions actions" !important;
    gap: 8px 10px !important;
    align-items: center;
    text-align: left !important;
    justify-items: stretch;
  }
  .ecomd-layout--store-page .ecomd-storehero__inner > div:nth-child(1) { grid-area: logo; }
  .ecomd-layout--store-page .ecomd-storehero__inner > div:nth-child(2) { grid-area: identity; min-width: 0; }
  .ecomd-layout--store-page .ecomd-storehero__inner > div:nth-child(3) { grid-area: actions; }
  .ecomd-layout--store-page .ecomd-storehero__logo {
    width: 52px !important;
    height: 52px !important;
    padding: 5px;
    border-radius: 10px;
  }
  .ecomd-layout--store-page .ecomd-store__placeholder { width: 52px !important; height: 52px !important; font-size: 1.25rem !important; }
  .ecomd-layout--store-page .ecomd-storehero__title {
    font-size: 1.28rem;
    line-height: 1.08;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .ecomd-layout--store-page .ecomd-storehero__badges {
    gap: 4px;
    margin: 0;
    flex-wrap: nowrap;
    overflow: hidden;
  }
  .ecomd-layout--store-page .ecomd-storehero__badges .ecomd-badge {
    font-size: .62rem;
    line-height: 1.5;
    padding: 2px 6px;
    white-space: nowrap;
    flex: 0 0 auto;
  }
  .ecomd-layout--store-page .ecomd-storehero__actions {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px;
    min-width: 0 !important;
    width: 100%;
  }
  .ecomd-layout--store-page .ecomd-storehero__actions .ecomd-btn--lg {
    min-height: 38px;
    padding: .55rem .85rem;
    font-size: .8rem;
    flex: 1 1 auto;
  }
  .ecomd-layout--store-page .ecomd-storehero__actions .ecomd-fav,
  .ecomd-layout--store-page .ecomd-storehero__actions .ecomd-iconbtn { width: 38px; height: 38px; flex: 0 0 38px; }
  .ecomd-layout--store-page .ecomd-storehero__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
  }
  .ecomd-layout--store-page .ecomd-storehero__stats > * { min-width: 0; }
  .ecomd-layout--store-page .ecomd-storehero__stats > *:nth-child(n+3) { display: none; }
  .ecomd-layout--store-page .ecomd-stat__num { font-size: 1.05rem; }
  .ecomd-layout--store-page .ecomd-stat__label { font-size: .68rem; }

  /* Mobile content: title first, one compact filter, then offers. */
  .ecomd-layout--store-page .ecomd-section__head { margin-top: 2px; }
  .ecomd-layout--store-page .ecomd-section__title { font-size: 1.55rem; line-height: 1.15; }
  .ecomd-layout--store-page .ecomd-filters { margin-bottom: 8px; }

  /* Cards should breathe, but never become full-page empty rectangles. */
  .ecomd-layout--store-page .ecomd-coupon--list { border-radius: 14px; }
  .ecomd-layout--store-page .ecomd-coupon--list .ecomd-coupon__stub { min-height: 88px; }

  /* Sidebar follows the primary store content on phones. */
  .ecomd-layout--store-page .ecomd-sidebar--store {
    gap: 14px;
  }
  .ecomd-layout--store-page .ecomd-sidebar--store .ecomd-widget {
    margin: 0;
  }
  .ecomd-layout--store-page .ecomd-sidebar-description__body {
    padding: 0 14px 14px;
    font-size: .84rem;
    line-height: 1.45;
  }
  .ecomd-layout--store-page .ecomd-widget__title {
    font-size: .92rem;
  }
  .ecomd-layout--store-page .ecomd-author-card { padding: 14px; }
  .ecomd-layout--store-page .ecomd-author-card__avatar { width: 48px; height: 48px; min-width: 48px; }
  .ecomd-layout--store-page .ecomd-author-card__bio { font-size: .8rem; }
  .ecomd-layout--store-page .ecomd-related-stores { padding: 14px; }
}

@media (max-width: 480px) {
  .ecomd-layout--store-page .ecomd-container { inline-size: min(100% - 16px, var(--ecomd-container)); }
  .ecomd-layout--store-page .ecomd-storehero__logo { width: 48px !important; height: 48px !important; }
  .ecomd-layout--store-page .ecomd-store__placeholder { width: 48px !important; height: 48px !important; }
  .ecomd-layout--store-page .ecomd-storehero__inner { grid-template-columns: 48px minmax(0, 1fr) !important; }
  .ecomd-layout--store-page .ecomd-storehero__title { font-size: 1.2rem; }
  .ecomd-layout--store-page .ecomd-coupon__value { font-size: 1.35rem; }
}
