/*
Theme Name: Coffee & Blenders SA
Theme URI: https://coffeeandblenders.co.za
Author: Coffee & Blenders SA
Description: Premium Italian coffee equipment specialist theme for South Africa
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: Proprietary
Text Domain: cb-theme
*/

/* ═══════════════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════════════ */
:root {
  --espresso:  #1A0A00;
  --roast:     #2C1A0E;
  --crema:     #C8872A;
  --gold:      #F0D080;
  --parchment: #FBF5EC;
  --cream:     #F5EDD8;
  --white:     #FFFFFF;
  --text:      #1A0A00;
  --muted:     #6B5040;
  --subtle:    #9B8070;
  --steam:     #E8DCC8;

  --ff-display: 'Playfair Display', Georgia, serif;
  --ff-body:    'DM Sans', 'Helvetica Neue', sans-serif;

  --container: 1280px;
  --radius:    6px;
  --radius-lg: 12px;
  --transition: 0.22s ease;
  --shadow:    0 4px 16px rgba(26,10,0,0.12);
  --shadow-lg: 0 16px 48px rgba(26,10,0,0.2);
}

/* ═══════════════════════════════════════════════
   RESET
═══════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--ff-body);
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* ═══════════════════════════════════════════════
   TOP BAR
═══════════════════════════════════════════════ */
.cb-topbar {
  background: var(--espresso);
  color: var(--gold);
  font-size: 12.5px;
  font-weight: 500;
}
.cb-topbar-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 40px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.cb-topbar-left,
.cb-topbar-right { display: flex; align-items: center; gap: 20px; }
.cb-topbar-center { flex: 1; text-align: center; }
.cb-topbar a {
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: opacity var(--transition);
}
.cb-topbar a:hover { opacity: 0.75; }
.cb-topbar svg { flex-shrink: 0; }

/* ═══════════════════════════════════════════════
   SITE HEADER
═══════════════════════════════════════════════ */
.site-header {
  background: var(--roast);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 40px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Logo */
.site-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.site-logo img { height: 44px; width: auto; }
.logo-text { display: flex; flex-direction: column; }
.logo-name {
  font-family: var(--ff-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--white);
}
.logo-name span { color: var(--crema); }
.logo-tagline {
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}

/* Primary nav - desktop */
.primary-nav { display: flex; align-items: center; }
.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}
.primary-nav > ul > li { position: relative; }
.primary-nav > ul > li > a {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  color: rgba(255,255,255,0.82);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: var(--transition);
  white-space: nowrap;
}
.primary-nav > ul > li > a:hover,
.primary-nav > ul > li.current-menu-item > a,
.primary-nav > ul > li.current-menu-ancestor > a {
  color: var(--gold);
  background: rgba(255,255,255,0.08);
}

/* Dropdown sub-menus */
.primary-nav > ul > li > ul {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--espresso);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  min-width: 220px;
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  box-shadow: var(--shadow-lg);
  z-index: 200;
}
.primary-nav > ul > li:hover > ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.primary-nav > ul > li > ul li a {
  display: block;
  padding: 9px 14px;
  color: rgba(255,255,255,0.72);
  font-size: 0.85rem;
  border-radius: var(--radius);
  transition: var(--transition);
}
.primary-nav > ul > li > ul li a:hover {
  color: var(--gold);
  background: rgba(255,255,255,0.06);
}

/* Header actions */
.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.header-search-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  padding: 8px;
  display: flex;
  align-items: center;
  border-radius: var(--radius);
  transition: var(--transition);
}
.header-search-btn:hover { color: var(--gold); background: rgba(255,255,255,0.08); }
.header-cart-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  color: rgba(255,255,255,0.82);
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}
.header-cart-link:hover { border-color: var(--crema); color: var(--gold); }
.cart-count {
  background: var(--crema);
  color: var(--espresso);
  font-size: 11px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.header-cta {
  background: var(--crema);
  color: var(--espresso);
  padding: 9px 20px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 700;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
}
.header-cta:hover { background: var(--gold); }

/* Hamburger - hidden on desktop */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: none;
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: var(--radius);
  gap: 5px;
  padding: 0;
  transition: var(--transition);
}
.menu-toggle:hover { border-color: var(--crema); }
.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Search bar */
.header-search-wrap {
  background: var(--roast);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: none;
  padding: 14px 40px;
}
.header-search-wrap.open { display: block; }
.header-search-inner {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  align-items: center;
}
.header-search-inner .search-form { flex: 1; }
.header-search-inner input[type="search"] {
  width: 100%;
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(255,255,255,0.18);
  color: var(--white);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 14px;
  font-family: var(--ff-body);
  outline: none;
}
.header-search-inner input[type="search"]:focus { border-color: var(--crema); }
.header-search-inner input[type="search"]::placeholder { color: rgba(255,255,255,0.35); }
.header-search-inner input[type="submit"] {
  background: var(--crema);
  color: var(--espresso);
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-weight: 700;
  font-family: var(--ff-body);
  cursor: pointer;
  transition: var(--transition);
}
.header-search-inner input[type="submit"]:hover { background: var(--gold); }
.search-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 20px;
  padding: 6px;
  line-height: 1;
  transition: var(--transition);
}
.search-close:hover { color: var(--crema); }

/* ═══════════════════════════════════════════════
   DELIVERY TICKER
═══════════════════════════════════════════════ */
.delivery-strip {
  background: var(--espresso);
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.strip-track {
  display: flex;
  width: max-content;
  animation: ticker 30s linear infinite;
}
@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.strip-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 32px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 500;
  border-right: 1px solid rgba(240,208,128,0.15);
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════
   PAGE WRAPPER
═══════════════════════════════════════════════ */
#page-wrapper { min-height: 60vh; }

/* ═══════════════════════════════════════════════
   FULL WIDTH PAGE TEMPLATE
═══════════════════════════════════════════════ */
.full-width-page #page-wrapper,
.full-width-page .page-content-wrap,
.full-width-page .entry-content,
.full-width-page .wp-block-post-content,
.full-width-page .wp-block-post-content > *,
.full-width-page .is-layout-constrained,
.full-width-page .is-layout-flow,
.full-width-page .has-global-padding {
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
.full-width-page #page-wrapper {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* ═══════════════════════════════════════════════
   STANDARD PAGE
═══════════════════════════════════════════════ */
.page-content-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 56px 40px 80px;
}
.page-hero {
  background: var(--espresso);
  padding: 48px 0 40px;
}
.page-hero-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 40px;
}
.page-hero h1 {
  font-family: var(--ff-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--white);
  font-weight: 700;
  margin-top: 8px;
}
.woocommerce-breadcrumb {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
}
.woocommerce-breadcrumb a { color: var(--gold); }

/* ═══════════════════════════════════════════════
   WOOCOMMERCE SHOP
═══════════════════════════════════════════════ */
.cb-shop-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 36px 40px 80px;
}
/* Ensure shop is never flush to browser edge */
@media (min-width: 1320px) {
  .cb-shop-wrap { padding-left: max(40px, calc((100vw - 1280px) / 2)); padding-right: max(40px, calc((100vw - 1280px) / 2)); }
}
.cb-shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 20px;
  background: var(--parchment);
  border: 1px solid var(--steam);
  border-radius: var(--radius-lg);
  margin-bottom: 28px;
}
.woocommerce-result-count { font-size: 0.875rem; color: var(--muted); }
.woocommerce-ordering select {
  border: 1px solid var(--steam);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-family: var(--ff-body);
  font-size: 0.875rem;
  color: var(--text);
  background: var(--white);
}

/* Product grid */
ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 20px !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
ul.products::before,
ul.products::after { display: none !important; }
ul.products li.product {
  float: none !important;
  clear: none !important;
  width: auto !important;
  margin: 0 !important;
  background: var(--white);
  border: 1px solid var(--steam);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex !important;
  flex-direction: column;
}
ul.products li.product:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
ul.products li.product img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: contain;
  padding: 20px;
  background: var(--parchment);
  border-bottom: 1px solid var(--steam);
}
ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--ff-display);
  font-size: 0.95rem !important;
  font-weight: 600;
  color: var(--espresso);
  padding: 12px 16px 4px !important;
  line-height: 1.3;
}
ul.products li.product .price {
  display: block;
  padding: 0 16px 12px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--crema);
}
ul.products li.product .button {
  display: block;
  margin: 0 16px 16px;
  padding: 10px;
  background: var(--crema);
  color: var(--espresso);
  font-weight: 700;
  font-size: 0.875rem;
  text-align: center;
  border-radius: var(--radius);
  border: none;
  transition: var(--transition);
}
ul.products li.product .button:hover { background: var(--gold); }
ul.products li.product-category {
  grid-column: 1 / -1 !important;
  border-radius: var(--radius-lg);
}

/* Pagination */
.woocommerce-pagination ul {
  display: flex !important;
  gap: 6px !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
  border: none !important;
  margin-top: 40px !important;
}
.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
  display: block !important;
  padding: 8px 14px !important;
  border: 1px solid var(--steam) !important;
  border-radius: var(--radius) !important;
  color: var(--muted) !important;
  font-size: 0.875rem !important;
  transition: var(--transition) !important;
}
.woocommerce-pagination ul li span.current,
.woocommerce-pagination ul li a:hover {
  background: var(--crema) !important;
  border-color: var(--crema) !important;
  color: var(--white) !important;
}

/* WC Sidebar protection */
.widget ul, .widget .sub-menu, #secondary .sub-menu, .sidebar .sub-menu {
  position: static !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  box-shadow: none !important;
  background: transparent !important;
  display: block !important;
  max-height: none !important;
}

/* ═══════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════ */
.site-footer { background: var(--espresso); margin-top: 60px; }
.footer-main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 56px 40px 40px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 1.1fr 0.9fr;
  gap: 44px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-col h4 {
  font-family: var(--ff-display);
  font-size: 0.95rem;
  color: var(--white);
  font-weight: 700;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-col p, .footer-col address {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
  font-style: normal;
}
.footer-col ul { list-style: none; }
.footer-col ul li { padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.footer-col ul li a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  display: flex;
  align-items: center;
  gap: 7px;
  transition: var(--transition);
}
.footer-col ul li a::before {
  content: '→';
  color: var(--crema);
  font-size: 11px;
  flex-shrink: 0;
}
.footer-col ul li a:hover { color: var(--crema); gap: 10px; }
.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
}
.footer-contact-item a { color: var(--gold); transition: var(--transition); }
.footer-contact-item a:hover { color: var(--crema); }
.footer-contact-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(200,135,42,0.12);
  border: 1px solid rgba(200,135,42,0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
}
.footer-map { border-radius: 8px; overflow: hidden; border: 1px solid rgba(255,255,255,0.1); margin-bottom: 12px; }
.footer-map iframe { display: block; width: 100%; height: 170px; border: 0; }
.payment-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.payment-badge {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 4px;
  padding: 4px 9px;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.4px;
}
.payment-badge.visa { background: #1A1F71; }
.payment-badge.mc { background: #111; }
.footer-bottom {
  max-width: var(--container);
  margin: 0 auto;
  padding: 20px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-copyright {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
}
.footer-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.footer-trust {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 3px 10px;
}

/* ═══════════════════════════════════════════════
   404 PAGE
═══════════════════════════════════════════════ */
.error-404-wrap {
  text-align: center;
  padding: 80px 40px;
  background: var(--parchment);
}
.error-404-wrap h1 {
  font-family: var(--ff-display);
  font-size: clamp(2rem, 5vw, 4rem);
  color: var(--espresso);
  margin-bottom: 16px;
}
.error-404-wrap p { color: var(--muted); margin-bottom: 28px; }
.error-404-wrap a {
  background: var(--crema);
  color: var(--espresso);
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 700;
  display: inline-block;
  transition: var(--transition);
}
.error-404-wrap a:hover { background: var(--gold); }

/* ═══════════════════════════════════════════════
   UTILITY
═══════════════════════════════════════════════ */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — TABLET (max 1100px)
═══════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .header-inner { padding: 0 24px; }
  .cb-topbar-inner { padding: 0 24px; }
  .header-search-wrap { padding: 14px 24px; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 32px; padding: 40px 24px 32px; }
  .footer-bottom { padding: 18px 24px; }
  .cb-shop-wrap { padding: 28px 24px 56px; }
  .page-content-wrap { padding: 40px 24px 60px; }
  ul.products { grid-template-columns: repeat(3, 1fr) !important; }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — MOBILE (max 768px)
   Desktop nav is LOCKED via min-width block below.
   Mobile gets a clean dropdown — no fixed positioning,
   no blur, no overlay.
═══════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Top bar */
  .cb-topbar-inner {
    padding: 0 16px;
    height: auto;
    min-height: 36px;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    text-align: center;
  }
  .cb-topbar-left, .cb-topbar-right { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .cb-topbar { font-size: 11.5px; }

  /* Header */
  .header-inner { height: 60px; padding: 0 16px; }
  .header-cta { display: none; }
  .header-search-btn { display: none; }
  .cart-label { display: none; }
  .header-cart-link { padding: 8px 10px; }

  /* Show hamburger */
  .menu-toggle { display: flex; }

  /* Hide desktop nav */
  .primary-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--espresso);
    border-top: 2px solid var(--crema);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    z-index: 999;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .primary-nav.nav-open { display: block; }
  .site-header { position: sticky; top: 0; }
  #site-header { position: relative; }

  /* Mobile nav list */
  .primary-nav ul {
    display: block !important;
    padding: 8px 0 16px;
  }
  .primary-nav > ul > li { position: static; border-bottom: 1px solid rgba(255,255,255,0.06); }
  .primary-nav > ul > li > a {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 14px 20px !important;
    color: rgba(255,255,255,0.88) !important;
    font-size: 0.95rem !important;
    border-radius: 0 !important;
  }
  .primary-nav > ul > li > a:hover { background: rgba(200,135,42,0.12) !important; color: var(--gold) !important; }

  /* Mobile sub-menus */
  .primary-nav > ul > li > ul {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    background: rgba(255,255,255,0.04) !important;
    padding: 0 !important;
    min-width: unset !important;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .primary-nav > ul > li.sub-open > ul { max-height: 500px; }
  .primary-nav > ul > li > ul li a {
    padding: 11px 20px 11px 36px !important;
    font-size: 0.875rem !important;
    color: rgba(255,255,255,0.6) !important;
    border-radius: 0 !important;
  }
  .primary-nav > ul > li > ul li a::before { content: '└ '; color: var(--crema); margin-right: 4px; }
  .primary-nav > ul > li > ul li a:hover { color: var(--gold) !important; background: rgba(255,255,255,0.04) !important; }

  /* Sub-menu chevron */
  .sub-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    flex-shrink: 0;
    transition: transform 0.25s ease;
  }
  .sub-open > a .sub-chevron { transform: rotate(180deg); }

  /* Footer */
  .footer-main { grid-template-columns: 1fr; padding: 36px 16px 24px; gap: 24px; }
  .footer-bottom { padding: 16px; flex-direction: column; align-items: center; text-align: center; }

  /* Shop */
  .cb-shop-wrap { padding: 20px 16px 48px; }
  ul.products { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }

  /* Page */
  .page-content-wrap { padding: 28px 16px 48px; }
  .page-hero { padding: 32px 0 28px; }
  .page-hero-inner { padding: 0 16px; }

  /* Search */
  .header-search-wrap { padding: 12px 16px; }

  /* Forms */
  input, select, textarea { font-size: 16px !important; }
}

/* ═══════════════════════════════════════════════
   DESKTOP LOCK — NEVER let mobile CSS affect desktop
═══════════════════════════════════════════════ */
@media (min-width: 769px) {
  .menu-toggle { display: none !important; }
  .primary-nav { display: flex !important; position: static !important; background: transparent !important; box-shadow: none !important; max-height: none !important; overflow: visible !important; border: none !important; }
  .primary-nav ul { display: flex !important; flex-direction: row !important; }
  .primary-nav > ul > li > ul { display: block; }
  .header-cta { display: inline-block !important; }
  .header-inner { height: 72px !important; padding: 0 40px !important; }
  .cart-label { display: inline !important; }
}

@media (max-width: 480px) {
  ul.products { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
  .cb-topbar-left, .cb-topbar-right { display: none; }
}

/* ═══════════════════════════════════════════════
   SINGLE PRODUCT PAGE
   Centered, padded — never edge-to-edge.
═══════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════
   SINGLE PRODUCT PAGE — PROFESSIONAL FULL-WIDTH
   Matches theme design tokens exactly.
   Two-column desktop, single-column mobile.
   Description panel fills full width — never narrow.
═══════════════════════════════════════════════ */

/* ── PAGE WRAPPER ── */
/* ═══════════════════════════════════════════════
   SINGLE PRODUCT PAGE
   Professional layout — contained, padded, on-brand.
   Max 1280px centred. Never edge-to-edge.
═══════════════════════════════════════════════ */

/* Page container */
/* ═══════════════════════════════════════════════
   SINGLE PRODUCT PAGE
   WooCommerce renders: div.product > gallery + summary + tabs
   We apply CSS grid directly to div.product — no wrapper divs.
   This is the correct approach used by all professional WC themes.
═══════════════════════════════════════════════ */

/* ── Outer page container ── */
.cb-product-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 44px 48px 88px;
}

/* ── div.product = CSS grid ──
   WooCommerce outputs:
   div.product
     ├── .woocommerce-product-gallery  (col 1)
     ├── .entry-summary                (col 2)
     ├── .woocommerce-tabs             (full width)
     ├── .related.products             (full width)
     └── .upsells.products             (full width)
── */
.cb-product-page div.product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto;
  column-gap: 56px;
  row-gap: 0;
  align-items: start;
}

/* Column assignments */
.cb-product-page .woocommerce-product-gallery { grid-column: 1; grid-row: 1; }
.cb-product-page .entry-summary               { grid-column: 2; grid-row: 1; }
.cb-product-page .woocommerce-tabs            { grid-column: 1 / -1; grid-row: 2; margin-top: 48px; }
.cb-product-page .up-sells,
.cb-product-page .upsells.products            { grid-column: 1 / -1; grid-row: 3; }
.cb-product-page .related.products            { grid-column: 1 / -1; grid-row: 4; }

/* WC clearfix reset */
.cb-product-page div.product::before,
.cb-product-page div.product::after { display: none !important; }
.cb-product-page .woocommerce-product-gallery,
.cb-product-page .entry-summary {
  float: none !important;
  width: 100% !important;
  clear: none !important;
}

/* ── GALLERY (left column) ── */
.cb-product-page .woocommerce-product-gallery {
  position: sticky;
  top: 96px;
  background: var(--parchment);
  border: 1px solid var(--steam);
  border-radius: 12px;
  overflow: hidden;
  padding: 0;
}
.cb-product-page .woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
  padding: 28px 28px 12px;
}
.cb-product-page .woocommerce-product-gallery__image img,
.cb-product-page .woocommerce-product-gallery__wrapper img {
  width: 100% !important;
  height: auto !important;
  max-height: 460px !important;
  object-fit: contain !important;
  border-radius: 8px;
  display: block;
}
/* Thumbnails */
.cb-product-page .flex-control-thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 20px 20px;
  list-style: none;
  margin: 0;
}
.cb-product-page .flex-control-thumbs li { list-style: none; }
.cb-product-page .flex-control-thumbs li img {
  width: 64px; height: 64px;
  object-fit: contain;
  border: 2px solid var(--steam);
  border-radius: 6px;
  background: var(--white);
  padding: 4px;
  cursor: pointer;
  transition: border-color 0.2s;
  display: block;
}
.cb-product-page .flex-control-thumbs li img:hover,
.cb-product-page .flex-control-thumbs li img.flex-active { border-color: var(--crema); }
/* Sale badge */
.cb-product-page span.onsale {
  background: var(--crema) !important;
  color: #fff !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
  padding: 4px 10px !important;
  font-size: 0.78rem !important;
  min-height: unset !important;
  min-width: unset !important;
  line-height: 1.4 !important;
  top: 14px !important;
  left: 14px !important;
}

/* ── SUMMARY (right column) ── */
.cb-product-page .entry-summary {
  padding: 4px 0 0;
}

/* Brand badge */
.cb-product-brand {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(200,135,42,.1);
  border: 1px solid rgba(200,135,42,.25);
  color: var(--crema);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 14px;
  width: fit-content;
}

/* Title */
.cb-product-page .product_title {
  font-family: var(--ff-display);
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
  font-weight: 700;
  color: var(--espresso);
  line-height: 1.25;
  margin: 0 0 14px !important;
}

/* Rating */
.cb-product-page .woocommerce-product-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--steam);
}
.cb-product-page .star-rating { color: var(--crema); }
.cb-product-page .woocommerce-review-link { font-size: 0.82rem; color: var(--subtle); text-decoration: none; }
.cb-product-page .woocommerce-review-link:hover { color: var(--crema); }

/* Price */
.cb-product-page .price {
  display: block !important;
  font-size: 1.8rem !important;
  font-weight: 800 !important;
  color: var(--crema) !important;
  margin-bottom: 4px !important;
  line-height: 1.1 !important;
}
.cb-product-page .price del { color: var(--subtle) !important; font-size: 1.1rem !important; font-weight: 400 !important; margin-right: 8px !important; }
.cb-product-page .price ins { text-decoration: none !important; }

/* Price note */
.cb-price-note { font-size: 0.78rem; color: var(--subtle); margin-bottom: 18px; }

/* Short description */
.cb-product-page .woocommerce-product-details__short-description {
  font-size: 0.93rem;
  line-height: 1.78;
  color: var(--muted);
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--steam);
}
.cb-product-page .woocommerce-product-details__short-description p { margin-bottom: 10px; }
.cb-product-page .woocommerce-product-details__short-description p:last-child { margin-bottom: 0; }
.cb-product-page .woocommerce-product-details__short-description ul,
.cb-product-page .woocommerce-product-details__short-description ol { margin: 0 0 10px 18px; }
.cb-product-page .woocommerce-product-details__short-description li { margin-bottom: 5px; }

/* Add to cart */
.cb-product-page form.cart {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  margin-bottom: 18px !important;
}
.cb-product-page .quantity .qty {
  width: 66px !important;
  height: 50px !important;
  border: 2px solid var(--steam) !important;
  border-radius: 6px !important;
  text-align: center !important;
  font-size: 1rem !important;
  font-family: var(--ff-body) !important;
  font-weight: 600 !important;
  color: var(--text) !important;
  background: var(--white) !important;
  padding: 0 !important;
}
.cb-product-page .quantity .qty:focus { border-color: var(--crema) !important; outline: none !important; }
.cb-product-page .single_add_to_cart_button {
  flex: 1 !important;
  min-width: 160px !important;
  height: 50px !important;
  background: var(--crema) !important;
  color: var(--espresso) !important;
  border: none !important;
  padding: 0 32px !important;
  border-radius: 6px !important;
  font-family: var(--ff-body) !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: background 0.2s, color 0.2s !important;
  letter-spacing: 0.2px !important;
  line-height: 50px !important;
  text-align: center !important;
}
.cb-product-page .single_add_to_cart_button:hover {
  background: var(--espresso) !important;
  color: var(--white) !important;
}

/* Trust badges */
.cb-product-trust {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 18px 0 20px;
}
.cb-trust-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--parchment);
  border: 1px solid var(--steam);
  border-radius: 6px;
  padding: 9px 12px;
}

/* Product meta */
.cb-product-page .product_meta {
  font-size: 0.84rem;
  color: var(--subtle);
  padding-top: 18px;
  border-top: 1px solid var(--steam);
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 0;
}
.cb-product-page .product_meta .label { font-weight: 600; color: var(--muted); }
.cb-product-page .product_meta a { color: var(--crema); transition: color 0.2s; text-decoration: none; }
.cb-product-page .product_meta a:hover { color: var(--espresso); }

/* ── TABS (full width, below both columns) ── */
.cb-product-page .woocommerce-tabs ul.tabs {
  display: flex;
  gap: 4px;
  list-style: none;
  padding: 0; margin: 0;
  border-bottom: 2px solid var(--steam);
}
.cb-product-page .woocommerce-tabs ul.tabs::before,
.cb-product-page .woocommerce-tabs ul.tabs li::before,
.cb-product-page .woocommerce-tabs ul.tabs li::after { display: none !important; content: none !important; }
.cb-product-page .woocommerce-tabs ul.tabs li {
  margin: 0 !important; padding: 0 !important;
  border: none !important; background: none !important;
  border-radius: 0 !important;
}
.cb-product-page .woocommerce-tabs ul.tabs li a {
  display: block;
  padding: 12px 24px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  border: 1.5px solid transparent;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  transition: color 0.2s;
  text-decoration: none;
  white-space: nowrap;
}
.cb-product-page .woocommerce-tabs ul.tabs li a:hover { color: var(--crema); }
.cb-product-page .woocommerce-tabs ul.tabs li.active a {
  color: var(--espresso);
  background: var(--white);
  border-color: var(--steam);
  margin-bottom: -2px;
  font-weight: 700;
}
/* Tab panel */
.cb-product-page .woocommerce-tabs .panel {
  padding: 40px 44px;
  background: var(--white);
  border: 1.5px solid var(--steam);
  border-top: none;
  border-radius: 0 8px 8px 8px;
  max-width: 100% !important;
  width: 100% !important;
}
/* Description typography */
.cb-product-page .woocommerce-tabs .panel h2 {
  font-family: var(--ff-display);
  color: var(--espresso);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 28px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--steam);
}
.cb-product-page .woocommerce-tabs .panel h2:first-child { margin-top: 0; }
.cb-product-page .woocommerce-tabs .panel h3 {
  font-family: var(--ff-display);
  color: var(--roast);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 22px 0 8px;
}
.cb-product-page .woocommerce-tabs .panel h4 {
  font-weight: 700;
  color: var(--espresso);
  margin: 16px 0 6px;
}
.cb-product-page .woocommerce-tabs .panel p {
  margin-bottom: 16px;
  line-height: 1.82;
  color: var(--text);
  font-size: 0.95rem;
}
.cb-product-page .woocommerce-tabs .panel ul,
.cb-product-page .woocommerce-tabs .panel ol {
  margin: 0 0 16px 22px;
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text);
}
.cb-product-page .woocommerce-tabs .panel li { margin-bottom: 7px; }
.cb-product-page .woocommerce-tabs .panel strong { color: var(--espresso); }
/* Spec table */
.cb-product-page .woocommerce-tabs .panel table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 0.9rem;
}
.cb-product-page .woocommerce-tabs .panel table th,
.cb-product-page .woocommerce-tabs .panel table td {
  padding: 10px 14px;
  border: 1px solid var(--steam);
  text-align: left;
  vertical-align: top;
}
.cb-product-page .woocommerce-tabs .panel table th {
  background: var(--parchment);
  font-weight: 700;
  color: var(--espresso);
  width: 36%;
}
.cb-product-page .woocommerce-tabs .panel table tr:nth-child(even) td { background: #faf6f0; }

/* ── RELATED / UPSELLS ── */
.cb-product-page .related.products,
.cb-product-page .up-sells.upsells { margin-top: 48px; padding-top: 40px; border-top: 2px solid var(--steam); }
.cb-product-page .related.products > h2,
.cb-product-page .up-sells > h2 {
  font-family: var(--ff-display); font-size: 1.4rem; font-weight: 700;
  color: var(--espresso); margin-bottom: 24px;
}
.cb-product-page .related.products ul.products,
.cb-product-page .up-sells ul.products { grid-template-columns: repeat(4,1fr) !important; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .cb-product-page { padding: 32px 32px 64px; }
  .cb-product-page div.product { column-gap: 36px; }
  .cb-product-page .woocommerce-tabs .panel { padding: 28px 28px; }
}
@media (max-width: 900px) {
  .cb-product-page div.product {
    grid-template-columns: 1fr;
  }
  .cb-product-page .woocommerce-product-gallery { position: static; grid-column: 1; grid-row: 1; margin-bottom: 28px; }
  .cb-product-page .entry-summary               { grid-column: 1; grid-row: 2; }
  .cb-product-page .woocommerce-tabs            { grid-row: 3; }
  .cb-product-page .up-sells                    { grid-row: 4; }
  .cb-product-page .related.products            { grid-row: 5; }
  .cb-product-page .related.products ul.products,
  .cb-product-page .up-sells ul.products { grid-template-columns: repeat(2,1fr) !important; }
}
@media (max-width: 768px) {
  .cb-product-page { padding: 20px 18px 48px; }
  .cb-product-page .product_title { font-size: 1.3rem !important; }
  .cb-product-page form.cart { flex-direction: column !important; align-items: stretch !important; }
  .cb-product-page .quantity .qty { width: 100% !important; }
  .cb-product-trust { grid-template-columns: 1fr 1fr; }
  .cb-product-page .woocommerce-tabs ul.tabs { flex-wrap: wrap; }
  .cb-product-page .woocommerce-tabs .panel { padding: 22px 18px; }
}
@media (max-width: 480px) {
  .cb-product-trust { grid-template-columns: 1fr; }
  .cb-product-page .price { font-size: 1.5rem !important; }
}

/* ── GENERAL CONTENT PADDING FIX ──────────────
   Ensure ALL WooCommerce pages never go edge-to-edge
──────────────────────────────────────────────── */
.woocommerce-page:not(.single-product) .woocommerce,
.woocommerce:not(.single-product) {
  max-width: var(--container);
  margin: 0 auto;
  padding: 36px 40px 72px;
}
@media (max-width: 1100px) {
  .woocommerce-page:not(.single-product) .woocommerce,
  .woocommerce:not(.single-product) { padding: 28px 24px 56px; }
}
@media (max-width: 768px) {
  .woocommerce-page:not(.single-product) .woocommerce,
  .woocommerce:not(.single-product) { padding: 20px 16px 40px; }
}
