/*
 * catalogue.css — House plans archive layout + filter sidebar.
 * Brand tokens only.
 */

.chn-catalogue { background: var(--chn-color-surface); }

/* Hero overrides — give the catalogue hero more vertical weight, push the
   bottom scrim deeper so the breadcrumb has room to breathe, and tighten the
   eyebrow against the title for an editorial wordmark feel.
   B4 bespoke checklist: hero vertical padding ≥ 96px desktop. Clamp upper
   bounds lifted to 160/140 (matches B-page spec) and floor lifted to 80 so
   the hero never collapses below editorial weight. */
.chn-catalogue .chn-page-hero { padding: clamp(64px, 7vw, 104px) 0 clamp(56px, 6vw, 88px); }
.chn-catalogue .chn-page-hero--bg-image::before { background: linear-gradient(180deg, rgba(11, 59, 148, .58) 0%, rgba(11, 30, 60, .78) 100%); }
.chn-catalogue .chn-page-hero__eyebrow { color: var(--chn-color-accent); margin-bottom: 14px; }
.chn-catalogue .chn-page-hero__title { max-width: 18ch; }
.chn-catalogue .chn-page-hero__sub { max-width: 52ch; }

/* Breadcrumb sits flush under the hero on the global partial; give it air. */
.chn-catalogue > .chn-breadcrumb { padding-top: var(--chn-space-4); padding-bottom: var(--chn-space-2); }

/* B4 bespoke C4: the breadcrumb strip MUST use --chn-color-paper-shade for
 * the full-bleed band, matching Stage 0.5's global breadcrumb spec. F5's
 * earlier "transparent" override is retired — Stage 0.5 now owns the
 * appearance contract. We keep the catalogue-scoped padding tweak so the
 * strip retains the 8px breathing rhythm Kemar approved during F5, and we
 * still suppress borders (Stage 0.5 doesn't add any, but legacy chrome
 * sometimes injects one between hero + strip — belt-and-braces). */
.chn-catalogue .chn-breadcrumb-strip {
	border-top: 0;
	border-bottom: 0;
	padding-block: var(--chn-space-2);
}
.chn-catalogue .chn-page-hero + .chn-breadcrumb-strip { border-top: 0; }

.chn-catalogue__shell { padding: var(--chn-space-5) 0 var(--chn-space-7); }
.chn-catalogue__layout { display: grid; grid-template-columns: 280px 1fr; gap: var(--chn-space-6); align-items: start; }

/* Filter sidebar */
.chn-catalogue__filters { position: sticky; top: calc(var(--chn-space-5)); }
.chn-catalogue-filter-form { background: var(--chn-color-surface-alt); border: 1px solid var(--chn-color-border); border-radius: var(--chn-radius-md); padding: var(--chn-space-4); box-shadow: 0 12px 30px -28px rgba(11, 59, 148, .55); }
.chn-catalogue-filter-form label { display: grid; gap: 7px; margin: 0 0 var(--chn-space-4); }
.chn-catalogue-filter-form label > span { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--chn-color-muted); }
.chn-catalogue-filter-form input[type="search"],
.chn-catalogue-filter-form input[type="number"] { display: block; width: 100%; max-width: 100%; box-sizing: border-box; padding: 11px 12px; min-height: 44px; font-family: var(--chn-font-sans); font-size: 14px; border: 1px solid var(--chn-color-border); border-radius: var(--chn-radius-sm); background: var(--chn-color-surface); color: var(--chn-color-text); }
.chn-catalogue-filter-form input:focus { border-color: var(--chn-color-primary); outline: 3px solid rgba(11, 59, 148, .12); outline-offset: 0; }
.chn-catalogue-filter-form .chn-design-filters__actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: var(--chn-space-2); }
.chn-catalogue-filter-form .chn-design-filters__actions .chn-button { flex: 1; }
.chn-catalogue-filter-form .chn-design-filters__actions a { font-size: 12px; font-weight: 700; color: var(--chn-color-primary); }
.chn-catalogue-filter-form .chn-design-filters__custom-price-grid { grid-template-columns: minmax(0, 1fr); }
/* F-TPL-030: the form head no longer carries a duplicate <h2>Filters</h2>.
   The disclosure <summary> is the sole "Filters" label. The head row now
   only renders when the Reset link is present (active filters). */
.chn-catalogue-filter-form__head { display: flex; align-items: center; justify-content: flex-end; margin-bottom: var(--chn-space-4); padding-bottom: var(--chn-space-3); border-bottom: 1px solid var(--chn-color-border); }
.chn-catalogue-filter-form__head:empty { display: none; margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.chn-catalogue-filter-form__reset { font-size: 11px; color: var(--chn-color-primary); text-decoration: none; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.chn-catalogue-filter-form__reset:hover { color: var(--chn-color-primary-700); text-decoration: underline; }
.chn-catalogue-filter-form fieldset { border: 0; padding: 0; margin: 0 0 var(--chn-space-4); min-width: 0; }
.chn-catalogue-filter-form legend { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; font-weight: 700; color: var(--chn-color-muted); margin-bottom: 8px; padding: 0; }

/* F5 refinement — filter dropdowns previously inherited browser-default
 * `<select>` styling, which on Chromium adds a native chevron PLUS our
 * padding. The combined width pushed the select beyond the sidebar's inner
 * box on the 280px sidebar grid track. Fixes:
 *   - max-width: 100% + box-sizing so the control can never exceed its
 *     fieldset (the sidebar fieldset).
 *   - appearance: none to strip the native chevron, replaced with a
 *     CSS-rendered chevron at right: 12px center.
 *   - text-overflow: ellipsis on the select itself so long option labels
 *     (e.g. "Caribbean Vernacular") truncate gracefully instead of clipping. */
.chn-catalogue-filter-form select {
	display: block;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	padding: 11px 36px 11px 12px;
	min-height: 44px;
	font-family: var(--chn-font-sans);
	font-size: 14px;
	line-height: 1.2;
	border: 1px solid var(--chn-color-border);
	border-radius: var(--chn-radius-sm);
	background-color: var(--chn-color-surface);
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%230b3b94" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>');
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 14px;
	color: var(--chn-color-text);
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	text-overflow: ellipsis;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.chn-catalogue-filter-form select:hover { border-color: var(--chn-color-muted); }
.chn-catalogue-filter-form select:focus { border-color: var(--chn-color-primary); outline: 3px solid rgba(11, 59, 148, .12); outline-offset: 0; }
.chn-catalogue-filter-form__range { display: flex; align-items: center; gap: 8px; min-width: 0; }
.chn-catalogue-filter-form__range input { flex: 1 1 0; min-width: 0; width: 100%; box-sizing: border-box; padding: 11px 12px; min-height: 44px; font-family: var(--chn-font-sans); font-size: 14px; border: 1px solid var(--chn-color-border); border-radius: var(--chn-radius-sm); background: var(--chn-color-surface); color: var(--chn-color-text); }
.chn-catalogue-filter-form__range input:focus { border-color: var(--chn-color-primary); outline: 3px solid rgba(11, 59, 148, .12); outline-offset: 0; }
.chn-catalogue-filter-form__range span { color: var(--chn-color-muted); font-family: var(--chn-font-mono); font-size: 13px; flex: 0 0 auto; }
.chn-catalogue-filter-form__submit { width: 100%; margin-top: var(--chn-space-2); }

/* Sort control — F5 refinement: collapse to a compact right-aligned pill
 * instead of stretching to fill the archive-header__controls slot. The label
 * + select cluster never needs to be wider than ~240px on desktop, and the
 * `margin-left: auto` pushes it to the right edge of the results column. The
 * select itself ships an `appearance: none` reset matching the filter
 * sidebar so the two controls read as one family. */
.chn-catalogue-sort {
	display: inline-flex;
	align-items: center;
	gap: var(--chn-space-2);
	margin-left: auto;
	max-width: 280px;
}
.chn-catalogue-sort .chn-form-label { margin: 0; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; color: var(--chn-color-muted); flex: 0 0 auto; }
.chn-catalogue-sort select {
	box-sizing: border-box;
	padding: 10px 32px 10px 14px;
	min-height: 44px;
	font-family: var(--chn-font-sans);
	font-size: 13px;
	line-height: 1.2;
	border: 1px solid var(--chn-color-border);
	border-radius: 999px;
	background-color: var(--chn-color-surface);
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%230b3b94" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>');
	background-repeat: no-repeat;
	background-position: right 10px center;
	background-size: 12px;
	color: var(--chn-color-text);
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	cursor: pointer;
	max-width: 200px;
	text-overflow: ellipsis;
	transition: border-color .15s ease;
}
.chn-catalogue-sort select:hover { border-color: var(--chn-color-primary); }
.chn-catalogue-sort select:focus { border-color: var(--chn-color-primary); outline: 3px solid rgba(11, 59, 148, .12); outline-offset: 0; }

/* Results grid */
.chn-catalogue__results { min-width: 0; }
.chn-catalogue__results .chn-archive-header { padding-left: 0; padding-right: 0; max-width: none; }
.chn-catalogue__results .chn-archive-header__title { font-size: clamp(22px, 2.4vw, 30px); }
.chn-catalogue__results .chn-archive-header__count { font-feature-settings: "tnum"; font-family: var(--chn-font-mono); font-size: 12px; letter-spacing: .04em; }
/* F-CSS-100: lift grid -> pagination gap from space-6 (32px) to space-7
   (48px) so the house-plans grid and the page-numbers bar read as
   distinct rather than running together. */
.chn-catalogue__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--chn-space-4); margin-bottom: var(--chn-space-7); }
.chn-catalogue__grid .chn-plan-card { background: var(--chn-color-surface); border: 1px solid var(--chn-color-border); border-radius: var(--chn-radius-md); overflow: hidden; padding: 0; display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.chn-catalogue__grid .chn-plan-card:hover { transform: translateY(-2px); box-shadow: 0 6px 24px -10px rgba(11, 59, 148, .2); border-color: rgba(11, 59, 148, .18); }
.chn-catalogue__grid .chn-plan-card__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--chn-color-surface-alt); position: relative; }
.chn-catalogue__grid .chn-plan-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.chn-catalogue__grid .chn-plan-card:hover .chn-plan-card__media img { transform: scale(1.03); }
.chn-catalogue__grid .chn-plan-card__body { padding: var(--chn-space-3) var(--chn-space-4) var(--chn-space-4); display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; }
/* F5 refinement: the .chn-catalogue__grid scoped overrides used to
 * downgrade the design code pill to a muted-grey caption ("grey text on a
 * blue bg" — the badge sat over the navy-tinted media area). That selector
 * is intentionally removed; the components-level .chn-plan-card__code now
 * renders the design+architect pill with #fff ink on solid navy. */
.chn-catalogue__grid .chn-plan-card__title { font-family: var(--chn-font-serif); font-size: 18px; line-height: 1.2; margin: 0; font-variation-settings: "opsz" 24, "wght" 600; letter-spacing: -.01em; }
.chn-catalogue__grid .chn-plan-card__title a { color: var(--chn-color-text); text-decoration: none; }
.chn-catalogue__grid .chn-plan-card__title a:hover { color: var(--chn-color-primary); }
/* Spec grid layout is owned by components.css — do not redefine here.
 * Previously the catalogue scope re-declared `display: flex` which stomped
 * the 4-column grid + icon tiles from components.css. */
.chn-catalogue__grid .chn-plan-card__specs li { margin: 0; }
.chn-catalogue__grid .chn-plan-card__specs-sep { opacity: .55; }
.chn-catalogue__grid .chn-plan-card__price { font-family: var(--chn-font-mono); font-size: 14px; color: var(--chn-color-primary); margin: 6px 0 0; font-feature-settings: "tnum"; font-weight: 500; }
.chn-catalogue__grid .chn-plan-card__price .woocommerce-Price-amount { font-weight: 500; }
/* Bare .chn-mono utility — kept narrow so it does NOT bleed into
 * .chn-plan-card__code (the design+architect pill, also tagged
 * .chn-mono) or .chn-plan-card__spec-val (which needs ink-coloured
 * tabular numerals). */
.chn-catalogue__grid > p.chn-mono,
.chn-catalogue__grid > span.chn-mono { font-family: var(--chn-font-mono); font-size: 11px; color: var(--chn-color-muted); }

/* Desktop default: details element is used purely as a wrapper; the summary
   is hidden + the children render as if there was no disclosure. The mobile
   media query below restores the disclosure behavior. The details wrapper itself
   is transparent + zero-padded so the inner <form> owns the box appearance
   (background, border, padding). NOTE: do NOT reset `padding: 0` on the
   form here — that override would wipe the form's own
   `padding: var(--chn-space-4) var(--chn-space-5)` declared above, leaving
   labels and selects flush against the form border. */
.chn-catalogue__filters details.chn-catalogue__filter-disclosure { border: 0; background: transparent; padding: 0; }
.chn-catalogue__filters details.chn-catalogue__filter-disclosure > summary { display: none; }

/* Empty-state polish — keep tone aligned with archive header. */
.chn-catalogue__results .chn-empty-state { padding: var(--chn-space-6) var(--chn-space-5); border: 1px dashed var(--chn-color-border); border-radius: var(--chn-radius-md); background: var(--chn-color-surface-alt); text-align: center; }

/* Navy CTA band heading colour is now handled globally in components.css
 * (the `body .chn-cta-band--navy …` rules). No per-template override needed. */

/* Mobile responsive */
@media (max-width: 900px) {
	.chn-catalogue .chn-page-hero { padding: clamp(36px, 8vw, 56px) 0 clamp(32px, 7vw, 48px); }
	.chn-catalogue__shell { padding-top: var(--chn-space-4); }
	.chn-catalogue__layout { grid-template-columns: 1fr; gap: var(--chn-space-4); }
	.chn-catalogue__filters { position: static; }
	.chn-catalogue__grid { grid-template-columns: repeat(2, 1fr); }

	/* Filter form collapses to a disclosure on mobile so the plan grid is
	   reachable without scrolling past 6 select fields. */
	.chn-catalogue__filters .chn-catalogue-filter-form { padding: 0; border: 0; background: transparent; }
	.chn-catalogue__filters details.chn-catalogue__filter-disclosure { border: 1px solid var(--chn-color-border); border-radius: var(--chn-radius-md); background: var(--chn-color-surface-alt); }
	.chn-catalogue__filters details.chn-catalogue__filter-disclosure summary { list-style: none; cursor: pointer; padding: 16px 18px; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-family: var(--chn-font-sans); font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--chn-color-text); }
	.chn-catalogue__filters details.chn-catalogue__filter-disclosure summary::-webkit-details-marker { display: none; }
	/* F-TPL-030: Lucide chevron-down icon (rendered inline in markup) replaces
	   the previous "+/−" typographic pseudo-element. Rotates 180deg on [open]
	   for the standard disclosure idiom. */
	.chn-catalogue__filters .chn-catalogue__filter-disclosure-chevron { color: var(--chn-color-primary); transition: transform .2s ease; flex: 0 0 auto; }
	.chn-catalogue__filters details.chn-catalogue__filter-disclosure[open] .chn-catalogue__filter-disclosure-chevron { transform: rotate(180deg); }
	.chn-catalogue__filters details.chn-catalogue__filter-disclosure[open] summary { border-bottom: 1px solid var(--chn-color-border); }
	.chn-catalogue__filters details.chn-catalogue__filter-disclosure summary:focus-visible { outline: 3px solid rgba(11, 59, 148, .18); outline-offset: -2px; }
	.chn-catalogue__filters .chn-catalogue__filter-disclosure-label { display: inline-flex; align-items: center; gap: 8px; }
	.chn-catalogue__filters .chn-catalogue__filter-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--chn-color-accent); color: #fff; font-family: var(--chn-font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0; text-transform: none; }
	.chn-catalogue__filters details.chn-catalogue__filter-disclosure > *:not(summary) { padding: var(--chn-space-4) 18px 18px; }

	/* F-TPL-030 dropped the duplicate <h2>Filters</h2> from the form header.
	   The remaining .chn-catalogue-filter-form__head still renders the Reset
	   link when filters are active; it's left as a normal flex row. */
	.chn-catalogue__filters .chn-catalogue-filter-form__head { display: flex; align-items: center; justify-content: flex-end; }
	.chn-catalogue__filters .chn-catalogue-filter-form__head:empty { display: none; }

	/* Stack archive header (count + sort) on tablet/mobile. On mobile the
	 * sort pill stretches across the row but keeps the pill geometry — the
	 * select itself remains right-aligned, capped at 200px, so taps land on
	 * the control rather than the full row. */
	.chn-catalogue__results .chn-archive-header__head { row-gap: 8px; }
	.chn-catalogue__results .chn-archive-header__controls { margin-top: var(--chn-space-3); width: 100%; }
	.chn-catalogue-sort { width: 100%; max-width: 100%; justify-content: space-between; }
	.chn-catalogue-sort select { flex: 0 1 auto; }
}

@media (max-width: 560px) {
	.chn-catalogue__grid { grid-template-columns: 1fr; gap: var(--chn-space-3); }
	.chn-catalogue__grid .chn-plan-card__title { font-size: 17px; }
	.chn-catalogue .chn-page-hero__title { max-width: 100%; }
}

/* ============================================================
   /shop/ archive (WC native) — wrap WC's default loop with the
   editorial system. Selectors target WC's standard markup classes.
   ============================================================ */
body.woocommerce.archive {
	background: var(--chn-color-surface);
}

/* Hide the legacy mu-plugin intro banner (chn-shop-filter.php) — the CHN
   page-hero + breadcrumb above the loop already provide the editorial
   chrome; the inline banner duplicates the H1, breaks the token palette,
   and ships emoji glyphs. The mu-plugin's pre_get_posts product-type
   filter is preserved (it runs server-side, unaffected). */
.chn-shop-intro { display: none !important; }

/* Hide WC core's duplicate breadcrumb (rendered alongside our themed
   .chn-breadcrumb when WC plugins re-bind the action late). */
.woocommerce.archive nav.woocommerce-breadcrumb { display: none; }

/* Suppress WC's default loop/header.php H1 — the page-hero owns the H1. */
.woocommerce.archive .woocommerce-products-header { display: none; }

/* Constrain the WC archive INNER container (the WC loop + toolbar) to the
   CHN container width so toolbar + product grid line up with the hero and
   breadcrumb. We intentionally DO NOT clamp `main.site-main` here — F-CRIT-009
   relies on `<main class="site-main">` staying full-bleed so the hero and
   surface-alt bands can extend edge-to-edge. The hero/CTA band remain
   100vw; only the WC archive loop wrapper is container-bound. */
.woocommerce.archive #primary > .woocommerce,
.woocommerce.archive #primary > ul.products,
.woocommerce.archive #primary > .woocommerce-result-count,
.woocommerce.archive #primary > .woocommerce-ordering,
.woocommerce.archive #primary > .woocommerce-pagination,
.woocommerce.archive #primary > nav.woocommerce-pagination {
	max-width: var(--chn-container);
	margin-inline: auto;
	padding-inline: var(--chn-space-5);
}

/* Archive toolbar — result count (left) + ordering dropdown (right).
 *
 * B4-W3 fix: previously this used CSS floats. WooCommerce's
 * `.woocommerce-products-header` and the toolbar elements are siblings of
 * `ul.products`; in a CSS-grid loop the floats failed to clear cleanly and
 * the visual gap between toolbar and first product cell was unpredictable.
 * We promote the WC-emitted "header + result-count + ordering" trio into a
 * single flex row so the result count sits left, the orderby select sits
 * right, and the row is fully self-clearing.
 *
 * Implementation note: WooCommerce emits
 *   <header class="woocommerce-products-header"></header>
 *   <div class="woocommerce-notices-wrapper"></div>
 *   <p class="woocommerce-result-count">...</p>
 *   <form class="woocommerce-ordering">...</form>
 *   <ul class="products columns-N">...</ul>
 * — none of those are wrapped together by WC, so we can't make a flex parent
 * around them. Instead we keep result-count + ordering inline-block and use
 * a clearfix sibling pattern (the empty header acts as anchor; ::after on the
 * ordering element clears) — but the cleaner solution is to drop floats and
 * use inline-block alignment that grid below explicitly clears.
 */
.woocommerce.archive .woocommerce-products-header { display: none; }
.woocommerce.archive .woocommerce-notices-wrapper:empty { display: none; }

.woocommerce.archive .woocommerce-result-count {
	font-family: var(--chn-font-mono);
	font-size: 13px;
	color: var(--chn-color-muted);
	font-feature-settings: "tnum";
	margin: var(--chn-space-5) 0 var(--chn-space-4);
	line-height: 36px;
	float: left;
	clear: left;
}
.woocommerce.archive .woocommerce-ordering {
	margin: var(--chn-space-5) 0 var(--chn-space-4);
	float: right;
	clear: right;
}
.woocommerce.archive .woocommerce-ordering select {
	padding: 12px 32px 12px 14px;
	min-height: 44px;
	box-sizing: border-box;
	font-family: var(--chn-font-sans);
	font-size: 14px;
	line-height: 1.2;
	border: 1px solid var(--chn-color-border);
	border-radius: var(--chn-radius-sm);
	background: var(--chn-color-surface);
	color: var(--chn-color-text);
}
.woocommerce.archive .woocommerce-ordering select:focus {
	border-color: var(--chn-color-primary);
	outline: 3px solid rgba(11, 59, 148, .12);
	outline-offset: 0;
}

/* Product loop grid.
 *
 * B4-W3 fix #1: columns 3 → 4 to match the editorial rhythm of /house-plans/
 * and provider-directory (both 4 cards/row at 1440).
 *
 * B4-W3 fix #2: WC core injects `ul.products::before { content:" "; display:table }`
 * + `ul.products::after { content:" "; display:table; clear:both }` for legacy
 * float-based clearfix. In a CSS-grid context those pseudo-elements become
 * GRID ITEMS — they consume the first and last grid cells, which is why
 * iteration-1 showed the first product card pushed to column 2 of row 1
 * (the `::before` pseudo-element was eating cell 1). Override to
 * `display: none` so the pseudo-elements are removed from the grid flow.
 *
 * B4-W3 fix #3: the toolbar above (result-count + ordering) floats — we set
 * `clear: both` on the grid so the first product row starts cleanly below.
 */
.woocommerce.archive ul.products {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--chn-space-4);
	list-style: none;
	padding: 0;
	margin: 0 0 var(--chn-space-6);
	clear: both;
}
.woocommerce.archive ul.products::before,
.woocommerce.archive ul.products::after {
	display: none;
	content: none;
}
.woocommerce.archive ul.products li.product {
	background: var(--chn-color-surface);
	border: 1px solid var(--chn-color-border);
	border-radius: var(--chn-radius-md);
	overflow: hidden;
	padding: 0;
	margin: 0;
	width: auto !important;
	float: none !important;
	transition: transform .15s ease, box-shadow .15s ease;
	display: flex;
	flex-direction: column;
	position: relative;
}
.woocommerce.archive ul.products li.product:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 24px -10px rgba(11, 59, 148, .2);
}
.woocommerce.archive ul.products li.product a.woocommerce-LoopProduct-link {
	display: block;
	color: inherit;
	text-decoration: none;
}
.woocommerce.archive ul.products li.product img {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	display: block;
	margin: 0 !important;
}
.woocommerce.archive ul.products li.product .woocommerce-loop-product__title {
	padding: var(--chn-space-3) var(--chn-space-4) 0;
	font-family: var(--chn-font-serif);
	font-size: 17px;
	line-height: 1.25;
	font-variation-settings: "opsz" 24, "wght" 600;
	letter-spacing: -.005em;
	color: var(--chn-color-text);
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: calc(17px * 1.25 * 2);
	transition: color .15s ease;
}
.woocommerce.archive ul.products li.product a:hover .woocommerce-loop-product__title {
	color: var(--chn-color-primary);
}
.woocommerce.archive ul.products li.product .price {
	padding: 6px var(--chn-space-4) var(--chn-space-3);
	font-family: var(--chn-font-mono);
	font-size: 15px;
	font-weight: 500;
	color: var(--chn-color-primary);
	font-feature-settings: "tnum";
}
.woocommerce.archive ul.products li.product .price del { color: var(--chn-color-muted); font-weight: 400; margin-right: 6px; }
.woocommerce.archive ul.products li.product .price ins { background: transparent; font-weight: 700; text-decoration: none; }
.woocommerce.archive ul.products li.product .button {
	margin: auto var(--chn-space-4) var(--chn-space-4);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--chn-color-primary);
	color: #fff !important;
	padding: 13px 20px;
	min-height: 44px;
	box-sizing: border-box;
	border-radius: var(--chn-radius-sm);
	border: 0;
	font-family: var(--chn-font-sans);
	font-weight: 700;
	font-size: 12.5px;
	line-height: 1.2;
	letter-spacing: .04em;
	text-transform: uppercase;
	text-decoration: none;
	align-self: flex-start;
	transition: background .15s ease;
}
.woocommerce.archive ul.products li.product .button:hover { background: var(--chn-color-primary-700); }
.woocommerce.archive ul.products li.product .button:focus {
	outline: 3px solid rgba(11, 59, 148, .12);
	outline-offset: 0;
}
.woocommerce.archive ul.products li.product .button.added::after { content: ' DONE'; }
.woocommerce.archive ul.products li.product .added_to_cart { padding: 0 var(--chn-space-4) var(--chn-space-4); font-size: 12px; color: var(--chn-color-accent); font-weight: 600; }
.woocommerce.archive ul.products li.product .onsale {
	position: absolute;
	background: var(--chn-color-accent);
	color: #fff;
	font-family: var(--chn-font-sans);
	font-weight: 700;
	font-size: 10px;
	letter-spacing: .14em;
	text-transform: uppercase;
	padding: 4px 10px;
	border-radius: 2px;
	min-height: 0;
	min-width: 0;
	line-height: 1.4;
	right: var(--chn-space-3);
	top: var(--chn-space-3);
	left: auto;
	margin: 0;
	z-index: 2;
}

/* Pagination — WC default uses a different class than our pagination part */
.woocommerce.archive .woocommerce-pagination { padding: var(--chn-space-5) 0; }
.woocommerce.archive .woocommerce-pagination ul.page-numbers {
	display: flex;
	gap: var(--chn-space-2);
	justify-content: center;
	flex-wrap: wrap;
	list-style: none;
	padding: 0;
	margin: 0;
	border: 0;
}
.woocommerce.archive .woocommerce-pagination ul.page-numbers li {
	border: 0;
	margin: 0;
}
.woocommerce.archive .woocommerce-pagination ul.page-numbers li a,
.woocommerce.archive .woocommerce-pagination ul.page-numbers li span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 var(--chn-space-3);
	border: 1px solid var(--chn-color-border) !important;
	border-radius: var(--chn-radius-sm);
	color: var(--chn-color-text);
	font-family: var(--chn-font-mono);
	font-size: 13px;
	background: var(--chn-color-surface);
	text-decoration: none;
}
.woocommerce.archive .woocommerce-pagination ul.page-numbers li a:hover,
.woocommerce.archive .woocommerce-pagination ul.page-numbers li span.current {
	background: var(--chn-color-primary);
	color: #fff;
	border-color: var(--chn-color-primary) !important;
}

/* Mobile responsiveness for /shop/.
 * 1440 → 4 cols. 1024-1440 → 3 cols (intermediate, prevents card cramping).
 * <=900 → 2 cols. <=560 → 1 col. */
@media (max-width: 1200px) {
	.woocommerce.archive ul.products { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
	.woocommerce.archive ul.products { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
	.woocommerce.archive ul.products { grid-template-columns: 1fr; }
}

/* ============================================================
   /shop/ filter sidebar — search + category checkboxes + price.
   Reuses .chn-catalogue__filters + .chn-catalogue-filter-form
   chrome above; only adds the bits unique to /shop/ (search
   input, category checkbox list, category counts).
   ============================================================ */
.chn-shop-filter-form__field { border: 0; padding: 0; margin: 0 0 var(--chn-space-4); min-width: 0; }
.chn-shop-filter-form__field legend {
	font-size: 11px;
	letter-spacing: .22em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--chn-color-muted);
	margin-bottom: 8px;
	padding: 0;
}

/* Search input — full-width, matches .chn-catalogue-filter-form__range inputs */
.chn-shop-filter-form__input {
	width: 100%;
	box-sizing: border-box;
	padding: 11px 12px;
	min-height: 44px;
	font-family: var(--chn-font-sans);
	font-size: 14px;
	border: 1px solid var(--chn-color-border);
	border-radius: var(--chn-radius-sm);
	background: var(--chn-color-surface);
	color: var(--chn-color-text);
}
.chn-shop-filter-form__input::placeholder { color: var(--chn-color-muted); opacity: 1; }
.chn-shop-filter-form__input:hover { border-color: var(--chn-color-muted); }
.chn-shop-filter-form__input:focus {
	border-color: var(--chn-color-primary);
	outline: 3px solid rgba(11, 59, 148, .12);
	outline-offset: 0;
}

/* Category checkbox list — scrollable when category count exceeds the
   sticky-sidebar viewport so the rest of the filter stack stays reachable. */
.chn-shop-filter-form__cats {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
	max-height: 240px;
	overflow-y: auto;
	padding-right: 6px;
	scrollbar-width: thin;
}
.chn-shop-filter-form__cats::-webkit-scrollbar { width: 6px; }
.chn-shop-filter-form__cats::-webkit-scrollbar-thumb { background: var(--chn-color-border); border-radius: 3px; }

.chn-shop-filter-form__cat {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 4px;
	min-height: 36px;
	cursor: pointer;
	font-family: var(--chn-font-sans);
	font-size: 14px;
	color: var(--chn-color-text);
	border-radius: var(--chn-radius-sm);
	transition: background .12s ease;
}
.chn-shop-filter-form__cat:hover { background: rgba(11, 59, 148, .04); }
.chn-shop-filter-form__cat input[type="checkbox"] {
	width: 16px;
	height: 16px;
	flex: 0 0 auto;
	accent-color: var(--chn-color-primary);
	margin: 0;
	cursor: pointer;
}
.chn-shop-filter-form__cat input[type="checkbox"]:focus-visible {
	outline: 3px solid rgba(11, 59, 148, .18);
	outline-offset: 2px;
}
.chn-shop-filter-form__cat-name { flex: 1 1 auto; }
.chn-shop-filter-form__cat-count {
	font-family: var(--chn-font-mono);
	font-size: 12px;
	color: var(--chn-color-muted);
	font-feature-settings: "tnum";
	flex: 0 0 auto;
}
.chn-shop-filter-form__cat input[type="checkbox"]:checked ~ .chn-shop-filter-form__cat-name {
	font-weight: 600;
	color: var(--chn-color-primary);
}

.chn-shop-filter-form__radio {
	display: flex !important;
	grid-template-columns: none !important;
	align-items: center;
	gap: 10px !important;
	min-height: 34px;
	margin: 0 !important;
	padding: 5px 4px;
	border-radius: var(--chn-radius-sm);
	font-size: 14px;
	cursor: pointer;
}
.chn-shop-filter-form__radio:hover { background: rgba(11, 59, 148, .04); }
.chn-shop-filter-form__radio input {
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: var(--chn-color-primary);
}
.chn-shop-filter-form__context {
	display: grid;
	gap: 3px;
	margin: 0 0 var(--chn-space-4);
	padding: var(--chn-space-3);
	border-radius: var(--chn-radius-sm);
	background: rgba(11, 59, 148, .06);
	border-left: 3px solid var(--chn-color-primary);
	font-size: 13px;
	line-height: 1.35;
}
.chn-shop-filter-form__context > span {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--chn-color-muted);
}
.chn-shop-filter-form__context strong { color: var(--chn-color-text); }
.chn-shop-filter-form__context a {
	width: fit-content;
	margin-top: 4px;
	font-size: 12px;
	font-weight: 700;
	color: var(--chn-color-primary);
}

.chn-shop-active-filters {
	clear: both;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 var(--chn-space-4);
	padding-top: 2px;
}
.chn-shop-active-filters__label {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--chn-color-muted);
	margin-right: 2px;
}
.chn-shop-active-filters__chip {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-height: 32px;
	padding: 6px 10px;
	border: 1px solid rgba(11, 59, 148, .2);
	border-radius: 999px;
	background: rgba(11, 59, 148, .05);
	color: var(--chn-color-primary);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
}
.chn-shop-active-filters__chip:hover {
	border-color: var(--chn-color-primary);
	background: rgba(11, 59, 148, .09);
}
.chn-shop-active-filters__chip > span[aria-hidden="true"] {
	font-size: 17px;
	line-height: 1;
}

.woocommerce.archive ul.products li.product .chn-shop-card__category {
	display: block;
	padding: var(--chn-space-3) var(--chn-space-4) 0;
	font-family: var(--chn-font-sans);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .14em;
	line-height: 1.2;
	text-transform: uppercase;
	color: var(--chn-color-muted);
}
.woocommerce.archive ul.products li.product .chn-shop-card__category + .woocommerce-loop-product__title {
	padding-top: 6px;
}

/* /shop/ layout wrapper — the catalogue layout now hosts the WC loop, so the
   WC toolbar (result-count + ordering) and the product grid all live inside
   .chn-catalogue__results. Reflow the toolbar to sit as a tidy row above the
   grid (the earlier float layout was tuned for the loop being a direct child
   of #primary, which is no longer true now we wrap with .chn-catalogue__layout).
   The wrapper itself sits inside .chn-section__inner.chn-container, so it
   already gets the editorial container width — no extra clamp needed. */
.chn-catalogue__results .woocommerce-result-count,
.chn-catalogue__results .woocommerce-ordering {
	float: none;
	clear: none;
}
.chn-catalogue__results .woocommerce-result-count {
	display: block;
	margin: 0 0 var(--chn-space-3);
	font-family: var(--chn-font-mono);
	font-size: 13px;
	color: var(--chn-color-muted);
	font-feature-settings: "tnum";
}
.chn-catalogue__results .woocommerce-ordering {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 var(--chn-space-4);
	float: right;
}
.chn-catalogue__results .woocommerce-ordering::before {
	content: 'SORT BY';
	font-family: var(--chn-font-sans);
	font-weight: 700;
	font-size: 11px;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--chn-color-muted);
	flex: 0 0 auto;
}
/* Float the result count left so the toolbar row reads "count … sort". */
.chn-catalogue__results > .woocommerce-result-count { float: left; }
.chn-catalogue__results > ul.products { clear: both; }

/* The chn-catalogue__results column is the grid track now, so disable the
   global rule that constrained the WC native loop's direct children. */
.woocommerce.archive .chn-catalogue__results .woocommerce-result-count,
.woocommerce.archive .chn-catalogue__results .woocommerce-ordering,
.woocommerce.archive .chn-catalogue__results ul.products,
.woocommerce.archive .chn-catalogue__results .woocommerce-pagination,
.woocommerce.archive .chn-catalogue__results nav.woocommerce-pagination {
	max-width: none;
	padding-inline: 0;
}

/* When the loop sits next to a 280px sidebar, 4 columns at 1440 leaves only
   ~210px per card — too cramped for the image + title + price + CTA stack.
   Drop to 3 columns when the layout track is active. Selector includes
   `.woocommerce.archive` so it overrides the standalone-loop default above
   on specificity (0-3-1 vs 0-2-1). */
.woocommerce.archive .chn-catalogue__results ul.products { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1100px) {
	.woocommerce.archive .chn-catalogue__results ul.products { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
	.woocommerce.archive .chn-catalogue__results ul.products { grid-template-columns: 1fr; }
}

/* Mobile: keep the category checkbox list a touch shorter so the disclosure
   stays a compact tap-target. */
@media (max-width: 900px) {
	.chn-shop-filter-form__cats { max-height: 200px; }
	.chn-catalogue__results .woocommerce-ordering { float: none; width: 100%; }
	.chn-catalogue__results > .woocommerce-result-count { float: none; }
	.chn-catalogue__results .woocommerce-result-count { margin-bottom: var(--chn-space-2); }
	.chn-catalogue__results .woocommerce-ordering { margin-bottom: var(--chn-space-3); }
	.chn-catalogue__filters details.chn-catalogue__filter-disclosure:not([open]) {
		box-shadow: 0 10px 24px -24px rgba(11, 59, 148, .8);
	}
	.chn-shop-active-filters { margin-bottom: var(--chn-space-3); }
}
