/* =============================================================
   Shop — Catalog (Maison-styled, premium editorial).
   Self-contained. Uses official Poppins + Playfair fallback (serif).
============================================================= */

:root {
    --bg: #f7f1e7;
    --paper: #fdfaf2;
    --ink: #17120f;
    --ink-soft: #5a4f47;
    --rule: rgba(23, 18, 15, 0.14);
    --magenta: #EE00AA;
    --teal: #00AAAA;
    --radius: 4px;
    --sans: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    /* Shop DA — Poppins is the brand typeface. Use it for titles too. */
    --serif: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
    --max-w: 1240px;
    --gutter: clamp(20px, 4vw, 56px);
    --t-fast: 180ms cubic-bezier(.4, 0, .2, 1);
    --t-med: 320ms cubic-bezier(.22, 1, .36, 1);

    /* Sticky offset stack — computed at runtime by base.html JS.
       Includes the floating theme-bar (.hz-theme-bar) + main navbar (.cat-top)
       + a breathing gap, so any `position: sticky; top: var(--hz-sticky-top)`
       sits cleanly under both bars at any viewport / theme variant. */
    --hz-themebar-h: 42px;
    --hz-navbar-h: 76px;
    --hz-sticky-gap: 16px;
    --hz-sticky-top: calc(var(--hz-themebar-h) + var(--hz-navbar-h) + var(--hz-sticky-gap));
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    line-height: 1.55;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--magenta); }
img { display: block; max-width: 100%; height: auto; }
button { font-family: inherit; }

/* TOP --------------------------------------------------------- */

/* Optional promotional topbar rendered above .cat-top when the admin
   supplies `topbar.message` via personalization. Muted, unobtrusive. */
.cat-topbar {
    background: var(--ink);
    color: var(--paper);
    padding: 8px 16px;
    text-align: center;
    font-size: 13px;
    letter-spacing: 0.02em;
}
.cat-topbar__msg { margin: 0; }

.cat-top {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 12px var(--gutter);
    min-height: 88px;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: saturate(120%) blur(8px);
    -webkit-backdrop-filter: saturate(120%) blur(8px);
}
.cat-brand {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}
/* Header tagline next to the chili logo — row layout, vertically centered.
   We use !important on flex-direction to defeat any cached / conflicting rule
   (older deployments + Nginx static cache may serve stale CSS otherwise).
   `min-width: 0` lets the tagline truncate gracefully if the row is too tight. */
.cat-brand--with-tagline {
    flex-direction: row !important;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    text-decoration: none;
    min-width: 0;
    max-width: 100%;
}
.cat-brand--with-tagline .cat-brand-mark { flex: 0 0 auto; }
.cat-brand--with-tagline .cat-brand-tagline {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cat-brand-row {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
/* Header logo — nu, sans badge / cercle / bordure / fond. Le container ne
   sert plus qu'à réserver la boîte et centrer l'image ; toute décoration
   visuelle (bordure, radius, background) a été retirée pour un rendu
   premium type "vrai logo de marque" plutôt que macaron.
   Le logo est intentionnellement large — c'est le point d'ancrage visuel
   principal du header. */
.cat-brand-mark {
    width: auto;
    height: 68px;
    border-radius: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
.cat-brand-mark-chili {
    /* Aspect ratio preserved. Image fills the container height (wordmark
       baked into the asset — width is derived automatically). */
    width: auto;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}
/* Wordmark tagline sits BESIDE the logo (row layout) but stays visually
   secondary — smaller, mono, muted color. Auto-hides on ≤1280px to keep
   the top bar on a single line even with a long menu + search field. */
.cat-brand--with-tagline { gap: 12px; }
.cat-brand-tagline {
    font-size: 10px;
    letter-spacing: 0.14em;
    opacity: 0.68;
    white-space: nowrap;
}
@media (max-width: 1280px) {
    .cat-brand--with-tagline .cat-brand-tagline { display: none; }
}
.cat-brand-wordmark {
    height: 36px;
    width: auto;
    max-width: none;
    object-fit: contain;
    display: block;
}
.cat-brand-tagline {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink);
    line-height: 1.1;
    margin: 0;
    padding: 0;
    border: 0;
    max-width: none;
}
/* Header tagline (brand descriptor) must never wrap onto a second line
   and must gracefully disappear on very narrow screens so the logo/nav
   never compete for the same row. */
@media (max-width: 640px) {
    .cat-brand--with-tagline .cat-brand-tagline { display: none; }
}
/* Theme switch is hidden in production (Maison is forced). Code is preserved
   in themes.css + base.html so it can be re-enabled later. */
.hz-theme-bar[hidden] { display: none !important; }
/* Legacy classes kept for any leftover references — no longer used in templates */
.cat-brand-text { display: none; }

.cat-nav {
    display: inline-flex;
    gap: 2px;
    margin-left: auto;
}
.cat-nav a {
    padding: 7px 11px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ink-soft);
    border-radius: var(--radius);
    white-space: nowrap;
}
.cat-nav a:hover { background: var(--bg); color: var(--ink); }
.cat-nav a[aria-current="page"] {
    color: var(--magenta);
    background: var(--bg);
    box-shadow: inset 0 -2px 0 var(--magenta);
}

.cat-actions { display: inline-flex; gap: 8px; }
.cat-action {
    padding: 9px 16px;
    font-size: 13px;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    color: var(--ink);
    transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.cat-action--ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* MAIN -------------------------------------------------------- */
.cat-main {
    flex: 1;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: clamp(36px, 6vw, 72px) var(--gutter) clamp(48px, 8vw, 96px);
    width: 100%;
}
/* If the page starts with a hero (home), collapse the main top padding.
   Second selector: on Dropshipping fork the hero is hidden by default, so
   `.m-cats` (or any home-* enrichment section) becomes the first child. */
.cat-main:has(> .m-hero) { padding-top: clamp(12px, 2vw, 24px); padding-left: 0; padding-right: 0; max-width: none; }
.cat-main:has(> .m-cats:first-child),
.cat-main:has(> .m-newprods:first-child),
.cat-main:has(> .m-featprods:first-child) { padding-top: clamp(16px, 2.4vw, 28px); padding-left: 0; padding-right: 0; max-width: none; }

/* TYPOGRAPHY -------------------------------------------------- */
.cat-h1 {
    margin: 8px 0 18px;
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.02em;
}
.cat-h1 em { font-style: normal; color: var(--magenta); font-weight: 700; }
.cat-h2 {
    margin: 4px 0 16px;
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(28px, 3.4vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.015em;
}
.cat-h2 em { font-style: normal; font-weight: 700; }
.cat-kicker {
    display: inline-block;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: 8px;
}
.cat-lede { font-size: clamp(17px, 1.4vw, 20px); color: var(--ink-soft); max-width: 56ch; }
.cat-lede em, .cat-lede strong { color: var(--ink); font-weight: 600; }

/* STOREFRONT OVERLAY CLOUD ------------------------------------
   Shared visual primitive for copy superimposed on imagery.
   Keep the material treatment here as the single source of truth; consuming
   components only own placement, width and typography scale. */
.rc-overlay-cloud {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: fit-content;
    max-width: 100%;
    box-sizing: border-box;
    padding: 7px 9px;
    border: 1px solid rgba(255, 255, 255, .64);
    border-radius: 15px;
    background: rgba(255, 253, 249, .78);
    color: var(--ink, #17120f);
    -webkit-backdrop-filter: blur(10px) saturate(1.08);
    backdrop-filter: blur(10px) saturate(1.08);
    box-shadow: 0 5px 20px rgba(44, 34, 24, .10);
    text-shadow: none;
    -webkit-text-stroke: 0;
}
.rc-overlay-cloud--hero {
    gap: 6px;
    padding: 13px 15px;
    border-radius: 18px;
    max-width: min(620px, calc(100% - 32px));
}
.rc-overlay-cloud--compact {
    gap: 2px;
    padding: 8px 10px;
    border-radius: 13px;
}
.rc-overlay-cloud :is(h1, h2, h3, p, span, strong, em) {
    text-shadow: none;
    -webkit-text-stroke: 0;
}

/* HERO -------------------------------------------------------- */
.cat-hero {
    padding-bottom: clamp(20px, 3.2vw, 36px);
    border-bottom: 1px solid var(--rule);
    margin-bottom: clamp(24px, 3.5vw, 40px);
    /* Defensive resets so no min-width from a flex/grid ancestor can
       force the banner wider than its container. Applies to both the
       plain and .cat-hero--visual variants. */
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
}
/* Compact variant — used across every catalog-family page (list, category,
   featured/newest/bundle filters). Much smaller H1 + tighter vertical
   rhythm so the filter sidebar and product grid appear immediately below
   the fold on laptop viewports. */
.cat-hero--compact {
    padding-top: 4px;
    padding-bottom: clamp(10px, 1.6vw, 20px);
    margin-bottom: clamp(14px, 2vw, 24px);
}
/* Slim variant — even tighter than --compact. Applied to every catalog
   family page (list, category, featured/newest/bundle, search results,
   /categories index). Uses very small vertical spacing so the grid /
   sidebar shows up immediately below the intro block on laptops.
   Sub-elements (kicker, H1, lede, count) are packed tight. */
.cat-hero--slim {
    padding-top: 0;
    padding-bottom: clamp(20px, 2vw, 28px);
    margin-bottom: clamp(16px, 2vw, 24px);
    border-bottom: 1px solid var(--rule);
}
.cat-hero--slim .cat-kicker { margin-bottom: 2px; }
.cat-hero--slim .cat-h1--compact { margin: 2px 0 8px !important; }
.cat-hero--slim .cat-lede { margin: 6px 0 0; }
.cat-hero--slim .cat-lede--count { margin-top: 8px; font-size: 13px; opacity: .7; }
/* Breadcrumbs that sit directly above a --slim hero also get tighter
   vertical spacing (the default rhythm assumes a big banner underneath). */
.cat-crumbs + .cat-hero--slim { margin-top: 0; }
.cat-main > .cat-crumbs:first-child { margin-top: 0; padding-top: 4px; margin-bottom: 12px; }
.cat-h1--compact {
    font-size: clamp(30px, 3.6vw, 50px) !important;
    margin: 4px 0 8px !important;
    line-height: 1.05;
}
.cat-hero--compact .cat-kicker { margin-bottom: 2px; }
.cat-hero--compact .cat-lede { margin: 4px 0 0; }
.cat-hero--compact .cat-lede--count { margin-top: 6px; font-size: 14px; opacity: .72; }
@media (max-width: 640px) {
    .cat-h1--compact { font-size: clamp(26px, 7vw, 34px) !important; }
    .cat-hero--compact { padding-bottom: 10px; margin-bottom: 14px; }
    .cat-hero--slim { padding-bottom: 14px; margin-bottom: 14px; }
}
/* Hero-scoped vertical rhythm — denser than the global type rhythm so the
   product grid sits closer to the top on laptop/desktop. Fonts and visual
   hierarchy are untouched (only inner margins are compressed).
   Scoped to .cat-hero so /cart, /checkout, detail pages keep their rhythm. */
.cat-hero .cat-kicker { margin-bottom: 6px; }
.cat-hero .cat-h1 { margin: 6px 0 12px; }
.cat-hero .cat-lede { max-width: 52ch; }

/* WARN -------------------------------------------------------- */
.cat-warn {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #92400e;
    padding: 12px 18px;
    border-radius: var(--radius);
    font-size: 13.5px;
    margin-bottom: 32px;
}

/* EMPTY ------------------------------------------------------- */
.cat-empty {
    padding: 56px 24px;
    text-align: center;
    background: var(--paper);
    border: 1px dashed var(--rule);
    border-radius: var(--radius);
}
.cat-empty h2 { font-family: var(--serif); font-style: italic; font-weight: 600; margin: 0 0 12px; }
.cat-empty p { color: var(--ink-soft); }

/* GRID -------------------------------------------------------- */
.cat-grid {
    display: grid;
    /* auto-fill (vs auto-fit) keeps empty tracks → cards never stretch.
       Cap each track at 340px so a single card stays "medium" instead of huge. */
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 340px));
    gap: clamp(18px, 2.4vw, 32px);
    justify-content: center;
}
.cat-grid--related { margin-top: 24px; }
.cat-card {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    transition: transform var(--t-med), box-shadow var(--t-med);
    --card-accent: var(--magenta);
    display: flex;
    flex-direction: column;
}
.cat-card-cta {
    padding: 0 20px 18px;
    margin-top: -4px;
}
.cat-card-cta .qty-stepper-cta {
    background: var(--card-accent);
    color: var(--paper);
}
.cat-card-cta .qty-stepper-cta:hover {
    background: var(--ink);
}
.cat-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--card-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--t-med);
}
.cat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px -16px rgba(23, 18, 15, 0.25);
}
.cat-card:hover::before { transform: scaleX(1); }
.cat-card-link { display: flex; flex-direction: column; height: 100%; }
.cat-card-figure {
    margin: 0;
    aspect-ratio: 4 / 5;
    background: var(--bg);
    overflow: hidden;
    position: relative;
}
.cat-card-figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--t-med);
}
.cat-card:hover .cat-card-figure img { transform: scale(1.03); }
.cat-card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg), var(--paper));
}
.cat-card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cat-card-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}
.cat-card-cuisine {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-soft);
}
.cat-card-draft {
    font-family: var(--mono);
    font-size: 10px;
    background: #fef3c7;
    color: #92400e;
    padding: 2px 8px;
    border-radius: 999px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.cat-card-name {
    margin: 4px 0 0;
    font-family: var(--serif);
    font-style: italic;
    font-weight: 700;
    font-size: clamp(22px, 1.9vw, 28px);
    line-height: 1;
    letter-spacing: -0.01em;
}
.cat-card-sub {
    margin: 0;
    color: var(--ink-soft);
    font-size: 13px;
}
.cat-card-headline {
    margin: 4px 0 14px;
    font-size: 14px;
    line-height: 1.4;
    color: var(--ink);
}
.cat-card-foot {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--rule);
}
.cat-card-heat { display: inline-flex; gap: 3px; }
.cat-card-heat i {
    width: 8px; height: 8px; border-radius: 999px;
    background: rgba(23, 18, 15, 0.12);
    transition: background var(--t-fast);
}
.cat-card-heat i.is-on { background: var(--card-accent, var(--magenta)); }
.cat-card-price {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 17px;
}

/* DETAIL ------------------------------------------------------ */
.cat-detail { --product-accent: var(--magenta); }
/* Breadcrumbs — editorial, premium. Links carry a subtle interactive
   feedback (ink-soft → ink on hover, with a hairline underline that
   slides in). Current page is rendered slightly heavier to anchor reading.
   No bootstrap pills, no chevrons, no background — just type. */
.cat-crumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: 24px;
}
.cat-crumbs a {
    position: relative;
    color: var(--ink-soft);
    text-decoration: none;
    padding: 2px 0;
    transition: color var(--t-fast);
}
.cat-crumbs a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: var(--ink);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 260ms cubic-bezier(.22,1,.36,1);
}
.cat-crumbs a:hover {
    color: var(--ink);
}
.cat-crumbs a:hover::after {
    transform: scaleX(1);
}
.cat-crumbs a:focus-visible {
    outline: none;
    color: var(--ink);
}
.cat-crumbs a:focus-visible::after { transform: scaleX(1); }
.cat-crumbs > span:not([aria-current]) {
    /* chevron separator — slightly larger than text for clear "path" feel */
    color: var(--ink-soft);
    opacity: 0.55;
    font-size: 14px;
    line-height: 1;
    user-select: none;
}
.cat-crumbs > span[aria-current="page"] {
    color: var(--ink);
    font-weight: 700;
}
.cat-detail-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(28px, 4vw, 56px);
    align-items: start;
    margin-bottom: clamp(40px, 6vw, 80px);
}
@media (min-width: 820px) {
    .cat-detail-head { grid-template-columns: 1.05fr 1fr; }
}
.cat-detail-figure {
    margin: 0;
    aspect-ratio: 4 / 5;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
}
.cat-detail-figure::after {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: var(--product-accent);
}
.cat-detail-figure img { width: 100%; height: 100%; object-fit: cover; }
/* When using img-bg-fill macro inside the figure, let the macro handle layout */
.cat-detail-figure .img-bg-fill,
.cat-card-figure .img-bg-fill,
.cart-line-img .img-bg-fill {
    width: 100%;
    height: 100%;
}
.cat-detail-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg), var(--paper));
}
.cat-detail-info { padding: 8px 0; }
.cat-detail-headline {
    margin: 0 0 28px;
    font-size: clamp(18px, 1.4vw, 22px);
    line-height: 1.45;
    color: var(--ink-soft);
    max-width: 50ch;
}
.cat-detail-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    padding: 18px 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    margin-bottom: 24px;
}
.cat-detail-stats > div { display: flex; flex-direction: column; gap: 4px; }
.cat-detail-stats .cat-kicker { margin: 0; }
.cat-detail-stats > div > :last-child {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 18px;
}
.cat-detail-price { color: var(--product-accent); }
.cat-detail-actions { display: flex; gap: 10px; max-width: 380px; flex-wrap: wrap; }
.cat-detail-actions .qty-stepper-cta {
    background: var(--product-accent, var(--ink));
    color: var(--paper);
}
.cat-detail-actions .qty-stepper-cta:hover { background: var(--ink); }
.cat-detail-stock {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin: 2px 0 0;
    width: 100%;
}
.cat-btn {
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius);
    font-family: var(--sans);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background var(--t-fast), transform var(--t-fast), color var(--t-fast);
    display: inline-block;
    text-align: center;
    white-space: nowrap;
    max-width: 100%;
}
.cat-btn--ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--ink);
}
.cat-btn--ghost:hover { background: var(--ink); color: var(--paper); }
.cat-btn--primary {
    background: var(--ink);
    color: var(--paper);
    align-self: flex-start;
}
.cat-btn--primary:hover { background: var(--product-accent); transform: translateY(-1px); }
.cat-btn--secondary {
    background: transparent;
    color: var(--ink);
    border: 1.5px solid var(--ink);
    align-self: flex-start;
}
.cat-btn--secondary:hover {
    background: var(--ink);
    color: var(--paper);
    transform: translateY(-1px);
}
.cat-btn--disabled {
    background: var(--rule);
    color: var(--ink-soft);
    align-self: flex-start;
    cursor: not-allowed;
}
.cat-detail-soon { font-size: 13.5px; color: var(--ink-soft); margin: 4px 0 0; }
.cat-detail-soon a { color: var(--magenta); font-weight: 500; }

.cat-detail-story {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: clamp(28px, 3vw, 44px);
    margin-bottom: clamp(40px, 5vw, 64px);
    max-width: 720px;
}
.cat-detail-story p { font-family: var(--serif); font-size: clamp(17px, 1.4vw, 21px); line-height: 1.55; color: var(--ink); }

.cat-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(28px, 3vw, 44px);
    margin-bottom: clamp(40px, 5vw, 64px);
}
@media (min-width: 720px) {
    .cat-detail-grid { grid-template-columns: 1fr 1fr; }
}
.cat-detail-list ul { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 10px; }
.cat-detail-list li {
    padding: 12px 14px;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    font-size: 14.5px;
}
.cat-detail-pairings li {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.cat-detail-pairings strong { font-family: var(--serif); font-weight: 600; font-size: 16px; }
.cat-detail-pairings span { font-size: 13.5px; color: var(--ink-soft); }

.cat-detail-related {
    border-top: 1px solid var(--rule);
    padding-top: clamp(28px, 4vw, 48px);
}

/* MANIFESTO --------------------------------------------------- */
.cat-block {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: clamp(32px, 4vw, 56px);
    margin: clamp(48px, 6vw, 80px) 0 0;
}
.cat-block--manifesto { max-width: 760px; }
.cat-block p { font-family: var(--serif); font-size: clamp(17px, 1.3vw, 20px); color: var(--ink-soft); margin: 0; line-height: 1.55; }

/* FOOTER ------------------------------------------------------ */
/* Dark editorial footer approved from the storefront mock.
   Typography stays live: body/display families, weights and scale are read
   directly from Admin > Design tokens. */
.cat-foot {
    --footer-bg: #1c1a19;
    --footer-bg-deep: #181715;
    --footer-text: #efe5dc;
    --footer-text-soft: #c8beb5;
    --footer-rule: #756a61;
    --footer-accent: #c8aa8d;
    background:
        radial-gradient(circle at 50% -25%, rgba(255,255,255,.035), transparent 48%),
        linear-gradient(180deg, var(--footer-bg) 0%, var(--footer-bg-deep) 100%);
    color: var(--footer-text);
    padding: clamp(32px, 3.2vw, 44px) var(--gutter) clamp(18px, 1.8vw, 24px);
    margin-top: clamp(48px, 6vw, 96px);
    font-family: var(--design-font-body, var(--sans));
    font-weight: var(--design-weight-body, 400);
}
.cat-foot-grid {
    max-width: var(--max-w);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(230px, 1.25fr) repeat(3, minmax(150px, 1fr));
    gap: clamp(28px, 3.6vw, 56px);
    align-items: start;
    padding-bottom: clamp(24px, 2.6vw, 34px);
    border-bottom: 1px solid color-mix(in srgb, var(--footer-rule) 78%, transparent);
}
.cat-foot-brand__name {
    margin: 0;
    font-family: var(--design-font-display, var(--serif));
    font-size: calc(clamp(26px, 1.8vw, 34px) * var(--design-font-scale, 1));
    font-weight: var(--design-weight-display, 600);
    line-height: 1;
    letter-spacing: .06em;
    text-transform: none;
    color: var(--footer-text);
}
.cat-foot-brand__tagline {
    margin: 10px 0 0;
    max-width: 32ch;
    font-family: var(--design-font-display, var(--serif));
    font-size: calc(clamp(13px, .9vw, 16px) * var(--design-font-scale, 1));
    font-style: italic;
    font-weight: var(--design-weight-body, 400);
    line-height: 1.45;
    color: var(--footer-text-soft);
}
.cat-foot-brand__rule {
    display: block;
    width: 58px;
    height: 1px;
    margin: 18px 0 16px;
    background: var(--footer-accent);
    opacity: .88;
}
.cat-foot-brand__legal {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: calc(12px * var(--design-font-scale, 1));
    line-height: 1.35;
    letter-spacing: .06em;
    color: var(--footer-text-soft);
}
.cat-foot-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
    min-width: 0;
}
.cat-foot h4 {
    margin: 0 0 6px;
    font-family: var(--design-font-display, var(--serif));
    font-size: calc(clamp(20px, 1.35vw, 26px) * var(--design-font-scale, 1));
    font-weight: var(--design-weight-display, 600);
    line-height: 1.05;
    letter-spacing: -.015em;
    text-transform: none;
    color: var(--footer-text);
}
.cat-foot-nav a {
    position: relative;
    max-width: 100%;
    color: var(--footer-text-soft);
    font-size: calc(13px * var(--design-font-scale, 1));
    line-height: 1.45;
    text-decoration: none;
    transition: color .16s ease;
}
.cat-foot-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: -3px;
    height: 1px;
    background: var(--footer-accent);
    transition: right .16s ease;
}
.cat-foot-nav a:hover,
.cat-foot-nav a:focus-visible {
    color: var(--footer-text);
}
.cat-foot-nav a:hover::after,
.cat-foot-nav a:focus-visible::after {
    right: 0;
}
.cat-foot-nav a[data-footer-placeholder] {
    cursor: default;
}
.cat-foot-nav a[data-footer-placeholder]::after {
    display: none;
}
.cat-foot-bottom {
    max-width: var(--max-w);
    margin: 0 auto;
    padding-top: clamp(14px, 1.5vw, 20px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 24px;
    font-family: var(--design-font-body, var(--sans));
    font-size: calc(10.5px * var(--design-font-scale, 1));
    font-weight: var(--design-weight-body, 400);
    letter-spacing: .03em;
    color: var(--footer-text-soft);
}
.cat-foot-bottom .hz-signature--footer {
    font-family: var(--design-font-display, var(--serif));
    font-size: calc(11.5px * var(--design-font-scale, 1));
    font-style: italic;
    color: var(--footer-text-soft);
}

@media (max-width: 900px) {
    .cat-foot-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 36px 28px;
    }
    .cat-foot-brand {
        grid-column: 1 / -1;
    }
}
@media (max-width: 560px) {
    .cat-foot {
        padding: 30px 20px 18px;
    }
    .cat-foot-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 18px;
        padding-bottom: 24px;
    }
    .cat-foot-brand {
        grid-column: 1 / -1;
    }
    .cat-foot-brand__name {
        font-size: calc(24px * var(--design-font-scale, 1));
        letter-spacing: .05em;
    }
    .cat-foot h4 {
        font-size: calc(18px * var(--design-font-scale, 1));
    }
    .cat-foot-nav--info {
        grid-column: 1 / -1;
    }
    .cat-foot-bottom {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 720px) {
    .cat-top { gap: 12px; padding: 14px var(--gutter); flex-wrap: wrap; }
    .cat-nav { order: 3; flex-basis: 100%; overflow-x: auto; margin-left: 0; }
    .cat-detail-stats { grid-template-columns: 1fr 1fr; }
}

/* LEGAL ------------------------------------------------------- */
.legal { max-width: 760px; margin: 0 auto; }
.legal-head { margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--rule); }
.legal-updated {
    margin: 8px 0 0;
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
}
.legal-body h2 {
    margin: 36px 0 12px;
    font-family: var(--serif);
    font-weight: 600;
    font-size: 22px;
    letter-spacing: -0.005em;
}
.legal-body p { margin: 0 0 14px; line-height: 1.7; color: var(--ink); font-size: 15.5px; }
.legal-body ul { margin: 0 0 16px; padding-left: 22px; line-height: 1.7; }
.legal-body ul li { margin-bottom: 4px; }
.legal-body dl {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 2fr;
    gap: 10px 24px;
    margin: 0 0 24px;
    padding: 18px 22px;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
}
.legal-body dt {
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
    padding-top: 3px;
}
.legal-body dd { margin: 0; font-size: 14.5px; }
.legal-body code { font-family: var(--mono); background: var(--paper); padding: 2px 6px; border: 1px solid var(--rule); border-radius: 3px; font-size: 13px; }
.legal-body a { color: var(--magenta); }
@media (max-width: 640px) {
    .legal-body dl { grid-template-columns: 1fr; gap: 4px 0; }
    .legal-body dd { margin-bottom: 12px; }
}

/* CART -------------------------------------------------------- */
.cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    margin-top: 24px;
}
@media (min-width: 920px) {
    .cart-layout { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
}
.cart-lines { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cart-line {
    display: grid;
    grid-template-columns: 150px 1fr auto;
    gap: 22px;
    padding: 20px;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    --card-accent: var(--magenta);
    position: relative;
    align-items: center;
    min-width: 0;
    transition: border-color 200ms ease, box-shadow 200ms ease;
}
.cart-line:hover { border-color: rgba(23,18,15,0.18); box-shadow: 0 8px 24px -16px rgba(23,18,15,0.18); }
.cart-line-info, .cart-line-price { min-width: 0; }
.cart-line-info h2, .cart-line-info p { overflow-wrap: anywhere; word-break: break-word; }
.cart-line-img {
    display: block;
    width: 150px;
    height: 150px;
    border-radius: 12px;
    overflow: hidden;
}
.cart-line-img img { width: 100%; height: 100%; object-fit: contain; }
/* Let img_bg_fill handle ambiance (blurred product image as bg + clean
   bottle on top). Foreground stays `contain` so the bottle is whole. */
.cart-line-img .img-bg-fill__main { object-fit: contain !important; }
.cart-line-info h2 {
    margin: 0;
    font-family: var(--serif);
    font-style: italic;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.15;
}
.cart-line-info h2 a { color: inherit; text-decoration: none; }
.cart-line-info h2 a:hover { color: var(--magenta); }
.cart-line-info p { margin: 6px 0 14px; font-size: 13.5px; color: var(--ink-soft); font-style: italic; }
.cart-line-actions { display: flex; gap: 12px; align-items: center; }
.cart-qty {
    display: inline-flex;
    align-items: stretch;
    border: 1.5px solid var(--ink);
    border-radius: 999px;
    overflow: hidden;
    background: var(--paper);
}
.cart-qty button {
    width: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 17px;
    font-weight: 600;
    line-height: 1;
    color: var(--ink);
    transition: background var(--t-fast);
}
.cart-qty button:hover { background: rgba(23,18,15,0.06); }
.cart-qty span {
    min-width: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mono);
    font-weight: 700;
    font-size: 14px;
}
.cart-line-remove {
    background: transparent;
    border: none;
    color: var(--ink-soft);
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 180ms ease;
}
.cart-line-remove:hover { color: var(--magenta); }
.cart-line-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    min-width: 92px;
}
.cart-line-price .cat-kicker { font-size: 9.5px; letter-spacing: 0.14em; }
.cart-line-price strong {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 26px;
    color: var(--ink);
    line-height: 1;
    letter-spacing: -0.01em;
}
.cart-line-price small { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); }

@media (max-width: 560px) {
    .cart-line {
        grid-template-columns: 84px 1fr;
        gap: 14px;
        padding: 14px;
    }
    .cart-line-img { width: 84px; height: 84px; border-radius: 10px; }
    .cart-line-info h2 { font-size: 19px; }
    .cart-line-info p { font-size: 12px; margin: 4px 0 10px; }
    .cart-line-actions { gap: 8px; flex-wrap: wrap; }
    .cart-line-price {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: baseline;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 6px 12px;
        border-top: 1px dashed var(--rule);
        padding-top: 12px;
        min-width: 0;
    }
    .cart-line-price strong { font-size: 20px; }
}

.cart-summary {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 26px;
}
@media (min-width: 920px) {
    /* Sticky only on desktop (2-column layout). On mobile the layout
       is single-column, sticky is irrelevant and was creating an
       iOS stacking-context conflict with the mobile burger overlay. */
    .cart-summary { position: sticky; top: var(--hz-sticky-top); }
}
.cart-summary h2 { margin: 0 0 18px; font-size: 24px; }
.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14.5px;
    color: var(--ink-soft);
}
.cart-summary-row strong { color: var(--ink); font-weight: 600; }
.cart-summary-row--total {
    border-top: 1px solid var(--rule);
    margin-top: 10px;
    padding-top: 14px;
    font-family: var(--serif);
    font-size: 18px;
    color: var(--ink);
}
.cart-summary-row--total strong { font-size: 22px; }
.cart-summary-hint {
    margin: -2px 0 8px;
    padding: 10px 14px;
    background: var(--bg);
    border-radius: var(--radius);
    font-size: 12.5px;
    color: var(--ink-soft);
}
.cart-summary-hint strong { color: var(--magenta); }
.cart-checkout { margin-top: 18px; display: flex; flex-direction: column; gap: 18px; }

/* Form fields — shared by /cart legacy `.cart-checkout` and new /checkout `.checkout-form`.
   Premium Shop-tuned: comfortable height, paper bg, ink focus state (no UA blue halo),
   mono uppercase labels, custom select arrow. */
.cart-checkout label,
.checkout-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-family: var(--mono);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-soft);
}
.cart-checkout label > span,
.checkout-form label > span {
    color: var(--ink-soft);
}
.cart-checkout input,
.cart-checkout select,
.cart-checkout textarea,
.checkout-form input,
.checkout-form select,
.checkout-form textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    line-height: 1.3;
    transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
    -webkit-appearance: none;
    appearance: none;
}
.cart-checkout input::placeholder,
.checkout-form input::placeholder {
    color: var(--ink-soft);
    opacity: 0.7;
    font-style: italic;
}
.cart-checkout input:focus,
.cart-checkout select:focus,
.cart-checkout textarea:focus,
.checkout-form input:focus,
.checkout-form select:focus,
.checkout-form textarea:focus {
    outline: none;
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(23, 18, 15, 0.06);
}
/* Custom select chevron — ink-soft, replaces native UA caret. */
.cart-checkout select,
.checkout-form select {
    padding-right: 40px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%2317120f' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    cursor: pointer;
}
.cart-checkout .cat-btn { margin-top: 6px; align-self: stretch; }
.cart-checkout-secure { font-size: 11.5px; color: var(--ink-soft); text-align: center; margin: 4px 0 0; }
.cart-checkout-error { color: #b91c1c; font-size: 13px; min-height: 18px; margin: 4px 0 0; }

/* Fieldset groups — premium paper card look (matches the recap aside) */
.cart-fset {
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 22px 22px 20px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: var(--paper);
    min-width: 0;
}
.cart-fset legend {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink);
    padding: 0 10px;
    margin-left: -4px;
    background: var(--paper);
}
.cart-fset-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cart-fset-row:has(.cart-fset-third) { grid-template-columns: 1fr 2fr; }
@media (max-width: 480px) {
    .cart-fset-row,
    .cart-fset-row:has(.cart-fset-third) { grid-template-columns: 1fr; }
}

/* Custom checkbox — branded ink square, no UA blue. */
.cart-remember {
    display: flex !important;
    flex-direction: row !important;
    gap: 12px !important;
    align-items: center;
    font-family: var(--sans);
    font-size: 12.5px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: var(--ink-soft);
    background: var(--paper);
    border: 1px dashed var(--rule);
    padding: 14px 16px;
    border-radius: var(--radius);
    cursor: pointer;
}
.cart-remember input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    min-height: 18px;
    margin: 0;
    padding: 0;
    flex: 0 0 18px;
    background: var(--paper);
    border: 1.5px solid var(--rule);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    transition: border-color var(--t-fast), background var(--t-fast);
}
.cart-remember input[type="checkbox"]:hover { border-color: var(--ink-soft); }
.cart-remember input[type="checkbox"]:checked {
    background: var(--ink);
    border-color: var(--ink);
}
.cart-remember input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid var(--paper);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.cart-remember input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(23, 18, 15, 0.12);
}
.cart-remember span { flex: 1; line-height: 1.45; }

.cart-checkout-btn {
    font-size: 15.5px !important;
    padding: 16px 24px !important;
    width: 100%;
    margin-top: 4px !important;
}

/* Dev-only simulated payment button — visually distinct so no one confuses
   it with the real "Payer" button. Only rendered when both APP_ENV != production
   AND setting debug.fake_payment == true. */
.cart-checkout-btn--sim {
    background: repeating-linear-gradient(
        135deg,
        #fef08a 0 12px,
        #fde68a 12px 24px
    ) !important;
    color: #78350f !important;
    border: 2px dashed #b45309 !important;
    margin-top: 10px !important;
    font-weight: 600;
}
.cart-checkout-btn--sim:hover { filter: brightness(0.97); }
.cart-checkout-sim-tag {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.7;
    margin-left: 6px;
}
.cart-checkout-sim-hint {
    font-size: 12px;
    color: #78350f;
    background: #fffbeb;
    border-left: 3px solid #b45309;
    padding: 8px 10px;
    margin: 8px 0 0;
    line-height: 1.45;
    border-radius: 0 4px 4px 0;
}

/* CART — shipping zone radio cards (Shop DA: paper cards, ink hover,
   magenta accent when selected, "Gratuit" in olive when free.) */
.cart-shipping-options {
    margin: 16px 0 10px;
    padding: 0;
    border: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cart-shipping-options legend {
    margin: 0 0 8px;
    padding: 0;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-soft);
}
.cart-shipping-option {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color var(--t-fast), background var(--t-fast);
}
.cart-shipping-option:hover { border-color: var(--ink); }
.cart-shipping-option input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 1.5px solid var(--rule);
    border-radius: 50%;
    background: var(--paper);
    position: relative;
    cursor: pointer;
    transition: border-color var(--t-fast);
}
.cart-shipping-option input[type="radio"]:hover { border-color: var(--ink-soft); }
.cart-shipping-option input[type="radio"]:checked {
    border-color: var(--magenta);
}
.cart-shipping-option input[type="radio"]:checked::after {
    content: "";
    position: absolute;
    top: 50%; left: 50%;
    width: 9px; height: 9px;
    background: var(--magenta);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}
.cart-shipping-option.is-selected {
    border-color: var(--magenta);
    background: rgba(212, 18, 137, 0.04);
}
.cart-shipping-option__name {
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    letter-spacing: 0;
}
.cart-shipping-option.is-selected .cart-shipping-option__name {
    font-weight: 700;
}
.cart-shipping-option__price {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-soft);
    white-space: nowrap;
}
.cart-shipping-option__amount {
    color: var(--ink);
}
.cart-shipping-option__free {
    color: #5a6b3a;
    font-weight: 700;
    letter-spacing: 0.04em;
}
/* Promo when subtotal ≥ 70€: old price struck, "Offert" in olive next to it.
   Editorial e-commerce premium (Aesop / Sézane pattern), not an achievement. */
.cart-shipping-option__old {
    color: var(--ink-soft);
    opacity: 0.5;
    font-size: 12px;
    font-weight: 500;
    text-decoration: line-through;
}
.cart-shipping-option__offered {
    font-family: var(--mono);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5a6b3a;
}

/* Checkout recap — small zone label inline */
.checkout-recap-zone {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.02em;
    color: var(--ink-soft);
    margin-left: 4px;
}

/* CHECKOUT (transactional page) ------------------------------- */
.checkout-page { /* same wrapper as cart-page */ }
.checkout-back-link {
    margin: 6px 0 0;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--ink-soft);
}
.checkout-back-link a {
    color: var(--ink-soft);
    text-decoration: none;
    border-bottom: 1px dashed var(--rule);
    transition: color 180ms ease, border-color 180ms ease;
}
.checkout-back-link a:hover { color: var(--ink); border-color: var(--ink); }

.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    margin-top: 24px;
}
@media (min-width: 920px) {
    .checkout-layout { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
}
.checkout-main { min-width: 0; }
.checkout-form { display: flex; flex-direction: column; gap: 18px; }

.checkout-recap {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 26px;
}
@media (min-width: 920px) {
    .checkout-recap { position: sticky; top: var(--hz-sticky-top); }
}
.checkout-recap h2 { margin: 0 0 18px; font-size: 22px; }
.checkout-recap-totals {
    display: flex;
    flex-direction: column;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 18px;
}
/* Prominent total — primary focus of the compact recap. */
.checkout-recap-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.checkout-recap-total-label {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-soft);
}
.checkout-recap-total-value {
    font-family: var(--sans);
    font-weight: 700;
    font-size: 32px;
    line-height: 1.1;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}
.checkout-recap-debit-note {
    margin: 0;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.04em;
    color: var(--ink-soft);
    line-height: 1.5;
}
@media (max-width: 480px) {
    .checkout-recap-total-value { font-size: 26px; }
}

.cart-summary-hint-inline {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--ink-soft) !important;
    text-transform: none;
}


/* SUCCESS ----------------------------------------------------- */
.success { max-width: 680px; margin: 0 auto; }
.success-card {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 56px 40px;
    text-align: center;
}
.success-check {
    width: 88px;
    height: 88px;
    border-radius: 999px;
    background: color-mix(in oklab, #22c55e 18%, transparent);
    color: #22c55e;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #22c55e;
    animation: successPop 600ms cubic-bezier(.22, 1.6, .36, 1);
}
@keyframes successPop {
    from { transform: scale(0.4); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}
.success-card h1 { margin: 4px 0 8px; }
.success-meta {
    margin: 26px auto 12px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    text-align: left;
    max-width: 480px;
}
.success-meta > div {
    background: var(--bg);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 12px 14px;
}
.success-meta dt {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: 4px;
}
.success-meta dd { margin: 0; font-weight: 600; font-size: 14.5px; }
.success-actions { display: inline-flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; justify-content: center; }
.success-note { margin-top: 24px; font-size: 12.5px; color: var(--ink-soft); }
.success-note small { display: block; margin-top: 4px; font-style: italic; }

/* SUCCESS RECEIPT (state B — order ready) ---------------------- */
.success-card--ready { text-align: left; padding: 48px 44px; }
.success-card--ready .success-check { margin: 0 0 18px; }
.success-card--ready .cat-kicker { display: block; margin-bottom: 4px; }
.success-card--ready .cat-h1 { text-align: left; margin: 4px 0 14px; }
.success-card--ready .cat-lede { text-align: left; max-width: 56ch; }

.success-receipt {
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid var(--rule);
}
.success-receipt__head {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 24px;
    margin-bottom: 28px;
}
.success-receipt__head > div .cat-kicker { display: block; margin-bottom: 4px; }
.success-receipt__head > div strong {
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
}
.success-receipt__amount { grid-column: span 2; padding-top: 14px; border-top: 1px dashed var(--rule); }
.success-receipt__amount strong {
    font-family: var(--sans);
    font-size: 32px !important;
    font-weight: 700 !important;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}
.success-receipt__items {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    border-top: 1px solid var(--rule);
}
.success-receipt__items li {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: baseline;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--rule);
}
.success-receipt__name {
    font-family: var(--sans);
    font-size: 14.5px;
    font-weight: 600;
    color: var(--ink);
}
.success-receipt__qty {
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--ink-soft);
    letter-spacing: 0.06em;
}
.success-receipt__price {
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    font-size: 14px;
    color: var(--ink);
    font-weight: 600;
}
.success-receipt__totals {
    margin: 0 0 28px;
    padding: 0;
}
.success-receipt__totals > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 6px 0;
}
.success-receipt__totals dt {
    font-family: var(--sans);
    font-size: 14px;
    color: var(--ink);
}
.success-receipt__totals dt small {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--ink-soft);
    margin-left: 6px;
    letter-spacing: 0.02em;
}
.success-receipt__totals dd {
    margin: 0;
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    font-size: 14px;
    color: var(--ink);
}
.success-receipt__total-row {
    margin-top: 8px;
    padding-top: 14px !important;
    border-top: 2px solid var(--ink);
}
.success-receipt__total-row dt { font-weight: 700; font-size: 16px; }
.success-receipt__total-row dd { font-weight: 700; font-size: 18px; }

.success-receipt__shipping {
    padding: 18px 20px;
    background: var(--bg);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
}
.success-receipt__shipping p {
    margin: 6px 0 0;
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink);
}

@media (max-width: 559px) {
    .success-card--ready { padding: 32px 22px; }
    .success-receipt__head { grid-template-columns: 1fr; }
    .success-receipt__amount { grid-column: span 1; }
    .success-receipt__amount strong { font-size: 26px !important; }
}

/* Pending spinner (state A) */
.success-spinner {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 3px solid var(--rule);
    border-top-color: var(--magenta);
    margin: 0 auto 24px;
    animation: spin 900ms linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =============================================================
   Pack cards — small variant from /packs page
   ============================================================= */
.cat-card-pack-pill {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 4px 10px;
    background: rgba(23, 18, 15, 0.85);
    color: #FAF5EC;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    border-radius: 999px;
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 12px -4px rgba(0,0,0,0.2);
}
.cat-card--pack .cat-card-figure { position: relative; }
.cat-card-pack-meta {
    font-size: 11.5px;
    color: #6B5F58;
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-variant-numeric: tabular-nums;
}


/* =============================================================
   "Du moment" badge — shared on catalog cards + detail page
   Matches the landing .m-pick-badge aesthetic for visual continuity.
   ============================================================= */
.cat-card-figure { position: relative; }
.cat-detail-figure { position: relative; }

.cat-pill-moment {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    padding: 6px 12px;
    background: var(--paper, #FAF5EC);
    color: var(--ink, #17120F);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-radius: 999px;
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    box-shadow: 0 4px 14px -4px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--card-accent, var(--product-accent, var(--ink, #17120F)));
    pointer-events: none;
    white-space: nowrap;
}
.cat-pill-moment--pack {
    background: var(--ink, #17120F);
    color: var(--paper, #FAF5EC);
    border-color: var(--ink, #17120F);
}

/* Detail page: slightly bigger + offset to feel premium */
.cat-detail-figure .cat-pill-moment {
    top: 18px;
    left: 18px;
    padding: 8px 14px;
    font-size: 11px;
    letter-spacing: 0.14em;
}

@media (max-width: 559px) {
    .cat-pill-moment { top: 10px; left: 10px; padding: 5px 10px; font-size: 10px; }
    .cat-detail-figure .cat-pill-moment { top: 12px; left: 12px; padding: 6px 12px; font-size: 10.5px; }
}

/* =============================================================
   Mobile header — 1 row: [logo] [FR] [Panier] [Burger]
   Slide-in right panel for navigation.
============================================================= */
.cat-burger {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--rule);
    border-radius: 10px;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 180ms ease, background 180ms ease;
}
.cat-burger:hover { border-color: var(--ink); background: var(--paper); }
.cat-burger-line {
    display: block;
    width: 18px;
    height: 1.5px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 220ms cubic-bezier(.22,1,.36,1), opacity 220ms ease;
}
.cat-burger[aria-expanded="true"] .cat-burger-line:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.cat-burger[aria-expanded="true"] .cat-burger-line:nth-child(2) { opacity: 0; }
.cat-burger[aria-expanded="true"] .cat-burger-line:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Slide panel + overlay */
.cat-mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(23, 18, 15, 0.25);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 240ms ease;
    z-index: 90;
}
.cat-mobile-overlay.is-visible { opacity: 1; }
.cat-mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(82vw, 380px);
    background: var(--paper);
    border-left: 1px solid var(--rule);
    box-shadow: -18px 0 40px -22px rgba(23, 18, 15, 0.28);
    transform: translateX(100%);
    transition: transform 280ms cubic-bezier(.22,1,.36,1);
    z-index: 100;
    display: flex;
    flex-direction: column;
    visibility: hidden;
}
.cat-mobile-menu.is-open {
    transform: translateX(0);
    visibility: visible;
}
.cat-mobile-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 22px 16px;
    border-bottom: 1px solid var(--rule);
}
.cat-mobile-menu-title {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-soft);
}
.cat-mobile-menu-close {
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--rule);
    border-radius: 999px;
    font-size: 22px;
    line-height: 1;
    color: var(--ink);
    cursor: pointer;
    transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}
.cat-mobile-menu-close:hover {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--paper);
}
.cat-mobile-nav {
    display: flex;
    flex-direction: column;
    padding: 12px 6px 24px;
}
.cat-mobile-nav a {
    display: flex;
    align-items: center;
    padding: 16px 22px;
    font-family: var(--serif);
    font-style: italic;
    font-size: 22px;
    line-height: 1.1;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--rule);
    transition: color 180ms ease, padding-left 180ms ease;
}
.cat-mobile-nav a:last-child { border-bottom: 0; }
.cat-mobile-nav a:hover { color: var(--magenta); padding-left: 28px; }
.cat-mobile-nav a[aria-current="page"] {
    color: var(--magenta);
    font-weight: 600;
}

/* Mobile breakpoint: hide inline nav + brand tagline, show burger.
   MOBILE HEADER on 2 rows:
     row 1: logo (brand) + panier (actions) + burger
     row 2: search bar full width (permanent, no need to open the drawer)
*/
@media (max-width: 759px) {
    .cat-top {
        gap: 10px 12px;
        padding: 12px var(--gutter) 10px;
        flex-wrap: wrap;
        row-gap: 8px;
        min-height: 0;
        align-items: center;
    }
    .cat-brand { order: 1; }
    .cat-actions { order: 2; margin-left: auto; gap: 8px; align-items: center; flex: 0 0 auto; }
    /* Search wraps onto row 2 and spans the full width. Overrides the
       desktop-side max-width / flex-basis and the ≤720px hide rule from
       product-card-modern.css. */
    .cat-search {
        display: flex !important;
        order: 3;
        flex: 1 0 100%;
        max-width: 100%;
        min-width: 0;
        padding: 6px 8px 6px 14px;
    }
    .cat-search input[type="search"] { font-size: 15px; }
    .cat-search__submit { width: 34px; height: 34px; }
    /* Suggest dropdown must anchor to the full-width search bar. */
    .cat-suggest { left: 0; right: 0; width: auto; }
    .cat-brand-mark { width: auto; height: 64px; }
    .cat-brand-wordmark { height: 26px !important; width: auto !important; max-width: none !important; }
    .cat-brand-tagline { font-size: 9px; letter-spacing: 0.10em; }
    .cat-nav { display: none; }
    .cat-action { padding: 8px 12px; font-size: 13px; }
    .cat-actions .hz-lang-switch { display: none; }
    .cat-burger { display: inline-flex; }
}
@media (min-width: 760px) {
    .cat-burger { display: none !important; }
    .cat-mobile-menu, .cat-mobile-overlay { display: none !important; }
}
/* Très petits écrans (≤ 390px) : on rétrécit encore tagline + chili pour
   garantir que [chili + logo + Panier + burger] tient sur la ligne 1,
   la barre de recherche restant en pleine largeur sur la ligne 2. */
@media (max-width: 390px) {
    .cat-top { gap: 8px; padding: 10px var(--gutter) 8px; row-gap: 6px; }
    .cat-brand-mark { width: auto; height: 52px; }
    .cat-brand--with-tagline .cat-brand-tagline { font-size: 8px; letter-spacing: 0.10em; }
    .cat-action { padding: 6px 10px; font-size: 12px; }
    .cat-search { padding: 5px 6px 5px 12px; }
    .cat-search input[type="search"] { font-size: 14px; }
}

/* Mobile burger drawer — language section.
   Sits below .cat-mobile-nav, separated by a soft dashed rule. */
.cat-mobile-lang {
    margin-top: 8px;
    padding: 18px 22px 22px;
    border-top: 1px dashed var(--rule);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.cat-mobile-lang-label {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-soft);
}
.cat-mobile-lang-switch {
    display: inline-flex;
    gap: 6px;
}
.cat-mobile-lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    padding: 10px 14px;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--ink-soft);
    border: 1px solid var(--rule);
    border-radius: 999px;
    text-decoration: none;
    transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}
.cat-mobile-lang-btn:hover { border-color: var(--ink); color: var(--ink); }
.cat-mobile-lang-btn.is-active {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
}


/* =============================================================
   HERO — visual variant with text overlaid on image.
   Applied on /products and /packs only when a media slot is set.
   Falls back cleanly to the plain text hero when no image exists.
   Uses aspect-ratio for a compact, horizontal banner (roughly 16:7)
   that auto-crops via object-fit: cover.
============================================================= */
.cat-hero--visual {
    position: relative;
    isolation: isolate;
    border-bottom: 0;
    margin-bottom: clamp(14px, 2vw, 20px);
    border-radius: var(--radius, 8px);
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    /* Ultra-compact height: introduction visuelle, pas section dominante. */
    height: clamp(100px, 10vw, 140px);
    padding: 0;
    display: grid;
    grid-template-areas: "stack";
}
.cat-hero--visual > * { grid-area: stack; }
.cat-hero__media {
    margin: 0;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}
.cat-hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
/* The cloud now carries contrast. Keep only a very light image veil so the
   photo remains immersive instead of being globally darkened. */
.cat-hero__overlay {
    position: absolute;
    inset: 0;
    display: block;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        rgba(20, 20, 20, 0.10) 0%,
        rgba(20, 20, 20, 0.04) 42%,
        rgba(20, 20, 20, 0) 78%
    );
}
.cat-hero--visual .cat-hero__text {
    align-self: center;
    justify-self: start;
    width: fit-content;
    max-width: min(620px, 72%);
    min-width: 0;
    box-sizing: border-box;
    color: var(--ink, #17120f);
    z-index: 1;
    text-shadow: none;
    -webkit-text-stroke: 0;
}
.cat-hero--visual .cat-kicker {
    color: var(--ink-soft, #5a4f47);
    letter-spacing: 0.16em;
    background: transparent;
    padding: 0;
    border-radius: 0;
    text-shadow: none;
    -webkit-text-stroke: 0;
}
.cat-hero--visual .cat-h1 {
    color: var(--ink, #17120f);
    /* Reduced clamp to keep the banner compact. */
    font-size: clamp(20px, 2.8vw, 32px);
    line-height: 1.1;
    margin: 4px 0 6px;
    white-space: normal;
    overflow-wrap: anywhere;
    text-wrap: balance;
    max-width: 100%;
    min-width: 0;
}
/* Keep the accent word readable on the dark veil — magenta stays too
   dark for AA once shadowed, so bump it towards the paper tone. */
.cat-hero--visual .cat-h1 em {
    color: var(--ink, #17120f);
    font-style: normal;
    font-weight: 700;
}
.cat-hero--visual .cat-lede {
    color: var(--ink-soft, #5a4f47);
    max-width: 46ch;
    font-size: clamp(14px, 1.3vw, 17px);
    line-height: 1.5;
}
/* Very small screens (user request 2026-02): keep the text SUPERPOSED
   on the image — no split layout. A stronger bottom-anchored gradient
   is added to guarantee legibility over any photo. */
@media (max-width: 520px) {
    .cat-hero--visual {
        height: clamp(140px, 40vw, 200px);
    }
    /* Mobile keeps the same light veil; the cloud itself guarantees contrast. */
    .cat-hero__overlay {
        background: linear-gradient(
            180deg,
            rgba(20, 20, 20, 0.02) 0%,
            rgba(20, 20, 20, 0.05) 55%,
            rgba(20, 20, 20, 0.10) 100%
        );
    }
    .cat-hero--visual .cat-hero__text {
        align-self: end;
        max-width: 100%;
        padding: 16px 18px 20px;
    }
    .cat-hero--visual .cat-h1 { font-size: clamp(22px, 6vw, 30px); }
}

/* Extra-small phones (Galaxy S25 Ultra portrait, iPhone SE, narrow
   simulator). Guards against banner overflow / one-line title lock-in
   / min-widths larger than the viewport. */
@media (max-width: 420px) {
    .cat-hero--visual {
        height: clamp(240px, 66vw, 300px);
    }
    .cat-hero--visual .cat-hero__text {
        padding: 16px 14px 18px;
    }
    .cat-hero--visual .cat-h1 { font-size: clamp(21px, 6.5vw, 28px); }
    .cat-hero--visual .cat-lede { font-size: 13px; line-height: 1.45; }
}
@media (max-width: 360px) {
    .cat-hero--visual {
        height: clamp(240px, 70vw, 300px);
    }
    .cat-hero--visual .cat-hero__text { padding: 14px 12px 16px; }
    .cat-hero--visual .cat-h1 { font-size: clamp(20px, 7vw, 26px); }
}
