/* ============================================================================
   JG-SHOP.CSS  -  JewishGen Shop section stylesheet
   CHW - 27 July 2026
   ----------------------------------------------------------------------------
   Companion to jg-global.css. Loaded ONLY on pages under /shop/.
   Stylesheet load order on shop pages:
       1. Bootstrap CDN
       2. /jg-global.css
       3. /shop/jg-shop.css   <-- this file
   ----------------------------------------------------------------------------
   COVERAGE
       1. Shop layout wrappers
       3. Entry card (hub: Books and Merchandise)
       4. Book spine strip (hub, decorative)
       5. Merch thumbnails (hub)
       6. Merch product grid + card (/shop/merch/)
       7. Loading / fallback states
       8. Cross-link band
       9. Shop buttons
      10. Product detail page
      11. Responsive
      12. Shopify-rendered parts, filter bar (shared with /shop/books/),
          merch page and product page extras
   ----------------------------------------------------------------------------
   TOKEN DISCIPLINE
       No hex outside explicit dark-mode overrides and the hardcoded navy fills
       required by the dark mode hazard. var(--navy) is NEVER used as a
       background - it flips to light gray and washes out.
   ----------------------------------------------------------------------------
   SAGE BUTTON LABELS - WHITE, ON PURPOSE
       Sage buttons use --sage #939b51 with a #ffffff label (2.98:1, below
       WCAG AA). Deliberate - do not change to charcoal. Dark mode passes.
       Non-button sage surfaces (tags, eyebrows) use charcoal.
   ----------------------------------------------------------------------------
   TODO
       - /shop/books/ still carries its own inline .book-card block. Migrate it
         onto .jg-merch-card or a shared .jg-product-card.
============================================================================ */


/* ============================================================================
   1. SHOP LAYOUT
============================================================================ */

.jg-shop-wrap {
    background-color: var(--ecru);
    padding: 2.5rem 2rem 4rem;
}
.jg-shop-inner {
    max-width: 1100px;
    margin: 0 auto;
}

/* Intro row - blurb left, cart button right (/shop/merch/) */
.jg-shop-intro {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}
.jg-shop-intro__text {
    flex: 1;
    min-width: 260px;
}
.jg-shop-intro p {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--charcoal);
}

/* Section heading with the sage underline rule, matching /shop/books/ */
.jg-shop-heading {
    margin: 0 0 1.25rem 0;
    font-size: 1.1875rem;
    color: var(--navy);
    position: relative;
    padding-bottom: 0.5rem;
    font-weight: bold;
    display: flex;
    align-items: baseline;
    gap: 0.625rem;
    flex-wrap: wrap;
}
.jg-shop-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--sage);
    border-radius: 2px;
}


/* MUTED TEXT - dim with explicit colours, never opacity. Opacity over
   --charcoal fails contrast in dark mode. */
.jg-muted-text  { color: #5b6161; }
body.dark-mode .jg-muted-text { color: #a8a8a8; }

/* ============================================================================
   3. ENTRY CARD  -  the hub's two front doors
============================================================================ */

.jg-entry-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
}

.jg-entry-card {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.07);
    padding: 1.875rem 1.75rem 1.625rem;
    display: flex;
    flex-direction: column;
    border-top: 5px solid var(--sage);
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.jg-entry-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.11);
}
body.dark-mode .jg-entry-card {
    background-color: #1e1e1e;
    box-shadow: 0 4px 18px rgba(0,0,0,0.4);
}

/* Merch variant - navy top rule instead of sage */
.jg-entry-card--merch { border-top-color: #09497a; }
body.dark-mode .jg-entry-card--merch { border-top-color: #8ab0c9; }

.jg-entry-card h3 {
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: normal;
    font-size: 1.375rem;
    color: var(--navy);
    margin: 0.75rem 0 0.375rem;
}
body.dark-mode .jg-entry-card h3 { color: #e0e0e0; }

.jg-entry-card__stat {
    font-size: 0.8125rem;
    color: #5b6161;           
    margin-bottom: 0.75rem;
}
body.dark-mode .jg-entry-card__stat { color: #a8a8a8; }

.jg-entry-card p {
    font-size: 0.875rem;
    margin: 0 0 1rem;
}

/* "How ordering works" note - books card only */
.jg-entry-card__how {
    background-color: var(--ecru);
    border-left: 3px solid var(--sage);
    border-radius: 6px;
    padding: 0.75rem 0.875rem;
    font-size: 0.78125rem;
    margin-bottom: 1.125rem;
}
body.dark-mode .jg-entry-card__how { background-color: #141414; }
.jg-entry-card__how strong {
    color: var(--navy);
    display: block;
    margin-bottom: 3px;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
body.dark-mode .jg-entry-card__how strong { color: #a8b361; }

.jg-entry-card__actions {
    margin-top: auto;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}


/* ============================================================================
   4. BOOK SPINE STRIP  -  decorative, hub only
   ----------------------------------------------------------------------------
   Decorative, aria-hidden in the markup.
============================================================================ */

/* Fixed 44px spines so the strip stays decorative and the card height is
   driven by content, not card width. */
.jg-spine-row {
    display: flex;
    gap: 6px;
    margin-bottom: 1rem;
}
.jg-spine {
    flex: 0 0 auto;
    width: 44px;
    height: 58px;
    border-radius: 2px;
    background-color: #09497a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.16);
}
body.dark-mode .jg-spine { background-color: #0d2a45; }
.jg-spine--sage { background-color: var(--sage); }
.jg-spine--cream { background-color: #b9ae94; }
body.dark-mode .jg-spine--cream { background-color: #6b6252; }


/* ----------------------------------------------------------------------------
   4b. QUICK LINKS  -  hub only, both entry cards
   Books links point at the filter anchors on /shop/books/ (#yizkor #memoirs
   #research #other) - change them together.
---------------------------------------------------------------------------- */

/* Chips with a resting border - plain text links do not read as clickable */
.jg-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1.125rem;
    padding: 0;
    list-style: none;
}
.jg-quick-links a {
    display: inline-flex;
    align-items: baseline;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: bold;
    color: var(--navy);
    text-decoration: none;
    padding: 0.375rem 0.75rem;
    border: 1px solid #c9c2b2;
    border-radius: 16px;
    background-color: var(--white);
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.jg-quick-links a:hover {
    border-color: var(--sage);
    background-color: rgba(147,155,81,0.12);
    color: var(--navy);
}
.jg-quick-links a:focus-visible {
    outline: 2px solid var(--sage);
    outline-offset: 2px;
}
body.dark-mode .jg-quick-links a {
    color: #8ab0c9;
    border-color: #3a3a3a;
    background-color: #191919;
}
body.dark-mode .jg-quick-links a:hover {
    border-color: #a8b361;
    background-color: rgba(168,179,97,0.14);
    color: #a8b361;
}
.jg-quick-links em {
    font-style: normal;
    font-weight: normal;
    color: #5b6161;           
    font-size: 0.75rem;
}
body.dark-mode .jg-quick-links em { color: #a8a8a8; }


/* ============================================================================
   5. MERCH THUMBNAILS  -  hub only
   ----------------------------------------------------------------------------
   Base cell styles. The hub uses the photo variant below, filled from
   Shopify.
============================================================================ */

.jg-merch-mini {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.jg-merch-mini__cell {
    background-color: var(--ecru);
    border: 2px dashed #b4ac99;
    border-radius: 6px;
    padding: 0.875rem 0.5rem;
    text-align: center;
}
body.dark-mode .jg-merch-mini__cell {
    background-color: #141414;
    border-color: #4a4a4a;
}
.jg-merch-mini__label {
    font-size: 0.6875rem;
    font-weight: bold;
    color: var(--navy);
    margin-top: 2px;
}
body.dark-mode .jg-merch-mini__label { color: #e0e0e0; }

/* ----------------------------------------------------------------------------
   Real product photography variant.
   Fixed 68px flex row, not the 3-column grid: square images in the grid grow
   with the card and dominate it. These are supporting thumbnails - keep them
   subordinate to the heading and the CTA.
---------------------------------------------------------------------------- */

.jg-merch-mini--photos {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.jg-merch-mini__cell--img {
    flex: 0 0 auto;
    width: 68px;
    height: 68px;
    border: 1px solid #d1caba;
    border-style: solid;
    padding: 0;
    overflow: hidden;
    background-color: var(--cream);
}
body.dark-mode .jg-merch-mini__cell--img {
    border-color: #333;
    background-color: #2a2a2a;
}
.jg-merch-mini__cell--img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


/* ============================================================================
   6. MERCH PRODUCT GRID  -  /shop/merch/
   ----------------------------------------------------------------------------
   Shopify Storefront Web Components inject data only (shopify-data /
   shopify-money / shopify-media); the markup and classes are ours, so these
   rules and dark mode apply normally.
============================================================================ */

.jg-merch-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.jg-merch-card {
    background-color: var(--white);
    border: 1px solid #d1caba;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.jg-merch-card:hover {
    border-color: var(--sage);
    box-shadow: 0 5px 18px rgba(0,0,0,0.10);
    transform: translateY(-2px);
}
body.dark-mode .jg-merch-card {
    background-color: #1e1e1e;
    border-color: #333;
}
body.dark-mode .jg-merch-card:hover { border-color: #a8b361; }

/* shopify-media renders an <img> inside this wrapper */
.jg-merch-card__media {
    background-color: var(--cream);
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
body.dark-mode .jg-merch-card__media { background-color: #2a2a2a; }
.jg-merch-card__media img,
.jg-merch-card__media shopify-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.jg-merch-card__body {
    padding: 0.875rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.375rem;
}
.jg-merch-card__title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 0.9375rem;
    font-weight: normal;
    line-height: 1.35;
    color: var(--navy);
    margin: 0;
    flex: 1;
}
body.dark-mode .jg-merch-card__title { color: #e0e0e0; }
.jg-merch-card__price {
    font-size: 1.0625rem;
    font-weight: bold;
    color: var(--navy);
}
body.dark-mode .jg-merch-card__price { color: #e0e0e0; }


/* ----------------------------------------------------------------------------
   6b. PRODUCT COLOUR SWATCHES
   ----------------------------------------------------------------------------
   TOKEN EXCEPTION: swatch fills are physical garment colours and must not
   flip in dark mode, so they are hardcoded on purpose. Used by the hub; the
   product page uses Shopify's variant selector instead.
---------------------------------------------------------------------------- */

.jg-swatches {
    display: flex;
    gap: 5px;
    margin-top: 0.25rem;
    align-items: center;
    flex-wrap: wrap;
}
.jg-swatches__label {
    font-size: 0.625rem;
    color: #5b6161;           
    margin-right: 2px;
}
body.dark-mode .jg-swatches__label { color: #a8a8a8; }
.jg-swatch {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 1.5px solid #ccc;
    cursor: pointer;
    display: inline-block;
    padding: 0;
    background-clip: padding-box;
    transition: outline 0.1s ease;
}
.jg-swatch:focus-visible,
.jg-swatch.is-active {
    outline: 2px solid var(--sage);
    outline-offset: 2px;
}
body.dark-mode .jg-swatch { border-color: #555; }
body.dark-mode .jg-swatch.is-active { outline-color: #a8b361; }

/* Physical garment colours - do not flip in dark mode */
.jg-swatch--navy    { background-color: #09497a; }
.jg-swatch--white   { background-color: #ffffff; border-color: #bbb; }
.jg-swatch--washout { background-color: #7fa8c4; }
.jg-swatch--natural { background-color: #e8e1c8; border-color: #bbb; }

/* Larger swatches on a product detail page */
.jg-swatches--lg .jg-swatch {
    width: 36px;
    height: 36px;
    border-width: 2px;
}
.jg-swatches--lg .jg-swatch.is-active { outline-offset: 3px; }


/* ----------------------------------------------------------------------------
   6c. MERCH CARD LINK WRAPPER
   ----------------------------------------------------------------------------
   The anchor wraps the card's image and title only. Keep buttons and
   swatches outside it.
---------------------------------------------------------------------------- */

.jg-merch-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.jg-merch-card__link:hover .jg-merch-card__title { color: var(--sage); }
.jg-merch-card__link:focus-visible {
    outline: 2px solid var(--sage);
    outline-offset: -2px;
}
.jg-merch-card__link img { transition: transform 0.2s ease; }
.jg-merch-card__link:hover img { transform: scale(1.03); }

.jg-merch-card__meta {
    font-size: 0.6875rem;
    color: #5b6161;           
    margin: 0;
}
body.dark-mode .jg-merch-card__meta { color: #a8a8a8; }
.jg-merch-card__desc {
    font-size: 0.75rem;
    color: var(--charcoal);
    line-height: 1.5;
    margin: 0;
    flex: 1;
}
.jg-merch-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.625rem;
    gap: 6px;
}


/* ============================================================================
   7. LOADING / FALLBACK STATES
   ----------------------------------------------------------------------------
   A storefront that fails to load must not leave a blank page under the header.
============================================================================ */

.jg-shop-state {
    text-align: center;
    padding: 3.5rem 1.5rem;
    color: var(--charcoal);
    font-size: 0.9375rem;
}
.jg-shop-state strong {
    display: block;
    color: var(--navy);
    margin-bottom: 0.375rem;
}
body.dark-mode .jg-shop-state strong { color: #e0e0e0; }
.jg-shop-state a {
    color: var(--navy);
    font-weight: bold;
    text-decoration: underline dotted;
    text-underline-offset: 3px;
}
body.dark-mode .jg-shop-state a { color: #8ab0c9; }

/* Hidden until the timeout in the page script reveals it */
.jg-shop-state--hidden { display: none; }


/* ============================================================================
   8. CROSS-LINK BAND
============================================================================ */

.jg-shop-cross {
    background-color: var(--cream);
    padding: 2.5rem 2rem;
}
.jg-shop-cross__inner {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}
.jg-shop-cross h2 {
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: normal;
    font-size: 1.375rem;
    color: var(--navy);
    margin: 0 0 0.5rem;
}
body.dark-mode .jg-shop-cross h2 { color: #e0e0e0; }
.jg-shop-cross p {
    font-size: 0.9375rem;
    margin: 0 0 1.125rem;
}


/* ============================================================================
   9. SHOP BUTTONS
   ----------------------------------------------------------------------------
   Navy fills are hardcoded #09497a / #0d2a45 - var(--navy) flips to light gray
   in dark mode and would wash the button out entirely.
============================================================================ */

.jg-btn-shop {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    background-color: #09497a;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 0.8125rem;
    font-weight: bold;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: filter 0.2s ease;
}
.jg-btn-shop:hover { filter: brightness(1.15); color: #ffffff; }
.jg-btn-shop:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; }
body.dark-mode .jg-btn-shop { background-color: #0d2a45; color: #ffffff; }

/* Sage variant - white label, see header */
.jg-btn-shop--sage {
    background-color: var(--sage);
    color: #ffffff;
}
.jg-btn-shop--sage:hover { color: #ffffff; }
body.dark-mode .jg-btn-shop--sage { background-color: #a8b361; color: #121212; }
body.dark-mode .jg-btn-shop--sage:hover { color: #121212; }

/* Outline variant */
.jg-btn-shop-ghost {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    background: none;
    border: 2px solid var(--sage);
    color: var(--navy);
    border-radius: 4px;
    font-size: 0.8125rem;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.15s ease;
}
.jg-btn-shop-ghost:hover {
    background-color: rgba(147,155,81,0.15);
    color: var(--navy);
}
.jg-btn-shop-ghost:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; }
body.dark-mode .jg-btn-shop-ghost { color: #e0e0e0; border-color: #a8b361; }

/* Small add-to-cart button inside a merch card */
.jg-btn-add {
    background-color: var(--sage);
    color: #ffffff;
    border: none;
    padding: 0.5rem 0.875rem;
    border-radius: 5px;
    font-size: 0.6875rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    font-family: inherit;
    margin-top: 0.375rem;
    transition: filter 0.15s ease, transform 0.15s ease;
}
.jg-btn-add:hover { filter: brightness(1.08); transform: translateY(-1px); }
.jg-btn-add:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
body.dark-mode .jg-btn-add { background-color: #a8b361; color: #121212; }
body.dark-mode .jg-btn-add:focus-visible { outline-color: #ffffff; }

/* Cart trigger */
.jg-cart-btn {
    background-color: #09497a;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    padding: 0.625rem 1.125rem;
    font-size: 0.8125rem;
    font-weight: bold;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: filter 0.15s ease;
}
.jg-cart-btn:hover { filter: brightness(1.15); }
.jg-cart-btn:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; }
body.dark-mode .jg-cart-btn { background-color: #0d2a45; }
.jg-cart-count {
    background-color: var(--sage);
    color: #232b2b;
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 0.6875rem;
    min-width: 20px;
    text-align: center;
}
body.dark-mode .jg-cart-count { background-color: #a8b361; color: #121212; }


/* ============================================================================
   10. PRODUCT DETAIL PAGE  -  /shop/merch/product.html
   ----------------------------------------------------------------------------
   Layout and our own copy. Shopify-rendered parts are in section 12.
============================================================================ */

.jg-pdp {
    max-width: 1100px;
    margin: 2.5rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
}

/* -- Breadcrumbs -- */
.jg-breadcrumb {
    background-color: var(--white);
    border-bottom: 1px solid #d1caba;
    padding: 0.875rem 2rem;
    font-size: 0.8125rem;
}
body.dark-mode .jg-breadcrumb {
    background-color: #1e1e1e;
    border-bottom-color: #333;
}
.jg-breadcrumb a { color: var(--navy); text-decoration: none; }
.jg-breadcrumb a:hover { color: var(--sage); text-decoration: underline; }
body.dark-mode .jg-breadcrumb a { color: #8ab0c9; }
.jg-breadcrumb span { margin: 0 0.5rem; opacity: 0.45; }

/* -- Gallery -- */
.jg-pdp__gallery { display: flex; flex-direction: column; gap: 1rem; }
.jg-pdp__main {
    background-color: var(--cream);
    border: 1px solid #d1caba;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 4 / 5;
}
body.dark-mode .jg-pdp__main { background-color: #2a2a2a; border-color: #333; }
.jg-pdp__main img,
.jg-pdp__main shopify-media {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.jg-pdp__thumbs { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.jg-pdp__thumb {
    width: 80px; height: 80px;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.65;
    padding: 0;
    background: none;
    transition: opacity 0.2s ease, border-color 0.2s ease;
}
.jg-pdp__thumb:hover,
.jg-pdp__thumb.is-active { opacity: 1; border-color: var(--sage); }
.jg-pdp__thumb:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; }
.jg-pdp__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* -- Info column -- */
.jg-pdp__info h1 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 2rem;
    font-weight: normal;
    color: var(--navy);
    margin: 0 0 0.5rem;
}
body.dark-mode .jg-pdp__info h1 { color: #e0e0e0; }
.jg-pdp__price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--navy);
    margin-bottom: 1.25rem;
}
body.dark-mode .jg-pdp__price { color: #e0e0e0; }
.jg-pdp__info > p { font-size: 0.9375rem; }

/* -- Mission callout -- */
.jg-mission-callout {
    background-color: var(--light-blue);
    border-left: 4px solid var(--navy);
    padding: 1rem 1.125rem;
    margin: 1.5rem 0;
    font-size: 0.875rem;
    line-height: 1.55;
    border-radius: 0 6px 6px 0;
}
body.dark-mode .jg-mission-callout {
    border-left-color: #a8b361;
    /* --light-blue does not flip - swap the fill in dark mode */
    background-color: var(--cream);
    color: var(--charcoal);
}
.jg-mission-callout strong { color: var(--navy); }
body.dark-mode .jg-mission-callout strong { color: #a8b361; }

/* -- Variant groups -- */
.jg-variant-group { margin-bottom: 1.5rem; }
.jg-variant-label {
    font-size: 0.875rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.625rem;
    display: block;
    color: var(--charcoal);
}
.jg-variant-label span { font-weight: normal; text-transform: none; color: #5b6161; }
body.dark-mode .jg-variant-label span { color: #a8a8a8; }

.jg-size-pills { display: flex; gap: 0.625rem; flex-wrap: wrap; }
.jg-size-pill {
    border: 1px solid #d1caba;
    background-color: var(--white);
    color: var(--charcoal);
    padding: 0.625rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}
.jg-size-pill:hover { border-color: var(--sage); }
.jg-size-pill:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; }
/* Selected pill - navy fill hardcoded, var(--navy) would wash out */
.jg-size-pill.is-active {
    background-color: #09497a;
    color: #ffffff;
    border-color: #09497a;
}
body.dark-mode .jg-size-pill { background-color: #1e1e1e; border-color: #333; color: #c8c8c8; }
body.dark-mode .jg-size-pill.is-active {
    background-color: #a8b361;
    color: #121212;
    border-color: #a8b361;
}

/* -- Action area -- */
.jg-pdp__action {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #d1caba;
}
body.dark-mode .jg-pdp__action { border-top-color: #333; }
.jg-btn-add-lg {
    width: 100%;
    background-color: var(--sage);
    color: #ffffff;
    border: none;
    padding: 1.125rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    font-family: inherit;
    transition: filter 0.15s ease;
}
.jg-btn-add-lg:hover { filter: brightness(1.08); }
.jg-btn-add-lg:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.jg-btn-add-lg:disabled { opacity: 0.5; cursor: not-allowed; }
body.dark-mode .jg-btn-add-lg { background-color: #a8b361; color: #121212; }
body.dark-mode .jg-btn-add-lg:focus-visible { outline-color: #ffffff; }

/* -- Specs accordion. Bootstrap supplies behaviour; this is the skin. -- */
.jg-pdp__specs { margin-top: 2.5rem; }
.jg-pdp__specs .accordion-item {
    border: none;
    border-bottom: 1px solid #d1caba;
    background: transparent;
}
body.dark-mode .jg-pdp__specs .accordion-item { border-bottom-color: #333; }
.jg-pdp__specs .accordion-button {
    background: transparent;
    font-weight: bold;
    color: var(--charcoal);
    padding: 1rem 0;
    box-shadow: none;
}
.jg-pdp__specs .accordion-button:not(.collapsed) { color: var(--navy); background: transparent; }
body.dark-mode .jg-pdp__specs .accordion-button { color: #c8c8c8; }
body.dark-mode .jg-pdp__specs .accordion-button:not(.collapsed) { color: #a8b361; }
.jg-pdp__specs .accordion-button:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; }
.jg-pdp__specs .accordion-body {
    padding: 0 0 1rem 0;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--charcoal);
}
.jg-pdp__specs ul { margin: 0; padding-left: 1.25rem; }


/* ============================================================================
   11. RESPONSIVE
============================================================================ */

@media (max-width: 1024px) {
    .jg-merch-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    .jg-entry-grid { grid-template-columns: 1fr; }
    .jg-pdp { grid-template-columns: 1fr; gap: 2rem; margin: 1.75rem auto; }
}

@media (max-width: 768px) {
    .jg-shop-wrap { padding: 2rem 1.25rem 3rem; }
    .jg-merch-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .jg-shop-cross { padding: 2rem 1.25rem; }
    .jg-pdp { padding: 0 1.25rem; }
    .jg-breadcrumb { padding: 0.75rem 1.25rem; }
    .jg-quick-links { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
    .jg-merch-grid { grid-template-columns: 1fr 1fr; gap: 0.875rem; }
    .jg-entry-card { padding: 1.5rem 1.25rem 1.25rem; }
}


/* ============================================================================
   12. SHOPIFY-RENDERED PARTS
   ----------------------------------------------------------------------------
   <shopify-variant-selector> and <shopify-cart> render inside shadow DOM;
   only their ::part() hooks can be styled. Tokens and body.dark-mode still
   apply. ::part(radio) is the visible size pill (the label), not the input.
   Navy fills are hardcoded #09497a: var(--navy) washes out in dark mode.
============================================================================ */

/* -- Shopify wrappers: let merch cards sit directly in the grid -- */
.jg-merch-grid shopify-context,
.jg-merch-grid shopify-list-context { display: contents; }

/* -- PDP description, from product.descriptionHtml -- */
.jg-pdp__desc { font-size: 0.9375rem; margin-bottom: 1.5rem; }
.jg-pdp__desc p { margin: 0 0 0.75rem; }
.jg-pdp__desc ul { padding-left: 1.25rem; margin: 0 0 0.75rem; }

/* -- Buy Now: outline, secondary to the sage Add to Cart -- */
.jg-btn-buy-lg {
    width: 100%;
    margin-top: 0.75rem;
    background-color: transparent;
    color: #09497a;
    border: 2px solid #09497a;
    padding: 1rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.jg-btn-buy-lg:hover { background-color: #09497a; color: #ffffff; }
.jg-btn-buy-lg:focus-visible { outline: 3px solid var(--sage); outline-offset: 2px; }
.jg-btn-buy-lg:disabled { opacity: 0.5; cursor: not-allowed; }
body.dark-mode .jg-btn-buy-lg { color: #a8b361; border-color: #a8b361; }
body.dark-mode .jg-btn-buy-lg:hover { background-color: #a8b361; color: #121212; }

/* -- Variant selector. Mirrors .jg-variant-label and .jg-size-pill -- */
shopify-variant-selector::part(form) {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
shopify-variant-selector::part(label) {
    font-size: 0.875rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--charcoal);
}
shopify-variant-selector::part(radio) {
    border: 1px solid #d1caba;
    background-color: var(--white);
    color: var(--charcoal);
    padding: 0.625rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
}
shopify-variant-selector::part(radio):hover { border-color: var(--sage); }
shopify-variant-selector::part(radio-selected) {
    background-color: #09497a;
    color: #ffffff;
    border-color: #09497a;
}
shopify-variant-selector::part(radio-disabled) {
    opacity: 0.45;
    text-decoration: line-through;
    cursor: not-allowed;
}
shopify-variant-selector::part(color-swatch) {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    border: 1px solid #bbb;
}
shopify-variant-selector::part(color-swatch-selected) {
    outline: 2px solid #09497a;
    outline-offset: 3px;
}
shopify-variant-selector::part(color-swatch-disabled) { opacity: 0.45; }
shopify-variant-selector::part(select) {
    border: 1px solid #d1caba;
    background-color: var(--white);
    color: var(--charcoal);
    padding: 0.625rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
}
body.dark-mode shopify-variant-selector::part(radio),
body.dark-mode shopify-variant-selector::part(select) {
    background-color: #1e1e1e;
    border-color: #333;
    color: #c8c8c8;
}
body.dark-mode shopify-variant-selector::part(radio-selected) {
    background-color: #a8b361;
    color: #121212;
    border-color: #a8b361;
}
body.dark-mode shopify-variant-selector::part(color-swatch-selected) { outline-color: #a8b361; }

/* -- Cart dialog. Shopify: secondary-button MUST include fill -- */
shopify-cart::part(dialog) {
    background-color: var(--white);
    color: var(--charcoal);
    border: 1px solid #d1caba;
    border-radius: 8px;
}
shopify-cart::part(line-heading) { color: var(--charcoal); font-weight: bold; }
shopify-cart::part(primary-button) {
    background-color: #09497a;
    color: #ffffff;
    border: 0;
    border-radius: 6px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}
shopify-cart::part(primary-button):hover { filter: brightness(1.15); }
shopify-cart::part(secondary-button) {
    background-color: var(--white);
    color: var(--charcoal);
    fill: var(--charcoal);
    border: 1px solid #d1caba;
    border-radius: 4px;
}
body.dark-mode shopify-cart::part(dialog) { border-color: #333; }
body.dark-mode shopify-cart::part(primary-button) { background-color: #a8b361; color: #121212; }
body.dark-mode shopify-cart::part(secondary-button) { border-color: #333; }

/* -- product.html: hidden until the JG-only check passes -- */
.jg-pdp-pending .jg-pdp,
.jg-pdp-pending .jg-breadcrumb { visibility: hidden; }

/* -- Filter bar - shared by /shop/books/ and /shop/merch/ -- */
.shop-toolbar {
    background-color: var(--white);
    border: 1px solid #d1caba;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px 18px;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}
.shop-filters { display: flex; flex-wrap: wrap; gap: 4px; }
.filter-btn {
    background: none;
    border: none;
    padding: 7px 13px;
    font-size: 0.8125rem;
    font-weight: bold;
    color: var(--navy);
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}
.filter-btn:hover { background-color: rgba(147,155,81,0.15); color: var(--sage); }
.filter-btn:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; }
/* Navy fill hardcoded - var(--navy) washes out in dark mode */
.filter-btn.active { background-color: #09497a; color: #ffffff; }
body.dark-mode .shop-toolbar { background-color: #1e1e1e; border-color: #333; }
body.dark-mode .filter-btn { color: #c8c8c8; }
body.dark-mode .filter-btn:hover { background-color: #2a2a2a; color: var(--sage); }
body.dark-mode .filter-btn.active { background-color: #a8b361; color: #121212; }
.jg-merch-grid[hidden] { display: none; }

/* -- Merch page intro callout -- */
.jg-shop-intro__callout { margin: 0; }
.jg-shop-intro__actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}
.jg-shop-intro__actions [hidden] { display: none; }

/* -- Hub merch thumbnails from Shopify -- */
.jg-merch-mini shopify-context,
.jg-merch-mini shopify-list-context { display: contents; }
.jg-merch-mini__cell--img shopify-media {
    display: block;
    width: 100%;
    height: 100%;
}