/*
Theme Name: BB Peptides
Theme URI: https://bbpeptides.com
Author: BB Peptides
Author URI: https://bbpeptides.com
Description: Custom WordPress theme for BB Peptides — a verified B2B research compound supply site. Bold, clinical, brand-matched to the BB Peptides logo (black / orange / blue).
Version: 1.4.6
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: bbpeptides
*/

/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
  --bb-black: #111111;
  --bb-black-soft: #1c1c1c;
  --bb-orange: #F5650A;
  --bb-orange-dark: #D6560A;
  --bb-blue: #0B3B9F;
  --bb-blue-dark: #082C78;
  --bb-blue-tint: #EDF2FC;
  --bb-white: #FFFFFF;
  --bb-gray-50: #FAFAFA;
  --bb-gray-100: #F2F2F3;
  --bb-gray-200: #E4E4E6;
  --bb-gray-500: #767680;
  --bb-gray-700: #3D3D42;
  --bb-radius: 10px;
  --bb-shadow: 0 4px 20px rgba(17, 17, 17, 0.08);
  --bb-max-width: 1180px;
  --bb-font-heading: 'Poppins', 'Inter', -apple-system, sans-serif;
  --bb-font-body: 'Inter', -apple-system, sans-serif;
}

/* ==========================================================================
   Reset / base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--bb-font-body);
  color: var(--bb-black);
  background: var(--bb-white);
  line-height: 1.6;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
img[hidden] { display: none !important; }
a { color: var(--bb-blue); text-decoration: none; }
a:hover { color: var(--bb-orange); }
h1, h2, h3, h4 {
  font-family: var(--bb-font-heading);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.2em; }
.container {
  max-width: var(--bb-max-width);
  margin: 0 auto;
  padding: 0 24px;
}
section { padding: 72px 0; }
.section-tight { padding: 40px 0; }
.text-center { text-align: center; }
.bg-black { background: var(--bb-black); color: var(--bb-white); }
.bg-gray { background: var(--bb-gray-50); }
.bg-blue-tint {
  background-color: var(--bb-blue-tint);
  background-image: url('assets/img/pattern-blue.svg');
  background-repeat: repeat;
}
.eyebrow {
  display: inline-block;
  font-family: var(--bb-font-heading);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bb-orange);
  margin-bottom: 12px;
}
.eyebrow.blue { color: var(--bb-blue); }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--bb-font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-primary { background: var(--bb-orange); color: var(--bb-white); }
.btn-primary:hover { background: var(--bb-orange-dark); color: var(--bb-white); }
.btn-secondary { background: transparent; border-color: var(--bb-black); color: var(--bb-black); }
.btn-secondary:hover { background: var(--bb-black); color: var(--bb-white); }
.btn-outline-white { background: transparent; border-color: var(--bb-white); color: var(--bb-white); }
.btn-outline-white:hover { background: var(--bb-white); color: var(--bb-black); }
.btn-blue { background: var(--bb-blue); color: var(--bb-white); }
.btn-blue:hover { background: var(--bb-blue-dark); color: var(--bb-white); }
.btn-block { width: 100%; justify-content: center; }

/* ==========================================================================
   Variation Swatches (mg/strength buttons) — "Variation Swatches for WooCommerce"
   Verified against live DOM on a product page:
     <li class="variable-item button-variable-item ..." role="radio" aria-checked="false|true">
       <div class="variable-item-contents"><span class="variable-item-span variable-item-span-button">
   aria-checked="true" is the plugin's own selected-state flag (built as an
   accessible radio group), so it's used here instead of guessing a class name.
   !important is used because the plugin's own stylesheet is fairly specific
   (.woo-variation-swatches .wvs-style-squared.variable-items-wrapper ...)
   and load order relative to the theme isn't guaranteed.
   ========================================================================== */
.woo-variation-swatches .variable-items-wrapper .variable-item.button-variable-item {
  background: var(--bb-white) !important;
  border: 2px solid var(--bb-gray-200) !important;
  border-radius: 8px !important;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.woo-variation-swatches .variable-items-wrapper .variable-item.button-variable-item .variable-item-span {
  color: var(--bb-black) !important;
  font-weight: 600;
}
.woo-variation-swatches .variable-items-wrapper .variable-item.button-variable-item:hover {
  border-color: var(--bb-blue) !important;
}
.woo-variation-swatches .variable-items-wrapper .variable-item.button-variable-item[aria-checked="true"] {
  background: rgba(11, 59, 159, 0.08) !important;
  border-color: var(--bb-blue) !important;
}
.woo-variation-swatches .variable-items-wrapper .variable-item.button-variable-item[aria-checked="true"] .variable-item-span {
  color: var(--bb-blue) !important;
  font-weight: 700;
}

/* Related Products heading — smaller than the global h2 size so
   "You May Also Be Interested In" fits on one line instead of wrapping. */
.related.products > h2 {
  font-size: clamp(1.25rem, 2.2vw, 1.9rem);
  white-space: nowrap;
}
@media (max-width: 480px) {
  .related.products > h2 {
    white-space: normal;
    font-size: clamp(1.1rem, 5vw, 1.5rem);
  }
}

/* ==========================================================================
   Header / Navigation
   ========================================================================== */
.bb-top-bar {
  background: var(--bb-black);
  color: var(--bb-white);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 8px 16px;
}
.bb-top-bar strong { color: var(--bb-orange); }

.bb-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bb-white);
  border-bottom: 1px solid var(--bb-gray-200);
}
.bb-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 14px 0;
}
.bb-logo img { height: 54px; width: auto; }
.bb-logo { display: flex; align-items: center; gap: 12px; font-family: var(--bb-font-heading); font-weight: 800; font-size: 1.3rem; color: var(--bb-black); flex-shrink: 0; }
.bb-logo .wordmark { font-family: var(--bb-font-heading); font-weight: 800; font-size: 1.5rem; color: var(--bb-black); letter-spacing: -0.01em; line-height: 1; }

.bb-nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
}
.bb-nav a {
  color: var(--bb-black);
  font-family: var(--bb-font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
}
.bb-nav a:hover { color: var(--bb-orange); }
.bb-header-actions { display: flex; align-items: center; gap: 14px; }
.bb-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
}

@media (max-width: 1100px) {
  .bb-nav { display: none; width: 100%; }
  .bb-nav.is-open { display: block; }
  .bb-nav ul { flex-direction: column; gap: 0; }
  .bb-nav li { border-top: 1px solid var(--bb-gray-200); }
  .bb-nav a { display: block; padding: 14px 0; }
  .bb-header-inner { flex-wrap: wrap; }
  .bb-menu-toggle { display: block; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.bb-hero {
  background: linear-gradient(120deg, var(--bb-black) 0%, var(--bb-blue-dark) 75%, var(--bb-blue) 130%);
  color: var(--bb-white);
  padding: 96px 0;
  position: relative;
  overflow: hidden;
}
.bb-hero::before {
  content: "";
  position: absolute;
  left: -140px;
  bottom: -140px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(11,59,159,0.55), transparent 70%);
}
.bb-hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,101,10,0.30), transparent 70%);
}
.bb-hero-inner { position: relative; max-width: 720px; }
.bb-hero p.lead { font-size: 1.15rem; color: var(--bb-gray-200); max-width: 600px; }
.bb-hero-actions { display: flex; gap: 16px; margin-top: 28px; flex-wrap: wrap; }

/* ==========================================================================
   Trust bar / feature grid
   ========================================================================== */
.bb-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.bb-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.bb-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 780px) {
  .bb-grid-3, .bb-grid-2 { grid-template-columns: 1fr; }
  .bb-grid-4 { grid-template-columns: 1fr; }
}
@media (min-width: 781px) and (max-width: 1050px) {
  .bb-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
.bb-card {
  background: var(--bb-white);
  border: 1px solid var(--bb-gray-200);
  border-radius: var(--bb-radius);
  padding: 30px;
  box-shadow: var(--bb-shadow);
}
.bb-card .icon {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--bb-orange);
  display: flex; align-items: center; justify-content: center;
  color: var(--bb-white);
  font-weight: 800;
  margin-bottom: 16px;
}
.bb-card .icon.blue { background: var(--bb-blue); }
.bb-card.compact { padding: 22px; }

/* ==========================================================================
   Badges
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--bb-font-heading);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
}
.badge-ruo { background: #FDEBDD; color: var(--bb-orange-dark); border: 1px solid var(--bb-orange); }
.badge-locked { background: var(--bb-gray-100); color: var(--bb-gray-700); border: 1px solid var(--bb-gray-200); }
.badge-blue { background: #E7ECFB; color: var(--bb-blue-dark); border: 1px solid var(--bb-blue); }

/* ==========================================================================
   Product / catalog cards
   ========================================================================== */
.bb-product-card {
  background: var(--bb-white);
  border: 1px solid var(--bb-gray-200);
  border-radius: var(--bb-radius);
  overflow: hidden;
  box-shadow: var(--bb-shadow);
  display: flex;
  flex-direction: column;
}
.bb-product-card .thumb {
  background-color: var(--bb-blue-tint);
  background-image: url('assets/img/pattern-blue.svg');
  aspect-ratio: 4/3;
  display: flex; align-items: center; justify-content: center;
  color: var(--bb-gray-500);
  font-family: var(--bb-font-heading);
  font-weight: 700;
  position: relative;
}
.bb-product-card .thumb .badge-ruo { position: absolute; top: 12px; left: 12px; }
.bb-product-card .body { padding: 20px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.bb-product-card .price-lock { font-size: 0.85rem; color: var(--bb-gray-500); font-style: italic; }

.bb-placeholder-note {
  border: 1px dashed var(--bb-orange);
  background: #FFF7F0;
  border-radius: var(--bb-radius);
  padding: 18px 22px;
  font-size: 0.92rem;
  color: var(--bb-gray-700);
  margin-bottom: 32px;
}
.bb-placeholder-note strong { color: var(--bb-orange-dark); }

/* ==========================================================================
   Forms
   ========================================================================== */
.bb-form { max-width: 680px; }
.bb-form label {
  display: block;
  font-family: var(--bb-font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  margin-top: 18px;
}
.bb-form input[type="text"],
.bb-form input[type="email"],
.bb-form input[type="tel"],
.bb-form input[type="url"],
.bb-form select,
.bb-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--bb-gray-200);
  border-radius: 6px;
  font-family: var(--bb-font-body);
  font-size: 1rem;
  background: var(--bb-gray-50);
}
.bb-form textarea { min-height: 110px; resize: vertical; }
.bb-form .checkbox-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 20px;
  font-size: 0.9rem;
  background: var(--bb-gray-50);
  border: 1px solid var(--bb-gray-200);
  border-radius: 8px;
  padding: 14px;
}
.bb-form .checkbox-row input { margin-top: 4px; }
.bb-form-success {
  background: #EAF7EE;
  border: 1px solid #34A853;
  color: #1E7B34;
  padding: 16px 20px;
  border-radius: var(--bb-radius);
  margin-bottom: 24px;
  font-weight: 600;
}
.bb-form-error {
  background: #FDECEC;
  border: 1px solid #D93025;
  color: #A3241C;
  padding: 16px 20px;
  border-radius: var(--bb-radius);
  margin-bottom: 24px;
  font-weight: 600;
}

/* ==========================================================================
   Policy / legal content
   ========================================================================== */
.bb-policy h3 { color: var(--bb-blue-dark); margin-top: 2em; }
.bb-policy ol, .bb-policy ul { padding-left: 1.4em; }
.bb-policy li { margin-bottom: 0.5em; }
.bb-callout {
  border-left: 4px solid var(--bb-blue);
  background: var(--bb-blue-tint);
  padding: 18px 22px;
  border-radius: 0 8px 8px 0;
  margin: 24px 0;
}

/* ==========================================================================
   CTA band
   ========================================================================== */
.bb-cta-band {
  background: var(--bb-blue);
  background: linear-gradient(120deg, var(--bb-blue) 0%, var(--bb-blue-dark) 100%);
  color: var(--bb-white);
  padding: 60px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.bb-cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('assets/img/pattern-white.svg');
}
.bb-cta-band .container { position: relative; }
.bb-cta-band h2 { color: var(--bb-white); }

/* ==========================================================================
   Footer
   ========================================================================== */
.bb-footer {
  background: var(--bb-black);
  color: var(--bb-gray-200);
  padding: 60px 0 24px;
  position: relative;
}
.bb-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--bb-orange), var(--bb-blue));
}
.bb-footer h4 { color: var(--bb-white); font-size: 1rem; margin-bottom: 14px; }
.bb-footer a { color: var(--bb-gray-200); }
.bb-footer a:hover { color: var(--bb-orange); }
.bb-footer .bb-grid-3 { margin-bottom: 40px; }
.bb-footer-legal {
  border-top: 1px solid #2a2a2a;
  margin-top: 20px;
  padding-top: 20px;
  font-size: 0.8rem;
  color: var(--bb-gray-500);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.bb-footer ul { list-style: none; padding: 0; margin: 0; }
.bb-footer li { margin-bottom: 8px; }
.bb-footer-ruo {
  font-size: 0.78rem;
  color: var(--bb-gray-500);
  max-width: 900px;
  margin: 0 auto 20px;
  text-align: center;
  line-height: 1.6;
}

/* ==========================================================================
   Utility
   ========================================================================== */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.divider-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--bb-orange); display: inline-block; margin: 0 8px;
}

/* ==========================================================================
   Age gate (21+)
   ========================================================================== */
.bb-agegate {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 17, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}
.bb-agegate-box {
  background: var(--bb-white);
  border-radius: var(--bb-radius);
  box-shadow: var(--bb-shadow);
  max-width: 460px;
  width: 100%;
  padding: 40px 36px;
  text-align: center;
}
.bb-agegate-badge {
  display: inline-block;
  background: var(--bb-black);
  color: var(--bb-white);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 18px;
}
.bb-agegate-box h2 {
  font-size: 1.4rem;
  margin-bottom: 14px;
}
.bb-agegate-box p {
  font-size: 0.9rem;
  color: var(--bb-gray-700);
  line-height: 1.6;
}
.bb-agegate-checks {
  text-align: left;
  margin-top: 18px;
}
.bb-agegate-checks .checkbox-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 12px;
  font-size: 0.85rem;
  background: var(--bb-gray-50);
  border: 1px solid var(--bb-gray-200);
  border-radius: 8px;
  padding: 12px 14px;
  line-height: 1.5;
  color: var(--bb-gray-700);
}
.bb-agegate-checks .checkbox-row input { margin-top: 3px; flex-shrink: 0; }
.bb-agegate-checks .bb-agegate-remember {
  background: none;
  border: none;
  padding: 4px 2px;
  font-size: 0.85rem;
}
.bb-agegate-actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}
.bb-agegate-actions .btn {
  flex: 1;
  justify-content: center;
}
.bb-agegate-actions .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
body.bb-agegate-locked { overflow: hidden; }

/* checkout attestation box (used once WooCommerce is active) */
.bb-checkout-attestation {
  background: var(--bb-gray-50);
  border: 1px solid var(--bb-gray-200);
  border-radius: var(--bb-radius);
  padding: 18px;
  margin: 20px 0;
}
.bb-checkout-attestation h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}
.bb-checkout-attestation-sub {
  font-size: 0.85rem;
  color: var(--bb-gray-500);
  margin-bottom: 14px;
}
.bb-checkout-attestation label {
  font-size: 0.85rem;
  color: var(--bb-gray-700);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

/* ==========================================================================
   WooCommerce overrides — match theme design tokens
   ========================================================================== */
.woocommerce ul.products li.product { list-style: none; }
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #place_order {
  font-family: var(--bb-font-heading);
  font-weight: 700;
  border-radius: 999px;
  background: var(--bb-orange);
  color: var(--bb-white);
  border: none;
  padding: 12px 26px;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce #place_order:hover { background: var(--bb-orange-dark); color: var(--bb-white); }
.woocommerce span.price, .woocommerce-Price-amount { color: var(--bb-blue); font-weight: 700; }
.woocommerce table.shop_table {
  border: 1px solid var(--bb-gray-200);
  border-radius: var(--bb-radius);
}
.woocommerce table.shop_table th,
.woocommerce table.shop_table td { border-bottom: 1px solid var(--bb-gray-200); }
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce-checkout select {
  border: 1px solid var(--bb-gray-200);
  border-radius: var(--bb-radius);
  padding: 10px 12px;
}
.woocommerce-message, .woocommerce-info {
  background: var(--bb-blue-tint);
  border-top-color: var(--bb-blue);
  color: var(--bb-black);
}
.woocommerce-error { background: #FDEBDD; border-top-color: var(--bb-orange); color: var(--bb-black); }
.woocommerce-Price-amount.amount .badge-locked,
.badge-locked { cursor: default; }
a.badge-locked:hover { background: var(--bb-gray-200); color: var(--bb-black); }

/* Certificate of Analysis (COA) button block on single product pages */
/* Certificate of Analysis (COA) link on single product pages —
   deliberately understated, not a competing full-width button */
.bb-coa-link {
  margin: 14px 0 0;
}
.bb-coa-link a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--bb-blue);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.bb-coa-link a:hover { border-bottom-color: var(--bb-blue); }
.bb-coa-link a::before {
  content: "📄";
  font-size: 0.9em;
}
.bb-coa-link-list {
  margin-bottom: 20px;
  scroll-margin-top: 100px;
}
/* Any heading that can be an anchor target (Terms, Privacy, Refund Policy,
   etc.) needs the same clearance from the sticky header — same issue as
   the COA anchor above, fixed the same way. */
h2[id], h3[id] {
  scroll-margin-top: 100px;
}

/* ==========================================================================
   Single Product page — WooCommerce's own templates render this page
   (the theme has no single-product override), so none of the site's
   normal .container/.section width and spacing conventions were applied,
   and there was no grid/clearfix for the gallery + summary columns.
   Without this, the two floated WooCommerce columns collapse to zero
   height and the footer renders directly after the breadcrumb.
   ========================================================================== */
.single-product .content-area {
  max-width: var(--bb-max-width);
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.single-product .woocommerce-breadcrumb {
  max-width: var(--bb-max-width);
  margin: 24px auto 0;
  padding: 0 24px;
  font-size: 0.85rem;
  color: var(--bb-gray-500);
}
.single-product .woocommerce-breadcrumb a { color: var(--bb-blue); }

.woocommerce div.product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.woocommerce div.product .woocommerce-product-gallery {
  opacity: 1 !important; /* WooCommerce's JS fades this in from 0; make sure it's never stuck invisible */
}
.woocommerce div.product .woocommerce-product-gallery img {
  border-radius: var(--bb-radius);
  width: 100%;
  height: auto;
  display: block;
}
.woocommerce div.product .summary.entry-summary .product_title {
  margin-bottom: 12px;
}
.woocommerce div.product .summary.entry-summary .price {
  font-size: 1.6rem;
  color: var(--bb-blue);
  font-weight: 700;
  margin-bottom: 20px;
  display: block;
}
.woocommerce div.product .summary.entry-summary .cart {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 6px;
}
.woocommerce div.product .summary.entry-summary .quantity input {
  width: 64px;
  padding: 10px;
  border: 1px solid var(--bb-gray-200);
  border-radius: var(--bb-radius);
}
.woocommerce div.product .summary.entry-summary .product_meta {
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--bb-gray-500);
}

@media (max-width: 860px) {
  .woocommerce div.product {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* Header cart icon — count bubble + running total */
.bb-cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--bb-black);
  font-family: var(--bb-font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}
.bb-cart-link:hover { color: var(--bb-orange); }
.bb-cart-link svg { flex-shrink: 0; width: 20px; height: 20px; }
.bb-cart-count {
  position: absolute;
  top: -8px;
  left: 12px;
  background: var(--bb-orange);
  color: var(--bb-white);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  min-width: 17px;
  height: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}
.bb-cart-total {
  font-family: var(--bb-font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--bb-black);
}
@media (max-width: 700px) {
  .bb-cart-total { display: none; }
}

/* ==========================================================================
   Cart & Checkout pages — same gap as the single-product page had: these
   render via WooCommerce's own default templates, and nothing in this
   theme gave them width/spacing or styled the table, remove link,
   quantity inputs, or totals box.
   ========================================================================== */
.woocommerce-cart .content-area,
.woocommerce-checkout .content-area {
  max-width: var(--bb-max-width);
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.woocommerce table.shop_table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}
.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--bb-gray-200);
  text-align: left;
  vertical-align: middle;
}
.woocommerce table.shop_table td.product-thumbnail img {
  width: 64px;
  height: auto;
  border-radius: var(--bb-radius);
}
.woocommerce table.shop_table .product-remove {
  width: 40px;
}
.woocommerce table.shop_table .product-remove a.remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bb-gray-100);
  color: var(--bb-black) !important;
  text-decoration: none;
  font-size: 1.2rem;
  line-height: 1;
}
.woocommerce table.shop_table .product-remove a.remove:hover {
  background: var(--bb-orange);
  color: var(--bb-white) !important;
}
.woocommerce table.shop_table .quantity input {
  width: 64px;
  padding: 8px;
  border: 1px solid var(--bb-gray-200);
  border-radius: var(--bb-radius);
}
.woocommerce table.shop_table .button,
.woocommerce-cart-form .actions .button {
  font-family: var(--bb-font-heading);
  font-weight: 700;
  border-radius: 999px;
  background: var(--bb-black);
  color: var(--bb-white);
  padding: 10px 22px;
  border: none;
  cursor: pointer;
}
.woocommerce table.shop_table .button:hover,
.woocommerce-cart-form .actions .button:hover {
  background: var(--bb-orange);
}
.woocommerce .cart-collaterals .cart_totals {
  max-width: 420px;
  margin-left: auto;
  border: 1px solid var(--bb-gray-200);
  border-radius: var(--bb-radius);
  padding: 20px;
}
.woocommerce .cart-collaterals .cart_totals table { width: 100%; }
.woocommerce .cart-collaterals .cart_totals th,
.woocommerce .cart-collaterals .cart_totals td { border-bottom: 1px solid var(--bb-gray-200); }
.woocommerce .wc-proceed-to-checkout .checkout-button {
  display: block;
  text-align: center;
  background: var(--bb-orange);
  color: var(--bb-white);
  font-weight: 700;
  font-family: var(--bb-font-heading);
  border-radius: 999px;
  padding: 14px;
  text-decoration: none;
  margin-top: 16px;
}
.woocommerce .wc-proceed-to-checkout .checkout-button:hover {
  background: var(--bb-orange-dark);
}

@media (max-width: 700px) {
  .woocommerce table.shop_table thead { display: none; }
  .woocommerce table.shop_table, .woocommerce table.shop_table tbody, .woocommerce table.shop_table tr, .woocommerce table.shop_table td {
    display: block;
    width: 100%;
  }
  .woocommerce table.shop_table tr {
    border-bottom: 1px solid var(--bb-gray-200);
    padding: 12px 0;
  }
}

/* On-brand empty-cart state (replaces WooCommerce's default sad-face icon) */
.bb-cart-empty {
  text-align: center;
  max-width: 420px;
  margin: 40px auto;
  padding: 48px 24px;
}
.bb-cart-empty svg {
  color: var(--bb-gray-500);
  margin-bottom: 18px;
}
.bb-cart-empty h2 { margin-bottom: 8px; }
.bb-cart-empty p { color: var(--bb-gray-500); margin-bottom: 24px; }

/* WooCommerce's native Mini Cart block — light styling to match the
   site's black/orange palette instead of WooCommerce's default look.
   Class names are WooCommerce Blocks' own; if a future WC update
   renames them, this styling degrades gracefully (block still works,
   just reverts to WooCommerce's own default appearance). */
.wp-block-woocommerce-mini-cart { display: flex; align-items: center; }
.wc-block-mini-cart__button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--bb-black);
  font-family: var(--bb-font-heading);
  font-weight: 600;
  font-size: 0.95rem;
}
.wc-block-mini-cart__button:hover { color: var(--bb-orange); }

/* Custom cart icon, replacing WooCommerce's default glyph. Hides the
   built-in SVG and shows our own via a ::before pseudo-element in its
   place — the button itself, its click behavior, and the live count
   badge are untouched, only the icon graphic changes. */
.wc-block-mini-cart__button svg { display: none !important; }
.wc-block-mini-cart__button {
  position: relative;
  padding-left: 28px !important;
}
.wc-block-mini-cart__button::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  background-image: url('assets/images/cart-icon.svg');
  background-repeat: no-repeat;
  background-size: contain;
}

.wc-block-mini-cart__badge {
  background: var(--bb-orange) !important;
  color: var(--bb-white) !important;
}
.wc-block-mini-cart__amount { color: var(--bb-black); font-weight: 600; }
