/* ===========================================================================
   CATALOGUE — shop page, product categories, product search, product cards,
   category tiles, toolbar, pagination and the product page.
   Owner: catalogue builder. Markup additions are in inc/shop.php.

   Load order: style.css → chrome.css → shop.css → pages.css → motion.css.
   - Colours only through --db-* tokens. Tokens that chrome.css defines carry a
     fallback to a style.css token (or a plain length), so nothing collapses if
     chrome.css is late or missing a token.
   - States only. Transitions, animations and hover/press transforms live in
     motion.css (spec-design §0.2).
   - Blocksy's global.css is printed AFTER this file inside the Customizer preview
     (spec-markup §8.3), and some Blocksy sheets (flexy, pagination) are appended to
     <body> on demand. Every rule that overrides one of those carries one extra
     body/element step, so it wins in both orders. No blanket !important; the one
     exception (tile photo ratio) is commented where it is used.
   =========================================================================== */


/* ---------------------------------------------------------------------------
   1. Product grids: shop, categories, search, related, upsells, cross-sells.
      4 columns from 1000px (Blocksy's .columns-4), 3 to 999px, 2 under 690px.
   --------------------------------------------------------------------------- */
body [data-products]{--grid-columns-gap:16px;--grid-rows-gap:16px}

@media (max-width:999.98px){
  body [data-products],
  body .related [data-products],
  body .upsells [data-products],
  body .up-sells [data-products],
  body .cross-sells [data-products]{--shop-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:689.98px){
  body [data-products],
  body .related [data-products],
  body .upsells [data-products],
  body .up-sells [data-products],
  body .cross-sells [data-products]{--shop-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:520px){
  body [data-products]{--grid-columns-gap:10px;--grid-rows-gap:10px}
}


/* ---------------------------------------------------------------------------
   2. Card frame — one look for Blocksy cards (li.product), category tiles and the
      homepage .db-card. White panel, 1px line, 12px radius; the hover/focus ring is
      a pseudo-element so it can fade without animating box-shadow.
   --------------------------------------------------------------------------- */
body [data-products] > li.product,
.db-card{
  position:relative;
  display:flex;flex-direction:column;align-items:stretch;
  margin:0;padding:0;
  text-align:left;
  background:var(--db-panel);
  border:1px solid var(--db-line);
  border-radius:var(--db-radius-l,12px);
  overflow:visible;
  container:db-card / inline-size;
  --product-element-spacing:0;
  --horizontal-alignment:stretch;
  --text-horizontal-alignment:start;
}
/* style.css recoloured the border and added a shadow on hover; the ring below does it now. */
.db-card:hover{border-color:var(--db-line);box-shadow:none}

body [data-products] > li.product::after,
.db-card::after{
  content:"";position:absolute;inset:-1px;z-index:var(--db-z-raised,2);
  border:1px solid var(--db-line-hot,var(--db-amber));
  border-radius:inherit;
  box-shadow:var(--db-shadow-m,var(--db-shadow));
  opacity:0;pointer-events:none;
}
body [data-products] > li.product:hover::after,
body [data-products] > li.product:focus-within::after,
.db-card:hover::after,
.db-card:focus-within::after{opacity:1}

/* Blocksy spaces every card layer with margin-bottom; the card sets its own rhythm. */
body [data-products] > li.product > *{margin-bottom:0}


/* ---------------------------------------------------------------------------
   3. Photo — square, white, the whole pack (contain, 6% inset).
      functions.php already swaps in the uncropped image and sets the 1/1 ratio.
   --------------------------------------------------------------------------- */
body [data-products] > li.product > figure,
.db-card-vis{
  position:relative;
  display:block;
  margin:0;
  aspect-ratio:1/1;
  background:var(--db-photo);
  border-bottom:1px solid var(--db-line);
  border-radius:calc(var(--db-radius-l,12px) - 1px) calc(var(--db-radius-l,12px) - 1px) 0 0;
  overflow:hidden;
  --product-element-spacing:0;
}
body [data-products] > li.product > figure > .ct-media-container:focus-visible{outline-offset:-3px}
body [data-products] > li.product > figure > .ct-media-container{
  display:block;width:100%;height:100%;border-radius:0;
}
body [data-products] > li.product > figure .ct-media-container img,
.db-card-vis img{
  display:block;width:100%;height:100%;
  object-fit:contain;padding:6%;box-sizing:border-box;
  background:var(--db-photo);
}
/* Blocksy zooms card photos 1.1× on hover. Only motion.css zooms (1.04×), with
   body [data-products][data-hover] .product:hover .has-hover-effect img, which outranks this. */
body [data-products][data-hover] > li.product .has-hover-effect img{transform:none}

/* Category tiles: Blocksy prints an inline 3/4 ratio on tile images. inc/shop.php
   rewrites it to 1/1; this is the fallback if that rewrite ever misses. Only
   !important can beat an inline style. */
body [data-products] > li.product-category > figure .ct-media-container img{aspect-ratio:1/1 !important}
/* Keep the cell label (.db-tile-cells, top-left) off the photo: brand logos printed at the
   top of pack shots (GAONENG) otherwise read as "3S NENG". */
body [data-products] > li.product-category > figure .ct-media-container img{padding:22% 8% 5%}

/* Out of stock: the photo steps back. */
body [data-products] > li.product.outofstock > figure img,
.db-card:has(.db-s-out) .db-card-vis img{opacity:.55}


/* ---------------------------------------------------------------------------
   4. Badges on photos — sale top-left (ink pill), stock pill top-right (chrome.css
      colours it; style.css places it). Same pill on the product gallery.
   --------------------------------------------------------------------------- */
body [data-products] > li.product .onsale,
body [data-products] > li.product .out-of-stock-badge,
body .woocommerce-product-gallery .onsale,
body .woocommerce-product-gallery .out-of-stock-badge,
.db-card .onsale{
  --badge-top:12px;--badge-left:12px;--badge-height:22px;
  --badge-min-width:0px;--badge-padding:0 8px;--badge-radius:var(--db-radius-xs,5px);
  --badge-background-color:var(--db-ink);
  --badge-text-color:var(--db-on-ink,var(--db-panel));
  --theme-font-family:var(--db-mono);--theme-font-size:10.5px;--theme-font-weight:700;
  --theme-line-height:1;--theme-text-transform:uppercase;--theme-letter-spacing:.08em;
  gap:6px;
  font-family:var(--db-mono);font-size:10.5px;font-weight:700;line-height:1;
  letter-spacing:.08em;text-transform:uppercase;white-space:nowrap;
  border:1px solid var(--db-ink);
  box-shadow:var(--db-shadow-pill,none);
  z-index:var(--db-z-raised,2);
  pointer-events:none;
}
body [data-products] > li.product .out-of-stock-badge,
body .woocommerce-product-gallery .out-of-stock-badge{
  --badge-background-color:var(--db-neutral-tint,var(--db-panel-2));
  --badge-text-color:var(--db-ink-2);
  border-color:color-mix(in srgb,var(--db-ink-3) 30%,transparent);
}
/* On a narrow card the sale pill and the stock pill collide across the top of the
   photo, so the sale pill drops to the photo's bottom-left corner. */
@container db-card (max-width:259.98px){
  body [data-products] > li.product:has(> .db-stockpill) .onsale,
  .db-card:has(.db-stockpill) .onsale{--badge-top:auto;--badge-left:10px;bottom:10px}
}


/* ---------------------------------------------------------------------------
   5. Card body — brand, name, spec chips.
   --------------------------------------------------------------------------- */
body [data-products] > li.product .db-card-body{
  display:flex;flex-direction:column;gap:6px;
  padding:14px 15px 0;
}
.db-card-body{gap:6px}

.db-card-brand{
  font-family:var(--db-mono);font-size:10.5px;font-weight:700;line-height:1.3;
  letter-spacing:.12em;text-transform:uppercase;color:var(--db-ink-3);
}

body [data-products] > li.product .woocommerce-loop-product__title,
.db-card-name{
  --theme-font-size:14.5px;--theme-font-weight:600;--theme-line-height:1.32;
  margin:0;
  font-size:14.5px;font-weight:600;line-height:1.32;letter-spacing:-.01em;
  color:var(--db-ink);
}
/* The clamp sits on the link itself, so its own focus outline is never clipped. */
body [data-products] > li.product .woocommerce-loop-product__title a,
.db-card-name a{
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;
  color:var(--db-ink);text-decoration:none;
}
body [data-products] > li.product .woocommerce-loop-product__title a:hover,
.db-card-name a:hover{color:var(--db-amber-ink)}

body [data-products] > li.product .db-specs,
.db-card .db-specs{margin:2px 0 0}

/* The category line ("BATTERIES, LIPO 6S") repeats the page you are on. */
body [data-products] > li.product .entry-meta{display:none}

/* Ratings (off in the Customizer today; styled for when they are switched on). */
body [data-products] > li.product .ct-woo-card-rating{padding:8px 15px 0}
body [data-products] > li.product .star-rating,
.db-card .star-rating{
  font-size:12px;
  --star-rating-initial-color:var(--db-amber);
  --star-rating-inactive-color:var(--db-line-strong,var(--db-ink-3));
}


/* ---------------------------------------------------------------------------
   6. Card foot — mono price bottom-left, small amber button bottom-right.
      Stacks (price, then a full-width button) when the card is narrow.
   --------------------------------------------------------------------------- */
body [data-products] > li.product .db-card-foot,
.db-card-foot{
  display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;
  gap:8px 10px;
  margin-top:auto;
}
body [data-products] > li.product .db-card-foot{padding:10px 15px 16px}

body [data-products] > li.product .price,
.db-price{
  --theme-font-family:var(--db-mono);--theme-font-size:18px;--theme-font-weight:700;
  margin:0;
  font-family:var(--db-mono);font-size:18px;font-weight:700;line-height:1.1;
  letter-spacing:-.02em;font-variant-numeric:tabular-nums;
  color:var(--db-ink);
}
/* Sale: the current price on top at full size, the old price under it, smaller.
   Blocksy puts del at order 2, so the order is set on both, not left to the DOM. */
body [data-products] > li.product .price .sale-price,
.db-price .sale-price{
  display:inline-flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;
  gap:2px;line-height:1.1;
}
body [data-products] > li.product .price ins,
.db-price ins{order:1;text-decoration:none;background:none}
body [data-products] > li.product .price del,
.db-price del{
  order:2;margin:0;opacity:1;
  font-size:12px;font-weight:500;letter-spacing:0;
  color:var(--db-ink-2);
  text-decoration:line-through;text-decoration-thickness:1px;
}

body [data-products] > li.product .db-card-foot .ct-woo-card-actions{
  --theme-button-min-height:36px;--theme-button-padding:0 14px;--theme-button-font-size:12.5px;
  --theme-button-shadow:none;--theme-button-transform:none;
  display:flex;flex-wrap:nowrap;justify-content:flex-end;gap:8px;
  flex:0 0 auto;margin:0 0 0 auto;
}
body [data-products] > li.product .ct-woo-card-actions .button,
.db-card-foot .button{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:36px;height:36px;padding:0 14px;
  font-size:12.5px;line-height:1;white-space:nowrap;
}
/* After an AJAX add, keep the button (it gets chrome.css's "in your basket" dot) …
   Blocksy hides it on shop cards and leaves only "View basket". */
body [data-products] [data-add-to-cart] .add_to_cart_button.added{display:inline-flex}
/* … and drop WooCommerce's inline "View basket": it reflows the card. The toast and the
   basket bump (chrome.js) replace it. */
body [data-products] .ct-woo-card-actions .added_to_cart,
.db-card-foot .added_to_cart{display:none}

/* Out of stock: "Read more" is a secondary button, not an amber call to action. */
body [data-products] > li.product.outofstock .ct-woo-card-actions .button{
  --theme-button-background-initial-color:var(--db-panel);
  --theme-button-background-hover-color:var(--db-panel);
  --theme-button-text-initial-color:var(--db-ink);
  --theme-button-text-hover-color:var(--db-amber-ink);
  background-color:var(--db-panel);color:var(--db-ink);
  box-shadow:inset 0 0 0 1px var(--db-line);
}
body [data-products] > li.product.outofstock .ct-woo-card-actions .button:hover{
  background-color:var(--db-panel);color:var(--db-amber-ink);
  box-shadow:inset 0 0 0 1px var(--db-amber);
}

/* Narrow cards (phones, the 3-up tablet grid, the 4-up grid just above 1000px):
   price first, then a full-width button. Selectors match the base rules' weight,
   because a container query adds no specificity. */
@container db-card (max-width:259.98px){
  body [data-products] > li.product .db-card-foot,
  .db-card .db-card-foot{flex-direction:column;align-items:stretch;flex-wrap:nowrap}
  body [data-products] > li.product .db-card-foot .ct-woo-card-actions{margin:0;justify-content:stretch}
  body [data-products] > li.product .ct-woo-card-actions .button{flex:1 1 auto;width:100%}
  .db-card .db-card-foot .button{width:100%}
}

@media (pointer:coarse){
  body [data-products] > li.product .ct-woo-card-actions .button,
  .db-card-foot .button{min-height:44px;height:44px}
}

@media (max-width:520px){
  body [data-products] > li.product .db-card-body{padding:11px 11px 0}
  body [data-products] > li.product .db-card-foot{
    flex-direction:column;align-items:stretch;flex-wrap:nowrap;gap:8px;padding:10px 11px 13px;
  }
  body [data-products] > li.product .db-card-foot .ct-woo-card-actions{margin:0;justify-content:stretch}
  body [data-products] > li.product .ct-woo-card-actions .button{flex:1 1 auto;width:100%}
  body [data-products] > li.product .woocommerce-loop-product__title,
  .db-card-name{--theme-font-size:13px;font-size:13px}
  body [data-products] > li.product .price,
  .db-price{--theme-font-size:16px;font-size:16px}
}


/* ---------------------------------------------------------------------------
   7. Category tiles — "Lipo 6S": cell label on the photo, name, pack count, arrow.
   --------------------------------------------------------------------------- */
.db-tile-cells{
  position:absolute;top:12px;left:12px;z-index:var(--db-z-raised,2);
  padding:2px 8px;
  font-family:var(--db-mono);font-size:26px;font-weight:700;line-height:1.1;
  letter-spacing:-.02em;font-variant-numeric:tabular-nums;
  color:var(--db-ink);
  background:color-mix(in srgb,var(--db-panel) 88%,transparent);
  border:1px solid var(--db-line);
  border-radius:var(--db-radius-xs,5px);
  pointer-events:none;
}
body [data-products] > li.product-category .woocommerce-loop-category__title{
  --theme-font-size:15px;--theme-font-weight:700;--theme-content-spacing:0;
  margin:0;
}
body [data-products] > li.product-category .db-tile-title > a{
  display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;
  align-items:center;gap:2px 12px;
  padding:14px 16px 16px;
  color:var(--db-ink);text-decoration:none;
}
.db-tile-name{
  grid-column:1;grid-row:1;
  font-size:15px;font-weight:700;line-height:1.25;letter-spacing:-.01em;
  color:var(--db-ink);
}
body [data-products] > li.product-category .db-tile-count{
  grid-column:1;grid-row:2;margin:0;
  font-family:var(--db-mono);font-size:11.5px;font-weight:600;line-height:1.3;
  letter-spacing:.08em;text-transform:uppercase;font-variant-numeric:tabular-nums;
  color:var(--db-ink-3); /* on white: 4.62:1 */
}
.db-tile-arrow{
  grid-column:2;grid-row:1 / span 2;
  font-size:16px;line-height:1;color:var(--db-ink-2);
}
body [data-products] > li.product-category:hover .db-tile-name,
body [data-products] > li.product-category:hover .db-tile-arrow{color:var(--db-amber-ink)}

@media (max-width:520px){
  .db-tile-cells{top:10px;left:10px;font-size:21px}
  body [data-products] > li.product-category .db-tile-title > a{padding:11px 12px 13px;gap:2px 8px}
  .db-tile-name{font-size:14px}
}


/* ---------------------------------------------------------------------------
   8. Archive pages — spacing under the shared page hero, the category description
      toggle and the cell guide table. The hero itself is chrome.css.
   --------------------------------------------------------------------------- */
/* The hero's own 32px bottom margin is the gap to the toolbar; Blocksy's 48–60px
   container padding would double it. */
body[data-prefix] .hero-section[data-type="type-2"] + .ct-container[data-vertical-spacing*="top"]{padding-top:0}

/* Kicker crumbs from inc/shop.php ("Batteries", or "Batteries / Lipo 6S" deeper down). */
.db-pagehero-kicker .db-kicker-sep{margin:0 .5em;color:var(--db-ink-2)}

/* "Read the buying guide": a ghost button, left-aligned under the clamped text. */
.db-js .db-readmore{
  display:inline-flex;align-items:center;
  min-height:36px;margin:12px 0 0 -10px;padding:0 10px;
  font-size:12.5px;font-weight:700;line-height:1;
  color:var(--db-amber-ink);
  background:transparent;border:0;border-radius:var(--db-radius-s,7px);
  cursor:pointer;
}
.db-js .db-readmore:hover{
  color:var(--db-amber-ink);border:0;
  background:var(--db-amber-tint,var(--db-panel-2));
}
@media (pointer:coarse){ .db-js .db-readmore{min-height:44px} }

/* Cell guide (Batteries category): the shared table look (spec-design §4.18). */
.db-cell-guide-wrap{margin:16px 0 18px;overflow-x:auto}
.db-cell-guide{
  width:100%;margin:0;
  border-collapse:separate;border-spacing:0;
  background:var(--db-panel);
  border:1px solid var(--db-line);
  border-radius:var(--db-radius-m,10px);
  overflow:hidden;
  font-size:14px;text-align:left;
}
.db-cell-guide th,
.db-cell-guide td{padding:12px 14px;border:0;border-top:1px solid var(--db-line);vertical-align:top;color:var(--db-ink-2)}
.db-cell-guide thead th{
  padding:11px 14px;border-top:0;border-bottom:1px solid var(--db-line);
  background:var(--db-panel-2);
  font-family:var(--db-mono);font-size:11px;font-weight:600;line-height:1.3;
  letter-spacing:.1em;text-transform:uppercase;white-space:nowrap;
  color:var(--db-ink-2);
}
.db-cell-guide thead + tbody tr:first-child > *{border-top:0}
.db-cell-guide tbody th{font-family:var(--db-mono);font-weight:700}
.db-cell-guide tbody th a{color:var(--db-amber-ink);text-decoration:none}
.db-cell-guide tbody th a:hover{text-decoration:underline}
/* Voltage, capacity range and from-price are data: mono. "What it flies" stays text. */
.db-cell-guide tbody td:nth-of-type(1),
.db-cell-guide tbody td:nth-of-type(3),
.db-cell-guide tbody td:nth-of-type(4){
  font-family:var(--db-mono);font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--db-ink);
}
.db-cell-guide tbody td:nth-of-type(4){font-weight:700}


/* ---------------------------------------------------------------------------
   9. Toolbar — result count (mono readout) and the sort select.
   --------------------------------------------------------------------------- */
body .woo-listing-top:not(:empty){
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  margin:0 0 20px;padding:0 0 14px;
  border-bottom:1px solid var(--db-line);
}
body .woo-listing-top .woocommerce-result-count{
  --theme-font-family:var(--db-mono);--theme-font-size:11.5px;--theme-font-weight:600;
  --theme-letter-spacing:.08em;--theme-text-transform:uppercase;
  margin:0;
  font-family:var(--db-mono);font-size:11.5px;font-weight:600;line-height:1.3;
  letter-spacing:.08em;text-transform:uppercase;font-variant-numeric:tabular-nums;
  color:var(--db-ink-2);
}
body .woo-listing-top .woocommerce-ordering{margin:0 0 0 auto}
body .woo-listing-top .woocommerce-ordering select{height:40px;min-width:220px;font-size:14px}
body .woo-listing-top .ct-sort-icon{display:none}

/* Cell chips between the count and the sort (inc/shop.php §4b). The toolbar wraps when
   count + chips + sort will not fit on one line; the sort then drops to the right. */
body .woo-listing-top:not(:empty){flex-wrap:wrap}
body .woo-listing-top .db-toolcells{flex:0 1 auto;margin:0}
body .woo-listing-top .db-toolcells .db-cellchips{gap:6px}
body .woo-listing-top .db-cellchip.is-current,
body .woo-listing-top .db-cellchip.is-current:hover{
  background:var(--db-amber-tint);color:var(--db-amber-ink);box-shadow:inset 0 0 0 1.5px var(--db-amber)}

/* Blocksy shrinks the select to a 34px icon on phones; keep a full-width, 44px select. */
@media (max-width:689.98px){
  body .woo-listing-top:not(:empty){padding-bottom:12px}
  /* phones hide the result count, so the chips get the first line to themselves */
  body .woo-listing-top .db-toolcells{flex:1 1 100%}
  body .woo-listing-top .woocommerce-ordering{flex:1 1 auto;margin:0}
  body .woo-listing-top .woocommerce-ordering select{
    width:100%;min-width:0;height:44px;padding:0 40px 0 14px;
    color:var(--db-ink);
    -webkit-user-select:auto;user-select:auto;
    background-image:linear-gradient(45deg,transparent 50%,var(--db-ink-2) 50%),
                     linear-gradient(135deg,var(--db-ink-2) 50%,transparent 50%);
    background-position:calc(100% - 19px) 50%,calc(100% - 14px) 50%;
    background-size:5px 5px;background-repeat:no-repeat;
  }
}


/* ---------------------------------------------------------------------------
   10. Pagination — mono numbered squares, current page in ink.
       Blocksy appends its pagination sheet after ours, hence the body prefix.
   --------------------------------------------------------------------------- */
body .ct-pagination[data-pagination]{
  display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:6px;
  margin-top:40px;
}
body [data-pagination="simple"] > div{
  display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin:0;
}
body [data-pagination] .page-numbers,
body [data-pagination="simple"] > div .page-numbers{
  display:inline-grid;place-items:center;
  flex:0 0 auto;width:auto;min-width:40px;height:40px;margin:0;padding:0 6px;
  font-family:var(--db-mono);font-size:14px;font-weight:600;line-height:1;
  font-variant-numeric:tabular-nums;
  color:var(--db-ink);text-decoration:none;
  background:var(--db-panel);
  border:1px solid var(--db-line);
  border-radius:var(--db-radius-s,7px);
}
body [data-pagination] .page-numbers:not(.dots):not(.current):hover{
  color:var(--db-amber-ink);border-color:var(--db-amber);
}
body [data-pagination] .page-numbers.current,
body [data-pagination] .page-numbers.current:hover{
  color:var(--db-on-ink,var(--db-panel));background:var(--db-ink);border-color:var(--db-ink);
}
body [data-pagination] .page-numbers.dots{background:none;border-color:transparent}
body [data-pagination] .page-numbers.next,
body [data-pagination] .page-numbers.prev{
  display:inline-flex;align-items:center;gap:6px;
  padding:0 14px;
  font-size:12.5px;letter-spacing:.06em;text-transform:uppercase;white-space:nowrap;
  border-color:var(--db-line);
}
body [data-pagination] .page-numbers svg{width:12px;height:12px;fill:currentColor;flex:none}
@media (pointer:coarse){
  body [data-pagination] .page-numbers,
  body [data-pagination="simple"] > div .page-numbers{min-width:44px;height:44px}
}


/* ---------------------------------------------------------------------------
   11. Empty results — a centred panel with the cell chips.
   --------------------------------------------------------------------------- */
.db-noresults{
  display:flex;flex-direction:column;align-items:center;
  max-width:640px;margin:8px auto 0;padding:48px 24px;
  text-align:center;
  background:var(--db-panel);
  border:1px solid var(--db-line);
  border-radius:var(--db-radius-l,12px);
}
.db-noresults-icon{width:40px;height:40px;margin-bottom:16px;color:var(--db-ink-3)}
body .db-noresults .woocommerce-no-products-found{margin:0}
body .db-noresults .woocommerce-info{
  display:block;margin:0;padding:0;
  background:none;border:0;border-radius:0;box-shadow:none;min-height:0;
  font-size:20px;font-weight:800;line-height:1.3;letter-spacing:-.02em;
  color:var(--db-ink);
}
body .db-noresults .woocommerce-info::before{display:none}
.db-noresults-label{
  margin:24px 0 10px;
  font-family:var(--db-mono);font-size:11.5px;font-weight:600;line-height:1.3;
  letter-spacing:.08em;text-transform:uppercase;color:var(--db-ink-2);
}
.db-noresults .db-cellchips{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.db-noresults .db-cellchip{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:44px;height:36px;padding:0 12px;
  font-family:var(--db-mono);font-size:13px;font-weight:700;line-height:1;
  color:var(--db-ink);text-decoration:none;
  background:var(--db-panel);
  box-shadow:inset 0 0 0 1px var(--db-line);
  border-radius:var(--db-radius-s,7px);
}
.db-noresults .db-cellchip:hover{color:var(--db-amber-ink);box-shadow:inset 0 0 0 1px var(--db-amber)}
.db-noresults .db-cellchip-word{font-family:inherit;font-size:12.5px}
.db-noresults-more{margin:20px 0 0;font-size:14px;color:var(--db-ink-2)}
.db-noresults-more a{color:var(--db-amber-ink)}
@media (pointer:coarse){ .db-noresults .db-cellchip{height:44px} }


/* ---------------------------------------------------------------------------
   12. Product page — breadcrumb strip and layout.
   --------------------------------------------------------------------------- */
body.single-product .hero-section[data-type="type-1"]{
  --margin-bottom:8px;--alignment:start;
  margin:0 auto 8px; /* auto sides keep Blocksy's .is-width-constrained centring */
  padding:20px 0 12px;
  text-align:left;
}
@media (max-width:639.98px){
  body.single-product .ct-breadcrumbs .last-item{min-width:0}
  body.single-product .ct-breadcrumbs .last-item > span{
    display:inline-block;max-width:56vw;vertical-align:bottom;
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  }
}

@media (min-width:1000px){
  body.single-product .product-entry-wrapper{--product-gallery-width:52%}
  /* Blocksy's (0,4,0) :has() rule sets 40px; one more class step for 48px. */
  body.single-product .product-entry-wrapper .summary.entry-summary{margin-inline-start:48px}
}
@media (max-width:999.98px){
  body.single-product .woocommerce-product-gallery{margin-bottom:24px}
}


/* ---------------------------------------------------------------------------
   13. Product gallery — square white frame, contained photo, thumbs, arrows.
   --------------------------------------------------------------------------- */
body.single-product .woocommerce-product-gallery{
  --thumbs-spacing:10px;
  --flexy-nav-background-color:var(--db-panel);
  --flexy-nav-background-hover-color:var(--db-panel);
  --flexy-nav-arrow-color:var(--db-ink);
  --flexy-nav-arrow-hover-color:var(--db-amber-ink);
  --lightbox-button-background-color:var(--db-panel);
  --lightbox-button-hover-background-color:var(--db-panel);
  --lightbox-button-icon-color:var(--db-ink);
  --lightbox-button-icon-hover-color:var(--db-amber-ink);
}
body.single-product .woocommerce-product-gallery .flexy-view,
body.single-product .woocommerce-product-gallery .ct-product-gallery-container > .ct-media-container{
  background:var(--db-photo);
  border:1px solid var(--db-line);
  border-radius:var(--db-radius-l,12px);
  overflow:hidden;
}
body.single-product .woocommerce-product-gallery .flexy-item .ct-media-container,
body.single-product .woocommerce-product-gallery .ct-product-gallery-container > .ct-media-container{
  background:var(--db-photo);
}
body.single-product .woocommerce-product-gallery .flexy-item .ct-media-container img,
body.single-product .woocommerce-product-gallery .ct-product-gallery-container > .ct-media-container img{
  object-fit:contain;padding:4%;box-sizing:border-box;
  background:var(--db-photo); /* replaces the hard-coded white in style.css */
}

/* Thumbs: 72px squares (64px under 1000px), 10px apart, amber when active. */
body.single-product .woocommerce-product-gallery .flexy-pills li{--thumbs-width:82px;opacity:1}
body.single-product .woocommerce-product-gallery .flexy-pills li .ct-media-container{
  background:var(--db-photo);
  border:1px solid var(--db-line);
  border-radius:var(--db-radius-s,7px);
}
body.single-product .woocommerce-product-gallery .flexy-pills li .ct-media-container img{
  object-fit:contain;padding:4px;box-sizing:border-box;
}
body.single-product .woocommerce-product-gallery .flexy-pills li:hover{opacity:1}
body.single-product .woocommerce-product-gallery .flexy-pills li:hover .ct-media-container{
  border-color:var(--db-line-strong,var(--db-ink-3));
}
body.single-product .woocommerce-product-gallery .flexy-pills li .ct-media-container::after{border-width:1px}
body.single-product .woocommerce-product-gallery .flexy-pills li.active .ct-media-container{border-color:var(--db-amber)}
body.single-product .woocommerce-product-gallery .flexy-pills li.active .ct-media-container::after{border-color:var(--db-amber)}
@media (max-width:999.98px){
  body.single-product .woocommerce-product-gallery .flexy-pills li{--thumbs-width:74px}
  body.single-product .woocommerce-product-gallery .flexy-pills ol:not([data-flexy]){
    flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;
  }
}

/* Phones: a 4:3 frame (the whole pack still shows, letterboxed on white) and 56px thumbs,
   so price and Add to basket reach the first screen. Blocksy writes aspect-ratio:1/1
   inline on each main image, so only !important can change it. */
@media (max-width:639.98px){
  body.single-product .woocommerce-product-gallery .flexy-item .ct-media-container img,
  body.single-product .woocommerce-product-gallery .ct-product-gallery-container > .ct-media-container img{aspect-ratio:4/3 !important}
  body.single-product .woocommerce-product-gallery .flexy-pills li{--thumbs-width:56px}
  body.single-product .woocommerce-product-gallery{margin-bottom:16px}
}

/* Arrows and the zoom trigger: white 40px circles with a line border. */
body.single-product .woocommerce-product-gallery [class*="flexy-arrow"],
body.single-product .woocommerce-product-gallery__trigger{
  width:40px;height:40px;
  border:1px solid var(--db-line);
  box-shadow:var(--db-shadow-s,none);
}
@media (pointer:coarse){
  body.single-product .woocommerce-product-gallery [class*="flexy-arrow"],
  body.single-product .woocommerce-product-gallery__trigger{width:44px;height:44px}
}


/* ---------------------------------------------------------------------------
   14. Product summary — kicker, title, price, spec table, stock, buy row, facts, meta.
   --------------------------------------------------------------------------- */
body.single-product .entry-summary-items > *{--product-element-spacing:20px}
body.single-product .entry-summary-items > .db-product-kicker,
body.single-product .entry-summary-items > .product_title{--product-element-spacing:12px}
body.single-product .entry-summary-items > .ct-product-add-to-cart{--product-element-spacing:16px}
/* global.css spaces the dividers at 35px with an attribute selector (0,3,0). */
body.single-product .entry-summary-items > .ct-product-divider{--product-element-spacing:20px}

.db-product-kicker{
  display:flex;align-items:center;gap:10px;
  margin:0;
  font-family:var(--db-mono);font-size:11.5px;font-weight:600;line-height:1.3;
  letter-spacing:.08em;text-transform:uppercase;
  color:var(--db-amber-ink);
}
.db-product-kicker::before{content:"";flex:none;width:26px;height:1px;background:var(--db-amber)}

body.single-product .entry-summary .product_title{
  --theme-font-size:var(--db-fs-h1-product,clamp(24px,2.6vw,32px));
  --theme-font-weight:800;--theme-line-height:1.15;
  margin-top:0; /* the bottom margin comes from --product-element-spacing */
  font-size:var(--db-fs-h1-product,clamp(24px,2.6vw,32px));
  font-weight:800;line-height:1.15;letter-spacing:-.025em;
  color:var(--db-ink);
  text-wrap:balance;
}

body.single-product .entry-summary .woocommerce-product-rating{
  display:flex;align-items:center;gap:10px;margin:0;
}
body.single-product .entry-summary .woocommerce-product-rating .star-rating{
  margin:0;font-size:14px;
  --star-rating-initial-color:var(--db-amber);
  --star-rating-inactive-color:var(--db-line-strong,var(--db-ink-3));
}
body.single-product .entry-summary .woocommerce-review-link{font-size:13px;color:var(--db-ink-2)}
body.single-product .entry-summary .woocommerce-review-link:hover{color:var(--db-amber-ink)}

/* Price: mono 28px; on sale, the struck price sits beside the current one. */
body.single-product .entry-summary p.price{
  --theme-font-family:var(--db-mono);--theme-font-size:var(--db-fs-price-lg,28px);--theme-font-weight:700;
  display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;
  margin-top:0;
  font-family:var(--db-mono);font-size:var(--db-fs-price-lg,28px);font-weight:700;line-height:1.1;
  letter-spacing:-.02em;font-variant-numeric:tabular-nums;
  color:var(--db-ink);
}
body.single-product .entry-summary p.price .sale-price{
  display:inline-flex;flex-direction:row;flex-wrap:wrap;align-items:baseline;justify-content:flex-start;gap:4px 10px;
}
body.single-product .entry-summary p.price ins{order:1;text-decoration:none;background:none}
body.single-product .entry-summary p.price del{
  order:2;margin:0;opacity:1;
  font-size:16px;font-weight:500;letter-spacing:0;
  color:var(--db-ink-2);
  text-decoration:line-through;text-decoration-thickness:1px;
}
/* "Save R56.00" (inc/shop.php), an amber pill beside the price. */
.db-save{
  display:inline-flex;align-items:center;gap:.5em; /* a flex item drops the space after "Save" */
  height:24px;padding:0 9px;
  font-family:var(--db-mono);font-size:11px;font-weight:700;line-height:1;
  letter-spacing:.08em;text-transform:uppercase;white-space:nowrap;
  color:var(--db-amber-ink);
  background:var(--db-amber-tint,var(--db-panel-2));
  border:1px solid color-mix(in srgb,var(--db-amber) 34%,transparent);
  border-radius:var(--db-radius-xs,5px);
}
.db-save .amount{font-size:inherit;font-weight:inherit;letter-spacing:.02em}

body.single-product .entry-summary .woocommerce-product-details__short-description{
  font-size:15px;line-height:1.6;color:var(--db-ink-2);
}
body.single-product .entry-summary .woocommerce-product-details__short-description > :last-child{margin-bottom:0}

/* Spec table (functions.php), aligned with the shared table look: the caption is the
   mono head row, in ink-2 (ink-3 on panel-2 is 3.72:1). The LiPo note loses its blue:
   data-blue is kept for the voltage trace. */
body.single-product .db-spec-table caption{
  padding:11px 14px;
  font-family:var(--db-mono);font-size:11px;font-weight:600;line-height:1.3;
  letter-spacing:.1em;text-transform:uppercase;
  color:var(--db-ink-2);
}
body.single-product .db-spec-table th,
body.single-product .db-spec-table td{padding:10px 14px}
body.single-product .db-spec-table td{font-variant-numeric:tabular-nums}
body.single-product .db-charge-note{padding:12px 14px;line-height:1.45}
body.single-product .db-charge-note.is-lipo{background:var(--db-panel-2);color:var(--db-ink)}

body.single-product .entry-summary .ct-product-divider{border-top:1px solid var(--db-line)}

/* Stock: batteries show the pill (inc/shop.php); drones keep WooCommerce's text. */
body.single-product .entry-summary .stock{
  margin:0 0 12px;
  font-size:14px;font-weight:500;line-height:1.4;
  color:var(--db-ink-2);
}
body.single-product .entry-summary .db-stock .db-stockpill{
  position:static;top:auto;right:auto;z-index:auto;
  display:inline-flex;align-items:center;gap:6px;
  height:24px;padding:0 9px;
  font-size:11px;line-height:1;
  box-shadow:none;
}

/* Buy row: quantity stepper 128×52 and the amber button filling the rest. */
body.single-product .entry-summary-items > .ct-product-add-to-cart > .cart{
  --theme-button-min-height:52px;--theme-button-font-size:15.5px;--theme-button-padding:0 26px;
}
body.single-product .entry-summary .ct-cart-actions{
  display:flex;flex-wrap:wrap;align-items:stretch;gap:10px;
}
body.single-product .entry-summary .ct-cart-actions .quantity[data-type]{
  --quantity-width:128px;--quantity-height:52px;
  flex:0 0 auto;
}
body.single-product .entry-summary .ct-cart-actions .single_add_to_cart_button{
  flex:1 1 0;min-width:0;min-height:52px;
  font-size:15.5px;
}
/* WooCommerce's "View basket" after an add: its own line, not a third column. */
body.single-product .entry-summary .ct-cart-actions .added_to_cart{
  flex:0 0 100%;justify-content:flex-start;max-width:none;
}
@media (max-width:399.98px){
  body.single-product .entry-summary .ct-cart-actions .quantity[data-type]{--quantity-width:112px}
}

/* Delivery and payment facts under the button. */
.db-buyfacts{
  display:flex;flex-direction:column;gap:8px;
  margin:0;padding:14px 16px;
  list-style:none;
  border:1px dashed var(--db-line);
  border-radius:var(--db-radius-m,10px);
}
.db-buyfacts li{
  display:flex;align-items:center;gap:10px;
  margin:0;
  font-family:var(--db-mono);font-size:12.5px;line-height:1.4;
  color:var(--db-ink-2);
}
.db-buyfacts svg{flex:none;width:16px;height:16px;color:var(--db-ink-2)}

/* Meta: labels as mono readouts, values in the text face. Blocksy's selector is
   (0,4,1), hence the depth here. */
body.single-product .product .product_meta{display:flex;flex-direction:column;gap:4px}
body.single-product .product .product_meta > span,
body.single-product .product .product_meta > span:not(:last-child){
  display:block;margin:0;
  font-family:var(--db-mono);font-size:11px;font-weight:600;line-height:1.5;
  letter-spacing:.08em;text-transform:uppercase;
  color:var(--db-ink-2);
}
body.single-product .product .product_meta > span > *{
  opacity:1;
  font-family:var(--db-sans,var(--theme-font-family));font-size:12.5px;font-weight:500;
  letter-spacing:0;text-transform:none;
  color:var(--db-ink-2);
}
body.single-product .product .product_meta > span > .sku{font-family:var(--db-mono);font-variant-numeric:tabular-nums}
body.single-product .product .product_meta a{text-decoration:none}
body.single-product .product .product_meta a:hover{color:var(--db-amber-ink);text-decoration:underline}


/* ---------------------------------------------------------------------------
   15. Product tabs — uppercase labels with an amber underline, white panel.
   --------------------------------------------------------------------------- */
body.single-product .product > .woocommerce-tabs{padding-top:48px}

body .woocommerce-tabs[data-type] .tabs{
  --tab-background:transparent;
  --theme-font-size:13px;--theme-font-weight:700;--theme-line-height:1;
  --theme-letter-spacing:.07em;--theme-text-transform:uppercase;
  --theme-link-initial-color:var(--db-ink-2);
  --theme-link-hover-color:var(--db-amber-ink);
  --theme-link-active-color:var(--db-ink);
}
body.woocommerce div.product div.woocommerce-tabs ul.tabs{
  margin-block:0;padding:0;gap:0; /* inline margins stay auto: the bar is .is-width-constrained */
  border-bottom:1px solid var(--db-line);
}
body.woocommerce div.product div.woocommerce-tabs ul.tabs li{margin:0 14px;border:0}
/* Blocksy's active bar is li.active::before at (0,5,5); the amber bar is on the link. */
body.woocommerce div.product div.woocommerce-tabs ul.tabs li.active::before{display:none}
body.woocommerce div.product div.woocommerce-tabs ul.tabs li a{
  position:relative;
  padding:14px 4px;
  font-size:13px;font-weight:700;line-height:1;
  letter-spacing:.07em;text-transform:uppercase;white-space:nowrap;
  color:var(--db-ink-2);text-decoration:none;
}
body.woocommerce div.product div.woocommerce-tabs ul.tabs li a::after{
  content:"";position:absolute;left:0;right:0;bottom:0;height:2px;
  background:var(--db-amber);
  transform:scaleX(0);transform-origin:left;
}
body.woocommerce div.product div.woocommerce-tabs ul.tabs li a:hover{color:var(--db-amber-ink)}
body.woocommerce div.product div.woocommerce-tabs ul.tabs li.active a{color:var(--db-ink)}
body.woocommerce div.product div.woocommerce-tabs ul.tabs li.active a::after{transform:scaleX(1)}
body.woocommerce div.product div.woocommerce-tabs ul.tabs li a:focus-visible{outline-offset:-3px}

@media (max-width:999.98px){
  body.woocommerce div.product div.woocommerce-tabs ul.tabs{
    --vertical-alignment:center;
    flex-direction:row;flex-wrap:nowrap;justify-content:flex-start;
    overflow-x:auto;scrollbar-width:none;
  }
  body.woocommerce div.product div.woocommerce-tabs ul.tabs::-webkit-scrollbar{display:none}
  body.woocommerce div.product div.woocommerce-tabs ul.tabs li{flex:none;border-top:0}
  body.woocommerce div.product div.woocommerce-tabs ul.tabs li:first-child{margin-left:0}
}

/* The panel is a full-width block in Blocksy; it takes the content column's width so it
   lines up with the tab bar, the gallery and the header. */
body.woocommerce div.product div.woocommerce-tabs div.woocommerce-Tabs-panel.panel{
  box-sizing:border-box;
  width:var(--theme-container-width,92vw);
  max-width:var(--theme-normal-container-max-width,1180px);
  margin:24px auto 0;padding:32px 36px;
  background:var(--db-panel);
  border:1px solid var(--db-line);
  border-radius:var(--db-radius-l,12px);
}
body.single-product .woocommerce-Tabs-panel--description > *{max-width:72ch}
body.single-product .woocommerce-Tabs-panel--description p,
body.single-product .woocommerce-Tabs-panel--description li{font-size:16px;line-height:1.7;color:var(--db-ink-2)}
body.single-product .woocommerce-Tabs-panel--description :is(h2,h3,h4){color:var(--db-ink);letter-spacing:-.01em}
@media (max-width:689.98px){
  body.woocommerce div.product div.woocommerce-tabs div.woocommerce-Tabs-panel.panel{padding:20px 18px}
}


/* ---------------------------------------------------------------------------
   16. Reviews.
   --------------------------------------------------------------------------- */
body.single-product #reviews .woocommerce-Reviews-title,
body.single-product #reviews .comment-reply-title{
  margin:0 0 12px;
  font-size:var(--db-fs-panel,18px);font-weight:800;line-height:1.25;letter-spacing:-.02em;
  color:var(--db-ink);
}
body.single-product #reviews .woocommerce-noreviews,
body.single-product #reviews .must-log-in,
body.single-product #reviews .comment-notes{font-size:14px;color:var(--db-ink-2)}
body.single-product #reviews .must-log-in a{color:var(--db-amber-ink)}

body.single-product #reviews .commentlist{margin:0;padding:0;list-style:none}
body.single-product #reviews .commentlist li{margin:0 0 12px;border-top:0}
body.single-product #reviews .commentlist .comment_container{
  gap:14px;
  padding:18px 20px;
  background:var(--db-panel);
  border:1px solid var(--db-line);
  border-radius:var(--db-radius-l,12px);
}
@media (min-width:480px){
  body.single-product #reviews .ct-has-avatar .comment_container{grid-template-columns:40px minmax(0,1fr);gap:16px}
}
body.single-product #reviews .avatar{width:40px;height:40px;max-width:40px;border-radius:50%}
body.single-product #reviews .star-rating{
  font-size:13px;
  --star-rating-initial-color:var(--db-amber);
  --star-rating-inactive-color:var(--db-line-strong,var(--db-ink-3));
}
body.single-product #reviews .meta{margin:0 0 6px;color:var(--db-ink-2)}
body.single-product #reviews .meta .woocommerce-review__author{
  font-size:13px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--db-ink-2);
}
body.single-product #reviews .meta time,
body.single-product #reviews .meta .woocommerce-review__published-date{
  font-family:var(--db-mono);font-size:12px;font-weight:500;letter-spacing:0;text-transform:none;
  font-variant-numeric:tabular-nums;color:var(--db-ink-2);
}
body.single-product #reviews .meta em{font-size:11.5px;font-style:normal;text-transform:none;letter-spacing:0;color:var(--db-ok-ink,var(--db-ink-2))}
body.single-product #reviews .description,
body.single-product #reviews .description p{font-size:15px;line-height:1.6;color:var(--db-ink)}

body.single-product #review_form{top:calc(var(--db-header-h,64px) + 24px)}

/* Star picker: 44px tap targets; outline stars in line-strong until chosen. */
body.single-product #review_form .comment-form-rating .stars a{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:44px;min-height:44px;padding:0;
}
body.single-product #review_form .comment-form-rating .stars a::before{font-size:28px;color:var(--db-line-strong,var(--db-ink-3))}
body.single-product #review_form .comment-form-rating .stars:has(a:hover) a::before,
body.single-product #review_form .comment-form-rating .stars.selected a::before{color:var(--db-amber)}
body.single-product #review_form .comment-form-rating .stars a:hover ~ a::before,
body.single-product #review_form .comment-form-rating .stars.selected a.active ~ a::before{color:var(--db-line-strong,var(--db-ink-3))}


/* ---------------------------------------------------------------------------
   17. Related products and upsells — the shared card grid under a block heading.
       Blocksy's Customizer keeps related products off phones and tablets.
   --------------------------------------------------------------------------- */
body.single-product .related.products,
body.single-product .up-sells.products{margin-top:64px}
body.single-product section.related .ct-module-title,
body.single-product section.up-sells .ct-module-title{
  --theme-font-size:var(--db-fs-h2,clamp(22px,2.4vw,26px));--theme-font-weight:800;
  margin:0 0 24px;
  font-size:var(--db-fs-h2,clamp(22px,2.4vw,26px));font-weight:800;line-height:1.2;letter-spacing:-.02em;
  text-align:left;color:var(--db-ink);
}
body.single-product section.related .ct-module-title::before,
body.single-product section.up-sells .ct-module-title::before{
  content:"";display:block;width:26px;height:2px;margin-bottom:12px;
  background:var(--db-amber);
}
