/*
 * Visually-hidden utility — used by the stats strip aria-labelledby title.
 */
.chn-screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

/*
 * storefront.css — architect/seller storefront (/seller/store/{slug}/).
 *
 * Loads after components.css so storefront-specific overrides win where
 * intentional (plan-grid columns inside .chn-storefront-plans__grid).
 *
 * Sections (top → bottom):
 *   1. Hero (two-column editorial — logo+identity left, showcase image right)
 *   2. Breadcrumb (inherited from breadcrumb template-part)
 *   3. Plans grid (reuses .chn-catalogue__grid + .chn-plan-card from catalogue.css)
 *   4. About rail (long bio in a paper-toned card with editorial pull-quote)
 *   5. Stats / credentials strip (mono numbers + small-caps labels)
 *   6. CTA band (navy — shared)
 *
 * Tokens: see tokens.css. No hex literals in this file.
 */

/* -------------------------------------------------------------------------
   Body chrome — hide any legacy WK Marketplace fragments + duplicate page
   title that the Seller page (1064) used to surface.
   ------------------------------------------------------------------------- */
body.chn-storefront .entry-title,
body.chn-storefront h1.page-title,
body.chn-storefront header.page-header,
body.chn-storefront .elementor-section .elementor-heading-title,
body.chn-storefront .wkmp_seller,
body.chn-storefront .seller_info,
body.chn-storefront #seller_review_section { display: none !important; }

/* Override the default Elementor full-width canvas so our hero can breathe
   inside its own container. Hello Elementor's #content wrapper has padding
   we don't want on a fully-bled hero.

   Iteration 2 fix: Hello Elementor clamps `body:not([class*=elementor-page-])
   .site-main` to `max-width:1140px; margin:0 auto`. The previous reset zeroed
   margin while leaving max-width:1140, which left main left-aligned at viewport
   x=0 — breaking the `100vw + -50vw` full-bleed math (it relies on parent
   being centered) and causing the cta-band content to clip off the left edge.
   The correct reset removes the clamp entirely so main spans the viewport and
   each section's own background (hero, stats, plans, about, cta) bleeds
   cleanly via the canonical 100vw trick. */
body.chn-storefront #content,
body.chn-storefront .chn-storefront-main {
	padding: 0;
	margin: 0;
	max-width: 100%;
	width: 100%;
}

/* Apply the canonical 100vw bleed to every storefront top-level section so
   each band's background fills the viewport while .chn-container keeps the
   content inside the 1280px gutter. Mirrors the pattern in components.css
   for .chn-section / .chn-page-hero / .chn-cta-band. */
body.chn-storefront .chn-storefront-main > .chn-storefront-hero,
body.chn-storefront .chn-storefront-main > .chn-storefront-plans,
body.chn-storefront .chn-storefront-main > .chn-storefront-about,
body.chn-storefront .chn-storefront-main > .chn-storefront-stats {
	width: 100vw;
	max-width: 100vw;
	position: relative;
	left: 50%;
	right: 50%;
	margin-left: -50vw;
	margin-right: -50vw;
	box-sizing: border-box;
}

/* -------------------------------------------------------------------------
   1. Hero
   ------------------------------------------------------------------------- */
.chn-storefront-hero {
	background: var(--chn-color-surface-alt);
	border-bottom: 1px solid var(--chn-color-primary);
	/* B4: ≥ 96px desktop hero padding — clamp scales for tablet + mobile. */
	padding-block: clamp(72px, 9vw, 112px);
	position: relative;
}
.chn-storefront-hero::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 2px;
	background: linear-gradient(90deg, var(--chn-color-primary) 0%, var(--chn-color-accent) 100%);
	opacity: .9;
}

.chn-storefront-hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
	gap: var(--chn-space-7);
	align-items: center;
}

.chn-storefront-hero__lead {
	display: flex;
	flex-direction: column;
	gap: var(--chn-space-5);
	min-width: 0;
}

.chn-storefront-hero__identity {
	display: flex;
	align-items: center;
	gap: var(--chn-space-5);
}

.chn-storefront-hero__logo {
	flex: 0 0 96px;
	width: 96px;
	height: 96px;
	background: var(--chn-color-surface);
	border: 1px solid var(--chn-color-border);
	border-radius: var(--chn-radius-md);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	box-shadow: var(--chn-shadow-card);
}
.chn-storefront-hero__logo img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	display: block;
	object-fit: contain;
}
.chn-storefront-hero__initials {
	font-family: var(--chn-font-serif);
	font-size: 32px;
	font-weight: 600;
	color: var(--chn-color-primary);
	letter-spacing: -.02em;
	font-variation-settings: "opsz" 48, "wght" 600;
}

.chn-storefront-hero__caption-block { min-width: 0; }
.chn-storefront-hero__caption {
	font-family: var(--chn-font-mono);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--chn-color-muted);
	margin: 0 0 6px;
	font-feature-settings: "tnum";
}
.chn-storefront-hero__name {
	font-family: var(--chn-font-serif);
	font-size: clamp(28px, 4vw, 48px);
	line-height: 1.05;
	letter-spacing: -.02em;
	font-variation-settings: "opsz" 96, "wght" 600;
	color: var(--chn-color-text);
	margin: 0 0 var(--chn-space-3);
}
.chn-storefront-hero__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--chn-space-3);
	margin: 0;
	font-size: 13px;
	color: var(--chn-color-muted);
}
.chn-storefront-hero__role {
	display: inline-flex;
	align-items: center;
	font-family: var(--chn-font-sans);
	font-weight: 700;
	font-size: 11px;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: #a33f00;
	background: rgba(243, 128, 45, .08);
	border: 1px solid rgba(243, 128, 45, .25);
	border-radius: 999px;
	padding: 4px 10px;
	line-height: 1;
}
.chn-storefront-hero__region {
	font-family: var(--chn-font-sans);
	font-size: 14px;
	color: var(--chn-color-text);
	font-weight: 500;
}
.chn-storefront-hero__code {
	font-family: var(--chn-font-mono);
	font-size: 12px;
	letter-spacing: .04em;
	color: var(--chn-color-muted);
	display: inline-flex;
	gap: 6px;
	align-items: baseline;
	font-feature-settings: "tnum";
}
.chn-storefront-hero__code-label {
	font-size: 10px;
	letter-spacing: .22em;
	text-transform: uppercase;
	font-weight: 700;
}
.chn-storefront-hero__code-value {
	color: var(--chn-color-primary);
	font-weight: 600;
}

.chn-storefront-hero__bio {
	font-family: var(--chn-font-sans);
	font-size: 16px;
	line-height: 1.65;
	color: var(--chn-color-text);
	margin: 0;
	max-width: 56ch;
}

.chn-storefront-hero__cta-row {
	display: flex;
	flex-wrap: wrap;
	gap: var(--chn-space-3);
	margin: 0;
}

.chn-storefront-hero__showcase {
	position: relative;
	border-radius: var(--chn-radius-md);
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background: var(--chn-color-surface);
	border: 1px solid var(--chn-color-border);
	box-shadow: 0 12px 36px -18px rgba(11, 59, 148, .35);
}
.chn-storefront-hero__showcase img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.chn-storefront-hero__showcase-caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	margin: 0;
	padding: var(--chn-space-3) var(--chn-space-4);
	background: linear-gradient(0deg, rgba(11, 59, 148, .72) 0%, rgba(11, 59, 148, 0) 100%);
	color: #fff;
	font-family: var(--chn-font-mono);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .22em;
	text-transform: uppercase;
	font-feature-settings: "tnum";
}

/* -------------------------------------------------------------------------
   Breadcrumb spacing — the shared part adds .chn-container; we just add
   vertical rhythm above the next section.
   ------------------------------------------------------------------------- */
body.chn-storefront .chn-breadcrumb {
	padding-top: var(--chn-space-5);
	padding-bottom: var(--chn-space-3);
}

/* -------------------------------------------------------------------------
   Shared section heads (used by Plans + About).
   ------------------------------------------------------------------------- */
.chn-storefront-section-head {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0 0 var(--chn-space-5);
	padding-bottom: var(--chn-space-3);
	border-bottom: 1px solid var(--chn-color-border);
}
.chn-storefront-section-head--inline {
	border-bottom: none;
	padding-bottom: 0;
	margin-bottom: var(--chn-space-4);
}
.chn-storefront-eyebrow {
	font-family: var(--chn-font-sans);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .26em;
	text-transform: uppercase;
	color: var(--chn-color-accent);
	margin: 0;
}
.chn-storefront-section-title {
	font-family: var(--chn-font-serif);
	font-size: clamp(24px, 3vw, 32px);
	line-height: 1.1;
	letter-spacing: -.015em;
	font-variation-settings: "opsz" 48, "wght" 600;
	color: var(--chn-color-text);
	margin: 0;
}
.chn-storefront-section-count {
	font-family: var(--chn-font-mono);
	font-size: 12px;
	color: var(--chn-color-muted);
	letter-spacing: .04em;
	margin: 0;
	font-feature-settings: "tnum";
}

/* -------------------------------------------------------------------------
   3. Plans grid — extends .chn-catalogue__grid so the cards match the
   catalogue exactly. Only override grid columns here.
   ------------------------------------------------------------------------- */
.chn-storefront-plans { padding: var(--chn-space-7) 0; }
.chn-storefront-plans__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--chn-space-4);
}
.chn-design-filters--storefront {
	display: grid;
	grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(120px, 1fr));
	gap: 12px;
	align-items: end;
	margin: 0 0 var(--chn-space-5);
	padding: 16px;
	background: var(--chn-color-surface-alt);
	border: 1px solid var(--chn-color-border);
	border-radius: var(--chn-radius-md);
}
.chn-design-filters--storefront label { display: grid; gap: 5px; margin: 0; }
.chn-design-filters--storefront label > span { color: var(--chn-color-muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.chn-design-filters--storefront .chn-design-filters__price-filter { grid-column: span 2; }
.chn-design-filters--storefront input,
.chn-design-filters--storefront select { width: 100%; min-height: 42px; margin: 0; padding: 9px 10px; background: var(--chn-color-surface); border: 1px solid var(--chn-color-border); border-radius: var(--chn-radius-sm); }
.chn-design-filters--storefront .chn-design-filters__actions { display: flex; align-items: center; gap: 12px; }
.chn-storefront-design-pagination { display: flex; justify-content: center; gap: 6px; margin: var(--chn-space-5) 0 0; }
.chn-storefront-design-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; min-height: 38px; padding: 6px 10px; border: 1px solid var(--chn-color-border); border-radius: var(--chn-radius-sm); text-decoration: none; }
.chn-storefront-design-pagination .current { background: var(--chn-color-primary); border-color: var(--chn-color-primary); color: #fff; }
@media (max-width: 1000px) {
	.chn-design-filters--storefront { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
	.chn-design-filters--storefront { grid-template-columns: minmax(0, 1fr); }
	.chn-design-filters--storefront .chn-design-filters__price-filter { grid-column: auto; }
}

/* -------------------------------------------------------------------------
   4. About rail — paper-toned card with editorial pull-quote feel.
   ------------------------------------------------------------------------- */
.chn-storefront-about {
	padding: 0 0 var(--chn-space-7);
}
.chn-storefront-about__rail {
	background: var(--chn-color-paper);
	border-left: 4px solid var(--chn-color-accent);
	border-radius: var(--chn-radius-md);
	padding: var(--chn-space-7) var(--chn-space-6);
	max-width: var(--chn-container-text);
	margin: 0 auto;
}
.chn-storefront-about__body {
	font-family: var(--chn-font-serif);
	font-size: 18px;
	line-height: 1.7;
	color: var(--chn-color-text);
	font-variation-settings: "opsz" 24, "wght" 400;
}
.chn-storefront-about__body p {
	margin: 0 0 var(--chn-space-4);
}
.chn-storefront-about__body p:last-child { margin-bottom: 0; }
.chn-storefront-about__body p:first-child::first-letter {
	font-family: var(--chn-font-serif);
	font-size: 3em;
	float: left;
	line-height: .85;
	margin: 6px var(--chn-space-3) 0 0;
	color: var(--chn-color-primary);
	font-variation-settings: "opsz" 144, "wght" 700;
}

/* -------------------------------------------------------------------------
   5. Stats / credentials strip
   ------------------------------------------------------------------------- */
.chn-storefront-stats {
	background: var(--chn-color-surface);
	border-top: 1px solid var(--chn-color-border);
	border-bottom: 1px solid var(--chn-color-border);
	padding: var(--chn-space-7) 0;
}
.chn-storefront-stats__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: var(--chn-space-5);
	margin: 0;
}
/* F-TPL-037: explicit 4-cell quad layout for the Phase 3 stats strip. */
.chn-storefront-stats__grid--quad {
	grid-template-columns: repeat(4, 1fr);
	gap: var(--chn-space-md, var(--chn-space-4));
}
.chn-storefront-stats__cell {
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--chn-space-2);
	border-top: 2px solid var(--chn-color-primary);
	padding-top: var(--chn-space-4);
}
.chn-storefront-stats__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: var(--chn-radius-sm, 6px);
	background: rgba(11, 59, 148, .06);
	color: var(--chn-color-primary);
}
.chn-storefront-stats__icon svg {
	width: 20px;
	height: 20px;
	stroke-width: 1.75;
}
.chn-storefront-stats__label {
	font-size: 10px;
	letter-spacing: .22em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--chn-color-muted);
	margin: 0;
}
.chn-storefront-stats__value {
	font-family: var(--chn-font-mono);
	font-size: clamp(22px, 2.5vw, 32px);
	color: var(--chn-color-text);
	margin: 0;
	font-feature-settings: "tnum";
	letter-spacing: -.01em;
	font-weight: 600;
	line-height: 1.1;
}
/* Certifications cell carries text instead of a number — drop the mono scale. */
.chn-storefront-stats__value--text {
	font-family: var(--chn-font-sans);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0;
}

/* -------------------------------------------------------------------------
   Plan-grid responsive columns inside the storefront.
   ------------------------------------------------------------------------- */
@media (max-width: 1280px) {
	.chn-storefront-hero__grid { gap: var(--chn-space-6); }
}
@media (max-width: 900px) {
	/* Hero padding handled by the clamp in the base rule; no override needed. */
	.chn-storefront-hero__grid {
		grid-template-columns: 1fr;
		gap: var(--chn-space-5);
	}
	.chn-storefront-hero__showcase {
		aspect-ratio: 16 / 10;
		order: 2;
	}
	.chn-storefront-hero__lead { order: 1; }
	.chn-storefront-plans__grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.chn-storefront-stats__grid--quad {
		grid-template-columns: repeat(2, 1fr);
	}
	.chn-storefront-about__rail {
		padding: var(--chn-space-6) var(--chn-space-5);
	}
}
@media (max-width: 560px) {
	/* Hero padding handled by the clamp in the base rule; no override needed. */
	.chn-storefront-hero__identity {
		flex-direction: column;
		align-items: flex-start;
		gap: var(--chn-space-3);
	}
	.chn-storefront-hero__logo {
		flex-basis: 72px;
		width: 72px;
		height: 72px;
	}
	.chn-storefront-hero__name {
		font-size: clamp(26px, 8vw, 34px);
	}
	.chn-storefront-hero__bio { font-size: 15px; }
	.chn-storefront-hero__cta-row { flex-direction: column; align-items: stretch; }
	.chn-storefront-hero__cta-row .chn-button { width: 100%; text-align: center; }
	.chn-storefront-plans__grid {
		grid-template-columns: 1fr;
		gap: var(--chn-space-3);
	}
	.chn-storefront-stats { padding: var(--chn-space-6) 0; }
	.chn-storefront-stats__grid,
	.chn-storefront-stats__grid--quad { grid-template-columns: repeat(2, 1fr); gap: var(--chn-space-4); }
	.chn-storefront-stats__value { font-size: 22px; }
	.chn-storefront-stats__value--text { font-size: 14px; }
	.chn-storefront-about__rail { padding: var(--chn-space-5) var(--chn-space-4); }
	.chn-storefront-about__body { font-size: 16px; }
	.chn-storefront-about__body p:first-child::first-letter { font-size: 2.4em; }
}

/* -------------------------------------------------------------------------
   H1 (2026-06-17): supplier-storefront product card
   -------------------------------------------------------------------------
   The supplier variant doesn't reuse the plan card template part (planning
   cards carry plan-specific metadata that suppliers don't have), so we
   render a slimmer image-first product card right here in the storefront
   stylesheet. The hosting grid is .chn-storefront-plans__grid so column /
   gap behaviour stays consistent with the architect storefront.
   ------------------------------------------------------------------------- */
.chn-storefront-supplier-card {
	display: flex;
	flex-direction: column;
	background: var(--chn-color-surface);
	border: 1px solid var(--chn-color-border);
	border-radius: var(--chn-radius-md);
	overflow: hidden;
	box-shadow: var(--chn-shadow-card);
	transition: transform .15s ease, box-shadow .15s ease;
}
.chn-storefront-supplier-card:hover,
.chn-storefront-supplier-card:focus-within {
	transform: translateY(-2px);
	box-shadow: 0 16px 36px -22px rgba(11, 59, 148, .45);
}
.chn-storefront-supplier-card__media {
	display: block;
	aspect-ratio: 4 / 3;
	background: var(--chn-color-surface-alt);
	overflow: hidden;
	position: relative;
}
.chn-storefront-supplier-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.chn-storefront-supplier-card__media-placeholder {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(135deg, rgba(11, 59, 148, .05), rgba(243, 128, 45, .05)),
		var(--chn-color-surface-alt);
}
.chn-storefront-supplier-card__body {
	padding: var(--chn-space-4) var(--chn-space-4) var(--chn-space-5);
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}
.chn-storefront-supplier-card__title {
	margin: 0;
	font-family: var(--chn-font-serif);
	font-size: 18px;
	line-height: 1.25;
	letter-spacing: -.01em;
	font-variation-settings: "opsz" 32, "wght" 600;
}
.chn-storefront-supplier-card__title a {
	color: var(--chn-color-text);
	text-decoration: none;
}
.chn-storefront-supplier-card__title a:hover,
.chn-storefront-supplier-card__title a:focus-visible {
	color: var(--chn-color-primary);
	text-decoration: underline;
}
.chn-storefront-supplier-card__price {
	margin: 0;
	font-family: var(--chn-font-mono);
	font-size: 14px;
	font-weight: 600;
	color: var(--chn-color-primary);
	font-feature-settings: "tnum";
}

/* H1 — supplier variant lives on the same main as the architect storefront
 * so the existing hero + about + stats CSS already applies. This selector
 * exists so future divergences (e.g. variant-specific hero accent) have a
 * place to land without forking storefront.css. */
body.chn-storefront .chn-storefront-main--supplier .chn-storefront-hero__role {
	color: var(--chn-color-primary);
	background: rgba(11, 59, 148, .08);
	border-color: rgba(11, 59, 148, .25);
}
