/* ============================================================
   BRAMBIX BOOKS — STOREFRONT (v11, mobile-first)
   Header shell, homepage, shop grid, footer, product-page layout.

   Rules of this file
   - Phone styles are the default. Larger screens are layered on with
     min-width queries at THREE breakpoints only:
       640px  (large phone / small tablet)
       960px  (tablet landscape / small laptop)
       1280px (desktop)
   - Sizes are fluid (clamp) — no fixed pixel font sizes for headings.
   - No white-space:nowrap on headings or buttons, no 100vw, and no
     overflow:hidden used to hide broken layouts.
   - Additional CSS in the Customizer should stay EMPTY. Put changes here.
   ============================================================ */

:root {
  --bb-max: 1200px;
  --bb-gutter: clamp(16px, 5vw, 48px);
  --bb-section-y: clamp(48px, 7vw, 88px);
  /* side padding that also centres content inside full-width sections */
  --bb-pad-x: max(var(--bb-gutter), calc((100% - var(--bb-max)) / 2));

  --bb-fs-h1: clamp(2.125rem, 1.45rem + 3.4vw, 4rem);
  --bb-fs-h2: clamp(1.625rem, 1.25rem + 1.9vw, 2.5rem);
  --bb-fs-h3: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem);
  --bb-fs-lead: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  --bb-fs-body: 1rem;
  --bb-fs-small: 0.875rem;
  --bb-fs-eyebrow: 0.75rem;

  --bb-radius: 18px;
  --bb-tap: 48px; /* minimum touch target */
}

/* ---------- Global safety net ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* clip (not hidden) so position:sticky keeps working */
html, body { overflow-x: clip; }
img, svg, video { max-width: 100%; height: auto; }
h1, h2, h3, h4 { overflow-wrap: break-word; text-wrap: balance; }
p { overflow-wrap: break-word; }

/* ============================================================
   HEADER — sticky instead of fixed (no hard-coded body offset,
   so nothing hides underneath it at any header height)
   ============================================================ */
body { padding-top: 0 !important; }
#masthead,
.site-header {
  position: sticky !important;
  top: var(--wp-admin--admin-bar--height, 0px) !important;
  z-index: 999 !important;
}
#masthead .site-header,
#masthead .ast-header-wrap { position: static !important; }

#masthead .ast-container,
.site-header .ast-container {
  max-width: calc(var(--bb-max) + 2 * var(--bb-gutter)) !important;
  padding-left: var(--bb-gutter) !important;
  padding-right: var(--bb-gutter) !important;
}

/* Logo scales instead of jumping */
.site-title, .site-title a { font-size: clamp(1.25rem, 1rem + 1.2vw, 1.75rem) !important; line-height: 1.1 !important; }
.custom-logo-link img, .site-logo-img img { max-height: clamp(40px, 6vw, 60px) !important; width: auto !important; }

/* Desktop nav: tighter pills so 4 items + cart fit at 960–1100px */
@media (min-width: 922px) {
  .main-header-menu > li > a,
  .ast-nav-menu > li > a { padding: 8px clamp(10px, 1.2vw, 20px) !important; font-size: clamp(14px, 0.85rem + 0.2vw, 16px) !important; }
}
/* Mobile header: everything on one centre line */
@media (max-width: 921px) {
  #ast-mobile-header .ast-builder-grid-row,
  .ast-mobile-header-wrap .ast-builder-grid-row { align-items: center !important; min-height: 64px; }
  .ast-mobile-header-content,
  .ast-mobile-header-wrap { width: 100% !important; left: 0 !important; right: 0 !important; }
  .ast-mobile-menu-buttons .menu-toggle,
  .ast-mobile-menu-buttons button { background: transparent !important; border: 0 !important; min-width: var(--bb-tap); min-height: var(--bb-tap); }
  .ast-mobile-header-content .main-header-menu > li > a { min-height: var(--bb-tap); font-size: 1rem !important; }
}

/* ============================================================
   HOMEPAGE — full-width canvas
   ============================================================ */
body.page-template-homepage .site-content > .ast-container,
body.page-template-homepage #primary {
  max-width: none !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  display: block !important;
}

.bb-home section { padding: var(--bb-section-y) var(--bb-pad-x); }
.bb-home h2 { font-size: var(--bb-fs-h2) !important; line-height: 1.15 !important; margin: 0 0 12px !important; }
.bb-home h3 { font-size: var(--bb-fs-h3) !important; line-height: 1.25 !important; }
.bb-home p { font-size: var(--bb-fs-body); line-height: 1.65; }

.bb-story-eyebrow {
  display: inline-block;
  font-family: var(--bb-body);
  font-size: var(--bb-fs-eyebrow);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bb-terra-deep);
  margin-bottom: 10px;
}
.bb-section-intro { max-width: 640px; margin-bottom: clamp(24px, 4vw, 40px); }
.bb-section-intro p { color: var(--bb-soft-ink) !important; margin: 0 !important; }

/* Buttons used on the homepage */
.bb-home .bb-btn {
  min-height: var(--bb-tap);
  justify-content: center;
  text-align: center;
  white-space: normal;
  font-size: 1rem !important;
  padding: 13px 26px !important;
}

/* ---------- 1. HERO ----------
   Phone: text on cream, artwork below as its own image.
   960+: artwork becomes the background with a cream scrim. */
.bb-hero {
  background: var(--bb-bg);
  padding-top: clamp(32px, 6vw, 56px) !important;
  padding-bottom: 0 !important;
}
.bb-hero::after {
  content: "";
  display: block;
  margin: 32px calc(-1 * var(--bb-gutter)) 0;
  aspect-ratio: 4 / 3;
  background: url('assets/hero-illustration.jpg') 78% center / cover no-repeat;
}
.bb-hero__inner { max-width: var(--bb-max); margin: 0 auto; }
.bb-hero__text { max-width: 620px; }
.bb-hero-badge {
  display: inline-block;
  background: var(--bb-white);
  color: var(--bb-terra-deep);
  font-weight: 800;
  font-size: var(--bb-fs-eyebrow);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: var(--bb-radius-pill);
  margin-bottom: 18px;
  box-shadow: 0 4px 14px -8px rgba(74,68,88,0.25);
}
.bb-hero h1 {
  font-size: var(--bb-fs-h1) !important;
  line-height: 1.06 !important;
  margin: 0 0 18px !important;
}
.bb-hero__text > p {
  font-size: var(--bb-fs-lead) !important;
  line-height: 1.7 !important;
  max-width: 34em;
  margin: 0 0 28px !important;
}
.bb-hero__ctas { display: flex; flex-direction: column; gap: 12px; margin-bottom: 22px; }
.bb-hero__ctas .bb-btn { width: 100%; }
.bb-hero__trust { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.bb-hero__trust span { display: inline-flex; align-items: center; gap: 6px; font-size: var(--bb-fs-small); font-weight: 600; color: var(--bb-soft-ink); }

@media (min-width: 640px) {
  .bb-hero__ctas { flex-direction: row; flex-wrap: wrap; }
  .bb-hero__ctas .bb-btn { width: auto; }
}
@media (min-width: 960px) {
  .bb-hero {
    background:
      linear-gradient(to right, rgba(251,244,234,0.96) 0%, rgba(251,244,234,0.82) 38%, rgba(251,244,234,0.15) 68%, rgba(251,244,234,0) 100%),
      url('assets/hero-illustration.jpg') right center / cover no-repeat;
    min-height: clamp(520px, 44vw, 720px);
    display: flex;
    align-items: center;
    padding-top: var(--bb-section-y) !important;
    padding-bottom: var(--bb-section-y) !important;
  }
  .bb-hero::after { display: none; }
  .bb-hero__inner { width: 100%; }
  .bb-hero__text { max-width: min(560px, 46vw); }
}

/* ---------- 2. TWO WAYS TO MAKE IT THEIRS ---------- */
.bb-make-theirs { background: var(--bb-white); }
.bb-make-theirs__intro { max-width: 640px; margin-bottom: clamp(24px, 4vw, 40px); }
.bb-make-theirs__intro p { color: var(--bb-soft-ink) !important; margin: 0 !important; }
.bb-make-theirs__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: clamp(16px, 2.5vw, 28px);
  max-width: 1080px;
  margin: 0 auto;
}
.bb-make-theirs__card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bb-deep-cream);
  border-radius: var(--bb-radius);
  overflow: hidden; /* rounds the image corners only */
  border: 1px solid rgba(74,68,88,0.06);
  transition: transform .2s ease, box-shadow .2s ease;
}
@media (hover: hover) {
  .bb-make-theirs__card:hover { transform: translateY(-3px); box-shadow: 0 10px 32px -10px rgba(74,68,88,0.2); }
}
.bb-make-theirs__visual { aspect-ratio: 3 / 2; background: var(--bb-deep-cream); }
.bb-make-theirs__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bb-make-theirs__body { display: flex; flex-direction: column; flex: 1; padding: clamp(18px, 3vw, 28px); }
.bb-make-theirs__body h3 { margin: 0 0 8px !important; }
.bb-make-theirs__body > p { color: #6B6478 !important; margin: 0 0 14px !important; }
.bb-make-theirs__equation {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px;
  font-size: var(--bb-fs-small); margin-bottom: 20px;
}
.bb-make-theirs__input--neutral { color: var(--bb-soft-ink); font-weight: 600; }
.bb-make-theirs__input--accent { color: var(--bb-terra-deep); font-weight: 800; }
.bb-make-theirs__sep, .bb-make-theirs__arrow { color: #B0A89E; }
.bb-make-theirs__output { color: var(--bb-ink); font-weight: 800; }
.bb-make-theirs__body-footer { margin-top: auto; }
.bb-make-theirs__cta {
  display: flex; align-items: center; justify-content: center;
  min-height: var(--bb-tap); width: 100%;
  padding: 12px 24px;
  background: var(--bb-terra); color: #fff !important;
  font-weight: 800; font-size: 1rem; text-align: center;
  border-radius: var(--bb-radius-pill);
  box-shadow: var(--bb-shadow-btn);
  transition: background .15s ease;
}
.bb-make-theirs__cta:hover { background: var(--bb-terra-deep); color: #fff !important; }
@media (min-width: 640px) {
  .bb-make-theirs__cta { width: auto; align-self: flex-start; }
}

/* ---------- 3. PICTURE BOOKS / EBOOK SHELVES ---------- */
.bb-shelf { background: var(--bb-white); border-top: 1px solid #f0ece6; }
.bb-shelf__header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 24px; }
.bb-shelf__subtitle { color: var(--bb-soft-ink) !important; margin: 0 !important; }
.bb-see-all { font-weight: 800; color: var(--bb-terra-deep); min-height: var(--bb-tap); display: inline-flex; align-items: center; }

/* Phone: swipeable row that bleeds to the screen edge */
.bb-bookgrid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(72vw, 260px);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin: 0 calc(-1 * var(--bb-gutter));
  padding: 4px var(--bb-gutter) 16px;
  scroll-padding-inline: var(--bb-gutter);
  scrollbar-width: none;
}
.bb-bookgrid::-webkit-scrollbar { display: none; }
.bb-bookgrid__item { display: flex; flex-direction: column; min-width: 0; scroll-snap-align: start; }
.bb-bookgrid__cover-link { display: block; aspect-ratio: 1 / 1; border-radius: 14px; overflow: hidden; background: var(--bb-deep-cream); box-shadow: 0 6px 24px -8px rgba(74,68,88,0.22); }
.bb-bookgrid__cover { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.bb-bookgrid__meta { display: flex; flex-direction: column; flex: 1; padding-top: 12px; gap: 4px; }
.bb-bookgrid__cat { font-size: var(--bb-fs-eyebrow); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--bb-terra-deep); }
.bb-bookgrid__title { font-size: 1.05rem !important; margin: 0 !important; line-height: 1.3 !important; }
.bb-bookgrid__title a { color: var(--bb-ink) !important; }
.bb-bookgrid__price { font-weight: 800; color: var(--bb-ink); }
.bb-bookgrid__cta {
  margin-top: auto; align-self: flex-start;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 20px; margin-top: 10px;
  border-radius: var(--bb-radius-pill);
  background: var(--bb-terra); color: #fff !important; font-weight: 800; font-size: var(--bb-fs-small);
}
.bb-bookgrid__cta:hover { background: var(--bb-terra-deep); }

@media (min-width: 960px) {
  .bb-bookgrid {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 28px;
    overflow: visible;
    margin: 0;
    padding: 0;
  }
}

/* ---------- 4. WHY BRAMBIX (features) ---------- */
.bb-features { background: var(--bb-bg); }
.bb-features__intro { max-width: 640px; margin-bottom: clamp(24px, 4vw, 40px); }
.bb-features__sub { color: var(--bb-soft-ink) !important; margin: 0 !important; }
.bb-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: clamp(14px, 2vw, 24px);
}
.bb-feature-card {
  display: flex; gap: 16px; align-items: flex-start;
  min-width: 0;
  background: var(--bb-white);
  border-radius: var(--bb-radius);
  padding: clamp(18px, 2.5vw, 28px);
  box-shadow: 0 10px 30px -20px rgba(74,68,88,0.35);
}
.bb-feature-card__icon { flex: 0 0 44px; width: 44px; height: 44px; }
.bb-feature-card__icon svg { width: 44px; height: 44px; }
.bb-feature-card__icon svg * { opacity: 1 !important; }
.bb-feature-card__icon svg [fill="#E8C87A"] { fill: #D4A830; }
.bb-feature-card__icon svg [fill="#F9C49A"] { fill: #F0A870; }
.bb-feature-card__icon svg [fill="#F0C9A0"] { fill: #D9A870; }
.bb-feature-card__icon svg [stroke="#C49A6C"] { stroke: #A07840; }
.bb-feature-card__icon svg [stroke="#E2895F"] { stroke: #C86830; }
.bb-feature-card__icon svg [fill="#E2895F"] { fill: #C86830; }
.bb-feature-card__text { min-width: 0; }
.bb-feature-card__num { display: none; }
.bb-feature-card h3 { font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem) !important; margin: 0 0 6px !important; }
.bb-feature-card p { font-size: 0.95rem; color: #6B6478 !important; margin: 0 !important; }

/* ---------- 5. FIND A STORY (category tiles; kept for when it's re-enabled) ---------- */
.bb-shop-by__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 20px; }
.bb-shop-by__card { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; background: var(--bb-white); border-radius: var(--bb-radius); padding: 24px; }
.bb-shop-by__img { width: 100%; max-width: 220px; aspect-ratio: 1 / 1; object-fit: contain; margin: 0 auto 12px; }
.bb-shop-by__cta { margin-top: auto; padding-top: 12px; font-weight: 800; color: var(--bb-terra-deep); }

/* ---------- 6. OUR STORY ---------- */
.bb-home .bb-story--fullbleed {
  display: grid;
  grid-template-columns: 1fr;
  padding: 0;
  background: var(--bb-deep-cream);
}
.bb-story__img-col { aspect-ratio: 3 / 2; min-width: 0; }
.bb-story__img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; display: block; }
.bb-story__text-col { min-width: 0; padding: var(--bb-section-y) var(--bb-gutter); }
.bb-story__text-col h2 { margin-bottom: 18px !important; }
.bb-story-intro { font-size: var(--bb-fs-lead) !important; font-weight: 600; margin: 0 0 14px !important; }
.bb-story-keyline { font-size: clamp(1.05rem, 1rem + 0.4vw, 1.2rem) !important; font-weight: 800; line-height: 1.45 !important; border-left: 3px solid var(--bb-terra); padding-left: 14px; margin: 0 0 18px !important; }
.bb-story-questions { margin-bottom: 18px; }
.bb-story-questions p { font-style: italic; color: #6B6478 !important; margin: 0 0 4px !important; }
.bb-story__text-col > p { margin: 0 0 12px; }
.bb-story-close { font-style: italic; color: var(--bb-soft-ink) !important; margin-bottom: 0 !important; }

@media (min-width: 960px) {
  .bb-home .bb-story--fullbleed { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .bb-story__img-col { aspect-ratio: auto; position: relative; min-height: 480px; }
  .bb-story__img { position: absolute; inset: 0; }
  .bb-story__text-col {
    align-self: center;
    padding: var(--bb-section-y) max(var(--bb-gutter), calc((100vw - var(--bb-max)) / 2)) var(--bb-section-y) clamp(32px, 4vw, 64px);
    max-width: 720px;
  }
}

/* ---------- 7. REVIEWS ---------- */
.bb-reviews { background: var(--bb-white); }
.bb-reviews h2 { max-width: 720px; margin-bottom: clamp(20px, 3vw, 32px) !important; }
.bb-reviews__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 20px; }
.bb-review-card { min-width: 0; background: var(--bb-bg); border-radius: var(--bb-radius); padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.bb-review-card__text { margin: 0 !important; }
.bb-review-card__meta { font-size: var(--bb-fs-small); color: var(--bb-soft-ink); }
.bb-stars { color: var(--bb-deep-cream); letter-spacing: 2px; }
.bb-star--filled { color: var(--bb-gold-deep); }

/* ---------- 8. FINAL CTA ---------- */
.bb-final-cta { background: var(--bb-gradient); }
.bb-final-cta h2 { max-width: 640px; }
.bb-final-cta p { max-width: 560px; margin: 0 0 24px !important; }
.bb-final-cta .bb-btn { width: 100%; }
@media (min-width: 640px) { .bb-final-cta .bb-btn { width: auto; } }

/* ============================================================
   FOOTER
   ============================================================ */
.bb-footer { background: #3D3550; color: rgba(255,255,255,0.7); }
.bb-footer__top { padding: clamp(40px, 6vw, 64px) var(--bb-gutter); }
.bb-footer__inner {
  max-width: var(--bb-max); margin: 0 auto;
  display: grid; grid-template-columns: 1fr; gap: 32px;
}
.bb-footer__col { min-width: 0; }
.bb-footer__logo { max-height: 48px; width: auto; }
.bb-footer__logo-link { display: inline-block; margin-bottom: 8px; }
.bb-footer__brand-name { color: #fff; font-weight: 700; font-size: 1.15rem; }
.bb-footer__tagline { color: rgba(255,255,255,0.6) !important; font-size: var(--bb-fs-small); line-height: 1.7; max-width: 300px; margin: 8px 0 0; }
.bb-email-copy {
  display: flex; align-items: center; gap: 8px;
  max-width: 340px; margin-top: 20px;
  padding: 6px 6px 6px 16px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--bb-radius-pill);
}
.bb-email-copy__address { flex: 1; min-width: 0; font-size: 0.8rem; font-weight: 700; color: #fff !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bb-email-copy__btn { flex-shrink: 0; min-height: 40px; background: var(--bb-gold) !important; color: #3D3550 !important; border: 0; border-radius: var(--bb-radius-pill); padding: 8px 16px; font-size: 0.8rem; font-weight: 800; cursor: pointer; box-shadow: none !important; }
.bb-footer__social { display: flex; gap: 8px; margin-top: 16px; }
.bb-footer__social a { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: rgba(255,255,255,0.55); }
.bb-footer__social a:hover { color: #fff; }
.bb-footer__col-heading { font-size: 0.7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,0.45) !important; margin: 0 0 8px; }
.bb-footer__links { list-style: none; margin: 0; padding: 0; }
.bb-footer__links li { margin: 0; }
.bb-footer__links a { display: inline-flex; align-items: center; min-height: 40px; color: rgba(255,255,255,0.72); font-size: 0.95rem; }
.bb-footer__links a:hover { color: #fff; }
.bb-footer__bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 18px var(--bb-gutter); }
.bb-footer__bottom-inner { max-width: var(--bb-max); margin: 0 auto; }
.bb-footer__copy { font-size: 0.8rem; color: rgba(255,255,255,0.45); }

@media (min-width: 640px) {
  .bb-footer__inner { grid-template-columns: 1fr 1fr; }
  .bb-footer__col--brand { grid-column: 1 / -1; }
}
@media (min-width: 960px) {
  .bb-footer__inner { grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; }
  .bb-footer__col--brand { grid-column: auto; }
}

/* ============================================================
   SHOP / CATEGORY PAGES
   ============================================================ */
.woocommerce-products-header, .ast-shop-summary-wrap, .woocommerce-result-count, .woocommerce-ordering { display: none !important; }

.bb-shop-header { padding: clamp(24px, 5vw, 48px) 0 clamp(20px, 3vw, 32px); }
.bb-shop-header__heading { font-size: var(--bb-fs-h2) !important; line-height: 1.15 !important; margin: 0 0 8px !important; }
.bb-shop-header__sub { color: var(--bb-soft-ink) !important; margin: 0 0 20px !important; font-size: var(--bb-fs-body); }
/* Filter pills: one swipeable row on phones, wrap on bigger screens */
.bb-shop-filters {
  display: flex; gap: 8px;
  overflow-x: auto; scrollbar-width: none;
  margin: 0 calc(-1 * var(--bb-gutter)); padding: 2px var(--bb-gutter) 6px;
}
.bb-shop-filters::-webkit-scrollbar { display: none; }
.bb-shop-filter {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 8px 18px; border-radius: var(--bb-radius-pill);
  border: 2px solid var(--bb-deep-cream); background: var(--bb-white);
  color: var(--bb-ink) !important; font-weight: 700; font-size: 0.9rem;
}
.bb-shop-filter:hover { border-color: var(--bb-terra); color: var(--bb-terra-deep) !important; }
.bb-shop-filter.is-active { background: var(--bb-terra); border-color: var(--bb-terra); color: #fff !important; }
@media (min-width: 640px) {
  .bb-shop-filters { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
}

/* Product grid */
.woocommerce ul.products,
.woocommerce-page ul.products {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: clamp(12px, 2.5vw, 28px) !important;
  margin: 0 0 32px !important;
  padding: 0 !important;
}
.woocommerce ul.products::before,
.woocommerce ul.products::after { content: none !important; display: none !important; }
@media (min-width: 960px) {
  .woocommerce ul.products,
  .woocommerce-page ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
.woocommerce ul.products li.product {
  width: auto !important; float: none !important; margin: 0 !important; padding: 0 !important;
  min-width: 0;
  display: flex !important; flex-direction: column !important;
  background: var(--bb-white) !important;
  border: 1px solid var(--bb-deep-cream) !important;
  border-radius: 16px !important;
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
@media (hover: hover) {
  .woocommerce ul.products li.product:hover { box-shadow: 0 10px 32px -10px rgba(74,68,88,0.18); transform: translateY(-3px); }
}
.woocommerce ul.products li.product a img {
  width: 100% !important; height: auto !important; aspect-ratio: 1 / 1;
  object-fit: cover; object-position: center top;
  margin: 0 !important; border-radius: 0 !important; display: block;
  background: var(--bb-deep-cream);
}
.woocommerce ul.products li.product .ast-woo-product-category {
  display: block; padding: clamp(12px, 2vw, 18px) clamp(12px, 2vw, 16px) 0 !important;
  font-size: 0.65rem !important; font-weight: 800 !important; letter-spacing: .1em; text-transform: uppercase;
  color: var(--bb-terra-deep) !important; line-height: 1.3;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product h2 {
  padding: 6px clamp(12px, 2vw, 16px) 0 !important; margin: 0 !important;
  font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem) !important; line-height: 1.3 !important;
  color: var(--bb-ink) !important;
}
.woocommerce ul.products li.product .price {
  display: block; padding: 6px clamp(12px, 2vw, 16px) 0 !important; margin: 0 0 auto !important;
  font-size: 0.95rem !important; font-weight: 800 !important; color: var(--bb-ink) !important;
}
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .add_to_cart_button {
  display: flex !important; align-items: center; justify-content: center;
  width: auto !important; min-height: 44px;
  margin: 14px clamp(12px, 2vw, 16px) clamp(12px, 2vw, 16px) !important;
  padding: 10px 14px !important;
  white-space: normal !important; text-align: center !important; line-height: 1.2 !important;
  background: var(--bb-terra) !important; color: #fff !important;
  border: 0 !important; border-radius: var(--bb-radius-pill) !important;
  font-weight: 800 !important; font-size: 0.9rem !important;
}
.woocommerce ul.products li.product .button:hover { background: var(--bb-terra-deep) !important; }
.woocommerce ul.products li.product .variations,
.woocommerce ul.products li.product .woocommerce-variation-add-to-cart,
.ast-on-card-button, .ast-card-action-tooltip { display: none !important; }

/* Bottom banner (image contains the text) */
.bb-shop-banner {
  margin: clamp(32px, 6vw, 56px) 0 clamp(40px, 7vw, 80px);
  height: clamp(140px, 30vw, 300px);
  border-radius: var(--bb-radius);
  background: var(--bb-deep-cream) url('https://brambixbook.com/wp-content/uploads/2026/09/ChatGPT-Image-Sep-20-2026-06_20_37-PM.png') center / cover no-repeat;
}
.bb-shop-banner__eyebrow, .bb-shop-banner__text { display: none; }

/* ============================================================
   SINGLE PRODUCT — responsive layout only
   (form/variation styling stays in brambix-main.css)
   ============================================================ */
/* Grid children must be allowed to shrink — the #1 cause of sideways scroll */
body.single-product div.product > *,
body.single-product div.product .summary * { min-width: 0; }
body.single-product div.product .summary { overflow-wrap: break-word; }

@media (max-width: 959px) {
  body.single-product div.product { display: block !important; }
  body.single-product div.product .woocommerce-product-gallery,
  body.single-product div.product div.images,
  body.single-product div.product .summary {
    width: 100% !important; max-width: 100% !important; float: none !important; margin-right: 0 !important;
  }
  body.single-product .woocommerce-product-gallery { margin-bottom: 24px !important; }
  body.single-product .woocommerce-product-gallery .zoomImg { display: none !important; }
  body.single-product .woocommerce-product-gallery__image img:not(.zoomImg) { width: 100% !important; height: auto !important; }
}

/* Full-width stacked sections under the product */
body.single-product div.product .bb-flat-section,
body.single-product div.product .bb-flat-description,
body.single-product div.product .bb-flat-reviews {
  grid-column: 1 / -1 !important; width: 100% !important; max-width: 100% !important; float: none !important; clear: both !important; display: block !important;
}
body.single-product .bb-flat-section h2,
body.single-product .bb-flat-reviews h2 { font-size: var(--bb-fs-h2) !important; text-align: left !important; }

/* Qty − / + and add to cart */
body.single-product form.cart { display: flex !important; flex-wrap: wrap !important; gap: 12px !important; align-items: stretch !important; }
body.single-product form.cart .quantity {
  display: flex !important; align-items: center !important;
  flex: 0 0 128px !important; width: 128px !important; height: 52px;
  padding: 0 !important; margin: 0 !important;
  border: 2px solid var(--bb-deep-cream) !important; border-radius: var(--bb-radius-pill) !important;
  background: var(--bb-white) !important; overflow: hidden;
}
body.single-product form.cart .quantity .qty {
  flex: 1 1 auto !important; width: auto !important; min-width: 0 !important; height: 100% !important;
  text-align: center !important; border: 0 !important; background: transparent !important;
  font-weight: 800 !important; font-size: 1rem !important; padding: 0 !important;
  -moz-appearance: textfield !important; appearance: textfield !important;
}
body.single-product form.cart .quantity .qty::-webkit-inner-spin-button,
body.single-product form.cart .quantity .qty::-webkit-outer-spin-button { -webkit-appearance: none !important; margin: 0 !important; }
body.single-product form.cart .quantity .bb-qty-btn {
  flex: 0 0 44px !important; width: 44px !important; height: 100% !important; min-height: 0 !important;
  border: 0 !important; background: transparent !important; box-shadow: none !important;
  color: var(--bb-ink) !important; font-size: 20px !important; font-weight: 800 !important;
  display: flex !important; align-items: center !important; justify-content: center !important; padding: 0 !important; cursor: pointer;
}
body.single-product form.cart .quantity .bb-qty-btn:hover { background: var(--bb-deep-cream) !important; }
body.single-product form.cart .single_add_to_cart_button {
  flex: 1 1 220px !important; width: auto !important; min-height: 52px;
  white-space: normal !important; text-align: center !important; justify-content: center !important;
  margin: 0 !important;
}
@media (max-width: 639px) {
  body.single-product form.cart .single_add_to_cart_button { flex-basis: 100% !important; }
}

/* Review stars (icon font replaced with plain characters) */
body.single-product #reviews .star-rating { font-size: 0 !important; letter-spacing: 0 !important; display: inline-flex !important; }
body.single-product #reviews .star-rating::before,
body.single-product #reviews .star-rating span::before { font-family: var(--bb-body) !important; font-size: 15px !important; letter-spacing: 2px !important; content: "★★★★★" !important; }
body.single-product #reviews .star-rating::before { color: var(--bb-deep-cream) !important; }
body.single-product #reviews .star-rating span::before { color: var(--bb-gold-deep) !important; }

.bb-review-toggle {
  display: inline-flex; align-items: center; gap: 8px; min-height: var(--bb-tap);
  background: var(--bb-terra); color: #fff; border: 0; border-radius: var(--bb-radius-pill);
  font-weight: 800; font-size: 1rem; padding: 12px 26px; margin-bottom: 24px; cursor: pointer;
}
.bb-review-toggle:hover { background: var(--bb-terra-deep); }

/* "You might also like" — swipe row */
.bb-recommendations { margin-top: clamp(32px, 5vw, 48px) !important; }
.bb-rec-grid {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(46vw, 200px);
  gap: 16px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.bb-rec-grid::-webkit-scrollbar { display: none; }
.bb-rec-card { display: block; min-width: 0; scroll-snap-align: start; border-radius: 16px; overflow: hidden; border: 1px solid var(--bb-deep-cream); background: var(--bb-white); transition: box-shadow .2s, transform .2s; }
.bb-rec-card:hover { box-shadow: 0 8px 24px -8px rgba(0,0,0,0.12); transform: translateY(-3px); }
.bb-rec-img img, .bb-rec-img-placeholder { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; background: var(--bb-deep-cream); }
.bb-rec-info { padding: 12px 14px 14px; }
.bb-rec-title { font-family: var(--bb-heading) !important; font-size: 0.95rem !important; color: var(--bb-ink) !important; margin: 0 0 4px !important; line-height: 1.3 !important; }
.bb-rec-price { font-size: 0.875rem !important; color: var(--bb-terra-deep) !important; font-weight: 800 !important; margin: 0 !important; }

/* ============================================================
   GENERIC CONTENT PAGES (How it works, About, policies)
   Keeps page-builder / editor content inside the screen.
   ============================================================ */
.entry-content { overflow-wrap: break-word; }
.entry-content h1 { font-size: var(--bb-fs-h1); line-height: 1.08; }
.entry-content h2 { font-size: var(--bb-fs-h2); line-height: 1.15; }
.entry-content h3 { font-size: var(--bb-fs-h3); line-height: 1.25; }
.entry-content table { display: block; max-width: 100%; overflow-x: auto; }
.entry-content iframe, .entry-content embed { max-width: 100%; }
body:not(.page-template-homepage) #content > .ast-container {
  max-width: calc(var(--bb-max) + 2 * var(--bb-gutter)) !important;
  padding-left: var(--bb-gutter) !important;
  padding-right: var(--bb-gutter) !important;
}

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ============================================================
   v11.1 — "one section, one screen" on laptops/desktops
   ============================================================ */
:root { --bb-section-y: clamp(40px, 5vw, 72px); }

/* Section intros: wide enough that 2-line headings stay 2 lines */
.bb-section-intro, .bb-make-theirs__intro, .bb-features__intro { max-width: 880px; }

@media (min-width: 960px) {
  /* Two ways: shorter artwork so both cards + heading fit one screen */
  .bb-make-theirs__grid { max-width: 1040px; }
  .bb-make-theirs { padding-top: 48px !important; padding-bottom: 48px !important; }
  .bb-make-theirs__visual { aspect-ratio: 16 / 6.5; }
  .bb-make-theirs__img { object-fit: cover; object-position: center 45%; }
  .bb-make-theirs__body { padding: 18px 24px 22px; }
  .bb-make-theirs__body > p { margin-bottom: 10px !important; }
  .bb-make-theirs__equation { margin-bottom: 14px; }
  .bb-make-theirs__intro { margin-bottom: 24px; }

  /* Our story: never taller than the screen */
  .bb-home .bb-story--fullbleed { max-height: calc(100vh - 80px); min-height: 520px; }
  .bb-story__img-col { min-height: 0; }
}

/* Picture-book shelf: smaller covers so cards fit one screen */
@media (min-width: 960px) { .bb-bookgrid { grid-template-columns: repeat(auto-fill, minmax(190px, 230px)); } }

/* Shop: 4 smaller cards per row on wide screens so a whole card fits on screen */
@media (min-width: 1280px) {
  .woocommerce ul.products,
  .woocommerce-page ul.products { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}
/* Hide Astra's floating cart bubble on product images (any variant) */
.woocommerce ul.products li.product [class*="ast-on-card"],
.woocommerce ul.products li.product .ast-select-options-trail { display: none !important; }
/* Image boxes keep their shape: the photo fills the box instead of stretching it */
.bb-make-theirs__visual { position: relative; overflow: hidden; }
.bb-make-theirs__visual .bb-make-theirs__img { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ============================================================
   v11.2 — cart, mini-cart & checkout polish
   ============================================================ */
/* Personalization details (Child, Dedication…) — one tidy label/value list everywhere */
dl.variation,
.woocommerce-mini-cart dl.variation,
.wcf-embed-checkout-form dl.variation,
.woocommerce-checkout-review-order-table dl.variation {
  display: grid !important;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 4px 10px !important;
  margin: 8px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  font-size: 0.9rem !important;
  line-height: 1.5 !important;
}
dl.variation dt,
dl.variation dd {
  float: none !important; clear: none !important;
  margin: 0 !important; padding: 0 !important;
  font-weight: 400 !important;
}
dl.variation dt { color: var(--bb-soft-ink) !important; font-weight: 600 !important; }
dl.variation dd { color: var(--bb-ink) !important; overflow-wrap: anywhere; }
dl.variation dd p { margin: 0 !important; display: inline; }
/* Long free text (dedication, storyline) gets its own full-width line */
dl.variation dt.variation-Dedication,
dl.variation dt.variation-Storyline { grid-column: 1 / -1; }
dl.variation dd.variation-Dedication,
dl.variation dd.variation-Storyline { grid-column: 1 / -1; padding-left: 10px !important; border-left: 2px solid var(--bb-deep-cream); font-style: italic; }

/* Mini-cart drawer: item list scrolls, totals + buttons stay put */
.woocommerce-mini-cart-item { padding-bottom: 16px !important; }
.woocommerce-mini-cart-item .quantity { display: block; margin-top: 8px; }

/* Cart page: order summary rows span the full card */
.woocommerce .cart-collaterals .cart_totals,
.woocommerce-page .cart-collaterals .cart_totals { width: 100% !important; float: none !important; }
.woocommerce .cart_totals table.shop_table { width: 100% !important; border: 0 !important; border-collapse: collapse !important; table-layout: auto !important; }
.woocommerce .cart_totals table.shop_table tr { border-bottom: 1px solid var(--bb-deep-cream) !important; }
.woocommerce .cart_totals table.shop_table th,
.woocommerce .cart_totals table.shop_table td {
  border: 0 !important; background: none !important;
  padding: 14px 0 !important; vertical-align: top !important;
  width: auto !important;
}
.woocommerce .cart_totals table.shop_table th { text-align: left !important; padding-right: 16px !important; font-weight: 600 !important; color: var(--bb-soft-ink) !important; white-space: nowrap; }
.woocommerce .cart_totals table.shop_table td { text-align: right !important; color: var(--bb-ink) !important; }
.woocommerce .cart_totals tr.cart-discount td { color: var(--bb-sage) !important; }
.woocommerce .cart_totals tr.cart-discount th { white-space: normal; overflow-wrap: anywhere; }
.woocommerce .cart_totals .woocommerce-remove-coupon,
.woocommerce-remove-coupon { display: block; font-size: 0.8rem; color: var(--bb-terra-deep) !important; }
.woocommerce .cart_totals tr.order-total th,
.woocommerce .cart_totals tr.order-total td { color: var(--bb-ink) !important; font-size: 1.1rem !important; }
.woocommerce .cart_totals tr.order-total { border-bottom: 0 !important; }
.woocommerce .cart_totals .woocommerce-shipping-destination,
.woocommerce .cart_totals .woocommerce-shipping-calculator { display: none; }

/* Cart page on phones: product row stacks cleanly */
@media (max-width: 767px) {
  .woocommerce-cart-form table.shop_table_responsive tr td::before { font-weight: 700; color: var(--bb-soft-ink); }
  .woocommerce-cart-form table.shop_table_responsive td.product-name { text-align: left !important; }
  .woocommerce-cart-form .coupon { display: flex; flex-wrap: wrap; gap: 10px; }
  .woocommerce-cart-form .coupon .input-text,
  .woocommerce-cart-form .coupon .button { flex: 1 1 160px; width: auto !important; }
}

/* Checkout (CartFlows) order summary: same tidy details, brand-coloured links */
.wcf-embed-checkout-form .woocommerce-remove-coupon,
.wcf-embed-checkout-form a { color: var(--bb-terra-deep) !important; }
.wcf-embed-checkout-form .woocommerce-checkout-review-order-table .product-name { font-weight: 700; }

/* ============================================================
   v11.3 — "What could their story be about?" + final CTA
   ============================================================ */
.bb-ideas { background: var(--bb-deep-cream); }
.bb-ideas__intro { max-width: 880px; margin-bottom: clamp(20px, 3vw, 32px); }
.bb-ideas__intro p { color: #6B6478 !important; margin: 0 !important; }
.bb-ideas__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 2vw, 20px);
}
@media (min-width: 960px) { .bb-ideas__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.bb-idea-card {
  min-width: 0;
  background: var(--bb-white);
  border-radius: var(--bb-radius);
  padding: clamp(14px, 2.2vw, 24px);
  box-shadow: 0 10px 30px -22px rgba(74,68,88,0.4);
}
.bb-idea-card__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bb-bg); font-size: 22px; line-height: 1; margin-bottom: 10px;
}
.bb-home .bb-idea-card h3 { font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem) !important; margin: 0 0 6px !important; }
.bb-idea-card p { font-size: 0.9rem !important; line-height: 1.55 !important; color: #6B6478 !important; margin: 0 !important; }
.bb-ideas__footer {
  display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
  margin-top: clamp(20px, 3vw, 32px);
}
.bb-ideas__spark { font-weight: 800; font-size: var(--bb-fs-lead) !important; color: var(--bb-ink) !important; margin: 0 !important; }
.bb-ideas__footer .bb-btn { width: 100%; }
@media (min-width: 640px) {
  .bb-ideas__footer { flex-direction: row; align-items: center; gap: 24px; }
  .bb-ideas__footer .bb-btn { width: auto; }
}

/* Final CTA: primary button + quiet secondary link */
.bb-final-cta p { margin: 0 0 8px !important; }
.bb-final-cta__spark { font-weight: 700; margin-bottom: 24px !important; }
.bb-final-cta__actions { display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
.bb-final-cta__alt { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; font-weight: 800; color: var(--bb-ink) !important; text-decoration: underline; text-underline-offset: 4px; }
.bb-final-cta__alt:hover { color: var(--bb-terra-deep) !important; }
@media (min-width: 640px) {
  .bb-final-cta__actions { flex-direction: row; align-items: center; gap: 28px; }
}

/* View Book button on the picture-book shelf: outline so the page has one loud CTA */
.bb-shelf .bb-bookgrid__cta { background: transparent; color: var(--bb-ink) !important; border: 2px solid var(--bb-ink); }
.bb-shelf .bb-bookgrid__cta:hover { background: var(--bb-ink); color: #fff !important; }

/* ============================================================
   v11.4 — hero trust row, idea cards, final CTA spacing
   ============================================================ */
/* Hero trust statements: each stays on one line; rows wrap cleanly */
.bb-hero__trust { gap: 10px 22px; }
.bb-hero__trust span { white-space: nowrap; }
@media (max-width: 639px) {
  .bb-hero__trust { flex-direction: column; gap: 10px; }
  .bb-hero__trust span { white-space: normal; }
}
@media (min-width: 960px) {
  .bb-hero__text { max-width: min(640px, 50vw); }
}

/* Idea cards: equal height, tighter inside */
.bb-ideas__grid { align-items: stretch; }
.bb-idea-card { display: flex; flex-direction: column; padding: clamp(14px, 1.8vw, 20px); }
.bb-idea-card__icon { width: 40px; height: 40px; font-size: 20px; margin-bottom: 8px; }
@media (max-width: 419px) { .bb-ideas__grid { grid-template-columns: 1fr; } }

/* Final CTA: a little less empty gradient */
.bb-final-cta { padding-top: clamp(36px, 4.5vw, 56px) !important; padding-bottom: clamp(36px, 4.5vw, 56px) !important; }
/* Desktop: all three trust statements on one line below the buttons */
@media (min-width: 1200px) {
  .bb-hero__trust { width: max-content; max-width: 62vw; flex-wrap: nowrap; gap: 18px; }
  .bb-hero__trust span { font-size: 0.8125rem; }
}
@media (min-width: 1200px) {
  .bb-hero__trust { background: rgba(251,244,234,0.88); padding: 8px 16px; border-radius: 999px; margin-left: -16px; }
}

/* ============================================================
   v11.5 — quiet closing section ("last page of the storybook")
   ============================================================ */
.bb-home .bb-final-cta--quiet {
  background: var(--bb-bg);
  border-top: 1px solid var(--bb-deep-cream);
  text-align: center;
  padding-top: clamp(40px, 5vw, 64px) !important;
  padding-bottom: clamp(44px, 5.5vw, 72px) !important;
}
.bb-final-cta__inner { max-width: 680px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.bb-final-cta__book { width: 96px; height: auto; margin-bottom: 14px; }
.bb-final-cta--quiet h2 { max-width: none; margin-bottom: 12px !important; }
.bb-final-cta--quiet p { max-width: 560px; margin: 0 auto 24px !important; color: #6B6478 !important; }
.bb-final-cta--quiet .bb-final-cta__actions { justify-content: center; width: 100%; }
.bb-final-cta--quiet .bb-final-cta__actions .bb-btn { width: 100%; }
@media (min-width: 640px) {
  .bb-final-cta--quiet .bb-final-cta__actions { gap: 14px; }
  .bb-final-cta--quiet .bb-final-cta__actions .bb-btn { width: auto; }
}

/* ============================================================
   v11.6 — story ideas, "Find your next favourite"
   ============================================================ */
/* Story ideas: optional illustration on top, CTA in its own centred row */
.bb-idea-card__art { margin: calc(-1 * clamp(14px, 1.8vw, 20px)) calc(-1 * clamp(14px, 1.8vw, 20px)) 14px; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--bb-radius) var(--bb-radius) 0 0; background: var(--bb-bg); }
.bb-idea-card__art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bb-ideas__footer { justify-content: center; align-items: center !important; }
@media (min-width: 640px) { .bb-ideas__footer { justify-content: center; } }

/* Find your next favourite */
.bb-home .bb-shop-by { background: var(--bb-white); }
.bb-shop-by__grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: clamp(14px, 2.5vw, 24px); }
@media (min-width: 960px) {
  .bb-shop-by__grid--1 { grid-template-columns: minmax(0, 380px); }
  .bb-shop-by__grid--2 { grid-template-columns: repeat(2, minmax(0, 380px)); }
  .bb-shop-by__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.bb-shop-by__card {
  background: var(--bb-bg); border: 1px solid var(--bb-deep-cream);
  padding: clamp(18px, 2.5vw, 28px); text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
@media (hover: hover) { .bb-shop-by__card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px -14px rgba(74,68,88,0.25); } }
.bb-shop-by__img { max-width: 180px; mix-blend-mode: multiply; }
.bb-home .bb-shop-by__card h3 { margin: 4px 0 6px !important; color: var(--bb-ink) !important; }
.bb-shop-by__card p { font-size: 0.95rem !important; color: #6B6478 !important; margin: 0 !important; text-align: center; }
.bb-shop-by__cta { padding-top: 14px; min-height: 44px; display: inline-flex; align-items: flex-end; }
@media (max-width: 639px) {
  /* Phones: compact horizontal tiles so 3 categories don't take 3 screens */
  .bb-shop-by__card { flex-direction: row; text-align: left; align-items: center; gap: 14px; padding: 14px; }
  .bb-shop-by__img { width: 84px; max-width: 84px; margin: 0; flex-shrink: 0; }
  .bb-shop-by__card p { text-align: left; font-size: 0.875rem !important; }
  .bb-shop-by__text { align-items: flex-start; }
  .bb-shop-by__cta { padding-top: 6px; min-height: 0; }
}

.bb-shop-by__text { display: flex; flex-direction: column; align-items: center; flex: 1; min-width: 0; }
@media (max-width: 639px) {
  .bb-shop-by__text { align-items: flex-start; text-align: left; }
  .bb-home .bb-shop-by__card h3 { margin-top: 0 !important; }
}
/* Story ideas with illustrations: always 2×2 on phones */
@media (max-width: 639px) {
  .bb-ideas__grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; }
  .bb-idea-card { padding: 12px; }
  .bb-idea-card__art { margin: -12px -12px 10px; }
  .bb-home .bb-idea-card h3 { font-size: 0.95rem !important; }
  .bb-idea-card p { font-size: 0.8125rem !important; }
}

/* ============================================================
   v11.9 — shop cards, empty category, banner, product page
   ============================================================ */
/* Card tagline sits under the price; button pinned to the bottom */
.woocommerce ul.products li.product .price { margin-bottom: 0 !important; }
.bb-card-tagline {
  padding: 6px clamp(12px, 2vw, 16px) 0; margin: 0 0 auto !important;
  font-size: 0.875rem !important; line-height: 1.5 !important; color: #6B6478 !important;
}
@media (max-width: 639px) { .bb-card-tagline { font-size: 0.8rem !important; } }
.woocommerce ul.products li.product .bb-loop-cta { margin-top: 14px !important; }

/* Empty collection */
.bb-empty-cat { text-align: center; padding: clamp(32px, 6vw, 64px) 16px; background: var(--bb-white); border-radius: var(--bb-radius); border: 1px dashed var(--bb-deep-cream); margin-bottom: 32px; }
.bb-empty-cat__title { font-family: var(--bb-heading) !important; font-size: var(--bb-fs-h3) !important; margin: 0 0 6px !important; }
.bb-empty-cat p { color: #6B6478; margin: 0 0 18px; }

/* Closing banner: short text sign-off instead of a tall image */
.bb-shop-banner.bb-shop-banner--text {
  background: var(--bb-deep-cream) !important;
  background-image: none !important;
  height: auto !important; min-height: 0 !important; aspect-ratio: auto !important;
  display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: center !important;
  text-align: center;
  padding: clamp(24px, 4vw, 40px) clamp(16px, 4vw, 40px) !important;
  margin: clamp(24px, 4vw, 40px) 0 clamp(32px, 5vw, 56px) !important;
  border-radius: var(--bb-radius) !important;
}
.bb-shop-banner--text .bb-shop-banner__eyebrow { display: block !important; font-size: var(--bb-fs-eyebrow); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--bb-terra-deep); margin-bottom: 8px; }
.bb-shop-banner--text .bb-shop-banner__title { display: block !important; font-family: var(--bb-heading) !important; font-size: var(--bb-fs-h3) !important; color: var(--bb-ink) !important; margin: 0 0 6px !important; line-height: 1.25; }
.bb-shop-banner--text .bb-shop-banner__text { display: block !important; color: #6B6478 !important; margin: 0 !important; max-width: 520px; font-size: 0.95rem; }

/* Product page: approval reassurance under the button */
body.single-product form.cart .bb-approve-note {
  flex: 1 1 100% !important; order: 99;
  display: flex; gap: 8px; align-items: flex-start;
  margin: 2px 0 0 !important; font-size: 0.875rem; line-height: 1.5; color: #6B6478;
}
.bb-approve-note span { color: var(--bb-sage); font-weight: 800; }

/* Product page: no stray space after the last section */
body.single-product div.product { align-items: start !important; grid-auto-rows: auto !important; }
body.single-product .bb-recommendations { margin-bottom: 0 !important; padding-bottom: 0 !important; }
body.single-product .site-main, body.single-product #primary { min-height: 0 !important; padding-bottom: clamp(24px, 4vw, 48px) !important; margin-bottom: 0 !important; }

/* Empty reviews: compact prompt, not a big empty section */
body.single-product .bb-reviews-empty-title { font-size: var(--bb-fs-h3) !important; }
body.single-product .bb-flat-reviews .woocommerce-noreviews { display: none; }

/* ============================================================
   v11.10 — errors always below the field; mobile hero image first
   ============================================================ */
/* Inline errors: last item in their block, full width, below the input */
.bb-error, .bb-field-error, .checkout-inline-error-message {
  order: 99 !important; flex-basis: 100% !important; width: 100%;
  display: block !important; margin: 6px 0 0 !important;
  font-size: 13px !important; font-weight: 600 !important; color: #B5483A !important; text-align: left;
}
.bb-field-invalid input, .bb-field-invalid select, .bb-field-invalid textarea,
.bb-field-invalid .bb-upload { border-color: #B5483A !important; }

/* Phones/tablets: hero artwork first, text below */
@media (max-width: 959px) {
  .bb-hero { display: flex; flex-direction: column; padding-top: 0 !important; padding-bottom: clamp(32px, 7vw, 48px) !important; }
  .bb-hero::after { order: -1; margin: 0 calc(-1 * var(--bb-gutter)) 24px; aspect-ratio: 16 / 11; }
  .bb-hero__inner { width: 100%; }
}

/* ============================================================
   v11.11 — product page: no phantom gaps, clean format pills
   ============================================================ */
/* Grid row-gap was added between EVERY child, including empty helper
   elements → hundreds of px of blank space. Rows now get no gap; each
   section spaces itself. */
html body.single-product div.product { row-gap: 0 !important; }
html body.single-product div.product > :empty,
html body.single-product div.product > .clear,
html body.single-product div.product > meta { display: none !important; }
html body.single-product div.product > .woocommerce-product-gallery,
html body.single-product div.product > .summary { margin-bottom: 0 !important; }
html body.single-product div.product .bb-flat-section { margin: clamp(32px, 4vw, 48px) 0 0 !important; padding-bottom: 0 !important; }
html body.single-product div.product > *:last-child { margin-bottom: 0 !important; }
html body.single-product .bb-rec-grid { padding-bottom: 8px !important; margin-bottom: 0 !important; }
html body.single-product .site-content,
html body.single-product .ast-woocommerce-container,
html body.single-product #primary,
html body.single-product .site-main { min-height: 0 !important; margin-bottom: 0 !important; padding-bottom: clamp(32px, 4vw, 56px) !important; }

/* Format / size pills: the row behind them never gets a colour */
html body.single-product form.cart table.variations,
html body.single-product form.cart table.variations tbody,
html body.single-product form.cart table.variations tr,
html body.single-product form.cart table.variations th,
html body.single-product form.cart table.variations td,
html body.single-product form.cart table.variations tr:hover,
html body.single-product form.cart table.variations td:hover,
html body.single-product form.cart table.variations td:focus-within,
html body.single-product form.cart table.variations tr:focus-within,
html body.single-product form.cart .bb-pills,
html body.single-product form.cart .bb-pills:hover,
html body.single-product form.cart .bb-pills:focus-within {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
}
html body.single-product form.cart .bb-pills { display: flex !important; flex-wrap: wrap !important; gap: 10px !important; padding: 4px 0 !important; }
html body.single-product form.cart button.bb-pill {
  background: var(--bb-white) !important; color: var(--bb-ink) !important;
  border: 2px solid var(--bb-deep-cream) !important; box-shadow: none !important;
  min-height: 46px; padding: 10px 24px !important; transform: none !important;
}
html body.single-product form.cart button.bb-pill:hover { border-color: var(--bb-terra) !important; color: var(--bb-terra-deep) !important; background: var(--bb-white) !important; }
html body.single-product form.cart button.bb-pill.is-active,
html body.single-product form.cart button.bb-pill.is-active:hover {
  background: var(--bb-terra) !important; border-color: var(--bb-terra) !important; color: #fff !important;
  box-shadow: 0 6px 16px -8px rgba(210,110,70,0.6) !important;
}

/* ============================================================
   v12 — markets: delivery-country bar, delivery estimate,
   "not available here" note
   ============================================================ */
.bb-market-bar { background: var(--bb-ink); color: #fff; font-size: 0.8125rem; }
.bb-market-bar__inner {
  max-width: calc(var(--bb-max) + 2 * var(--bb-gutter)); margin: 0 auto;
  padding: 6px var(--bb-gutter); display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap;
}
.bb-market-bar__label { color: rgba(255,255,255,0.7); font-weight: 600; margin: 0; }
.bb-market-bar__select {
  appearance: auto; background: rgba(255,255,255,0.1) !important; color: #fff !important;
  border: 1px solid rgba(255,255,255,0.25) !important; border-radius: 999px !important;
  padding: 4px 10px !important; min-height: 32px; font: inherit; font-weight: 700; cursor: pointer; width: auto !important;
}
.bb-market-bar__select option { color: var(--bb-ink); }
.bb-market-bar__note { color: rgba(255,255,255,0.55); }
@media (max-width: 639px) {
  .bb-market-bar__inner { justify-content: center; }
  .bb-market-bar__note { display: none; }
}

.bb-delivery-est { margin: 8px 0 14px !important; font-size: 0.9rem; color: #6B6478; font-weight: 600; }
.bb-market-unavailable {
  margin: 12px 0 18px; padding: 14px 16px; border-radius: 14px;
  background: var(--bb-bg); border: 1px solid var(--bb-deep-cream); font-size: 0.95rem; line-height: 1.55;
}
.bb-market-unavailable a { color: var(--bb-terra-deep) !important; font-weight: 800; text-decoration: underline; }
