/*
Theme Name: Olanzu
Template: hello-elementor
Version: 1.1.3
Description: Child theme for Olanzu — B2B traffic & safety signs store.
*/

/* ═══════════════════════════════════════════════
   DESIGN TOKENS
   ═══════════════════════════════════════════════ */
:root {
  /* Brand */
  --olz-red:        #E40414;   /* Primary red */
  --olz-red-dark:   #BB000D;   /* Hover / accent */
  --olz-secondary:  #111111;
  --olz-green:      #16a34a;   /* Success / free shipping */

  /* Text & surfaces */
  --olz-black:      #1A1A1A;   /* Headings */
  --olz-gray-900:   #111827;   /* Near-black — buttons, dark backgrounds */
  --olz-gray-800:   #1F2937;
  --olz-gray-700:   #374151;
  --olz-gray-500:   #6B7280;   /* Muted body text */
  --olz-gray-400:   #9CA3AF;   /* Placeholder / subtle */
  --olz-gray-300:   #D1D5DB;   /* Borders */
  --olz-gray-200:   #E5E7EB;   /* Dividers */
  --olz-gray-100:   #F3F4F6;   /* Light backgrounds */
  --olz-gray-50:    #F9FAFB;   /* Page background */

  /* Typography */
  --font-sans:      'Poppins', sans-serif;
  --font-mono:      monospace;

  /* Layout */
  --container-max:  1280px;
  --radius:         6px;

  /* Responsive page padding — overridden at breakpoints below */
  --page-px:        16px;   /* < 640px  — phones */
}
@media (min-width: 640px)  { :root { --page-px: 24px; } }  /* tablets */
@media (min-width: 1024px) { :root { --page-px: 32px; } }  /* desktop */


/* ═══════════════════════════════════════════════
   BASE
   ═══════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font-sans);
  color: var(--olz-black);
  -webkit-font-smoothing: antialiased;
}

/* Elementor container respects our max-width token */
.e-con-inner { max-width: var(--container-max) !important; }
.elementor-popup-modal .e-con-inner { max-width: 100% !important; }

/* Popup nav — prevent height stretch from Elementor flex context */
.elementor-popup-modal .elementor-widget-nav-menu,
.elementor-popup-modal .elementor-widget-nav-menu .elementor-widget-container {
  height: auto !important;
  min-height: 0 !important;
  flex: 0 0 auto !important;
}

/* "View All" menu item → red (used in Elementor nav widget) */
.olz-view-all .elementor-sub-item       { color: var(--olz-red) !important; font-weight: 500 !important; }
.olz-view-all .elementor-sub-item:hover { color: var(--olz-red-dark) !important; }

/* Nav menu hover + active — override Elementor inline styles */
header.elementor-location-header .elementor-item:hover,
header.elementor-location-header .elementor-item:focus {
  color: var(--olz-red) !important;
}
header.elementor-location-header .elementor-item.elementor-item-active,
header.elementor-location-header .elementor-item.highlighted,
header.elementor-location-header li.current-menu-item > .elementor-item,
header.elementor-location-header li.current-menu-ancestor > .elementor-item,
header.elementor-location-header li.olz-menu-active > .elementor-item {
  color: var(--olz-red) !important;
}


/* ═══════════════════════════════════════════════
   GLOBAL — NON-ELEMENTOR PAGE RESET
   Hello Elementor constrains .site-main on non-Elementor pages
   (max-width: 1140px + padding-inline: 10px at small screens).
   Add .olz-page-full as a body class via functions.php body_class filter
   on any WooCommerce / custom PHP page to neutralise those constraints.
   ═══════════════════════════════════════════════ */
.olz-page-full .site-main,
.olz-page-full #main          { max-width: 100% !important; width: 100% !important; padding-inline: 0 !important; }
.olz-page-full .entry-content { padding: 0 !important; max-width: none !important; }
.olz-page-full article.page   { padding: 0 !important; max-width: none !important; }
.olz-page-full .woocommerce   { max-width: none !important; padding-left: 0 !important; padding-right: 0 !important; }


/* ═══════════════════════════════════════════════
   GLOBAL — INNER CONTAINER
   Reusable wrapper: max-width + responsive side padding.
   Use in any page template: <div class="olz-inner">…</div>
   ═══════════════════════════════════════════════ */
.olz-inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--page-px);
}


/* ═══════════════════════════════════════════════
   GLOBAL — BREADCRUMB
   Used on product page, cart page, and any future page.
   HTML: <nav class="olz-breadcrumb">
           <div class="olz-breadcrumb__inner">
             <a>Home</a>
             <span class="olz-bc-sep">/</span>
             <span class="olz-bc-current">Page</span>
           </div>
         </nav>
   ═══════════════════════════════════════════════ */
.olz-breadcrumb {
  border-bottom: 1px solid var(--olz-gray-100);
  background: #fff;
}
.olz-breadcrumb__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 20px var(--page-px);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--olz-gray-500);
  list-style: none;
}
.olz-breadcrumb a {
  color: var(--olz-gray-500);
  text-decoration: none;
  transition: color 0.15s;
}
.olz-breadcrumb a:hover {
  color: var(--olz-red);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.olz-bc-sep     { color: var(--olz-gray-300); }
.olz-bc-current { font-weight: 500; color: var(--olz-gray-700); }


/* ═══════════════════════════════════════════════
   GLOBAL — UTILITY CLASSES
   ═══════════════════════════════════════════════ */

/* Inline success text (free shipping unlocked, coupon applied) */
.olz-free-tag { color: var(--olz-green); font-weight: 600; }

/* De-emphasised secondary text */
.olz-muted { color: var(--olz-gray-400); font-size: 0.8em; }

/* Dark button — used on empty-cart CTA, shop links */
.olz-btn-dark {
  display: inline-block;
  background: var(--olz-gray-900);
  color: #fff;
  padding: 0.875rem 2rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none !important;
  transition: background 0.2s;
}
.olz-btn-dark:hover { background: var(--olz-red); color: #fff; text-decoration: none !important; }

/* Red button — primary CTA (checkout, add-to-cart variants) */
.olz-btn-red {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--olz-red);
  color: #fff;
  padding: 0.875rem 2rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none !important;
  transition: background 0.2s;
  border: none;
  cursor: pointer;
}
.olz-btn-red:hover { background: var(--olz-red-dark); color: #fff; }

/* Outline button — secondary CTA */
.olz-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  border: 1.5px solid var(--olz-gray-300);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--olz-black);
  background: #fff;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
  cursor: pointer;
}
.olz-btn-outline:hover {
  border-color: var(--olz-gray-400);
  background: var(--olz-gray-50);
}


/* ═══════════════════════════════════════════════
   GLOBAL — SECTION HEADER (eyebrow + title)
   Used on product page sections, related products,
   reviews, and any future content sections.
   HTML: <div class="olz-section-header">
           <p class="olz-section-eyebrow">Label</p>
           <h2 class="olz-section-title">Heading</h2>
         </div>
   ═══════════════════════════════════════════════ */
.olz-section-header { margin-bottom: 40px; }

.olz-section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--olz-red);
  margin: 0 0 12px;
}

.olz-section-title {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 700;
  color: var(--olz-black);
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

@media (max-width: 640px) {
  .olz-section-header { margin-bottom: 24px; }
  .olz-section-title  { font-size: 24px; }
}


/* ═══════════════════════════════════════════════
   GLOBAL — SPECS TABLE
   ═══════════════════════════════════════════════ */
.olz-specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.olz-specs-wrap table.olz-specs-table thead,
.olz-specs-wrap table.olz-specs-table thead tr,
.olz-specs-wrap table.olz-specs-table thead tr th {
  background: #F9FAFB !important;
  background-color: #F9FAFB !important;
  border: none !important;
}
.olz-specs-wrap table.olz-specs-table thead tr {
  border-bottom: 1px solid #E5E7EB !important;
}
.olz-specs-wrap table.olz-specs-table tbody,
.olz-specs-wrap table.olz-specs-table tbody tr {
  border: none !important;
}
.olz-specs-table thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 500 !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6B7280 !important;
}
.olz-specs-table thead th:nth-child(2) {
  font-weight: 600 !important;
  color: #111827 !important;
}
.olz-specs-table thead th:nth-child(3) {
  font-weight: 600 !important;
  color: #6B7280 !important;
}
.olz-specs-table tbody tr {
  background: #fff !important;
}
.olz-specs-table tbody td {
  padding: 12px 16px;
  font-size: 14px;
  color: #4B5563;
  background: transparent !important;
  border-top: 1px solid #E5E7EB !important;
  border-bottom: none !important;
  border-left: none !important;
  border-right: none !important;
}
.olz-specs-table tbody td:nth-child(2) {
  font-weight: 500;
  color: #111827;
}
.olz-specs-table tbody td:nth-child(3) {
  color: #6B7280;
}
/* Mobile: hide 3rd column */
@media (max-width: 640px) {
  .olz-specs-table thead th:nth-child(3),
  .olz-specs-table tbody td:nth-child(3) {
    display: none;
  }
}
/* ═══════════════════════════════════════════════
   GLOBAL — WOOCOMMERCE BREADCRUMB
   Covers both: product page (native WC) + Elementor widget
   WC output: <nav class="woocommerce-breadcrumb">
                <a>Home</a> / <a>Category</a> / Current Page
              </nav>
   ═══════════════════════════════════════════════ */
.woocommerce-breadcrumb {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px !important;
  font-family: var(--font-sans) !important;
  color: var(--olz-gray-500) !important;
  background: #fff !important;
  border-bottom: 1px solid var(--olz-gray-100);
  padding: 20px var(--page-px);
  max-width: var(--container-max);
  margin: 0 auto;
}
.woocommerce-breadcrumb a {
  color: var(--olz-gray-500) !important;
  text-decoration: none !important;
  transition: color 0.15s;
}
.woocommerce-breadcrumb a:hover {
  color: var(--olz-red) !important;
  text-decoration: underline !important;
  text-underline-offset: 4px;
}
/* Current page = last text node in WC breadcrumb — no class added by WC.
   WC template outputs: <a>Home</a> / <a>Cat</a> / Plain text (no tag)
   We bold the nav itself for the last plain-text segment using :not(a) trick:
   any direct child that is NOT an anchor = separator text OR current page text.
   We target the whole nav as bold/dark and reset links back to gray. */
.woocommerce-breadcrumb {
  font-weight: 600 !important;
  color: var(--olz-gray-900) !important;
}
.woocommerce-breadcrumb a {
  font-weight: 400 !important;
  color: var(--olz-gray-500) !important;
}
.woocommerce-breadcrumb .olz-bc-sep {
  font-weight: 400 !important;
  color: var(--olz-gray-300) !important;
}

/* ═══════════════════════════════════════════════
   GLOBAL — WOOCOMMERCE PRODUCTS GRID (Elementor widget)
   Prevents overflow on mobile
   ═══════════════════════════════════════════════ */
.elementor-widget-woocommerce-products ul.products,
.woocommerce ul.products {
  width: 100% !important;
  max-width: 100% !important;
}
@media (max-width: 767px) {
  .elementor-widget-woocommerce-products ul.products {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
  }
  .elementor-widget-woocommerce-products ul.products li.product {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    float: none !important;
    box-sizing: border-box !important;
    overflow: hidden;
  }
}

/* Wrapper for border + radius */
.olz-specs-wrap {
  border: 1px solid #E5E7EB;
  border-radius: var(--radius);
  overflow: hidden;
}


/* ═══════════════════════════════════════════════
   GLOBAL — FREE SHIPPING PROGRESS BAR
   Used on: cart page order summary, cart drawer,
   and checkout page (future).
   Controlled via olz_get_free_shipping_threshold()
   in functions.php — hidden when no WC free-shipping
   method with min_amount is configured.
   ═══════════════════════════════════════════════ */
.olz-ship-progress-box {
  background: var(--olz-gray-50);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  border: 1px solid rgba(229, 231, 235, 0.5);
}
.olz-ship-progress-label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--olz-gray-700);
  margin-bottom: 0.5rem;
}
.olz-ship-progress-label strong  { color: var(--olz-red); }
.olz-ship-progress-unlocked      { color: var(--olz-green); font-weight: 700; }
.olz-ship-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(229, 231, 235, 0.6);
  border-radius: 999px;
  overflow: hidden;
}
.olz-ship-progress-fill {
  height: 100%;
  background: var(--olz-red);
  border-radius: 999px;
  transition: width 0.5s ease;
  min-width: 2px;  /* always show a sliver even at 0% */
}


/* ═══════════════════════════════════════════════
   GLOBAL — STICKY HEADER GLASS EFFECT
   Elementor adds .elementor-sticky--active automatically
   when header becomes sticky on scroll.
   Works for both Global header and Checkout header.
   ═══════════════════════════════════════════════ */
header.elementor-location-header .elementor-sticky--active {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10) !important;
  animation: olz-header-slide-down 0.35s ease forwards !important;
  z-index: 9999 !important;
}

@keyframes olz-header-slide-down {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}


