@charset "UTF-8";
/* =========================================================================
   SHOP KIT  --  shop.css  --  v1.4
   (v1.4: basket page "You might also like" cards, .shop-cart-extras.)
   -------------------------------------------------------------------------
   The Hubb shop styles, in one file for every site that has the shop.
   Moved out of the Tabernacle library in v0.284 (style.css sections
   3.25-3.29, plus the shop rules from its section 4). Section numbers in
   the comments below are the old Tabernacle ones, kept for history.

   Pair: shop.js (same folder). Bump both ?v= numbers together, in every
   shop template head on every site that loads them.

   Load order
     Tabernacle sites:  style.css, then shop.css; script.js, then shop.js.
     Other templates: the site's own CSS, then shop.css, then that
   site's shop skin (it sets the design tokens below and may adjust
   anything here). script.js is not needed. Wrap the shop in a
   main element with the class shop-kit: section 3.30 then supplies
   the layout base that style.css gives Tabernacle pages.

   Design tokens this file uses (style.css supplies them on Tabernacle
   sites; a shop skin supplies them everywhere else):
     --accent  --accent-ink  --accent-soft  --bg  --container-gutter
     --container-width  --ease-out-soft  --font-body  --font-display
     --ink  --ink-soft  --radius  --radius-lg  --rule  --section-light
     --site-header-height  --space-1  --space-10  --space-12  --space-16
     --space-2  --space-3  --space-4  --space-5  --space-6  --space-8
     --surface  --text-base  --text-lg  --text-sm  --text-xl  --text-xs
     --transition

   Optional: --shop-rem (default 1rem) is what one rem means to this
   file. A site whose root font size is not 16px sets it in px (Genesis
   sets 62.5%, so its skin sets --shop-rem: 16px). --shop-heading-weight
   (default 400) is the section heading weight on shop-kit pages.

   v1.1  Fixed rem sizes go through --shop-rem. Section 3.30 (top of
         the file) adds the base for other templates, and empty landing
         sections hide themselves (end of the file).
   v1.2  Checkout, Delivery step: the New Customer registration form.
   v1.3  The basket slot is as tall as its pill from the start, so the
         shop no longer jumps down when shop.js builds the pill.
   ========================================================================= */

/* =========================================================================
   3.30 Shop kit base for other templates  (v1.1)
   -------------------------------------------------------------------------
   Tabernacle pages get their layout base from style.css. Other templates
   wrap the shop in a main element with the class shop-kit, and these
   rules supply the little of that base the shop uses: the .slice column,
   centred section heads and the section headings. They sit first, at the
   same strength as style.css, so every shop rule below still wins, just
   as it does on a Tabernacle page. Tabernacle shop templates never carry
   the shop-kit class, so nothing here reaches them.
   ========================================================================= */
.shop-kit {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--ink);
}
:where(.shop-kit) *,
:where(.shop-kit) *::before,
:where(.shop-kit) *::after { box-sizing: border-box; }
:where(.shop-kit) img { max-width: 100%; }
:where(.shop-kit) .slice {
  margin-block: var(--space-10);
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: var(--container-gutter);
  position: relative;
}
:where(.shop-kit) .slice__head--centred { text-align: center; margin-block: 0 var(--space-8); }
:where(.shop-kit) .slice__head--centred .slice__heading { display: inline-block; }
:where(.shop-kit) .slice__heading,
:where(.shop-kit) .shop-section__heading {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--shop-heading-weight, 400);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0 0 var(--space-8);
  text-align: center;
  color: var(--ink);
  text-wrap: balance;
}
:where(.shop-kit) .shop-section__heading::after {
  content: "";
  display: block;
  width: clamp(60px, 7vw, 88px);
  height: 2px;
  margin: var(--space-4) auto 0;
  background-color: var(--accent);
  opacity: 0.85;
  border-radius: 1px;
}


/* =========================================================================
   3.25  SHOP HOMEPAGE  --  sidebar layout  (.shop-layout family)
   -------------------------------------------------------------------------
   v0.163: rebuilt from the pill-row landing layout to the classic
   shop pattern (reference: baptist.org.uk/shop): full-width search/
   basket strip on top, then a two-column grid -- category sidebar
   left, content (featured tiles, product cards, info article) right.
   The sidebar persists naturally onto category pages later.

   CRITICAL TARGETING LESSON (v0.163): Town's shop modules render
   BARE, CLASSLESS div wrappers. The .ShopSearch / .ShopBasket /
   .ShopNavCatMenu classes seen on the Baptist reference install are
   per-install configuration, NOT built-in module output. Every rule
   below therefore scopes through wrapper classes WE author in the
   Body Contents (.shop-utility__search, .shop-cat-nav, etc.) and
   targets module internals structurally. Never rely on Hubb shop
   module classes existing.

   Body Contents pattern (see SHOP-BODY-CONTENTS-townchurch-v3.html):

     section.slice.slice--shop-utility
       div.shop-utility
         div.shop-utility__search   [shop search module]
         div.shop-utility__basket   [shopping trolley module]

     div.slice.shop-layout
       aside.shop-sidebar
         h2.shop-sidebar__title  "Shop Categories"
         nav.shop-cat-nav        [category navigation module]
       div.shop-content
         section + h2.shop-section__heading + [gallery module]
         section + h2.shop-section__heading + div.shop-hotpicks
                                             [hotpicks module]
         section.slice--shop-info            [article module]

   Hubb module output this is written against (Town install, real
   rendered markup 12 Jun 2026):
     Shop search  -> bare div with TWO tables; rows: "Find:" text
                     input (tr[mode="simple"], inline display set by
                     Hubb's inline script), "In:" category select
                     (tr, no mode attr), "Search sub-categories"
                     checkbox in a NESTED table (tr, no mode attr),
                     and a Go submit (input.sitebutton, inline
                     width:40px) in the second table.
     Trolley      -> bare div with text ("Your basket is empty") or
                     links when items are present.
     Category nav -> bare div with ul#ShopCatNavRoot; flat list on
                     Town today, but the Baptist install shows Hubb
                     CAN nest subcategory uls -- nested styling is
                     included below for when categories deepen.
   ========================================================================= */

/* ---- Utility strip: search | basket ------------------------------------
   v0.166: full-bleed tinted band (was a white strip between two
   hairlines, which left a lot of dead white space under the header
   -- Adam, with the reference site's solid-colour bar alongside).
   Light tint chosen over dark: the page is a light editorial canvas
   where dark is reserved for the footer; and because the band reads
   from --accent-soft, branded themes retint it automatically (the
   reference site's bar is exactly this band in their brand blue).
   The slice opts out of the container to paint edge-to-edge and
   zeroes its top margin to sit flush under the header; the inner
   .shop-utility row reattaches to container width. */
.slice--shop-utility {
  max-width:      none;
  padding-inline: 0;
  margin-block:   0;
  background:     var(--accent-soft);
}
.shop-utility {
  display:        flex;
  align-items:    center;
  gap:            var(--space-6);
  max-width:      var(--container-width);
  margin-inline:  auto;
  padding-inline: var(--container-gutter);
  padding-block:  var(--space-4);
}

.shop-utility__crumbs { flex-shrink: 0; }
.shop-utility__crumbs:empty { display: none; }
/* Breadcrumb trail: the Breadcrumbs module renders a bare div containing
   a.BreadcrumbLink elements with " > " text between. Quiet meta styling. */
.shop-utility__crumbs { font-size: var(--text-sm); color: var(--ink-soft); }
.shop-utility__crumbs a { color: var(--ink-soft); text-decoration: none; }
.shop-utility__crumbs a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
/* ---- Breadcrumb row BELOW the utility band (reference: Baptist shop,
   "Shop location: ..." under the search bar). The Breadcrumbs module moves
   out of the utility strip into its own .slice--shop-crumbs section in Body
   Contents; this styles it as a quiet container-width row sitting snug under
   the band. Links pick up the accent on hover. */
/* Tight breadcrumb spacing: the crumb row's own margins are small, and we
   collapse the big default margins on its neighbours specifically when a
   crumb row sits between them -- the utility band's space-12 bottom and the
   shop-layout's inherited .slice space-16 top -- so the crumb hugs both at a
   tidy ~16px. Sibling :has()/+ on our own authored sections (no Hubb wrapping
   between top-level slices). Homepage has no crumb row, so it's untouched. */
/* Fixed crumb zone so the shop layout starts at the SAME Y on every shop
   page (the homepage shows no breadcrumb, category pages do) -- the sidebar
   never jumps. The band sits flush; .shop-layout reserves the zone via its
   top margin (used on the no-crumb homepage); when a crumb row IS present it
   fills the zone (min-height + vertical centring) and the layout drops the
   reserved margin, so the net layout position is identical either way. */
:root { --shop-crumb-zone: calc(3 * var(--shop-rem, 1rem)); }
.slice--shop-crumbs {
  margin-block: 0;
  min-height:   var(--shop-crumb-zone);
  display:      flex;
  align-items:  center;
}
.slice--shop-crumbs + .shop-layout { margin-top: 0; }
/* .slice--shop-crumbs already provides the .slice container (max-width +
   gutter); .shop-crumbs must NOT re-apply it or the text indents a second
   gutter past the sidebar/cards. Type styling only. */
.shop-crumbs { font-size: var(--text-sm); color: var(--ink-soft); }
/* Clickable ancestors read darker + medium weight; the current page (a plain
   text node, no <a>) stays muted -- so clickable vs current is obvious. */
.shop-crumbs a { color: var(--ink); font-weight: 500; text-decoration: none; }
.shop-crumbs a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.shop-crumbs:empty, .slice--shop-crumbs:has(> .shop-crumbs:empty) { display: none; }

/* ---- Shop Terms & Conditions --------------------------------------------
   The Terms module renders a single link (opens the T&Cs modal via Hubb's
   OpenShopTermsAndConds()) inside a full-width table. Flatten the table and
   present it as a quiet, centred page-foot link with a hairline above, sat
   below the listing rather than in the sidebar (only one link -- a sidebar
   block would look thin). */
.slice--shop-terms { display: none; }   /* T&Cs moved into the Shop menu (/Shop/TermsAndConditions.aspx); hidden, NOT removed -> keeps the module's stored config */
/* No T&Cs band on checkout now, so tuck the footer up to the section. */
body:has(.slice--shop-checkout .shop-checkout > *) .site-footer { margin-top: var(--space-8); }
.shop-terms table,
.shop-terms tbody,
.shop-terms tr,
.shop-terms td { display: block; width: auto; }
.shop-terms {
  max-width:      var(--container-width);
  margin-inline:  auto;
  padding-inline: var(--container-gutter);
  padding-block:  var(--space-6);   /* symmetric -> centres the T&Cs link between the hairlines */
  border-top:     1px solid var(--rule);
  text-align:     center;
}
.shop-terms small { font-size: var(--text-sm); }
.shop-terms a {
  color:                 var(--ink-soft);
  text-decoration:       underline;
  text-underline-offset: 3px;
  transition:            color var(--transition);
}
.shop-terms a:hover { color: var(--accent); }

/* ---- Shop Terms & Conditions standalone page ----------------------------
   /Shop/TermsAndConditions.aspx -- a Hubb system page that already loads our
   CSS (headings render in Fraunces) but ships raw layout (a default blockquote,
   system layout tables, in-content Print/Close buttons). Now linked from the
   Shop menu (the inline Terms module above is hidden). All rules scoped to the
   page's body class `_shop_termsandconditions_aspx` so they cannot leak; the
   same class is on the T&Cs dialog iframe body, so this also tidies the pop-up.
   `height: auto !important` beats the layout table's inline height:100%. */
._shop_termsandconditions_aspx .pagebox,
._shop_termsandconditions_aspx .pagebox > tbody,
._shop_termsandconditions_aspx .pagebox > tbody > tr,
._shop_termsandconditions_aspx .pagebox td.body {
  display: block;
  width:   auto;
  height:  auto !important;
}
._shop_termsandconditions_aspx blockquote {
  max-width:      calc(62 * var(--shop-rem, 1rem));
  margin:         var(--space-12) auto var(--space-16);
  padding-inline: var(--container-gutter);
}
._shop_termsandconditions_aspx blockquote > h1 { margin: 0 0 var(--space-4); }
._shop_termsandconditions_aspx blockquote h3 {
  margin:         var(--space-8) 0 var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom:  1px solid var(--rule);
}
._shop_termsandconditions_aspx blockquote p { margin: 0; }   /* the &nbsp; spacer paragraphs */
._shop_termsandconditions_aspx blockquote table {
  margin:          var(--space-3) 0 0;
  border-collapse: collapse;
}
._shop_termsandconditions_aspx blockquote table td { padding: var(--space-1) var(--space-3); vertical-align: top; }
/* In-content Print/Close are redundant (browser print/back on the page; the
   dialog has its own titlebar close) -- hide them and the divider above. */
._shop_termsandconditions_aspx hr,
._shop_termsandconditions_aspx .SiteButton { display: none; }

/* =========================================================================
   3.26  SHOP ITEM (product detail page)   .shop-item family
   -------------------------------------------------------------------------
   Rendered modules (Town install; all scoped through OUR wrapper classes,
   never Hubb's per-install output classes):
     .shop-item__gallery  Item Thumbnail -> table with an 80px thumbnail <a>
                          whose zoom link carries the FULL image URL;
                          setupShopItemDetail() swaps the <img> to the full
                          image and these rules frame it as the product shot.
     .shop-item__title    Item Title    -> h1 > span
     .shop-item__price    Price         -> table: "<n> in stock" + a
                          .detailPrice span ("Price now: ..").
     .shop-item__actions  Buy Buttons   -> table: Qty input + submit .button
                          + wishlist link; tiny inline styles overridden.
     .shop-item__detail   Description / Item Data (author, type) / Contents.
   Layout: image | buy box on top, full-width detail beneath; single column on
   mobile. Sits in the content column beside the persistent category sidebar,
   so the shop chrome stays consistent with the category page. */
.shop-item {
  display:               grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  grid-template-areas:   "gallery buy"
                         "detail  detail";
  gap:                   var(--space-8);
  align-items:           start;
}
.shop-item__gallery { grid-area: gallery; }
.shop-item__buy     { grid-area: buy; }
.shop-item__detail  { grid-area: detail; }

/* Gallery: flatten the thumbnail table; frame the (JS-upsized) product image
   on the soft tint, click-to-zoom preserved. */
.shop-item__gallery table, .shop-item__gallery tbody,
.shop-item__gallery tr,    .shop-item__gallery td { display: block; width: auto; }
.shop-item__gallery a {
  display:       block;
  background:    var(--accent-soft);
  border-radius: var(--radius);
  padding:       var(--space-5);
  cursor:        zoom-in;
}
.shop-item__gallery a > img {
  display:    block;
  width:      100%;
  height:     auto;
  max-height: 380px;
  object-fit: contain;
}
/* The module appends a tiny "zoom" caption gif under the thumb -- drop it. */
.shop-item__gallery a > div { display: none; }

/* Title */
.shop-item__title h1 {
  font-family:    var(--font-display);
  font-weight:    400;
  font-size:      var(--text-xl);
  line-height:    1.15;
  letter-spacing: -0.01em;
  color:          var(--ink);
  margin:         0;
}

/* Price: flatten table; stock line muted, price prominent. .detailPrice is a
   Hubb shop class (same lean as .Price/.listingPrice in the card builder). */
.shop-item__price { margin-top: var(--space-4); }
.shop-item__price table, .shop-item__price tbody,
.shop-item__price tr,    .shop-item__price td { display: block; width: auto; }
.shop-item__price td > div {
  font-size:     var(--text-sm);
  color:         var(--ink-soft);
  margin-bottom: var(--space-1);
}
.shop-item__price .detailPrice {
  font-family: var(--font-display);
  font-size:   var(--text-lg);
  font-weight: 500;
  color:       var(--ink);
}
.shop-item__price .detailPrice b { font-weight: 500; }
.shop-item__price nobr { white-space: normal; }

/* Actions: flatten table into a flex row. The module sets tiny inline styles
   on the Qty input and button (width:25px, font-size:9px, padding:3px) -- we
   beat the inline attribute with !important. */
.shop-item__actions {
  margin-top:  var(--space-5);
  padding-top: var(--space-5);
  border-top:  1px solid var(--rule);
}
.shop-item__actions table, .shop-item__actions tbody,
.shop-item__actions tr,    .shop-item__actions td { display: block; width: auto; }
/* Normal flow: "Qty: [n] (at GBP [price]) [Add to basket]" inline on one row;
   the module's <br> drops the wishlist link to its own line, left-aligned
   under the row. (Flex was right-aligning the wishlist link before.) */
.shop-item__actions td { line-height: 2; }
.shop-item__actions input[type="text"] {
  display:        inline-block;
  vertical-align: middle;
  width:          calc(4.25 * var(--shop-rem, 1rem)) !important;
  height:         auto !important;
  margin:         0 var(--space-2);
  font-size:      var(--text-sm) !important;
  padding:        var(--space-2) var(--space-3) !important;
  border:         1px solid var(--rule);
  border-radius:  var(--radius);
  font-family:    var(--font-body);
  color:          var(--ink);
}
.shop-item__actions input[type="submit"] {
  display:        inline-block;
  vertical-align: middle;
  margin-left:    var(--space-2);
  font-family:    var(--font-body);
  font-size:      var(--text-sm) !important;
  font-weight:    500 !important;
  letter-spacing: 0.02em;
  color:          var(--accent-ink);
  background:     var(--accent);
  border:         1px solid var(--accent);
  border-radius:  999px;
  padding:        var(--space-2) var(--space-6) !important;
  cursor:         pointer;
  transition:     opacity var(--transition);
}
.shop-item__actions input[type="submit"]:hover { opacity: 0.85; }
.shop-item__actions a {
  display:               inline-block;
  margin-top:            var(--space-4);
  font-family:           var(--font-body);
  font-size:             var(--text-sm);
  font-weight:           400 !important;
  color:                 var(--ink-soft);
  text-decoration:       underline;
  text-underline-offset: 3px;
  padding:               0 !important;
}
.shop-item__actions a:hover { color: var(--accent); }

/* Detail block (full width below): description prose + author/type meta. */
.shop-item__detail {
  border-top:  1px solid var(--rule);
  padding-top: var(--space-8);
}
.shop-item__description { color: var(--ink); line-height: 1.7; max-width: 68ch; }
.shop-item__description p { margin: 0 0 var(--space-4); }
.shop-item__description p:last-child { margin-bottom: 0; }
.shop-item__data {
  margin-top: var(--space-5);
  font-size:  var(--text-sm);
  color:      var(--ink-soft);
}
.shop-item__data b { color: var(--ink); font-weight: 600; }

/* Cross-sell + reviews: setupShopItemDetail() card-ifies Related Items and
   Also Bought into .shop-cards grids and hides any section with no items (so
   a stray heading never shows). These rules just space the labelled blocks. */
.shop-item__section { margin-top: var(--space-12); }
.shop-item__section .shop-section__heading { margin-bottom: var(--space-6); }
/* Cross-sell cards sit in a narrower column; keep the buy label on one line
   (the uppercase + wide letter-spacing was wrapping "Add to basket"). */
.shop-item__section .shop-card__buy {
  letter-spacing: 0.04em;
  padding:        var(--space-2) var(--space-4);
  white-space:    nowrap;
}
.shop-item__section .shop-card__footer { flex-wrap: wrap; }

/* ---- Toast (add-to-basket / wishlist confirmation) ----------------------
   Add-to-basket and wishlist trigger an ASP.NET postback (full reload), so
   setupShopActionToasts() flags the intent on click and shows the toast after
   the reload -- fixed at the bottom so it's visible wherever the page lands. */
:root { --toast-success: #1F7A44; --danger: #C0392B; }
.tab-toast {
  position:       fixed;
  left:           50%;
  bottom:         var(--space-8);
  transform:      translateX(-50%) translateY(calc(1 * var(--shop-rem, 1rem)));
  z-index:        2000;
  max-width:      calc(100vw - var(--space-8));
  padding:        var(--space-3) var(--space-6);
  border-radius:  999px;
  background:     var(--toast-success);
  color:          #FFFFFF;
  font-family:    var(--font-body);
  font-size:      var(--text-sm);
  font-weight:    500;
  box-shadow:     0 8px 24px rgba(0, 0, 0, 0.18);
  opacity:        0;
  transition:     opacity var(--transition), transform var(--transition);
  pointer-events: none;
}
.tab-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .tab-toast { transition: opacity var(--transition); transform: translateX(-50%); }
  .tab-toast.is-visible { transform: translateX(-50%); }
}
/* Inline confirmation (item page): green text with a CSS tick, sat next to the
   Add-to-basket button / wishlist link. Card adds still use the fixed toast
   above (no stable inline anchor after their postback). */
.shop-added {
  display:        inline-block;
  margin-left:    var(--space-3);
  vertical-align: middle;
  color:          var(--toast-success);
  font-family:    var(--font-body);
  font-size:      var(--text-sm);
  font-weight:    600;
  opacity:        0;
  transition:     opacity var(--transition);
}
.shop-added.is-visible { opacity: 1; }
.shop-added::before {
  content:      "";
  display:      inline-block;
  width:        0.4em;
  height:       0.7em;
  margin-right: 0.45em;
  border:       solid var(--toast-success);
  border-width: 0 2px 2px 0;
  transform:    rotate(45deg) translateY(-0.1em);
}

/* ---- Hubb image lightbox (third-party lightbox.js) close button ----------
   The zoom popup (#lightbox, injected at click time) ships a red close GIF.
   Hide it and draw a clean circular Tabernacle close in the top-right. Markup
   is fixed ids; #lightbox is position:absolute so an absolute child anchors to
   it. !important beats the third-party stylesheet on the hidden GIF. */
#bottomNavClose img { display: none !important; }
#bottomNavClose {
  position:      absolute;
  top:           var(--space-3);
  right:         var(--space-3);
  width:         var(--space-8);
  height:        var(--space-8);
  border-radius: 999px;
  background:    var(--surface);
  border:        1px solid var(--rule);
  box-shadow:    0 2px 10px rgba(0, 0, 0, 0.15);
  z-index:       10;
}
#bottomNavClose::before,
#bottomNavClose::after {
  content:       "";
  position:      absolute;
  top:           50%;
  left:          50%;
  width:         14px;
  height:        2px;
  background:    var(--ink);
  border-radius: 1px;
}
#bottomNavClose::before { transform: translate(-50%, -50%) rotate(45deg); }
#bottomNavClose::after  { transform: translate(-50%, -50%) rotate(-45deg); }
#bottomNavClose:hover { border-color: var(--ink); background: var(--accent-soft); }

/* =========================================================================
   3.27  SHOP MY ORDERS   .shop-orders / .shop-draft-orders
   -------------------------------------------------------------------------
   My Orders renders <h2>My Orders</h2> + a <table> (first <tr> = sortable
   header, rest = order rows) + a "Shop home" button. My Draft Orders renders
   the same shape, or empty -> hidden by setupShopItemDetail(). Scoped through
   OUR wrappers; rows targeted structurally (tr:first-child = header) rather
   than via Hubb's grid classes. */
:is(.shop-orders, .shop-draft-orders, .shop-wishlist, .shop-checkout) { overflow-x: auto; }
/* Some grids ship border="1"/rules="rows"; neutralise those attribute
   borders so only our hairlines show. */
:is(.shop-orders, .shop-draft-orders, .shop-wishlist, .shop-checkout) table.gridstyle,
:is(.shop-orders, .shop-draft-orders, .shop-wishlist, .shop-checkout) table.gridstyle td { border: 0; }
:is(.shop-orders, .shop-draft-orders, .shop-wishlist, .shop-checkout) h2 {
  font-family:    var(--font-display);
  font-weight:    400;
  font-size:      var(--text-xl);
  letter-spacing: -0.01em;
  color:          var(--ink);
  margin:         0 0 var(--space-6);
}
/* v0.230  Scoped down -- originally this also covered .shop-checkout, but
   the Delivery step uses real <br>s for address line breaks AND the
   totals stack (Delivery / Basket / Grand). The voucher-prompt br that
   was the original reason for this rule is still hidden by the targeted
   .shop-checkout #divVoucherCode rule below. The other three page types
   keep the broad behaviour until we see them needing brs. */
:is(.shop-orders, .shop-draft-orders, .shop-wishlist) br { display: none; }
:is(.shop-orders, .shop-draft-orders, .shop-wishlist, .shop-checkout) table.gridstyle {
  width:           100%;
  min-width:       460px;        /* keep columns legible; wrapper scrolls if narrower */
  border-collapse: collapse;
  font-family:     var(--font-body);
  font-size:       var(--text-sm);
  margin-bottom:   var(--space-6);
}
:is(.shop-orders, .shop-draft-orders, .shop-wishlist, .shop-checkout) table.gridstyle td {
  text-align:     left;          /* normalise the module's align="center" cells */
  vertical-align: middle;
}
/* Header row */
:is(.shop-orders, .shop-draft-orders, .shop-wishlist, .shop-checkout) table.gridstyle tr:first-child td {
  padding:        var(--space-2) var(--space-3);
  border-bottom:  1px solid var(--rule);
  font-size:      var(--text-xs);
  font-weight:    700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color:          var(--ink);
  white-space:    nowrap;
}
:is(.shop-orders, .shop-draft-orders, .shop-wishlist, .shop-checkout) table.gridstyle tr:first-child a {
  display:         inline-flex;   /* arrow inline beside the label, not stacked above */
  flex-direction:  row-reverse;   /* arrow AFTER the label so the label stays flush left under the title */
  align-items:     center;
  gap:             var(--space-3);
  color:           var(--ink);
  text-decoration: none;
}
:is(.shop-orders, .shop-draft-orders, .shop-wishlist, .shop-checkout) table.gridstyle tr:first-child a:hover { color: var(--accent); }
:is(.shop-orders, .shop-draft-orders, .shop-wishlist, .shop-checkout) table.gridstyle tr:first-child img {
  margin:  0 !important;   /* drop the module's inline margin-right; gap handles spacing */
  opacity: 0.45;           /* sort arrow */
}
/* Order rows */
:is(.shop-orders, .shop-draft-orders, .shop-wishlist, .shop-checkout) table.gridstyle tr:not(:first-child) td {
  padding:       var(--space-3);
  border-bottom: 1px solid var(--rule);
  color:         var(--ink);
}
/* First column flush-left so the header label (and the data beneath it) line
   up with the page title, which sits at the content-column edge. */
:is(.shop-orders, .shop-draft-orders, .shop-wishlist, .shop-checkout) table.gridstyle tr:first-child td:first-child,
:is(.shop-orders, .shop-draft-orders, .shop-wishlist, .shop-checkout) table.gridstyle tr:not(:first-child) td:first-child { padding-left: 0; }
:is(.shop-orders, .shop-draft-orders, .shop-wishlist, .shop-checkout) table.gridstyle tr:not(:first-child) a:not(:has(img)):not(.shop-checkout__remove) {
  color:                 var(--ink);
  text-decoration:       underline;
  text-underline-offset: 2px;
}
:is(.shop-orders, .shop-draft-orders, .shop-wishlist, .shop-checkout) table.gridstyle tr:not(:first-child) a:not(.shop-checkout__remove):hover { color: var(--accent); }
/* "Shop home" button (parent div centres it). !important beats the inline
   width:100px that was clipping the label. */
:is(.shop-orders, .shop-draft-orders, .shop-wishlist, .shop-checkout) input[type="button"] {
  width:          auto !important;
  display:        inline-block;
  font-family:    var(--font-body);
  font-size:      var(--text-sm);
  font-weight:    500;
  letter-spacing: 0.02em;
  color:          var(--ink);
  background:     transparent;
  border:         1px solid var(--rule);
  border-radius:  999px;
  padding:        var(--space-2) var(--space-6);
  cursor:         pointer;
  transition:     border-color var(--transition), color var(--transition);
}
:is(.shop-orders, .shop-draft-orders, .shop-wishlist, .shop-checkout) input[type="button"]:hover { border-color: var(--ink); color: var(--accent); }
/* ---- Wishlist + Draft Orders: borderless "when adding items" options table,
   accent checkboxes, and the primary "Add items to basket" submit. */
:is(.shop-wishlist, .shop-draft-orders) table:not(.gridstyle) {
  margin:          var(--space-6) 0;
  border-collapse: collapse;
  font-family:     var(--font-body);
  font-size:       var(--text-sm);
  color:           var(--ink);
}
:is(.shop-wishlist, .shop-draft-orders) table:not(.gridstyle) td { padding: var(--space-1) var(--space-2); border: 0; }
:is(.shop-wishlist, .shop-draft-orders) table:not(.gridstyle) b { font-weight: 600; }
:is(.shop-wishlist, .shop-draft-orders) input[type="checkbox"] { accent-color: var(--accent); }
:is(.shop-wishlist, .shop-draft-orders) input[type="submit"] {
  display:        inline-block;
  font-family:    var(--font-body);
  font-size:      var(--text-sm);
  font-weight:    500;
  letter-spacing: 0.02em;
  color:          var(--accent-ink);
  background:     var(--accent);
  border:         1px solid var(--accent);
  border-radius:  999px;
  padding:        var(--space-2) var(--space-6);
  cursor:         pointer;
  transition:     opacity var(--transition);
}
:is(.shop-wishlist, .shop-draft-orders) input[type="submit"]:hover { opacity: 0.85; }
/* Replace Hubb's dated red delete.png with a clean remove glyph. Matches on
   the image (the icon sits in a different column on the item grids vs the
   draft-orders list), not a column. JS stamps an aria-label so the link
   keeps an accessible name once the <img> is hidden. */
:is(.shop-orders, .shop-draft-orders, .shop-wishlist, .shop-checkout) a:has(img[src*="delete.png"]) {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  width:           calc(1.5 * var(--shop-rem, 1rem));
  height:          calc(1.5 * var(--shop-rem, 1rem));
  border-radius:   999px;
  color:           var(--ink-soft);
  text-decoration: none;
  transition:      color var(--transition), background var(--transition);
}
:is(.shop-orders, .shop-draft-orders, .shop-wishlist, .shop-checkout) a:has(img[src*="delete.png"]) img { display: none; }
:is(.shop-orders, .shop-draft-orders, .shop-wishlist, .shop-checkout) a:has(img[src*="delete.png"])::before {
  content:     "\00d7";   /* multiplication sign -- neutral, modern remove glyph */
  font-size:   calc(1.25 * var(--shop-rem, 1rem));
  line-height: 1;
}
:is(.shop-orders, .shop-draft-orders, .shop-wishlist, .shop-checkout) a:has(img[src*="delete.png"]):hover {
  color:      var(--accent);
  background: var(--accent-soft);
}
/* Per-item "Buy" (last-column text link, NOT the remove icon) -> compact
   ghost pill, so it reads as an action and matches the rest of the shop. */
:is(.shop-draft-orders, .shop-wishlist) table.gridstyle td:last-child a:not(:has(img)) {
  display:         inline-flex;
  align-items:     center;
  font-family:     var(--font-body);
  font-size:       var(--text-xs);
  font-weight:     500;
  letter-spacing:  0.04em;
  text-transform:  uppercase;
  color:           var(--ink);
  text-decoration: none;
  border:          1px solid var(--rule);
  border-radius:   999px;
  padding:         var(--space-1) var(--space-4);
  white-space:     nowrap;
  transition:      border-color var(--transition), color var(--transition);
}
:is(.shop-draft-orders, .shop-wishlist) table.gridstyle td:last-child a:not(:has(img)):hover {
  border-color: var(--ink);
  color:        var(--accent);
}

/* =========================================================================
   3.28  SHOP CHECKOUT  --  .shop-checkout (basket / ShowCart view)
   The Checkout module renders the basket review: a progress strip, the cart
   items grid (editable qty/price + remove), a vouchers block, and the action
   buttons. The cart grid is in the .shop-orders grid :is() list above for
   header/rows/hairlines/remove-glyph/first-col-flush; the rules here add the
   checkout-only pieces. Styled in place -- never rebuilt -- so the inputs and
   ASP.NET postbacks stay intact. Delivery/Payment/Confirm are later steps.
   ========================================================================= */
/* Page title (module emits <h1>; a global hero-h1 makes it huge) -> match the
   other shop page titles. Vouchers <h2> sits a step smaller. */
.shop-checkout h1 {
  font-family:    var(--font-display);
  font-weight:    400;
  font-size:      var(--text-xl);
  letter-spacing: -0.01em;
  color:          var(--ink);
  margin:         0 0 var(--space-4);
  padding:        0;
}
.shop-checkout h2 { font-size: var(--text-lg); margin: 0 0 var(--space-3); }
/* Progress strip: drop the dated cart icon + gif arrows (a global
   img{display:block} was stacking them), lay the steps out inline. */
.shop-checkout td:has(> img[src*="CartLarge"]) { display: none; }
.shop-checkout img[src*="CheckoutArrow"] { display: inline-block; vertical-align: middle; width: 16px; height: auto; opacity: 0.6; }   /* soft grey arrows between step pills (was 0.4 -- too faint) */
.shop-checkout .CartProgressHighlighted,
.shop-checkout .CartProgressFaded {
  display:        inline-block;
  font-family:    var(--font-body);
  font-size:      var(--text-xs) !important;   /* beat the module's inline <style> px sizes */
  font-weight:    600;
  letter-spacing: 0.04em;
  text-transform: capitalize;   /* "basket" -> "Basket" */
  padding:        var(--space-1) var(--space-4);
  border-radius:  999px;
}
/* Step pills: faded = light grey, current = accent fill, so the stage is
   obvious at a glance (replaces the faint chevrons; inline span margins space them). */
.shop-checkout .CartProgressFaded       { background: var(--section-light); color: var(--ink-soft); }
.shop-checkout .CartProgressHighlighted { background: var(--accent);         color: var(--accent-ink); }
/* Editable qty / price / voucher text fields (inline widths from the module
   are kept). Scoped to .shop-checkout so the utility-bar search is untouched. */
.shop-checkout input[type="text"] {
  font-family:   var(--font-body);
  font-size:     var(--text-sm);
  color:         var(--ink);
  background:    var(--surface);
  border:        1px solid var(--rule);
  border-radius: var(--radius);
  padding:       var(--space-1) var(--space-2);
}
.shop-checkout input[type="text"]:focus-visible {
  outline:        2px solid var(--accent);
  outline-offset: 1px;
  border-color:   var(--accent);
}
/* Totals: a nested table in the cart footer. Pull it right + quiet it. Doubled
   .shop-checkout out-specifies the generic grid-row td rule above, which would
   otherwise hairline + indent these nested cells. */
.shop-checkout table.gridstyle table { margin-left: auto; font-size: var(--text-sm); }
.shop-checkout.shop-checkout table.gridstyle table td {
  padding:     var(--space-1) var(--space-2);
  border:      0;
  text-align:  right;
  white-space: nowrap;
  text-transform: capitalize;   /* "basket Total" -> "Basket Total" */
}
/* Hide the "x = remove item" legend (bare delete.png in a div) -- the clean
   remove glyph is self-explanatory. */
.shop-checkout div:has(> img[src*="delete.png"]) { display: none; }
/* Vouchers: hide the empty voucher grid (header only, no item rows); space it. */
.shop-checkout table.gridstyle:not(:has(tr.griditemrow)) { display: none; }
.shop-checkout #divVoucherCode {
  margin-top:    var(--space-8);
  background:    var(--section-light);
  padding:       var(--space-6) var(--space-8) !important;   /* beat module inline padding:10px 0 8px 0 -- restores left gap + symmetry */
  border-radius: var(--radius-lg);
}
.shop-checkout #divVoucherCode h2 { display: none; }   /* streamlined: drop the "Vouchers" title */
.shop-checkout #divVoucherCode b { margin: 0; }   /* flex gap handles spacing now */
/* Action buttons. Base = ghost pill; "Checkout Now" = solid accent (primary),
   targeted by stable control-name suffix. Disabled "Update" stays muted. */
.shop-checkout input[type="submit"] {
  display:        inline-block;
  vertical-align: middle;
  font-family:    var(--font-body);
  font-size:      var(--text-sm);
  font-weight:    500;
  letter-spacing: 0.02em;
  color:          var(--ink);
  background:     transparent;
  border:         1px solid var(--rule);
  border-radius:  999px;
  padding:        var(--space-2) var(--space-5);
  cursor:         pointer;
  transition:     border-color var(--transition), color var(--transition), opacity var(--transition);
}
.shop-checkout input[type="submit"]:hover { border-color: var(--ink); color: var(--accent); }
.shop-checkout input[name$="btnContinueCheckout"] {
  color:        var(--accent-ink);
  background:   var(--accent);
  border-color: var(--accent);
}
.shop-checkout input[name$="btnContinueCheckout"]:hover { color: var(--accent-ink); opacity: 0.85; }
.shop-checkout input[type="submit"][disabled],
.shop-checkout input[type="submit"]:disabled { opacity: 0.4; cursor: not-allowed; }
/* ---- v0.215 checkout refinements -------------------------------------- */
/* Drop the leftover category sidebar + empty items/results that ship from the
   cloned template on the checkout page. Scoped via the sibling checkout
   section so every other shop page keeps its sidebar. */
/* v0.280: these checkout-only rules now key off a POPULATED checkout
   (.shop-checkout with an element inside). The category and item templates
   carry the same checkout section, empty, so the old bare-sibling selector
   hid the whole product grid and sidebar on every category page. */
.shop-layout:has(~ .slice--shop-checkout .shop-checkout > *) { display: none; }
.slice--shop-crumbs:has(~ .slice--shop-checkout .shop-checkout > *) { display: none; }   /* empty crumb on checkout */
.slice--shop-checkout { margin-top: var(--space-8); margin-bottom: var(--space-8); }   /* tight to search bar + T&Cs */
.slice--shop-checkout:not(:has(.shop-checkout > *)) { display: none; }   /* v0.280: empty on category/item pages -> no phantom margins */
/* Editor-only price field shipped at 45px (clipped); beat the inline width. */
.shop-checkout input[name*="price_"] { width: calc(4.5 * var(--shop-rem, 1rem)) !important; }
/* Total column right-aligned; the remove control (moved out of the leading
   column by JS) sits under the line total as light-red text. */
.shop-checkout table.gridstyle tr.gridheader td:last-child,
.shop-checkout table.gridstyle tr.griditemrow td:last-child,
.shop-checkout table.gridstyle tr.altgriditemrow td:last-child { text-align: right; }
.shop-checkout__remove {
  display:         block;
  margin-top:      var(--space-1);
  font-family:     var(--font-body);
  font-size:       var(--text-xs);
  font-weight:     500;
  color:           var(--danger);
  text-decoration: none;
  white-space:     nowrap;
}
.shop-checkout__remove:hover { text-decoration: underline; }
/* Voucher block: the global br-hide collapsed the question onto the prompt and
   the field/button were touching. Restore the break + add breathing room. */
.shop-checkout #divVoucherCode br { display: none; }        /* one line: question + field + Apply */
.shop-checkout #divVoucherCode > div { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3); padding: 0 !important; line-height: normal; }   /* drop inline padding-top:10px */
.shop-checkout #divVoucherCode input[type="text"] {
  margin:         0;
  padding:        var(--space-2) var(--space-3);   /* match the Apply pill height */
  vertical-align: middle;
}
.shop-checkout #divVoucherCode input[type="submit"] { background: var(--surface); vertical-align: middle; }
/* ---- v0.216 checkout refinements -------------------------------------- */
/* Drop the redundant "Total" header row in the footer; keep Basket Total. */
.shop-checkout table.gridstyle table tr:first-child { display: none; }
/* Update button: hard left + solid fill (was floating + ghost). */
.shop-checkout center { text-align: left; }
.shop-checkout input[name$="btnUpdateQuantities"] {
  color:        var(--accent-ink);
  background:   var(--ink-soft);
  border-color: var(--ink-soft);
}
.shop-checkout input[name$="btnUpdateQuantities"]:hover {
  color:        var(--accent-ink);
  background:   var(--ink);
  border-color: var(--ink);
}
/* Continue Shopping is reachable from the nav -- drop it from the panel. */
.shop-checkout input[name$="btnContinueShopping"] { display: none; }
/* Stack Checkout Now + Save (Save spaced below) on the right, under Basket Total. */
.shop-checkout [id$="_pnlButtons"] {
  display:         flex;
  flex-direction:  row;
  flex-wrap:       wrap;
  justify-content: flex-end;
  align-items:     center;
  gap:             var(--space-4);
  margin-top:      var(--space-8);
}
.shop-checkout input[name$="btnSaveDraft"] { order: -1; }   /* Save sits left of Checkout Now */
.shop-checkout [id$="_pnlButtons"] p { display: none; }
.shop-checkout [id$="_pnlButtons"] input[type="submit"] { margin: 0 !important; }
/* ---- v0.227 checkout refinements -------------------------------------- */
/* Hide the artist/author byline Hubb wraps in a bare <div> directly after
   the item link. Streamlines the basket view -- the title alone is enough,
   the author name below it (e.g. "The Town Church Band", "Randall Schmidt")
   is redundant noise. Targets only div siblings of product links so any
   other content in the item cell (none today, defensive) is untouched. */
.shop-checkout table.gridstyle tr:is(.griditemrow, .altgriditemrow) td > a[href*="/Shop/Products/"] + div {
  display: none;
}
/* ---- v0.228 checkout refinements -------------------------------------- */
/* On the checkout page, hide the top-strip mini-basket from .slice--shop-
   utility. The user is already at the cart -- a second summary above the
   editable basket is redundant clutter, and is also where setupShopBasket
   has been observed to silently exit (Hubb appears to render the basket
   module differently here, often without the ShowCart links the rebuilder
   needs to find a cart URL). Keep the search input visible -- still useful. */
body:has(.slice--shop-checkout .shop-checkout > *) .shop-utility__basket {
  display: none;
}
/* Defensive fallback for the seeker-box visitor widget when the inner
   module hasn't been configured with the .visitor_widget CSS Class in
   Hubb's UI. Without that opt-in, our :has(.visitor_widget) docking
   rules at 8564+ don't fire -- so we'd be relying on Hubb's own
   .HideElement { display: none } stylesheet to keep the .seeker-box
   hidden. That default has gone missing on this template (Image 2: the
   <aside> is rendering in flow at the bottom of the page, overlapping
   the Westpoint partner logos). Force display:none here so the page
   doesn't leak the unconfigured widget. Excludes the configured-and-
   docked case (:has(.visitor_widget)) so we don't fight ourselves. */
:is(.seeker-box, .SeekerBox).HideElement:not(:has(.visitor_widget)) {
  display: none !important;
}
/* When no discount is applied to any line, hide the entire Discount
   column. Adam's request: the column-of-zeros is noise. JS adds the
   .shop-checkout--no-discount class to the items grid when every line's
   Discount cell parses to 0; this rule then drops the second-to-last
   cell on the header + item rows. nth-last-child(2) is robust whether
   or not setupShopCheckout has collapsed the leading X column (Discount
   stays second-from-right either way). The footer/totals row (no
   griditemrow/altgriditemrow/gridheader class) is untouched -- its
   colspan layout is unrelated. */
.shop-checkout table.gridstyle.shop-checkout--no-discount tr:is(.gridheader, .griditemrow, .altgriditemrow) > *:nth-last-child(2) {
  display: none;
}
/* ---- v0.229 voucher row layout ----------------------------------------- */
/* Hubb's voucher gridstyle table renders 2 columns -- X delete | code text
   -- but inherits two rules tuned for the items table that worked against
   it here: the table is stretched to 100% width with a 460px min-width
   floor (right for items, wrong for vouchers), and tr td:last-child is
   right-aligned (correct for the items Total column; wrong for the
   voucher code, which ended up far right with the X far left and a wide
   gap between them). The "CODE" header is also redundant for a single-
   data-column table where the X and code self-describe.

   Tighten: drop the header, let the table size to content, and beat the
   global right-alignment so the code sits next to the X. Result: one
   compact left-aligned row per voucher (X then code), with the "Have a
   voucher code?" prompt row below unchanged. */
.shop-checkout #divVoucherCode table.gridstyle {
  width:     auto;
  min-width: 0;
}
.shop-checkout #divVoucherCode table.gridstyle tr.gridheader {
  display: none;
}
.shop-checkout #divVoucherCode table.gridstyle tr:is(.griditemrow, .altgriditemrow) > td:nth-child(2) {
  text-align:   left;
  padding-left: var(--space-3);
}
/* ---- v0.230 delivery step polish ------------------------------------------ */
/* The Delivery step (Hubb's DeliveryASCX module, rendered at /Shop/Checkout/
   Delivery.aspx) drops a completely different shape of markup into our
   .shop-checkout wrapper than the cart did: a 2-column <table class=
   "delivery-container"> with address + phone radios on the left and
   method + charge + totals on the right, plus a series of
   AddressList_AddressTable child tables for the radio lists.
   
   Two structural fixes get most of the readability back:
   (a) Removed .shop-checkout from the over-broad br-hide rule above so
       address line breaks and the totals stack actually render.
   (b) Style the two-column container with a real column gap + dividing
       hairline, and tidy the address/phone radio tables so the radio
       and label don't run together.
   Stack columns on mobile -- the side-by-side breaks down below ~720px
   when the address strings and phone widget compete for width. */
/* v0.237  TWO column-cards (was four section-cards). Kenton's simpler
   layout groups each column into one card -- left = Address + Phone, right
   = Method + Charge -- instead of a card per section. Flatten the table's
   tbody/tr with display:contents so the two <td>s become flex items, then
   style each <td> as the card. The inner tables (below) drop their own card
   backgrounds so we don't double-box. */
.shop-checkout .delivery-container {
  display:     flex;
  gap:         var(--space-6);
  align-items: flex-start;   /* content-height cards, not stretched to equal height */
  margin-top:  var(--space-4);
}
.shop-checkout .delivery-container > tbody,
.shop-checkout .delivery-container > tbody > tr {
  display: contents;
}
.shop-checkout .delivery-container > tbody > tr > td {
  flex:          1 1 0;       /* equal-width columns */
  min-width:     0;           /* allow shrink below intrinsic content width */
  background:    var(--section-light);
  border-radius: var(--radius-lg);
  padding:       var(--space-6);
}
/* Balance the card's bottom space: drop the trailing margin of the last
   section so bottom padding alone sets the gap (matches the top). */
.shop-checkout .delivery-container > tbody > tr > td > *:last-child {
  margin-bottom: 0;
}
/* Address + Phone Number lists. Hubb uses the same .AddressList_
   AddressTable class for both -- one rule covers both blocks. */
.shop-checkout .delivery-container .AddressList_AddressTable {
  width:           100%;
  border-collapse: separate;
  border-spacing:  0;
  margin:          0 0 var(--space-4);   /* v0.237  card bg/padding removed -- the column <td> is the card now */
}
.shop-checkout .AddressList_AddressTable > tbody > tr > td {
  padding:        var(--space-1) var(--space-2);   /* v0.238  tighter vertical -- phone options were too far apart */
  vertical-align: top;
}
.shop-checkout .AddressList_AddressTable > tbody > tr > td:first-child {
  width:         1%;            /* v0.238  shrink the radio cell to the radio so the address sits close */
  white-space:   nowrap;
  padding-left:  0;
  padding-right: var(--space-2);
}
.shop-checkout .AddressList_AddressTable > tbody > tr > td + td {
  padding-left: 0;              /* v0.238  address/number sits right after the radio gap */
}
/* Phone-number rows specifically (Hubb names their radios *_phone_number_rb_*,
   vs *_address_rb_* for addresses): zero the vertical padding so the numbers
   sit close together. Scoped via :has() so multi-address lists -- where rows
   SHOULD stay separated -- are untouched. */
.shop-checkout .AddressList_AddressTable > tbody > tr:has(label[for*="_phone_number_rb_"]) > td {
  padding-top:    0;
  padding-bottom: 0;
}
.shop-checkout .AddressList_Address label {
  cursor:      pointer;
  display:     inline-block;
  line-height: 1.3;        /* v0.242  tighter -- multi-line address lines + phone rows sit closer */
}
/* The "Add Address" link comes with a tiny Hubb +/- GIF as a background
   image (/Images/TP.gif). Drop it -- the low-res GIF doesn't sit well
   alongside our typography; the underlined text reads clearly as an
   action link on its own. */
.shop-checkout .AddressList_AddAddressLink {
  background-image:      none;
  padding-left:          0;
  color:                 var(--accent);
  text-decoration:       underline;
  text-underline-offset: 3px;
}
.shop-checkout .AddressList_AddAddressLink:hover {
  text-decoration: none;
}
/* Delivery Charge breakdown: Hubb's Net/VAT/Rate/Gross mini-table sits
   inside a deprecated <div align="right">. v0.232 left-aligns it so it
   sits under "for Shop items:" within the charge card, consistent with
   the rest of the (left-aligned) page; space the cells so numbers don't
   run together. */
.shop-checkout .delivery-container div[align="right"] {
  text-align:   left;
  margin:       0 !important;        /* v0.240  the indent is on the wrapper, not the table (the table's margin/float were already zeroed in v0.238 and the header IS styled, proving our rules reach it) */
  padding-left: 0 !important;
}
.shop-checkout .delivery-container div[align="right"] > table {
  margin-top:      var(--space-2);
  margin-left:     0 !important;     /* v0.238  legacy align="right" floated the table to the card edge; force it flush-left under "for Shop items:" */
  margin-right:    auto !important;
  float:           none !important;
  border-collapse: collapse;
  font-size:       var(--text-sm);
}
.shop-checkout .delivery-container div[align="right"] > table td {
  padding: var(--space-1) var(--space-2);
}
/* Mobile: stack the two column-cards. tbody/tr stay display:contents;
   flex-direction:column stacks the <td> cards, align-items:stretch makes
   them full width. */
@media (max-width: 720px) {
  .shop-checkout .delivery-container {
    flex-direction: column;
    align-items:    stretch;
  }
}
/* ---- v0.231 delivery step polish (cont.) -------------------------------- */
/* Three small wins on the Delivery step:
   (1) Hubb writes "basket Total" with a lowercase b -- jarring next to
       "Delivery Total" and "Grand Total". Capitalize every <b> label
       that immediately precedes a .Price (only "basket" actually changes
       visually; already-capitalised ones pass through unchanged).
   (2) Grand Total is the figure the customer cares about. v0.231 lifted it
       with the display serif at a larger size; v0.236 dials that back to
       the same size as Delivery/Basket Total (consistent charge sizing per
       request) and distinguishes it by weight + accent colour instead.
       Targeted via the stable ASP.NET id suffix on the inner span, since the
       three totals are siblings within the same <td> separated by <br>s --
       no parent we can scope to.
   (3) [superseded in v0.232] section spacing between Delivery Method and
       Delivery Charge is now handled by the heading + card margins in the
       v0.232 block below, not a stopgap margin on the h2+table. */
.shop-checkout b:has(+ .Price) {
  text-transform: capitalize;
}
.shop-checkout b:has(+ .Price > [id$="lblGrandTotal"]),
.shop-checkout .Price:has([id$="lblGrandTotal"]) {
  font-weight: 700;
  color:       var(--accent);
}
/* Delivery Method dropdown: Hubb ships a bare native <select> which
   reads as raw next to our styled text inputs. Match the input look
   so they sit together on the same row. */
.shop-checkout .delivery-container select {
  font-family:   var(--font-body);
  font-size:     var(--text-sm);
  color:         var(--ink);
  background:    var(--surface);
  border:        1px solid var(--rule);
  border-radius: var(--radius);
  padding:       var(--space-1) var(--space-2);
  cursor:        pointer;
}
.shop-checkout .delivery-container select:focus-visible {
  outline:        2px solid var(--accent);
  outline-offset: 1px;
  border-color:   var(--accent);
}
/* ---- v0.232 delivery step: grouped cards + alignment ------------------- */
/* Group each section into a light-grey card matching the basket page's
   voucher panel (--section-light bg, --radius-lg). Left column = Delivery
   Address + Phone Number cards; right column = Delivery Method + Delivery
   Charge cards. Columns are 50/50 (table-layout: fixed above) with the
   central hairline removed -- the cards do the grouping now. Headings sit
   above their card as quiet section labels on a consistent rhythm.
   v0.237: collapsed to ONE card per column (see container rule above); the
   headings now sit INSIDE the card and the per-section card styling below
   is stripped. */

/* Section headings sit inside the column card. The first heading in a column
   sits at the card's top padding; the second (Phone Number / Delivery Charge)
   gets a top margin to separate the two sections. Targeted via h2 ~ h2 (the
   2nd h2 in a column) so we don't depend on the heading being a direct child
   of the <td>. Normalise Hubb's inline padding-top on the Phone heading. */
.shop-checkout .delivery-container h2 {
  margin:      0 0 var(--space-4);
  padding-top: 0 !important;
}
.shop-checkout .delivery-container h2 ~ h2 {
  margin-top: var(--space-6);
}

/* "Add Address" sits between the address list and the Phone Number heading,
   inside the left card -- a little rhythm below it. */
.shop-checkout .delivery-container .AddressList_AddAddressLink {
  display: inline-block;
  margin:  0 0 var(--space-2);
}

/* Right-column tables: Delivery Method (1st) and Delivery Charge (2nd).
   v0.237  card bg/padding removed -- the column <td> is the card now. */
.shop-checkout .delivery-container > tbody > tr > td + td > table {
  width:           100%;
  border-collapse: separate;
  border-spacing:  0;
  margin:          0 0 var(--space-4);
}
/* Delivery Method rows: muted label cell, normal value cell, a little
   vertical breathing room. */
.shop-checkout .delivery-container > tbody > tr > td + td > table:first-of-type td {
  padding:        var(--space-1) var(--space-3) var(--space-1) 0;
  vertical-align: baseline;
}
.shop-checkout .delivery-container > tbody > tr > td + td > table:first-of-type td:first-child {
  color:       var(--ink-soft);
  white-space: nowrap;
}

/* Delivery Charge card: left-align everything. The totals cell ships with
   an inline text-align:right that floated the figures to the page edge;
   !important is needed to beat that inline style. A hairline separates the
   Net/VAT breakdown row from the totals row, and the leading <br> at the
   top of each row is dropped so content sits to the card padding. */
.shop-checkout .delivery-container > tbody > tr > td + td > table:nth-of-type(2) td {
  text-align: left !important;
}
.shop-checkout .delivery-container > tbody > tr > td + td > table:nth-of-type(2) td > br:first-child {
  display: none;
}
.shop-checkout .delivery-container > tbody > tr > td + td > table:nth-of-type(2) > tbody > tr + tr > td {
  border-top:  1px solid var(--rule);
  padding-top: var(--space-4);
}

/* Promote the Delivery step's "Continue >>" to the solid-accent primary,
   matching "Checkout Now" on the basket page. btnBack stays the ghost
   pill (secondary). The [id$="_pnlButtons"] flex bar already right-aligns
   and pills both buttons, so only the fill needs setting here. The
   "$btnContinue" suffix excludes btnContinueCheckout / btnContinueShopping. */
.shop-checkout input[name$="$btnContinue"] {
  color:        var(--accent-ink);
  background:   var(--accent);
  border-color: var(--accent);
}
.shop-checkout input[name$="$btnContinue"]:hover {
  color:   var(--accent-ink);
  opacity: 0.85;
}
/* ---- v0.235 Add Address form (Delivery step) --------------------------- */
/* Clicking "Add Address" reveals #divAddAddress: a bare label/input
   table (.tblAddress) + a centred submit, with no container -- it reads
   as flaky markup dropped between the address card and Phone heading.
   Wrap it in the same light-grey card as the saved-address list, left-
   align the labels (they ship inline text-align:right), give the rows
   breathing room, and left-align the Add Address button to match the
   rest of the page. Scoped to .delivery-container so the login-page
   registration form (also .tblAddress, but in pnlLoginControls) is
   untouched -- that's a separate, deferred task. */
.shop-checkout .delivery-container [id$="_divAddAddress"] {
  margin:      var(--space-2) 0 var(--space-4);
  padding-top: var(--space-4);
  border-top:  1px solid var(--rule);   /* v0.237  was a grey card; now a hairline-topped inset within the column card */
}
.shop-checkout .delivery-container .tblAddress {
  width:           100%;
  border-collapse: separate;
  border-spacing:  0;
}
.shop-checkout .delivery-container .tblAddress > tbody > tr > td {
  padding:        var(--space-2) var(--space-3) var(--space-2) 0;
  vertical-align: middle;
}
/* Label cells: right-aligned so the colons line up against the field column
   regardless of the leading "* " on required labels (those asterisks are
   baked into Hubb's label text, so they can't be split off -- right-aligning
   the colon edge is the tidy fix). Muted, shrunk to content. The
   "(* Required data)" foot-note below explains the asterisks. */
.shop-checkout .delivery-container .tblAddress > tbody > tr > td:first-child {
  text-align:    right !important;
  white-space:   nowrap;
  width:         1%;
  color:         var(--ink-soft);
  padding-right: var(--space-4);
}
/* Consistent field width for the text lines; postcode keeps its own short
   inline width (width:100px beats this external width, which is correct --
   a postcode field shouldn't be 260px wide). max-width !important beats the
   inline max-width:200px so the lines aren't needlessly pinched. */
.shop-checkout .delivery-container .tblAddress input[type="text"] {
  width:     260px;
  max-width: 100% !important;
}
/* "(* Required data)" foot-note row: quiet it down. */
.shop-checkout .delivery-container .tblAddress > tbody > tr:last-child td {
  color:     var(--ink-soft);
  font-size: var(--text-sm);
}
/* The Add Address submit ships in a <div style="text-align:center"> --
   left-align it to match everything else. The button itself already
   inherits the ghost-pill submit styling. */
.shop-checkout .delivery-container [id$="_divAddAddress"] > div {
  text-align: left !important;
  margin-top: var(--space-4);
}
/* Mobile: let the field inputs fill the card width when stacked. */
@media (max-width: 720px) {
  .shop-checkout .delivery-container .tblAddress input[type="text"] {
    width: 100%;
  }
}
/* ---- v0.236 Add Address polish + Delivery Charge table ----------------- */
/* (a) The Add Address submit shipped as a ghost pill with a --rule border
   that's nearly invisible on the --section-light card. Give it an accent
   outline so it's clearly actionable; it stays secondary to the page's
   filled "Continue" (which is accent-filled). */
.shop-checkout input[name$="$btnAddAddress"] {
  border-color: var(--accent);
  color:        var(--accent);
}
.shop-checkout input[name$="$btnAddAddress"]:hover {
  background:   var(--accent);
  color:        var(--accent-ink);
  border-color: var(--accent);
}
/* (b) "Cancel" button injected beside "Add Address" (setupAddAddressCancel)
   -- a quiet text button so the accent-outlined Add Address reads primary. */
.shop-checkout .tab-addr-cancel {
  margin-left:           var(--space-4);
  border:                0;
  background:            transparent;
  font-family:           var(--font-body);
  font-size:             var(--text-sm);
  color:                 var(--ink-soft);
  cursor:                pointer;
  text-decoration:       underline;
  text-underline-offset: 3px;
  padding:               var(--space-2) var(--space-1);
}
.shop-checkout .tab-addr-cancel:hover {
  color: var(--accent);
}
/* ---- v0.238 Add Address modal dialog ----------------------------------- */
/* setupAddAddressDialog promotes the form to a centred fixed dialog so it
   doesn't expand the page. The form stays in the DOM (inside the ASP.NET
   <form>) -- only its positioning changes via this class -- so the "Add
   Address" postback still carries the field values. */
.shop-checkout .delivery-container [id$="_divAddAddress"].tab-addr-modal {
  position:      fixed;
  top:           50%;
  left:          50%;
  transform:     translate(-50%, -50%);
  z-index:       1001;
  width:         min(92vw, 460px);
  max-height:    90vh;
  overflow-y:    auto;
  margin:        0;
  padding:       var(--space-6);   /* v0.244  even padding; the title's extra top breathing room now lives on the heading element itself (robust to scroll) */
  background:    var(--surface);
  border:        0;                 /* override the v0.237 hairline-top inset */
  border-radius: var(--radius-lg);
  box-shadow:    0 20px 60px -15px rgba(0, 0, 0, 0.4);
}
/* Real title element (injected by setupAddAddressDialog, replacing the
   v0.238 ::before). Hidden by default; shown only when the form is in modal
   mode so it never appears if the form is ever rendered inline. */
.shop-checkout .delivery-container [id$="_divAddAddress"] .tab-addr-modal__heading {
  display: none;
}
.shop-checkout .delivery-container [id$="_divAddAddress"].tab-addr-modal .tab-addr-modal__heading {
  display:       block;
  margin:        0 0 var(--space-5);
  padding-top:   var(--space-3);   /* v0.244  breathing room above the title, intrinsic to the heading box */
  font-family:   var(--font-display);
  font-size:     var(--text-lg);
  color:         var(--ink);
}
.tab-addr-backdrop {
  position:   fixed;
  inset:      0;
  z-index:    1000;
  background: rgba(0, 0, 0, 0.45);
}
/* (c) Net/VAT/Rate/Gross breakdown: make it read as a proper little table.
   Muted uppercase header row with a hairline under it, values in body ink,
   wider column gaps than v0.230's default cell padding. Header is assumed
   to be the first row (Hubb emits both rows in <tbody>). */
.shop-checkout .delivery-container div[align="right"] > table td {
  padding-right: var(--space-5);
}
.shop-checkout .delivery-container div[align="right"] > table td:last-child {
  padding-right: 0;
}
.shop-checkout .delivery-container div[align="right"] > table td:first-child {
  display: none;          /* v0.241  Hubb emits an empty leading spacer <td> in both rows; it was the whole indent. Drop it so Net/VAT/Rate/Gross start flush-left. */
}
.shop-checkout .delivery-container div[align="right"] > table td:first-child + td {
  padding-left: 0;        /* the now-first visible column (NET / its value) sits flush */
}
.shop-checkout .delivery-container div[align="right"] > table > tbody > tr:first-child td {
  font-size:      var(--text-xs);
  font-weight:    600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color:          var(--ink-soft);
  border-bottom:  1px solid var(--rule);
  padding-bottom: var(--space-1);
}
.shop-checkout .delivery-container div[align="right"] > table > tbody > tr + tr td {
  color:       var(--ink);
  padding-top: var(--space-2);
}
/* Collapsible breakdown (setupDeliveryBreakdown wraps the table in <details>):
   default view is just the inc-VAT total; the Net/VAT/Rate/Gross table is one
   click away. */
.tab-charge-breakdown {
  margin-top: var(--space-2);
}
.tab-charge-breakdown__summary {
  cursor:      pointer;
  list-style:  none;                 /* drop the native disclosure triangle; we add our own affordance */
  display:     inline-flex;
  align-items: baseline;
  gap:         var(--space-3);
  font-size:   var(--text-sm);
  color:       var(--ink);
}
.tab-charge-breakdown__summary::-webkit-details-marker { display: none; }   /* legacy WebKit marker */
.tab-charge-breakdown__amount {
  font-weight: 600;
}
.tab-charge-breakdown__summary::after {
  content:               "View breakdown";
  font-size:             var(--text-xs);
  color:                 var(--accent);
  text-decoration:       underline;
  text-underline-offset: 2px;
}
.tab-charge-breakdown[open] .tab-charge-breakdown__summary::after {
  content: "Hide breakdown";
}
.tab-charge-breakdown[open] > div[align="right"] {
  margin-top: var(--space-2);        /* gap between summary and the revealed table */
}
/* ---- v0.245 Payment step ----------------------------------------------- */
/* The Payment page ships a Stripe card form plus a billing-address form. The
   checkout header, progress pills, native text inputs, the "Add card" /
   Continue / Back buttons and the button bar are ALL already handled by the
   shared .shop-checkout rules above -- this block only adds the bits unique
   to this page. The card-number / expiry / CVC fields are Stripe-controlled
   iframes inside .element-container; we never touch those (no width, height
   or injection) -- only the layout and labels around them, and the native
   Name / Postcode inputs (which already inherit our input styling). */

/* Card-entry area: a defined panel echoing the Delivery step's cards, so the
   form reads as one intentional block rather than loose fields on the page. */
.shop-checkout .new-card-panel {
  background:    var(--section-light);
  border-radius: var(--radius-lg);
  padding:       var(--space-6);
  max-width:     420px;
}
/* Empty saved-card <ul> (the "New card" radio is hidden by the platform):
   strip its default list indent/bullets so it adds no stray space. */
.shop-checkout .stripe-card-list {
  list-style: none;
  margin:     0;
  padding:    0;
}
/* Consistent vertical rhythm between rows. */
.shop-checkout .new-card-panel .form-row {
  margin-bottom: var(--space-4);
}
/* Field labels: sit on their own line just above the field, at the same size
   as the input text. Direct-child span only, so the nested "what's this?" in
   the CVC label stays inline. */
.shop-checkout .new-card-panel .form-row > label {
  display: block;
}
.shop-checkout .new-card-panel .form-row > label > span {
  display:       block;
  margin-bottom: var(--space-1);
  font-size:     var(--text-sm);
  color:         var(--ink);
}
/* CVC "what's this?" helper: keep it inline + quiet, not a block label. */
.shop-checkout .new-card-panel .whats-this {
  display:     inline;
  margin-left: var(--space-1);
  font-size:   var(--text-xs);
  color:       var(--ink-soft);
  cursor:      help;
}
/* The "Save these card details" row reads as one aligned line, not a stacked
   label. (Billing "Same as delivery address" is handled further down.) */
.shop-checkout .form-row.card-reuse {
  display:       flex;
  align-items:   center;
  gap:           var(--space-2);
  margin-bottom: 0;
}
.shop-checkout .form-row.card-reuse label {
  margin:    0;
  font-size: var(--text-sm);
}
/* Payment note: a quiet aside, set off with a hairline so it doesn't compete
   with the fields above it. */
.shop-checkout .payment-note-panel {
  margin-top:  var(--space-4);
  padding-top: var(--space-3);
  border-top:  1px solid var(--rule);
  font-size:   var(--text-sm);
  color:       var(--ink-soft);
  line-height: 1.5;
}
/* "Add card" sits clear of the note above it. */
.shop-checkout .new-card-panel .submit-btn {
  margin-top: var(--space-5);
}

/* Country / state dropdowns (class "text") in the address forms: match the
   text inputs so the whole form is one family. Applies to both this billing
   form and the Delivery Add Address form -- intentionally, for consistency. */
.shop-checkout select.text {
  font-family:   var(--font-body);
  font-size:     var(--text-sm);
  color:         var(--ink);
  background:    var(--surface);
  border:        1px solid var(--rule);
  border-radius: var(--radius);
  padding:       var(--space-1) var(--space-2);
}
.shop-checkout select.text:focus-visible {
  outline:        2px solid var(--accent);
  outline-offset: 1px;
  border-color:   var(--accent);
}

/* Billing Address block. The revealed cardholder-address form (shown when
   "Same as delivery address" is unchecked) gets the SAME section-light panel
   as the card-entry block above it, so the two read as a matched pair instead
   of a bare table jammed against the page edge. pnlCardholderAddress is
   Payment-only, so this can't reach the Delivery Add Address modal. */
.shop-checkout [id$="_pnlCardholderAddress"] {
  background:    var(--section-light);
  border-radius: var(--radius-lg);
  padding:       var(--space-6);
  max-width:     420px;
}
.shop-checkout [id$="_pnlAddressDisplay"] .tblAddress {
  border-collapse: separate;
  border-spacing:  0;
}
.shop-checkout [id$="_pnlAddressDisplay"] .tblAddress > tbody > tr > td {
  padding:        var(--space-1) var(--space-2);
  vertical-align: middle;
}
/* Label column sits flush with the panel's inner-left edge, with a clear gap
   before its field so the two columns aren't crunched together. */
.shop-checkout [id$="_pnlAddressDisplay"] .tblAddress > tbody > tr > td:first-child {
  padding-left:  0;
  padding-right: var(--space-3);
  white-space:   nowrap;
}
/* "(* Required data)" foot-note row: quiet it down, matching the other form. */
.shop-checkout [id$="_pnlAddressDisplay"] .tblAddress > tbody > tr:last-child td {
  color:     var(--ink-soft);
  font-size: var(--text-sm);
}
/* "Same as delivery address": align the checkbox with its label on one line. */
.shop-checkout [id$="_cbCardholderAddressSameAsDelivery"] {
  vertical-align: middle;
  margin-right:   var(--space-2);
}
.shop-checkout label[for$="_cbCardholderAddressSameAsDelivery"] {
  vertical-align: middle;
  font-size:      var(--text-sm);
}
/* Mobile: both panels drop their desktop max-width and tighten padding so the
   fixed-width Stripe boxes (card panel) have as much room as possible. */
@media (max-width: 720px) {
  .shop-checkout .new-card-panel,
  .shop-checkout [id$="_pnlCardholderAddress"] {
    max-width: 100%;
    padding:   var(--space-4);
  }
}
/* ---- v0.233 shop login choice page ------------------------------------- */
/* The ShopLogin step (shown to not-logged-in customers before Delivery)
   ships its two choice buttons -- "Returning Customer / Website Member"
   and "New Customer" -- stacked and centred, with "Back" centred below.
   Left-align them to sit under the Checkout heading + progress pills, put
   the two choices on one row, and drop "Back" onto its own line beneath.
   Scoped via the stable _pnlLoginControls id suffix (ShopLoginASCX), so no
   other checkout step is touched. The module's inline text-align:center
   needs !important to beat. */
.shop-checkout [id$="_pnlLoginControls"] > table,
.shop-checkout [id$="_pnlLoginControls"] > table > tbody > tr > td {
  text-align: left !important;
}
/* The empty spacer <p> between the choices and the Back row: zero it, the
   Back row carries its own margin-top below. */
.shop-checkout [id$="_pnlLoginControls"] > p {
  margin: 0;
}
/* Two choice buttons + the "or" inline on one row. #pnlWebsiteMember wraps
   the Returning Customer button in two nested divs (one centred w/ a
   padding-top) -- flatten both to inline-block and left-align. */
.shop-checkout [id$="_pnlWebsiteMember"],
.shop-checkout [id$="_pnlWebsiteMember"] > div {
  display:        inline-block;
  vertical-align: middle;
  padding-top:    0 !important;
  text-align:     left !important;
}
.shop-checkout [id$="_pnlLoginControls"] > table > tbody > tr > td > p {
  display:        inline-block;
  vertical-align: middle;
  margin:         0 var(--space-3);
  color:          var(--ink-soft);
}
.shop-checkout [id$="_pnlLoginControls"] #btnNewCustomer {
  vertical-align: middle;
}
/* "Back" (and the hidden "Create account") sit on their own line below,
   left-aligned. */
.shop-checkout [id$="_pnlLoginControls"] > div {
  text-align: left !important;
  margin-top: var(--space-6);
}
/* Mobile: stack the two choices, "or" between, each on its own line. */
@media (max-width: 720px) {
  .shop-checkout [id$="_pnlWebsiteMember"],
  .shop-checkout [id$="_pnlLoginControls"] #btnNewCustomer {
    display: block;
  }
  .shop-checkout [id$="_pnlLoginControls"] > table > tbody > tr > td > p {
    display: block;
    margin:  var(--space-2) 0;
  }
}
/* ---- v0.234 checkout header spacing + login lead-in -------------------- */
/* (a) More air between the "Checkout" title and the progress pills. The
   module stamps an inline margin-bottom:10px on the <h1>, which beats the
   .shop-checkout h1 rule earlier -- !important to override. Shared header,
   so this applies to every checkout step and keeps the rhythm consistent. */
.shop-checkout h1 { margin-bottom: var(--space-6) !important; }
/* (b) Login choice page only: push the choice block down off the pills and
   introduce a lead-in line above the buttons (injected via ::before since
   the module output isn't hand-authorable). */
.shop-checkout [id$="_pnlLoginControls"] {
  margin-top: var(--space-6);
}
.shop-checkout [id$="_pnlLoginControls"]::before {
  content:     "Please choose one of the following options:";
  display:     block;
  font-family: var(--font-body);
  font-size:   var(--text-base);
  color:       var(--ink);
  margin:      0 0 var(--space-6);
}
/* =========================================================================
   CONFIRM DIALOG  --  .tab-confirm (centred; replaces the native confirm())
   ========================================================================= */
.tab-confirm {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-4);
  background: rgba(0, 0, 0, 0.45);
}
.tab-confirm__dialog {
  background:    var(--surface);
  border-radius: var(--radius-lg);
  padding:       var(--space-8);
  max-width:     calc(28 * var(--shop-rem, 1rem)); width: 100%;
  box-shadow:    0 20px 50px rgba(0, 0, 0, 0.25);
}
.tab-confirm__msg {
  margin:      0 0 var(--space-6);
  font-family: var(--font-body);
  font-size:   var(--text-base);
  color:       var(--ink);
  line-height: 1.5;
}
.tab-confirm__actions { display: flex; justify-content: flex-end; gap: var(--space-3); }
.tab-confirm__btn {
  font-family: var(--font-body); font-size: var(--text-sm); font-weight: 500;
  border-radius: 999px; padding: var(--space-2) var(--space-5);
  cursor: pointer; border: 1px solid transparent;
  transition: opacity var(--transition), border-color var(--transition), color var(--transition);
}
.tab-confirm__btn--ghost  { background: transparent; color: var(--ink); border-color: var(--rule); }
.tab-confirm__btn--ghost:hover  { border-color: var(--ink); }
.tab-confirm__btn--danger { background: var(--danger); color: var(--accent-ink); }
.tab-confirm__btn--danger:hover { opacity: 0.88; }

/* =========================================================================
   SLIDE-OUT PANEL  --  .tab-panel (right-hand sheet)
   -------------------------------------------------------------------------
   Reusable right-hand slide-out. Currently used for the shop Terms &
   Conditions (item injected into the Shop menu by setupShopTermsMenu(), which
   fetches the T&Cs content from /Shop/TermsAndConditions.aspx and renders it
   here). z-index sits above Hubb's jQuery-UI dialogs (100001).
   ========================================================================= */
.tab-panel { position: fixed; inset: 0; z-index: 100050; }
.tab-panel[hidden] { display: none; }
.tab-panel__backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0; transition: opacity var(--transition);
}
.tab-panel.is-open .tab-panel__backdrop { opacity: 1; }
.tab-panel__sheet {
  position: absolute; top: 0; right: 0; height: 100%;
  width: min(calc(36 * var(--shop-rem, 1rem)), 92vw);
  background: var(--surface);
  display: flex; flex-direction: column;
  box-shadow: -16px 0 48px -24px rgba(0, 0, 0, 0.45);
  transform: translateX(100%);
  transition: transform var(--transition) var(--ease-out-soft, ease);
}
.tab-panel.is-open .tab-panel__sheet { transform: translateX(0); }
.tab-panel__head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--rule);
  flex-shrink: 0;
}
.tab-panel__title { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: var(--text-xl); color: var(--ink); }
.tab-panel__close {
  display: inline-flex; align-items: center; justify-content: center;
  width: calc(2.25 * var(--shop-rem, 1rem)); height: calc(2.25 * var(--shop-rem, 1rem)); flex-shrink: 0;
  border: 1px solid var(--rule); border-radius: 999px;
  background: transparent; color: var(--ink); font-size: calc(1.5 * var(--shop-rem, 1rem)); line-height: 1;
  cursor: pointer; transition: border-color var(--transition);
}
.tab-panel__close:hover { border-color: var(--ink); }
.tab-panel__body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.tab-panel__doc { padding: var(--space-6); }
.tab-panel__doc blockquote { margin: 0; }   /* neutralise the system page's default blockquote indent */
.tab-panel__loading { color: var(--ink-soft); }
body.tab-panel-open { overflow: hidden; }   /* scroll lock while the sheet is open */
@media (prefers-reduced-motion: reduce) {
  .tab-panel__backdrop, .tab-panel__sheet { transition: none; }
}
@media (max-width: 720px) {
  .tab-panel__sheet { width: 100vw; }
}
/* v0.165: was flex: 1, which stretched the input across the whole
   strip minus the basket pill -- a runway on wide screens (Adam:
   "really long - too long?"). Capped at 440px: roughly 40
   characters of query, matching the compact field on the reference
   site, and an input's width should signal the expected input
   length. Still shrinkable when space tightens; the 720px mobile
   rule overrides flex-basis to 100% for the stacked layout. */
.shop-utility__search { flex: 0 1 440px; min-width: 0; }
.shop-utility__basket { flex-shrink: 0; margin-left: auto; }

/* Flatten the search module's table layout so the input and Go
   button become direct flex items. display:contents removes the
   table boxes from layout entirely; supported in all target
   browsers. The module wrapper div is classless (see header note)
   so we scope from our own wrapper and flatten structurally. */
.shop-utility__search > div {
  display:     flex;
  align-items: center;
  gap:         var(--space-3);
}
.shop-utility__search table,
.shop-utility__search tbody,
.shop-utility__search tr,
.shop-utility__search td {
  display: contents;
}
/* !important: Hubb's inline updateAdvancedSearchDisplay() script
   stamps display:table-row as an INLINE style on rows carrying a
   mode attribute; only !important beats an inline style. */
/* Only the simple-search row is shown; the advanced rows (Title, By,
   Code/ISBN/ISMN, Type) carry mode="advanced" with an inline display:none
   that our previous blanket tr[mode] !important rule was overriding back to
   visible -- which is why a category with an item type leaked the advanced
   fields while the homepage (no advanced rows) looked clean. Keep simple
   flattened, force advanced hidden. !important beats Hubb's inline display. */
.shop-utility__search tr[mode="simple"] {
  display: contents !important;
}
.shop-utility__search tr[mode="advanced"] {
  display: none !important;
}
/* Hide the secondary search controls: the "In:" category dropdown
   row and the "Search sub-categories" checkbox row. Their defaults
   (current category + subcategories ticked) mean "search the whole
   shop" on the landing page, which is exactly what the single
   search box should do -- so nothing of value is lost, and the bar
   reads as one clean input + Go like the reference design.
   :has() in DESCENDANT form deliberately (Hubb wraps things; the
   direct-child form has burned us before). !important because these
   rows must also beat the display:contents flatten rules above and
   any future inline display Hubb stamps on them. */
.shop-utility__search tr:has(select),
.shop-utility__search tr:has(input[type="checkbox"]) {
  display: none !important;
}
/* Hide the "Find:" label cell (width attr is its only hook -- the
   markup is attribute-soup, there are no classes). The input gets
   aria-label + placeholder from setupShopSearch() in script.js,
   which is a net a11y improvement over a bare table-cell label.
   The width=60 cell is an empty spacer in the Go table. */
.shop-utility__search td[width="32"],
.shop-utility__search td[width="60"] {
  display: none;
}

/* The text input -- Tabernacle field styling.
   !important on width: ships with inline style="width:100%", which
   fights the flex sizing we want. */
.shop-utility__search input[type="text"] {
  width:         auto !important;
  flex:          1;
  min-width:     0;
  font-family:   var(--font-body);
  font-size:     var(--text-sm);
  color:         var(--ink);
  background:    var(--surface);
  border:        1px solid var(--rule);
  border-radius: 999px;
  padding:       var(--space-2) var(--space-4);
  transition:    border-color var(--transition);
}
.shop-utility__search input[type="text"]:focus {
  outline:      none;
  border-color: var(--ink);
}
.shop-utility__search input[type="text"]::placeholder {
  color: var(--ink-soft);
}

/* The Go button -- compact ghost pill matching .section-link
   language. !important on width: ships with inline
   style="width:40px" which crushes the label once padding applies. */
.shop-utility__search input[type="submit"],
.shop-utility__search input[type="button"] {
  width:          auto !important;
  font-family:    var(--font-body);
  font-size:      var(--text-xs);
  font-weight:    700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color:          var(--ink);
  /* Surface fill (not transparent): a ghost pill disappears against
     the tinted band; white-on-tint matches the input beside it. */
  background:     var(--surface);
  border:         1px solid var(--rule);
  border-radius:  999px;
  padding:        var(--space-2) var(--space-5);
  cursor:         pointer;
  transition:     background var(--transition), border-color var(--transition);
}
.shop-utility__search input[type="submit"]:hover,
.shop-utility__search input[type="button"]:hover {
  background:   var(--bg);
  border-color: var(--ink-soft);
}
.shop-utility__search input[type="submit"]:focus-visible,
.shop-utility__search input[type="button"]:focus-visible {
  outline:        2px solid var(--accent);
  outline-offset: 2px;
}

/* Basket -- setupShopBasket() in script.js parses the module output
   (empty: a text-only div; with items: a layout table of title/
   price/qty rows + total + a Checkout input) and rebuilds it as the
   compact .shop-basket-pill below: basket icon + "N items" + total,
   the whole pill linking to checkout. The raw output is hidden ONLY
   after a successful rebuild (the shop-basket--enhanced class), so
   a JS failure leaves a small but functional basket table. v0.166,
   replacing the v0.163 pill which dumped Hubb's full line-item
   table into a five-word pill when anything was in the basket. */
.shop-basket--enhanced > div {
  display: none;
}
/* No-JS fallback: keep the raw output small and unobtrusive.
   v1.3: the slot is as tall as the pill from the start (one line of
   text plus the pill's padding and border), so swapping the pill in
   doesn't push the search and the shop below it down (Lighthouse
   layout shift 0.135 on a phone, 0.014 on desktop). */
.shop-utility__basket {
  font-size:   var(--text-xs);
  display:     flex;
  align-items: center;
  min-height:  calc(1lh + 2 * var(--space-2) + 2px);
}
.shop-utility__basket a {
  color: var(--ink);
}

/* The compact pill (JS-built <a>, or <span> when empty) */
.shop-basket-pill {
  display:         inline-flex;
  align-items:     center;
  gap:             var(--space-2);
  font-size:       var(--text-xs);
  font-weight:     700;
  letter-spacing:  0.12em;
  text-transform:  uppercase;
  color:           var(--ink);
  text-decoration: none;
  background:      var(--surface);
  border:          1px solid var(--rule);
  border-radius:   999px;
  padding:         var(--space-2) var(--space-5);
  white-space:     nowrap;
  transition:      border-color var(--transition);
}
a.shop-basket-pill:hover {
  border-color: var(--ink-soft);
}
a.shop-basket-pill:focus-visible {
  outline:        2px solid var(--accent);
  outline-offset: 2px;
}
.shop-basket-pill--empty {
  color: var(--ink-soft);
}
/* Basket glyph -- inline SVG mask so it recolours with the theme
   via currentColor, same technique as the footer social icons. */
.shop-basket-pill::before {
  content:            "";
  width:              16px;
  height:             16px;
  flex-shrink:        0;
  background-color:   currentColor;
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M8 7V6a4 4 0 1 1 8 0v1h3.6a1 1 0 0 1 1 1.1l-1.2 12A2 2 0 0 1 17.4 22H6.6a2 2 0 0 1-2-1.9L3.4 8.1A1 1 0 0 1 4.4 7H8zm2 0h4V6a2 2 0 1 0-4 0v1z'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M8 7V6a4 4 0 1 1 8 0v1h3.6a1 1 0 0 1 1 1.1l-1.2 12A2 2 0 0 1 17.4 22H6.6a2 2 0 0 1-2-1.9L3.4 8.1A1 1 0 0 1 4.4 7H8zm2 0h4V6a2 2 0 1 0-4 0v1z'/></svg>");
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-size:   contain;
          mask-size:   contain;
}

/* ---- Two-column shop layout: sidebar + content -------------------------
   Joins the .slice base rule for container width/gutters; the grid
   is this wrapper's own concern. 280px sidebar matches the
   reference proportions and holds category names comfortably. */
.shop-layout {
  display:               grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap:                   var(--space-12);
  align-items:           start;
  /* Reserve the breadcrumb zone so the layout starts level with the
     category pages even when no breadcrumb is shown (the shop homepage). */
  margin-top:            var(--shop-crumb-zone);
}

/* ---- Sidebar: boxed category menu --------------------------------------- */
.shop-sidebar {
  border:        1px solid var(--rule);
  border-radius: var(--radius);
  background:    var(--surface);
  overflow:      hidden;   /* clip child hover fills to the radius */
  /* Sticky within the column so categories stay reachable while
     scrolling long product listings on category pages. The offset
     reads the header's REAL rendered height, published as
     --site-header-height by initStickyHeader() in script.js --
     v0.166's hardcoded 96px let the panel slide behind the menu
     whenever the header was in its taller (uncompacted) state,
     because the header height varies with compaction and viewport.
     96px fallback covers the no-JS case. */
  position:      sticky;
  top:           calc(var(--site-header-height, 96px) + var(--space-4));
}

.shop-sidebar__title {
  font-family:    var(--font-body);
  font-size:      var(--text-xs);
  font-weight:    700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color:          var(--ink);
  margin:         0;
  padding:        var(--space-4) var(--space-5);
  border-bottom:  1px solid var(--rule);
  background:     var(--accent-soft);
}

/* Category list -- module renders ul#ShopCatNavRoot inside a
   classless div; scope from our nav wrapper. Hairline separators
   between items, full-row hover fill. */
.shop-cat-nav ul {
  list-style: none;
  margin:     0;
  padding:    0;
}
.shop-cat-nav li {
  margin: 0;
}
.shop-cat-nav li + li {
  border-top: 1px solid var(--rule);
}
.shop-cat-nav a {
  display:         inline;
  color:           inherit;          /* row colour; the <li> is the styled row */
  text-decoration: none;
  transition:      color var(--transition);
}
.shop-cat-nav a:hover {
  color: var(--accent);
}
.shop-cat-nav a:focus-visible {
  outline:        2px solid var(--accent);
  outline-offset: -2px;   /* inward -- the row is flush to the panel edge */
}
/* Nested subcategories (Town is flat today; the Baptist install
   proves Hubb nests these when categories deepen): indent and step
   down, no separator doubling. */
.shop-cat-nav ul ul {
  border-top: 1px solid var(--rule);
}
.shop-cat-nav ul ul li {
  border-top: 0;
}
.shop-cat-nav ul ul a {
  padding-left: var(--space-8);
  font-size:    var(--text-xs);
  color:        var(--ink-soft);
}

/* ---- Category nav: the ACTUAL Town render -------------------------------
   The module renders classless divs (no <ul>): each category is
   div[style="margin-left:Npx"] > li, where the name is an <a class="subnav">
   followed by a "(n)" count as a plain text node. The CURRENT category's link
   is additionally wrapped in <b>. We neutralise the inline indent, make the
   <li> the padded row and the link inline (so name + count stay on one line),
   add full-row hover, hairline separators (each <li> sits in its own div, so
   li+li never matches -- we separate the wrapper divs), and tint the current
   category (the row whose link is wrapped in <b>) as "you are here". */
.shop-cat-nav div[style*="margin-left"] { margin-left: 0 !important; }
.shop-cat-nav div[style*="margin-left"] + div[style*="margin-left"] {
  border-top: 1px solid var(--rule);
}
.shop-cat-nav li {
  list-style:  none;
  display:     block;
  margin:      0;
  padding:     var(--space-3) var(--space-5);
  font-family: var(--font-body);
  font-size:   var(--text-sm);
  color:       var(--ink);
}
.shop-cat-nav li:hover  { background: var(--accent-soft); }
.shop-cat-nav li:has(b) { background: var(--accent-soft); }   /* current category */
.shop-cat-nav li b { font-weight: 700; }

/* ---- Content column ------------------------------------------------------ */
.shop-content {
  display:        flex;
  flex-direction: column;
  gap:            var(--space-12);
  min-width:      0;   /* let grid children shrink; stops wide tables
                          inside module output blowing out the column */
}

/* Section headings inside the content column: the shared
   .shop-section__heading rule (centred, 32-52px, accent rule below)
   is homepage-scale. Next to a sidebar the headings belong to the
   column, so: left-aligned, one step down, rule snaps left. */
.shop-content .shop-section__heading {
  text-align: left;
  font-size:  var(--text-xl);
  margin:     0 0 var(--space-6);
}
.shop-content .shop-section__heading::after {
  margin-inline: 0;   /* accent rule left-aligned under the text */
}
.shop-content .slice__head--centred {
  text-align:   left;
  margin-block: 0 var(--space-6);
}

/* ---- Featured Categories: image tiles (3-up in the column) -------------- */
.shop_featured_categories .gallery_ul {
  display:               grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:                   var(--space-6);
  list-style:            none;
  margin:                0;
  padding:               0;
}
.shop_featured_categories .gallery_li {
  position:      relative;
  overflow:      hidden;
  border-radius: var(--radius);
  aspect-ratio:  16 / 10;
  background:    var(--ink);
  box-shadow:    0 4px 12px -4px rgba(26, 22, 18, 0.15);
  transition:    box-shadow var(--transition);
}
.shop_featured_categories .gallery_li:hover {
  box-shadow: 0 12px 32px -8px rgba(26, 22, 18, 0.3);
}
.shop_featured_categories .gallery_li > a {
  display:         block;
  position:        relative;
  width:           100%;
  height:          100%;
  text-decoration: none;
  color:           #FFFFFF;
}
.shop_featured_categories .gallery_li img {
  width:      100%;
  height:     100%;
  object-fit: cover;
  display:    block;
  transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}
.shop_featured_categories .gallery_li > a:hover img {
  transform: scale(1.06);
}
.shop_featured_categories .gallery_li > a::after {
  content:        "";
  position:       absolute;
  inset:          0;
  background:     linear-gradient(
                    to top,
                    rgba(26, 22, 18, 0.85) 0%,
                    rgba(26, 22, 18, 0.35) 35%,
                    rgba(26, 22, 18, 0)    65%
                  );
  pointer-events: none;
  z-index:        1;
}
/* Caption reuses the shared .explore-church__caption element the JS
   builds; title steps down for the narrower in-column tiles. */
.shop_featured_categories .explore-church__title {
  font-size: var(--text-lg);
}
.shop_featured_categories .gallery_li > a:focus-visible {
  outline:        3px solid var(--accent);
  outline-offset: 3px;
}

/* ---- Featured Products: hotpicks rebuilt as cards -----------------------
   setupShopHotpicks() in script.js parses the module output inside
   .shop-hotpicks and rebuilds it as the .shop-cards grid, then adds
   `shop-hotpicks--enhanced` to the wrapper. The raw output is hidden
   ONLY under that class -- a JS failure leaves products visible.
   NOTE: parser written against the Baptist install's hotpick markup;
   Town's hotpick output is UNVERIFIED until products are flagged as
   hotpicks (the module currently renders empty on Town). */
.shop-hotpicks--enhanced > :not(.shop-cards) {
  display: none;
}

/* ---- Category page: Items List rebuilt as cards ------------------------
   setupShopItems() parses the Items List output inside .shop-items and
   rebuilds it as the same .shop-cards grid used for Hotpicks, then adds
   shop-items--enhanced. The raw table output (including the Order By
   picker) is hidden ONLY under that class -- a JS failure leaves the real
   products visible and on sale. The grid reuses every .shop-card and
   .shop-cards rule above, including the responsive 3->2->1 breakpoints. */
.shop-items--enhanced > :not(.shop-cards) { display: none; }
/* ---- Search results: module output rebuilt as cards --------------------
   setupShopResults() reuses buildShopItemCard (same mini-layout hooks as the
   Items List) to rebuild each result as a .shop-card, prepends a clean count
   line in place of the duplicated "Results X-Y of Z" chrome, and hides the
   raw output under .shop-results--enhanced. A parse failure or zero results
   leaves the raw output visible (real products stay reachable). */
.shop-results--enhanced > :not(.shop-cards):not(.shop-results__count) { display: none; }
.shop-results__count {
  margin:      0 0 var(--space-6);
  font-family: var(--font-body);
  font-size:   var(--text-sm);
  color:       var(--ink-soft);
}
/* The Add-to-basket control is a <button> forwarding its click to Hubb's
   hidden submit, so normalise native button rendering -- the .shop-card__buy
   <a> rules supply the colour, border, shape and hover. */
button.shop-card__buy {
  appearance:         none;
  -webkit-appearance: none;
  background:         transparent;
  font-family:        var(--font-body);
  cursor:             pointer;
}


.shop-cards {
  display:               grid;
  /* 3-up: the content column is ~1100px wide at full container
     (1600 minus sidebar and gap), so 3 cards of ~340px each. */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:                   var(--space-8);
}

.shop-card {
  display:        flex;
  flex-direction: column;
  position:       relative;   /* anchor for the stretched title link */
  background:     var(--surface);
  border:         1px solid var(--rule);
  border-radius:  var(--radius);
  overflow:       hidden;
  transition:     box-shadow var(--transition);
}
.shop-card:hover {
  box-shadow: 0 12px 32px -8px rgba(26, 22, 18, 0.2);
}

/* Cover stage -- fixed-height panel, image CONTAINED not cropped.
   Product shots (book covers especially) carry text and must never
   be cropped the way photographic tiles are. */
.shop-card__media {
  display:         flex;
  align-items:     center;
  justify-content: center;
  height:          240px;
  padding:         var(--space-6);
  background:      var(--accent-soft);
}
.shop-card__media img {
  max-width:  100%;
  max-height: 100%;
  width:      auto;
  height:     auto;
  object-fit: contain;
  display:    block;
  box-shadow: 0 6px 16px -6px rgba(26, 22, 18, 0.35);
}

.shop-card__body {
  display:        flex;
  flex-direction: column;
  gap:            var(--space-2);
  padding:        var(--space-5);
  flex:           1;   /* equal-height cards: footer rows align */
}

.shop-card__title {
  font-family:    var(--font-display);
  font-size:      var(--text-lg);
  font-weight:    500;
  line-height:    1.25;
  letter-spacing: -0.01em;
  margin:         0;
}
.shop-card__title a {
  color:           var(--ink);
  text-decoration: none;
}
/* No hover underline on card titles -- keeps the minimal-hover aesthetic and
   stays consistent across category + cross-sell cards (the whole card links). */
/* Stretched-link: the whole card is the click target for the product
   page; the Buy link re-raises itself above the overlay. */
.shop-card__title a::after {
  content:  "";
  position: absolute;
  inset:    0;
}

.shop-card__author {
  font-size: var(--text-sm);
  color:     var(--ink-soft);
  margin:    0;
}

.shop-card__desc {
  font-size:   var(--text-sm);
  color:       var(--ink-soft);
  line-height: 1.5;
  margin:      0;
  /* Clamp long blurbs so card heights stay rhythmic; full text is
     on the product page one click away. */
  display:            -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow:           hidden;
}

/* Footer row: price left, Buy pill right; pinned to card bottom */
.shop-card__footer {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  gap:             var(--space-3);
  margin-top:      auto;
  padding-top:     var(--space-3);
}
.shop-card__price {
  font-size:   var(--text-base);
  font-weight: 700;
  color:       var(--ink);
}
.shop-card__buy {
  position:        relative;  /* sits above the stretched-link overlay */
  z-index:         1;
  font-size:       var(--text-xs);
  font-weight:     700;
  letter-spacing:  0.12em;
  text-transform:  uppercase;
  color:           var(--ink);
  text-decoration: none;
  border:          1px solid var(--rule);
  border-radius:   999px;
  padding:         var(--space-2) var(--space-5);
  transition:      background var(--transition), border-color var(--transition);
}
.shop-card__buy:hover {
  background:   var(--accent-soft);
  border-color: var(--ink-soft);
}
.shop-card__buy:focus-visible,
.shop-card__title a:focus-visible {
  outline:        2px solid var(--accent);
  outline-offset: 2px;
}

/* ---- Shop info article ---------------------------------------------------
   The Article module (CSS Class: content_article) reuses internal-
   page prose styling. Shop-context adjustments: hide the article's
   date stamp (delivery info isn't dated editorial), and unwind the
   standalone-page geometry -- .content_article's 820px cap + auto
   margins + gutter padding + 64px block margins are right when the
   article IS the page, but inside the shop content column they
   centre the prose at a visible indent (Adam's side-by-side
   screenshot vs the reference: "Delivery Costs" started well right
   of "Featured Categories"). Here the column provides the width,
   spacing rhythm, and gutters; the article just fills it. */
.slice--shop-info .content_article {
  max-width:      none;
  margin:         0;
  padding-inline: 0;
}
.slice--shop-info .content_article .author {
  display: none;
}


/* =========================================================================
   SHOP RESPONSIVE RULES  --  from Tabernacle style.css section 4
   ========================================================================= */
@media (max-width: 720px) {
  /* ---- Shop utility bar: stack on phones. Search goes full-width on
     its own row (the primary action); crumbs + basket share the row
     above it. ---- */
  .shop-utility {
    flex-wrap: wrap;
    gap:       var(--space-3) var(--space-4);
  }
  .shop-utility__crumbs { order: 1; }
  .shop-utility__basket { order: 2; }
  .shop-utility__search { order: 3; flex-basis: 100%; }

  /* ---- Shop product cards: shorter cover stage so a single-column
     card doesn't push its text below the fold. ---- */
  .shop-card__media { height: 200px; }
}

@media (max-width: 1024px) {
  .shop-cards { grid-template-columns: repeat(2, 1fr); }
  /* Shop featured-categories: 3-up needs ~340px per tile; below 1024
     drop to 2-up (the third tile wraps to a second row). */
  .shop_featured_categories .gallery_ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Shop sidebar layout: stack -- categories panel on top, content
     below (matches the reference site's mobile behaviour). Sticky
     comes off; a sticky full-width panel would cover the content. */
  .shop-layout { grid-template-columns: 1fr; gap: var(--space-8); }
  .shop-sidebar { position: static; }
  /* Checkout action buttons stack full-width on phones. */
  .shop-checkout [id$="_pnlButtons"] { flex-direction: column; align-items: stretch; }
  .shop-checkout [id$="_pnlButtons"] input[type="submit"] { width: 100%; }
  .shop-checkout input[name$="btnSaveDraft"] { order: 0; }   /* Checkout Now first on phones */
}

@media (max-width: 540px) {
  .shop_featured_categories .gallery_ul,
  .shop-cards { grid-template-columns: 1fr; }
  /* Product detail collapses to a single column (image over buy box). */
  .shop-item {
    grid-template-columns: 1fr;
    grid-template-areas: "gallery" "buy" "detail";
    gap: var(--space-6);
  }
  .shop-item__gallery { max-width: 300px; }
}

/* =========================================================================
   3.29  SHOP POLISH  --  v0.280 (18 November 2026)
   -------------------------------------------------------------------------
   One block of shop UX fixes from a full walk of the journey (shop home,
   category, product, basket, delivery, payment) at desktop and 390px.
   Kept together, after everything else, so the set is easy to review and
   to fold into sections 3.25 to 3.28 later. Every rule scopes through our
   own wrapper classes or the stable Hubb hooks those sections already use.
   ========================================================================= */

/* ---- Category sidebar ---------------------------------------------------
   (a) The whole row is the link, not just the word (the link's ::after
   stretches over its padded <li>). (b) The "(n)" item counts are bare text
   nodes, so mute the row and re-darken the name: counts read as secondary. */
.shop-cat-nav li { position: relative; color: var(--ink-soft); }
.shop-cat-nav li a::after { content: ""; position: absolute; inset: 0; }
.shop-cat-nav li a,
.shop-cat-nav li b { color: var(--ink); }
.shop-cat-nav li a:hover { color: var(--accent); }
/* The shop home renders the list as ul#ShopCatNavRoot instead, marking the
   page being shown with li.ShopCatNavDisplayed: give it the same
   "you are here" tint as the <b> marker on category pages. */
.shop-cat-nav li.ShopCatNavDisplayed { background: var(--accent-soft); }
.shop-cat-nav li.ShopCatNavDisplayed > a { font-weight: 700; }

/* ---- Category page title ------------------------------------------------
   addShopCategoryHeading() (script.js v0.280) adds the category name as the
   page's h1, plus the category description when Hubb has one. */
.shop-page__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-xl);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 calc(-1 * var(--space-6));   /* pulls the products up: ~24px under the title, not the column's 48px gap */
}
.shop-page__intro {
  margin: calc(-1 * var(--space-3)) 0 calc(-1 * var(--space-6));   /* snug under the title, ~24px above the products */
  max-width: 68ch;
  font-size: var(--text-sm);
  color: var(--ink-soft);
  line-height: 1.6;
}

/* ---- Product cards: price label + one-line buy pill ----------------------
   tidyShopLabels() splits "Suggested price: GBP 5.00" into a small label over
   the figure; the pill never wraps its label onto two lines. */
.shop-card__price-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}
.shop-card__buy { white-space: nowrap; }

/* An empty Items List or Search Results wrapper still took a 48px flex gap
   under the product grid; drop it when the module rendered nothing. */
.shop-content > :is(.shop-items, .shop-results):not(:has(*)) { display: none; }

/* ---- Shop info article (delivery and payment notes, shop home) ---------
   Was full-size body prose running the width of the column. Now a quiet
   information panel at a smaller size, so it supports the products rather
   than competing with them. */
.slice--shop-info .content_article {
  background: var(--section-light);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-8);
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--ink);
}
.slice--shop-info .content_article :is(.ArticleBody, p, li, td, span) { font-size: inherit; line-height: inherit; }
.slice--shop-info .content_article .ArticleRotaSignupLink:not(:has(*)) { display: none; }   /* empty, but its 32px top margin padded the panel's foot */
.slice--shop-info .content_article :is(h1, h2, h3, h4) {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 700;
  margin: var(--space-5) 0 var(--space-2);
}
.slice--shop-info .content_article > :first-child,
.slice--shop-info .content_article :is(h1, h2, h3, h4):first-child { margin-top: 0; }
.slice--shop-info .content_article p { margin: 0 0 var(--space-3); }
.slice--shop-info .content_article p:last-child { margin-bottom: 0; }

/* ---- Product page -------------------------------------------------------
   Bigger product shot; price leads (stock line drops beneath it, and
   tidyShopLabels() strips Hubb's "Price now:" prefix); Qty, field and
   button share one height and baseline, wishlist link on its own line. */
.shop-item { grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: var(--space-10); }
.shop-item__gallery a > img { max-height: 440px; }
.shop-item__price td {
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: var(--space-1);
}
.shop-item__price td > div { margin-bottom: 0; }
.shop-item__price .detailPrice {
  font-family: var(--font-body);
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.shop-item__price .detailPrice b { font-weight: 700; }
.shop-item__actions td {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  line-height: normal;
  font-size: var(--text-sm);
  color: var(--ink-soft);
}
.shop-item__actions input[type="text"],
.shop-item__actions input[type="submit"] {
  box-sizing: border-box;
  min-height: 44px;
  margin: 0;
}
.shop-item__actions input[type="text"] { text-align: center; }
.shop-item__actions input[type="submit"] {
  font-weight: 600 !important;   /* beat the module's inline font-weight */
  padding: var(--space-2) var(--space-8) !important;
}
.shop-item__actions a { flex-basis: 100%; margin-top: var(--space-1); text-align: left; }
.shop-item__actions .shop-added { margin-left: 0; }

/* ---- Checkout: step labels and primary buttons ------------------------- */
.shop-checkout [id$="_pnlButtons"] input[type="submit"] { min-height: 44px; padding-inline: var(--space-6); }

/* ---- Checkout step pills: completed steps link back ---------------------
   linkCheckoutSteps() wraps each step before the current one in a link.
   Done steps read as clickable: white pill with a hairline, a tick, and an
   ink outline on hover. Steps still ahead keep the flat grey label. */
.shop-checkout a.shop-step-link { display: inline-block; text-decoration: none; border-radius: 999px; }
.shop-checkout a.shop-step-link .CartProgressFaded {
  color: var(--ink);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--rule);
  cursor: pointer;
  transition: box-shadow var(--transition);
}
.shop-checkout a.shop-step-link .CartProgressFaded::before { content: "\2713"; margin-right: 0.4em; }
.shop-checkout a.shop-step-link:hover .CartProgressFaded { box-shadow: inset 0 0 0 1px var(--ink); }
.shop-checkout a.shop-step-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- Delivery step ------------------------------------------------------
   Smaller, tidier text throughout (addresses were full body size, seven
   tall lines each), and each saved address becomes a selectable card: white
   on the grey panel, name in bold, the chosen one outlined in ink. The
   rows stay a table (border-spacing makes the gaps between cards), so the
   radios and postbacks are untouched. */
.shop-checkout .delivery-container { font-size: var(--text-sm); line-height: 1.5; }
.shop-checkout .delivery-container :is(td, label, span, b, a) { font-size: inherit; }
.shop-checkout .delivery-container h2 { font-size: var(--text-lg); }
.shop-checkout .delivery-container .AddressList_AddressTable:has(label[for*="_address_rb_"]) {
  border-spacing: 0 var(--space-2);
  margin-top: calc(-1 * var(--space-2));
}
.shop-checkout .delivery-container .AddressList_AddressTable > tbody > tr:has(label[for*="_address_rb_"]) > td {
  background: var(--surface);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: var(--space-3) var(--space-4);
  vertical-align: top;
  transition: border-color var(--transition);
}
.shop-checkout .delivery-container .AddressList_AddressTable > tbody > tr:has(label[for*="_address_rb_"]) > td:first-child {
  border-left: 1px solid var(--rule);
  border-radius: var(--radius) 0 0 var(--radius);
  padding-right: var(--space-1);
}
/* Each row ships an empty third cell as a spacer, which squeezed the address
   cell to its longest word. Drop the spacer; the address cell takes the width. */
.shop-checkout .delivery-container .AddressList_AddressTable > tbody > tr:has(label[for*="_address_rb_"]) > td:not(:has(*)) { display: none; }
.shop-checkout .delivery-container .AddressList_AddressTable > tbody > tr:has(label[for*="_address_rb_"]) > td:has(> label) {
  border-right: 1px solid var(--rule);
  border-radius: 0 var(--radius) var(--radius) 0;
  width: 100%;
}
.shop-checkout .delivery-container .AddressList_AddressTable > tbody > tr:has(label[for*="_address_rb_"]):has(input:checked) > td {
  border-color: var(--ink);
}
.shop-checkout .delivery-container .AddressList_AddressTable > tbody > tr:hover:has(label[for*="_address_rb_"]):not(:has(input:checked)) > td {
  border-color: var(--ink-soft);
}
.shop-checkout .delivery-container label[for*="_address_rb_"] {
  display: block;
  line-height: 1.45;
  color: var(--ink-soft);
}
.shop-checkout .delivery-container label[for*="_address_rb_"]::first-line { font-weight: 600; color: var(--ink); }
.shop-checkout .shop-address__name { display: block; font-weight: 600; color: var(--ink); }   /* tidyShopLabels() puts the name on its own line, the rest comma-joined */
.shop-checkout .delivery-container input[type="radio"] { accent-color: var(--accent); margin-top: 3px; }
.shop-checkout .delivery-container select { max-width: 100%; }

/* ---- Delivery step: right-hand card as an order summary ----------------
   Delivery method: label above a full-width dropdown, dispatch note under it
   in small print. Order summary: tidyDeliverySummary() (script.js v0.280)
   rebuilds the totals as label | amount rows; Total to pay sits under a
   hairline, bold and a step larger; the gift option becomes a proper
   checkbox label with its hint beneath. */
.shop-checkout .delivery-container > tbody > tr > td + td > table:first-of-type,
.shop-checkout .delivery-container > tbody > tr > td + td > table:first-of-type > tbody,
.shop-checkout .delivery-container > tbody > tr > td + td > table:first-of-type > tbody > tr,
.shop-checkout .delivery-container > tbody > tr > td + td > table:first-of-type > tbody > tr > td {
  display: block;
  width: auto;
  padding: 0;
}
.shop-checkout .delivery-container > tbody > tr > td + td > table:first-of-type > tbody > tr + tr { margin-top: var(--space-4); }
.shop-checkout .delivery-container > tbody > tr > td + td > table:first-of-type td:first-child {
  margin-bottom: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.shop-checkout .delivery-container > tbody > tr > td + td > table:first-of-type select {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: var(--space-2) calc(2.5 * var(--shop-rem, 1rem)) var(--space-2) var(--space-3);
  background-color: var(--surface);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235A5A5A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right calc(0.85 * var(--shop-rem, 1rem)) center;
  background-size: 16px;
  font-size: var(--text-sm);
}
.shop-checkout .delivery-container > tbody > tr > td + td > table:first-of-type td > span { display: block; margin-top: var(--space-2); font-size: var(--text-xs); color: var(--ink-soft); }
.shop-checkout .delivery-container > tbody > tr > td + td > table:first-of-type td > span > br:first-child { display: none; }
.shop-checkout .delivery-container > tbody > tr > td + td > p:empty { display: none; }
.shop-checkout .delivery-container > tbody > tr > td + td > table:first-of-type + p + h2,
.shop-checkout .delivery-container > tbody > tr > td + td > table:first-of-type + h2 { margin-top: var(--space-8); }

/* One delivery group: its line is folded into the Delivery row and hidden. */
.shop-checkout .delivery-container tr.shop-summary__source { display: none; }
.shop-checkout .delivery-container tr.shop-summary__source + tr > td { border-top: 0 !important; padding-top: 0 !important; }
/* Several groups: each stays as a small label | amount line. */
.shop-checkout .delivery-container td.shop-summary__group {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-1) var(--space-4);
  padding-bottom: var(--space-3);
  font-size: var(--text-xs);
  color: var(--ink-soft);
}
.shop-checkout .delivery-container td.shop-summary__group .tab-charge-breakdown { margin-top: 0; }

.shop-checkout .delivery-container .shop-summary { display: grid; gap: var(--space-2); }
.shop-checkout .delivery-container .shop-summary__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: var(--ink-soft);
}
.shop-checkout .delivery-container .shop-summary__amount {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.shop-checkout .delivery-container .shop-summary__row--total {
  margin-top: var(--space-2);
  padding-top: var(--space-3);
  border-top: 1px solid var(--rule);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--ink);
}
.shop-checkout .delivery-container .shop-summary__row--total .shop-summary__amount { font-size: var(--text-lg); font-weight: 700; color: var(--ink); }
.shop-checkout .delivery-container .shop-summary > .tab-charge-breakdown { margin-top: calc(-1 * var(--space-1)); justify-self: start; }
.shop-checkout .delivery-container .shop-summary .tab-charge-breakdown__amount { display: none; }   /* the Delivery row already shows the figure */
.shop-checkout .delivery-container .shop-summary .tab-charge-breakdown__summary { font-size: var(--text-xs); }
.shop-checkout .delivery-container .shop-summary__gift {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: var(--space-3);
  row-gap: 2px;
  align-items: start;
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--rule);
  font-size: var(--text-sm);
  color: var(--ink);
  cursor: pointer;
}
.shop-checkout .delivery-container .shop-summary__gift input { grid-row: span 2; margin: 3px 0 0; accent-color: var(--accent); }
.shop-checkout .delivery-container .shop-summary__gift small { grid-column: 2; font-size: var(--text-xs); color: var(--ink-soft); }

/* ---- Payment step -------------------------------------------------------
   The card panel had no left or right padding: Hubb's own Stripe stylesheet
   sets div.new-card-details .new-card-panel { padding: 3px 0 }, which
   out-specified our padding rule. Re-asserted at higher specificity, and the
   panel becomes a two-column grid so Expiry and CVC share a row. Stripe's
   card fields live in iframes we never touch; we only size the container
   divs Stripe mounts into (Hubb stamps fixed pixel widths on them inline,
   hence !important), so every field runs the panel's full width at the same
   44px height as the name and postcode inputs. */
.shop-checkout div.new-card-details .new-card-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--space-4);
  box-sizing: border-box;
  max-width: 480px;
  padding: var(--space-6);
}
.shop-checkout div.new-card-details .new-card-panel > * { grid-column: 1 / -1; }
.shop-checkout div.new-card-details .new-card-panel > :is(.card-expiry, .card-cvc) { grid-column: auto; }
.shop-checkout div.new-card-details .new-card-panel .form-row input[type="text"] {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: var(--space-2) var(--space-3);
  font-weight: 400 !important;   /* Hubb's Stripe stylesheet bolds the prefilled postcode */
}
.shop-checkout div.new-card-details .new-card-panel .element-container {
  box-sizing: border-box;
  width: 100% !important;
  height: auto !important;
  min-height: 44px;
  padding: 12px !important;
  background-color: var(--surface) !important;
  border: 1px solid var(--rule) !important;
  border-radius: var(--radius) !important;
  transition: border-color var(--transition);
}
.shop-checkout div.new-card-details .new-card-panel .element-container.StripeElement--focus {
  border-color: var(--accent) !important;
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.shop-checkout div.new-card-details .new-card-panel .element-container.StripeElement--invalid {
  border-color: var(--danger) !important;
}
.shop-checkout div.new-card-details .new-card-panel input.submit-btn {
  width: 100%;
  min-height: 48px;
  margin-top: var(--space-5);
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}
.shop-checkout div.new-card-details .new-card-panel input.submit-btn:hover {
  color: var(--accent-ink);
  border-color: var(--accent);
  opacity: 0.85;
}

/* ---- Tablet and below (sidebar already stacks at 1024px) -------------- */
@media (max-width: 1024px) {
  /* Category menu becomes a single swipeable row of pills above the
     products, instead of a tall boxed list pushing them down the page.
     Current category = filled pill. The visible title goes (the pills
     explain themselves) but stays for screen readers. */
  .shop-layout { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }   /* minmax: a long pill row must scroll, not widen the column */
  .shop-sidebar { min-width: 0; border: 0; border-radius: 0; background: none; overflow: visible; }
  .shop-sidebar__title {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .shop-cat-nav div:has(> div[style*="margin-left"]),
  .shop-cat-nav #ShopCatNavRoot {
    display: flex;
    gap: var(--space-2);
    overflow-x: auto;
    scrollbar-width: none;
    margin-inline: calc(-1 * var(--container-gutter));
    padding: 2px var(--container-gutter);
    scroll-padding-inline: var(--container-gutter);
  }
  .shop-cat-nav div:has(> div[style*="margin-left"])::-webkit-scrollbar { display: none; }
  .shop-cat-nav div[style*="margin-left"] { flex: 0 0 auto; }
  .shop-cat-nav div[style*="margin-left"] + div[style*="margin-left"] { border-top: 0; }
  .shop-cat-nav li {
    white-space: nowrap;
    padding: var(--space-2) var(--space-4);
    border: 1px solid var(--rule);
    border-radius: 999px;
    background: var(--surface);
  }
  .shop-cat-nav li:hover { background: var(--accent-soft); }
  .shop-cat-nav li:has(b),
  .shop-cat-nav li:has(b):hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
  .shop-cat-nav li:has(b) b { color: var(--accent-ink); }
  .shop-cat-nav #ShopCatNavRoot::-webkit-scrollbar { display: none; }
  .shop-cat-nav #ShopCatNavRoot > li { flex: 0 0 auto; }
  .shop-cat-nav li.ShopCatNavDisplayed,
  .shop-cat-nav li.ShopCatNavDisplayed:hover { background: var(--accent); border-color: var(--accent); }
  .shop-cat-nav li.ShopCatNavDisplayed > a { color: var(--accent-ink); }

  /* Featured categories: hold three across (the 2 + 1 orphan looked
     unfinished); phones switch to a swipe row below. */
  .shop_featured_categories .gallery_ul { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }

  /* Checkout: Back and Continue sit side by side (Continue fills the row),
     rather than two stacked full-width pills with Back on top. */
  .shop-checkout [id$="_pnlButtons"]:has(input[name$="$btnBack"]) { flex-direction: row; flex-wrap: nowrap; }
  .shop-checkout [id$="_pnlButtons"]:has(input[name$="$btnBack"]) input[type="submit"] { width: auto; }
  .shop-checkout [id$="_pnlButtons"]:has(input[name$="$btnBack"]) input[name$="$btnContinue"] { flex: 1 1 auto; }
}

/* ---- Phones ------------------------------------------------------------ */
@media (max-width: 720px) {
  /* Featured categories: a swipe row with the next tile peeking in. */
  .shop_featured_categories .gallery_ul {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 72%;
    gap: var(--space-3);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    margin-inline: calc(-1 * var(--container-gutter));
    padding-inline: var(--container-gutter);
    scroll-padding-inline: var(--container-gutter);
  }
  .shop_featured_categories .gallery_ul::-webkit-scrollbar { display: none; }
  .shop_featured_categories .gallery_li { scroll-snap-align: start; }

  .slice--shop-info .content_article { padding: var(--space-5); }

  /* Product page: one column from here (was 540px), shot full width. */
  .shop-item {
    grid-template-columns: 1fr;
    grid-template-areas: "gallery" "buy" "detail";
    gap: var(--space-6);
  }
  .shop-item__gallery { max-width: none; }
  .shop-item__gallery a > img { max-height: 320px; }
  .shop-item__actions input[type="submit"] { flex: 1 1 auto; }

  /* Basket: the five-column table overflowed sideways (460px floor) and hid
     the totals behind a scrollbar. Each line becomes a compact row instead:
     qty and Remove | item | line total. The unit price column goes (the
     line total says it); a Discount cell, when there is one, sits under
     the total. The voucher table is excluded. */
  .shop-checkout table.gridstyle:not(#divVoucherCode table) { display: block; width: 100%; min-width: 0; }
  .shop-checkout table.gridstyle:not(#divVoucherCode table) > tbody { display: block; }
  .shop-checkout table.gridstyle:not(#divVoucherCode table) > tbody > tr.gridheader { display: none; }
  .shop-checkout table.gridstyle:not(#divVoucherCode table) > tbody > tr:is(.griditemrow, .altgriditemrow) {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    column-gap: var(--space-4);
    row-gap: var(--space-1);
    padding-block: var(--space-4);
    border-bottom: 1px solid var(--rule);
  }
  .shop-checkout table.gridstyle:not(#divVoucherCode table) > tbody > tr:is(.griditemrow, .altgriditemrow) > td {
    padding: 0;
    border: 0;
  }
  .shop-checkout table.gridstyle:not(#divVoucherCode table) > tbody > tr:is(.griditemrow, .altgriditemrow) > td:nth-last-child(5) { grid-column: 1; grid-row: 1 / span 2; }
  .shop-checkout table.gridstyle:not(#divVoucherCode table) > tbody > tr:is(.griditemrow, .altgriditemrow) > td:nth-last-child(4) { grid-column: 2; grid-row: 1 / span 2; padding-top: var(--space-2); }
  .shop-checkout table.gridstyle:not(#divVoucherCode table) > tbody > tr:is(.griditemrow, .altgriditemrow) > td:nth-last-child(3) { display: none; }
  .shop-checkout table.gridstyle:not(#divVoucherCode table) > tbody > tr:is(.griditemrow, .altgriditemrow) > td:nth-last-child(2) { grid-column: 3; grid-row: 2; text-align: right; font-size: var(--text-xs); color: var(--ink-soft); }
  .shop-checkout table.gridstyle:not(#divVoucherCode table) > tbody > tr:is(.griditemrow, .altgriditemrow) > td:last-child { grid-column: 3; grid-row: 1; padding-top: var(--space-2); font-weight: 600; white-space: nowrap; }
  .shop-checkout table.gridstyle:not(#divVoucherCode table) > tbody > tr:not(.gridheader, .griditemrow, .altgriditemrow) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding-top: var(--space-4);
  }
  .shop-checkout table.gridstyle:not(#divVoucherCode table) > tbody > tr:not(.gridheader, .griditemrow, .altgriditemrow) > td { padding: 0; border: 0; }
  .shop-checkout table.gridstyle:not(#divVoucherCode table) > tbody > tr:not(.gridheader, .griditemrow, .altgriditemrow) > td:not(:has(*)) { display: none; }
  .shop-checkout table.gridstyle:not(#divVoucherCode table) > tbody > tr:not(.gridheader, .griditemrow, .altgriditemrow) > td:last-child { margin-left: auto; }

  /* Guest login choice: both options full width with the "or" centred
     between them (they were ragged, left-aligned pills of different widths). */
  .shop-checkout [id$="_pnlWebsiteMember"],
  .shop-checkout [id$="_pnlWebsiteMember"] > div { display: block; width: 100%; }
  .shop-checkout [id$="_pnlLoginControls"] > table { width: 100%; border-spacing: 0; }
  .shop-checkout [id$="_pnlLoginControls"] > table > tbody > tr > td { padding: 0; }
  .shop-checkout [id$="_pnlLoginControls"] > table :is(input[type="submit"], input[type="button"], button) {
    display: block;
    width: 100% !important;   /* beats the shared width:auto !important on shop buttons */
    min-height: 44px;
    margin-inline: 0 !important;
  }
  .shop-checkout [id$="_pnlLoginControls"] > table > tbody > tr > td > p { text-align: center; margin: var(--space-3) 0; }

  /* Step pills stay on one line: the arrows go, pills tighten (8px sides,
     6px at 380px and below) so the done-step ticks still fit at 360px. */
  .shop-checkout a.shop-step-link .CartProgressFaded::before { margin-right: 0.25em; }
  .shop-checkout img[src*="CheckoutArrow"] { display: none; }
  .shop-checkout .CartProgressHighlighted,
  .shop-checkout .CartProgressFaded {
    padding: var(--space-1) var(--space-2);
    letter-spacing: 0.02em;
    margin: 0 var(--space-1) var(--space-1) 0 !important;   /* beat the module's inline 10-15px side margins */
  }

  .shop-checkout #divVoucherCode { padding: var(--space-5) !important; }   /* beats the desktop !important padding */

  /* Delivery cards: a little less padding so addresses get the width. */
  .shop-checkout .delivery-container > tbody > tr > td { padding: var(--space-5); }

  .shop-checkout div.new-card-details .new-card-panel { max-width: 100%; padding: var(--space-5); }
}

/* ---- Small phones: product cards two across ----------------------------
   One card per row made a two-product category a long scroll of mostly
   grey image stage. Two across, with a shorter stage, the blurb dropped
   (it's on the product page) and the price over a full-width button. */
@media (max-width: 540px) {
  .shop-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
  .shop-card__media { height: 150px; padding: var(--space-4); }
  .shop-card__body { padding: var(--space-3); gap: var(--space-1); }
  .shop-card__title { font-size: var(--text-base); }
  .shop-card__author { font-size: var(--text-xs); }
  .shop-card__desc { display: none; }
  .shop-card__footer { flex-direction: column; align-items: stretch; gap: var(--space-2); }
  .shop-card__buy,
  .shop-item__section .shop-card__buy {
    text-align: center;
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0.01em;
    text-transform: none;   /* uppercase + tracking wrapped "Add to basket" onto two lines at this width */
    white-space: nowrap;
  }
}

/* v0.281: step pills at 380px and below -- 6px sides so all four pills,
   ticks included, stay on one line down to 360px. */
@media (max-width: 380px) {
  .shop-checkout .CartProgressHighlighted,
  .shop-checkout .CartProgressFaded { padding: var(--space-1) 6px; }
}

/* v0.282: My Orders -- the module centres its "Shop home" button in an
   inline-styled div and fixes its width inline. Line it up with the
   heading and the orders table instead; !important beats the inline styles. */
.shop-orders div[style*="text-align"] { text-align: left !important; }
.shop-orders input.SiteButton { width: auto !important; }

/* v0.283: table header sort links never narrower than their label. On a
   phone the auto table layout gave the link a few px less than it needed,
   and with row-reverse the overflow went LEFT, so the scroll box clipped
   the first letter ("ATE PLACED"). */
:is(.shop-orders, .shop-draft-orders, .shop-wishlist, .shop-checkout) table.gridstyle tr:first-child a { min-width: max-content; }

/* =========================================================================
   3.31 Empty landing sections  (v1.1)
   -------------------------------------------------------------------------
   A section with nothing to show yet hides itself, heading and all: no
   featured category images, no featured products, or no shop information
   article chosen. Applies on every site.
   ========================================================================= */
.slice--shop-categories:not(:has(img)),
.slice--shop-products:not(:has(.shop-hotpicks a, .shop-hotpicks img)),
.slice--shop-info:not(:has(p, img, h1, h2, h3, ul, ol, table)) { display: none; }

/* ==========================================================================
   Checkout, Delivery step: New Customer registration form   (shop.css v1.2)
   The platform renders this as one table per field with labels to the left.
   Restyled as a card with stacked labels, a field grid on wider screens,
   44px touch targets and 16px inputs (no iOS zoom on focus).
   Scoped to the shop checkout only, so the site's other forms are untouched.
   ========================================================================== */

/* Once New Customer is chosen, its button hides: drop the dangling "or" */
.shop-checkout [id$="_pnlLoginControls"] td:has(> #btnNewCustomer[style*="none"]) > p {
  display: none;
}
.shop-checkout [id$="_pnlLoginControls"] > table { width: 100%; }

/* The form card, matching the delivery cards */
.shop-checkout [id$="_divNewCustomer"] {
  max-width: 46rem;
  margin-top: var(--space-6);
  padding: var(--space-6);
  background: var(--section-light);
  border-radius: var(--radius-lg);
  text-align: left;
}
.shop-checkout [id$="_divNewCustomer"] > p { margin: 0 0 var(--space-6); color: var(--ink); }
.shop-checkout [id$="_divNewCustomer"] > p:empty { display: none; }

/* Sections: small uppercase headings with a hairline between them */
.shop-checkout [id$="_divNewCustomer"] #GroupNotesEnclosingDiv > div + div {
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--rule);
}
.shop-checkout [id$="_divNewCustomer"] .TopCaption {
  margin: 0 0 var(--space-4);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Unpick the layout tables: label above field */
.shop-checkout [id$="_divNewCustomer"] #GroupNotesEnclosingDiv :is(table, tbody, tr, td) {
  display: block;
  width: 100% !important;  /* the address table carries inline widths */
  margin: 0;
  padding: 0;
  border: 0;
  text-align: left !important;
  white-space: normal;
}
.shop-checkout [id$="_divNewCustomer"] :is(.SubCaption, .TopCaption) { text-align: left !important; }
.shop-checkout [id$="_divNewCustomer"] .SubCaption,
.shop-checkout [id$="_divNewCustomer"] .tblAddress td:first-child,
.shop-checkout [id$="_divNewCustomer"] [id$="_div_ctls_groupnotes"] td:first-child {
  margin: 0 0 var(--space-1);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
}
.shop-checkout [id$="_divNewCustomer"] .SubCaption b { color: var(--danger); font-weight: 600; margin-right: 0.15em; }
.shop-checkout [id$="_divNewCustomer"] .custom-field-help {
  margin-left: var(--space-1);
  font-size: var(--text-xs);
  color: var(--ink-soft);
  text-decoration: none;
}

/* Fields */
.shop-checkout [id$="_divNewCustomer"] #GroupNotesEnclosingDiv :is(input[type="text"], input[type="email"], input[type="tel"], select) {
  box-sizing: border-box;
  width: 100%;
  max-width: none !important;
  min-height: 2.75rem;
  margin: 0;
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-body);
  font-size: max(16px, var(--text-base));
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.shop-checkout [id$="_divNewCustomer"] #GroupNotesEnclosingDiv :is(input, select):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.shop-checkout [id$="_divNewCustomer"] .tblAddress input[type="text"] { width: 100% !important; }
.shop-checkout [id$="_divNewCustomer"] .iti { display: block; width: 100%; }
/* Keep the country picker above the field (the platform shows it on focus) */
.shop-checkout [id$="_divNewCustomer"] .iti__country-container { z-index: 2; }
/* Medical/Allergy/Dietary sits in a fixed 400px wrapper */
.shop-checkout [id$="_divNewCustomer"] [id$="_outerdiv_ctls_groupnotes"] div { width: auto !important; }
.shop-checkout [id$="_divNewCustomer"] :is(.validator, .Validator, .client-validator) {
  margin-top: var(--space-1);
  font-size: var(--text-xs);
  color: var(--danger);
}

/* Title: show the dropdown straight away rather than behind a tick box */
.shop-checkout [id$="_divNewCustomer"] [id$="_chkCollapse_title"] { display: none; }
.shop-checkout [id$="_divNewCustomer"] [id$="Registration_div_ctls_title"] { display: block !important; }

/* Date of birth: three small boxes on one line */
.shop-checkout [id$="_divNewCustomer"] [id$="Registration_div_ctls_dob"] {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--ink-soft);
}
.shop-checkout [id$="_divNewCustomer"] [id$="Registration_div_ctls_dob"] input[type="text"] {
  width: 3.5rem !important;
  text-align: center;
}
.shop-checkout [id$="_divNewCustomer"] [id$="Registration_div_ctls_dob"] input[type="text"]:nth-of-type(3) { width: 5rem !important; }

/* Grids */
.shop-checkout [id$="_divNewCustomer"] :is([id$="Registration_div_ctls_basic_details"], [id$="Registration_div_ctls_phone_numbers"]),
.shop-checkout [id$="_divNewCustomer"] #GroupNotesEnclosingDiv .tblAddress > tbody {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
}

/* Consent */
.shop-checkout [id$="_divNewCustomer"] ul.consent-questions {
  display: grid;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.shop-checkout [id$="_divNewCustomer"] li.consent-question { margin: 0; padding: 0; text-indent: 0; }
.shop-checkout [id$="_divNewCustomer"] li.consent-question > div {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--ink);
}
.shop-checkout [id$="_divNewCustomer"] li.consent-question input[type="checkbox"] {
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.1rem 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.shop-checkout [id$="_divNewCustomer"] li.consent-question label { flex: 1 1 0; min-width: 0; margin: 0; padding: 0; cursor: pointer; }
.shop-checkout [id$="_divNewCustomer"] .consent-mailing-channels { flex-basis: 100%; padding-left: calc(1.25rem + var(--space-3)); }
.shop-checkout [id$="_divNewCustomer"] .consent-mailing-channels:empty { display: none; }

/* Terms line */
.shop-checkout [id$="_divNewCustomer"] .terms-acceptance-notice {
  margin: var(--space-6) 0 0;
  padding-top: var(--space-4);
  border-top: 1px solid var(--rule);
  font-size: var(--text-sm);
  color: var(--ink-soft);
  text-align: left !important;
}

@media (min-width: 40rem) {
  .shop-checkout [id$="_divNewCustomer"] [id$="Registration_div_ctls_basic_details"] {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .shop-checkout [id$="_divNewCustomer"] [id$="Registration_div_ctls_basic_details"] > * { grid-column: span 6; }
  .shop-checkout [id$="_divNewCustomer"] :is([id$="_outerdiv_ctls_title"], [id$="_outerdiv_ctls_firstname"], [id$="_outerdiv_ctls_lastname"]) { grid-column: span 2; }
  .shop-checkout [id$="_divNewCustomer"] :is([id$="_outerdiv_ctls_dob"], [id$="_outerdiv_ctls_gender"]) { grid-column: span 3; }

  .shop-checkout [id$="_divNewCustomer"] [id$="Registration_div_ctls_phone_numbers"],
  .shop-checkout [id$="_divNewCustomer"] #GroupNotesEnclosingDiv .tblAddress > tbody { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-checkout [id$="_divNewCustomer"] #GroupNotesEnclosingDiv .tblAddress > tbody > tr:nth-child(-n+2) { grid-column: 1 / -1; }
}

@media (max-width: 39.99rem) {
  .shop-checkout [id$="_divNewCustomer"] { padding: var(--space-4); border-radius: var(--radius); }
  .shop-checkout [id$="_divNewCustomer"] [id$="Registration_div_ctls_dob"] input[type="text"] { width: 3rem !important; }
  .shop-checkout [id$="_divNewCustomer"] [id$="Registration_div_ctls_dob"] input[type="text"]:nth-of-type(3) { width: 4.25rem !important; }
}

/* =========================================================================
   v1.4  BASKET PAGE "YOU MIGHT ALSO LIKE"  (.shop-cart-extras)
   -------------------------------------------------------------------------
   setupShopCartExtras() in shop.js (v1.3) rebuilds Hubb's basket-page item
   list as the .shop-cards grid under its own heading and hides the raw
   list. Spacing and heading here; the cards reuse every .shop-card rule,
   including the phone layout.
   ========================================================================= */
.shop-checkout .shop-cart-extras {
  margin-top:  var(--space-12);
  padding-top: var(--space-8);
  border-top:  1px solid var(--rule);
}
.shop-checkout .shop-cart-extras__heading {
  font-family:    var(--font-display);
  font-size:      var(--text-xl);
  font-weight:    var(--shop-heading-weight, 400);
  letter-spacing: -0.01em;
  line-height:    1.2;
  color:          var(--ink);
  text-align:     left;
  margin:         0 0 var(--space-6);
}
.shop-checkout .shop-cart-extras__heading::after {
  content:          "";
  display:          block;
  width:            clamp(60px, 7vw, 88px);
  height:           2px;
  margin:           var(--space-4) 0 0;
  background-color: var(--accent);
  opacity:          0.85;
  border-radius:    1px;
}
.shop-checkout .shop-cart-extras .shop-card__media { height: 200px; }
.shop-checkout .shop-cart-extras .shop-card__buy {
  letter-spacing: 0.04em;
  padding:        var(--space-2) var(--space-4);
}
@media (max-width: 540px) {
  .shop-checkout .shop-cart-extras .shop-card__media { height: 150px; }
}
