/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE-SYNC.CSS — fabricly mobile layer → jeanettemai (synced 2026-07-22)
   Source: fabricly-eu/child-theme/assets/{system.css 2.1.2, v2-extras.css 2.9.99}
   Contract: HANDOFF-FULL-THEME-2026-07-22.md §2 (tokens) + §4b (porting map).
   Load order: AFTER v2-extras.css — later rules deliberately override the
   older forked mobile blocks still inside jm's system.css / v2-extras.css.
   Companion report: tasks/mobile-sync-report.md (flags, skips, integration
   steps — READ IT before enqueueing; two rules ship disarmed on purpose).
   Rename contract applied: body.fabricly-v2→body.jm-v2 · #fabricly-cart-v2→
   #jm-cart-v2 · #fabricly-btt→#jm-btt · .fabricly-menu-count→.jm-menu-count ·
   .fab-* / fab_* / .fabricly-mc-find-match stay verbatim (JS contract).
   Tokens mapped by role: --coral*→--jm-yellow* · --teal*→--jm-pink* ·
   --shadow-teal→--jm-shadow-pink · fallback literals = jm token values.
   Breakpoints canonical: ≤639 phone / ≤899 tablet / ≥900 desktop (+992 nav).
   ═══════════════════════════════════════════════════════════════════════════ */


/* ═ PDP MOBILE (fabricly system.css L599-655, mobile pass 2026-06-12, synced 2026-07-22) ═
   Canonical breakpoints only: ≤899 tablet/phone, ≤639 phone.
   Fabricly consolidated the old !important PDP patch from v2-extras (~L884)
   into this section and DELETED the patch. jm's v2-extras.css still carries
   the old patch (≤767 block, ~L682-724: .pdp__main / .pdp__info / .plp__grid
   / .plp__facets lines) — those four !important lines must be pruned from
   jm v2-extras.css at integration or the old padding keeps winning.
   Tokens: --container-pad 16px (<900), --fs-h1 from tokens.css. */
@media (max-width: 899px) {
  /* PDP-1: breadcrumb gutter */
  .pdp__breadcrumb { padding: 14px var(--container-pad) 0; }
  /* PDP-2: single column, calmer gap + gutters */
  .pdp__main {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 18px var(--container-pad) 48px;
  }
  /* PDP-9: buy column unsticks once it stacks (+ Bug 7: no spans in 1-col) */
  .pdp__info { position: static; grid-row: auto; grid-column: auto; }
  /* PDP-4: stepper buttons 32px → 44px tap targets */
  .pdp__qty-steps button { width: 44px; height: 44px; }
  /* PDP-5: related strip gutters (40px top keeps the white band breathing) */
  .pdp__related { padding: 40px var(--container-pad) 60px; }
  .pdp__related-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  /* PDP-8: story stacks (kept at 899 — matches previous live behavior).
     NOTE jm: .pdp__story markup not rendered yet (PDP story = lane C) —
     dormant until the story block is ported. */
  .pdp__story {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 32px 20px;
    margin: 0 var(--container-pad) 40px;
  }
  .pdp__story-portrait { margin: 0 auto; }
  .pdp__story-h { font-size: 26px; }
}

@media (max-width: 639px) {
  /* PDP-3: quick-qty 4-col → 2-col, 44px min targets (dormant: jm PDP uses
     the jm-add-to-cart engine stepper, no .pdp__qty-options markup today) */
  .pdp__qty-options { grid-template-columns: 1fr 1fr; }
  .pdp__qty-opt { min-height: 44px; }
  /* PDP-11: headline + price scale down, price row may wrap */
  .pdp__h1 { font-size: var(--fs-h1); letter-spacing: 0; }
  .pdp__price { font-size: 28px; }
  .pdp__price-row { flex-wrap: wrap; row-gap: 4px; }
  /* PDP-12: washi tape hugs the corner instead of clipping */
  .pdp__hero-img::before { left: 24px; }
  /* PDP-15: CTA/fav text gets room on narrow phones */
  .pdp__cta { font-size: 15px; padding: 16px 12px; }
  .pdp__fav { padding: 12px 10px; }
  /* PDP-17: stock + trust boxes tighten */
  .pdp__stock { padding: 12px 14px; }
  .pdp__trust-row--ship { padding: 12px 14px; }
  .pdp__trust-grid { padding: 14px; }
  /* PDP-10: thumbs 4-col → 3-col (~104px each on a 375px phone) */
  .pdp__thumbs { grid-template-columns: repeat(3, 1fr); }
  /* Related heading scales with the type token */
  .pdp__related-h { font-size: var(--fs-h2); margin-bottom: 28px; }
}


/* ═ CART-STAGE PHONE FIX (fabricly system.css L2498-2504, Marc 2026-07-02, synced 2026-07-22) ═
   Cart page on phones: the 480px side panel overflowed the viewport, leaving
   the stage backdrop as a strip on the left. Full width.
   NOTE jm: no template renders .cart-stage today (design-mock layout jm's
   system.css also styles) — dormant, carried for section parity. */
@media (max-width: 899px) {
    .cart-stage .cart { width: 100% !important; }
    .cart-stage__bg, .cart-stage__hero-tease { display: none !important; }
}


/* ═ MOBILE DRAWER MENU RESPEC (fabricly v2-extras.css L563-608 partial, MOB-R3 FIX-2 first half, synced 2026-07-22) ═
   At ≤992 the mega menu hides and the nav falls back to the stock ul.sub-menu
   inside Shoptimizer's drawer. Restyle drawer items + count badges to the v2
   voice. MOB-R3 FIX-2 bumped 899 → 992 — the drawer exists up to Shoptimizer's
   992 switch point, so 900-992 was an unstyled gap. Submenu links re-specced
   (44px rows, dashed hairlines, theme ink).
   ADAPTED jm: fabricly scoped top-level items via its own menu slug
   (ul#menu-mobile-menue); jm's menu ID differs → ul[id^="menu-"] matches any
   wp_nav_menu id (VERIFY against jm's rendered drawer DOM — report flag).
   OMITTED: .fabricly-mobile-promo / .fabricly-mobile-deal (Nähpaket bundle
   promo card — bundles not ported to jm, NEW-3 open). */
@media (max-width: 992px) {
    body.jm-v2 .shoptimizer-mobile-menu ul[id^="menu-"] > li.menu-item > a {
        font-family: 'Nunito', sans-serif !important;
        font-weight: 800 !important;
        font-size: 16px !important;
        color: var(--text) !important;
        padding: 12px 0 !important;
    }
    body.jm-v2 .shoptimizer-mobile-menu ul.sub-menu li.menu-item > a {
        font-family: 'Poppins', sans-serif !important;
        font-weight: 500 !important;
        font-size: 14px !important;
        color: var(--text, #333E48) !important;
        padding: 12px 16px !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        border-bottom: 1px dashed var(--border, #ECEAE6) !important;
        background: transparent !important;
    }
    body.jm-v2 .shoptimizer-mobile-menu ul.sub-menu li.menu-item:last-child > a {
        border-bottom: none !important;
    }
    body.jm-v2 .shoptimizer-mobile-menu ul.sub-menu li.menu-item > a:hover {
        color: var(--jm-yellow-dark) !important;
    }
    /* Count badge — jm emits .jm-menu-count (functions.php L1630 + nav-builder
       L161); fabricly's class was .fabricly-menu-count. jm had NO styling for
       it anywhere before this rule. */
    body.jm-v2 .jm-menu-count {
        display: inline-block;
        background: var(--jm-yellow-light) !important;
        color: var(--jm-yellow-dark) !important;
        font-family: 'Nunito', sans-serif !important;
        font-weight: 700 !important;
        font-size: 11px !important;
        padding: 1px 8px !important;
        border-radius: 999px !important;
        margin-left: 6px;
        line-height: 1.4;
    }
}


/* ═ SB-UTIL STRIP ≤899 (fabricly v2-extras.css L701-711, synced 2026-07-22) ═
   jm's forked copy runs this at ≤767; fabricly canonicalized to ≤899.
   768-899 keeps the compact two-cell layout instead of the desktop 3-col. */
@media (max-width: 899px) {
    body.jm-v2 .sb-util--standalone {
        grid-template-columns: 1fr auto;
        padding: 8px 18px;
        font-size: 9px;
        gap: 8px;
    }
    body.jm-v2 .sb-util--standalone > span:nth-child(1) { text-align: left; }
    body.jm-v2 .sb-util--standalone > span:nth-child(2) { display: none; }
    body.jm-v2 .sb-util--standalone > span:nth-child(3) { text-align: right; }
}


/* ═ FAB-MBAR DELTAS (fabricly v2-extras.css L726-854, synced 2026-07-22) ═
   jm's v2-extras already carries the mbar base section (forked) — only the
   post-fork deltas ship here:
   · MOB-R2 FIX-3a — badge floats over the kurv anchor's tap area; let taps
     fall through to the <a> so the drawer toggle always fires.
   · GLB-9 — anchor badge to the icon centre (+2px = icon's top-right corner)
     instead of `right: calc(50% - 18px)` which assumed a fixed tab width.
     Robust at any tab count/viewport; multi-digit counts grow rightward.
   · Show breakpoint 767 → 899 + iPhone home-indicator safe-area (jm's own
     functions.php L1739 already expects the bar ≤899 + safe-area — this
     resolves that jm-side inconsistency). */
.fab-mbar__badge {
    pointer-events: none;           /* MOB-R2 FIX-3a */
    left: calc(50% + 2px);          /* GLB-9 */
    right: auto;                    /* neutralize jm's forked right-anchor */
}
@media (max-width: 899px) {
    .fab-mbar {
        display: flex;
        /* iPhone home indicator: lift the bar contents above the gesture area */
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
    }
    .fab-mbar-spacer { height: calc(76px + env(safe-area-inset-bottom)); }
}


/* ═ DRAWER-OPEN OVERLAY (fabricly v2-extras.css L1030-1038, synced 2026-07-22) ═
   While the cart drawer is open, drop the nav row out of its raised stacking
   (z-index:100) so the dim backdrop covers it too — otherwise the menu line
   stays bright and reads as "active/selected" over the overlay.
   (jm already hides .fab-mbar on drawer-open; #jm-btt hide + nav z-drop are
   the missing deltas. #fabricly-btt → #jm-btt per jm's rename.) */
body.jm-v2.drawer-open .shoptimizer-primary-navigation,
body.jm-v2.drawer-open .col-full-nav,
body.jm-v2.drawer-open #site-navigation { z-index: auto !important; }
body.jm-v2.drawer-open .fab-mbar,
body.jm-v2.drawer-open #jm-btt { display: none !important; }


/* ═ PLP GRID TABLET TIER (fabricly v2-extras.css L2053-2067, Phase-5 mobile delta, synced 2026-07-22) ═
   Mobile/tablet: 3-col grid 640-899 (2-col ≤639 in the PLP MOBILE block
   below), hide facets, gutters on the token. jm's forked Phase-5 block stops
   at ≤767 with a 2-col grid + 14px gutters — this later block wins the
   !important tie and extends the treatment to the canonical 899. */
@media (max-width: 899px) {
    body.jm-v2 .plp__grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 18px !important;
        padding: 0 var(--container-pad) 40px !important;
    }
    body.jm-v2 .plp__facets { display: none !important; }
    body.jm-v2 .plp__breadcrumb,
    body.jm-v2 .plp__toolbar,
    .plp__pagination,
    .plp__about { padding-left: var(--container-pad) !important; padding-right: var(--container-pad) !important; }
}


/* ═ CART PAGE v2 MOBILE — CART-1..4 + BTN-1 + MOB-R2 FIX-7 (fabricly v2-extras.css L5232-5341, synced 2026-07-22) ═
   jm's forked cart mobile block is the pre-pass ≤600 version (4-col line grid,
   no tape, no 44px steppers) — this ≤639 block overrides it wholesale (same
   specificity, later file) and extends coverage to 639.
   ADAPTED jm: #fabricly-cart-v2 → #jm-cart-v2 (jm's template id) · CART-4
   stepper selectors re-targeted to jm's real cart markup
   (.cart-line__qty.jm-cart-stepper / .jm-mc-stepper__*, cart-v2.php L178-183)
   — fabricly's .cart-line__qty-stepper.fabricly-cart-stepper does not exist
   in jm. .cart__camilla is jm's shipped class name (markup kept at fork). */
@media (max-width: 639px) {
    body.jm-v2.woocommerce-cart #jm-cart-v2.fab-v2-cart-page {
        padding: 16px var(--container-pad) 60px;
    }
    body.jm-v2.woocommerce-cart aside.cart > .cart__header {
        padding: 20px 20px 16px;
    }
    body.jm-v2.woocommerce-cart aside.cart > .cart__shipping {
        padding: 14px 20px;
    }
    body.jm-v2.woocommerce-cart aside.cart > .cart__items {
        padding: 4px 20px;
    }
    body.jm-v2.woocommerce-cart aside.cart > .cart__footer {
        padding: 18px 20px 22px;
    }
    body.jm-v2.woocommerce-cart aside.cart > .cart__camilla {
        margin: 10px 16px 14px;
    }
    /* CART-1 (softened in MOB-R2 FIX-7): drop the decorative Nº column at
       phone width — 3-col grid. Round 1 went too compact (56px image, 14px
       title, zero padding) — Marc: "too compact, not aligned to theme".
       Restore air: 64px image, 14px/12px line padding, 15px title. */
    body.jm-v2.woocommerce-cart .cart-line {
        grid-template-columns: 64px 1fr 24px;
        gap: 10px;
        padding: 14px 12px;
    }
    body.jm-v2.woocommerce-cart .cart-line__num {
        display: none;
    }
    body.jm-v2.woocommerce-cart .cart-line__img {
        width: 64px;
        height: 64px;
    }
    body.jm-v2.woocommerce-cart .cart-line__title {
        font-size: 15px;
        line-height: 1.35;
    }
    body.jm-v2.woocommerce-cart .cart-line__qty-row {
        flex-wrap: wrap;
        row-gap: 10px;
    }
    /* Length stepper (the cream pill) left, price right — keep the price
       right-aligned even when the row wraps on narrow phones. */
    body.jm-v2.woocommerce-cart .cart-line__price-stack {
        margin-left: auto;
    }
    /* MOB-R2 FIX-7 scrapbook touch: the cart card already carries the
       oc__receipt ruled-paper background — add the masking-tape accent
       (same fibre recipe as .shoptimizer-mini-cart-wrap::before — jm ships
       the identical rgba(255,207,99) tape there). aside.cart clips overflow,
       so open it up and keep the bottom radius on the white footer. */
    body.jm-v2.woocommerce-cart aside.cart {
        overflow: visible;
    }
    body.jm-v2.woocommerce-cart aside.cart > .cart__footer {
        border-radius: 0 0 14px 14px;
    }
    body.jm-v2.woocommerce-cart aside.cart::before {
        content: "";
        position: absolute;
        top: -9px;
        left: 26px;
        width: 96px;
        height: 22px;
        background:
            linear-gradient(90deg, transparent 0, rgba(255,255,255,0.35) 30%, transparent 60%),
            repeating-linear-gradient(90deg, rgba(255,255,255,0.18) 0 1px, transparent 1px 6px),
            rgba(255, 207, 99, 0.65);
        border: 1px dashed rgba(0, 0, 0, 0.18);
        transform: rotate(-2.5deg);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
        pointer-events: none;
        z-index: 5;
    }
    /* CART-4: 44px stepper tap targets (base is 26px w/ jm's own stepper
       section → match it). Selectors = jm cart markup, see banner. */
    body.jm-v2.woocommerce-cart .cart-line__qty.jm-cart-stepper .jm-mc-stepper__btn {
        width: 44px !important;
        height: 44px !important;
    }
    body.jm-v2.woocommerce-cart .cart-line__qty.jm-cart-stepper .jm-mc-stepper__val {
        min-width: 50px !important;
        padding: 0 6px !important;
    }
    /* CART-2: coupon form stacks — full-width input + 44px button. */
    body.jm-v2.woocommerce-cart .cart__coupon-form {
        flex-direction: column;
        align-items: stretch;
    }
    body.jm-v2.woocommerce-cart .cart__coupon-input {
        width: 100%;
    }
    body.jm-v2.woocommerce-cart .cart__coupon-btn {
        width: 100%;
        min-height: 44px;
        padding: 12px 18px;
    }
    /* BTN-1: explicit 48px CTA (tokens.css f-btn-primary mobile rule backs this up). */
    body.jm-v2.woocommerce-cart .cart__cta {
        min-height: 48px;
    }
    body.jm-v2.woocommerce-cart aside.cart > .cart__header .cart__title {
        font-size: 22px;
    }
    body.jm-v2.woocommerce-cart .cart__totals-row--total {
        font-size: 20px;
    }
}


/* ═ AUTH — MOB-R2 FIX-4 DELTA (fabricly v2-extras.css L6785-6789, synced 2026-07-22) ═
   Gradient stays as fallback — a real photo can arrive via inline style on
   the polaroid (fabricly: auth-v2.php). jm has the auth CSS section but no
   auth-v2 template yet (handoff §5 "Auth: verify") — dormant prep; photo
   must be jm's own imagery, never fabricly's (handoff §8.5). */
body.fab-auth .auth__ed-polaroid-img {
    background-size: cover;
    background-position: center;
}


/* ═ PLP PILLBAR (fabricly v2-extras.css L9466-9828, synced 2026-07-22) ═
   Single filter UX across mobile + desktop. These styles apply at all
   breakpoints. Mobile-specific overrides (sticky positioning, tighter
   chrome) are in the ≤899 block after this region. The pillbar is the only
   filter surface on fabricly v2 PLPs — the legacy desktop rail
   (.plp__facets) and toolbar (.plp__toolbar) are hidden below.
   ⚠ jm STATUS: the pillbar MARKUP does not exist in jm yet (fabricly renders
   it from template-parts/v2-plp-facets-accordion.php — not ported; jm PLP
   currently uses .jm-facets chips + the .plp__mfilters slide-up drawer).
   All pillbar styling below is DORMANT until that template + JS port lands.
   The two retirement rules that would kill jm's live drawer UI ship
   DISARMED (commented) — see report, review item #1. */

    /* The legacy desktop rail and toolbar are superseded by the pillbar.
       (Dormant in jm: archive-product-v2.php renders neither.) */
    body.jm-v2 .plp__facets { display: none !important; }
    body.jm-v2 .plp__toolbar { display: none !important; }
    body.jm-v2 .plp__chip--active { display: none !important; }
    body.jm-v2 .plp__chip--clear { display: none !important; }

    /* ⚠ DISARMED — drawer retirement. Fabricly hides its old filter trigger +
       slide-up drawer once the pillbar owns filtering. jm's LIVE mobile filter
       UI is exactly this drawer (.plp__mfilters + .plp__mfilters-trigger in
       archive-product-v2.php) — activating these lines before the pillbar
       markup + JS are ported would leave jm's PLP with no working filter UI.
       Uncomment BOTH lines in the same deploy that ports
       v2-plp-facets-accordion.php (+ pillbar JS) to jm:
    .plp__mfilters-trigger { display: none !important; }
    .plp__mfilters { display: none !important; }
       (fabricly's trigger class was .plp__chip--filter-trigger; jm's rendered
       trigger is .plp__mfilters-trigger — selector adapted accordingly.) */

    /* ───────── Pillbar as a polaroid card ─────────
       White paper card sitting on the cream page, gold masking-tape strip at
       the top, handwritten eyebrow, then a centered wrap row of filter pills
       + sort pill. Matches the .sb-polaroid recipe so it reads as part of
       the scrapbook system, not a generic UI bar. */
    .plp__pillbar { display: block !important; }
    body.jm-v2 .plp__pillbar {
        position: relative;
        margin: 28px 80px 32px;
        padding: 28px 32px 22px;
        background: #fff;
        border-radius: 4px;
        box-shadow:
            0 12px 32px rgba(40, 30, 30, 0.10),
            0 3px 8px rgba(40, 30, 30, 0.05);
        font-family: 'Nunito', sans-serif;
    }
    /* Masking-tape strip at the top centre. Fabricly used the amber gold
       rgba(232,168,56,.55) — amber was purged from jm 2026-07-02 (tokens.css
       --gold note) → peach ramp rgba(226,138,87) at the same alpha. Flagged
       in the report (tape-family consistency vs jm's rgba(255,207,99) tapes
       is Marc's call, ties into NEW-1). */
    body.jm-v2 .plp__pillbar-tape {
        position: absolute;
        top: -10px;
        left: 50%;
        width: 96px;
        height: 20px;
        transform: translateX(-50%) rotate(-2.5deg);
        background:
            linear-gradient(90deg, transparent 0, rgba(255,255,255,0.35) 30%, transparent 60%),
            repeating-linear-gradient(90deg, rgba(255,255,255,0.18) 0 1px, transparent 1px 6px),
            rgba(226, 138, 87, 0.55);
        border: 1px dashed rgba(0, 0, 0, 0.18);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
        pointer-events: none;
        z-index: 1;
    }
    /* Handwritten eyebrow above the pill row (Caveat is kept in jm for
       scrapbook primitives — handoff §2; hidden on mobile anyway). */
    body.jm-v2 .plp__pillbar-eyebrow {
        margin: 0 0 14px;
        text-align: center;
        font-family: 'Caveat', cursive;
        font-size: 20px;
        font-weight: 600;
        line-height: 1;
        color: var(--jm-pink-dark, #C75B80);
        transform: rotate(-1deg);
    }
    body.jm-v2 .plp__pillbar-row {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        align-items: center;
        justify-content: center;
    }

    /* Pill = confident shop chip. White card surface, Nunito 700, no
       decoration. The state IS the design language:
         · idle      → white card, dark text, hairline border
         · has-value → pink fill, white text, pink shadow (this filter is set)
         · expanded  → peach fill, white text, peach shadow (you're editing) */
    body.jm-v2 .plp__pill {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 10px 14px;
        background: #fff;
        border: 1px solid rgba(40, 30, 30, 0.12);
        border-radius: 999px;
        font-family: 'Nunito', sans-serif;
        font-weight: 700;
        font-size: 13px;
        letter-spacing: 0.01em;
        line-height: 1;
        color: var(--text, #333E48);
        text-decoration: none;
        cursor: pointer;
        box-shadow:
            0 2px 5px rgba(40, 30, 30, 0.05),
            0 1px 2px rgba(40, 30, 30, 0.04);
        transition: background 160ms ease-out, color 160ms ease-out, box-shadow 160ms ease-out, transform 160ms ease-out, border-color 160ms ease-out;
        -webkit-tap-highlight-color: rgba(226, 114, 151, 0.12);
    }

    body.jm-v2 .plp__pill:hover,
    body.jm-v2 .plp__pill:focus-visible {
        outline: none;
        transform: translateY(-1px);
        border-color: rgba(244, 169, 127, 0.5);
        box-shadow:
            0 4px 10px rgba(40, 30, 30, 0.08),
            0 1px 3px rgba(40, 30, 30, 0.06);
    }
    body.jm-v2 .plp__pill.has-value {
        background: var(--jm-pink, #E27297);
        border-color: var(--jm-pink, #E27297);
        color: #fff;
        box-shadow:
            0 4px 12px rgba(226, 114, 151, 0.28),
            0 1px 3px rgba(40, 30, 30, 0.08);
    }
    body.jm-v2 .plp__pill[aria-expanded="true"] {
        background: var(--jm-yellow, #C75B80);
        border-color: var(--jm-yellow, #C75B80);
        color: #fff;
        transform: translateY(-1px);
        box-shadow:
            0 5px 14px rgba(244, 169, 127, 0.32),
            0 1px 3px rgba(40, 30, 30, 0.08);
    }

    body.jm-v2 .plp__pill-label {
        font-weight: 700;
        letter-spacing: inherit;
    }
    body.jm-v2 .plp__pill-value {
        font-weight: 700;
        font-size: 12px;
        letter-spacing: 0;
        max-width: 90px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        opacity: 0.95;
    }
    /* Caret = very subtle on idle, full opacity on active states so it reads
       as "this is currently the open one" without competing for attention. */
    body.jm-v2 .plp__pill-caret {
        font-size: 8px;
        margin-left: 1px;
        opacity: 0.35;
        transition: transform 180ms ease, opacity 180ms ease;
    }
    body.jm-v2 .plp__pill.has-value .plp__pill-caret,
    body.jm-v2 .plp__pill[aria-expanded="true"] .plp__pill-caret {
        opacity: 0.9;
    }
    body.jm-v2 .plp__pill[aria-expanded="true"] .plp__pill-caret {
        transform: rotate(180deg);
    }

    /* Clear-all → small underlined text link, sits on its own line below the
       filter row. Doesn't compete with filter pills visually; only appears
       when at least one filter is active. */
    body.jm-v2 .plp__pillbar-clear {
        display: block;
        margin: 10px auto 0;
        padding: 4px 8px;
        background: transparent;
        border: none;
        font-family: 'Nunito', sans-serif;
        font-weight: 600;
        font-size: 12px;
        letter-spacing: 0.02em;
        color: var(--jm-yellow, #C75B80);
        text-decoration: underline;
        text-underline-offset: 3px;
        text-decoration-thickness: 1px;
        cursor: pointer;
        transition: color 160ms ease;
    }
    body.jm-v2 .plp__pillbar-clear:hover {
        color: var(--jm-yellow-dark, #B14A6F);
    }

    /* Panel = drawer below the pill row. Visually tied to the open peach pill
       above via a peach top-stripe (3px) so the user knows what they're
       editing. Cream paper surface, extension of the polaroid card. */
    body.jm-v2 .plp__pillbar-panel {
        margin-top: 12px;
        padding: 16px 14px 14px;
        background: var(--cream, #FDFDFC);
        border: 1px solid rgba(40, 30, 30, 0.08);
        border-top: 3px solid var(--jm-yellow, #C75B80);
        border-radius: 14px;
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.7),
            0 4px 12px rgba(40, 30, 30, 0.06);
    }
    body.jm-v2 .plp__pillbar-panel[hidden] { display: none !important; }

    body.jm-v2 .plp__pillbar-panel .plp__facet-chips {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }
    /* Panel chip = mini pill (matches pillbar aesthetic at smaller scale).
       White card surface, Nunito 700, paper shadow, peach on active/hover. */
    body.jm-v2 .plp__pillbar-panel .plp__facet-chip {
        display: inline-flex;
        align-items: center;
        padding: 9px 14px;
        background: #fff;
        border: 1px solid rgba(40, 30, 30, 0.12);
        border-radius: 999px;
        font-family: 'Nunito', sans-serif;
        font-weight: 700;
        font-size: 13px;
        line-height: 1;
        color: var(--text, #333E48);
        text-decoration: none;
        box-shadow:
            0 2px 5px rgba(40, 30, 30, 0.05),
            0 1px 2px rgba(40, 30, 30, 0.04);
        transition: background 160ms ease-out, border-color 160ms ease-out, color 160ms ease-out, transform 160ms ease-out, box-shadow 160ms ease-out;
        -webkit-tap-highlight-color: rgba(244, 169, 127, 0.12);
    }
    body.jm-v2 .plp__pillbar-panel .plp__facet-chip:hover {
        border-color: rgba(244, 169, 127, 0.5);
        transform: translateY(-1px);
        box-shadow:
            0 4px 10px rgba(40, 30, 30, 0.08),
            0 1px 3px rgba(40, 30, 30, 0.05);
    }
    body.jm-v2 .plp__pillbar-panel .plp__facet-chip.is-active {
        background: var(--jm-yellow, #C75B80);
        border-color: var(--jm-yellow, #C75B80);
        color: #fff;
        box-shadow:
            0 4px 12px rgba(244, 169, 127, 0.30),
            0 1px 3px rgba(40, 30, 30, 0.08);
    }
    /* Certification badge chips — render the cert SVG inside the chip in
       place of the text label. Logo height tracks chip text line-height so
       the chip stays the same size as text-only siblings. */
    body.jm-v2 .plp__pillbar-panel .plp__facet-chip--has-logo {
        padding: 6px 14px;
    }
    body.jm-v2 .plp__pillbar-panel .plp__chip-logo {
        display: block;
        height: 22px;
        width: auto;
        max-width: 80px;
    }
    /* GOTS placeholder SVG is white-on-transparent (designed for dark
       backgrounds). Invert on default white chip so it renders dark; restore
       on the active state where the white original is what we want. */
    body.jm-v2 .plp__pillbar-panel .plp__facet-chip--logo-gots .plp__chip-logo {
        filter: invert(1);
    }
    body.jm-v2 .plp__pillbar-panel .plp__facet-chip--logo-gots.is-active .plp__chip-logo {
        filter: none;
    }
    /* OEKO-TEX logo is black-on-transparent. Reads fine on white default;
       invert on the active fill so it shows up white. */
    body.jm-v2 .plp__pillbar-panel .plp__facet-chip--logo-oeko-tex.is-active .plp__chip-logo {
        filter: invert(1) brightness(2);
    }
    /* Swatch grid — bigger, centered, with a thin paper ring + soft shadow.
       Active state gets peach ring + slight scale lift. */
    body.jm-v2 .plp__pillbar-panel .plp__facet-swatches {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        justify-content: center;
    }
    body.jm-v2 .plp__pillbar-panel .plp__facet-swatch {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: #fff;
        border-radius: 999px;
        border: 2px solid transparent;
        box-shadow:
            0 2px 6px rgba(40, 30, 30, 0.08),
            0 1px 2px rgba(40, 30, 30, 0.05);
        transition: border-color 160ms ease-out, transform 160ms ease-out, box-shadow 160ms ease-out;
        -webkit-tap-highlight-color: rgba(244, 169, 127, 0.12);
    }
    body.jm-v2 .plp__pillbar-panel .plp__facet-swatch:hover {
        transform: translateY(-1px);
    }
    body.jm-v2 .plp__pillbar-panel .plp__facet-swatch.is-active {
        border-color: var(--jm-yellow, #C75B80);
        transform: scale(1.08);
        box-shadow:
            0 4px 12px rgba(244, 169, 127, 0.28),
            0 1px 3px rgba(40, 30, 30, 0.08);
    }
    body.jm-v2 .plp__pillbar-panel .plp__facet-swatch-dot {
        display: block;
        width: 26px;
        height: 26px;
        border-radius: 999px;
        border: 1px solid rgba(0, 0, 0, 0.08);
    }

    /* Sort-as-pill — same white surface as filter pills (single visual
       language). Differentiated by an "↕" icon prefix that telegraphs
       "ordering" not "filtering". Native <select> sits invisibly on top for
       the OS picker. */
    body.jm-v2 .plp__pill--sort {
        position: relative;
        padding: 10px 26px 10px 14px;
        cursor: pointer;
        overflow: hidden;
    }
    body.jm-v2 .plp__pill--sort::before {
        content: '↕';
        display: inline-block;
        font-size: 12px;
        line-height: 1;
        opacity: 0.55;
        margin-right: 1px;
        transition: opacity 160ms ease;
    }
    body.jm-v2 .plp__pill--sort:hover::before { opacity: 0.85; }
    body.jm-v2 .plp__pill--sort.has-value {
        background: var(--jm-pink, #E27297);
        border-color: var(--jm-pink, #E27297);
        color: #fff;
    }
    body.jm-v2 .plp__pill--sort.has-value::before { opacity: 1; }
    body.jm-v2 .plp__pill--sort > select {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;
        background: transparent;
        border: none;
        padding: 0;
        margin: 0;
        font: inherit;
        color: transparent;
        letter-spacing: inherit;
        text-transform: inherit;
        cursor: pointer;
        outline: none;
        opacity: 0;
    }
    body.jm-v2 .plp__pill--sort .plp__pill-caret {
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        pointer-events: none;
    }


/* ═ PILLBAR MOBILE OVERRIDES — MOB-R2 FIX-5 (fabricly v2-extras.css L9830-9875, synced 2026-07-22) ═
   Compact pillbar: the polaroid-card chrome (tape, eyebrow, 28px padding,
   wrapping pill rows) made the sticky block eat half the screen on phones.
   On mobile it becomes a slim full-width sticky bar: one horizontally
   scrollable pill row, cream bg, hairline bottom border, flush to the top
   (top:0 — no gap peeking while stuck).
   NOTE: fabricly's retired slide-up drawer styles (their L9877-10028) are
   SKIPPED here — jm already ships the identical drawer block (jm v2-extras
   ~L9142-9296, at ≤767) and it is jm's LIVE filter UI. */
@media (max-width: 899px) {
    body.jm-v2 .plp__pillbar {
        position: sticky;
        top: 0;
        z-index: 40;
        margin: 0 0 16px;
        padding: 10px var(--container-pad);
        background: var(--cream, #FDFDFC);
        border-radius: 0;
        box-shadow: none;
        border-bottom: 1px solid var(--border, #ECEAE6);
    }
    body.jm-v2 .plp__pillbar-tape,
    body.jm-v2 .plp__pillbar-eyebrow {
        display: none;
    }
    /* Single scroll row — pills are already flex:0 0 auto at base. */
    body.jm-v2 .plp__pillbar-row {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
    }
    body.jm-v2 .plp__pillbar-row::-webkit-scrollbar {
        display: none;
    }
    /* Opened facet panel must not turn the sticky bar into a wall: cap it
       and scroll inside. (Kept in-flow rather than a fixed bottom-sheet —
       the panel markup lives inside the pillbar.) */
    body.jm-v2 .plp__pillbar-panel {
        max-height: 60vh;
        overflow-y: auto;
    }
}


/* ═ MOBILE FOUNDATION LAYER (fabricly v2-extras.css L10031-10091, mobile pass 2026-06-12, synced 2026-07-22) ═
   Global guards — per-template fixes live with their templates.

   FIXED-ELEMENT Z-INDEX LADDER (canonical — keep new layers on it):
        30  announcement / preview banners
        40  PLP pillbar
        50  sticky breadcrumb
       100  header (#masthead)
      1000  .fab-mbar (mobile bottom bar)
      1010  #jm-btt (back-to-top, must sit above the mbar — fabricly: #fabricly-btt)
      9000  bottom sheets + toasts (jm: .plp__mfilters drawer)
      9999  mega menu
     99990  exit-intent overlay (fabricly-only; jm B9 = skip recommended)
    100000  lightbox
    100002  mobile drawer
    999998  psychology popup overlay (fabricly-only; jm-psychology = progress bar)
    999999  cookie consent (always wins — jm's tool = B1, pending)
   */

/* This stylesheet only loads on v2/auth pages (cookie-gated), so the
   html/body rule never touches public v1. `clip` (not `hidden`) avoids
   creating a scroll container, so position:sticky keeps working. It
   intentionally overrides the global `overflow-x: hidden` in style.css
   (same 0,0,1 specificity, this sheet loads later). */
html, body { overflow-x: clip; }

/* Fluid-media guard at zero-class specificity. :where() keeps these at
   (0,0,1) so every existing class-scoped img rule (fixed-height thumbs,
   object-fit covers, polaroids, avatars) still wins — only otherwise
   unstyled/attribute-sized images get max-width + height:auto. */
:where(body.jm-v2, body.fab-auth) img { max-width: 100%; height: auto; }
:where(body.jm-v2, body.fab-auth) svg,
:where(body.jm-v2, body.fab-auth) video,
:where(body.jm-v2, body.fab-auth) iframe { max-width: 100%; }

/* iOS input auto-zoom guard: any input under 16px zooms the page.
   !important is deliberate — audited inputs are 14px from several
   different selectors; this is the safety net so the money path works.
   (fabricly's `.fabricly-search input[type="search"]` selector dropped —
   that legacy overlay plugin was never ported to jm.) */
@media (max-width: 899px) {
    body.jm-v2 input[type="text"],
    body.jm-v2 input[type="email"],
    body.jm-v2 input[type="tel"],
    body.jm-v2 input[type="number"],
    body.jm-v2 input[type="password"],
    body.jm-v2 input[type="search"],
    body.jm-v2 select,
    body.jm-v2 textarea,
    /* GLB-2: the header-search reskin (jm v2-extras ~L88) sets 14px with a
       higher-specificity !important selector — repeat its selectors here
       (later source order wins the tie). */
    body.jm-v2 .site-search input[type="search"],
    body.jm-v2 .site-search .search-field,
    body.fab-auth input,
    body.fab-auth select,
    body.fab-auth textarea {
        font-size: 16px !important;
    }
}


/* ═ PDP MOBILE — v2-extras-owned rules (fabricly v2-extras.css L10093-10106, synced 2026-07-22) ═
   Only overrides for selectors whose base rules live in v2-extras
   (accordion body). The main PDP mobile layer is the system.css-sourced
   section at the top of this file. */
@media (max-width: 899px) {
    /* PDP-14: any table inside an accordion body scrolls instead of overflowing */
    .pdp__acc-body table { display: block; overflow-x: auto; max-width: 100%; }
}
@media (max-width: 639px) {
    /* PDP-14: accordion body indent 48px → 12px on phones */
    .pdp__acc-body { padding: 4px 4px 18px 12px; }
}


/* ═ PLP MOBILE — PLP-1..10 (fabricly v2-extras.css L10108-10163, mobile pass 2026-06-12, synced 2026-07-22) ═
   Lives late in the cascade so it wins over the pillbar region above.
   Gutters ride var(--container-pad); sb-sku card overrides are scoped to
   .plp__grid so homepage scrapbook cards keep their base values from
   scrapbook.css (which stays media-query-free). */
@media (max-width: 899px) {
    /* PLP-2: pagination — tighter vertical rhythm + 44px touch targets.
       Side gutters come from the grouped var(--container-pad) override
       in the PLP GRID TABLET TIER block above. */
    .plp__pagination { padding-top: 16px; padding-bottom: 40px; }
    .plp__pagination a.page-numbers,
    .plp__pagination span.page-numbers { min-width: 44px; height: 44px; }
    .plp__pagination .prev,
    .plp__pagination .next { min-height: 44px; }

    /* PLP-6: filter-panel colour swatches 40px → 44px touch target
       (dormant with the pillbar until its markup lands) */
    body.jm-v2 .plp__pillbar-panel .plp__facet-swatch { width: 44px; height: 44px; }

    /* PLP-10: empty state — 80px vertical padding too tall on phones */
    .plp__empty { padding: 48px var(--container-pad); }
}
@media (max-width: 639px) {
    /* PLP-3: 2-col on phones (3-col 640-899 set in the tablet-tier block
       above), token gap, tighter card padding (≈158px card / ≈138px usable
       @360). */
    body.jm-v2 .plp__grid {
        grid-template-columns: 1fr 1fr !important;
        gap: var(--card-gap) !important;
    }
    body.jm-v2 .plp__grid .sb-sku { padding: 10px 10px 14px; }

    /* PLP-4: card title 18px → 15px, clamped to 2 lines */
    body.jm-v2 .plp__grid .sb-sku__title {
        font-size: 15px;
        line-height: 1.25;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* PLP-7: price/badge row wraps instead of overflowing */
    body.jm-v2 .plp__grid .sb-sku__row { flex-wrap: wrap; row-gap: 2px; }

    /* PLP-9: card price 17px → 15px */
    body.jm-v2 .plp__grid .sb-sku__price { font-size: 15px; }

    /* PLP-5: active-filter value in pills — less truncation (pill row wraps) */
    body.jm-v2 .plp__pill-value { max-width: 120px; }

    /* PLP-8: category description — bottom margin 80px → 40px. Side gutter
       comes from the grouped var(--container-pad) padding override; adding
       side margin too would double the inset, so margins stay 0. */
    .plp__about { margin: 0 0 40px; }
}


/* ═ SCRAPBOOK MOBILE LAYER (fabricly v2-extras.css L10165-10331, mobile pass 2026-06-12, synced 2026-07-22) ═
   Task 3.3 — HOME-1..19 + GLB-4 (footer). scrapbook.css stays
   media-query-free (it is the design source); every mobile override for its
   selectors lives HERE, late in the cascade, so it wins. Goal: the same
   scrapbook — polaroids, tape, washi, handwriting, rotations — scaled and
   restacked for phones. Charm preserved, zero horizontal overflow.

   Notes:
   - body.jm-v2 prefix only where needed to beat a higher-specificity base
     (.sb-hero:not(.sb-hero--split) is (0,2,0); journal/personal bases in
     v2-extras are (0,2,1)).
   - The Personal section markup uses .sb-range__grid--8 (NOT
     .sb-personal__grid), so the HOME-6 column tiering covers HOME-10
     automatically.
   - GLB-4 .sb-foot__* rules: jm renders its footer via Shoptimizer hooks
     (no footer-v2.php) — dormant until footer markup parity; harmless. */
@media (max-width: 899px) {
    /* ── HERO (HOME-1/2/3/16) — one column; collage first, like the
       .sb-m mobile mock in scrapbook.css (collage above the text). */
    body.jm-v2 .sb-hero {
        grid-template-columns: 1fr;
        gap: 32px;
        margin: 32px 32px 48px;
        padding: 32px;
        min-height: 0; /* HOME-16 */
    }
    body.jm-v2 .sb-hero__collage { order: -1; }
    .sb-hero__h1 { font-size: var(--fs-h1); line-height: 1.02; letter-spacing: -0.5px; } /* HOME-2 */
    .sb-hero__text { padding: 8px 0 0; }

    /* HOME-11 (tablet tier) — collage centred at ~75% scale, same
       composition: h1 top-left / h2 top-right / h3 bottom, rotations
       + washi + gold clip untouched. */
    .sb-hero__collage { height: 430px; width: 100%; max-width: 560px; margin: 0 auto; }
    .sb-polaroid--h1 { width: 210px; height: 256px; }
    .sb-polaroid--h2 { width: 180px; height: 210px; }
    .sb-polaroid--h3 { width: 165px; height: 150px; left: 60px; }

    /* ── PROMISE (HOME-4) — single column, portrait centred */
    .sb-promise { padding: var(--section-pad) var(--container-pad); }
    .sb-promise__inner { grid-template-columns: 1fr; gap: 40px; }
    .sb-promise__portrait { max-width: 240px; margin: 0 auto; }
    .sb-promise__h2 { font-size: var(--fs-h2); }

    /* ── RANGE (HOME-5/6) */
    .sb-range { padding: var(--section-pad) var(--container-pad); }
    .sb-range__head { padding: 0; margin-bottom: 40px; }
    .sb-range__h2 { font-size: var(--fs-h2); letter-spacing: -1px; }
    .sb-range__grid { padding: 0; gap: 32px 20px; } /* row gap ≥24px keeps the Nº badge (top:-12px) clear of the row above */
    .sb-range__grid--8 { grid-template-columns: repeat(3, 1fr); } /* HOME-6: 3-col 640-899, matches PLP tiering */

    /* ── PROOF (HOME-7) */
    .sb-proof { padding: var(--section-pad) var(--container-pad); }
    .sb-proof__head { margin-bottom: 40px; }
    .sb-proof__h2 { font-size: var(--fs-h2); }
    .sb-proof__scatter { gap: 32px; padding: 24px 0; }

    /* ── PAYOFF (HOME-8) */
    .sb-payoff--band { padding: var(--section-pad) var(--container-pad); }
    .sb-payoff--band::before { inset: 16px 4px; }
    .sb-payoff__band-inner { padding: 40px 24px; }
    .sb-payoff__h2 { font-size: var(--fs-h2); }

    /* ── JOURNAL (HOME-9) — 2-col fits 640-899 (cards ~300-420px wide);
       overrides the older 1fr ≤899 rule in jm's forked v2-extras. */
    body.jm-v2 .sb-journal__grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }

    /* ── FOOTER (GLB-4a/b) — wrap, token gutters */
    .sb-foot__logistics { flex-wrap: wrap; gap: 16px; padding: 24px var(--container-pad); }
    .sb-foot__bottom { padding-left: var(--container-pad); padding-right: var(--container-pad); }
}
@media (max-width: 639px) {
    /* ── HERO (HOME-1/2/19) — phone-sized scrapbook card */
    body.jm-v2 .sb-hero {
        margin: 16px var(--container-pad) 32px;
        padding: 24px 16px;
        gap: 24px;
    }
    .sb-hero__issue { font-size: 11px; margin-bottom: 14px; }
    .sb-hero__sub { font-size: 15px; margin-bottom: 24px; }
    .sb-hero__text { padding: 0; }
    .sb-tape--1 { left: 16px; } /* HOME-19 */

    /* HOME-11 (phone tier) — ~62% proportional polaroids, vw-based and
       capped, inside a clamped stage. Same scatter as desktop (h1
       top-left / h2 top-right overlapping / h3 bottom-centre-left),
       rotations + washi + clip kept. @360px viewport the stage is
       288px wide: h1 158×190 · h2 137×158 · h3 122×112 — overlap
       charm intact, nothing crosses the stage edge. Captions get
       nowrap+ellipsis so long product names can't climb the photo. */
    .sb-hero__collage { height: clamp(280px, 80vw, 380px); max-width: none; }
    .sb-polaroid { padding: 10px 10px 26px; }
    .sb-polaroid::before {
        font-size: 12px; bottom: 6px; left: 8px; right: 8px;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .sb-polaroid--h1 { width: min(44vw, 180px); height: min(53vw, 215px); top: 0; left: 0; }
    .sb-polaroid--h2 { width: min(38vw, 155px); height: min(44vw, 180px); top: 30px; right: 0; }
    .sb-polaroid--h3 { width: min(34vw, 140px); height: min(31vw, 128px); bottom: 0; left: 22%; }
    .sb-washi { width: 64px; height: 22px; }
    .sb-washi--1 { right: 18%; }
    .sb-washi--2 { bottom: 14%; left: 8px; }

    /* HOME-14 — handwriting margin notes (in-flow in hero + promise;
       the absolute --promise variant goes static so it can't collide) */
    .sb-margin-note { max-width: 160px; margin-top: 24px; }
    .sb-margin-note span { font-size: 14px; }
    .sb-margin-note--hero { margin-top: 28px; }
    .sb-margin-note--promise { position: static; margin-top: 16px; }

    /* ── PROMISE (HOME-4) */
    .sb-promise__inner { gap: 32px; }
    .sb-promise__portrait { max-width: 220px; padding: 20px 16px; }
    .sb-promise__p { font-size: 16px; }

    /* ── RANGE (HOME-6) — 2-col on phones, PLP card tiering mirrored
       (scoped to .sb-range__grid so PLP's own block stays authoritative
       there). HOME-19: mood eyebrow lifted to the 11px floor. */
    .sb-range__grid { gap: 28px var(--card-gap); }
    .sb-range__grid--8 { grid-template-columns: 1fr 1fr; }
    .sb-range__grid .sb-sku { padding: 10px 10px 14px; }
    .sb-range__grid .sb-sku__title {
        font-size: 15px; line-height: 1.25;
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .sb-range__grid .sb-sku__price { font-size: 15px; }
    .sb-range__grid .sb-sku__row { flex-wrap: wrap; row-gap: 2px; }
    .sb-range__grid .sb-sku__mood { font-size: 11px; }

    /* ── PERSONAL (HOME-10) — section rhythm; grid columns come from
       the .sb-range__grid--8 tiering above (that IS the markup). */
    body.jm-v2 .sb-personal { margin: 48px auto; padding: 0 var(--container-pad); }

    /* ── PROOF (HOME-18) — polaroids stack in one centred column,
       rotations kept, stagger margin dropped (gap does the rhythm) */
    .sb-proof__scatter { flex-direction: column; align-items: center; gap: 28px; padding: 16px 0; }
    .sb-polaroid-big { width: min(300px, 80vw); }
    .sb-polaroid-big--1 { margin-top: 0; }

    /* ── JOURNAL (HOME-9/17) */
    body.jm-v2 .sb-journal { margin: 60px auto; padding: 0 var(--container-pad); }
    body.jm-v2 .sb-journal__head { margin-bottom: 32px; }
    body.jm-v2 .sb-journal__grid { grid-template-columns: 1fr; }

    /* ── PAYOFF (HOME-8/12/15) — form stacks, both controls full-width.
       Input font-size ≥16px comes from the foundation iOS guard
       (input[type=email] is covered — the markup is type="email"). */
    .sb-payoff--band { padding: 40px var(--container-pad); }
    .sb-payoff__band-inner { padding: 36px 18px; }
    .sb-payoff__p { font-size: 16px; margin-bottom: 28px; }
    .sb-payoff__form { flex-direction: column; gap: 10px; } /* HOME-12 */
    .sb-payoff__form input { width: 100%; padding: 14px 16px; }
    .sb-payoff__form .f-btn-primary { width: 100%; justify-content: center; }
    .sb-payoff__trust { gap: 12px; font-size: 14px; flex-wrap: wrap; } /* HOME-15 */

    /* ── FOOTER (GLB-4a/b) — single centred stack */
    .sb-foot__logistics {
        flex-direction: column; align-items: center; gap: 10px;
        padding: 20px var(--container-pad); text-align: center;
    }
    .sb-foot__bottom {
        flex-direction: column; align-items: center; gap: 12px;
        padding: 16px var(--container-pad); text-align: center;
    }
}


/* ═ SEARCH / AUTH / ACCOUNT + STATICS (fabricly v2-extras.css L10333-10368, mobile pass 2026-06-12, synced 2026-07-22) ═
   Task 3.5 — GLB-10 (+ GLB-2/9 shipped inline in their blocks above).
   OMITTED: fabricly's `.fab-art-body table` statics rule — jm's blog single
   does not use the .fab-art-* classes (blog v2 = lane C, not built). */
@media (max-width: 899px) {
    /* GLB-10: account tab row — momentum horizontal scroll + 44px targets.
       (.dash__hdr-tabs is the rendered nav in my-account-v2.php.) */
    .dash__hdr-tabs { -webkit-overflow-scrolling: touch; }
    .dash__hdr-tabs .dash__tab {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }
}
@media (max-width: 639px) {
    /* GLB-10: Woo's order-details tables (view-order endpoint) scroll
       sideways instead of blowing out the 360px viewport. */
    .dash__woo-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }
}


/* ═ MOB-R2 FIX-8 — CHECKOUT ORDER SUMMARY (fabricly v2-extras.css L10370-10396, synced 2026-07-22) ═
   Checkout order summary at phone width was "squeezed": the white card
   chrome only existed inside @media (min-width:900px), so on mobile the
   rows sat edge-to-edge with no container. Give it the same card +
   breathing room. Air, not redesign. */
@media (max-width: 639px) {
    body.jm-v2.woocommerce-checkout #order_review {
        padding: 16px !important;
        background: #fff;
        border: 1px dashed rgba(0, 0, 0, 0.08);
        border-radius: 14px;
    }
    body.jm-v2.woocommerce-checkout #order_review .shop_table tbody tr.cart_item {
        padding: 10px 0 !important;
    }
    body.jm-v2.woocommerce-checkout #order_review td.product-name .fab-cart-meta {
        margin: 4px 0 0 58px !important;
    }
    /* Totals rows: base rule already sets 8px 0 vertical padding at all
       widths — deliberately NOT re-asserted here so the cart-subtotal (14px)
       and order-total (16px) hierarchy top-paddings keep winning. */
    body.jm-v2.woocommerce-checkout #order_review #payment ul.payment_methods,
    body.jm-v2.woocommerce-checkout #payment ul.payment_methods {
        margin-top: 12px !important;
    }
}


/* ═ MOBILE PASS — ROUND 3 (fabricly v2-extras.css L10398-10563, 2026-06-12 Marc iPhone review, synced 2026-07-22) ═
   FIX-2: hamburger-drawer submenu wrapper normalization
   FIX-3: PDP qty picker — kill iOS default blue button text
   FIX-4: mini-cart flyout — row air + ONE themed remove control + 44px close */

/* ── MOB-R3 FIX-2 (cont.): the open submenu wrapper inside the drawer.
   Child style.css ships desktop dropdown chrome on ul.sub-menu (shadow card,
   border, radius) and the parent positions .sub-menu-wrapper absolute/fixed
   for the desktop flyout. Inside the ≤992 drawer the OPEN wrapper must be a
   plain full-width block on white. Scope the static reset to li.dropdown-open
   only — the CLOSED state hides via position:fixed; left:-99999px (parent
   main.css) and must keep doing so. */
@media (max-width: 992px) {
    body.jm-v2 .col-full-nav li.menu-item-has-children.dropdown-open > .sub-menu-wrapper {
        position: static !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        width: auto !important;
        opacity: 1 !important;
        transform: none !important;
        visibility: visible !important;
        background: #fff !important;
        box-shadow: none !important;
        border: 0 !important;
        border-radius: 0 !important;
        margin: 4px 0 8px !important;
        padding: 0 0 0 16px !important;
    }
    body.jm-v2 .col-full-nav .sub-menu-wrapper > .container {
        padding: 0 !important;
        margin: 0 !important;
        width: auto !important;
        max-width: none !important;
    }
    body.jm-v2 .col-full-nav ul.sub-menu {
        background: #fff !important;
        box-shadow: none !important;
        border: 0 !important;
        border-radius: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        width: auto !important;
        list-style: none !important;
    }
    /* Caret chevron (parent draws it as a masked box): muted closed, peach
       open. Rotation itself comes from the parent (.dropdown-open > span.caret). */
    body.jm-v2 .col-full-nav .menu-item-has-children > span.caret::after {
        background-color: var(--text-muted, #888888) !important;
    }
    body.jm-v2 .col-full-nav li.dropdown-open > span.caret::after {
        background-color: var(--jm-yellow, #C75B80) !important;
    }
}

/* ── MOB-R3 FIX-3: PDP quantity picker. system.css styles .pdp__qty-opt
   (bg/border/font) but never sets `color`, so iOS Safari paints the button
   text in system blue. Own the ink + give a peach focus ring.
   (Dormant in jm today — no .pdp__qty markup; jm PDP runs the engine
   stepper. Kept: jm's forked system.css still styles these classes.) */
body.jm-v2 .pdp__qty-opt {
    color: var(--text, #333E48) !important;
    font-family: 'Nunito', sans-serif !important;
    font-size: 16px !important;
    background: #fff;
    border: 1.5px solid var(--border, #ECEAE6);
    border-radius: 10px;
    padding: 10px 12px;
    -webkit-tap-highlight-color: transparent;
}
body.jm-v2 .pdp__qty-opt--active {
    color: #fff !important;
    /* The base rule above sets background:#fff at (0,2,1) specificity, which
       BEATS system.css's .pdp__qty-opt--active pink at (0,1,0) — the classes
       are NOT dormant (the jm-add-to-cart engine renders them on every fabric
       PDP, and jm-gift-cards reuses them): active chips were white-on-white.
       Re-own the state colors at the same specificity (gift-card verification
       find, 2026-07-24). */
    background: var(--jm-pink, #E27297);
    border-color: var(--jm-pink, #E27297);
}
body.jm-v2 .pdp__qty-steps button {
    color: var(--jm-pink-dark, #C75B80) !important;
}
body.jm-v2 .pdp__qty-steps .qty,
body.jm-v2 .pdp__qty-steps input[type="number"] {
    color: var(--text, #333E48) !important;
}
body.jm-v2 .pdp__qty-opt:focus-visible,
body.jm-v2 .pdp__qty-steps button:focus-visible {
    outline: 2px solid var(--jm-yellow, #C75B80) !important;
    outline-offset: 2px;
}

/* ── MOB-R3 FIX-4a: mini-cart rows — air. Right padding reserves a rail for
   the remove circle (vertically centered there, see 4b).
   (.fabricly-mc-find-match kept VERBATIM — jm ships that class name.) */
body.jm-v2 .shoptimizer-mini-cart-wrap .mini_cart_item {
    padding: 14px 48px 14px 14px !important;
    column-gap: 12px !important;
    row-gap: 6px !important;
    margin-bottom: 10px !important;
}
body.jm-v2 .shoptimizer-mini-cart-wrap .mini_cart_item a:not(.remove):not(.fabricly-mc-find-match) {
    font-size: 14px !important;
    line-height: 1.35 !important;
    gap: 12px !important;
}
body.jm-v2 .shoptimizer-mini-cart-wrap .mini_cart_item img {
    width: 56px !important;
    height: 56px !important;
    border-radius: 8px !important;
}

/* ── MOB-R3 FIX-4b: ONE remove control. Parent main.css draws a trash icon
   via a.remove::before (mask-image, bg #444) AND the earlier reskin restored
   the "×" text (parent had font-size:0) — so BOTH rendered, unthemed.
   Kill the trash ::before, keep a single 32px dashed-peach circle with the
   × glyph, centered in the right rail. ::after pads the tap target to 44px. */
body.jm-v2 .shoptimizer-mini-cart-wrap .mini_cart_item a.remove,
body.jm-v2 .shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item a.remove {
    top: 50% !important;
    right: 8px !important;
    bottom: auto !important;
    left: auto !important;
    transform: translateY(-50%) !important;
    width: 32px !important;
    height: 32px !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #fff !important;
    border: 1.5px dashed var(--jm-yellow, #C75B80) !important;
    border-radius: 50% !important;
    color: var(--jm-yellow, #C75B80) !important;
    font-size: 16px !important;
    font-weight: 700 !important;
}
body.jm-v2 .shoptimizer-mini-cart-wrap .mini_cart_item a.remove::before,
body.jm-v2 .shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item a.remove::before {
    display: none !important;
    content: none !important;
}
body.jm-v2 .shoptimizer-mini-cart-wrap .mini_cart_item a.remove::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
}
body.jm-v2 .shoptimizer-mini-cart-wrap .mini_cart_item a.remove:hover {
    background: var(--jm-yellow, #C75B80) !important;
    color: #fff !important;
}

/* ── MOB-R3 FIX-4c: drawer close button — 44px themed circle (parent has a
   bare 26px block). Header bar itself is .fab-flycart-header (cream drawer
   bg + dashed bottom border, themed in Phase 4). */
body.jm-v2 .shoptimizer-mini-cart-wrap .close-drawer {
    top: 12px !important;
    right: 12px !important;
    width: 44px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #fff !important;
    border: 1.5px dashed var(--border, #ECEAE6) !important;
    border-radius: 50% !important;
    color: var(--text, #333E48) !important;
}
body.jm-v2 .shoptimizer-mini-cart-wrap .close-drawer span {
    width: 22px !important;
    height: 22px !important;
}


/* ═ CHECKOUT MOBILE ORDER CARD (fabricly v2-extras.css L10565-10579, Marc 2026-07-02 round 2, synced 2026-07-22) ═
   Round 1's top-margin + dashed border created a dead zone + orphan line
   INSIDE the card because the heading is relocated to the card TOP on
   mobile; reverted. Clean card top, hide the table-header ghost, give the
   products air below the heading. */
@media (max-width: 899px) {
    body.jm-v2.woocommerce-checkout #order_review > h3#order_review_heading,
    body.jm-v2.woocommerce-checkout form.checkout > h3#order_review_heading {
        margin: 0 0 18px !important;
        padding: 0 0 14px !important;
        border-top: 0 !important;
    }
    body.jm-v2.woocommerce-checkout .woocommerce-checkout-review-order-table thead { display: none !important; }
    body.jm-v2.woocommerce-checkout .woocommerce-checkout-review-order-table { margin-top: 0 !important; }
    body.jm-v2.woocommerce-checkout .woocommerce-checkout-review-order-table .cart_item:first-child td { padding-top: 6px !important; }
}


/* ═ FLYOUT CART — FULL WIDTH ON PHONES (fabricly v2-extras.css L10581-10596, Marc 2026-07-02, synced 2026-07-22) ═
   Full viewport width (was a partial drawer with the page peeking out) +
   never break product names mid-word. */
@media (max-width: 899px) {
    body.jm-v2 .shoptimizer-mini-cart-wrap {
        width: 100vw !important;
        max-width: 100vw !important;
        right: -100vw !important;
        border-left: 0 !important;
    }
    body.jm-v2.drawer-open .shoptimizer-mini-cart-wrap { right: 0 !important; }
    body.jm-v2 .shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item,
    body.jm-v2 .shoptimizer-mini-cart-wrap .woocommerce-mini-cart-item a {
        word-break: normal !important;
        overflow-wrap: break-word !important;
    }
}


/* ═ PDP INLINE-STYLE RELOCATION (Marc mobile round, 2026-07-24) ═
   single-product-v2.php carried hardcoded DESKTOP inline styles on
   .pdp__breadcrumb / .pdp__main / .pdp__related / .pdp__related-h /
   .pdp__related-grid. Inline beats every stylesheet, so the whole ≤899
   PDP mobile layer above silently lost (390px rendered a 230px column
   inside 80px gutters + a crushed 4-col related grid — Marc: "produktsiden
   virker slet ikke på mobil"). The inline styles are now stripped from the
   template; their desktop values live here. ≥900 values are byte-equal to
   the old inline ones (incl. beating system.css's 900-1279 40px tier, which
   the inline style always beat too — no desktop pixel changes). */
body.jm-v2 .pdp__related { background: #fff; }
body.jm-v2 .pdp__related-h { text-align: center; }
body.jm-v2 .pdp__related-grid { display: grid; max-width: 1280px; margin: 0 auto; }
@media (min-width: 900px) {
    body.jm-v2 .pdp__breadcrumb { padding: 14px 80px 0; }
    body.jm-v2 .pdp__main { padding: 30px 80px 60px; }
    body.jm-v2 .pdp__related { padding: 80px 80px; }
    body.jm-v2 .pdp__related-grid { grid-template-columns: repeat(4, 1fr); gap: 32px; }
}
/* 640-899 keeps the old 48px heading (inline value); ≤639 falls to the
   PDP-11/related-h mobile rules above (var(--fs-h2), 28px margin). */
@media (min-width: 640px) {
    body.jm-v2 .pdp__related-h { font-size: 48px; margin-bottom: 48px; }
}


/* ═ DRAWER NORMALIZATION — hamburger menu list look (Marc mobile round, 2026-07-24) ═
   Root cause: v2-extras' desktop nav restyle targets
   `#site-navigation .menu-primary-menu-container > ul.menu` with NO
   breakpoint/menu scoping (fabricly scopes to ul#menu-hauptmenue), so its
   (1,4,4)-specificity !important pills also hit the DRAWER's mobile menu
   (ul#menu-secondary-nav): items rendered as a wrapped 2-col pill row,
   carets detached, sections squeezed — Marc: "ingen af menuerne virker".
   The ported drawer respec above is only (0,4,4) and lost the tie.
   These rules are (1,5,x)+, same-importance, later file → they win.  */
@media (max-width: 992px) {
    /* 1) Mobile ul back to a plain block list */
    body.jm-v2 #site-navigation .menu-primary-menu-container.shoptimizer-mobile-menu > ul.menu {
        display: block !important;
        width: 100% !important;
        gap: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    body.jm-v2 #site-navigation .menu-primary-menu-container.shoptimizer-mobile-menu > ul.menu > li.menu-item {
        display: block !important;
        width: 100% !important;
        position: relative !important;
        margin: 0 !important;
    }
    /* 2) Top-level rows: fabricly drawer voice (Nunito 800/16, 48px rows,
       dashed hairline, right rail reserved for the caret) */
    body.jm-v2 #site-navigation .menu-primary-menu-container.shoptimizer-mobile-menu > ul.menu > li.menu-item > a {
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
        min-height: 48px !important;
        font-family: 'Nunito', sans-serif !important;
        font-weight: 800 !important;
        font-size: 16px !important;
        color: var(--text, #333E48) !important;
        padding: 12px 48px 12px 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        transform: none !important;
        border-bottom: 1px dashed var(--border, #ECEAE6) !important;
    }
    /* 3) Caret = 44px tap target on the row's right rail (parent theme JS
       toggles li.dropdown-open on caret click; FIX-2 above styles the open
       wrapper). */
    body.jm-v2 #site-navigation .shoptimizer-mobile-menu > ul.menu > li.menu-item-has-children > span.caret {
        position: absolute !important;
        right: 0 !important;
        top: 2px !important;
        width: 44px !important;
        height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
    }
    /* 4) Old-theme MAS megamenu pointer rows are junk destinations in the
       drawer (bare "Metervarer MegaMenu"/"Tilbehør Megamenu" links to raw
       mas_static_content dumps). Hide the ROWS only — the <a> stays in the
       DOM/HTML (gate law: href set untouched). The stof-a-z pointer is the
       ONE working MAS URL (renders page-stof-a-z.php pre-flip) and stays. */
    body.jm-v2 .shoptimizer-mobile-menu li.menu-item:has(> a[href*="mas_static_content"]:not([href*="stof-a-z"])) {
        display: none !important;
    }
    /* …and parents whose whole subtree is such pointers lose caret + panel
       (they remain plain category links — correct UX). */
    body.jm-v2 .shoptimizer-mobile-menu li.menu-item-has-children:has(a[href*="mas_static_content"]):not(:has(a[href*="stof-a-z"])) > span.caret,
    body.jm-v2 .shoptimizer-mobile-menu li.menu-item-has-children:has(a[href*="mas_static_content"]):not(:has(a[href*="stof-a-z"])) > .sub-menu-wrapper {
        display: none !important;
    }

    /* 5) jm-mnav category accordions (nav-builder appends
       <li class="jm-mnav__section"><details>…) — shipped with ZERO css until
       now (rendered as stray "▶ Metervarer ▶ Sytilbehør" fragments). Styled
       as drawer rows; native <details> gives the expand/collapse. */
    body.jm-v2 .shoptimizer-mobile-menu li.jm-mnav__section {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        border-bottom: 1px dashed var(--border, #ECEAE6);
    }
    body.jm-v2 .shoptimizer-mobile-menu li.jm-mnav__section summary {
        list-style: none;
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(226, 114, 151, 0.12);
    }
    body.jm-v2 .shoptimizer-mobile-menu li.jm-mnav__section summary::-webkit-details-marker { display: none; }
    body.jm-v2 .shoptimizer-mobile-menu li.jm-mnav__section > details > summary {
        display: flex;
        align-items: center;
        min-height: 48px;
        padding: 12px 48px 12px 0;
        font-family: 'Nunito', sans-serif;
        font-weight: 800;
        font-size: 16px;
        color: var(--text, #333E48);
        position: relative;
    }
    /* caret glyph mirrors the parent theme's chevron; rotates when open */
    body.jm-v2 .shoptimizer-mobile-menu li.jm-mnav__section > details > summary::after {
        content: "";
        position: absolute;
        right: 15px;
        top: 50%;
        width: 9px;
        height: 9px;
        border-right: 2px solid var(--text-muted, #888);
        border-bottom: 2px solid var(--text-muted, #888);
        transform: translateY(-70%) rotate(45deg);
        transition: transform 160ms ease;
    }
    body.jm-v2 .shoptimizer-mobile-menu li.jm-mnav__section > details[open] > summary::after {
        transform: translateY(-30%) rotate(225deg);
        border-color: var(--jm-yellow, #C75B80);
    }
    /* inner group accordions (Jersey / Vævet bomuld / …) */
    body.jm-v2 .shoptimizer-mobile-menu .jm-mnav__group {
        margin: 0 0 2px 16px;
    }
    body.jm-v2 .shoptimizer-mobile-menu .jm-mnav__group > summary {
        display: flex;
        align-items: center;
        min-height: 44px;
        padding: 10px 44px 10px 0;
        font-family: 'Poppins', sans-serif;
        font-weight: 600;
        font-size: 14px;
        color: var(--text, #333E48);
        position: relative;
        border-bottom: 1px dashed var(--border, #ECEAE6);
    }
    body.jm-v2 .shoptimizer-mobile-menu .jm-mnav__group > summary::after {
        content: "";
        position: absolute;
        right: 17px;
        top: 50%;
        width: 7px;
        height: 7px;
        border-right: 2px solid var(--text-muted, #888);
        border-bottom: 2px solid var(--text-muted, #888);
        transform: translateY(-70%) rotate(45deg);
        transition: transform 160ms ease;
    }
    body.jm-v2 .shoptimizer-mobile-menu .jm-mnav__group[open] > summary::after {
        transform: translateY(-30%) rotate(225deg);
        border-color: var(--jm-yellow, #C75B80);
    }
    body.jm-v2 .shoptimizer-mobile-menu .jm-mnav__group ul {
        list-style: none;
        margin: 0;
        padding: 0 0 6px;
    }
    body.jm-v2 .shoptimizer-mobile-menu .jm-mnav__group ul li {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }
    body.jm-v2 .shoptimizer-mobile-menu .jm-mnav__group ul li a {
        flex: 1 1 auto;
        display: flex;
        align-items: center;
        min-height: 44px;
        padding: 10px 0 10px 12px;
        font-family: 'Poppins', sans-serif;
        font-weight: 500;
        font-size: 14px;
        color: var(--text, #333E48);
        border-bottom: 1px dashed var(--border, #ECEAE6);
        text-decoration: none;
    }
    body.jm-v2 .shoptimizer-mobile-menu .jm-mnav__group ul li:last-child a { border-bottom: none; }
    body.jm-v2 .shoptimizer-mobile-menu .jm-mnav__group .jm-menu-count { margin-right: 10px; }

    /* 5b) …and the same groups when they sit INSIDE their own menu row
       (nav-builder attaches .jm-mnav__panel to the Metervarer / Tilbehør <li>
       instead of dumping duplicate rows at the bottom of the drawer — Marc
       mobile review 2026-07-26). The row must stack: Shoptimizer lays the
       menu item out as a flex line, which would park the panel BESIDE the
       link and clip it to nothing. */
    body.jm-v2 .shoptimizer-mobile-menu li.jm-mnav__has-panel {
        display: block !important;
        width: 100% !important;
    }
    body.jm-v2 .shoptimizer-mobile-menu .jm-mnav__panel {
        padding: 2px 0 8px;
    }
    /* The link above keeps its own dashed rule; the last group inside the panel
       would otherwise double it up. */
    body.jm-v2 .shoptimizer-mobile-menu .jm-mnav__panel .jm-mnav__group:last-child > summary { border-bottom: none; }

    /* 5c) The panel is that row's DROPDOWN — not a permanent wall.
       Rule 4 above strips .sub-menu-wrapper from these two rows (their only
       sub-items are dead mas_static_content pointers) but rule 3 keeps the
       caret visible, so after the panel moved inside the row the caret had
       nothing left to toggle and all nine groups rendered permanently open —
       wedged between "Metervarer" and "Tilbehør" and reading as siblings of
       the rows they belong to (Marc, iPhone 2026-07-26).
       Hang the panel on the parent theme's OWN toggle: main.js:106 adds
       .dropdown-open to the <li> on caret click. No custom JS, and the row
       then behaves exactly like every other expandable row in the drawer. */
    body.jm-v2 .shoptimizer-mobile-menu li.jm-mnav__has-panel > .jm-mnav__panel {
        display: none;
    }
    body.jm-v2 .shoptimizer-mobile-menu li.jm-mnav__has-panel.dropdown-open > .jm-mnav__panel {
        display: block;
    }
    /* Indent + type ladder. Measured on the deployed drawer 2026-07-26, the
       nesting was inverted on BOTH signals a reader uses:
         · position — parent row text starts at x=43, the group summary at
           x=31, i.e. the child sat 12px LEFT of its own parent;
         · optical size — group summary drew 20px tall against the parent's
           16px, because Poppins has a far larger x-height than Nunito, so
           Poppins 14/600 outweighs Nunito 16/800 even though every number
           says otherwise.
       Hence one family for the whole drawer and a real step per level:
       43px / Nunito 800 16  ->  59px / Nunito 700 15  ->  71px / Nunito 600 14.
       The rail is what carries the eye down a long open group list. */
    body.jm-v2 .shoptimizer-mobile-menu .jm-mnav__panel {
        padding-left: 28px;
    }
    body.jm-v2 .shoptimizer-mobile-menu .jm-mnav__panel .jm-mnav__group {
        margin-left: 0;
        padding-left: 14px;
        border-left: 2px solid var(--border, #ECEAE6);
    }
    /* !important throughout: the drawer respec above runs on !important, and
       these have to beat it rather than tie with it. */
    body.jm-v2 .shoptimizer-mobile-menu .jm-mnav__panel .jm-mnav__group > summary {
        font-family: 'Nunito', sans-serif !important;
        font-size: 15px !important;
        font-weight: 700 !important;
    }
    body.jm-v2 .shoptimizer-mobile-menu .jm-mnav__panel .jm-mnav__group ul li a {
        font-family: 'Nunito', sans-serif !important;
        font-size: 14px !important;
        font-weight: 600 !important;
    }

    /* 5d) The old-theme sub-menu still sits in the DOM in front of our panel —
       jm_mnav_attach_panels() APPENDS, it doesn't replace. On Metervarer and
       Tilbehør that is invisible (rule 4 hides their pointer rows), but rule 4
       deliberately EXEMPTS stof-a-z, so the Stof A-Z row rendered a bold
       "Stof A-Z" summary followed by a second, lighter "Stof A-Z" row — the
       duplicate Marc photographed on 2026-07-30. That exemption made sense
       when the row's only real destination WAS the MAS link; the panel now
       carries "Se hele Stof A-Z-oversigten" itself, so the leftover wrapper is
       pure noise. Scoped to rows we actually replaced, so a MAS pointer
       anywhere else keeps working. */
    body.jm-v2 .shoptimizer-mobile-menu li.jm-mnav__has-panel > .sub-menu-wrapper {
        display: none !important;
    }

    /* 5e) Stof A-Z panel. Deliberately NOT the .jm-mnav__group accordions the
       category panels use: an alphabet is not a category tree, and 19 nested
       accordions meant you had to guess a letter before you saw one fabric
       (Marc 2026-07-30: "looks bad on mobile and not thought through").
       Drawer = shortest path — the 14 most-wanted fabrics up front, then a
       letter grid that deep-links into the A-Z page's own anchors. */
    body.jm-v2 .shoptimizer-mobile-menu .jm-azm {
        padding: 4px 15px 10px 0;
    }
    body.jm-v2 .shoptimizer-mobile-menu .jm-azm__eyebrow {
        margin: 10px 0 4px;
        font-family: 'Nunito', sans-serif;
        font-size: 11px;
        font-weight: 800;
        letter-spacing: 0.09em;
        text-transform: uppercase;
        color: var(--text-muted, #888);
    }
    /* Two columns: 14 single-file rows would be 600px of drawer before the
       alphabet even starts. */
    body.jm-v2 .shoptimizer-mobile-menu .jm-azm__pop {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 12px;
        list-style: none;
        margin: 0;
        padding: 0;
    }
    /* li AND a stretch to the grid row's height — ellers sætter den stiplede
       linje sig ved tekstens bund, og "Rib Jersey / Drop Needle" (to linjer)
       skubber højre kolonnes streger ud af takt med venstres. */
    body.jm-v2 .shoptimizer-mobile-menu .jm-azm__pop li {
        display: flex;
        margin: 0;
    }
    body.jm-v2 .shoptimizer-mobile-menu .jm-azm__pop li a {
        flex: 1 1 auto;
        display: flex;
        align-items: center;
        /* 42 → 44 (2026-08-01). `.jm-azm__all` 40 linjer længere nede stod
           allerede på 44, så de 42 var en forglemmelse og ikke et valg —
           to tap-mål i samme panel kan ikke have hver sin lov. 44 er
           minimum i både Apples og Googles retningslinjer. */
        min-height: 44px;
        padding: 8px 0;
        font-family: 'Nunito', sans-serif;
        font-size: 14px;
        font-weight: 600;
        line-height: 1.25;
        color: var(--text, #333E48);
        text-decoration: none;
        border-bottom: 1px dashed var(--border, #ECEAE6);
    }
    body.jm-v2 .shoptimizer-mobile-menu .jm-azm__letters {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
        gap: 6px;
        margin: 2px 0 4px;
    }
    body.jm-v2 .shoptimizer-mobile-menu .jm-azm__letters a,
    body.jm-v2 .shoptimizer-mobile-menu .jm-azm__letters .jm-azm__chip {
        appearance: none;
        -webkit-appearance: none;
        cursor: pointer;
    }
    body.jm-v2 .shoptimizer-mobile-menu .jm-azm__letters a,
    body.jm-v2 .shoptimizer-mobile-menu .jm-azm__letters .jm-azm__chip {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 44px; /* samme rettelse som .jm-azm__pop li a ovenfor */
        font-family: 'Nunito', sans-serif;
        font-size: 15px;
        font-weight: 800;
        color: var(--text, #333E48);
        text-decoration: none;
        background: #FBF9F7;
        border: 1px solid var(--border, #ECEAE6);
        border-radius: 8px;
    }
    /* Valgt bogstav: pink fyld — skal stå HER for at vinde specificitet over
       chip-grundreglen ovenfor. */
    body.jm-v2 .shoptimizer-mobile-menu .jm-azm__letters .jm-azm__chip.is-active {
        background: var(--jm-pink, #E27297);
        border-color: var(--jm-pink, #E27297);
        color: #fff;
    }
    /* Udfoldet bogstav-liste = polaroid-kort: hvid flade m. tape og let
       rotation, så det er TYDELIGT hvor stofferne vises (Marc 2026-08-07). */
    body.jm-v2 .shoptimizer-mobile-menu .jm-azm__list {
        position: relative;
        margin: 14px 2px 10px;
        padding: 16px 14px 8px;
        background: #fff;
        border: 1px dashed var(--border, #ECEAE6);
        border-radius: 10px;
        transform: rotate(-0.4deg);
        box-shadow: 0 2px 10px rgba(51, 62, 72, 0.06);
    }
    body.jm-v2 .shoptimizer-mobile-menu .jm-azm__list::before {
        content: '';
        position: absolute;
        top: -11px;
        left: 22px;
        width: 74px;
        height: 22px;
        background: rgba(226, 114, 151, 0.45);
        transform: rotate(-2deg);
        border-radius: 2px;
    }
    body.jm-v2 .shoptimizer-mobile-menu .jm-azm__list-head {
        display: block;
        font-family: 'JetBrains Mono', 'Courier New', monospace;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: var(--jm-pink-dark, #C75B80);
        padding-bottom: 6px;
        border-bottom: 1px dashed var(--border, #ECEAE6);
        margin-bottom: 2px;
    }
    body.jm-v2 .shoptimizer-mobile-menu .jm-azm__all {
        display: flex;
        align-items: center;
        min-height: 44px;
        margin-top: 6px;
        padding-top: 4px;
        font-family: 'Nunito', sans-serif;
        font-size: 14px;
        font-weight: 800;
        color: var(--jm-yellow, #C75B80);
        text-decoration: none;
        border-top: 1px dashed var(--border, #ECEAE6);
    }

    /* 6) Drawer container must scroll — the accordions can exceed 844px */
    body.jm-v2.mobile-toggled .col-full-nav {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
}


/* ═ MOBILE HEADER COMPACT — Marc mobile round items 1/2/3 (2026-07-24) ═
   1) Trust bar wrapped to two rows ≤480 (style.css column rule) → one slim
      nowrap row; 3rd item drops ≤639 (it already dropped ≤480 — same
      mechanism, earlier breakpoint, no copy change).
   2) Logo rendered 68×20 and sat left-of-centre (centerOffset -58px
      measured) → absolutely centred in the header row, 34px tall.
   3) "MENU" text label next to the burger hidden (Marc: unnecessary). */
@media (max-width: 899px) {
    body.jm-v2 .jm-trust-bar { padding: 5px 0; }
    body.jm-v2 .jm-trust-bar .col-full {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: center;
        gap: 14px;
        font-size: 11px;
        padding: 2px 10px;
    }
    body.jm-v2 .jm-trust-bar .jm-trust-item { white-space: nowrap; }
    body.jm-v2 .jm-trust-bar .jm-trust-item svg { width: 13px; height: 13px; }

    /* Announcement strip: one line as well (2 lines + trust bar + header
       made a ~230px chrome stack before any content) */
    body.jm-v2 .jm-announcement { padding-top: 7px; padding-bottom: 7px; }
    body.jm-v2 .jm-announcement-inner span,
    body.jm-v2 .jm-announcement span {
        display: block;
        font-size: 11px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}
@media (max-width: 639px) {
    body.jm-v2 .jm-trust-bar .jm-trust-item:nth-child(n+3) { display: none; }
}
@media (max-width: 992px) {
    /* 3) burger only, no text — keep a 44px square target */
    body.jm-v2 .menu-toggle .bar-text { display: none !important; }
    body.jm-v2 .menu-toggle { min-width: 44px; min-height: 44px; }

    /* 2) centred logo: anchor against the header row (full width), so the
       wordmark centres on the viewport, clear of burger (≤72px) and cart
       pill (≥305px): 34px tall ≈ 116px wide → 137-253px span. */
    body.jm-v2 .site-header .col-full { position: relative; }
    body.jm-v2 .site-header .site-branding { position: static; }
    body.jm-v2 .site-header .site-branding > a,
    body.jm-v2 .site-header .site-branding .custom-logo-link {
        position: absolute !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
        line-height: 0;
    }
    body.jm-v2 .site-header .site-branding img {
        height: 34px !important;
        width: auto !important;
        max-width: 210px !important;
    }
}


/* ═ BOTTOM TAB BAR AFFORDANCE — Marc mobile round item 5 (2026-07-24) ═
   "skal fremstå mere som en menu og være mere synlig": pink signal edge on
   top, deeper lift shadow, darker inactive ink, bolder active state. */
@media (max-width: 899px) {
    body.jm-v2 .fab-mbar {
        border-top: 2px solid var(--jm-pink, #E27297) !important;
        box-shadow: 0 -10px 28px rgba(40, 30, 30, 0.16) !important;
    }
    body.jm-v2 .fab-mbar__tab { color: #3F4A54 !important; }
    body.jm-v2 .fab-mbar__tab span {
        font-weight: 800 !important;
        letter-spacing: 0.05em !important;
    }
    body.jm-v2 .fab-mbar__tab.is-active { color: var(--jm-yellow, #C75B80) !important; }
    /* while either drawer is open the reopen pill + bar hide (bar rule
       exists above; consent pill added here — consent z 999997 would float
       over the dim overlay otherwise) */
    body.jm-v2.drawer-open #jm-consent-reopen,
    body.jm-v2.mobile-toggled #jm-consent-reopen { display: none !important; }
}


/* ═ POLAROID CAPTION DE-DUPE — Marc mobile round item 6 (2026-07-24) ═
   scrapbook.css draws the caption as .sb-polaroid::before; the later
   v2-extras "chunky frame" redesign added the same attr(data-name) caption
   as ::after (inside the white strip) WITHOUT retiring the old one. Both
   render: near-overlapping on desktop, clearly doubled on phones (the ≤639
   ::before respec moves only the old pseudo). Donor fabricly.eu has the
   identical live bug — fixed here on jm only (donor is read-only).
   Single caption = the designed ::after; the stale ::before is silenced at
   all widths. */
body.jm-v2 .sb-polaroid::before { content: none !important; }

/* ═ E2 DRAWER-POLISH (Marc 2026-08-08): polaroid-chrome på burger-draweren ═
   Normaliseringen ovenfor gav rækkerne stemme; her får selve ARKET scrapbogs-
   sproget: papir-baggrund, tape+eyebrow øverst, stiplet-pink luk-cirkel
   (søge-overlayets anti-stretch-mønster), taped-note på åbne paneler. */
@media (max-width: 992px) {
    body.jm-v2 #site-navigation.main-navigation {
        background: #FDFDFC !important;
        box-shadow: 8px 0 28px rgba(51, 62, 72, .14) !important;
    }

    body.jm-v2 .shoptimizer-mobile-menu { position: relative; padding-top: 42px !important; }
    body.jm-v2 .shoptimizer-mobile-menu::before {
        content: ''; position: absolute; top: 8px; left: 16px;
        width: 58px; height: 18px; background: rgba(240, 200, 175, .6);
        transform: rotate(-2deg); border-radius: 2px;
    }
    body.jm-v2 .shoptimizer-mobile-menu::after {
        content: '○ Menu'; position: absolute; top: 11px; left: 90px;
        font-family: 'JetBrains Mono', monospace; font-size: 11px;
        letter-spacing: .14em; text-transform: uppercase;
        color: var(--text-muted, #6B6660);
    }

    body.jm-v2 button.mobile-menu.close-drawer {
        appearance: none; -webkit-appearance: none;
        width: 40px !important; height: 40px !important;
        min-width: 40px !important; min-height: 40px !important;
        display: inline-flex !important; align-items: center !important;
        justify-content: center !important;
        background: #fff !important;
        border: 2px dashed var(--jm-pink, #C96F85) !important;
        border-radius: 999px !important;
        color: var(--jm-pink, #C96F85) !important;
        padding: 0 !important; box-shadow: none !important;
    }
    body.jm-v2 button.mobile-menu.close-drawer svg { width: 18px !important; height: 18px !important; }

    body.jm-v2 .mobile-overlay { background: rgba(51, 62, 72, .45) !important; }

    /* Åbne paneler = taped note, samme familie som facet-folderne */
    body.jm-v2 .shoptimizer-mobile-menu li.menu-item > .sub-menu-wrapper,
    body.jm-v2 .shoptimizer-mobile-menu details.jm-mnav__group[open] > ul {
        background: #FBF9F7 !important;
        border: 1px dashed var(--border, #ECEAE6) !important;
        border-radius: 10px !important;
        margin: 4px 0 10px !important;
        padding: 8px 10px !important;
    }

    body.jm-v2 .shoptimizer-mobile-menu > ul.menu > li.menu-item > a:active span {
        color: var(--jm-pink, #C96F85) !important;
    }
}
