/**
 * Будинок Затишку — component library. See mebelvdom-redesign-spec.md §4.
 * Buttons, badges/chips, product card, contacts popup, quantity stepper.
 */

/* ---------- Buttons (§4) ---------- */

.bz-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: opacity .15s ease, background-color .15s ease;
}
.bz-btn:hover { opacity: .9; text-decoration: none; }

/* До кошика — primary */
.bz-btn--primary {
  background: var(--c-coffee);
  color: var(--c-card);
}

/* Купити в 1 клік — accent, fast checkout */
.bz-btn--accent {
  background: var(--c-ginger);
  color: var(--c-card);
}

/* До каталогу — outline */
.bz-btn--outline {
  background: transparent;
  border-color: var(--c-coffee);
  color: var(--c-coffee);
}

/* Детальніше — tertiary / link */
.bz-btn--link {
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
  color: var(--c-coffee);
  font-weight: 600;
  text-decoration: underline;
}

.bz-btn--sm { padding: 8px 16px; font-size: 13px; }
.bz-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Badges / chips (§4) ---------- */

.bz-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  line-height: 1.6;
}
.bz-badge--sale { background: var(--c-sale); color: #fff; }
.bz-badge--new { background: var(--c-coffee); color: var(--c-card); }
.bz-badge--top { background: var(--c-ginger); color: #fff; }

.bz-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--c-pillow);
  color: var(--c-coffee);
  font-size: 13px;
  font-weight: 600;
}

/* Filter chip with removable ✕ */
.bz-chip--filter {
  background: var(--c-card);
  border: 1px solid var(--c-line);
}
.bz-chip__remove {
  border: none;
  background: none;
  color: var(--c-muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}
.bz-chip__remove:hover { color: var(--c-sale); }

/* ---------- Product card (§4) ---------- */

.bz-card {
  position: relative;
  background: var(--c-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.bz-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--c-bg);
  overflow: hidden;
}
/* Default: cover, edge-to-edge — the preferred look for the catalog's
   normal wide lifestyle photography (whole kitchens etc.), filling the
   card with no letterboxing. Portrait-oriented images (tall/narrow
   technical elevation drawings of individual modules) get cropped to an
   unrecognisable sliver under cover, so chrome.js detects those once
   loaded and adds .is-tall to the wrapper — see the .is-tall override
   below, which switches just those images to contain instead. */
.bz-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Tall/portrait images (flagged by chrome.js) letterbox + center on the
   cream media bg with a small inset — no border. Because the img is
   absolutely positioned the box stays a strict 4/3, so titles line up
   across the row. Padding lives on the img (an absolute img ignores the
   wrapper's padding), mirroring the .bz-product__related override. */
.bz-card__media.is-tall img {
  object-fit: contain;
  padding: var(--space-3);
  box-sizing: border-box;
}
.bz-card__badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
}
.bz-card__wish {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 253, 249, .9);
  color: var(--c-coffee);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
}
.bz-card__wish[aria-pressed="true"] { color: var(--c-sale); }

/* Two separate .bz-card__link anchors per card -- one wrapping .bz-card__media,
   one wrapping .bz-card__name -- rather than one anchor wrapping the whole
   card: the manufacturer name in .bz-card__meta is now its own link
   (.bz-link-brand, see chrome.css), and a real <a> can't legally nest
   inside another <a>. .bz-card__body carries its own flex:1 (below) to
   fill the remaining vertical space that a single wrapping anchor used to
   provide, so the price-row's margin-top:auto still sticks to the card's
   bottom edge exactly as before. */
.bz-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.bz-card__body {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
}
.bz-card__meta {
  font-size: 12px;
  color: var(--c-muted);
}
.bz-card__name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  color: var(--c-coffee);
  margin: 0;
}
.bz-card__rating {
  font-size: 12px;
  color: var(--c-muted);
}
.bz-card__rating .bz-stars { color: var(--c-ginger); letter-spacing: 1px; }

/* Price + "Купити" sit together in the card's bottom-right, per design —
   this row is a sibling of .bz-card__link (not nested inside it), so it
   still gets its own padding to align with the card's content above. */
.bz-card__price-row {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 0 var(--space-4) var(--space-4);
}
/* A 6-digit price plus the 14px CTA fills ~95% of a 3-up card at 1024px, so
   the pair is one long price away from not fitting. nowrap keeps the value
   itself intact -- "143 020 / грн" split over two lines reads as broken --
   and flex-wrap lets the button drop cleanly onto its own line in the rare
   case there is genuinely no room, at any card width and price length. */
.bz-card__price-row { flex-wrap: wrap; }
.bz-card__price-row .bz-price { font-size: 18px; white-space: nowrap; }
.bz-card__unit { font-size: 11px; color: var(--c-muted); font-weight: 400; }

/* A category may carry a card note (admin text, com_vmcategorysettings «card_note»,
   e.g. what a modular kitchen's «Від … за м.п.» price covers). It shows on hover:
   the note hangs off the card's bottom edge, so the card reads as
   growing downward over the row below instead of shifting the grid. Only
   where a real hover exists -- touch screens keep the plain card (the same
   product page carries the full detail). The card is the hover
   target and the note is its child, so the pointer can travel down into it
   without closing it. */
.bz-card__note { display: none; }
@media (hover: hover) and (pointer: fine) {
  .bz-card--note { overflow: visible; }
  .bz-card--note .bz-card__media { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .bz-card__note {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 30;
    margin: 0;
    padding: var(--space-3) var(--space-4) var(--space-4);
    background: var(--c-card);
    border-top: 1px solid var(--c-line);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-card);
    /* keep the shadow off the card above, so the two read as one body */
    clip-path: inset(0 -32px -48px -32px);
    font-size: 12px;
    line-height: 1.5;
    color: var(--c-muted);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity .15s, transform .15s, visibility 0s .15s;
  }
  .bz-card--note:hover,
  .bz-card--note:focus-within { z-index: 30; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .bz-card--note:hover .bz-card__note,
  .bz-card--note:focus-within .bz-card__note {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: .12s, .12s, 0s;
  }
}
/* Compound `.bz-btn.bz-card__cta` (0,2,0), not the bare class: VirtueMart's
   own vm-bs5-common.css carries
   `@media (max-width:1024px){.addtocart-button{font-size:15px}}`, which ties
   on specificity with a bare .bz-card__cta and wins on source order (it is
   enqueued after ours). The card CTA was therefore 12px on desktop but 15px
   below 1024px -- an accidental split, not a responsive decision. The
   compound selector wins at every width, so this is now a single deliberate
   14px on the body token. Padding nudged with it to keep the pill shape. */
.bz-btn.bz-card__cta {
  flex-shrink: 0;
  margin-left: auto;
  padding: 6px 12px;
  font-size: 14px;
}
/* "Купити" is a real <form> (see category/default.php) — the form takes
   no box, so its button participates directly in .bz-card__price-row's
   flex layout exactly as a bare button would. */
.bz-card__cta-form { display: contents; }

/* Colour swatches on a listing card (§6.4) — visually the configurator card's
   own swatch row (productdetails.css .bz-configurator__swatch), because it is
   the same control doing the same job one page earlier. Sits between the name
   and the price row, so the card's bottom-aligned price stays put whether a
   product has colours or not.

   Every option is in the DOM; category-colors.js hides the ones past the
   per-breakpoint cutoff and labels the "+N" button, which opens the shared
   .bz-color-modal below. Squares, not circles, per design feedback
   (2026-07-30). */
.bz-card__colors {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 2px;
  /* Reserved before the swatches arrive (category-colors.js fetches them), so
     the price row underneath does not jump once they do. Exactly one row tall:
     the overflow is folded into the "+N" button, never a second line. */
  min-height: 26px;
}
.bz-card__swatch {
  width: 24px; height: 24px;
  border-radius: 5px;
  border: 1px solid var(--c-line);
  background-size: cover;
  background-position: center;
  background-color: var(--c-bg);
  padding: 0;
  cursor: pointer;
}
.bz-card__swatch.is-selected { border: 2px solid var(--c-ginger); }
.bz-card__swatch-more {
  height: 24px;
  padding: 0 7px;
  border-radius: 5px;
  border: 1px solid var(--c-line);
  background: var(--c-card);
  color: var(--c-muted);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
@media (max-width: 767px) {
  .bz-card__swatch, .bz-card__swatch-more { height: 22px; }
  .bz-card__swatch { width: 22px; }
  .bz-card__swatch-more { padding: 0 6px; }
}
/* A card with a swatch row keeps its own bottom-aligned price: .bz-card__body
   already has flex:1, and the row's margin-top:auto above pins the swatches to
   the body's bottom edge, so names of different lengths still leave the
   swatches (and the price under them) on one line across the row. */
.bz-recently-viewed__grid .bz-card__colors { display: none; }

/* Shared colour-picker overlay (design frame "2h") — one instance per page,
   opened from a "+N" swatch-overflow button, on the product page (configurator
   modules) and the category listing (product cards) alike. Lives here rather
   than in productdetails.css because both of those pages render the same
   partial (templates/budynok/tmpl/_color_modal.php) and only this stylesheet
   is loaded on both. */
.bz-color-modal[hidden] { display: none; }
.bz-color-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; }
.bz-color-modal__backdrop { position: absolute; inset: 0; background: rgba(28, 21, 15, .5); }
.bz-color-modal__panel {
  position: relative;
  width: min(560px, calc(100vw - 32px));
  max-height: min(600px, calc(100vh - 32px));
  display: flex;
  flex-direction: column;
  background: var(--c-card);
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
  overflow: hidden;
}
.bz-color-modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--c-line);
}
.bz-color-modal__head h3 { margin: 0; font-family: var(--font-heading); font-size: 16px; color: var(--c-coffee); }
.bz-color-modal__close { background: none; border: none; font-size: 16px; color: var(--c-muted); cursor: pointer; padding: 4px; }
.bz-color-modal__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: var(--space-3);
  padding: var(--space-4);
  overflow-y: auto;
}
.bz-color-modal__tile {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px;
  border: 1px solid var(--c-line);
  border-radius: 9px;
  background: var(--c-bg);
  cursor: pointer;
  text-align: center;
}
.bz-color-modal__tile.is-selected { border: 2px solid var(--c-ginger); padding: 5px; }
.bz-color-modal__tile-swatch { width: 100%; aspect-ratio: 1; border-radius: 6px; background-size: cover; background-position: center; background-color: var(--c-card); }
.bz-color-modal__tile-name { font-size: 11px; color: var(--c-text); text-transform: none; letter-spacing: 0; overflow-wrap: anywhere; }
.bz-color-modal__tile-price { font-size: 10.5px; font-weight: 600; color: var(--c-muted); }
.bz-color-modal__foot {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--c-line);
  flex-wrap: wrap;
}
.bz-color-modal__selected { font-size: 12px; color: var(--c-muted); }
.bz-color-modal__actions { display: flex; gap: var(--space-2); margin-left: auto; }

/* ---------- Contacts popup (§3.2) ---------- */

.bz-contacts-popup {
  position: fixed;
  inset: 0;
  background: rgba(58, 44, 32, .45);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 80px var(--space-4) var(--space-4);
  z-index: 1000;
}
.bz-contacts-popup.is-open { display: flex; }
/* Page frozen behind an open modal. `position: fixed` rather than
   `overflow: hidden` because iOS honours only the former; chrome.js
   carries the scroll offset across on `top` and restores it on close,
   since fixing the body otherwise snaps the page to the top.

   Touch widths only. The problem it solves is a touch one — a tap that
   pans the page behind the overlay is a tap whose click the browser
   discards — while on desktop taking the body out of flow would remove
   the scrollbar and shift the whole page sideways as the popup opens.
   The scroll offset arrives as --bz-lock-top (set by chrome.js /
   manufacturer-docs.js) and is read ONLY here, inside the touch-width
   rule. It used to be an inline `top` on <body>, which is live at every
   width because Cassiopeia gives <body> `position: relative` — so above
   899px opening the popup threw the whole page up by the scroll offset
   (scrolled to the bottom: a blank page). Keep it out of inline style. */
@media (max-width: 899px) {
  body.bz-modal-open {
    position: fixed;
    top: var(--bz-lock-top, 0);
    left: 0;
    right: 0;
    width: 100%;
    overflow: hidden;
  }
}
/* Keep touches that land in the popup from panning the page behind it. A
   fixed overlay does not stop the document scrolling underneath, and a
   touch that pans is a touch whose click the browser then throws away —
   which is what made a quick tap on a phone number do nothing while a
   long press still offered "Call". overscroll-behavior stops the pan
   chaining out to the page; overflow-y keeps the popup itself reachable
   if it ever outgrows a short landscape viewport. chrome.js has a
   touchend fallback for the same bug — see the comment there for why
   both. */
.bz-contacts-popup {
  overflow-y: auto;
  overscroll-behavior: contain;
}
/* No double-tap-zoom wait on the rows: it delays the click by ~300ms on
   the browsers that still do it, which is long enough to feel dead. */
.bz-contacts-popup__phone { touch-action: manipulation; }
.bz-contacts-popup__panel {
  background: var(--c-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-5);
  width: 100%;
  max-width: 360px;
}

/* ---- Opened from the header phones: a dropdown, not a centred modal ----
   Owner, 2026-09-01: clicking a phone number should drop the panel right
   under the numbers, not throw a dialog into the middle of the screen.

   It is a VARIANT, not a replacement, because five different controls open
   this same popup -- the homepage "Викликати заміряльника", the product
   page's "Свій розмір під замовлення", the catalog page's "Зв'язатися з
   нами", and the two phone buttons. Only a phone has a sensible thing to
   hang from; for the rest, dropping the panel under a header they may have
   scrolled far past would be worse than centring it. chrome.js adds
   .is-anchored only when the click came from inside .bz-header__phones,
   and clears it otherwise.

   Anchored by its RIGHT edge: the phones sit on the right of the header,
   so a left-anchored panel would hang off the viewport. chrome.js writes
   both offsets as custom properties and refreshes them on scroll/resize.

   Desktop only. Below 900px the panel keeps its modal shape -- the header
   there is one compact row, the body-freeze and tap-to-call handling in
   chrome.js are built around the full-screen overlay, and a 320px dropdown
   pinned to a 375px viewport is a modal in all but name anyway. */
@media (min-width: 900px) {
  .bz-contacts-popup.is-anchored {
    /* No scrim: this reads as a menu belonging to the header, and dimming
       the whole page for a phone number is the modal behaviour being moved
       away from. The element still spans the viewport, so the existing
       click-on-the-backdrop-to-close handler keeps working unchanged. */
    background: none;
    padding: 0;
  }
  .bz-contacts-popup.is-anchored.is-open { display: block; }
  .bz-contacts-popup.is-anchored .bz-contacts-popup__panel {
    position: absolute;
    top: var(--bz-anchor-top, 80px);
    right: var(--bz-anchor-right, var(--bz-gutter));
    width: 320px;
    max-width: calc(100vw - var(--bz-gutter) * 2);
  }
}
.bz-contacts-popup__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}
.bz-contacts-popup__title { margin: 0; font-family: var(--font-heading); font-weight: 600; color: var(--c-coffee); font-size: 14px; line-height: 24px; letter-spacing: .04em; text-transform: uppercase; }
.bz-contacts-popup__close {
  border: none;
  background: none;
  font-size: 18px;
  color: var(--c-muted);
  cursor: pointer;
}
/* The row itself is the tel: link (owner, 2026-07-29 — see index.php);
   the ✆ chip inside it is decoration, so the whole line and its padding
   are the tap target rather than a 32px circle at one end. It still has
   to look like the plain text row it has always been: no underline, and
   the same coffee it had as a div. */
.bz-contacts-popup__phone {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--c-line);
  font-weight: 700;
  color: var(--c-coffee);
  text-decoration: none;
}
.bz-contacts-popup__phone:hover { color: var(--c-coffee); text-decoration: none; }
/* The label/number pair keeps the original row's own spacing — the call
   chip (mobile only, below) sits in front of it, not inside it, so it
   doesn't get pulled into that spread. */
.bz-contacts-popup__phone-text {
  display: flex;
  flex: 1;
  justify-content: space-between;
  align-items: baseline;
  min-width: 0;
}
.bz-contacts-popup__phone small { color: var(--c-muted); font-weight: 400; }
/* Desktop: no separate call affordance, the row is already just text. */
.bz-contacts-popup__call { display: none; }
@media (max-width: 899px) {
  .bz-contacts-popup__call {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--c-ginger);
    color: #fff;
    text-decoration: none;
    font-size: 14px;
  }
  /* Taller rows so each one clears the 44px minimum touch target on its
     own, now that the whole row is what gets tapped. */
  .bz-contacts-popup__phone { padding: var(--space-3) 0; }
  .bz-contacts-popup__phone:active { background: rgba(74, 52, 38, .06); }
}
.bz-contacts-popup__hours { margin: var(--space-3) 0; font-size: 14px; color: var(--c-muted); }
.bz-contacts-popup__socials { display: flex; gap: var(--space-2); }
.bz-contacts-popup__socials a {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--c-pillow); color: var(--c-coffee);
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
}
.bz-contacts-popup__social-icon { width: 18px; height: 18px; fill: currentColor; }
/* Hover / keyboard focus: phone rows tint and the number turns ginger; the
   messenger chips fill ginger. Hover only where a pointer can hover, so a
   tap on a phone does not leave the row stuck in the hover state. */
.bz-contacts-popup__phone,
.bz-contacts-popup__socials a { transition: background-color .15s ease, color .15s ease; }
.bz-contacts-popup__phone:focus-visible { background: rgba(74, 52, 38, .06); outline: none; }
.bz-contacts-popup__socials a:focus-visible { background: var(--c-ginger); color: #fff; outline: none; }
@media (hover: hover) {
  .bz-contacts-popup__phone:hover { background: rgba(74, 52, 38, .06); }
  .bz-contacts-popup__phone:hover .bz-contacts-popup__phone-text span:last-child { color: var(--c-ginger); }
  .bz-contacts-popup__socials a:hover { background: var(--c-ginger); color: #fff; }
}

/* ---------- Quantity stepper (§4) ---------- */

.bz-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.bz-stepper__btn {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--c-card);
  color: var(--c-coffee);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bz-stepper__btn:hover { background: var(--c-pillow); }
.bz-stepper__value {
  width: 32px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
}

/* ---------- "Recently seen" (shared: home page + category page) ----------
   Self-contained (padding/title styles included) since it's used from both
   home.css and category.css pages — not dependent on either bundle's own
   .bz-section rule. Populated client-side from localStorage by chrome.js
   (see recently-viewed.js); [hidden] until there's at least one entry. */
.bz-recently-viewed { padding: var(--space-6) 0; }
.bz-recently-viewed[hidden] { display: none; }
.bz-recently-viewed .bz-section__title { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: var(--space-4); }
.bz-recently-viewed .bz-section__title h2 { margin: 0; }
/* Strictly one row. grid-auto-flow: column puts every rendered card into a
   single track row no matter how many there are; recently-viewed.js decides
   HOW MANY to render at the current width (and re-renders on resize), so a
   wide screen shows six and a laptop four — never a squeezed second line. */
.bz-recently-viewed__grid {
  display: grid;
  /* A full row's worth of columns, ALWAYS — not one column per item.
     recently-viewed.js sets --bz-rv-cols from the available width. With
     one column per item a two-item history stretched each card to half
     the page; now two items simply occupy the first two slots of the row
     at exactly the size they'd be if the row were full. */
  /* recently-viewed.js overwrites this inline with the exact track count
     it is about to fill; this value only ever applies with JS off. */
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: var(--space-4);
}
/* Below the phone breakpoint the row scrolls sideways rather than shrinking,
   so the whole stored history stays reachable. */
@media (max-width: 599px) {
  .bz-recently-viewed__grid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 46vw;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    margin: 0 calc(var(--space-4) * -1);
    padding: 0 var(--space-4);
    /* Without this the first card's scroll-snap-align: start snaps to the
       scrollport edge, scrolling the padding away and butting the card
       against the screen edge on load. */
    scroll-padding: 0 var(--space-4);
    scrollbar-width: none;
  }
  .bz-recently-viewed__grid::-webkit-scrollbar { display: none; }
  .bz-recently-viewed__grid > * { scroll-snap-align: start; }
}
.bz-recently-viewed__clear {
  border: none;
  background: none;
  padding: 0;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--c-muted);
  text-decoration: underline;
  cursor: pointer;
  white-space: nowrap;
}
.bz-recently-viewed__clear:hover { color: var(--c-sale); }

/* The strip reuses .bz-card, but it's a glance-back row, not a catalogue
   grid — at full card scale it dominated the page. Everything inside it is
   dialled down a step: shorter media, tighter body, smaller type. */
.bz-recently-viewed__grid .bz-card { border-radius: var(--radius-sm); }
.bz-recently-viewed__grid .bz-card__media { aspect-ratio: 5 / 4; }
.bz-recently-viewed__grid .bz-card__body { padding: var(--space-2) var(--space-3) var(--space-3); gap: 2px; }
.bz-recently-viewed__grid .bz-card__meta { font-size: 11px; }
.bz-recently-viewed__grid .bz-card__name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13.5px;
  line-height: 1.35;
  color: var(--c-text);
}
.bz-recently-viewed__grid .bz-card__price-row { padding: 0 var(--space-3) var(--space-3); }
.bz-recently-viewed__grid .bz-card__price-row .bz-price { font-size: 14px; }
.bz-recently-viewed__grid .ph-img {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--c-muted); font-size: 12px;
  background: repeating-linear-gradient(45deg, var(--c-line), var(--c-line) 10px, var(--c-bg) 10px, var(--c-bg) 20px);
}
