/* Galle Book Shop customer UI theme.
   Loaded AFTER css/style.css (which @imports components.css) on customer-shell
   pages only, so it re-themes the shared design tokens for the storefront
   without touching admin pages or the legacy stylesheet itself. Every color
   here is expressed through the SAME custom-property names the existing
   components already consume (--brand-primary, --primary-strong, etc.) so
   the sitewide cascade repaints automatically instead of needing a rule
   rewritten per component. */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@700;900&family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Caveat:wght@600;700&display=swap');

:root{
   /* Canonical GALLE brand navy - the exact computed colour of the storefront
      header's "All Categories" button (rgb(13,32,64)). components.css (auth +
      admin pages) declares the same value; keep the two in sync. */
   --galle-navy:#0D2040;
   --galle-navy-deep:#0A192F;

   /* Primary "brand-*" token family */
   --brand-primary:var(--galle-navy);
   --brand-primary-hover:#1450A3;
   --brand-primary-dark:var(--galle-navy-deep);
   --brand-primary-soft:#E7ECF6;
   --brand-primary-pale:#F4F6FA;
   --brand-navy:var(--galle-navy);
   --brand-dark:var(--galle-navy-deep);
   --brand-red:var(--galle-navy);
   --brand-red-dark:var(--galle-navy-deep);

   /* "primary/secondary" token family (buttons, prices, eyebrows) */
   --primary:var(--galle-navy);
   --primary-strong:var(--galle-navy);
   --primary-soft:#E7ECF6;
   --primary-soft-2:#F4F6FA;
   --secondary:#1450A3;
   --secondary-strong:var(--galle-navy);
   --secondary-soft:#E7ECF6;

   /* Surfaces + text */
   --page-background:#FAF8F3;
   --background-main:#FAF8F3;
   --background-soft:#F5F1E6;
   --surface:#FFFFFF;
   --surface-muted:#F4F1E9;
   --surface-low:#F4F1E9;
   --text:#16203A;
   --text-primary:#16203A;
   --text-soft:#3B4459;
   --muted:#5B6472;
   --text-secondary:#5B6472;
   --border-color:#E4E0D5;

   /* Type */
   --font-heading:'Playfair Display','Noto Sans Sinhala',Georgia,serif;

   /* Wider working canvas: the inherited container tokens (1320-1400px)
      read as a narrow centered column on a 1440-1600px desktop next to the
      supplied references, which run edge-to-edge with generous gutters. */
   --container:1480px;
   --container-width:1480px;

   /* Type scale, defined at :root (not just body.homepage-redesign below)
      because .gbs-checkout-*/.gbs-cart-*/.gbs-product-* etc. already
      consume these vars via fallback on cart/checkout/product pages, which
      never carry body.homepage-redesign. Values are corrected for the real
      10px rem base (html{font-size:62.5%} in components.css) - they were
      authored assuming a 16px root, same defect as the .gbs-book-* card
      fix elsewhere in this file, so real content (order totals, product
      names, checkout labels) was rendering at 6.9-9.4px. */
   --gbs-fs-hero:clamp(3.2rem, 2.4vw + 1.6rem, 4.4rem);
   --gbs-lh-hero:1.27;
   --gbs-fs-h2:2.6rem;
   --gbs-lh-h2:1.31;
   --gbs-fs-h3:2rem;
   --gbs-lh-h3:1.4;
   --gbs-fs-h4:1.6rem;
   --gbs-lh-h4:1.5;
   --gbs-fs-body-lg:1.6rem;
   --gbs-lh-body-lg:1.625;
   --gbs-fs-body-md:1.4rem;
   --gbs-lh-body-md:1.57;
   --gbs-fs-body-sm:1.2rem;
   --gbs-lh-body-sm:1.5;
   --gbs-fs-label:1.4rem;
   --gbs-lh-label:1.43;
   --gbs-fs-label-sm:1.2rem;
   --gbs-fs-overline:1.1rem;
   --gbs-fs-price:1.5rem;
}

/* ---------------------------------------------------------------------
   Homepage-only design-reference tokens (design-reference/galle_book_shop_
   distributors/DESIGN.md + screen.png_1 / screen.png_2).

   Scoped to body.homepage-redesign (home.php's own body class) rather than
   :root, so ONLY the homepage repaints to the approved reference palette
   and type system - Shop/Category/Search/Product/Cart/Checkout etc. keep
   the palette already approved for them in an earlier pass. This is a
   custom-property re-declaration, not a rewrite: every existing component
   rule elsewhere in this file already reads var(--brand-primary) etc., so
   scoping the override here is enough to repaint every homepage section
   without touching another page's CSS or markup.
   --------------------------------------------------------------------- */
body.homepage-redesign,
body.gbs-content-page{
   --brand-primary:var(--galle-navy);
   --brand-primary-hover:var(--galle-navy-deep);
   --brand-primary-dark:var(--galle-navy-deep);
   --brand-primary-soft:#E0F2FE;
   --brand-primary-pale:#F8FAFC;
   --brand-navy:var(--galle-navy);
   --brand-dark:#1E293B;
   --brand-accent:#2563EB;
   --brand-accent-hover:#1D4ED8;
   --page-background:#F8FAFC;
   --background-main:#F8FAFC;
   --background-soft:#F1F5F9;
   --surface:#FFFFFF;
   --surface-muted:#F1F5F9;
   --surface-low:#F1F5F9;
   --text:#1E293B;
   --text-primary:#1E293B;
   --text-soft:#334155;
   --muted:#64748B;
   --text-secondary:#64748B;
   --border-color:#E2E8F0;
   --font-heading:'Merriweather','Noto Sans Sinhala',Georgia,serif;
   --font-body:'Plus Jakarta Sans','Noto Sans Sinhala','Segoe UI',Arial,sans-serif;

   /* Reference container: design-reference/galle_book_shop_distributors/
      DESIGN.md specifies a 1280px max desktop container - narrower than the
      1480px inherited by the rest of the site. Custom properties inherit
      down the DOM, so re-declaring it here (body-scoped) is enough to
      narrow header.php/home.php's shared width-consuming rules without
      touching any other page's body. */
   --container-width:1280px;
   --container:1280px;

   /* Type scale (DESIGN.md `typography` tokens) now lives at :root above -
      it's since been reused sitewide (cart/checkout/product), not just the
      homepage this comment originally scoped it to - so this body-scoped
      copy would only drift from the real one and was removed. */

   /* Shape + elevation (DESIGN.md `rounded`/elevation tokens) */
   --gbs-radius-card:.75rem;
   --gbs-radius-control:.5rem;
   --gbs-radius-cover:.375rem;
   --gbs-shadow-1:0 1px 3px 0 rgba(13,32,64,.05), 0 1px 2px -1px rgba(13,32,64,.05);
   --gbs-shadow-2:0 8px 16px -4px rgba(13,32,64,.08), 0 4px 6px -2px rgba(13,32,64,.04);

   /* Spacing cadence (DESIGN.md `spacing` tokens) */
   --gbs-space-xs:.25rem;
   --gbs-space-sm:.5rem;
   --gbs-space-md:1rem;
   --gbs-space-lg:1.5rem;
   --gbs-space-xl:2.5rem;

   /* The one vertical rhythm value between homepage body sections (hero,
      categories, promo row, every product rail), matching the Stitch
      reference's tight `space-y-9`-style cadence. Every homepage section
      gets its inter-section gap ONLY from this (via `main > * + *` below)
      instead of each section separately declaring its own margin/padding,
      which is what produced the old 70-110px compounded gaps. */
   --gbs-section-gap:18px;
}

/* Inherited, not a universal-selector rule, so FontAwesome's own .fas/.far/
   .fab rules (which target the <i> elements directly) still win - a direct
   rule always beats an inherited value regardless of specificity. */
body.homepage-redesign,
body.gbs-content-page{
   font-family:var(--font-body);
}

body.homepage-redesign .section-head > a,
body.homepage-redesign .gbs-promo-link,
body.homepage-redesign .mini-banner-link{
   color:var(--brand-accent);
}

body.homepage-redesign .section-head > a:hover{
   color:var(--brand-accent-hover);
}

/* ---------------------------------------------------------------------
   Content-page container width (about.php/contact.php/
   user_profile_update.php). These three still inherit the site-wide
   :root --container/--container-width of 1480px, while every
   redesigned customer page (Home/Shop/Product/Wishlist, via
   body.homepage-redesign above) uses 1280px - the width their own
   Stitch references actually specify (about_us/contact_branches/
   account_profile's code.html all use Tailwind's max-w-7xl, 1280px, the
   same as all_books/shop's own reference). Every section on these three
   pages (.about-hero/.about/.reviews, .contact/.contact-head/
   .contact-layout, .commerce-hero/.update-profile - see css/style.css)
   already consumes width via var(--container)/var(--container-width),
   so re-declaring just those two custom properties here is enough to
   bring all of them to 1280px in one place, without adopting
   body.homepage-redesign's full colour/font repaint (unverified on
   user_profile_update.php, which is behind a login this pass had no
   credentials for - this keeps the fix to the one genuinely-confirmed
   inconsistency, width, per GALLE V1's "fix only genuine width/
   alignment inconsistency" instruction). */
body.gbs-content-page{
   --container:1280px;
   --container-width:1280px;
}

/* ---------------------------------------------------------------------
   Standardized section heading (reference: title first, small grey
   subtitle underneath, "View All" right-aligned) - reused by every
   .section-head on the homepage (category/promo/featured/collections)
   without any markup change: the existing DOM order is eyebrow-then-title,
   column-reverse flips the *visual* order only.

   Gated to min-width:681px so it never fights the already-tuned
   ≤680px/≤390px .homepage-redesign .section-head rules in style.css
   (mobile keeps its own approved stacked heading + visible category
   label from an earlier pass). */
@media (min-width:681px){
   body.homepage-redesign .section-head{
      align-items:flex-end;
      margin:0 0 14px;
   }

   body.homepage-redesign .section-head > div{
      display:flex;
      flex-direction:column-reverse;
      gap:4px;
   }

   body.homepage-redesign .section-head .title{
      font-size:var(--gbs-fs-h2);
      line-height:var(--gbs-lh-h2);
      font-weight:700;
      letter-spacing:-.01em;
      color:var(--text-primary);
      margin:0;
   }

   body.homepage-redesign .section-head .eyebrow{
      font-size:var(--gbs-fs-body-md);
      font-weight:400;
      text-transform:none;
      letter-spacing:0;
      color:var(--text-secondary);
   }

   body.homepage-redesign .section-head > a{
      flex:0 0 auto;
      font-family:var(--font-body);
      font-size:var(--gbs-fs-label);
      font-weight:600;
   }

   body.homepage-redesign .section-head > a::after{
      content:"\2192";
      margin-left:6px;
   }

   /* The category strip has no heading in the reference desktop screenshot
      (icons sit directly under the hero) - the heading/"View all products"
      link stay in the DOM for accessibility and SEO, just not shown
      visually. Desktop-only: the mobile reference DOES label this section
      ("Explore by Category"), which the existing mobile CSS already shows. */
   body.homepage-redesign .gbs-sr-only-head{
      position:absolute;
      width:1px;
      height:1px;
      margin:-1px;
      padding:0;
      overflow:hidden;
      clip:rect(0,0,0,0);
      white-space:nowrap;
      border:0;
   }
}

/* ...but the comment above only ever documented the mobile un-hide - it was
   never actually written, so the category strip rendered with no visible
   label at any phone width (style.css's .homepage-redesign .section-head
   ≤680px rules above were sitting unused). Undo the sr-only clip here so
   the already-tuned mobile heading (style.css ~L4670) actually shows. */

/* Uniform section rhythm (desktop): every direct section under <main> used
   to carry its OWN top+bottom padding/margin (36-50px each), so two
   adjacent sections' gaps added together into 70-110px of blank space.
   `main > * + *` alone can't fix this: several sections (.home-category,
   .products, .footer.customer-footer) carry an OLDER same-or-higher-
   specificity margin-top of their own (18px/18px/48px, from style.css's
   legacy homepage rules), which always wins over the plain-descendant
   `main > * + *` selector regardless of source order. Matching THEIR
   selector shape (one extra class/element) here - not just adding a
   universal-child rule - is what actually lets a single shared value win
   every inter-section gap, including the one before the footer.
   Mobile-specific padding (set separately, below 681px, elsewhere in the
   cascade) is untouched. */
@media (min-width:681px){
   body.homepage-redesign .home-category,
   body.homepage-redesign .gbs-promo-row,
   body.homepage-redesign .home-featured-products,
   body.homepage-redesign .homepage-catalog-section,
   body.homepage-redesign .home-section-products{
      padding-block:0;
      margin-top:var(--gbs-section-gap);
   }

   /* .gbs-shop-heading/.gbs-shop-results are bare <section> elements too,
      so they inherited the legacy generic `section{padding:44px 0}` reset
      never meant for this redesign - it doubled up with the real content
      (heading+badge wrapping to two lines at tablet widths) into ~200px
      of dead space above shop.php's product toolbar. */
   body.homepage-redesign .gbs-shop-heading,
   body.homepage-redesign .gbs-shop-results{
      padding-block:0;
   }

   body.homepage-redesign .footer.customer-footer{
      margin-top:var(--gbs-section-gap);
   }

   body.homepage-redesign main > * + *{
      margin-top:var(--gbs-section-gap);
   }

   body.homepage-redesign main{
      padding-bottom:0;
   }
}

/* ---------------------------------------------------------------------
   Header - full two-row rebuild (brand / search / actions, then nav)
   --------------------------------------------------------------------- */

.gbs-header{
   border-bottom:1px solid var(--border-color);
}

.site-header .flex.customer-header-main.gbs-header-row{
   width:min(var(--container-width), calc(100% - 40px));
   min-height:0;
   padding:8px 0 0;
   display:grid;
   grid-template-columns:auto minmax(280px, 1fr) auto;
   grid-template-areas:
      "brand search actions"
      "nav nav nav";
   align-items:center;
   column-gap:28px;
   row-gap:0;
}

/* Brand block: mark/logo + stacked name+tagline. Overrides the legacy
   .logo{font-family:var(--font-heading)} rule from components.css, which
   otherwise leaks the serif heading face onto this anchor itself (the
   visible name/tagline already set their own font via .gbs-brand-name/
   .gbs-brand-tagline below). */
.gbs-header .gbs-brand{
   grid-area:brand;
   display:flex;
   align-items:center;
   gap:10px;
   min-width:0;
   padding-bottom:8px;
   font-family:var(--font-body);
}

.gbs-brand-mark{
   display:grid;
   place-items:center;
   width:38px;
   height:38px;
   border-radius:50%;
   background:var(--brand-primary);
   color:#fff;
   font-size:1.4rem;
   flex:0 0 auto;
}

.gbs-header .customer-brand-logo{
   width:auto;
   max-width:150px;
   max-height:52px;
   object-fit:contain;
   flex:0 0 auto;
}

.gbs-brand-text{
   display:flex;
   flex-direction:column;
   line-height:1.2;
   min-width:0;
}

.gbs-brand-name{
   font-family:var(--font-heading);
   font-weight:700;
   font-size:1.62rem;
   color:var(--brand-primary);
   white-space:nowrap;
}

.gbs-brand-tagline{
   font-size:1.02rem;
   font-weight:600;
   letter-spacing:.01em;
   color:var(--text-secondary);
   white-space:nowrap;
}

/* Search: leading icon, wide field, trailing navy button - one real form
   posting GET to search_page.php?search_box=... (the exact param the
   backend already reads), so pressing Enter or the button both work even
   before the JS suggestion dropdown attaches. */
.gbs-search-form{
   grid-area:search;
   position:relative;
   display:flex;
   align-items:stretch;
   width:100%;
   max-width:640px;
   margin:0 auto 8px;
   border:1px solid #CBD3E1;
   border-radius:10px;
   background:#fff;
   overflow:visible;
}

.gbs-search-icon-leading{
   display:grid;
   flex:0 0 40px;
   place-items:center;
   width:40px;
   padding:0;
   color:var(--text-secondary);
   font-size:1.3rem;
   line-height:1;
}

.gbs-search-form #search-box{
   flex:1 1 auto;
   align-self:stretch;
   min-width:0;
   height:auto;
   margin:0;
   padding:0 14px 0 0;
   border:0;
   border-radius:0;
   box-shadow:none;
   background:transparent;
   text-overflow:ellipsis;
   line-height:normal;
   color:var(--text-primary);
   font-size:1.28rem;
}

.gbs-search-form #search-box:focus{
   outline:0;
}

.gbs-search-submit{
   flex:0 0 auto;
   height:40px;
   padding:0 26px;
   border:0;
   border-radius:0 9px 9px 0;
   background:var(--brand-primary);
   color:#fff;
   font-weight:700;
   font-size:1.2rem;
   cursor:pointer;
}

.gbs-search-submit:hover{
   background:var(--brand-primary-hover);
}

.gbs-search-form #suggestions{
   top:calc(100% + 6px);
}

/* Actions: icon row on top, phone/WhatsApp support line beneath */
.gbs-header-actions{
   grid-area:actions;
   display:flex;
   flex-direction:column;
   align-items:flex-end;
   gap:4px;
   padding-bottom:8px;
}

/* align-items:center (from the shared .icons base) centred each action on
   its OWN box height, and every box is a different height: Cart carries a
   second "Rs. X" line Wishlist/Logout don't, and My Account's two-word
   label wraps to two lines at some widths but not others - so the icons
   themselves never sat on one line. flex-start pins every icon to the same
   top row regardless of what text follows underneath it. */
.gbs-icons.icons{
   flex-wrap:nowrap;
   align-items:flex-start;
   gap:22px;
}

.gbs-icons .header-action,
.gbs-icons .header-cart-action,
.gbs-icons .logout-btn{
   min-width:52px;
}

.gbs-icons .header-action{
   flex-direction:column;
   align-items:center;
   gap:2px;
   font-size:1.05rem;
   color:var(--text-primary);
}

.gbs-icons .header-action span{
   text-align:center;
}

.gbs-icons .header-action i{
   font-size:1.4rem;
   color:var(--brand-primary);
}

.gbs-icons .header-action span,
.gbs-icons .header-cart-label,
.gbs-icons .header-cart-copy{
   font-size:1.05rem;
   font-weight:600;
   line-height:1.2;
   color:var(--text-primary);
}

.gbs-icons .header-cart-action{
   flex-direction:column;
   align-items:center;
}

.gbs-icons .header-cart-icon{
   position:relative;
}

.gbs-icons .logout-btn{
   flex-direction:column;
   gap:2px;
   min-height:0;
   padding:0;
   background:transparent;
   color:var(--text-primary);
   font-size:1.05rem;
}

.gbs-icons .logout-btn i{
   font-size:1.4rem;
   color:var(--brand-primary);
}

.gbs-icons .logout-btn:hover{
   background:transparent;
   color:var(--brand-primary);
}

.gbs-support-row{
   grid-area:support;
   justify-self:end;
   display:flex;
   align-items:center;
   min-width:0;
   max-width:100%;
}

.gbs-support-link{
   display:inline-flex;
   align-items:center;
   gap:6px;
   color:var(--text-secondary);
   font-size:1.2rem;
   font-weight:600;
   line-height:16px;
   white-space:nowrap;
}

.gbs-support-link + .gbs-support-link{
   margin-left:14px;
   padding-left:14px;
   border-left:1px solid var(--border-color);
}

.gbs-support-link i{
   width:12px;
   font-size:1.1rem;
   text-align:center;
   color:var(--brand-primary);
}

.gbs-whatsapp-link i{
   color:#25D366;
}

.gbs-support-link:hover{
   color:var(--brand-primary);
}

/* Nav row: All Categories pill, primary labels, secondary links right */
.gbs-navbar.navbar{
   grid-area:nav;
   width:100%;
   display:flex;
   align-items:center;
   gap:26px;
   min-height:40px;
   padding-top:6px;
   border-top:1px solid var(--border-color);
}

.gbs-all-categories{
   position:relative;
   flex:0 0 auto;
}

.gbs-all-categories-toggle{
   display:inline-flex;
   align-items:center;
   gap:9px;
   min-height:42px;
   padding:0 18px;
   border-radius:8px;
   background:var(--brand-primary);
   color:#fff;
   font-weight:700;
   font-size:1.22rem;
   cursor:pointer;
   list-style:none;
}

.gbs-caret{
   font-size:.9rem;
}

.gbs-all-categories-toggle::-webkit-details-marker{display:none}

.gbs-all-categories-toggle:hover{
   background:var(--brand-primary-hover);
}

.gbs-all-categories-menu{
   position:absolute;
   z-index:1005;
   top:calc(100% + 8px);
   left:0;
   width:min(280px, 86vw);
   max-height:70vh;
   overflow-y:auto;
   padding:10px;
   border:1px solid var(--border-color);
   border-radius:14px;
   background:#fff;
   box-shadow:var(--shadow-hover,0 16px 38px rgba(11,42,99,.16));
}

.gbs-all-categories-menu a{
   display:block;
   padding:9px 10px;
   border-radius:8px;
   color:var(--text-primary);
   font-size:1.2rem;
}

.gbs-all-categories-menu a:hover{
   background:var(--brand-primary-soft);
   color:var(--brand-primary);
}

.gbs-nav-primary{
   display:flex;
   align-items:center;
   gap:24px;
   flex:1 1 auto;
}

.gbs-navbar .gbs-nav-primary a{
   color:var(--text-primary);
   font-weight:600;
   font-size:1.24rem;
}

.gbs-navbar .gbs-nav-primary a:hover{
   color:var(--brand-primary);
}

.gbs-nav-secondary{
   display:flex;
   align-items:center;
   gap:20px;
   flex:0 0 auto;
}

.gbs-nav-secondary-link{
   color:var(--text-secondary);
   font-size:1.12rem;
}

.gbs-nav-secondary-link:hover{
   color:var(--brand-primary);
}

.desktop-nav-only{display:inline-flex}
.mobile-nav-only{display:none}

@media (max-width:1080px){
   .site-header .flex.customer-header-main.gbs-header-row{
      /* minmax(0, 1fr), not a bare 1fr: the un-minmax'd version this
         breakpoint used to have let the search column's own min-content
         width (.gbs-search-form's icon+input+button, ~220px) force the
         whole row wider than a narrow viewport instead of shrinking with
         it - a second, independent overflow source from the #menu-btn one
         below, only exposed once that one stopped dominating. Confirmed
         via Playwright: real, reproducible document.documentElement.
         scrollWidth overflow at 281px specifically (the narrowest required
         test width) even with #menu-btn correctly placed. The base
         (>1080px) rule above already uses minmax(280px, 1fr) for the same
         reason; this breakpoint's copy had simply lost that. */
      grid-template-columns:auto minmax(0, 1fr) auto auto;
      grid-template-areas:
         "brand brand actions menu"
         "search search search ."
         "nav nav nav .";
      padding-top:12px;
   }

   /* #menu-btn (the mobile hamburger) has no grid-area of its own anywhere
      in this stylesheet, so at this breakpoint - where every explicit cell
      above is already claimed by a named area - the browser auto-places it
      outside the explicit 3-column grid, growing the row wide enough to
      overflow the viewport by ~18-57px at 281-320px widths (confirmed via
      direct DOM measurement: #menu-btn's own bounding-box right edge sat
      past document.documentElement.clientWidth). Naming its real position
      explicitly is the fix: same visual spot (top-right, beside "actions"),
      but now inside the grid's own column budget instead of pushing past
      it.

      The 4th column is a "." (empty cell) on the search/nav rows rather
      than repeating their name, on purpose: .gbs-navbar.navbar is
      absolutely positioned with grid-area:nav (set in the base rule
      above) and width:100%, and CSS Grid's own spec gives an
      absolutely-positioned item with a named grid-area that area's own
      box as its containing block for that 100% - so nav's rendered width
      exactly follows however many columns "nav" spans here. A first
      attempt spanned all 4 ("nav nav nav nav"), which widened the open
      drawer to the row's full ~350px instead of the compact ~260-320px
      panel the design/tests expect (regression caught by
      tests/public/header.spec.js's "compact left-anchored drawer" check
      at 375-430px, which had been passing pre-fix - the drawer's old
      "narrow" width was itself just an accident of the overflow bug,
      not a real 3-vs-4-column design decision, but the resulting size is
      the one already approved). Column 4 exists only for #menu-btn's row;
      search/nav keep spanning the original 3. */
   #menu-btn{
      grid-area:menu;
   }

   /* Re-assert the collapsible off-canvas panel behavior for the rebuilt
      nav: my unguarded `.gbs-navbar.navbar{display:flex}` rule above has
      the same specificity as components.css's mobile rule but loads later,
      so it would otherwise win at every width and leave the nav always
      visible instead of collapsing behind #menu-btn. */
   .gbs-navbar.navbar{
      position:absolute;
      top:calc(100% + 8px);
      left:0;
      right:0;
      /* minmax(0,1fr) above lets the search/nav column track shrink with
         a narrow viewport (needed to stop it overflowing at 281px - see
         that comment), but at exactly 281px it shrinks nav's own
         drawer to ~171px, tighter than the ~180px floor its rows need to
         stay comfortable, tappable touch targets. min-width holds that
         floor without reintroducing overflow: nav is still left:0-
         anchored, and 190px + its 20px inset is nowhere near even the
         narrowest required width (281px). */
      min-width:190px;
      z-index:1010;
      display:flex;
      flex-direction:column;
      align-items:stretch;
      gap:10px;
      padding:14px;
      border:1px solid #e5e7eb;
      border-radius:14px;
      background:#fff;
      box-shadow:var(--shadow-hover,0 18px 48px rgba(15,23,42,.14));
      clip-path:inset(0 0 100% 0);
      pointer-events:none;
      transition:clip-path .18s ease;
   }

   .gbs-navbar.navbar.active{
      clip-path:inset(0);
      pointer-events:auto;
   }

   .gbs-header-actions{
      align-items:flex-end;
   }

   .gbs-icons.icons{gap:16px}

   .gbs-search-form{margin:10px auto 12px}

   .gbs-all-categories{order:0;width:100%}
   .gbs-all-categories-toggle{width:100%;justify-content:center}
   .gbs-all-categories-menu{position:static;width:100%;box-shadow:none;margin-top:6px}

   .gbs-nav-primary{
      order:1;
      width:100%;
      flex-wrap:wrap;
      gap:14px;
   }

   .gbs-nav-secondary{
      order:2;
      width:100%;
      flex-wrap:wrap;
   }

   .desktop-nav-only{display:none}
   .mobile-nav-only{display:inline-flex}
}

/* ---------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------- */

.customer-footer{
   background:var(--brand-primary-dark);
   color:#E7ECF6;
}

.customer-footer h3{
   font-family:var(--font-heading);
   color:#fff;
}

.customer-footer .footer-links a,
.customer-footer .footer-links p{
   color:#C7D2E8;
}

.customer-footer .footer-links a:hover{
   color:#fff;
}

.customer-footer .footer-brand p{
   color:#AEBBD8;
}

.customer-footer .credit{
   border-top:1px solid rgba(255,255,255,.14);
   color:#9AA8C7;
}

.customer-footer .developer-credit{
   background:rgba(255,255,255,.04);
}

.customer-footer .developer-credit-title,
.customer-footer .developer-credit-services{
   color:#9AA8C7;
}

.customer-footer .developer-credit-title a{
   color:#C7D2E8;
}

/* Hide a social link left unconfigured rather than pointing at "#". */
.customer-footer .footer-links a[href="#"]{
   display:none;
}

/* ---------------------------------------------------------------------
   Section headings / eyebrows sitewide
   --------------------------------------------------------------------- */

.eyebrow,
.shop-heading .eyebrow,
.shop-category-panel .eyebrow,
.section-head > a{
   color:var(--brand-primary);
}

h1,
.shop-heading h1,
.shop-listing-toolbar h2,
.section-head .title,
.title,
.page-hero h1,
.commerce-hero h1,
.checkout-page-heading h1,
.cart-page-heading h1{
   font-family:var(--font-heading);
   letter-spacing:0;
}

/* ---------------------------------------------------------------------
   Homepage hero - Stitch desktop reference: full-bleed photo with a
   left-to-right gradient mask, headline/CTAs/trust badges overlaid in a
   ~46%-wide content zone on top of the image (design-reference/
   galle_book_shop_desktop_homepage/code.html, HeroSection).
   --------------------------------------------------------------------- */

.gbs-hero{
   width:100%;
   margin-top:0;
   border:0;
   border-radius:0;
   background:transparent;
}

.gbs-hero .gbs-hero-composition{
   width:min(var(--container-width), calc(100% - 40px));
   margin:16px auto 0;
   padding:0;
   border:1px solid var(--border-color);
   border-radius:var(--gbs-radius-card, 12px);
   background:var(--surface);
   box-shadow:var(--gbs-shadow-1, 0 1px 3px 0 rgba(13,32,64,.05), 0 1px 2px -1px rgba(13,32,64,.05));
   overflow:hidden;
}

.gbs-hero .gbs-hero-composition,
.homepage-redesign .gbs-hero-composition{
   grid-template-columns:1fr;
}

/* .homepage-redesign .hero-main-banner/.hero-visual carry an older
   "grocery banner" 2-column grid + aspect-ratio/contain treatment
   elsewhere in style.css, at the same 2-class specificity as .gbs-hero-*
   alone - matching that selector shape here (and loading after) is what
   lets this full-bleed Stitch treatment actually win the cascade. */
.homepage-redesign .hero-main-banner,
.gbs-hero-main{
   display:block;
   position:relative;
   min-height:400px;
   grid-template-columns:none;
   border:0;
   background:#FFFFFF;
   box-shadow:none;
   overflow:hidden;
}

.homepage-redesign .hero-main-banner .content,
.gbs-hero-main .content{
   position:relative;
   z-index:10;
   display:flex;
   flex-direction:column;
   justify-content:center;
   align-self:auto;
   width:46%;
   max-width:none;
   min-height:400px;
   padding:20px 32px 18px 40px;
}

.gbs-hero-heading,
.homepage-redesign .hero-main-banner h1.gbs-hero-heading{
   display:block;
   margin:8px 0 10px;
   max-width:none;
   font-family:var(--font-heading);
   font-weight:700;
   font-size:var(--gbs-fs-hero, clamp(2.6rem, 3.4vw, 4.4rem));
   line-height:var(--gbs-lh-hero, 1.12);
   letter-spacing:-.01em;
   color:var(--text-primary);
}

.gbs-hero .content .gbs-hero-heading-accent{
   display:block;
   border:0;
   border-radius:0;
   padding:0;
   background:none;
   font-size:1em;
   font-weight:inherit;
   font-family:inherit;
   line-height:inherit;
   color:var(--brand-primary);
}

.gbs-hero-main .content p{
   max-width:46ch;
   margin:0 0 10px;
   font-size:var(--gbs-fs-body-lg, 1rem);
   line-height:var(--gbs-lh-body-lg, 1.5);
   color:var(--text-secondary);
}

/* style.css's .hero-actions carries its own 22-24px margin-top (single-
   class selector, same specificity) - matching it here, loaded after,
   is what lets the tighter homepage rhythm actually win instead of
   stacking on top of the paragraph's own margin-bottom above. */
.hero-actions{
   margin-top:0;
}

.hero-actions .option-btn{
   color:var(--brand-primary);
   border-color:#C8CFE0;
}

.gbs-hero-trust{
   display:flex;
   flex-wrap:nowrap;
   align-items:center;
   gap:14px;
   margin-top:10px;
   padding-top:8px;
   border-top:1px solid rgba(148,163,184,.35);
}

.gbs-hero .content .gbs-hero-trust > span{
   display:flex;
   flex:1 1 0;
   min-width:0;
   align-items:center;
   gap:7px;
   border:0;
   border-radius:0;
   padding:0;
   background:none;
   color:var(--text-secondary);
}

/* style.css's ".store-hero .content span" (a bare descendant-span rule)
   also matches the SECOND, nested span here (the strong+small text
   wrapper) - not just the direct-child span above - and dresses it up
   as a rounded pill (padding, border, border-radius:999px, white fill).
   The direct-child override above never reached this nested span, so the
   pill kept rendering around the title/subtitle text. Matching that
   nested depth specifically is what removes it. */
.gbs-hero .content .gbs-hero-trust > span > span{
   display:block;
   flex:1 1 auto;
   min-width:0;
   width:auto;
   margin:0;
   border:0;
   border-radius:0;
   padding:0;
   background:none;
   color:inherit;
   font-size:inherit;
}

.gbs-hero-trust i{
   flex:0 0 auto;
   font-size:1.3rem;
   color:var(--brand-primary);
}

.gbs-hero-trust strong{
   display:block;
   overflow:hidden;
   text-overflow:ellipsis;
   font-size:.76rem;
   font-weight:700;
   color:var(--text-primary);
   line-height:1.25;
   white-space:nowrap;
}

.gbs-hero-trust small{
   display:block;
   overflow:hidden;
   text-overflow:ellipsis;
   font-size:.62rem;
   font-weight:500;
   color:var(--text-secondary);
   white-space:nowrap;
}

.homepage-redesign .hero-visual,
.gbs-hero-visual{
   position:absolute;
   inset:0 0 0 auto;
   z-index:0;
   width:62%;
   height:100%;
   aspect-ratio:auto;
   min-height:0;
   border-radius:0;
   background:transparent;
   overflow:hidden;
}

.homepage-redesign .hero-visual img,
.gbs-hero-visual img{
   position:static;
   width:100%;
   height:100%;
   max-width:none;
   max-height:none;
   min-height:400px;
   margin:0;
   object-fit:cover;
   object-position:center;
}

/* Left-to-right gradient over the photo (Stitch's .hero-mask), independent
   of the image's own content so the overlaid headline/CTAs on the left
   stay readable regardless of how the browser crops/scales the source. */
.gbs-hero-mask{
   position:absolute;
   inset:0;
   z-index:1;
   /* Solid through 44% so the real (unconstrained-width) heading and the
      46ch paragraph - both live inside the 46%-wide .content column -
      never sit over a barely-masked, busy part of the photo (book spines,
      the handwritten "...Tomorrow" caption); short, sharp taper after
      that keeps the crisp solid-to-photo cut on the right of the image. */
   background:linear-gradient(90deg, #FFFFFF 0%, rgba(255,255,255,.75) 10%, rgba(255,255,255,.2) 20%, rgba(255,255,255,0) 28%);
}

@media (max-width:940px){
   /* Reference mobile order: heading -> subtitle -> CTAs -> hero image ->
      trust row (design-reference/galle_book_shop_mobile_app_homepage). The
      image drops out of the overlay and becomes a normal rounded card
      below the copy - .content is unwrapped (display:contents) so its
      children can each get their own order alongside the sibling
      .gbs-hero-visual, no markup change, same elements, just re-sequenced. */
   .homepage-redesign .hero-main-banner,
   .gbs-hero-main{
      /* The heading/subtitle/CTA/image/trust order:1-5 below only takes
         effect in a flex or grid container - the base (desktop) rule
         above is display:block for its full-bleed image-with-overlay
         layout, and nothing here ever switched it to flex, so every
         order value was silently inert and the image (first in DOM,
         for the desktop overlay to stack it under .content) rendered
         first on mobile too instead of after the CTAs as intended. */
      display:flex;
      flex-direction:column;
      min-height:0;
      padding:28px 20px 24px;
   }

   .homepage-redesign .hero-main-banner .content,
   .gbs-hero-main .content{
      display:contents;
   }

   .gbs-hero-main .content > h1.gbs-hero-heading{
      order:1;
      margin-top:0;
   }

   .gbs-hero-main .content > p{
      order:2;
   }

   .gbs-hero-main .content > .hero-actions{
      order:3;
      flex-direction:column;
      align-items:stretch;
      width:100%;
   }

   .gbs-hero-main .content > .hero-actions .btn,
   .gbs-hero-main .content > .hero-actions .option-btn{
      width:100%;
      text-align:center;
      justify-content:center;
   }

   .homepage-redesign .hero-visual,
   .gbs-hero-visual{
      position:relative;
      inset:auto;
      order:4;
      width:100%;
      height:auto;
      min-height:0;
      margin:20px 0 0;
      border-radius:var(--gbs-radius-cover, 8px);
      overflow:hidden;
   }

   .gbs-hero-mask{
      display:none;
   }

   .gbs-hero-main .content > .gbs-hero-trust{
      order:5;
      margin-top:16px;
   }

   /* Base rule's height:100% resolves against .gbs-hero-visual's own
      height, which - now that .content is unwrapped via display:contents -
      is itself derived from .gbs-hero-main's auto height, a circular
      reference that inflated the wrapper by ~300px of blank card
      background below the image. height:auto here breaks the loop; the
      image's own box then sizes from min/max-height alone. */
   .homepage-redesign .hero-visual img,
   .gbs-hero-visual img{
      height:auto;
      min-height:200px;
      max-height:260px;
      object-position:center;
   }

   .homepage-redesign .hero-main-banner .content,
   .gbs-hero-main .content{
      width:100%;
      min-height:0;
   }
}

/* Below ~480px three equal flex-basis trust items (Store Pickup/Wide
   Catalogue/Customer Support) don't have room for their two-line
   icon+label content - "Customer Support" truncated to "Customer
   Supp..." even with the ellipsis rule below doing its job. Stacking
   them into one column per row gives each label its own full width
   instead of fighting two siblings for a three-way split. */

/* ---------------------------------------------------------------------
   Three fixed promo panels - School List / Collections / Request a Book.
   Icon-card treatment (no photography) since no approved Galle imagery
   exists yet for these specific shortcuts.
   --------------------------------------------------------------------- */

.gbs-promo-row{
   width:min(var(--container-width),calc(100% - 40px));
   margin:var(--gbs-space-xl, 40px) auto 0;
   display:grid;
   grid-template-columns:repeat(3,minmax(0,1fr));
   gap:20px;
   align-items:stretch;
}

.gbs-promo-card{
   position:relative;
   display:flex;
   flex-direction:column;
   justify-content:center;
   height:100%;
   min-height:180px;
   padding:20px;
   border:1px solid #DCE2F0;
   border-radius:var(--gbs-radius-card, 14px);
   background:var(--brand-primary-pale);
   overflow:hidden;
   text-decoration:none;
}

.gbs-promo-card:hover{
   border-color:#BFCBE4;
}

.gbs-promo-copy{
   position:relative;
   z-index:1;
   display:flex;
   flex-direction:column;
   align-items:flex-start;
   gap:7px;
   max-width:62%;
}

.gbs-promo-art{
   position:absolute;
   right:-6px;
   bottom:-4px;
   width:128px;
   height:128px;
   transform:scale(1.18);
   transform-origin:bottom right;
   pointer-events:none;
}

.gbs-promo-card-alt{
   background:#F1F5FB;
}

.gbs-promo-card-request{
   background:#EFF7F2;
}

/* Decorative faux-illustrations (Stitch itself builds these from plain
   colored divs, not real artwork - reproduced the same way here). */
.gbs-art-backpack{
   position:absolute;
   right:16px;
   bottom:0;
   width:76px;
   height:96px;
   background:#FBBF24;
   border:2px solid #D97706;
   border-radius:18px 18px 9px 9px;
   transform:rotate(3deg);
   display:flex;
   flex-direction:column;
   align-items:center;
   padding:7px;
}

.gbs-art-backpack-handle{
   width:22px;
   height:7px;
   margin-bottom:6px;
   background:#B45309;
   border-radius:99px;
}

.gbs-art-backpack-label{
   margin-top:auto;
   font-family:'Caveat',cursive;
   font-size:.7rem;
   font-weight:700;
   line-height:1.1;
   text-align:center;
   color:#78350F;
}

.gbs-art-pencilcup{
   position:absolute;
   left:8px;
   bottom:6px;
   width:34px;
   height:44px;
   background:rgba(255,255,255,.9);
   border:1px solid #CBD5E1;
   border-radius:6px;
}

.gbs-art-pencilcup span{
   position:absolute;
   bottom:30px;
   width:5px;
   border-radius:3px 3px 0 0;
}

.gbs-art-pencilcup span:nth-child(1){left:6px; height:38px; background:#F87171; transform:rotate(8deg);}
.gbs-art-pencilcup span:nth-child(2){left:14px; height:32px; background:#3B82F6; transform:rotate(-6deg);}
.gbs-art-pencilcup span:nth-child(3){left:22px; height:26px; background:#F59E0B; transform:rotate(12deg);}

.gbs-art-collections{
   display:flex;
}

.gbs-art-spine{
   position:absolute;
   right:10px;
   display:flex;
   align-items:center;
   justify-content:flex-end;
   gap:4px;
   height:18px;
   padding:0 8px;
   border-radius:3px;
   font-family:var(--font-heading);
   font-size:.55rem;
   font-weight:700;
   letter-spacing:.03em;
   color:#fff;
   white-space:nowrap;
}

.gbs-art-spine em{
   font-style:normal;
   font-size:.45rem;
   opacity:.85;
}

.gbs-art-spine-1{ bottom:54px; width:84px; background:#B45309; border-left:4px solid #78350F; }
.gbs-art-spine-2{ bottom:35px; width:98px; background:#1450A3; border-left:4px solid var(--galle-navy); }
.gbs-art-spine-3{ bottom:14px; width:110px; background:#9F1239; border-left:4px solid #66041B; }

.gbs-art-catalogue{
   position:absolute;
   right:14px;
   bottom:28px;
   display:flex;
   align-items:center;
   justify-content:center;
   width:72px;
   height:38px;
   background:#fff;
   border:1px solid #CBD5E1;
   border-radius:6px;
   font-size:.56rem;
   font-weight:700;
   color:#94A3B8;
   box-shadow:0 4px 10px rgba(15,23,42,.06);
}

.gbs-art-magnifier{
   position:absolute;
   right:0;
   bottom:4px;
   width:40px;
   height:40px;
   border-radius:50%;
   border:4px solid rgba(120,53,15,.75);
   background:rgba(255,255,255,.5);
   transform:rotate(45deg);
}

.gbs-art-magnifier::after{
   content:"";
   position:absolute;
   bottom:-24px;
   left:50%;
   width:6px;
   height:26px;
   margin-left:-3px;
   background:#78350F;
   border-radius:3px;
}

.gbs-promo-eyebrow{
   font-size:var(--gbs-fs-overline, .7rem);
   font-weight:700;
   text-transform:uppercase;
   letter-spacing:.08em;
   color:var(--brand-primary);
}

.gbs-promo-card h2{
   margin:0;
   font-family:var(--font-heading);
   font-size:var(--gbs-fs-h3, 1.4rem);
   line-height:var(--gbs-lh-h3, 1.3);
   color:var(--brand-dark);
}

.gbs-promo-card p{
   margin:0 0 6px;
   font-size:var(--gbs-fs-body-md, 1rem);
   line-height:var(--gbs-lh-body-md, 1.5);
   color:var(--text-secondary);
}

.gbs-promo-link{
   font-weight:700;
   color:var(--brand-primary);
}

@media (max-width:940px){
   .gbs-promo-row{grid-template-columns:1fr}
}

/* ---------------------------------------------------------------------
   Category strip (circular icons, matching the reference's compact row)
   --------------------------------------------------------------------- */

.home-category .box-container{
   grid-template-columns:none;
   display:flex;
   flex-wrap:nowrap;
   overflow-x:auto;
   gap:12px;
   padding-bottom:4px;
   scrollbar-width:thin;
}

.home-category .box{
   flex:0 0 auto;
   width:74px;
   min-height:0;
   padding:0;
   border:0;
   background:transparent;
   text-align:center;
   display:flex;
   flex-direction:column;
   align-items:center;
   gap:0;
   text-decoration:none;
}

/* Desktop: even 10-up distribution across the full row (style.css already
   authors this exact grid for .home-category .box-container at the same
   2-class specificity - this file loading after it is what lets it win
   over the mobile-oriented flex/scroll rule above). Mobile keeps the
   horizontal swipe rail untouched. */
@media (min-width:681px){
   .home-category .box-container{
      display:grid;
      grid-template-columns:repeat(10, minmax(0, 1fr));
      overflow-x:visible;
      padding-bottom:0;
   }

   .home-category .box{
      width:auto;
   }
}

/* style.css still carries the pre-conversion SUNSIRI grocery card
   (bordered box, min-height 142px, 12px padding) at the same
   ".homepage-redesign .home-category .box" specificity, loaded before
   this file - so on its own the rule above never actually won the
   cascade and the borderless icon+label design never rendered. Matching
   that exact selector here (this file loads after style.css) is what
   lets the compact circular-icon treatment actually apply on desktop.
   Mobile keeps style.css's own already-tuned card sizing untouched. */
@media (min-width:681px){
   .homepage-redesign .home-category .box{
      min-height:0;
      padding:0;
      border:0;
      border-radius:0;
      background:transparent;
      box-shadow:none;
   }
}

.home-category .box:hover{
   box-shadow:none;
   border-color:transparent;
}

.home-category .box:hover .category-card-icon{
   transform:scale(1.05);
}

/* 56px circular tinted discs (DESIGN.md "Category Circles & Quick Links"). */
.homepage-redesign .category-card-image.category-card-icon,
.home-category .box img,
.category-card-image{
   width:54px!important;
   height:54px!important;
   min-height:0!important;
   max-height:none!important;
   margin:0 auto 5px!important;
   border-radius:50%!important;
   background:var(--brand-primary-soft);
   aspect-ratio:1/1;
}

.homepage-redesign .category-card-icon i{
   width:auto;
   height:auto;
   font-size:1.55rem;
   color:var(--brand-primary);
   transition:none;
}

.homepage-redesign .category-card-icon{
   transition:transform .15s ease, background-color .15s ease;
}

/* Exact 10-color pastel cycle from the Stitch reference
   (galle_book_shop_desktop_homepage/code.html "CategoryCirclesStrip") -
   cycles by position since our real category set/order differs from the
   Stitch demo's fixed 10 labels. Color only - icon glyph and link target
   come from the existing category data, untouched. */
.home-category .box:nth-child(10n+1) .category-card-icon{background:#E8F0FE}
.home-category .box:nth-child(10n+1) .category-card-icon i{color:#1450A3}
.home-category .box:nth-child(10n+2) .category-card-icon{background:#FFF4E5}
.home-category .box:nth-child(10n+2) .category-card-icon i{color:#B45309}
.home-category .box:nth-child(10n+3) .category-card-icon{background:#FFEAE5}
.home-category .box:nth-child(10n+3) .category-card-icon i{color:#E11D48}
.home-category .box:nth-child(10n+4) .category-card-icon{background:#E6F9F0}
.home-category .box:nth-child(10n+4) .category-card-icon i{color:#059669}
.home-category .box:nth-child(10n+5) .category-card-icon{background:#EFEAFF}
.home-category .box:nth-child(10n+5) .category-card-icon i{color:#9333EA}
.home-category .box:nth-child(10n+6) .category-card-icon{background:#E0F7FA}
.home-category .box:nth-child(10n+6) .category-card-icon i{color:#0E7490}
.home-category .box:nth-child(10n+7) .category-card-icon{background:#F3E8FF}
.home-category .box:nth-child(10n+7) .category-card-icon i{color:#4338CA}
.home-category .box:nth-child(10n+8) .category-card-icon{background:#E0F2FE}
.home-category .box:nth-child(10n+8) .category-card-icon i{color:#0369A1}
.home-category .box:nth-child(10n+9) .category-card-icon{background:#FFEAD9}
.home-category .box:nth-child(10n+9) .category-card-icon i{color:#C2410C}
.home-category .box:nth-child(10n+0) .category-card-icon{background:#FFE4E6}
.home-category .box:nth-child(10n+0) .category-card-icon i{color:#BE123C}

body.homepage-redesign .home-category .box h3{
   min-height:0;
   margin:0;
   font-family:var(--font-body);
   font-size:var(--gbs-fs-label-sm);
   font-weight:600;
   line-height:1.3;
   color:var(--text-primary);
   overflow-wrap:anywhere;
   word-break:break-word;
}

/* No Galle-specific stock photography exists yet for this filler banner,
   so it renders copy-only rather than falling back to SUNSIRI grocery
   produce photos (carrots/mango). */
.home-range-banner-text-only{
   grid-template-columns:1fr;
   text-align:center;
}

.home-range-banner-text-only .home-range-copy{
   margin:0 auto;
   max-width:560px;
}

/* The reference homepage ends at Featured Books and goes straight to the
   footer - this trailing navy CTA has no configured banner data behind it
   (copy-only filler, see comment above) and isn't part of the reference,
   so it's hidden on the homepage only. Admin banner management and every
   other page that can render a real configured promo-grid are untouched. */
body.homepage-redesign .home-range-banner-text-only{
   display:none;
}

/* ---------------------------------------------------------------------
   Featured products / product cards
   --------------------------------------------------------------------- */

.products .price span,
.products .price{
   color:var(--brand-primary);
}

.product-card-actions .btn,
.products .btn,
.products .option-btn,
.btn,
input[type="submit"].btn{
   background:var(--brand-primary);
   box-shadow:0 8px 18px rgba(11,42,99,.18);
}

.btn:hover,
input[type="submit"].btn:hover{
   background:var(--brand-primary-hover);
}

.option-btn,
.view-btn,
.back-btn,
.see-more{
   border-color:var(--brand-primary);
   color:var(--brand-primary);
}

.option-btn:hover,
.view-btn:hover,
.back-btn:hover,
.see-more:hover{
   background:var(--brand-primary-soft);
}

/* Compact "book card" system - replaces the wide 4:3 supermarket-card
   proportions with a tall, portrait-cover layout, applied everywhere
   .product-card is used (home featured/catalogue rows, shop, category,
   subcategory, search) since they all share this exact markup. No
   template duplication, no JS/cart-hook changes - presentation only. */
.products .box-container,
.shop-product-grid{
   grid-template-columns:repeat(6,minmax(0,1fr));
   gap:14px;
}

.products .box,
.product-card,
.shop-product-grid .product-card{
   position:relative;
   min-height:0;
   padding:12px;
   border:1px solid var(--border-color);
   border-radius:var(--gbs-radius-card, 12px);
   box-shadow:var(--gbs-shadow-1, 0 1px 3px 0 rgba(13,32,64,.05), 0 1px 2px -1px rgba(13,32,64,.05));
   transition:box-shadow .15s ease;
}

.products .box:hover,
.product-card:hover,
.shop-product-grid .product-card:hover{
   box-shadow:var(--gbs-shadow-2, 0 8px 16px -4px rgba(13,32,64,.08), 0 4px 6px -2px rgba(13,32,64,.04));
}

.products .image-container,
.products .box-content img,
.product-image-wrap,
.product-card-media,
.shop-product-grid .product-card-media{
   aspect-ratio:2 / 3;
   border-radius:var(--gbs-radius-cover, 6px);
   background:var(--surface-muted);
}

.products .image-container img,
.product-card-media img,
.shop-product-grid .product-card-media img{
   padding:8px;
   object-fit:contain;
}

.products .product-name,
.products .name{
   min-height:0;
   font-size:var(--gbs-fs-h4, 1rem);
   line-height:1.35;
   font-weight:600;
   font-family:var(--font-body);
   color:var(--text-primary);
   -webkit-line-clamp:2;
}

.product-pack{
   display:block;
   color:var(--text-secondary);
   font-size:var(--gbs-fs-body-sm, .8rem);
   font-weight:500;
}

.products .price,
.products .price span{
   font-size:1.05rem;
   font-weight:800;
}

.price-label{
   display:block;
   margin-bottom:2px;
   color:var(--text-secondary);
   font-size:var(--gbs-fs-overline, .7rem);
   font-weight:700;
   text-transform:uppercase;
   letter-spacing:.08em;
}

/* Stack quantity above the button instead of squeezing both into one row -
   the inherited 72px-quantity + 1fr-button grid left "Add to Cart" clipped
   to "Add to c" once cards narrowed from 4 to 6 per row. Same two controls,
   same names/values, just full width each on their own row. */
.product-card-actions.product-cart-actions{
   display:flex;
   flex-direction:column;
   gap:6px;
}

.product-card-actions.product-cart-actions .qty-control,
.product-card-actions.product-cart-actions .product-cart-add,
.product-card-actions.product-cart-actions > .btn{
   width:100%;
}

.product-card-actions.product-cart-actions .qty-control{
   display:flex;
}

.gbs-featured-carousel{
   position:relative;
}

.gbs-carousel-arrow{
   position:absolute;
   top:50%;
   z-index:5;
   display:grid;
   place-items:center;
   box-sizing:border-box;
   /* a true circle: min/max pin both axes (the global 44px button min-height used to stretch this 36px control into a 36x44 oval) */
   width:40px;
   height:40px;
   min-width:40px;
   min-height:40px;
   max-width:40px;
   max-height:40px;
   margin-top:-20px;
   padding:0;
   border:1px solid #d6deea;
   border-radius:50%;
   background:#fff;
   color:var(--brand-primary);
   font-size:1.3rem;
   line-height:1;
   box-shadow:0 1px 2px rgba(11,42,99,.08), 0 6px 16px rgba(11,42,99,.14);
   cursor:pointer;
   transition:background-color .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease;
}

.gbs-carousel-arrow i{
   display:block;
   width:1em;
   line-height:1;
   text-align:center;
   font-size:1.3rem;
}

.gbs-carousel-arrow:hover{
   background:var(--brand-primary-pale, #eef3fb);
   border-color:var(--brand-primary);
   box-shadow:0 2px 4px rgba(11,42,99,.10), 0 8px 20px rgba(11,42,99,.20);
}

.gbs-carousel-arrow:active{
   box-shadow:0 1px 2px rgba(11,42,99,.12), 0 3px 8px rgba(11,42,99,.14);
}

.gbs-carousel-arrow:focus-visible{
   outline:2px solid var(--brand-primary);
   outline-offset:2px;
   border-color:var(--brand-primary);
}

@media (prefers-reduced-motion:reduce){
   .gbs-carousel-arrow{transition:none}
}

/* The browser's UA stylesheet's [hidden]{display:none} is the same 0-1-0
   specificity as .gbs-carousel-arrow{display:flex} above and loses to it
   on source order alone - JS toggling the `hidden` property (nothing left
   to scroll that direction) silently did nothing without this. */
.gbs-carousel-arrow[hidden]{
   display:none;
}

.gbs-carousel-prev{ left:-20px; }
.gbs-carousel-next{ right:-20px; }

@media (max-width:1300px){
   .gbs-carousel-arrow{ display:none; }
}

/* ---------------------------------------------------------------------
   Home's product rails (Featured/New Arrivals/More From The Catalogue)
   render the exact same sun_catalogue_product_card()/.gbs-book-card as
   Shop/Category/Subcategory/Search (galle-theme.css .gbs-catalogue-grid,
   below) - only the container differs: Shop's grid sits next to a 240px
   category sidebar, Home's rail runs the full section width with no
   sidebar. A fixed 5-column split here would stretch each card ~30%
   wider than Shop's, so this uses auto-fill at Shop's own actual
   computed card width (measured 180.8px at desktop: 1280px capped
   container, minus the 240px sidebar, 24px sidebar gap and the
   results pane's own 40px padding, then 5 cols at 18px gaps) as a
   FIXED track size (not minmax(181px,1fr)) - the browser fits however
   many same-width cards the row has room for (usually 6 around
   1440px) instead of a hardcoded column count, and any leftover row
   width is just trailing gap rather than stretching cards past Shop's
   width.
   --------------------------------------------------------------------- */

/* A real single-row rail, not a wrapping grid: `repeat(auto-fill,181px)`
   used to wrap onto a second row (a single lonely card) the moment there
   were more items than fit one row's width - the "prev/next" arrow
   buttons existed in markup but had no matching JS, so they never
   actually worked either. flex+overflow-x turns this into one row that
   genuinely scrolls, with the arrows (below) driving it via scrollBy. */
.gbs-featured-grid{
   display:flex;
   flex-wrap:nowrap;
   align-items:stretch;
   gap:18px;
   overflow-x:auto;
   scroll-snap-type:x proximity;
   scroll-behavior:smooth;
   scrollbar-width:none;
   -webkit-overflow-scrolling:touch;
}

.gbs-featured-grid::-webkit-scrollbar{
   display:none;
}

.gbs-featured-grid > .gbs-book-card{
   flex:0 0 181px;
   width:181px;
   scroll-snap-align:start;
}

.gbs-book-card{
   position:relative;
   display:flex;
   flex-direction:column;
   height:100%;
   padding:12px;
   background:var(--surface);
   border:1px solid var(--border-color);
   border-radius:var(--gbs-radius-card, 12px);
   transition:box-shadow .2s ease;
}

.gbs-book-card:hover{
   box-shadow:var(--gbs-shadow-2, 0 8px 16px -4px rgba(13,32,64,.1));
}

.gbs-book-cover{
   position:relative;
   width:100%;
   aspect-ratio:4/5;
   border-radius:8px;
   overflow:hidden;
   background:var(--surface-muted);
   border:1px solid var(--border-color);
}

.gbs-book-cover img{
   width:100%;
   height:100%;
   object-fit:cover;
}

.gbs-book-cover .product-wishlist-btn{
   position:absolute;
   top:8px;
   right:8px;
   z-index:2;
   width:30px;
   height:30px;
   min-height:0;
   padding:0;
   display:grid;
   place-items:center;
   border:1px solid var(--border-color);
   border-radius:50%;
   background:rgba(255,255,255,.95);
   color:var(--brand-primary);
   box-shadow:0 4px 10px rgba(11,42,99,.12);
}

.gbs-book-cover .product-wishlist-btn span{
   display:none;
}

.gbs-book-cover .product-wishlist-btn.is-saved{
   color:#fff;
   background:var(--brand-primary);
}

.gbs-book-body{
   display:flex;
   flex-direction:column;
   flex:1 1 auto;
   margin-top:10px;
}

.gbs-book-title{
   display:-webkit-box;
   -webkit-box-orient:vertical;
   -webkit-line-clamp:2;
   margin:0;
   min-height:calc(1.3em * 2);
   /* html{font-size:62.5%} makes 1rem = 10px site-wide, so a literal
      .86rem/.72rem/.62rem/.92rem here rendered as an illegibly small
      8.6px/7.2px/6.2px/9.2px (caught by a real Playwright assertion,
      not a guess) - these are the same sizes re-based on the actual
      10px root instead of an assumed 16px one. */
   font-size:1.3rem;
   font-weight:700;
   line-height:1.3;
   color:var(--text-primary);
   overflow:hidden;
   text-overflow:ellipsis;
   white-space:normal;
}

.gbs-book-title-link{
   color:inherit;
}

.gbs-book-title-link:hover{
   color:var(--brand-primary-hover);
}

.gbs-book-meta{
   display:block;
   margin-top:2px;
   font-size:1.1rem;
   line-height:1.3;
   color:var(--text-secondary);
   overflow:hidden;
   text-overflow:ellipsis;
   white-space:nowrap;
   min-height:1.2em;
}

.gbs-book-footer{
   position:relative;
   display:grid;
   grid-template-columns:minmax(0, 1fr) auto;
   align-items:end;
   column-gap:6px;
   margin-top:auto;
   padding-top:10px;
   border-top:1px solid var(--border-color);
}

.gbs-book-price{
   display:flex;
   flex-direction:column;
}

.gbs-book-price-label{
   font-size:1rem;
   font-weight:600;
   letter-spacing:.02em;
   text-transform:uppercase;
   color:var(--text-secondary);
}

.gbs-book-price-value{
   font-size:1.4rem;
   font-weight:700;
   color:var(--brand-primary);
}

/* The quantity stepper keeps its real name/value attributes and still
   submits normally - only hidden visually, so a weighted item still adds
   at its default minimum quantity exactly as before. Only the compact
   Stitch "add" icon button stays visible.
   Specificity note: the shared site-wide rules this overrides
   (.product-card-actions.product-cart-actions .qty-control and
   .product-cart-form.is-in-cart .product-cart-add) are themselves 3-class
   selectors, so matching at 4 classes here - not just adding
   .gbs-book-footer to the shared 2-class shape - is what actually wins
   the cascade instead of silently losing to them. */
.gbs-book-footer .product-card-actions.product-cart-actions{
   width:auto;
   position:relative;
}

.gbs-book-footer .product-card-actions.product-cart-actions .qty-control,
.gbs-book-footer .product-card-actions.product-cart-actions .product-cart-status,
.gbs-book-footer .product-card-actions.product-cart-actions .unit{
   display:none;
}

.product-cart-form.is-in-cart .gbs-book-footer .product-cart-add,
.gbs-book-footer .product-card-actions.product-cart-actions .product-cart-add{
   display:inline-flex;
   align-items:center;
   justify-content:center;
   width:32px;
   height:32px;
   min-height:0;
   padding:0;
   border-radius:6px;
   color:transparent;
   font-size:0;
   background-color:var(--brand-primary);
   background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M7 4V2a1 1 0 0 1 2 0v2h6V2a1 1 0 1 1 2 0v2h1a2 2 0 0 1 2 2v13a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1z'/%3E%3C/svg%3E");
   background-repeat:no-repeat;
   background-position:center;
   background-size:16px 16px;
   box-shadow:none;
}

/* In-cart state: a distinct checkmark (not the same "add" glyph) plus a
   real server-rendered quantity badge - card cart state has to come from
   $cartState on render/AJAX-sync, never be guessed client-side, so both
   the icon swap and the badge text are driven by PHP/syncProduct(), not CSS. */
.product-cart-form.is-in-cart .gbs-book-footer .product-cart-add.is-added,
.gbs-book-footer .product-card-actions.product-cart-actions .product-cart-add.is-added{
   background-color:var(--gbs-success, #16a34a);
   background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
}

.gbs-book-footer .product-cart-qty-badge{
   position:absolute;
   top:-7px;
   right:-7px;
   display:grid;
   min-width:17px;
   height:17px;
   padding:0 4px;
   place-items:center;
   border:2px solid var(--surface, #fff);
   border-radius:999px;
   background:var(--gbs-success, #16a34a);
   color:#fff;
   font-size:.68rem;
   font-weight:700;
   line-height:1;
   pointer-events:none;
}

.gbs-book-footer .product-cart-qty-badge[hidden]{
   display:none;
}

/* Card in-cart state: the green "added" language becomes a compact
   [ - qty + ] stepper wired to the same data-product-cart-* controls. */
.gbs-book-price{
   /* one line whenever it fits; a very long amount wraps at its space
      rather than pushing or overlapping the fixed-size action. */
   overflow-wrap:normal;
}

.product-cart-form.is-in-cart .gbs-book-footer .product-card-actions.product-cart-actions .product-cart-add,
.product-cart-form.is-in-cart .gbs-book-footer .product-cart-qty-badge{
   display:none;
}

.product-cart-form.is-in-cart .gbs-book-footer .product-card-actions.product-cart-actions .qty-control{
   display:inline-flex;
   align-items:center;
   width:auto;
   height:32px;
   margin-left:auto;
   padding:0;
   border:1px solid var(--gbs-success, #16a34a);
   border-radius:6px;
   background:var(--gbs-success, #16a34a);
   color:#fff;
   gap:0;
}

.product-cart-form.is-in-cart .gbs-book-footer .product-cart-quantity-control .product-cart-quantity-button{
   display:inline-grid;
   place-items:center;
   width:18px;
   height:28px;
   min-height:0;
   padding:0;
   border:0;
   background:transparent;
   color:#fff;
   font-size:1.4rem;
   font-weight:700;
   line-height:1;
   cursor:pointer;
}

.product-cart-form.is-in-cart .gbs-book-footer .product-cart-quantity-control .qty{
   width:22px;
   min-width:0;
   height:28px;
   min-height:0;
   padding:0;
   border:0;
   background:transparent;
   color:#fff;
   font-size:1.2rem;
   font-weight:700;
   text-align:center;
   box-shadow:none;
   -moz-appearance:textfield;
   appearance:textfield;
}

.product-cart-form.is-in-cart .gbs-book-footer .product-cart-quantity-control .qty::-webkit-outer-spin-button,
.product-cart-form.is-in-cart .gbs-book-footer .product-cart-quantity-control .qty::-webkit-inner-spin-button{
   -webkit-appearance:none;
   margin:0;
}

/* Price left (flexible), action right (fixed size) on one row. Only a card
   too narrow to hold both (the phone rail) stacks the stepper full-width on
   its own row - decided by the card's own width, never by the price length. */
.gbs-book-card{
   container-type:inline-size;
}

.gbs-book-footer .product-card-actions.product-cart-actions{
   grid-column:2;
   justify-self:end;
}

.gbs-book-price{
   grid-column:1;
   min-width:0;
}

@container (max-width:150px){
   .product-cart-form.is-in-cart .gbs-book-footer .product-card-actions.product-cart-actions{
      grid-column:1 / -1;
      justify-self:stretch;
      margin-top:8px;
   }

   .product-cart-form.is-in-cart .gbs-book-footer .product-card-actions.product-cart-actions .qty-control{
      display:flex;
      width:100%;
      margin-left:0;
      justify-content:space-between;
   }

   .product-cart-form.is-in-cart .gbs-book-footer .product-cart-quantity-control .product-cart-quantity-button{
      flex:1;
   }
}

/* The product-detail page shows the real quantity in a full, visible
   stepper already - a second badge there would just duplicate it. */
.product-detail-actions .product-cart-qty-badge{
   display:none;
}

/* Mobile/tablet: horizontal swipe rail of compact book-shop cards - a
   fixed px width (not vw) so the count of visible cards stays predictable
   regardless of the section's own side padding. 148px keeps ~2.2-2.5
   cards visible at 390-430px phone widths; the 481-900px step widens the
   card so a 768px tablet shows roughly 3 without cards going oversized. */
@media (max-width:900px){
   .gbs-featured-grid{
      gap:10px;
      padding-bottom:6px;
      scroll-snap-type:x mandatory;
      scrollbar-width:thin;
   }

   .gbs-featured-grid > .gbs-book-card{
      flex:0 0 148px;
      width:148px;
      padding:8px;
      scroll-snap-align:start;
   }
}

@media (min-width:481px) and (max-width:900px){
   .gbs-featured-grid > .gbs-book-card{
      flex-basis:200px;
      width:200px;
   }
}

/* At the 148px rail width the footer's price column and add-to-cart
   button are tight; a hair smaller price/footer gap avoids wrapping
   without touching the title/meta sizes already tuned above. */

/* Wishlist heart moves to a small round overlay in the card's top-right
   corner (over the cover), instead of a full text button in the body -
   same <button name="add_to_wishlist"/"remove_from_wishlist"> element,
   position only. */
.product-card-body .product-wishlist-btn{
   position:absolute;
   top:8px;
   right:8px;
   z-index:2;
   width:34px;
   height:34px;
   min-height:0;
   padding:0;
   display:grid;
   place-items:center;
   border:1px solid var(--border-color);
   border-radius:50%;
   background:rgba(255,255,255,.95);
   color:var(--brand-primary);
   box-shadow:0 4px 10px rgba(11,42,99,.12);
}

.product-card-body .product-wishlist-btn span{
   display:none;
}

.product-card-body .product-wishlist-btn.is-saved{
   color:#fff;
   background:var(--brand-primary);
}

/* The supermarket "quick view" eye glyph over the cover competes with the
   new wishlist heart and isn't part of the reference book-card pattern;
   the product image/title link already opens the product page. */
.product-card-media .fa-eye{
   display:none;
}

@media (max-width:1180px){
   .products .box-container,
   .shop-product-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}

/* ---------------------------------------------------------------------
   Shop / Category / Subcategory catalogue layout
   --------------------------------------------------------------------- */

.shop-category-link.is-current{
   background:var(--brand-primary-soft);
   color:var(--brand-primary);
}

.shop-sort-note:hover,
.shop-sort-note:focus-visible{
   border-color:var(--brand-primary);
   background:var(--brand-primary-pale);
   color:var(--brand-primary);
}

/* ---------------------------------------------------------------------
   All Books / Shop (Stitch: all_books_galle_book_shop). body carries
   .homepage-redesign too (see shop.php) so this page inherits the exact
   same approved type scale, spacing rhythm and container width as Home
   instead of redeclaring them - only page-specific layout lives here.
   --------------------------------------------------------------------- */

.gbs-shop-shell{
   width:min(var(--container-width), calc(100% - 40px));
   margin:0 auto;
}

.gbs-shop-breadcrumb{
   display:flex;
   align-items:center;
   gap:8px;
   margin-top:16px;
   font-size:var(--gbs-fs-body-sm, .75rem);
   color:var(--text-secondary);
}

.gbs-shop-breadcrumb a{
   display:inline-flex;
   align-items:center;
   gap:6px;
   color:var(--text-secondary);
   text-decoration:none;
}

.gbs-shop-breadcrumb a:hover{
   color:var(--brand-primary);
}

.gbs-shop-breadcrumb i{
   font-size:.65rem;
}

.gbs-shop-breadcrumb [aria-current="page"]{
   color:var(--brand-primary);
   font-weight:600;
}

/* The current-page crumb is real, sometimes very long, product/catalogue
   text with no fabricated shortening available - truncating it with an
   ellipsis (instead of letting it wrap into its own second line, jammed
   under Home/Shop/Category with no leading icon visible) keeps the whole
   trail on one line at any width. Only engages once the row actually
   runs out of space; a short crumb still renders in full. */
.gbs-shop-breadcrumb{
   flex-wrap:nowrap;
}

.gbs-shop-breadcrumb [aria-current="page"]{
   overflow:hidden;
   flex:0 1 auto;
   min-width:0;
   white-space:nowrap;
   text-overflow:ellipsis;
}

.gbs-shop-heading{
   display:flex;
   flex-wrap:wrap;
   align-items:flex-end;
   justify-content:space-between;
   gap:14px;
}

.gbs-shop-heading h1{
   margin:0 0 4px;
   font-family:var(--font-heading);
   font-size:var(--gbs-fs-hero, clamp(2rem, 2.4vw + 1rem, 2.75rem));
   font-weight:700;
   letter-spacing:-.01em;
   color:var(--text-primary);
}

.gbs-shop-heading p{
   margin:0;
   max-width:60ch;
   font-size:var(--gbs-fs-body-lg, 1rem);
   line-height:var(--gbs-lh-body-lg, 1.625);
   color:var(--text-secondary);
}

.gbs-shop-heading-badge{
   display:inline-flex;
   align-items:center;
   gap:8px;
   flex:0 0 auto;
   padding:8px 14px;
   border-radius:999px;
   background:var(--surface);
   box-shadow:var(--gbs-shadow-1);
   font-size:var(--gbs-fs-label-sm, .75rem);
   font-weight:600;
   color:var(--text-secondary);
}

.gbs-shop-heading-badge i{
   color:var(--brand-primary);
}

.gbs-shop-layout{
   display:grid;
   grid-template-columns:240px minmax(0, 1fr);
   align-items:start;
   gap:24px;
}

.gbs-shop-sidebar{
   display:flex;
   flex-direction:column;
   gap:4px;
   padding:18px;
   border-radius:var(--gbs-radius-card, .75rem);
   background:var(--surface);
   box-shadow:var(--gbs-shadow-1);
}

.gbs-shop-sidebar-head{
   display:flex;
   align-items:center;
   gap:8px;
   margin-bottom:10px;
   padding-bottom:10px;
   border-bottom:1px solid var(--border-color);
}

.gbs-shop-sidebar-head i{
   color:var(--brand-primary);
}

.gbs-shop-sidebar-head h2{
   margin:0;
   font-size:var(--gbs-fs-h4, 1rem);
   font-weight:700;
   color:var(--text-primary);
}

.gbs-shop-category-link{
   display:flex;
   align-items:center;
   justify-content:space-between;
   gap:8px;
   padding:9px 10px;
   border-radius:var(--gbs-radius-control, .5rem);
   font-size:var(--gbs-fs-body-md, .875rem);
   font-weight:500;
   color:var(--text-secondary);
   text-decoration:none;
}

.gbs-shop-category-link:hover{
   background:var(--brand-primary-pale);
   color:var(--brand-primary);
}

.gbs-shop-category-link.is-current{
   background:var(--brand-primary-soft);
   color:var(--brand-primary);
   font-weight:700;
}

.gbs-shop-category-count{
   font-size:var(--gbs-fs-overline, .6875rem);
   font-weight:600;
   color:var(--text-secondary);
}

.gbs-shop-sidebar-divider{
   margin:6px 0;
   border:0;
   border-top:1px solid var(--border-color);
}

.gbs-search-form-panel{
   padding:16px;
   border-radius:var(--gbs-radius-card, .75rem);
   background:var(--surface);
   box-shadow:var(--gbs-shadow-1);
}

.gbs-search-page-form{
   position:relative;
   display:flex;
   align-items:center;
   gap:10px;
   padding:0 14px;
   border:1px solid var(--border-color);
   border-radius:var(--gbs-radius-control, .5rem);
   background:var(--surface-muted);
}

.gbs-search-page-form i{
   color:var(--text-secondary);
}

.gbs-search-page-form #search_box{
   flex:1 1 auto;
   min-width:0;
   height:46px;
   border:0;
   background:transparent;
   font-size:var(--gbs-fs-body-lg, 1rem);
   color:var(--text-primary);
}

.gbs-search-page-form #search_box:focus{
   outline:0;
}

.gbs-search-page-form input[type="submit"]{
   flex:0 0 auto;
   height:36px;
   padding:0 20px;
   border:0;
   border-radius:var(--gbs-radius-control, .5rem);
   background:var(--brand-primary);
   color:#fff;
   font-weight:600;
   font-size:var(--gbs-fs-label-sm, .75rem);
   cursor:pointer;
}

.gbs-search-page-form input[type="submit"]:hover{
   background:var(--brand-primary-hover);
}

/* ---------------------------------------------------------------------
   Product Details (Stitch: atomic_habits_product_details_galle_book_shop).
   Three columns - image | info | facts sidebar - matching the reference's
   actual proportions instead of a plain 2-column card (which, at the
   shop container's full width, left a short title/price/actions block
   stranded next to ~500px of empty white space). Fake-content sections in
   the reference (author bio, ratings/reviews, spec/branch-inventory tabs)
   are still intentionally omitted - the item schema has no author/
   publisher/rating data to back them, and this pass does not fabricate
   it. "You May Also Like" IS included (.gbs-product-related below), using
   real same-category catalogue data instead of curated picks.
   --------------------------------------------------------------------- */

.gbs-product-layout{
   display:grid;
   grid-template-columns:minmax(0, 300px) minmax(0, 1fr) minmax(220px, 260px);
   /* Default grid stretch would force the shorter columns to match the
      image's full height, which reads as trailing blank space below
      their content since nothing else fills it. */
   align-items:start;
   gap:32px;
   margin-top:20px;
   padding:24px;
   border-radius:var(--gbs-radius-card, .75rem);
   background:var(--surface);
   box-shadow:var(--gbs-shadow-1);
}

.gbs-product-media{
   position:relative;
   width:100%;
   /* 1:1, not 4:5 - real catalogue photos are square product shots, not
      portrait book covers, and a shorter frame keeps this column's height
      closer to the info/facts columns instead of towering over them. */
   aspect-ratio:1/1;
   border-radius:var(--gbs-radius-cover, .375rem);
   overflow:hidden;
   background:var(--surface-muted);
   border:1px solid var(--border-color);
}

.gbs-product-media img{
   width:100%;
   height:100%;
   object-fit:cover;
}

.gbs-product-info{
   display:flex;
   flex-direction:column;
   align-items:flex-start;
   gap:4px;
}

.gbs-product-category{
   display:inline-flex;
   padding:4px 10px;
   border-radius:999px;
   background:var(--brand-primary-soft);
   font-size:var(--gbs-fs-overline, .6875rem);
   font-weight:700;
   text-transform:uppercase;
   letter-spacing:.04em;
   color:var(--brand-primary);
   text-decoration:none;
}

.gbs-product-info h1{
   margin:10px 0 0;
   font-family:var(--font-heading);
   font-size:var(--gbs-fs-h2, 1.625rem);
   font-weight:700;
   letter-spacing:-.01em;
   color:var(--text-primary);
}

.gbs-product-price-row{
   display:flex;
   align-items:baseline;
   gap:10px;
   margin-top:14px;
}

.gbs-product-price-label{
   font-size:var(--gbs-fs-overline, .6875rem);
   font-weight:600;
   text-transform:uppercase;
   color:var(--text-secondary);
}

.gbs-product-current-price{
   font-size:1.5rem;
   font-weight:700;
   color:var(--brand-primary);
}

.gbs-product-original-price{
   font-size:var(--gbs-fs-body-md, .875rem);
   color:var(--text-secondary);
   text-decoration:line-through;
}

/* Right-hand sidebar column (Stitch: "Product Details" facts panel).
   Reuses the same small-caps sidebar-heading treatment as Shop's
   category sidebar (.gbs-shop-sidebar-head) instead of inventing a new
   heading style. */
/* Its own bordered box (not just shared page-card background) so a short
   fact list - all we have real data for - reads as one intentionally
   compact, self-contained panel next to the taller info column, rather
   than a form floating in leftover card whitespace. */
.gbs-product-facts{
   padding:16px;
   border:1px solid var(--border-color);
   border-radius:var(--gbs-radius-card, .75rem);
   background:var(--surface-muted);
}

.gbs-product-facts h2{
   margin:0 0 12px;
   font-family:var(--font-heading);
   font-size:var(--gbs-fs-label, .875rem);
   font-weight:700;
   color:var(--text-primary);
}

.gbs-product-meta-list{
   display:flex;
   flex-direction:column;
   gap:10px;
   margin:0;
   padding:14px 16px;
   border-radius:var(--gbs-radius-control, .5rem);
   background:var(--surface);
   width:100%;
}

.gbs-product-meta-list > div{
   display:flex;
   flex-direction:column;
   gap:2px;
   font-size:var(--gbs-fs-body-md, .875rem);
}

.gbs-product-meta-list dt{
   font-size:var(--gbs-fs-overline, .6875rem);
   font-weight:600;
   text-transform:uppercase;
   letter-spacing:.03em;
   color:var(--text-secondary);
}

.gbs-product-meta-list dd{
   margin:0;
   font-weight:600;
   color:var(--text-primary);
}

.gbs-product-actions{
   display:flex;
   width:100%;
   flex-wrap:wrap;
   align-items:center;
   gap:12px;
   margin-top:20px;
}

/* One row, one 46px control height: [ - qty + ] [ Add to cart ] [ Save ].
   The -/+ stepper is visible in both cart states; status/badge text is
   visually hidden so nothing floats under the controls. */
.gbs-product-actions .product-card-actions.product-cart-actions{
   display:flex;
   flex-direction:row;
   flex-wrap:nowrap;
   align-items:center;
   gap:12px;
   width:auto;
   margin:0;
   padding:0;
   grid-template-columns:none;
}

.gbs-product-actions .product-card-actions.product-cart-actions .qty-control.product-cart-quantity-control{
   display:inline-flex;
   align-items:stretch;
   width:auto;
   height:46px;
   margin:0;
   padding:0;
   overflow:hidden;
   border:1px solid var(--border-color);
   border-radius:var(--gbs-radius-control, .5rem);
   background:var(--surface, #fff);
}

.gbs-product-actions .product-cart-quantity-control .product-cart-quantity-button{
   display:grid;
   place-items:center;
   width:38px;
   height:100%;
   padding:0;
   border:0;
   background:transparent;
   color:var(--text-primary);
   font-size:1.25rem;
   font-weight:700;
   line-height:1;
   cursor:pointer;
}

.gbs-product-actions .product-cart-quantity-control .qty{
   width:52px;
   height:100%;
   min-height:0;
   margin:0;
   padding:0;
   border:0;
   border-radius:0;
   background:transparent;
   box-shadow:none;
   text-align:center;
   font-weight:700;
   -moz-appearance:textfield;
   appearance:textfield;
}

.gbs-product-actions .product-cart-quantity-control .qty::-webkit-outer-spin-button,
.gbs-product-actions .product-cart-quantity-control .qty::-webkit-inner-spin-button{
   -webkit-appearance:none;
   margin:0;
}

.gbs-product-actions .product-cart-actions .product-cart-add,
.gbs-product-actions .product-wishlist-btn{
   width:auto;
   min-width:104px;
   padding-inline:20px;
   height:46px;
   min-height:0;
   margin:0;
   padding-block:0;
   align-self:center;
}

.gbs-product-actions .product-card-actions.product-cart-actions .product-cart-add{
   width:auto;
   min-width:140px;
}

.gbs-product-actions .product-cart-form.is-in-cart .product-cart-add,
.product-cart-form.is-in-cart .gbs-product-actions .product-cart-add{
   display:none;
}

.gbs-product-actions .product-cart-qty-badge{
   display:none;
}

.gbs-product-actions .product-cart-status{
   position:absolute;
   width:1px;
   height:1px;
   overflow:hidden;
   clip:rect(0 0 0 0);
   white-space:nowrap;
}

.gbs-product-pickup-note{
   display:flex;
   align-items:flex-start;
   gap:10px;
   margin-top:16px;
   padding:12px 14px;
   border-radius:var(--gbs-radius-control, .5rem);
   background:var(--brand-primary-pale);
   font-size:var(--gbs-fs-body-sm, .75rem);
   color:var(--text-secondary);
}

.gbs-product-pickup-note i{
   margin-top:2px;
   color:var(--brand-primary);
}

.gbs-product-pickup-note p{
   margin:0;
}

.gbs-product-pickup-title{
   font-weight:700;
   color:var(--text-primary);
}

.gbs-product-information{
   /* components.css's bare `section{width:...;margin-inline:auto}` rule
      would otherwise auto-center this against the shop-shell, pulling it
      out of alignment with .gbs-product-layout (a <form>, unaffected by
      that rule) above it - both should sit flush with the breadcrumb. */
   width:auto;
   margin:20px 0 0;
   padding:24px;
   border-radius:var(--gbs-radius-card, .75rem);
   background:var(--surface);
   box-shadow:var(--gbs-shadow-1);
}

.gbs-product-information h2{
   margin:0 0 10px;
   font-family:var(--font-heading);
   font-size:var(--gbs-fs-h3, 1.25rem);
   font-weight:700;
   color:var(--text-primary);
}

.gbs-product-information p{
   margin:0;
   line-height:var(--gbs-lh-body-lg, 1.625);
   color:var(--text-secondary);
}

/* Related-products rail (Stitch's "You May Also Like", real same-category
   data - see view_page.php). Reuses Shop's own card grid
   (.gbs-catalogue-grid, galle-theme.css) rather than a page-specific one,
   so column counts/breakpoints stay identical to every other catalogue
   surface without duplicating that rule here. */
.gbs-product-related{
   /* Same auto-center fix as .gbs-product-information above. */
   width:auto;
   margin:20px 0 0;
}

.gbs-product-related .section-head{
   margin-bottom:18px;
}

@media (min-width:761px) and (max-width:1040px){
   .gbs-product-layout{
      grid-template-columns:minmax(0, 300px) minmax(0, 1fr);
   }

   .gbs-product-facts{
      grid-column:1 / -1;
   }

   .gbs-product-meta-list{
      flex-direction:row;
      flex-wrap:wrap;
      gap:20px;
   }

   .gbs-product-meta-list > div{
      flex:1 1 160px;
   }
}

/* ---------------------------------------------------------------------
   Cart (Stitch: shopping_cart_galle_book_shop). script.js drives quantity
   updates/removal purely through data-cart and data-live-cart attributes
   and the .cart-page-shell root selector, NOT these class names - so this
   is presentation-only, every hook stays exactly where the JS expects it.
   --------------------------------------------------------------------- */

.gbs-cart-pickup-banner{
   display:flex;
   align-items:flex-start;
   gap:10px;
   margin-top:16px;
   padding:12px 16px;
   border-radius:var(--gbs-radius-control, .5rem);
   background:var(--brand-primary-soft);
   color:var(--text-primary);
   font-size:var(--gbs-fs-body-sm, .75rem);
}

.gbs-cart-pickup-banner i{
   flex:0 0 auto;
   margin-top:.2em;
   color:var(--brand-primary);
}

.gbs-cart-pickup-banner p{
   margin:0;
   line-height:1.5;
}

.gbs-cart-layout{
   display:grid;
   grid-template-columns:minmax(0, 1fr) 320px;
   align-items:start;
   gap:24px;
   margin-top:16px;
}

.gbs-cart-main{
   display:flex;
   flex-direction:column;
   gap:14px;
}

.gbs-cart-list{
   border-radius:var(--gbs-radius-card, .75rem);
   background:var(--surface);
   box-shadow:var(--gbs-shadow-1);
   overflow:hidden;
}

.gbs-cart-columns{
   display:grid;
   grid-template-columns:minmax(0, 1fr) 110px 140px 110px 40px;
   gap:16px;
   padding:12px 20px;
   background:var(--surface-muted);
   font-size:var(--gbs-fs-overline, .6875rem);
   font-weight:700;
   text-transform:uppercase;
   letter-spacing:.04em;
   color:var(--text-secondary);
}

.gbs-cart-columns span:nth-child(2),
.gbs-cart-columns span:nth-child(4){
   text-align:right;
}

.gbs-cart-columns span:nth-child(3){
   text-align:center;
}

.gbs-cart-row{
   display:grid;
   grid-template-columns:minmax(0, 1fr) 110px 140px 110px 40px;
   align-items:center;
   gap:16px;
   padding:16px 20px;
   border-top:1px solid var(--border-color);
   transition:background-color .15s ease;
}

.gbs-cart-row.is-updating{
   background:var(--surface-muted);
   opacity:.7;
}

.gbs-cart-row-product{
   display:flex;
   align-items:center;
   gap:12px;
   min-width:0;
}

.gbs-cart-row-media{
   flex:0 0 auto;
   width:56px;
   height:70px;
   border-radius:var(--gbs-radius-cover, .375rem);
   overflow:hidden;
   background:var(--surface-muted);
   border:1px solid var(--border-color);
}

.gbs-cart-row-media img{
   width:100%;
   height:100%;
   object-fit:cover;
}

.gbs-cart-row-name-col{
   min-width:0;
}

.gbs-cart-row-name{
   font-size:var(--gbs-fs-body-md, .875rem);
   font-weight:700;
   line-height:1.3;
}

.gbs-cart-row-name a{
   color:var(--text-primary);
   text-decoration:none;
}

.gbs-cart-row-name a:hover{
   color:var(--brand-primary);
}

.gbs-cart-row-warning{
   margin:4px 0 0;
   font-size:var(--gbs-fs-overline, .6875rem);
   font-weight:600;
   color:#B42318;
}

.gbs-cart-row-price{
   text-align:right;
   font-size:var(--gbs-fs-body-md, .875rem);
   color:var(--text-primary);
}

.gbs-cart-mobile-label{
   display:none;
}

.gbs-cart-qty-control{
   display:flex;
   align-items:center;
   justify-content:center;
   gap:0;
   margin:0 auto;
   border:1px solid var(--border-color);
   border-radius:var(--gbs-radius-control, .5rem);
   overflow:hidden;
   width:fit-content;
}

.gbs-cart-qty-btn{
   display:grid;
   place-items:center;
   width:30px;
   height:30px;
   border:0;
   background:var(--surface-muted);
   color:var(--text-primary);
   cursor:pointer;
}

.gbs-cart-qty-btn:hover:not(:disabled){
   background:var(--brand-primary-soft);
   color:var(--brand-primary);
}

.gbs-cart-qty-btn:disabled{
   opacity:.4;
   cursor:not-allowed;
}

.gbs-cart-qty-input{
   width:44px;
   height:30px;
   border:0;
   border-left:1px solid var(--border-color);
   border-right:1px solid var(--border-color);
   text-align:center;
   font-size:var(--gbs-fs-body-md, .875rem);
   font-weight:600;
   color:var(--text-primary);
   -moz-appearance:textfield;
}

.gbs-cart-qty-input::-webkit-outer-spin-button,
.gbs-cart-qty-input::-webkit-inner-spin-button{
   -webkit-appearance:none;
   margin:0;
}

.gbs-cart-row-subtotal{
   text-align:right;
   font-size:var(--gbs-fs-body-md, .875rem);
   font-weight:700;
   color:var(--brand-primary);
}

.gbs-cart-row-remove{
   display:grid;
   place-items:center;
   width:32px;
   height:32px;
   margin:0 auto;
   border:0;
   border-radius:50%;
   background:transparent;
   color:var(--text-secondary);
   cursor:pointer;
}

.gbs-cart-row-remove:hover{
   background:#FEE4E2;
   color:#B42318;
}

.gbs-cart-empty{
   display:flex;
   flex-direction:column;
   align-items:center;
   gap:8px;
   padding:60px 20px;
   text-align:center;
   border-radius:var(--gbs-radius-card, .75rem);
   background:var(--surface);
   box-shadow:var(--gbs-shadow-1);
   color:var(--text-secondary);
}

.gbs-cart-empty i{
   font-size:2.6rem;
   color:var(--brand-primary);
   margin-bottom:6px;
}

.gbs-cart-empty h2{
   margin:0;
   font-family:var(--font-heading);
   color:var(--text-primary);
}

.gbs-cart-continue-link{
   display:inline-flex;
   align-items:center;
   gap:8px;
   font-size:var(--gbs-fs-label-sm, .75rem);
   font-weight:600;
   color:var(--brand-primary);
   text-decoration:none;
}

.gbs-cart-continue-link:hover{
   text-decoration:underline;
}

.gbs-cart-summary{
   display:flex;
   flex-direction:column;
   gap:12px;
   padding:20px;
   border-radius:var(--gbs-radius-card, .75rem);
   background:var(--surface);
   box-shadow:var(--gbs-shadow-1);
}

.gbs-cart-summary h2{
   margin:0 0 4px;
   font-family:var(--font-heading);
   font-size:var(--gbs-fs-h4, 1rem);
   font-weight:700;
   color:var(--text-primary);
}

.gbs-cart-summary-line{
   display:flex;
   align-items:center;
   justify-content:space-between;
   font-size:var(--gbs-fs-body-md, .875rem);
   color:var(--text-secondary);
}

.gbs-cart-free{
   color:#0F9D58;
   font-weight:700;
}

.gbs-cart-summary-total{
   display:flex;
   align-items:baseline;
   justify-content:space-between;
   padding-top:12px;
   border-top:1px solid var(--border-color);
   font-size:1.1rem;
   font-weight:700;
   color:var(--text-primary);
}

.gbs-cart-summary-total small{
   display:block;
   margin-top:2px;
   font-size:var(--gbs-fs-overline, .6875rem);
   font-weight:500;
   color:var(--text-secondary);
}

.gbs-cart-checkout-btn.disabled,
.gbs-cart-delete-all.disabled{
   pointer-events:none;
   opacity:.5;
}

.gbs-cart-delete-all-form{
   display:block;
}

.gbs-cart-delete-all{
   width:100%;
   padding:10px;
   border:1px solid var(--border-color);
   border-radius:var(--gbs-radius-control, .5rem);
   background:transparent;
   color:var(--text-secondary);
   font-weight:600;
   font-size:var(--gbs-fs-label-sm, .75rem);
   cursor:pointer;
}

.gbs-cart-delete-all:hover{
   border-color:#B42318;
   color:#B42318;
}

.gbs-cart-pickup-footnote{
   display:flex;
   align-items:center;
   gap:8px;
   margin:4px 0 0;
   font-size:var(--gbs-fs-overline, .6875rem);
   color:var(--text-secondary);
}

.gbs-cart-pickup-footnote i{
   color:var(--brand-primary);
}

@media (max-width:1100px){
   /* Below this, the 320px summary column leaves the list column too
      narrow for .gbs-cart-row's 5 fixed-width tracks (110/140/110/40px +
      gaps = 464px) to leave a legible name column - e.g. only ~96px at
      1024px wide, which the corrected (larger, correctly-sized) product
      name text no longer fits into. Stacking the summary below instead
      gives the list the full row width. */
   .gbs-cart-layout{
      grid-template-columns:1fr;
   }
}

/* Wishlist now renders saved products through the shared catalogue card
   (sun_catalogue_product_card()/.gbs-catalogue-grid) instead of its own
   card system, so wishlist.php's grid/card is identical to Shop/Category/
   Search/Home - only this "no longer available" list (wishlist rows whose
   product is now inactive/unlisted, so it can't be rendered as a live,
   purchasable catalogue card) has page-specific styling. */
.gbs-wishlist-unavailable{
   margin-top:24px;
   padding:16px 18px;
   border:1px dashed var(--border-color);
   border-radius:var(--gbs-radius-card, .75rem);
   background:var(--surface-muted);
}

.gbs-wishlist-unavailable h2{
   margin:0 0 4px;
   font-family:var(--font-heading);
   font-size:var(--gbs-fs-h4, 1rem);
   color:var(--text-primary);
}

.gbs-wishlist-unavailable > p{
   margin:0 0 12px;
   font-size:var(--gbs-fs-body-sm, .75rem);
   color:var(--text-secondary);
}

.gbs-wishlist-unavailable-row{
   display:flex;
   align-items:center;
   justify-content:space-between;
   gap:12px;
   padding:10px 0;
   border-top:1px solid var(--border-color);
   font-size:var(--gbs-fs-body-md, .875rem);
   color:var(--text-primary);
}

.gbs-wishlist-unavailable-row:first-of-type{
   border-top:0;
}

.gbs-shop-category-link.is-current .gbs-shop-category-count,
.gbs-shop-category-link:hover .gbs-shop-category-count{
   color:inherit;
}

.gbs-shop-mobile-categories{
   display:none;
}

.gbs-shop-toolbar{
   display:flex;
   flex-wrap:wrap;
   align-items:center;
   justify-content:space-between;
   gap:12px;
   margin-bottom:16px;
   padding:14px 16px;
   border-radius:var(--gbs-radius-card, .75rem);
   background:var(--surface);
   box-shadow:var(--gbs-shadow-1);
}

.gbs-shop-toolbar-count{
   font-size:var(--gbs-fs-h4, 1rem);
   font-weight:700;
   color:var(--text-primary);
}

.gbs-shop-toolbar-label{
   margin-left:6px;
   font-size:var(--gbs-fs-body-md, .875rem);
   color:var(--text-secondary);
}

.gbs-shop-toolbar-range{
   margin-left:10px;
   padding:2px 8px;
   border-radius:999px;
   background:var(--surface-muted);
   font-size:var(--gbs-fs-overline, .6875rem);
   font-weight:600;
   color:var(--text-secondary);
}

.gbs-shop-toolbar-actions{
   display:flex;
   align-items:center;
   gap:10px;
}

.gbs-shop-sort{
   display:inline-flex;
   align-items:center;
   gap:6px;
   padding:8px 12px;
   border-radius:var(--gbs-radius-control, .5rem);
   background:var(--surface-muted);
   font-size:var(--gbs-fs-label-sm, .75rem);
   font-weight:600;
   color:var(--text-primary);
   text-decoration:none;
}

.gbs-shop-sort:hover{
   background:var(--brand-primary-pale);
   color:var(--brand-primary);
}

.gbs-catalogue-grid{
   display:grid;
   grid-template-columns:repeat(4, minmax(0, 1fr));
   gap:18px;
}

.gbs-shop-empty{
   padding:40px 20px;
   text-align:center;
   color:var(--text-secondary);
}

.gbs-shop-pickup-note{
   display:flex;
   align-items:center;
   gap:14px;
   margin-top:20px;
   padding:16px;
   border-radius:var(--gbs-radius-card, .75rem);
   background:var(--surface-muted);
}

.gbs-shop-pickup-icon{
   display:grid;
   place-items:center;
   width:40px;
   height:40px;
   flex:0 0 auto;
   border-radius:50%;
   background:var(--brand-primary);
   color:#fff;
}

.gbs-shop-pickup-title{
   margin:0 0 2px;
   font-weight:700;
   color:var(--text-primary);
}

.gbs-shop-pickup-note p{
   margin:0;
   font-size:var(--gbs-fs-body-sm, .75rem);
   color:var(--text-secondary);
}

@media (max-width:940px){
   .gbs-shop-layout{
      grid-template-columns:1fr;
   }

   .gbs-shop-sidebar{
      display:none;
   }

   .gbs-shop-mobile-categories{
      display:block;
   }

   .gbs-shop-mobile-categories summary{
      display:flex;
      align-items:center;
      gap:8px;
      padding:10px 14px;
      border-radius:var(--gbs-radius-control, .5rem);
      background:var(--surface-muted);
      font-size:var(--gbs-fs-label-sm, .75rem);
      font-weight:600;
      color:var(--text-primary);
      cursor:pointer;
      list-style:none;
   }

   .gbs-shop-mobile-categories summary::-webkit-details-marker{
      display:none;
   }

   /* Phone/tablet category browser: a bottom sheet over a backdrop (not an
      in-flow split list). Opened/closed by the <details>; JS adds close on
      backdrop, Escape and the sheet's close button. */
   .gbs-shop-mobile-categories[open]::before{
      content:"";
      position:fixed;
      inset:0;
      z-index:1030;
      background:rgba(13, 32, 64, .38);
   }

   body:has(.gbs-shop-mobile-categories[open]){
      overflow:hidden;
   }

   .gbs-shop-mobile-category-list{
      position:fixed;
      left:0;
      right:0;
      bottom:0;
      z-index:1031;
      display:flex;
      flex-direction:column;
      max-height:78dvh;
      overflow-y:auto;
      overscroll-behavior:contain;
      padding:0 0 env(safe-area-inset-bottom, 0px);
      border-radius:16px 16px 0 0;
      background:var(--surface, #fff);
      box-shadow:0 -10px 32px rgba(13, 32, 64, .18);
   }

   .gbs-shop-mobile-category-head{
      position:sticky;
      top:0;
      display:flex;
      align-items:center;
      justify-content:space-between;
      padding:14px 16px 12px;
      border-bottom:1px solid var(--border-color);
      background:var(--surface, #fff);
      font-weight:700;
      color:var(--text-primary);
   }

   .gbs-shop-mobile-category-close{
      display:grid;
      place-items:center;
      width:32px;
      height:32px;
      border:0;
      border-radius:50%;
      background:var(--surface-muted);
      color:var(--text-secondary);
      cursor:pointer;
   }

   .gbs-shop-mobile-category-list .gbs-shop-category-link{
      display:flex;
      align-items:center;
      justify-content:space-between;
      min-height:46px;
      padding:0 16px;
      border-radius:0;
      border-bottom:1px solid var(--surface-muted);
      background:transparent;
   }

   .gbs-shop-mobile-category-list .gbs-shop-category-link.is-current{
      background:var(--surface-muted);
      color:var(--brand-primary);
      font-weight:700;
   }

   .gbs-catalogue-grid{
      grid-template-columns:repeat(2, minmax(0, 1fr));
      gap:12px;
   }
}

@media (min-width:941px) and (max-width:1279px){
   .gbs-catalogue-grid{
      grid-template-columns:repeat(3, minmax(0, 1fr));
   }
}

@media (min-width:1280px){
   .gbs-catalogue-grid{
      grid-template-columns:repeat(5, minmax(0, 1fr));
   }
}

/* ---------------------------------------------------------------------
   Product details page: reflow the existing two-node layout (media +
   info, with the meta <dl> nested inside info) into a three-column
   grid on desktop - media | info | details-card - by re-parenting via
   CSS grid placement only. No markup or field changes. */

@media (min-width:1024px){
   .product-detail-layout{
      display:grid;
      grid-template-columns:minmax(280px,420px) minmax(0,1fr) minmax(240px,300px);
      gap:32px;
      align-items:start;
   }

   .product-detail-media{
      grid-column:1;
   }

   .product-detail-info{
      grid-column:2;
   }

   .product-meta-list{
      grid-column:3;
      grid-row:1 / span 4;
      align-self:start;
      margin:0;
      padding:18px;
      border:1px solid var(--border-color);
      border-radius:14px;
      background:#fff;
   }

   .product-meta-list::before{
      content:'Product Details';
      display:block;
      margin-bottom:10px;
      font-family:var(--font-heading);
      font-size:1.5rem;
      color:var(--brand-dark);
   }

   .product-meta-list > div{
      padding:8px 0;
      border-bottom:1px solid var(--border-color);
   }

   .product-meta-list > div:last-child{
      border-bottom:0;
   }
}

.product-current-price{
   color:var(--brand-primary);
}

/* ---------------------------------------------------------------------
   Cart
   --------------------------------------------------------------------- */

.cart-total{
   border-color:var(--border-color);
}

.cart-summary-total strong,
.cart-total .eyebrow{
   color:var(--brand-primary);
}

.gbs-pickup-note{
   display:flex;
   align-items:center;
   gap:10px;
   margin:14px 0 0;
   padding:12px 14px;
   border:1px solid var(--brand-primary-soft);
   border-radius:12px;
   background:var(--brand-primary-pale);
   color:var(--text-primary);
   font-size:1.15rem;
}

.gbs-pickup-note i{
   color:var(--brand-primary);
}

/* ---------------------------------------------------------------------
   Checkout
   --------------------------------------------------------------------- */

.delivery-choice.is-selected{
   border-color:var(--brand-primary);
   background:var(--brand-primary-pale);
   box-shadow:0 0 0 1px rgba(11,42,99,.12);
}

.delivery-choice input{
   accent-color:var(--brand-primary);
}

.checkout-totals-card strong,
.checkout-summary-head .eyebrow{
   color:var(--brand-primary);
}

.gbs-checkout-step{
   display:flex;
   align-items:center;
   gap:10px;
   margin:0 0 14px;
   padding-bottom:10px;
   border-bottom:1px solid var(--border-color);
}

.gbs-checkout-step-number{
   display:inline-flex;
   align-items:center;
   justify-content:center;
   width:30px;
   height:30px;
   border-radius:50%;
   background:var(--brand-primary);
   color:#fff;
   font-weight:700;
   font-size:1.3rem;
   flex:0 0 auto;
}

.gbs-checkout-step h4{
   margin:0;
   font-family:var(--font-heading);
   font-size:1.6rem;
   color:var(--brand-dark);
}

/* Four numbered cards (Customer / Fulfilment / Address / Payment) instead
   of two - same fields, same order of appearance in the DOM otherwise,
   just grouped and spaced to read as distinct steps like the wireframe. */
.gbs-checkout-card{
   margin-bottom:22px;
   padding-bottom:22px;
   border-bottom:1px solid var(--border-color);
}

.gbs-checkout-card:last-of-type,
.gbs-checkout-card.flex:has(input[type="submit"]),
.gbs-checkout-card + input[type="submit"]{
   border-bottom:0;
   padding-bottom:0;
}

.checkout-form-head.gbs-checkout-card .eyebrow{
   display:block;
   margin-bottom:8px;
   color:var(--brand-primary);
   font-size:1.02rem;
   font-weight:700;
   letter-spacing:.05em;
   text-transform:uppercase;
}

.gbs-checkout-step + p.gbs-checkout-step-hint{
   margin:-8px 0 14px 40px;
   color:var(--text-secondary);
   font-size:1.15rem;
}

/* ---------------------------------------------------------------------
   Pickup checkout (Stitch: pickup_checkout_galle_book_shop), reusing
   .gbs-checkout-step/.gbs-checkout-step-number/.gbs-checkout-card/
   .gbs-checkout-step-hint above. No delivery-method chooser, no delivery
   fee row, no fabricated branch cards - the pickup-branch list renders
   only real rows from `pickup_locations`; an empty table falls back to
   an honest "we'll confirm by phone" note instead.
   --------------------------------------------------------------------- */

.gbs-checkout-shell .gbs-checkout-layout{
   display:grid;
   grid-template-columns:320px minmax(0, 1fr);
   align-items:start;
   gap:24px;
}

.gbs-checkout-summary{
   position:sticky;
   top:16px;
}

.gbs-checkout-summary h2{
   margin:0 0 12px;
   font-family:var(--font-heading);
   font-size:var(--gbs-fs-h4, 1rem);
   font-weight:700;
   color:var(--text-primary);
}

.gbs-checkout-summary-items{
   display:flex;
   flex-direction:column;
   gap:6px;
   margin-bottom:12px;
   padding-bottom:12px;
   border-bottom:1px solid var(--border-color);
}

.gbs-checkout-summary-items p{
   display:flex;
   justify-content:space-between;
   gap:10px;
   margin:0;
   font-size:var(--gbs-fs-body-sm, .75rem);
   color:var(--text-secondary);
}

.gbs-checkout-summary-items p span{
   flex:0 0 auto;
   white-space:nowrap;
}

.gbs-checkout-form-panel{
   padding:22px;
   border-radius:var(--gbs-radius-card, .75rem);
   background:var(--surface);
   box-shadow:var(--gbs-shadow-1);
}

.gbs-checkout-fields{
   display:grid;
   /* 200px let 3 fields land in one row at ~768px (tablet), where a real
      full name routinely runs past that width and visibly clips inside
      the input (confirmed via Playwright render, not just DOM checks) -
      240px still fits 3-up at 1024+ but drops "Tell us who you are" to a
      2-up row at 768, matching the rest of checkout's tablet reflow. */
   grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
   gap:16px;
}

.gbs-checkout-fields .inputBox,
.gbs-checkout-form-panel .inputBox{
   display:flex;
   flex-direction:column;
   gap:6px;
}

.gbs-checkout-fields label,
.gbs-checkout-form-panel label{
   font-size:var(--gbs-fs-label-sm, .75rem);
   font-weight:600;
   color:var(--text-primary);
}

.gbs-pickup-branch-list{
   display:grid;
   grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
   gap:12px;
   margin-bottom:16px;
}

.gbs-pickup-branch-choice{
   display:flex;
   align-items:flex-start;
   gap:10px;
   padding:14px;
   border:1px solid var(--border-color);
   border-radius:var(--gbs-radius-control, .5rem);
   cursor:pointer;
   transition:border-color .15s ease, background-color .15s ease;
}

.gbs-pickup-branch-choice:hover{
   border-color:var(--brand-primary);
}

.gbs-pickup-branch-choice.is-selected{
   border-color:var(--brand-primary);
   background:var(--brand-primary-pale);
}

.gbs-pickup-branch-choice input{
   margin-top:3px;
   accent-color:var(--brand-primary);
}

.gbs-pickup-branch-copy{
   display:flex;
   flex-direction:column;
   gap:2px;
}

.gbs-pickup-branch-copy strong{
   font-size:var(--gbs-fs-body-md, .875rem);
   color:var(--text-primary);
}

.gbs-pickup-branch-copy small{
   font-size:var(--gbs-fs-overline, .6875rem);
   color:var(--text-secondary);
}

@media (max-width:900px){
   .gbs-checkout-shell .gbs-checkout-layout{
      grid-template-columns:1fr;
   }

   .gbs-checkout-summary{
      position:static;
   }
}

/* ---------------------------------------------------------------------
   My Orders (Stitch: my_orders_galle_book_shop). Accordion list+detail
   stays one page/one route, matching the existing real backend (no
   separate order-confirmation route exists - checkout redirects here
   with ?placed=REF, which doubles as the confirmation moment). The
   toggle script only touches .gbs-order-row/.gbs-order-detail by id, so
   renaming these classes from the old .order-history-* ones is safe.
   --------------------------------------------------------------------- */

.gbs-order-placed-banner{
   display:flex;
   align-items:flex-start;
   gap:12px;
   margin-top:16px;
   padding:14px 16px;
   border-radius:var(--gbs-radius-card, .75rem);
   background:#E6F9F0;
   color:var(--text-primary);
}

.gbs-order-placed-banner i{
   margin-top:2px;
   color:#0F9D58;
   font-size:1.1rem;
}

.gbs-order-placed-banner strong{
   display:block;
}

.gbs-order-placed-banner span{
   font-size:var(--gbs-fs-body-sm, .75rem);
   color:var(--text-secondary);
}

.gbs-orders-list{
   display:flex;
   flex-direction:column;
   gap:12px;
   margin-top:16px;
}

.gbs-order-card{
   border-radius:var(--gbs-radius-card, .75rem);
   background:var(--surface);
   box-shadow:var(--gbs-shadow-1);
   overflow:hidden;
}

.gbs-order-row{
   display:grid;
   grid-template-columns:1fr 120px 120px 160px 24px;
   align-items:center;
   gap:16px;
   width:100%;
   padding:16px 20px;
   border:0;
   background:none;
   text-align:left;
   font:inherit;
   cursor:pointer;
}

.gbs-order-ref{
   font-weight:700;
   color:var(--text-primary);
}

.gbs-order-total{
   font-weight:700;
   color:var(--brand-primary);
}

.gbs-order-date{
   color:var(--text-secondary);
   font-size:var(--gbs-fs-body-sm, .75rem);
}

.gbs-order-status-cell{
   display:flex;
   justify-content:flex-end;
}

.gbs-order-status{
   padding:4px 10px;
   border-radius:999px;
   background:var(--surface-muted);
   font-size:var(--gbs-fs-overline, .6875rem);
   font-weight:700;
   text-transform:uppercase;
   letter-spacing:.03em;
   color:var(--text-secondary);
}

.gbs-order-status-new{ background:#E0F2FE; color:#0369A1; }
.gbs-order-status-accepted{ background:#E0F7FA; color:#0E7490; }
.gbs-order-status-preparing{ background:#FFF4E5; color:#B45309; }
.gbs-order-status-packed{ background:#EFEAFF; color:#6D28D9; }
.gbs-order-status-sent_out{ background:#EFEAFF; color:#6D28D9; }
.gbs-order-status-completed{ background:#E6F9F0; color:#0F9D58; }
.gbs-order-status-cancelled{ background:#FEE4E2; color:#B42318; }
.gbs-order-status-in_progress{ background:#FFF4E5; color:#B45309; }
.gbs-order-status-fulfilled{ background:#E6F9F0; color:#0F9D58; }
.gbs-order-status-declined{ background:#FEE4E2; color:#B42318; }

.gbs-request-book-layout{
   align-items:start;
}

/* The "recent requests" aside only renders once this customer has actually
   submitted a request - .gbs-cart-layout's fixed 1fr/320px grid otherwise
   reserved that 320px+gap as dead blank space down the whole page height
   with nothing in it. Collapse to one column whenever the aside is absent. */
.gbs-request-book-layout:not(:has(.gbs-cart-summary)){
   grid-template-columns:minmax(0, 1fr);
}

.gbs-order-chevron{
   color:var(--text-secondary);
   transition:transform .15s ease;
}

.gbs-order-row[aria-expanded="true"] .gbs-order-chevron{
   transform:rotate(180deg);
}

.gbs-order-detail{
   padding:0 20px 20px;
   border-top:1px solid var(--border-color);
}

.gbs-order-facts{
   display:grid;
   grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
   gap:12px;
   margin:16px 0;
   padding:14px 16px;
   border-radius:var(--gbs-radius-control, .5rem);
   background:var(--surface-muted);
}

.gbs-order-facts > div{
   display:flex;
   flex-direction:column;
   gap:2px;
}

.gbs-order-facts span{
   font-size:var(--gbs-fs-overline, .6875rem);
   color:var(--text-secondary);
   text-transform:uppercase;
   letter-spacing:.03em;
}

.gbs-order-facts strong{
   font-size:var(--gbs-fs-body-md, .875rem);
   color:var(--text-primary);
}

.gbs-order-items{
   display:flex;
   flex-direction:column;
   gap:8px;
   margin-bottom:16px;
}

.gbs-order-item{
   display:grid;
   grid-template-columns:1fr 60px 110px;
   gap:10px;
   font-size:var(--gbs-fs-body-md, .875rem);
   color:var(--text-primary);
}

.gbs-order-item-qty{
   color:var(--text-secondary);
   text-align:center;
}

.gbs-order-item-total{
   text-align:right;
   font-weight:600;
   white-space:nowrap;
}

.gbs-order-totals{
   display:flex;
   flex-direction:column;
   gap:6px;
   padding-top:12px;
   border-top:1px solid var(--border-color);
}

.gbs-order-totals > div{
   display:flex;
   justify-content:space-between;
   font-size:var(--gbs-fs-body-sm, .75rem);
   color:var(--text-secondary);
}

.gbs-order-grand{
   font-weight:700;
   font-size:var(--gbs-fs-body-md, .875rem) !important;
   color:var(--text-primary) !important;
}

/* ---------------------------------------------------------------------
   Mobile section order (screen.png_2): unlike desktop, the mobile
   reference interleaves the 3 promo cards - "Shop your school list"
   sits between the category strip and Featured Books, "Explore
   collections"/"Request a Book" sit after it. Same sections, same DOM,
   same backend - .gbs-promo-row is unwrapped (display:contents) so its
   3 cards become direct flex children of <main> and can each take their
   own `order` alongside the category/featured sections around them.
   --------------------------------------------------------------------- */

/* ---------------------------------------------------------------------
   Branch locations summary - Stitch mobile body only
   (galle_book_shop_mobile_app_homepage/code.html "BranchLocationsSummary").
   Hidden above the mobile breakpoint - the footer already lists branches
   for desktop visitors. */
.gbs-branch-summary{
   display:none;
}

.gbs-branch-card{
   width:calc(100% - 40px);
   margin:0 auto;
   padding:18px;
   border:1px solid var(--border-color);
   border-radius:var(--gbs-radius-card, 14px);
   background:var(--surface);
   box-shadow:var(--gbs-shadow-1);
}

.gbs-branch-card-head{
   display:flex;
   align-items:flex-start;
   gap:10px;
   margin-bottom:14px;
}

.gbs-branch-icon{
   display:flex;
   align-items:center;
   justify-content:center;
   flex:0 0 auto;
   width:32px;
   height:32px;
   border-radius:9px;
   background:var(--brand-primary-soft);
   color:var(--brand-primary);
}

.gbs-branch-card-head h3{
   margin:0;
   font-size:.92rem;
   font-weight:700;
   color:var(--brand-primary);
}

.gbs-branch-card-head p{
   margin:2px 0 0;
   font-size:.72rem;
   color:var(--text-secondary);
}

.gbs-branch-grid{
   display:grid;
   grid-template-columns:repeat(3,1fr);
   gap:8px;
   padding-top:12px;
   border-top:1px solid var(--border-color);
}

.gbs-branch-pill{
   padding:8px 4px;
   border:1px solid var(--border-color);
   border-radius:10px;
   background:var(--background-soft);
   text-align:center;
}

.gbs-branch-pill strong{
   display:block;
   font-size:.78rem;
   font-weight:700;
   color:var(--text-primary);
}

.gbs-branch-pill span{
   display:block;
   margin-top:2px;
   font-size:.65rem;
   color:var(--text-secondary);
}

/* ---------------------------------------------------------------------
   Mobile fixed bottom tab bar - shared across every customer page that
   includes footer.php (design-reference/screen.png_2). galle-theme.css
   itself is only ever loaded by those same customer pages, so this
   padding-bottom is safe to apply unconditionally at this breakpoint.
   --------------------------------------------------------------------- */

.gbs-mobile-tabbar{
   display:none;
}

.gbs-school-list-items{
   display:grid;
   grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
   gap:14px;
   margin-top:16px;
}

.gbs-school-list-item{
   padding:14px;
   border:1px solid var(--border-color);
   border-radius:var(--gbs-radius-card, 12px);
}

/* contact.php's info column - real existing features, not fabricated
   contact details, filling the space that used to end abruptly next to
   the taller message form. Matches .contact-list's own icon-circle
   language instead of inventing a new visual style. */
.contact-quick-links{
   display:flex;
   flex-direction:column;
   gap:10px;
   margin-top:24px;
   padding-top:20px;
   border-top:1px solid var(--border-color);
}

.contact-quick-links h3{
   margin:0 0 4px;
   font-size:var(--gbs-fs-label, .875rem);
   font-weight:700;
   color:var(--text-primary);
}

.contact-quick-link{
   display:flex;
   align-items:center;
   gap:12px;
   padding:12px;
   border:1px solid var(--border-color);
   border-radius:var(--gbs-radius-control, .5rem);
   text-decoration:none;
   transition:border-color .15s ease, background .15s ease;
}

.contact-quick-link:hover{
   background:var(--surface-muted);
   border-color:var(--brand-primary);
}

.contact-quick-link > i:first-child{
   flex:0 0 40px;
   width:40px;
   height:40px;
   display:grid;
   place-items:center;
   border-radius:50%;
   background:var(--brand-primary-soft);
   color:var(--brand-primary);
   font-size:1.1rem;
}

.contact-quick-link span{
   flex:1 1 auto;
   min-width:0;
   display:flex;
   flex-direction:column;
   gap:2px;
}

.contact-quick-link strong{
   color:var(--text-primary);
   font-size:var(--gbs-fs-body-md, .875rem);
}

.contact-quick-link small{
   color:var(--text-secondary);
   font-size:var(--gbs-fs-body-sm, .75rem);
}

.contact-quick-link > i:last-child{
   flex:0 0 auto;
   color:var(--text-secondary);
   font-size:.85rem;
}

/* my_book_requests.php - reuses .gbs-order-card/.gbs-order-status (Orders)
   for one consistent "my history" visual language instead of a third,
   different list style. Each request is a single flat card (no expand -
   there's nothing extra to reveal beyond what's already on the row). */
.gbs-book-request-card-body{
   display:flex;
   align-items:flex-start;
   justify-content:space-between;
   gap:16px;
   padding:16px 20px;
}

.gbs-book-request-main{
   min-width:0;
   flex:1 1 auto;
}

.gbs-book-request-main h3{
   margin:0 0 4px;
   font-family:var(--font-heading);
   font-size:var(--gbs-fs-h4, 1.0625rem);
   color:var(--text-primary);
}

.gbs-book-request-meta{
   display:flex;
   flex-wrap:wrap;
   gap:4px 10px;
   margin:0;
   color:var(--text-secondary);
   font-size:var(--gbs-fs-body-sm, .75rem);
}

.gbs-book-request-notes{
   margin:8px 0 0;
   padding:8px 10px;
   border-radius:var(--gbs-radius-control, .5rem);
   background:var(--surface-muted);
   color:var(--text-secondary);
   font-size:var(--gbs-fs-body-sm, .75rem);
}

.gbs-book-request-side{
   flex:0 0 auto;
   display:flex;
   flex-direction:column;
   align-items:flex-end;
   gap:6px;
   text-align:right;
}

.gbs-book-request-date{
   color:var(--text-secondary);
   font-size:var(--gbs-fs-overline, .6875rem);
   white-space:nowrap;
}

.gbs-book-request-empty{
   display:flex;
   flex-direction:column;
   align-items:center;
   gap:16px;
}

/* school_list_results.php - a real, still-in-the-list item that just isn't
   currently sellable. Shown and clearly marked, not silently dropped. */
.gbs-school-list-item-unavailable{
   opacity:.6;
}

.gbs-school-list-unavailable-tag{
   color:#B42318;
   font-weight:600;
}

/* Contact: both cards share one top and one bottom line at desktop. */
.contact-layout{
   align-items:stretch;
}

.contact-layout .contact-info-card{
   box-sizing:border-box;
   height:100%;
}

/* Shared empty state (cart + wishlist): with no summary aside the layout is a
   single column, and the card centres its content in a fixed-height panel. */
.gbs-cart-layout:not(:has(> .gbs-cart-summary)){
   grid-template-columns:minmax(0, 1fr);
}

.gbs-cart-empty{
   box-sizing:border-box;
   justify-content:center;
   min-height:360px;
   width:100%;
   margin-inline:auto;
}

/* Shared legal layout (Privacy Policy + Terms & Conditions): one centred
   readable card (920px, ~85 characters per line) with page gutters. */
.legal-page{
   box-sizing:border-box;
   width:min(920px, 100% - 40px);
   margin:40px auto 72px;
   padding:44px 56px 52px;
   border-radius:var(--gbs-radius-card, .75rem);
   background:var(--surface, #fff);
   box-shadow:var(--gbs-shadow-1);
   line-height:1.75;
   color:var(--text-primary);
}

.legal-page h1{
   margin:0 0 8px;
   font-size:2.6rem;
}

.legal-page .legal-meta{
   margin:0 0 24px;
   font-size:1.35rem;
   color:var(--text-secondary);
}

.legal-page h2{
   margin:36px 0 10px;
   font-size:1.9rem;
}

.legal-page p,
.legal-page li{
   font-size:1.45rem;
}

.legal-page ul{
   margin:.6rem 0;
   padding-left:1.8rem;
}

.legal-page li{
   margin:.35rem 0;
}

.legal-page a{
   color:var(--brand-primary);
   text-decoration:underline;
}

/* Temporary notices (data-notice="success") - same block as components.css,
   which the storefront does not load: fade, then collapse, then the
   script removes the node. Only adds dismissal behaviour - no visual change. */
.message[data-notice]{
   transition:opacity 280ms ease, height 200ms ease, margin 200ms ease, padding 200ms ease, border-width 200ms ease;
}

.message.is-dismissing{
   opacity:0;
}

.message.is-collapsing{
   margin-block:0;
   padding-block:0;
   border-width:0;
}

@media (prefers-reduced-motion:reduce){
   .message[data-notice]{
      transition:none;
   }
}

/* =====================================================================
   MOBILE LAYER (customer pages) - the single responsive system for
   <= 820px. All older phone-width media queries were removed from the
   customer stylesheets; this section replaces them. Desktop/tablet rules
   above are untouched. Sizes are px because html is 62.5% (1rem = 10px).

   Structure:
     1 tokens           2 shell: header, search, drawer, tab bar, footer
     3 type + controls  4 home          5 catalogue family
     6 product detail   7 cart/checkout 8 account + lists + content pages
   ===================================================================== */
@media (max-width:738px){

   /* 1. Tokens */
   :root{--m-gutter:12px;--m-section:16px;--m-gap:7px;--m-pad:12px;--m-radius:10px;--m-control:40px;--m-control-sm:36px;--m-t-hero:26px;--m-t-page:21px;--m-t-section:19px;--m-t-card:12.5px;--m-t-body:13px;--m-t-small:11.5px;--m-t-meta:10px;--m-t-btn:12.5px;--m-tabbar:50px}

   /* 2. Shell ------------------------------------------------------- */
   html body{padding-bottom:0}
   :root body .gbs-shop-shell,
   :root body .home-category,
   :root body .products,
   :root body .gbs-branch-summary,
   :root body .page-main > section{width:calc(100% - 2 * var(--m-gutter));max-width:none;margin-left:auto;margin-right:auto}
   :root body .site-header .flex.customer-header-main.gbs-header-row{width:calc(100% - 2 * var(--m-gutter));padding:6px 0 0;row-gap:6px;column-gap:8px;grid-template-columns:minmax(0,1fr) auto auto;grid-template-areas:"brand actions menu" "search search search" "nav nav nav"}
   :root body .gbs-header{z-index:1020}
   :root body .gbs-header .gbs-brand{display:flex;align-items:center;align-self:center;justify-self:start;gap:8px;height:var(--m-control-sm);padding:0;line-height:1}
   :root body .gbs-brand-mark,
   :root body .gbs-header .gbs-brand .brand-logo-image{width:26px;height:26px;font-size:12px;border-radius:7px}
   :root body .gbs-brand-name{font-size:14.5px;font-weight:600;line-height:1.1}
   :root body .gbs-brand-tagline{display:none}
   :root body .gbs-icons.icons{gap:0}
   :root body .gbs-icons .header-action{min-width:var(--m-control-sm);height:var(--m-control-sm);padding:0;justify-content:center;min-height:0;width:var(--m-control-sm)}
   :root body .gbs-icons .header-action i{font-size:16px}
   :root body .gbs-icons .header-action span:not(.header-cart-icon):not(.header-cart-badge),
   :root body .gbs-icons .header-cart-copy{display:none}
   :root body #menu-btn{width:36px;height:var(--m-control-sm);border-radius:8px;font-size:16px;border:0;background:transparent;display:grid;place-items:center;line-height:1;padding:0;align-self:center;justify-self:end;min-height:0}
   :root body .gbs-search-form{width:100%;max-width:none;height:38px;margin:0 0 7px;overflow:hidden;box-sizing:border-box;min-width:0}
   :root body .gbs-search-form .gbs-search-icon-leading{width:34px;font-size:15px;flex:0 0 34px;line-height:1;height:100%}
   :root body .gbs-search-form #search-box{height:100%;min-height:0;padding-left:2px;font-size:12.5px;text-align:left;text-indent:0}
   :root body .gbs-search-form .gbs-search-submit{height:100%;min-width:58px;padding:0 12px;font-size:12px;font-weight:600;border-radius:0;align-self:stretch}

   /* Drawer: left-anchored sheet under the header, backdrop behind it */
   :root body .gbs-navbar.navbar{position:absolute;top:calc(100% + 6px);left:0;right:auto;width:min(316px,calc(100vw - 24px));max-height:calc(100dvh - 190px);overflow-y:auto;overscroll-behavior:contain;gap:2px;padding:2px 6px;box-shadow:0 12px 32px rgba(13,32,64,.16);border-radius:14px}
   :root body .gbs-navbar.navbar a,
   :root body .gbs-navbar.navbar summary{min-height:44px;padding:9px 12px;font-size:13.5px;font-weight:500;display:flex;align-items:center;gap:9px;border-radius:0;background:transparent;color:var(--text-primary);border-bottom:1px solid #f1f3f8}
   :root body .gbs-navbar.navbar a:hover,
   :root body .gbs-navbar.navbar a:active{background:#f4f7fc}
   :root body .gbs-navbar.navbar summary{justify-content:space-between;color:var(--text-primary);font-weight:700}
   :root body .gbs-navbar.navbar summary .gbs-caret{margin-left:auto}
   :root body .gbs-navbar.navbar .gbs-nav-primary a,
   :root body .gbs-navbar.navbar .gbs-nav-secondary a{padding-left:14px}
   :root body .gbs-navbar.navbar .gbs-nav-secondary a:last-child{border-bottom:0}
   :root body .gbs-navbar.navbar a.desktop-nav-only{display:none}
   :root body .gbs-nav-primary,
   :root body .gbs-nav-secondary{display:flex;flex-direction:column;gap:2px}
   :root body .gbs-all-categories{display:none}
   body:has(.gbs-navbar.active)::after{content:"";position:fixed;inset:0;z-index:1000;background:rgba(13,32,64,.38);pointer-events:none}
   body:has(.gbs-navbar.active){overflow:hidden}

   /* Bottom tab bar: quiet, safe-area aware */
   :root body .gbs-mobile-tabbar{position:fixed;left:0;right:0;bottom:0;z-index:1020;display:flex;align-items:flex-start;justify-content:space-between;height:calc(var(--m-tabbar) + env(safe-area-inset-bottom, 0px));padding:6px 6px calc(4px + env(safe-area-inset-bottom, 0px));background:#fff;border-top:1px solid #edf0f5;padding-top:5px;box-shadow:none}
   :root body .gbs-mobile-tab{display:flex;flex-direction:column;align-items:center;gap:1px;flex:1 1 0;min-width:0;color:var(--text-secondary);font-size:9px;font-weight:600;text-align:center}
   :root body .gbs-mobile-tab i{font-size:15px}
   :root body .gbs-mobile-tab.is-active{color:var(--brand-accent,var(--brand-primary))}
   :root body .gbs-mobile-tab-highlight{margin-top:-6px}
   :root body .gbs-mobile-tab-badge{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--brand-primary);color:#fff;box-shadow:none}
   :root body .gbs-mobile-tab-badge i{font-size:13px}

   /* Footer: one stacked, compact column; clears the tab bar */
   :root body .pagination{gap:6px;margin:14px 0 0}
   :root body .pagination a,
   :root body .pagination span{min-width:36px;height:36px;padding:0 9px;font-size:var(--m-t-small)}

   /* 3. Shared section heads, buttons, forms ------------------------ */
   :root body .section-head{display:flex;flex-direction:row;align-items:flex-end;justify-content:space-between;gap:var(--m-gap);margin:0 0 10px}
   :root body .section-head .eyebrow{font-size:10px;letter-spacing:.08em;margin-bottom:1px}
   :root body .section-head .title,
   :root body .section-head h2{font-size:var(--m-t-section);line-height:1.15;margin:0;font-weight:600}
   :root body .section-head > a{flex:0 0 auto;display:inline-flex;align-items:center;min-height:30px;padding:4px 0 4px 8px;font-size:12px;white-space:nowrap;font-weight:600;border:0;background:transparent;color:var(--brand-accent,#2563eb)}
   :root body .inputBox label{font-size:var(--m-t-small)}
   :root body .inputBox input.box,
   :root body .inputBox select.box{height:var(--m-control);min-height:var(--m-control);padding:0 12px;font-size:13.5px}

   /* 4. Home -------------------------------------------------------- */
   :root body .store-hero.gbs-hero{width:calc(100% - 2 * var(--m-gutter));margin:8px auto 0}
   :root body .gbs-hero .gbs-hero-composition{width:100%;margin:0;border:0;background:transparent;box-shadow:none;border-radius:0}
   :root body .gbs-hero-main{display:flex;flex-direction:column;min-height:0;padding:12px 0 4px;background:transparent}
   :root body .gbs-hero-main .content{display:contents}
   :root body .gbs-hero-main .content > h1.gbs-hero-heading{order:1;margin:0 0 6px;font-size:var(--m-t-hero);line-height:1.06}
   :root body .gbs-hero-main .content > p{order:2;margin:0 0 10px;font-size:var(--m-t-body);line-height:1.5}
   :root body .gbs-hero-main .content > .hero-actions{order:3;display:flex;flex-direction:column;align-items:stretch;gap:var(--m-gap);margin:0}
   :root body .gbs-hero-main .hero-actions .btn,
   :root body .gbs-hero-main .hero-actions .option-btn{width:100%;justify-content:center;text-align:center;min-height:38px;padding:7px 14px;font-size:var(--m-t-btn);box-shadow:none}
   :root body .gbs-hero-visual{position:relative;inset:auto;order:4;width:100%;height:auto;min-height:0;margin:10px 0 0;border-radius:var(--m-radius);overflow:hidden}
   :root body .gbs-hero-mask{display:none}
   :root body .gbs-hero-visual img{width:100%;height:150px;min-height:0;max-height:none;object-fit:cover;object-position:center}
   :root body .gbs-hero-main .content > .gbs-hero-trust{order:5}
   :root body .gbs-hero-trust{display:flex;flex-direction:row;gap:10px;margin-top:12px;padding-top:0;justify-content:flex-start;border-top:0}
   :root body .gbs-hero .content .gbs-hero-trust > span{flex:0 0 auto;min-width:0;gap:5px}
   :root body .gbs-hero-trust i{font-size:13px}
   :root body .gbs-hero-trust strong{font-size:10.5px;line-height:1.2;white-space:nowrap}
   :root body .gbs-hero-trust small{font-size:9.5px;line-height:1.25;white-space:normal;display:none}
   :root body .home-category,
   :root body .products,
   :root body .gbs-branch-summary{display:block;margin-top:4px;margin-bottom:0;padding:14px 0 2px}
   :root body .home-category .box-container{display:flex;gap:var(--m-gap);overflow-x:auto;padding:2px 2px 6px;scroll-snap-type:x proximity}
   :root body .home-category .category-card{flex:0 0 78px;width:72px;min-height:0;padding:7px 4px;gap:5px;text-align:center;scroll-snap-align:start;flex-basis:72px;border-color:transparent;background:transparent;box-shadow:none}
   :root body .home-category .category-card-icon{width:32px;height:32px;margin:0 auto;font-size:14px}
   :root body .home-category .category-card-body h3{margin:0;font-size:10px;line-height:1.2;white-space:normal;overflow-wrap:anywhere}
   :root body .gbs-featured-grid{display:flex;gap:var(--m-gap);overflow-x:auto;scroll-snap-type:x proximity;scroll-padding-left:var(--m-gutter);margin:0 calc(-1 * var(--m-gutter));padding:0 var(--m-gutter) 6px}
   :root body .gbs-featured-grid > .gbs-book-card{flex:0 0 144px;width:140px;scroll-snap-align:start;flex-basis:140px;height:auto;align-self:stretch}
   :root body .gbs-promo-card{display:block;padding:12px 14px;min-height:0;border-color:transparent;overflow:hidden;background:var(--surface-muted);border:0}
   :root body .gbs-promo-eyebrow{font-size:9.5px}
   :root body .gbs-promo-card h2,
   :root body .gbs-promo-card h3{margin:0 0 2px;font-size:16px;line-height:1.2}
   :root body .gbs-promo-card p{margin:0 0 4px;font-size:12px;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
   :root body .gbs-promo-link{font-size:12.5px}
   :root body .gbs-branch-card{width:100%;margin:0;padding:14px;border-color:transparent;box-shadow:none;background:var(--surface-muted)}
   :root body .gbs-branch-card h3{font-size:14px;line-height:1.3}
   :root body .gbs-branch-card p{margin:2px 0 0;font-size:11.5px}
   :root body .gbs-branch-pill strong{font-size:12px}
   :root body .gbs-branch-pill span{font-size:10.5px}

   /* 5. Catalogue family: shop / category / subcategory / search ---- */
   :root body .gbs-shop-breadcrumb{margin:14px 0 12px;font-size:11.5px}
   :root body .gbs-shop-heading{margin:0;padding:0}
   :root body .gbs-shop-heading h1{margin:0 0 8px;font-size:var(--m-t-page);line-height:1.15}
   :root body .gbs-shop-heading p{margin:0 0 18px;font-size:13px;line-height:1.45}
   :root body .gbs-shop-heading-badge{padding:4px 9px;min-height:0;font-size:11px}
   :root body .gbs-shop-layout{display:block;width:auto;margin:0;padding:0}
   :root body .gbs-shop-results{width:auto;max-width:none;margin:0;padding:6px 0 10px}
   :root body .gbs-shop-toolbar{margin:0 0 14px;padding:0;gap:8px;border:0;background:transparent;box-shadow:none;flex-direction:column;align-items:stretch}
   :root body .gbs-catalogue-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--m-gap)}
   :root body .gbs-shop-pickup-note{margin:10px 0 0;padding:10px;font-size:var(--m-t-small)}

   /* Product card (shared by home rails, catalogue grid, wishlist, related) */
   :root body .gbs-book-card{padding:8px;border-radius:var(--m-radius);border-color:#e8ecf3}
   :root body .gbs-book-cover{margin:0;border-radius:8px;aspect-ratio:5/4}
   :root body .gbs-book-cover .product-wishlist-btn{top:6px;right:6px;width:28px;height:28px;font-size:13px}
   :root body .gbs-book-body{margin:0;padding:8px 2px 0;gap:4px;flex:1 1 auto;display:flex;flex-direction:column}
   :root body .gbs-book-title{margin:0;min-height:0;font-size:12px;line-height:1.3;font-weight:600;-webkit-line-clamp:2;line-clamp:2}
   :root body .gbs-book-meta{display:none}
   :root body .gbs-book-footer{grid-template-columns:minmax(0,1fr) auto;gap:6px;align-items:center;margin-top:auto;padding-top:8px;border-top:0}
   :root body .gbs-book-price-label{font-size:9px;display:none}
   :root body .gbs-book-price-value{font-size:10.5px;white-space:nowrap;letter-spacing:-.02em}
   :root body .gbs-book-footer .product-card-actions.product-cart-actions .product-cart-add{width:28px;height:28px;background-size:14px 14px;border-radius:8px}

   /* 6. Product detail ---------------------------------------------- */
   :root body .gbs-shop-shell .products{width:auto;margin:var(--m-section) 0 0;padding:0 0 2px}
   :root body .gbs-shop-shell .gbs-featured-grid{margin:0 calc(-1 * var(--m-gutter));padding-left:var(--m-gutter);padding-right:var(--m-gutter)}
   :root body .gbs-product-layout{display:flex;flex-direction:column;align-items:stretch;gap:8px;margin:8px 0 0;padding:0;border:0;background:transparent;box-shadow:none}
   :root body .gbs-product-media{width:100%;max-width:225px;margin:0 auto}
   :root body .gbs-product-info{display:flex;flex-direction:column;gap:5px}
   :root body .gbs-product-category{align-self:flex-start;padding:3px 9px;font-size:10px}
   :root body .gbs-product-info h1{margin:0;font-size:var(--m-t-page);line-height:1.15}
   :root body .gbs-product-current-price{font-size:16px}
   :root body .gbs-product-price-label{font-size:10px}
   :root body .gbs-product-actions{align-self:stretch;margin-top:4px}
   :root body .gbs-product-actions .product-cart-actions{display:flex;flex-wrap:wrap;align-items:stretch;width:100%}
   :root body .gbs-product-actions .product-cart-add{flex:1 1 0;min-width:0}
   :root body .gbs-product-actions .option-btn,
   :root body .gbs-product-actions form{flex:1 1 100%;width:100%;justify-content:center}
   :root body .gbs-product-actions .product-cart-actions{gap:var(--m-gap)}
   :root body .gbs-product-actions .btn,
   :root body .gbs-product-actions .option-btn,
   :root body .gbs-product-actions input[type=submit],
   :root body .gbs-product-actions button{height:40px;min-height:0;padding-top:0;padding-bottom:0;font-size:var(--m-t-btn)}
   :root body .gbs-product-actions .option-btn,
   :root body .gbs-product-actions .product-wishlist-btn{height:38px;flex:1 1 100%;width:100%;justify-content:center}
   :root body .gbs-product-actions .qty-control,
   :root body .gbs-product-actions .qty,
   :root body .gbs-product-actions .product-cart-quantity-button{height:40px;min-height:0}
   :root body .gbs-product-pickup-note{padding:10px;font-size:var(--m-t-small)}
   :root body .gbs-product-facts{width:auto;align-self:stretch;padding:12px 0 0;gap:6px;border:0;border-top:1px solid var(--border-color);border-radius:0;background:transparent;box-shadow:none}
   :root body .gbs-product-facts > *{padding:0;background:transparent;border:0;box-shadow:none}
   :root body .gbs-product-information{margin:10px 0 0;padding:14px 0 0;border:0;border-top:1px solid var(--border-color);border-radius:0;background:transparent;box-shadow:none}
   :root body .gbs-product-information h2{margin:0 0 6px;font-size:18px}
   :root body .gbs-product-information p{font-size:var(--m-t-body);line-height:1.5}

   /* 7. Cart + checkout --------------------------------------------- */
   :root body .gbs-cart-layout,
   :root body .gbs-checkout-layout{display:flex;flex-direction:column;align-items:stretch;gap:10px;margin:10px 0 0;padding:0;width:auto}
   :root body .gbs-cart-pickup-banner{margin:10px 0 0;padding:8px 10px;font-size:11.5px}
   :root body .gbs-cart-columns{display:none}
   :root body .gbs-cart-main,
   :root body .gbs-cart-summary{width:100%;max-width:none;min-width:0;padding:12px}
   :root body .gbs-cart-row{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"product product" "price total" "qty qty";align-items:center;gap:6px 10px;padding:10px 0;border:0;border-bottom:1px solid var(--border-color);border-radius:0;background:transparent;box-shadow:none}
   :root body .gbs-cart-row-product{grid-area:product;padding-right:32px}
   :root body .gbs-cart-row-price{grid-area:price}
   :root body .gbs-cart-row-subtotal{grid-area:total;justify-content:flex-end}
   :root body .gbs-cart-row-qty{grid-area:qty}
   :root body .gbs-cart-row-price,
   :root body .gbs-cart-row-qty,
   :root body .gbs-cart-row-subtotal{display:flex;flex-direction:row;align-items:center;gap:8px}
   :root body .gbs-cart-row-qty{justify-content:space-between}
   :root body .gbs-cart-row-price{justify-content:flex-start}
   :root body .gbs-cart-mobile-label{display:inline;font-size:11px;font-weight:600;color:var(--text-secondary)}
   :root body .gbs-cart-row-remove{position:absolute;top:12px;right:0}
   :root body .gbs-cart-qty-control{margin:0}
   :root body .gbs-cart-row-media{width:42px;height:54px}
   :root body .gbs-cart-row-media img{width:40px;height:52px}
   :root body .gbs-cart-row-name{font-size:12.5px}
   :root body .gbs-cart-qty-control{height:40px}
   :root body .gbs-cart-qty-btn{width:34px;height:40px}
   :root body .gbs-cart-qty-input{height:40px;font-size:var(--m-t-card)}
   :root body .gbs-cart-summary{padding:14px}
   :root body .gbs-cart-summary-total strong,
   :root body .gbs-cart-summary-total span{font-size:15px}
   :root body .gbs-cart-summary-total small{display:block;font-size:11px}
   :root body .gbs-cart-checkout-btn{min-height:44px;font-size:14px}
   :root body .gbs-checkout-form-panel{padding:12px}
   :root body .gbs-checkout-summary-items{font-size:11.5px}
   :root body .gbs-checkout-form-panel h2,
   :root body .gbs-checkout-form-panel h3{font-size:16px}
   :root body .gbs-checkout-card{margin:0 0 8px;padding:0 0 8px;gap:6px}
   :root body .gbs-checkout-step h4{font-size:15px}
   :root body .gbs-checkout-step-number{width:24px;height:24px;font-size:12px}
   :root body .gbs-checkout-form-panel input[type=submit],
   :root body .gbs-checkout-form-panel button[type=submit]{width:100%;min-height:46px;font-size:14px}

   /* 8. Content pages ----------------------------------------------- */
   :root body .page-main,
   :root body .gbs-content-page{padding-left:0;padding-right:0}
   :root body .about-hero,
   :root body .about .row,
   :root body .contact-layout > *,
   :root body .legal-page{padding:14px;border-radius:12px}
   :root body .about-hero h1,
   :root body .about-copy h2,
   :root body .about-copy h1,
   :root body .contact-head h1,
   :root body .contact-head .title,
   :root body .legal-page h1{font-size:var(--m-t-page);line-height:1.15}
   :root body .about-copy p,
   :root body .contact-head p{font-size:var(--m-t-body);line-height:1.5}
   :root body .about-image{min-height:0;height:96px;border-radius:10px}
   :root body .about-image-icon{font-size:30px}
   :root body .about,
   :root body .reviews{margin-left:var(--m-gutter);margin-right:var(--m-gutter);padding:12px 0}
   :root body .about .row{padding:0;gap:10px}
   :root body .about .row .box{display:flex;flex-direction:column;padding:12px;gap:8px}
   :root body .about .row .box-icon{height:90px;min-height:0}
   :root body .contact-layout{gap:10px}
   :root body .contact input.box{height:var(--m-control);min-height:var(--m-control);font-size:14px}
   :root body .contact textarea.box{min-height:110px;font-size:14px}
   :root body .contact label{font-size:var(--m-t-small)}
   :root body .legal-page h2{margin-top:16px;font-size:17px}
   :root body .legal-page p,
   :root body .legal-page li{font-size:14px;line-height:1.6}

   /* Home flow: hero > three promos > categories > product rails > branches */
   body.homepage-redesign main{display:flex;flex-direction:column}
   body.homepage-redesign main > .store-hero{order:1}
   body.homepage-redesign main > .gbs-promo-row{display:contents}
   body.homepage-redesign main > .gbs-promo-row > .gbs-promo-card{order:2;margin:var(--m-section) var(--m-gutter) 0}
   body.homepage-redesign main > .gbs-promo-row > .gbs-promo-card-alt{order:3;margin-top:var(--m-gap)}
   body.homepage-redesign main > .gbs-promo-row > .gbs-promo-card-request{order:4;margin-top:var(--m-gap)}
   body.homepage-redesign main > #shop-by-category{order:5}
   body.homepage-redesign main > #featured{order:6}
   body.homepage-redesign main > #new-arrivals{order:7}
   body.homepage-redesign main > #more-catalogue{order:8}
   body.homepage-redesign main > .gbs-branch-summary{order:9;margin-bottom:0}

   /* Orders, book requests, legal, small grids */
   :root body .gbs-order-row{grid-template-columns:1fr auto;grid-template-areas:"ref chevron" "total status" "date date";gap:3px 8px;padding:10px 12px}
   :root body .gbs-order-ref{font-size:13.5px}
   :root body .gbs-order-total{font-size:14.5px}
   :root body .gbs-order-date{font-size:11px}
   :root body .gbs-order-ref{grid-area:ref}
   :root body .gbs-order-chevron{grid-area:chevron}
   :root body .gbs-order-total{grid-area:total}
   :root body .gbs-order-status-cell{grid-area:status}
   :root body .gbs-order-date{grid-area:date}
   :root body .gbs-order-item{grid-template-columns:1fr auto auto}
   :root body .gbs-book-request-card-body{flex-direction:column}
   :root body .gbs-book-request-side{align-items:flex-start;flex-direction:row;justify-content:space-between;width:100%}
   :root body .gbs-product-meta-list{flex-direction:row;flex-wrap:wrap;gap:16px}
   :root body .gbs-product-meta-list > div{flex:1 1 140px}
   :root body .products .box-container,
   :root body .shop-product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}

   /* Account profile */
   :root body .commerce-hero{padding:14px;border-radius:12px}
   :root body .commerce-hero h1{font-size:var(--m-t-page);line-height:1.15}
   :root body .commerce-hero p{font-size:var(--m-t-body);line-height:1.5}
   :root body .update-profile{margin-left:var(--m-gutter);margin-right:var(--m-gutter);width:auto}
   :root body .update-profile form{padding:14px}
   :root body .update-profile form .flex{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
   :root body .update-profile .flex-btn{flex-direction:column;gap:8px}
   :root body .update-profile .btn,
   :root body .update-profile .option-btn{width:100%}
   :root body .profile-password-grid{grid-template-columns:1fr}
   :root body .profile-note{font-size:var(--m-t-small)}
   :root body .update-profile .title,
   :root body .page-main > section > .title{font-size:var(--m-t-section);margin:0 0 var(--m-gap)}
   :root body .gbs-sm-hide{display:none}
   :root body .gbs-order-placed-banner{gap:10px;margin:0 0 var(--m-gap);padding:10px 12px;border-radius:var(--m-radius)}
   :root body .gbs-order-placed-banner i{font-size:16px}
   :root body .gbs-order-placed-banner strong{font-size:var(--m-t-card)}
   :root body .gbs-order-placed-banner span{font-size:11.5px;line-height:1.35;display:block}

/* Calm hero actions: ghost secondary CTA */
   :root body .gbs-hero-main .hero-actions .option-btn{border-color:transparent;background:var(--surface-muted)}

/* Flat cart list (rows are separated by hairlines, not nested cards) */
   :root body .gbs-cart-main,
   :root body .gbs-cart-list{padding:0;border:0;background:transparent;box-shadow:none}

   :root body .gbs-shop-shell{margin-top:0}

   :root body .gbs-shop-heading-badge{display:none}

   :root body .gbs-promo-copy{max-width:63%}

   :root body .gbs-header-actions{align-items:center;height:var(--m-control-sm);min-height:0;margin:0;padding:0}

   :root body .gbs-icons.icons{align-items:center;height:var(--m-control-sm)}
   :root body .gbs-icons .header-logout-form,
   :root body .gbs-icons .logout-btn{display:grid;place-items:center;width:var(--m-control-sm);height:var(--m-control-sm);min-height:0;padding:0;margin:0}
   :root body .gbs-icons .logout-btn i{font-size:15px}

/* Empty states + short-page footer clearance */
   :root body .gbs-shop-shell{min-height:calc(100dvh - 380px)}
   :root body .gbs-shop-empty,
   :root body .empty.gbs-shop-empty{padding:22px 16px;font-size:13px;line-height:1.5;border-radius:12px}
   :root body .gbs-book-request-empty{display:flex;flex-direction:column;align-items:center;gap:12px;padding:22px 16px;border-radius:12px;background:var(--surface-muted)}
   :root body .gbs-book-request-empty .empty,
   :root body .gbs-book-request-empty .gbs-shop-empty{padding:0;border:0;background:transparent}

   :root body .gbs-book-request-empty{margin-top:20px}

/* Header: Account + Wishlist live in the bottom nav; keep brand, cart, logout, menu */
   :root body .gbs-icons .gbs-account-action,
   :root body .gbs-icons .header-action[title="Wishlist"]{display:none}
   :root body .gbs-header-row{overflow:visible}
/* Drawer: Home is already the centre tab */
   :root body .gbs-navbar.navbar .mobile-nav-only{display:none}
/* Pickup messaging belongs to checkout only */
   :root body .gbs-shop-pickup-note,
   :root body .gbs-product-pickup-note,
   :root body .cart-page-shell .gbs-cart-pickup-banner{display:none}
/* Shop toolbar */
   :root body .gbs-shop-heading p{max-width:none}
   :root body .gbs-shop-toolbar > div:first-child{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}
   :root body .gbs-shop-toolbar-actions{display:flex;width:100%;gap:8px}
   :root body .gbs-shop-mobile-categories{flex:1 1 0}
   :root body .gbs-shop-mobile-categories summary,
   :root body .gbs-shop-toolbar-actions > :not(details){justify-content:center}
   :root body .gbs-shop-toolbar-actions > :not(details){flex:1 1 0}

/* Product detail, in-cart state: the stepper takes the full action row (no dead gap where Add to cart was) */
   :root body .gbs-product-layout.is-in-cart .gbs-product-actions .product-cart-actions{display:block}
   :root body .gbs-product-layout.is-in-cart .gbs-product-actions .product-cart-quantity-control{display:grid;grid-template-columns:48px minmax(0,1fr) 48px;width:100%;border-color:var(--gbs-success,#16a34a);background:#f2fbf5}
   :root body .gbs-product-layout.is-in-cart .gbs-product-actions .product-cart-quantity-control .qty{width:100%;text-align:center;font-weight:700}
   :root body .gbs-product-layout.is-in-cart .gbs-product-actions .product-cart-quantity-button{width:100%;color:var(--gbs-success,#16a34a)}
   :root body .gbs-product-layout.is-in-cart .gbs-product-actions .product-cart-status:empty{display:none}
   :root body .gbs-product-actions .product-cart-status{margin:6px 0 0;font-size:12px;text-align:center}

   :root body .gbs-cart-pickup-footnote{display:none}

/* In-cart card stepper: same 28px footprint as the Add button, so the card never changes height */
   :root body .product-cart-form.is-in-cart .gbs-book-footer .product-card-actions.product-cart-actions .qty-control{height:28px;min-height:0}
   :root body .product-cart-form.is-in-cart .gbs-book-footer .product-cart-quantity-control .product-cart-quantity-button,
   :root body .product-cart-form.is-in-cart .gbs-book-footer .product-cart-quantity-control .qty{height:28px;min-height:0;line-height:28px}

/* Account profile hero: comfortable inner padding + title rhythm */
   :root body .commerce-hero{padding:16px 18px}
   :root body .commerce-hero .eyebrow{display:block;margin:0 0 6px}
   :root body .commerce-hero h1{margin:0 0 6px}
   :root body .commerce-hero p{margin:0}
   :root body .update-profile{margin-top:12px}
/* Footer: quieter credit, shorter stack */
/* Breathing room above page titles */
   :root body .gbs-shop-toolbar-actions summary,
   :root body .gbs-shop-toolbar-actions > :not(details){height:40px;min-height:40px;box-sizing:border-box}



   :root body .page-main > section:not(.commerce-hero):not(.about-hero):not(.legal-page){padding-top:0;padding-bottom:0}
   :root body .page-main > section + section{margin-top:var(--m-section)}

   /* Footer: centred, stacked groups; one calm column per section */
   :root body .customer-footer{margin-top:20px;padding:26px 22px calc(var(--m-tabbar) + 26px + env(safe-area-inset-bottom, 0px));text-align:center}
   :root body .customer-footer .footer-grid{display:flex;flex-direction:column;align-items:center;gap:26px;width:auto;margin:0;padding:0}
   :root body .customer-footer .box{width:100%;margin:0;padding:0}
   :root body .customer-footer .box h3{margin:0 0 12px;font-size:12px;letter-spacing:.12em;text-transform:uppercase;font-weight:700}
   :root body .customer-footer .footer-brand{text-align:center}
   :root body .customer-footer .footer-brand .footer-brand-logo{display:block;margin-left:auto;margin-right:auto}
   :root body .customer-footer .footer-brand h3{margin:0 0 6px;font-size:17px;letter-spacing:0;text-transform:none}
   :root body .customer-footer .footer-brand p{display:block;margin:0;font-size:12.5px;opacity:.8}
   :root body .customer-footer .footer-links{display:flex;flex-direction:column;align-items:center;gap:0}
   :root body .customer-footer .footer-links a{display:block;padding:4px 0;font-size:13px;line-height:1.4;min-height:0}
   :root body .customer-footer .footer-links a i{display:none}
   :root body .customer-footer .footer-links p{margin:6px 0 0;font-size:12px}
   :root body .customer-footer .credit{margin:26px 0 0;padding:18px 0 0;border-top:1px solid rgba(255,255,255,.12);font-size:11.5px;line-height:1.5;text-align:center;opacity:.85}
   :root body .developer-credit,
   :root body .developer-credit-inner{margin:0;padding:0;border:0;background:transparent;box-shadow:none;text-align:center}
   :root body .developer-credit{margin-top:10px}
   :root body .developer-credit-title{margin:0;font-size:11px;line-height:1.5;text-align:center;opacity:.8}
   :root body .developer-credit-copy{width:100%;text-align:center}
   :root body .developer-credit-inner{width:100%;display:block}
   :root body .developer-credit-title a{display:block;margin-top:2px}
   :root body .developer-credit-title{display:block;width:100%}
   :root body .developer-credit-services{display:none}

   :root body .gbs-brand-mark,
   :root body .gbs-header .gbs-brand .brand-logo-image{align-self:center;flex:0 0 auto}
   :root body .gbs-brand-text{display:flex;align-items:center}
   :root body .gbs-search-form{margin-left:auto;margin-right:auto}
   :root body .developer-credit,
   :root body .developer-credit-inner,
   :root body .developer-credit-copy,
   :root body .developer-credit-title{display:block;width:100%;text-align:center}
   :root body .developer-credit-title a{display:block;width:fit-content;margin:2px auto 0}
   :root body .customer-footer .credit{display:block;width:100%;margin-left:0;margin-right:0}
}


/* Narrow desktop (941-1199px): 4 columns instead of 3 */
@media (min-width:941px) and (max-width:1199px){
   :root body .gbs-catalogue-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}

/* Small tablet (601-820px): same mobile layer, roomier product grid */
@media (min-width:601px) and (max-width:738px){
   :root body .gbs-catalogue-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
   :root body .gbs-featured-grid > .gbs-book-card{flex-basis:168px;width:168px}
}
/* =====================================================================
   DESKTOP DENSITY (>= 1200px): proportions tuned to read like the 90%
   zoom view at normal 100% zoom. Values only - no layout changes. Mobile
   and tablet (< 1200px) are untouched. Sizes are px (html is 62.5%).
   ===================================================================== */
@media (min-width:1200px){
   /* Header + search */
   :root body .site-header .flex.customer-header-main.gbs-header-row{padding-top:5px}
   :root body .gbs-search-form{height:42px;margin-bottom:6px}
   :root body .gbs-search-submit{height:40px;padding:0 22px}
   :root body .gbs-all-categories-toggle{height:38px}
   :root body .gbs-nav-secondary a,
   :root body .gbs-nav-primary a{min-height:38px;padding-top:6px;padding-bottom:6px}
   :root body .gbs-nav-primary{gap:20px}
   :root body .gbs-header-actions{padding-bottom:2px}
   :root body .gbs-icons .header-action{padding-top:3px;padding-bottom:3px}
   :root body .gbs-navbar{padding-top:4px;padding-bottom:6px}

   /* Section rhythm + headings */
   body.homepage-redesign main > * + *{margin-top:16px}
   :root body .section-head .title{font-size:24px}
   :root body .gbs-shop-heading h1{font-size:25px}
   :root body .gbs-shop-heading{margin-top:14px}
   :root body .gbs-shop-breadcrumb{margin-top:12px}

   /* Hero + promos */
   :root body .gbs-hero-main h1.gbs-hero-heading,
   :root body .gbs-hero-main .content > h1{font-size:40px;line-height:1.15}
   :root body .gbs-hero-main{min-height:0;height:360px}
   :root body .gbs-hero-trust{margin-top:8px;padding-top:6px}
   :root body .gbs-promo-row{gap:16px}
   :root body .gbs-promo-card{padding:17px}
   :root body .gbs-promo-card h2{font-size:18px}

   /* Product cards + grids */
   :root body .gbs-book-card{padding:10px}
   :root body .gbs-book-cover{aspect-ratio:1 / 1.15}
   :root body .gbs-book-footer{padding-top:8px}
   :root body .gbs-featured-grid,
   :root body .gbs-catalogue-grid{gap:14px}
   :root body .gbs-shop-toolbar{padding:11px 14px;margin-bottom:12px}
   :root body .gbs-shop-sidebar{padding:15px}
   :root body .gbs-shop-layout{grid-template-columns:216px minmax(0,1fr);gap:20px}
   :root body .gbs-catalogue-grid{grid-template-columns:repeat(5,minmax(0,1fr))}

   /* Product detail */
   :root body .gbs-product-layout{padding:20px;gap:26px;margin-top:16px}
   :root body .gbs-product-media{width:270px;height:270px}
   :root body .gbs-product-info h1{font-size:24px}
   :root body .gbs-product-actions{margin-top:16px}
   :root body .gbs-product-information{padding:20px;margin-top:16px}
   :root body .gbs-product-facts{padding:14px}

   /* Footer */
   :root body .customer-footer{padding-top:32px;margin-top:16px}
   :root body .customer-footer .footer-grid{padding:28px 0 18px;gap:20px}
   :root body .customer-footer .footer-links a{margin-bottom:5px}
   :root body .customer-footer .credit{margin-top:18px;padding:11px 0}
   :root body .developer-credit{padding:30px 0}
   :root body .developer-credit-inner{padding:8px 0 16px}
}

/* =====================================================================
   FLUID LAYOUT (>= 821px): bounded fluid container, rails and grids.
   Mobile layer (<= 820px) is untouched. No zoom/transform/font-size hacks.
   ===================================================================== */
@media (min-width:739px){
   body.homepage-redesign,
   body.gbs-content-page{
      --container-width:calc(100vw - max(32px, 8vw));
      --container:calc(100vw - max(32px, 8vw));
      --gbs-fluid-gap:clamp(12px, 1vw, 20px);
   }

   /* Hero wrapper already carries the fluid shell width; don't re-apply it (and -40px) inside */
   :root body .gbs-hero .gbs-hero-composition{width:100%;margin-inline:0}

   /* Rails: cards share the whole rail equally (min 170px), no fixed ceiling */
   :root body .gbs-featured-grid{gap:var(--gbs-fluid-gap)}
   :root body .gbs-featured-grid > .gbs-book-card{
      flex:1 1 0;
      width:auto;
      min-width:170px;
      max-width:none;
   }

   /* Grids: adaptive column count, bounded card size */
   :root body .gbs-catalogue-grid{
      grid-template-columns:repeat(auto-fill, minmax(170px, 1fr));
      gap:var(--gbs-fluid-gap);
   }
}

@media (min-width:941px){
   :root body .gbs-shop-layout{
      grid-template-columns:clamp(208px, 16vw, 232px) minmax(0, 1fr);
      gap:clamp(16px, 1.5vw, 24px);
   }
}

/* Snap only helps touch/tablet; on wide desktop it makes arrow/wheel scroll jerky */
@media (min-width:1200px){
   :root body .gbs-featured-grid{scroll-snap-type:none}
}

/* POS stock snapshot badge (In stock / Out of stock); only rendered for items with a synced stock_qty. */
.product-stock-badge{display:block;width:100%;font-size:1.2rem;font-weight:600;line-height:1.3;margin:0 0 .4rem}
.product-stock-badge.is-in{color:#2e7d32}
.product-stock-badge.is-out{color:#b3261e}
.product-cart-add[disabled]{opacity:.5;cursor:not-allowed}

/* ---------------------------------------------------------------------------
   Category navigation: Books / Stationery groups (category_groups.php).
   Used by the All Categories dropdown, the shop/category sidebars and the mobile category sheet.
   --------------------------------------------------------------------------- */
.gbs-cat-nav{display:flex;flex-direction:column;gap:6px;min-width:0}
.gbs-cat-group{border:1px solid var(--border-color);border-radius:10px;background:var(--surface,#fff);min-width:0}
.gbs-cat-group-toggle{display:flex;align-items:center;gap:8px;padding:10px 12px;border-radius:10px;cursor:pointer;list-style:none;font-weight:700;font-size:var(--gbs-fs-body-md,.875rem);color:var(--brand-primary);user-select:none}
.gbs-cat-group-toggle::-webkit-details-marker{display:none}
.gbs-cat-group-toggle:hover{background:var(--brand-primary-pale)}
.gbs-cat-group-toggle:focus-visible,.gbs-cat-link:focus-visible{outline:2px solid var(--brand-primary);outline-offset:-2px}
.gbs-cat-group-title{display:flex;align-items:center;gap:8px;flex:1 1 auto;min-width:0}
.gbs-cat-group-count{flex:0 0 auto;padding:1px 8px;border-radius:999px;background:var(--brand-primary-soft);color:var(--brand-primary);font-size:var(--gbs-fs-overline,.6875rem);font-weight:700}
.gbs-cat-chevron{flex:0 0 auto;font-size:.8rem;transition:transform .18s ease}
.gbs-cat-group[open]>.gbs-cat-group-toggle .gbs-cat-chevron{transform:rotate(180deg)}
.gbs-cat-group[open]>.gbs-cat-group-toggle{border-bottom:1px solid var(--border-color);border-radius:10px 10px 0 0}
.gbs-cat-list{display:flex;flex-direction:column;gap:2px;padding:6px;max-height:min(46vh,380px);overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.gbs-cat-link{min-width:0}
.gbs-cat-link-text{min-width:0;overflow-wrap:anywhere}
.gbs-cat-link .gbs-shop-category-count{flex:0 0 auto}
/* dropdown: the menu itself already scrolls; keep each group's list compact */
.gbs-all-categories-menu .gbs-cat-nav{gap:6px}
.gbs-all-categories-menu .gbs-cat-link{display:flex;align-items:center;justify-content:space-between;padding:8px 10px;font-size:1.2rem}
.gbs-all-categories-menu .gbs-cat-list{max-height:min(40vh,320px)}
/* mobile sheet: the sheet scrolls; avoid a second nested scroller on touch */
.gbs-cat-nav--sheet{padding:10px 12px;gap:8px}
.gbs-cat-nav--sheet .gbs-cat-list{max-height:none;overflow:visible;padding:2px 0}
.gbs-cat-nav--sheet .gbs-cat-link{min-height:46px;border-bottom:1px solid var(--surface-muted)}
@media (max-width:940px){
   .gbs-shop-mobile-category-list .gbs-cat-nav--sheet .gbs-shop-category-link{padding:0 12px}
}
@media (prefers-reduced-motion:reduce){.gbs-cat-chevron{transition:none}}

/* ---------------------------------------------------------------------------
   Desktop category sidebar polish (shop / New Arrivals / category pages). Desktop only (>=941px): below that the
   sidebar is hidden and the mobile sheet is untouched. Presentation only - same markup, grouping, links and counts.
   --------------------------------------------------------------------------- */
@media (min-width:941px){
   :root body .gbs-shop-layout{grid-template-columns:252px minmax(0,1fr);gap:24px}
   :root body .gbs-shop-sidebar{
      gap:6px;
      padding:20px 16px 18px;
      border:1px solid var(--border-color);
      border-radius:16px;
      background:var(--surface);
      box-shadow:0 1px 2px rgba(13,32,64,.05),0 10px 28px rgba(13,32,64,.07);
   }
   /* title block */
   :root body .gbs-shop-sidebar .gbs-shop-sidebar-head{
      gap:10px;
      margin:0 4px 12px;
      padding:0 0 14px;
      border-bottom:1px solid var(--border-color);
   }
   :root body .gbs-shop-sidebar .gbs-shop-sidebar-head i{
      display:grid;
      place-items:center;
      flex:0 0 auto;
      width:34px;
      height:34px;
      border-radius:10px;
      background:var(--brand-primary-soft);
      color:var(--brand-primary);
      font-size:1.35rem;
   }
   :root body .gbs-shop-sidebar .gbs-shop-sidebar-head h2{
      font-size:1.7rem;
      font-weight:700;
      line-height:1.25;
      letter-spacing:-.01em;
      color:var(--brand-primary-dark,var(--brand-primary));
      overflow-wrap:anywhere;
   }
   /* "All Books" / "All products" / subcategory rows above the groups */
   :root body .gbs-shop-sidebar > .gbs-shop-category-link{
      min-height:40px;
      padding:9px 12px;
      border-radius:10px;
      font-size:1.35rem;
      font-weight:600;
      color:var(--text-primary);
   }
   :root body .gbs-shop-sidebar > .gbs-shop-category-link:hover{background:var(--brand-primary-pale);color:var(--brand-primary)}
   :root body .gbs-shop-sidebar > .gbs-shop-category-link.is-current{background:var(--brand-primary-soft);color:var(--brand-primary);font-weight:700}
   :root body .gbs-shop-sidebar .gbs-shop-sidebar-divider{margin:10px 4px;border-top:1px solid var(--border-color)}
   /* count pills */
   :root body .gbs-shop-sidebar .gbs-shop-category-count{
      flex:0 0 auto;
      min-width:26px;
      padding:2px 8px;
      border-radius:999px;
      background:var(--brand-primary-pale);
      color:var(--text-secondary);
      font-size:1.1rem;
      font-weight:700;
      line-height:1.5;
      text-align:center;
      font-variant-numeric:tabular-nums;
   }
   :root body .gbs-shop-sidebar .gbs-shop-category-link:hover .gbs-shop-category-count{background:#fff;color:var(--brand-primary)}
   :root body .gbs-shop-sidebar .gbs-shop-category-link.is-current .gbs-shop-category-count{background:var(--brand-primary);color:#fff}

   /* grouped navigation */
   :root body .gbs-shop-sidebar .gbs-cat-nav{gap:10px;margin-top:2px}
   :root body .gbs-shop-sidebar .gbs-cat-nav::before{
      content:"Browse by category";
      margin:2px 6px -2px;
      font-size:1.05rem;
      font-weight:700;
      letter-spacing:.09em;
      text-transform:uppercase;
      color:var(--text-secondary);
   }
   :root body .gbs-shop-sidebar .gbs-cat-group{
      border:1px solid var(--border-color);
      border-radius:12px;
      background:#fff;
      overflow:hidden;
      transition:border-color .18s ease,box-shadow .18s ease;
   }
   :root body .gbs-shop-sidebar .gbs-cat-group:hover{border-color:#cdd5e6}
   :root body .gbs-shop-sidebar .gbs-cat-group[open]{border-color:#c5cfe6;box-shadow:0 2px 10px rgba(13,32,64,.06)}
   :root body .gbs-shop-sidebar .gbs-cat-group-toggle{
      gap:10px;
      min-height:48px;
      padding:10px 12px;
      border-radius:0;
      font-size:1.45rem;
      font-weight:700;
      color:var(--brand-primary-dark,var(--brand-primary));
      background:#fff;
   }
   :root body .gbs-shop-sidebar .gbs-cat-group-toggle:hover{background:var(--brand-primary-pale)}
   :root body .gbs-shop-sidebar .gbs-cat-group[open]>.gbs-cat-group-toggle{background:var(--brand-primary-pale);border-bottom:1px solid var(--border-color);border-radius:0}
   :root body .gbs-shop-sidebar .gbs-cat-group-title{gap:10px}
   :root body .gbs-shop-sidebar .gbs-cat-group-title i{
      display:grid;
      place-items:center;
      flex:0 0 auto;
      width:30px;
      height:30px;
      border-radius:9px;
      background:var(--brand-primary);
      color:#fff;
      font-size:1.25rem;
   }
   :root body .gbs-shop-sidebar .gbs-cat-group-count{
      padding:2px 9px;
      border-radius:999px;
      background:var(--brand-primary-soft);
      color:var(--brand-primary);
      font-size:1.1rem;
      font-weight:700;
      font-variant-numeric:tabular-nums;
   }
   :root body .gbs-shop-sidebar .gbs-cat-chevron{
      display:grid;
      place-items:center;
      width:24px;
      height:24px;
      border-radius:50%;
      background:var(--brand-primary-soft);
      color:var(--brand-primary);
      font-size:.95rem;
   }
   :root body .gbs-shop-sidebar .gbs-cat-group-toggle:hover .gbs-cat-chevron{background:var(--brand-primary);color:#fff}
   /* the scrolling list */
   :root body .gbs-shop-sidebar .gbs-cat-list{
      gap:2px;
      padding:8px 6px 8px 8px;
      max-height:min(52vh,420px);
      scrollbar-width:thin;
      scrollbar-color:#b9c4dd transparent;
      /* soft scroll-shadows at the top/bottom edges (pure CSS, no JS) */
      background:
         linear-gradient(#fff 30%,rgba(255,255,255,0)) top/100% 22px no-repeat local,
         linear-gradient(rgba(255,255,255,0),#fff 70%) bottom/100% 22px no-repeat local,
         linear-gradient(rgba(13,32,64,.10),rgba(13,32,64,0)) top/100% 8px no-repeat scroll,
         linear-gradient(rgba(13,32,64,0),rgba(13,32,64,.10)) bottom/100% 8px no-repeat scroll;
      background-color:#fff;
   }
   :root body .gbs-shop-sidebar .gbs-cat-list::-webkit-scrollbar{width:8px}
   :root body .gbs-shop-sidebar .gbs-cat-list::-webkit-scrollbar-track{background:transparent}
   :root body .gbs-shop-sidebar .gbs-cat-list::-webkit-scrollbar-thumb{background:#c3cde3;border-radius:8px;border:2px solid #fff}
   :root body .gbs-shop-sidebar .gbs-cat-list::-webkit-scrollbar-thumb:hover{background:#9fb0d4}
   /* rows */
   :root body .gbs-shop-sidebar .gbs-cat-link{
      position:relative;
      gap:10px;
      min-height:38px;
      padding:8px 10px 8px 14px;
      border-radius:8px;
      font-size:1.3rem;
      font-weight:500;
      line-height:1.35;
      color:var(--text-soft,var(--text-secondary));
      transition:background-color .14s ease,color .14s ease;
   }
   :root body .gbs-shop-sidebar .gbs-cat-link::before{
      content:"";
      position:absolute;
      left:4px;
      top:50%;
      width:3px;
      height:0;
      border-radius:3px;
      background:var(--brand-primary);
      transform:translateY(-50%);
      transition:height .14s ease;
   }
   :root body .gbs-shop-sidebar .gbs-cat-link:hover{background:var(--brand-primary-pale);color:var(--brand-primary)}
   :root body .gbs-shop-sidebar .gbs-cat-link:hover::before{height:16px}
   :root body .gbs-shop-sidebar .gbs-cat-link.is-current{background:var(--brand-primary-soft);color:var(--brand-primary);font-weight:700}
   :root body .gbs-shop-sidebar .gbs-cat-link.is-current::before{height:22px}
   :root body .gbs-shop-sidebar .gbs-cat-link:focus-visible,
   :root body .gbs-shop-sidebar .gbs-cat-group-toggle:focus-visible{outline:2px solid var(--brand-primary);outline-offset:-2px}
}
@media (min-width:941px) and (prefers-reduced-motion:reduce){
   :root body .gbs-shop-sidebar .gbs-cat-group,
   :root body .gbs-shop-sidebar .gbs-cat-link,
   :root body .gbs-shop-sidebar .gbs-cat-link::before{transition:none}
}

/* Desktop header: the square crest was rendered at 124px and dominated the bar. Scale it down proportionally
   (width drives height, aspect ratio untouched, image itself unchanged) and keep it centred with the name block,
   search and account controls. Mobile/tablet (<=860px) keeps its existing compact mark. */
@media (min-width:861px){
   :root body .gbs-header .gbs-brand .customer-brand-logo{
      width:84px;
      max-width:84px;
      height:auto;
      max-height:none;
      object-fit:contain;
      align-self:center;
   }
   :root body .gbs-header .gbs-brand{padding-bottom:0;align-self:center;gap:12px}
}
@media (min-width:1200px){
   :root body .gbs-header .gbs-brand .customer-brand-logo{width:92px;max-width:92px}
}

/* =====================================================================
   FINAL UI PASS 2026-10-15 - shared-shell fixes (one place, no per-page overrides)
   ===================================================================== */

/* FX04/FX13: homepage category strip is a real horizontal carousel (native scroll + swipe, buttons only when there is
   something to scroll to - see js/script.js). Tiles are fixed-width so long names wrap to two lines instead of squeezing. */
@media (min-width:681px){
   :root body .home-category .gbs-cat-carousel > .box-container{
      display:flex;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;gap:6px;padding:2px 2px 8px;
      scroll-snap-type:x proximity;scroll-behavior:smooth;scrollbar-width:none;overscroll-behavior-x:contain;
      grid-template-columns:none;
   }
   :root body .home-category .gbs-cat-carousel > .box-container::-webkit-scrollbar{display:none}
   :root body .home-category .gbs-cat-carousel .box{flex:0 0 112px;width:112px;scroll-snap-align:start}
}
:root body .home-category .gbs-cat-carousel .category-card-body h3{
   margin:0;padding:0 4px;font-size:1.15rem;line-height:1.25;font-weight:600;text-align:center;
   display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;min-height:2.5em;
}
:root body .home-category .gbs-cat-carousel .box{border-radius:12px}
:root body .home-category .gbs-cat-carousel .category-card-photo{overflow:hidden;background:#fff;border:1px solid var(--border-color)}
:root body .home-category .gbs-cat-carousel .category-card-photo img{width:100%!important;height:100%!important;object-fit:cover;border-radius:50%!important;margin:0!important;display:block}
/* keyboard focus is a deliberate ring; a mouse click must not leave a stuck outline/highlight */
:root body .home-category .gbs-cat-carousel .box:focus{outline:none}
:root body .home-category .gbs-cat-carousel .box:focus-visible{outline:2px solid var(--brand-primary);outline-offset:2px}
:root body .home-category .gbs-cat-carousel .gbs-carousel-arrow{display:grid;top:27px;margin-top:-20px}
:root body .home-category .gbs-cat-carousel .gbs-carousel-arrow[hidden]{display:none}
:root body .home-category .gbs-cat-carousel .gbs-carousel-prev{left:-20px}
:root body .home-category .gbs-cat-carousel .gbs-carousel-next{right:-20px}
@media (max-width:680px){
   :root body .home-category .gbs-cat-carousel .gbs-carousel-arrow{display:none}
}

/* FX07/FX16: product rails size their cards so WHOLE cards fill the row (no half-clipped last card); the arrows page
   by exactly one row. Card counts per row follow the container width. Prices never wrap onto a second line. */
@media (min-width:941px){
   :root body .gbs-featured-grid{--gbs-rail-cards:5;--gbs-rail-gap:16px;gap:var(--gbs-rail-gap);scroll-snap-type:x mandatory;overscroll-behavior-x:contain}
   :root body .gbs-featured-grid > .gbs-book-card{
      flex:0 0 calc((100% - (var(--gbs-rail-cards) - 1) * var(--gbs-rail-gap)) / var(--gbs-rail-cards));
      width:auto;min-width:0;scroll-snap-align:start;
   }
}
@media (min-width:1100px){ :root body .gbs-featured-grid{--gbs-rail-cards:6} }
@media (min-width:1280px){ :root body .gbs-featured-grid{--gbs-rail-cards:7} }
@media (min-width:1500px){ :root body .gbs-featured-grid{--gbs-rail-cards:8} }
.gbs-book-footer{grid-template-columns:minmax(0, 1fr) auto}
.gbs-book-price-value{white-space:nowrap}

/* FX09: sidebar category navigation - no nested scrollbar; long groups collapse to 8 with "Show all N"; filter box */
:root body .gbs-cat-nav--sidebar .gbs-cat-list{max-height:none;overflow:visible}
:root body .gbs-cat-nav--sidebar .gbs-cat-list.is-collapsed .gbs-cat-extra{display:none}
:root body .gbs-cat-nav--sidebar .gbs-cat-link[hidden],:root body .gbs-cat-nav--sidebar .gbs-cat-group[hidden]{display:none}
:root body .gbs-cat-filter input{width:100%;min-height:40px;padding:8px 12px;border:1px solid var(--border-color);border-radius:10px;font:inherit;font-size:1.3rem;background:#fff;color:var(--text-primary,inherit)}
:root body .gbs-cat-filter input:focus-visible{outline:2px solid var(--brand-primary);outline-offset:1px}
:root body .gbs-cat-filter-empty{margin:0;padding:6px 8px;font-size:1.25rem;color:var(--text-secondary)}
:root body .gbs-cat-more{margin:4px 6px 2px;padding:8px 10px;border:0;border-radius:8px;background:var(--brand-primary-pale);color:var(--brand-primary);font:inherit;font-size:1.25rem;font-weight:700;cursor:pointer;text-align:left}
:root body .gbs-cat-more:hover{background:var(--brand-primary-soft)}
:root body .gbs-cat-more:focus-visible{outline:2px solid var(--brand-primary);outline-offset:1px}
:root body .gbs-cat-more[hidden]{display:none}

/* V6 gate 1: mixed-stock cards. A fixed stock line sits on every card (blank when untracked) and the badge inside the cart
   controls is hidden on cards, so In stock / Out of stock / untracked cards in one row keep identical title, price and button
   positions. Stock rules and disabled Add to cart are untouched. */
:root body .gbs-book-card .product-card-actions .product-stock-badge{display:none}
:root body .gbs-book-card .gbs-book-stock{display:block;min-height:1.8rem;margin:2px 0 8px;font-size:1.2rem;font-weight:600;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
:root body .gbs-book-card .gbs-book-stock[data-state="in"]{color:#2e7d32}
:root body .gbs-book-card .gbs-book-stock[data-state="out"]{color:#b3261e}
:root body .gbs-book-card .product-cart-add[disabled]{opacity:.5;cursor:not-allowed}
:root body .gbs-book-card .gbs-book-title{min-height:calc(1.3em * 2)}   /* reserve two title lines so one-line and two-line titles keep the same stock/price/button baseline */
:root body .gbs-book-card .gbs-book-title{height:calc(1.3em * 2 + 3px);max-height:calc(1.3em * 2 + 3px)}   /* fixed box: a title whose glyphs fall back to another font (Sinhala, symbols) cannot grow its line boxes and push the price/button down */

/* V6 gate 1: a price that does not fit beside the cart button is stepped down by js/script.js (data-price-fit) - never clipped, never changed when it fits. */
:root body .gbs-book-card .gbs-book-price-value{white-space:nowrap}

/* footer contact rows: the link sits on the same line as its icon (footer links are display:block elsewhere) */
:root body .customer-footer .footer-links p a{display:inline;padding:0;margin:0;color:inherit;text-decoration:none}
:root body .customer-footer .footer-links p a:hover{text-decoration:underline}
:root body .customer-footer .footer-links p a:focus-visible{outline:2px solid #fff;outline-offset:2px;border-radius:2px}

/* =====================================================================
   DESKTOP HEADER - ONE ALIGNED ROW (>= 941px). Definitive block; replaces the earlier FX03 patch.
   Root cause of the stagger: logo, search and the action cluster each carried their OWN bottom padding/margin
   (brand 8px, search 6px, actions 2px) and sat in a grid whose row height was set by the tallest of them, so their
   centres differed by 3-27px; the action cluster also included the phone/WhatsApp row and the cart's "Rs." line, so its
   icons were pinned to the cluster TOP (27px above the search centre) and the cart control was a different height.
   Fix: three grid items share one row and are centred on it (align-items:center, no item paddings). Every action
   control is the same fixed 40px box (24px icon row + 14px label row); the cart total and the phone/WhatsApp row are
   taken out of flow (absolute) so they can never move an icon or a label. No transforms, no per-width offsets.
   ===================================================================== */
/* single-row grid: only where the layout really is one row (the existing tablet layout takes over at <= 1080px) */
@media (min-width:1081px){
   :root body .site-header .flex.customer-header-main.gbs-header-row{
      padding:3px 0 0; row-gap:3px; column-gap:28px; align-items:center;
      grid-template-columns:auto minmax(280px, 1fr) auto;
   }
   :root body .gbs-header .gbs-brand{margin:0; padding:0; align-self:center}
   :root body .gbs-search-form{margin:0 auto; height:42px; align-self:center}
   :root body .gbs-search-form #search-box{height:100%; min-height:0}
   :root body .gbs-search-submit{height:100%; min-height:0}
}
/* =====================================================================
   HEADER ACTION CONTROLS (>= 941px): ONE component for Sign In / My Account, Wishlist, Cart and Logout.
   Root cause of the visible misalignment: each control was a grid with justify-items:center but an AUTO-sized single column, so the
   column shrank to its content and sat at the LEFT of the 80px control box - the icon+label were never centred in their own
   clickable/hover area (Wishlist's 41px label sat 20px off-centre) - and the Cart amount was position:absolute, so it hung outside
   the control and outside its hover background. Several older layers (components.css flex/3.2rem icon box, the .gbs-icons
   base rules, the 941px block, the polish block) each set part of this and fought each other.
   Now: every control is the same 72 x 50 box (2px air top and bottom) with three fixed slots - icon 16px / label 14px / amount 12px - in a full-width
   column, so icon, label and amount all centre in the box. Controls without an amount keep the empty slot, so all clickable and
   hover areas are identical. The cluster is centred on the ICON+LABEL pair (32px + the 2px air) against the search bar; the reserved amount
   row simply continues below that line inside the header row. Badge is anchored to the icon slot, so it never moves the icon.
   ===================================================================== */
@media (min-width:941px){
   :root body .gbs-header-actions{position:relative; display:block; margin:0; padding:0; align-self:center}
   :root body .gbs-icons.icons{display:flex; align-items:flex-start; justify-content:flex-end; flex-wrap:nowrap; gap:8px; height:36px; margin:0; padding:0 var(--gbs-icons-end, 0px) 0 0}
   :root body .gbs-icons .header-action,
   :root body .gbs-icons .header-cart-action,
   :root body .gbs-icons .header-logout-form,
   :root body .gbs-icons .logout-btn{width:var(--gbs-action-w, 72px); min-width:var(--gbs-action-w, 72px); height:50px; min-height:0; margin:0; padding:2px 0; box-sizing:border-box}
   :root body .gbs-icons .header-logout-form{display:block; padding:0}   /* the form is only a wrapper; the button inside carries the control's own 2px air */
   :root body .gbs-icons .header-action,
   :root body .gbs-icons .header-cart-action,
   :root body .gbs-icons .logout-btn{position:relative; display:grid; grid-template-columns:minmax(0, 1fr); grid-template-rows:16px 14px 12px; row-gap:2px; justify-items:center; align-items:center; align-content:start; border-radius:8px}
   :root body .gbs-icons .header-action > i,
   :root body .gbs-icons .logout-btn > i,
   :root body .gbs-icons .header-cart-icon{display:grid; place-items:center; width:22px; height:16px; margin:0; padding:0; font-size:1.5rem; line-height:1}
   :root body .gbs-icons .header-cart-icon{position:relative; flex:none}
   :root body .gbs-icons .header-cart-icon > i{font-size:1.5rem; line-height:1}
   :root body .gbs-icons .header-action > span:not(.header-cart-icon):not(.header-cart-badge),
   :root body .gbs-icons .header-cart-label,
   :root body .gbs-icons .logout-btn > span{display:block; height:14px; margin:0; padding:0; line-height:14px; font-size:1.1rem; font-weight:600; white-space:nowrap; text-align:center}
   :root body .gbs-icons .header-cart-copy{display:contents}
   /* third slot: the Cart amount lives INSIDE the control (same box, same hover background) */
   :root body .gbs-icons .header-cart-total{position:static; grid-row:3; display:block; width:max-content; max-width:none; height:12px; margin:0; padding:0; line-height:12px; font-size:1rem; font-weight:600; text-align:center; white-space:nowrap; color:var(--text-secondary)}
   :root body .gbs-icons .header-cart-badge{position:absolute; top:-8px; right:-9px; display:grid; place-items:center; box-sizing:border-box; min-width:18px; height:18px; margin:0; padding:0 4px; color:#fff; font-size:1rem; line-height:1}
   :root body .gbs-icons .header-cart-badge[hidden]{display:none}
   /* guest: three short labels - tighter boxes (still identical boxes) so the group does not leave a wide empty strip at the right edge;
      --gbs-last-label-w is the width of the LAST control's label (Cart), used to line its text up with the Contact link */
   :root body .gbs-icons:not(:has(.header-logout-form)){--gbs-action-w:64px; --gbs-last-label-w:2.13rem}
}

/* Notifications: every cart toast has a manual close; warning toasts get a calm amber variant; on phones the toast sits ABOVE the
   fixed bottom tab bar (it used to cover it) and never blocks taps outside its own close button. */
:root body .cart-toast.is-closable{display:flex;align-items:flex-start;gap:1rem}
:root body .cart-toast.is-closable > span{flex:1 1 auto}
:root body .cart-toast.is-closable .cart-toast-close{pointer-events:auto}
:root body .cart-toast.is-warning{border-color:rgba(138,92,0,.22);background:#fff8e6;color:#7a5200}
@media (max-width:940px){
   :root body .cart-toast-region{left:1.2rem;right:1.2rem;width:auto;bottom:calc(var(--m-tabbar, 64px) + env(safe-area-inset-bottom, 0px) + 1rem)}
}

/* =====================================================================
   PRODUCT DETAILS PAGE - the whole cover, always.
   Root cause of the cropped covers: .gbs-product-media was a fixed 1:1 frame (aspect-ratio:1/1; overflow:hidden) and its image
   used width/height:100% + object-fit:cover, so every portrait or landscape cover lost its edges ("catalogue photos are square"
   was the assumption). The page already loads the FULL source image (not a thumbnail) and the thumbnail generator is
   contain-based (sun_image_resize_contain: never crops, never upscales), so only this CSS cropped.
   Now: the frame follows the image, the image keeps its own aspect ratio (object-fit:contain), is centred, never stretched
   and never enlarged beyond its own pixels; tall covers get up to 70vh/520px of height.
   ===================================================================== */
@media (min-width:1041px){ :root body .gbs-product-layout{grid-template-columns:minmax(0, 340px) minmax(0, 1fr) minmax(220px, 260px)} }
@media (min-width:761px) and (max-width:1040px){ :root body .gbs-product-layout{grid-template-columns:minmax(0, 320px) minmax(0, 1fr)} :root body .gbs-product-facts{grid-column:1 / -1} }
:root body .gbs-product-media{
   width:100%; height:auto; /* beats the older fixed 270x270 desktop-density box */
   display:flex; align-items:center; justify-content:center; aspect-ratio:auto; min-height:240px; padding:16px;
   overflow:hidden; background:var(--surface-muted);
}
:root body .gbs-product-media img{
   display:block; width:auto; height:auto; max-width:100%; max-height:min(520px, 70vh); object-fit:contain;
}
/* info column: one vertical rhythm - chip, title, price, stock, controls */
:root body .gbs-product-info{gap:0}
:root body .gbs-product-info h1{margin:12px 0 0; font-size:clamp(1.5rem, 1.1rem + 1vw, 2rem); line-height:1.25; overflow-wrap:anywhere}
:root body .gbs-product-price-row{margin-top:14px}
:root body .gbs-product-stock{display:inline-flex; align-items:center; gap:6px; margin:10px 0 0; font-size:1.3rem; font-weight:600; line-height:1.3}
:root body .gbs-product-stock.is-in{color:#2e7d32}
:root body .gbs-product-stock.is-out{color:#b3261e}
:root body .gbs-product-actions{margin-top:18px; gap:12px}
/* the stock badge inside the controls row is replaced by the line above (it floated left of the stepper) */
:root body .gbs-product-actions .product-stock-badge{display:none}
:root body .gbs-product-actions .product-card-actions.product-cart-actions{flex-wrap:wrap}
/* Product Information: calm and compact; a missing description is understated */
:root body .gbs-product-information{padding:20px 24px}
:root body .gbs-product-information h2{margin:0 0 8px; font-size:var(--gbs-fs-h3, 1.25rem)}
:root body .gbs-product-information-empty{font-size:1.3rem; font-style:italic; opacity:.8}
@media (max-width:760px){
   :root body .gbs-product-media{max-width:min(100%, 420px); min-height:200px; padding:12px; margin:0 auto}
   :root body .gbs-product-media img{max-height:min(460px, 62vh)}
   :root body .gbs-product-info h1{font-size:clamp(1.4rem, 1.1rem + 2vw, 1.7rem)}
}

/* Footer bottom: copyright and the SUPERITC credit share ONE compact, centred section under a single hairline (they used to be a
   copyright line plus a separate boxed block). Shop contact stays in the columns above; the developer credit never carries a phone. */
:root body .customer-footer .footer-bottom{margin:24px 0 0;padding:16px 0 20px;border-top:1px solid rgba(255,255,255,.14);text-align:center}
:root body .customer-footer .footer-bottom .credit{margin:0;padding:0 0 8px;border:0;text-align:center}
:root body .customer-footer .footer-bottom .developer-credit{margin:0;padding:0;border:0;background:transparent;box-shadow:none}
:root body .customer-footer .footer-bottom .developer-credit-inner{margin:0;padding:0;border:0;background:transparent;width:100%;display:block}
:root body .customer-footer .footer-bottom .developer-credit-copy{width:100%;text-align:center}
:root body .customer-footer .footer-bottom .developer-credit-title{margin:0;font-size:12px;line-height:1.5}
:root body .customer-footer .footer-bottom .developer-credit-services{margin:2px 0 0;font-size:11px;line-height:1.5;opacity:.85}

/* =====================================================================
   HEADER POLISH (desktop >= 1081px) - spacing/alignment only, same brand, colours, type and markup.
   Was: 92px crest, 3px row padding, nav row with no bottom space, 72px action boxes at a 12px gap.
   Now: 68px crest (same aspect ratio), more air above/below the top row, even 40px column gaps, roomier action
   controls, nav row with equal space above and below its 40px controls. Total height stays ~150px.
   The tablet layout (<= 1080px) and phone header are untouched.
   ===================================================================== */
@media (min-width:1081px){
   :root body .site-header .flex.customer-header-main.gbs-header-row{padding:14px 0 0; row-gap:12px; column-gap:40px}
   :root body .gbs-header .gbs-brand{gap:12px}
   :root body .gbs-header .gbs-brand .customer-brand-logo{width:68px; max-width:68px}
   :root body .gbs-navbar.navbar{min-height:0; padding:8px 0; align-items:center}
   :root body .gbs-all-categories-toggle{min-height:40px}
   :root body .gbs-nav-primary,
   :root body .gbs-nav-secondary{align-items:center; min-height:40px}
   :root body .gbs-navbar .gbs-nav-primary a,
   :root body .gbs-nav-secondary-link{display:inline-flex; align-items:center; min-height:40px; line-height:1.2}
}
@media (min-width:1081px){
   :root body .gbs-nav-secondary-link:last-child{padding-right:var(--gbs-right-inset)}   /* Contact's TEXT ends on the shared right line; its hover background still reaches the container edge */
}

/* =====================================================================
   HEADER CONTACT ROW - phone + WhatsApp are their OWN grid row ("support") above the main header row.
   Root cause of the clutter: the contact links were children of the action cluster and hung above it with
   position:absolute (bottom:calc(100% + 6px)), so they competed with My Account / Wishlist / Cart / Logout for the same
   corner and were simply hidden (display:none) on tablet and phones. Now the markup puts the row in the header grid, the grid
   gives it a track of its own, and nothing is positioned by offsets: it cannot move or touch the main row.
   ===================================================================== */
@media (min-width:1081px){
   :root body .site-header .flex.customer-header-main.gbs-header-row{
      padding-top:4px; row-gap:0;
      grid-template-areas:"support support support" "brand search actions" "nav nav nav";
   }
   :root body .gbs-navbar.navbar{margin-top:12px; padding:6px 0}
   /* ONE right-hand reference line for the three right-aligned things: the contact links, the action group (its LAST label) and the
      Contact nav link. The action group's own end padding is that inset minus the space between the last control box and its centred
      label, so Logout (or Cart for a guest) ends exactly where Contact and WhatsApp end. */
   :root body .gbs-header-row{--gbs-right-inset:20px}
   :root body .gbs-icons{--gbs-last-label-w:3.84rem; --gbs-icons-end:calc(var(--gbs-right-inset) - (var(--gbs-action-w, 72px) - var(--gbs-last-label-w)) / 2)}
   :root body .gbs-support-row{padding-right:var(--gbs-right-inset)}
}
@media (min-width:739px){
   :root body .gbs-support-row{padding-bottom:4px}
}
@media (min-width:739px) and (max-width:1080px){
   :root body .site-header .flex.customer-header-main.gbs-header-row{
      padding-top:6px; row-gap:0;
      grid-template-areas:"support support support support" "brand brand actions menu" "search search search ." "nav nav nav .";
   }
}
@media (max-width:738px){
   :root body .site-header .flex.customer-header-main.gbs-header-row{
      grid-template-areas:"support support support" "brand actions menu" "search search search" "nav nav nav";
   }
   :root body .gbs-support-link{font-size:1.1rem; gap:5px}
   :root body .gbs-support-link + .gbs-support-link{margin-left:10px; padding-left:10px}
}
@media (max-width:480px){
   :root body .gbs-support-long{display:none}   /* "WhatsApp" alone (the link keeps its full accessible name) so both links always fit */
}

/* ==========================================================================
   Storefront improvements: book-cover placeholder, readable titles + prices, sort control,
   request-this-book actions, search suggestion rows. Later than every earlier card rule on purpose.
   ========================================================================== */

/* Cover frame: portrait book proportions at every width; the picture is contained (never cropped), the placeholder fills the frame. */
:root body .gbs-book-cover{aspect-ratio:4 / 5;background:var(--surface-muted)}
:root body .gbs-book-cover img.gbs-cover-img,
:root body .gbs-product-media img.gbs-cover-img{object-fit:contain;background:#fff}
:root body .gbs-book-cover img.gbs-cover-img{width:100%;height:100%}

.gbs-cover-ph{
   position:relative;width:100%;aspect-ratio:4 / 5;box-sizing:border-box;
   display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;
   padding:12% 9%;text-align:center;overflow:hidden;
   background:linear-gradient(165deg,#f7f4ec 0%,#ece6d6 100%);
   border-left:5px solid #d8cfb8;color:#4a4130;
}
.gbs-book-cover .gbs-cover-ph{position:absolute;inset:0;aspect-ratio:auto}
.gbs-cover-ph i{font-size:clamp(20px,16%,34px);color:var(--brand-primary);opacity:.85}
.gbs-cover-ph-note{font-size:10.5px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:#7a6a4a}
.gbs-cover-ph-title{
   display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:5;line-clamp:5;overflow:hidden;
   max-width:100%;font-family:Georgia,'Times New Roman',serif;font-size:13.5px;line-height:1.3;font-weight:600;
   overflow-wrap:anywhere;word-break:break-word;
}
:root body .gbs-product-media .gbs-cover-ph{max-width:340px;margin:0 auto;min-height:0}
:root body .gbs-product-media .gbs-cover-ph-title{font-size:18px;-webkit-line-clamp:8;line-clamp:8}
:root body .gbs-product-media .gbs-cover-ph-note{font-size:12px}

/* Titles: up to three lines (full title is on the product page and in the tooltip); prices larger and easier to read. */
:root body .gbs-book-card .gbs-book-title{
   -webkit-line-clamp:3;line-clamp:3;font-size:14px;line-height:1.3;font-weight:600;
   min-height:calc(1.3em * 3);height:calc(1.3em * 3 + 3px);max-height:calc(1.3em * 3 + 3px);overflow-wrap:anywhere;
}
:root body .gbs-book-card .gbs-book-price-value{font-size:17px;font-weight:700;letter-spacing:0;color:var(--brand-primary)}
:root body .gbs-product-current-price{font-size:26px;font-weight:700}
@media (max-width:760px){
   :root body .gbs-book-card .gbs-book-title{font-size:13px}
   :root body .gbs-book-card .gbs-book-price-value{font-size:15px}
   :root body .gbs-product-current-price{font-size:24px}
}

/* Sort control (links, no JavaScript needed) */
.gbs-sort-control{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.gbs-sort-label{font-size:1.25rem;font-weight:700;color:var(--text-secondary);margin-right:2px}
.gbs-sort-option{display:inline-flex;align-items:center;min-height:36px;padding:0 12px;border:1px solid var(--border-color);border-radius:999px;background:#fff;font-size:1.3rem;font-weight:600;color:var(--text-primary);text-decoration:none}
.gbs-sort-option:hover{border-color:var(--brand-primary)}
.gbs-sort-option.is-current{background:var(--brand-primary);border-color:var(--brand-primary);color:#fff}
.gbs-sort-option:focus-visible{outline:2px solid var(--brand-primary);outline-offset:2px}

/* Out of stock: the disabled Add to cart stays; asking for the book is the way forward */
.gbs-unavailable-actions{display:flex;flex-direction:column;gap:6px;margin-top:8px}
.gbs-unavailable-actions .gbs-request-book,
.gbs-search-noresult .gbs-request-book{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:0 14px;border-radius:10px;background:var(--brand-primary);color:#fff;font-size:1.3rem;font-weight:700;text-align:center;text-decoration:none;line-height:1.2}
.gbs-ask-whatsapp{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:0 6px;font-size:1.25rem;font-weight:700;color:#1b7f43;text-decoration:none}
.gbs-ask-whatsapp:hover{text-decoration:underline}
.gbs-availability-inquiry{margin:10px 0 0;font-size:1.35rem;color:var(--text-secondary)}
.gbs-availability-inquiry .gbs-ask-whatsapp{display:inline-flex;margin-left:4px}
:root body .gbs-product-info .gbs-unavailable-actions{flex-direction:row;flex-wrap:wrap;align-items:center;margin-top:12px}

/* Search: suggestion rows + no-result panel */
.suggestion-item{min-height:44px;justify-content:space-between}
.suggestion-item .item-info{flex:1 1 auto;min-width:0;display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.suggestion-item .item-info p{margin:0;overflow-wrap:anywhere}
.suggestion-price{flex:0 0 auto;font-size:1.25rem;font-weight:700;color:var(--brand-primary);white-space:nowrap}
.suggestion-action{display:flex;align-items:center;justify-content:flex-start;gap:12px;min-height:44px;padding:10px 12px;border-bottom:1px solid #f1f5f9;font-size:1.4rem;font-weight:700;color:var(--brand-primary);text-decoration:none}
.suggestion-action:hover,.suggestion-action.active{background:var(--primary-soft-2)}
.suggestion-status,#suggestions .no-result,#search-page-suggestions .no-result{padding:12px;font-size:1.35rem;color:var(--text-secondary)}
.gbs-search-noresult{display:flex;flex-direction:column;align-items:center;gap:8px;max-width:520px;margin:24px auto;padding:28px 20px;border:1px solid var(--border-color);border-radius:14px;background:var(--surface-muted);text-align:center}
.gbs-search-noresult i{font-size:28px;color:var(--brand-primary)}
.gbs-search-noresult h2{margin:0;font-size:2rem}
.gbs-search-noresult p{margin:0 0 6px;font-size:1.45rem;color:var(--text-secondary)}

/* Pickup statement + contact links (touch-friendly) */
.contact-pickup-note{display:flex;align-items:flex-start;gap:8px;margin:10px 0 14px;padding:10px 12px;border-radius:10px;background:var(--surface-muted);font-size:1.4rem;color:var(--text-primary)}
.contact-pickup-note i{margin-top:3px;color:var(--brand-primary)}
:root body .customer-footer .footer-links p.footer-pickup{margin-top:10px}
@media (max-width:760px){
   :root body .customer-footer .footer-links p a[href^="tel:"],
   :root body .customer-footer .footer-links p a[href*="wa.me"],
   .contact-list a[href^="tel:"],.contact-list a[href*="wa.me"]{display:inline-block;padding:10px 0;min-height:44px;box-sizing:border-box}
}

@media (max-width:760px){
   :root body .gbs-shop-toolbar-actions{flex-wrap:wrap}
   :root body .gbs-shop-toolbar-actions > .gbs-sort-control{flex:1 1 100%;height:auto;min-height:44px;justify-content:flex-start}
   :root body .gbs-shop-toolbar-actions .gbs-shop-mobile-categories{flex:1 1 100%}
   .gbs-sort-option{min-height:44px;padding:0 14px}
}
@media (max-width:1024px),(hover:none){ .gbs-sort-option{min-height:44px} }

/* Search suggestions on phones: the mobile search form clipped its children (overflow:hidden for the rounded button), which also clipped the suggestion
   dropdown hanging below it - so suggestions were typed-for but never visible. The form no longer clips; the button takes the form's own corner radius. */
:root body .gbs-search-form{overflow:visible}
:root body .gbs-search-form .gbs-search-submit{border-top-right-radius:inherit;border-bottom-right-radius:inherit}
:root body .gbs-search-form #suggestions{z-index:1100}

/* Rails: a sold-out card is taller (request actions); every card in the same rail stays the same height so price / button baselines line up. */
:root body .gbs-featured-grid{align-items:stretch}
:root body .gbs-featured-grid > .gbs-book-card{align-self:stretch;height:auto}

/* Phones: the price can be stepped down to fit beside the cart button (js/script.js); keeping its line box constant and bottom-aligned keeps every price on the same baseline. */
@media (max-width:760px){
   :root body .gbs-book-card .gbs-book-footer{align-items:end}
   :root body .gbs-book-card .gbs-book-price{padding-bottom:5px}
   :root body .gbs-book-card .gbs-book-price-value{line-height:1.15}
}

/* =====================================================================
   POLISH PASS 2026-10-20 - customer audit fixes (single block so it can be reviewed / rolled back as one unit)
   ===================================================================== */

/* #5 Breadcrumbs: wrap, never overflow; phones show only "parent > current" (the current title may take its own full-width line). */
:root body .gbs-shop-breadcrumb{flex-wrap:wrap;gap:4px 8px;min-width:0;max-width:100%}
:root body .gbs-shop-breadcrumb > *{min-width:0}
:root body .gbs-shop-breadcrumb a{overflow-wrap:anywhere}
:root body .gbs-shop-breadcrumb [aria-current="page"]{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;flex:0 1 auto}
@media (max-width:600px){
   :root body .gbs-shop-breadcrumb > a:not(:last-of-type),
   :root body .gbs-shop-breadcrumb > i:not(:last-of-type){display:none}
   :root body .gbs-shop-breadcrumb > a:last-of-type + i{display:none}
   :root body .gbs-shop-breadcrumb [aria-current="page"]{flex:1 1 100%;font-size:13px;line-height:1.3}
   :root body .gbs-shop-breadcrumb > a:last-of-type:not(:first-of-type)::before{content:"\2039";margin-right:4px}
}

/* #6 no dead space above the footer on short pages */
@media (max-width:760px){ :root body .gbs-shop-shell{min-height:0} }

/* #11 Mobile bottom navigation: readable labels, flat (no permanently raised Home), active item follows the page, safe-area aware */
@media (max-width:760px){
   :root body .gbs-mobile-tabbar{--m-tabbar:58px;align-items:stretch;padding:4px 4px calc(4px + env(safe-area-inset-bottom, 0px))}
   :root body .gbs-mobile-tab{justify-content:center;gap:3px;font-size:11px;line-height:1.1;min-height:44px;padding:2px 0;color:var(--text-secondary)}
   :root body .gbs-mobile-tab i{font-size:18px}
   :root body .gbs-mobile-tab-highlight{margin-top:0}
   :root body .gbs-mobile-tab-badge{width:auto;height:auto;border-radius:0;background:transparent;color:inherit}
   :root body .gbs-mobile-tab-badge i{font-size:18px}
   :root body .gbs-mobile-tab.is-active{color:var(--brand-primary);box-shadow:inset 0 2px 0 var(--brand-primary)}
   :root body .customer-footer{padding-bottom:calc(58px + 26px + env(safe-area-inset-bottom, 0px))}
   :root body{scroll-padding-bottom:70px}
}

/* #10/#14 Category tiles: readable wrapping, fixed artwork size, last tile never hidden under the arrow */
@media (max-width:680px){
   :root body .home-category .box-container{scroll-padding-inline:12px;padding-inline-end:24px}
   :root body .home-category .category-card{flex:0 0 92px;width:92px;padding:6px 4px}
   :root body .home-category .category-card-body h3{font-size:12px;line-height:1.25;overflow-wrap:break-word;word-break:normal;hyphens:auto;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
   :root body .home-category .category-card-image,
   :root body .home-category .category-card-icon{width:48px!important;height:48px!important;margin:0 auto 4px!important;overflow:hidden}
   :root body .home-category .category-card-icon i{font-size:20px}
   :root body .home-category .category-card-photo img{width:100%!important;height:100%!important;object-fit:cover}
   :root body .home-category .gbs-cat-carousel .box{flex-basis:92px;width:92px}
}
@media (min-width:681px){
   :root body .home-category .gbs-cat-carousel > .box-container{padding-inline-end:52px;scroll-padding-inline-end:52px}
   :root body .home-category .gbs-cat-carousel .category-card-body h3{overflow-wrap:break-word;word-break:normal;hyphens:auto}
}

/* #17 Search button keeps its width while submitting: spinner replaces the label visually, text stays in place */
.gbs-search-form .gbs-search-submit{position:relative;white-space:nowrap}
.gbs-search-form .gbs-search-submit.is-loading{color:transparent!important}
.gbs-search-form .gbs-search-submit.is-loading::after{content:"";position:absolute;inset:0;margin:auto;width:16px;height:16px;border:2px solid rgba(255,255,255,.45);border-top-color:#fff;border-radius:50%;animation:gbs-spin .7s linear infinite}
@keyframes gbs-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.gbs-search-form .gbs-search-submit.is-loading::after{animation-duration:2s}}

/* #8/#16 Product page: image | buying section | Product Details side by side on desktop (the 8091 three-column grid; Product Details is the third column,
   top-aligned with the product information); consistent card padding. Tablets/phones stack (see the 761-1040 and <=760 rules above). */
:root body .gbs-product-layout{align-items:start}
:root body .gbs-product-media{align-self:start}
@media (min-width:1041px){ :root body .gbs-product-layout{gap:28px} }
:root body .gbs-product-layout > .gbs-product-facts{align-self:start;margin:0;padding:14px 16px;border:1px solid var(--border-color);border-radius:12px;background:var(--surface-muted,#f6f8fc)}
:root body .gbs-product-facts h2,
:root body .gbs-product-information h2{margin:0 0 10px;font-size:1.25rem;line-height:1.25}
:root body .gbs-product-pickup{display:flex;gap:8px;align-items:flex-start;margin:14px 0 0;padding:10px 12px;border-radius:10px;background:var(--brand-primary-soft,#eef3fb);color:var(--text-primary);font-size:.95rem;line-height:1.4}
:root body .gbs-product-pickup i{margin-top:3px;color:var(--brand-primary)}
:root body .gbs-product-information{padding:18px 20px;margin-top:16px}
@media (max-width:760px){
   :root body .gbs-product-layout > .gbs-product-facts{padding:12px 0 0;border:0;border-top:1px solid var(--border-color);border-radius:0;background:transparent}
   :root body .gbs-product-information{padding:14px 0 0}
}
/* the large placeholder on the product page: no second copy of the title; sized so it leaves no empty column */
:root body .gbs-product-media .gbs-cover-ph{min-height:0;aspect-ratio:4/5;max-height:520px}

/* #12 clutter: login logo, trust strip, footer alignment */
@media (max-width:760px){
   :root body.customer-login-page .auth-brand-image, .customer-login-page .auth-brand-image{max-height:84px;width:auto}
   .customer-login-page .auth-brand{width:auto;max-width:150px}
}
.gbs-hero-trust small{font-size:11px;line-height:1.3}
.gbs-hero-trust strong{font-size:12px}

/* #7 Search suggestions: small cover thumbnail, price, category context, out-of-stock note */
.suggestion-item{display:flex;align-items:center;gap:10px}
.suggestion-item .suggestion-thumb{flex:0 0 40px;width:40px;height:50px;object-fit:contain;border-radius:4px;background:var(--surface-muted,#f1f4f9);border:1px solid var(--border-color)}
.suggestion-item .suggestion-thumb--none{display:inline-flex;align-items:center;justify-content:center;color:var(--text-secondary);font-size:16px}
.suggestion-item .item-info{flex-wrap:wrap;align-items:center;row-gap:2px}
.suggestion-item .item-info p{flex:1 1 100%;line-height:1.3}
.suggestion-item .suggestion-price{font-weight:700;color:var(--brand-primary)}
.suggestion-item .suggestion-cat{font-size:.8rem;color:var(--text-secondary);overflow-wrap:anywhere}
.suggestion-item .suggestion-stock{font-size:.75rem;font-weight:600;color:#b42318}

/* Request-this-book button: icon and label side by side (the icon overlapped the first letter on narrow cards) */
:root body .gbs-request-book{display:inline-flex;align-items:center;justify-content:center;gap:8px;text-align:center;line-height:1.25}
:root body .gbs-request-book i{position:static;flex:0 0 auto;margin:0;transform:none}

@media (max-width:600px){
   :root body .gbs-shop-breadcrumb > a:only-of-type + i{display:inline}
   :root body .gbs-shop-breadcrumb > a:only-of-type ~ [aria-current="page"]{flex:0 1 auto}
}

/* Compact product cards (owner request): no request/WhatsApp buttons on listing cards, so nothing is reserved for them. Titles show in full (no clipping box):
   three lines are reserved for alignment, longer titles simply grow the card, and the price / cart footer stays pinned to the bottom of every card in a row. */
:root body .gbs-book-card .gbs-book-title{display:block;-webkit-line-clamp:unset;line-clamp:unset;height:auto;max-height:none;min-height:calc(1.3em * 3 + 4px);overflow:visible}   /* +4px: a title whose glyphs fall back to another font still fits the same box */
:root body .gbs-book-card .gbs-book-body{display:flex;flex-direction:column;flex:1 1 auto}
:root body .gbs-book-card .gbs-book-stock{margin-top:auto}   /* stock label + footer are pinned to the bottom of every card: a title that needs a 4th line only moves empty space, not the labels */
:root body .gbs-book-card .gbs-book-footer{margin-top:0}

/* GALLE: 90% visual scaling experiment (owner-requested, reversible: delete this block to restore the previous appearance) */
body {
    zoom: 0.9;
}

/* Compensate desktop layout width */
@media (min-width:739px) {
    :root {
        --container-width: calc((100vw - max(32px, 8vw)) / 0.9);
    }
    /* The fluid-layout rule above sets these on body.homepage-redesign / body.gbs-content-page, which out-ranks :root, and 100vw is not
       scaled by zoom: without this the content shrinks to 90% of its intended width (a narrow centred strip). Same formula, divided by the zoom. */
    body.homepage-redesign,
    body.gbs-content-page {
        --container-width: calc((100vw - max(32px, 8vw)) / 0.9);
        --container: calc((100vw - max(32px, 8vw)) / 0.9);
    }
}

/* Compensate mobile layout width */
@media (max-width:738px) {
    :root {
        --container-width: calc(100vw / 0.9);
    }
}

/* Zoom compensation for the homepage rails: at a real 90% browser zoom the media queries see a 1/0.9 wider viewport, so the 6/7/8-card steps
   (1100/1280/1500px) kick in 10% earlier. Same steps, scaled by 0.9, so a 100% window shows the same number of cards the 90% window did. */
@media (min-width:990px){ :root body .gbs-featured-grid{--gbs-rail-cards:6} }
@media (min-width:1152px){ :root body .gbs-featured-grid{--gbs-rail-cards:7} }
@media (min-width:1350px){ :root body .gbs-featured-grid{--gbs-rail-cards:8} }

/* Zoom compensation for the vw-based gap of the fluid desktop layout (vw is not scaled by zoom, so it came out 10% too small). */
@media (min-width:739px){
   body.homepage-redesign, body.gbs-content-page{--gbs-fluid-gap:clamp(12px, calc(1vw / 0.9), 20px)}
}

/* Touch targets under the 90% scaling: every size below is a PHYSICAL target N px written as calc(N px / .9) layout px, so the rendered hit area is N px
   again. Visible styling (icons, text, colours) is unchanged; only the interactive box (min-size / transparent border / ::after) grows. */
:root:root:root body .gbs-cart-row .gbs-cart-qty-input,
:root:root:root body .gbs-cart-row .gbs-cart-qty-control button{min-height:calc(40px / .9)}
:root:root:root body .gbs-cart-row .gbs-cart-qty-control button,
:root:root:root body a[href*="checkout"].btn,
:root:root:root body .gbs-cart-summary .btn{min-height:calc(40px / .9)}
:root:root:root body .contact-list a[href^="tel:"],
:root:root:root body .contact-list a[href*="wa.me"],
:root:root:root body .customer-footer .footer-links p a[href^="tel:"],
:root:root:root body .customer-footer .footer-links p a[href*="wa.me"]{min-height:calc(40px / .9)}
/* cards: the heart gets a larger invisible hit area; the 28px add-to-cart keeps its look but gains a transparent 3px border (hit area 31px, above the 28px it had before the scaling) (offset by a negative margin, so layout is unchanged) */
:root:root:root body .gbs-book-cover .product-wishlist-btn::after{content:"";position:absolute;inset:-6px}
@media (max-width:738px){
   :root:root:root body .gbs-book-footer .product-card-actions.product-cart-actions .product-cart-add{box-sizing:content-box;border:calc(3px / .9) solid transparent;background-clip:padding-box;margin:calc(-3px / .9)}
}

/* Breakpoint compensation (tablet): at a real 90% zoom the 820/821px mobile-desktop switch happens at 738/739px of window width (820 x 0.9). All ten
   820px / 821px media queries of this file use 738px / 739px accordingly, so a 768px tablet gets the same layout it got at 90% zoom. */

/* Touch-size boosts for the header, navigation, forms and PDP controls apply to touch layouts only (<= 1024px or a coarse pointer): the mouse-driven
   desktop layout keeps exactly the approved 90% appearance. */
@media (max-width:1024px), (pointer:coarse){
   :root:root:root body .gbs-mobile-tab{min-height:calc(44px / .9)}
   :root:root:root body #customer-main-navigation a{min-height:calc(44px / .9)}
   :root:root:root body .header-action,
   :root:root:root body #menu-btn{min-width:calc(36px / .9);min-height:calc(36px / .9)}
   :root:root:root body .pagination a{min-width:calc(36px / .9);min-height:calc(38px / .9);display:inline-flex;align-items:center;justify-content:center}
   :root:root:root body .product-cart-quantity-button{min-width:calc(36px / .9)}
   :root:root:root body input.box,
   :root:root:root body select.box,
   :root:root:root body textarea.box,
   :root:root:root body #blr-form button{min-height:calc(40px / .9)}
   :root:root:root body .gbs-shop-mobile-category-close{min-width:calc(44px / .9);min-height:calc(44px / .9)}
   :root:root:root body .gbs-shop-mobile-categories > summary,
   :root:root:root body summary.gbs-cat-group-toggle{min-height:calc(40px / .9)}
   :root:root:root body .gbs-hero .btn,
   :root:root:root body .gbs-hero .option-btn{min-height:calc(38px / .9)}
   :root:root:root body .product-cart-quantity-button,
   :root:root:root body .gbs-product-actions .product-cart-quantity-control .qty{min-height:calc(40px / .9)}
   :root:root:root body .gbs-brand,
   :root:root:root body input#search-box{min-height:calc(36px / .9)}
}

/* Mobile hamburger: inline SVG (the Font Awesome glyph on the <button> itself lost its font and showed a missing-glyph box). 44px rendered touch target (body zoom .9), navy. */
:root:root:root body #menu-btn.gbs-menu-btn{
   width:calc(44px / .9);height:calc(44px / .9);min-width:calc(44px / .9);min-height:calc(44px / .9);padding:0;
   place-items:center;
   color:var(--galle-navy,#0D2040);background:transparent;border:0;
   font-size:0;line-height:0;
}
:root:root:root body #menu-btn.gbs-menu-btn .gbs-menu-icon{width:24px;height:24px;display:block;pointer-events:none}
