/*
   WUME — Shop page Stage-2 DESKTOP layout overrides.

   SCOPE: desktop rules are prefixed `body.is-shop-page` AND wrapped in
   @media (min-width: 992px) so the synced MOBILE grid is left alone. A few
   tile-text rules sit at base level so the new card markup (name / brand /
   price, no description) reads correctly on phones too.

   Figma ref: figma-final/screens/desktop/shop.png. Two-column body: left
   filter sidebar (category list + FILTER BY) + right 3-up product grid; a
   CATEGORY / CONCERN ... SORT BY filter header above. Tiles are borderless,
   edge-to-edge product photos (aspect 333/451) with an uppercase name, a WUME
   brand line and the price.
   NOTE: the amber-oil HERO PHOTO band + transparent overlay nav are deferred —
   the hero photo asset is not in the local design assets (TODO ASSET).

   V02 Stage-2b MOBILE layout (<=991.98px, target 393px) appended at the end,
        scoped body.is-shop-page inside @media (max-width:991.98px). Matches
        figma-final/screens/mobile/shop.png: left-aligned hero title (amber-oil
        band still deferred — TODO ASSET, falls back to sand); single-row
        CATEGORY / CONCERN ... SORT BY filter header with hairline rule; the
        desktop filter SIDEBAR (category list + FILTER BY group) is hidden;
        product grid forced 2-up (167px tiles, 10px gutter, 24px side margin,
        aspect 333/451). Desktop (>=992px) untouched.
*/

/* base (all viewports): tile text for the new card markup */
body.is-shop-page .wume-shop-tile-name {
    margin: 14px 0 2px;
    text-transform: uppercase;
    letter-spacing: var(--wume-tracking-caps);
    font-family: var(--wume-font-body);
    font-size: 0.78rem;
    font-weight: var(--wume-w-sub);
    color: var(--wume-black);
    line-height: 1.3;
}
body.is-shop-page .wume-shop-tile-brand {
    margin: 0 0 4px;
    text-transform: uppercase;
    letter-spacing: var(--wume-tracking-caps);
    font-family: var(--wume-font-body);
    font-size: 0.72rem;
    color: var(--wume-lbrown);
}
body.is-shop-page .wume-shop-tile .wume-product-price {
    font-size: 0.85rem;
    color: var(--wume-black);
    font-weight: var(--wume-w-body);
}
/* tile image (all viewports): edge-to-edge product photo, aspect 333/451 */
body.is-shop-page .wume-shop-tile .wume-product-img {
    width: 100%;
    aspect-ratio: 333 / 451;
    height: auto;
    object-fit: cover;
    background: var(--wume-sand);
    display: block;
}

@media (min-width: 992px) {

    /* 36px gutters / 1368 content width. */
    body.is-shop-page .wume-shop-body > .container {
        max-width: 1440px;
        padding: 0 36px;
    }

    /* Hero: left-aligned 3.5rem title, no subtitle (photo band deferred). */
    body.is-shop-page .wume-hero {
        text-align: left;
        padding: 60px 0 32px;
    }
    body.is-shop-page .wume-hero .container {
        max-width: 1440px;
        padding: 0 36px;
    }
    body.is-shop-page .wume-hero-title {
        font-size: 3.5rem;
        text-align: left;
        margin: 0;
    }
    body.is-shop-page .wume-hero-subtitle { display: none; }

    /* Filter header: CATEGORY / CONCERN tabs (left) + SORT BY (right) + rule. */
    body.is-shop-page .wume-shop-filterbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-bottom: 14px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.18);
        margin-bottom: 32px;
    }
    body.is-shop-page .wume-shop-tabs {
        display: flex;
        gap: 28px;
    }
    body.is-shop-page .wume-shop-tab,
    body.is-shop-page .wume-shop-sort {
        background: none;
        border: 0;
        padding: 0;
        text-transform: uppercase;
        letter-spacing: var(--wume-tracking-caps);
        font-family: var(--wume-font-body);
        font-weight: var(--wume-w-sub);
        font-size: 0.72rem;
        color: var(--wume-black);
        cursor: pointer;
    }
    body.is-shop-page .wume-shop-tab.is-active { text-decoration: underline; text-underline-offset: 4px; }

    /* Two-column body: sidebar (236px) + product grid. */
    body.is-shop-page .wume-shop-layout {
        display: grid;
        grid-template-columns: 236px 1fr;
        column-gap: 48px;
        align-items: start;
    }
    body.is-shop-page .wume-shop-cats {
        list-style: none;
        margin: 0 0 40px;
        padding: 0;
    }
    body.is-shop-page .wume-shop-cats li {
        margin-bottom: 14px;
        text-transform: uppercase;
        letter-spacing: var(--wume-tracking-caps);
        font-size: 0.72rem;
        color: var(--wume-black);
        cursor: pointer;
    }
    body.is-shop-page .wume-shop-filterby {
        margin: 0 0 16px;
        text-transform: uppercase;
        letter-spacing: var(--wume-tracking-caps);
        font-size: 0.72rem;
        color: var(--wume-lbrown);
    }
    body.is-shop-page .wume-shop-filter-group {
        display: flex;
        justify-content: space-between;
        padding: 12px 0;
        border-top: 1px solid rgba(0, 0, 0, 0.12);
        text-transform: uppercase;
        letter-spacing: var(--wume-tracking-caps);
        font-size: 0.72rem;
        color: var(--wume-black);
    }

    /* Product grid: tighter gutters. */
    body.is-shop-page #product-grid {
        --bs-gutter-x: 12px;
        --bs-gutter-y: 28px;
    }

    /* TILE: borderless, edge-to-edge photo (333/451 cover) + text below. */
    body.is-shop-page .wume-shop-tile {
        display: block;
        text-decoration: none;
        color: inherit;
    }
    body.is-shop-page .wume-shop-tile .wume-product-img {
        width: 100%;
        aspect-ratio: 333 / 451;
        height: auto;
        object-fit: cover;
        background: var(--wume-sand);
        display: block;
    }
    body.is-shop-page .wume-shop-tile-name { margin-top: 16px; }
}

/* ────────────────────────────────────────────────────────────────────────
   MOBILE (<= 991.98px, target 393px) — figma-final/screens/mobile/shop.png
   Measured @ 393px: 24px side margins; filter rule at y=298 spanning 345px;
   2-up grid (tiles 167px, 10px gutter); image aspect 333/451 (167x226);
   hero title left-aligned, cap ~32px at x=24 (amber band deferred = sand).
   ──────────────────────────────────────────────────────────────────────── */
@media (max-width: 991.98px) {

    /* Page gutters: 24px each side (content width 345px at 393px viewport). */
    body.is-shop-page .wume-shop-body > .container {
        padding-left: 24px;
        padding-right: 24px;
    }

    /* HERO — left-aligned title on the (deferred) amber-oil band; sand fill
       fallback. Band measured ~206px tall incl. overlaid nav; here the global
       sticky nav stays above so the hero gives the title its own sand block. */
    body.is-shop-page .wume-hero {
        text-align: left;
        background: var(--wume-sand);
        padding: 40px 0 36px;
    }
    body.is-shop-page .wume-hero .container {
        padding-left: 24px;
        padding-right: 24px;
    }
    body.is-shop-page .wume-hero-title {
        text-align: left;
        font-size: 2rem;        /* ~32px cap measured in band */
        margin: 0;
    }

    /* FILTER HEADER — single row: CATEGORY / CONCERN (left) + SORT BY (right),
       hairline rule beneath. */
    body.is-shop-page .wume-shop-filterbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-bottom: 12px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.22);
        margin-bottom: 24px;
    }
    body.is-shop-page .wume-shop-tabs {
        display: flex;
        gap: 22px;
    }
    body.is-shop-page .wume-shop-tab,
    body.is-shop-page .wume-shop-sort {
        background: none;
        border: 0;
        padding: 0;
        text-transform: uppercase;
        letter-spacing: var(--wume-tracking-caps);
        font-family: var(--wume-font-body);
        font-weight: var(--wume-w-sub);
        font-size: 0.66rem;
        color: var(--wume-black);
        cursor: pointer;
        white-space: nowrap;
    }
    body.is-shop-page .wume-shop-tab.is-active {
        text-decoration: underline;
        text-underline-offset: 4px;
    }

    /* The desktop filter SIDEBAR (category list + FILTER BY group) is not
       present in the mobile design — hide it; the layout becomes grid-only. */
    body.is-shop-page .wume-shop-sidebar { display: none; }
    body.is-shop-page .wume-shop-layout { display: block; }

    /* GRID — force 2-up. The JS emits col-md-6 col-lg-4, which collapse to
       full width below Bootstrap's md (768px); override to 50% so phones get
       two tiles per row with a 10px gutter. */
    body.is-shop-page #product-grid {
        --bs-gutter-x: 10px;
        --bs-gutter-y: 30px;
    }
    body.is-shop-page #product-grid > [class*="col-"] {
        flex: 0 0 auto;
        width: 50%;
    }

    /* TILE TEXT — tighten for the narrower column (name 2 lines, brand, price).
       Base-level rules already set the family/colour; just scale + spacing. */
    body.is-shop-page .wume-shop-tile .wume-product-img {
        aspect-ratio: 333 / 451;
    }
    body.is-shop-page .wume-shop-tile-name {
        margin: 14px 0 4px;
        font-size: 0.74rem;
        line-height: 1.3;
    }
    body.is-shop-page .wume-shop-tile-brand {
        margin: 0 0 4px;
        font-size: 0.68rem;
    }
    body.is-shop-page .wume-shop-tile .wume-product-price {
        font-size: 0.8rem;
    }
}
