/* === HEADER COMPONENT STYLES === */
:root {
    --proviotic-green: #7FBF32;
    --green-dark: #5c9823;
    --green-light: #e8f4e2;
    --warm-white: #faf9f7;
    --text-dark: #333;
    --text-medium: #666;
    --text-light: #888;
    --border-color: #e1e8ed;
    --shadow: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-strong: 0 8px 32px rgba(0,0,0,0.12);
    --radius: 8px;
    --nav-height: 70px;
    --z-nav: 1000;
    --z-cart: 1100;
    --z-mobile: 1050;
  }

  body {
    padding-top: var(--nav-height) !important;
}
  
  /* Ensure the header wrapper spans full width even when body is center-aligned flex */
  #site-header {
    width: 100%;
    align-self: stretch;
    display: block;
    position: relative; /* not sticky here */
    z-index: 10000;
  }
  
  /* === MAIN NAVIGATION === */
  .main-nav {
    position: fixed !important;
  top: 0; left: 0; right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 9999;
    width: 100%;
    transition: all 0.3s ease;
    will-change: transform;
  }
  
  .nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-height);
  }
  
  .nav-logo__img {
    height: 42px;
    width: auto;
  }
  
  .nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
  }

  /* === HEADER CTA === */
  .header-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: var(--proviotic-green);
    color: #fff;
    font-weight: 600;
    padding: 0.6rem 1.1rem;
    border-radius: 999px;
    line-height: 1;
    transition: background 0.25s ease, transform 0.2s ease;
    white-space: nowrap;
  }

  .header-cta:hover {
    background: var(--green-dark);
    transform: translateY(-1px);
  }

  .header-cta--desktop { display: none; }
  .header-cta--mobile { display: none; }
  .header-cta--drawer { display: inline-flex; width: 100%; justify-content: center; }
  
  .nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-right: 1rem;
  }
  
  .nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.75rem 0;
    position: relative;
    transition: color 0.25s ease;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
  }
  
  .nav-link:hover,
  .nav-link--active {
    color: var(--proviotic-green);
  }
  
  .nav-link--active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--proviotic-green);
  }
  
  /* === DROPDOWN === */
  .nav-dropdown {
    position: relative;
  }
  
  .nav-dropdown__toggle .dropdown-arrow {
    transition: transform 0.25s ease;
  }
  
  .nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
  }
  
  .nav-dropdown__menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 280px;
    padding: 0.75rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s ease;
    z-index: 1001;
  }
  
  .nav-dropdown:hover .nav-dropdown__menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  
  .dropdown-item {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    border-left: 3px solid transparent;
  }
  
  .dropdown-item:hover {
    background: var(--green-light);
    border-left-color: var(--proviotic-green);
    color: var(--proviotic-green);
  }
  
  /* === CART === */
  .cart-toggle {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: background 0.25s ease;
    color: var(--text-dark);
  }
  
  .cart-toggle:hover {
    background: var(--green-light);
    color: var(--proviotic-green);
  }
  
  .cart-icon {
    width: 24px;
    height: 24px;
  }
  
  .cart-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--proviotic-green);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
  }
  
  /* === MOBILE MENU TOGGLE === */
  .mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 3px;
  }
  
  .hamburger-line {
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    transition: all 0.3s ease;
  }
  
  /* === MOBILE NAVIGATION === */
  .mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-mobile);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  
  .mobile-overlay.active {
    opacity: 1;
    visibility: visible;
  }
  
  .mobile-menu {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: white;
    padding: 2rem 1.5rem;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    max-height: calc(100vh - var(--nav-height));
    overflow-y: auto;
  }

  .drawer-cta {
    padding-top: 1rem;
  }
  
  .mobile-overlay.active .mobile-menu {
    transform: translateY(0);
  }
  
  .mobile-link {
    display: block;
    padding: 1rem 0;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
    transition: color 0.25s ease;
  }
  
  .mobile-link:hover {
    color: var(--proviotic-green);
  }
  
  .mobile-dropdown {
    border-bottom: 1px solid var(--border-color);
  }
  
  .mobile-dropdown__toggle {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 1rem 0;
    color: var(--text-dark);
    font-size: 1rem; /* Ensure same size as other mobile links */
    font-weight: 500;
    cursor: pointer;
    transition: color 0.25s ease;
    position: relative;
    font-family: inherit;
  }
  
  .mobile-dropdown__toggle:hover {
    color: var(--proviotic-green);
  }
  
  .mobile-dropdown__toggle::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: var(--proviotic-green);
    transition: transform 0.3s ease;
  }
  
  .mobile-dropdown__toggle.active::after {
    transform: translateY(-50%) rotate(45deg);
  }
  
  .mobile-dropdown__menu {
    display: none;
    background: var(--warm-white);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 0.5rem 0 0;
  }
  
  .mobile-dropdown__menu.active {
    display: block;
  }
  
  .mobile-dropdown__item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.25s ease;
  }
  
  .mobile-dropdown__item:last-child {
    border-bottom: none;
  }
  
  .mobile-dropdown__item:hover {
    background: var(--green-light);
    color: var(--proviotic-green);
  }
  
  /* === CART DRAWER === */
  .cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    z-index: var(--z-cart);
    visibility: hidden;
    transition: visibility 0.3s ease;
  }
  
  .cart-drawer.active {
    visibility: visible;
  }
  
  .cart-drawer__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .cart-drawer.active .cart-drawer__overlay {
    opacity: 1;
  }
  
  .cart-drawer__content {
    position: absolute;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 100vw;
    height: 100%;
    background: white;
    box-shadow: var(--shadow-strong);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
  }
  
  .cart-drawer.active .cart-drawer__content {
    transform: translateX(0);
  }
  
  .cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
  }
  
  .cart-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
  }
  
  .cart-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: background 0.25s ease;
  }
  
  .cart-close:hover {
    background: var(--green-light);
  }
  
  .shipping-progress {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
  }
  
  .progress-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.75rem;
  }
  
  .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--proviotic-green), var(--green-dark));
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 3px;
  }
  
  .progress-text {
    font-size: 0.9rem;
    color: var(--text-medium);
    text-align: center;
    margin: 0;
  }
  
  .cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
  }
  
  .cart-empty {
    text-align: center;
    padding: 2rem 0;
  }
  
  .empty-cart-icon {
    color: var(--text-light);
    margin-bottom: 1rem;
  }
  
  .cart-empty p {
    color: var(--text-medium);
    margin-bottom: 1.5rem;
  }
  
  .btn-shop-now {
    background: var(--proviotic-green);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s ease;
  }
  
  .btn-shop-now:hover {
    background: var(--green-dark);
  }
  
  .cart-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--warm-white);
  }
  
  .cart-total {
    margin-bottom: 1.5rem;
  }
  
  .total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
  }
  
  .total-final {
    font-size: 1.1rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
  }
  
  .shipping-info {
    color: var(--text-medium);
    font-size: 0.9rem;
  }
  
  .btn-checkout {
    width: 100%;
    background: var(--proviotic-green);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s ease;
  }
  
  .btn-checkout:hover {
    background: var(--green-dark);
  }
  
  /* === RESPONSIVE === */
  @media (max-width: 767px) {
    .nav-container {
      height: var(--nav-height);
    }
    
    .nav-logo__img {
      height: 32px;
    }
    
    .nav-menu {
      display: none !important;
    }
    
    .mobile-menu-toggle {
      display: flex !important;
    }
    
    .cart-drawer__content {
      width: 100vw;
    }
    
    .mobile-menu {
      top: 64px;
      max-height: calc(100vh - 64px);
    }

    .header-cta--desktop { display: none !important; }
    .header-cta--mobile {
      display: inline-flex !important;
      font-size: 0.9rem;
      padding: 0.45rem 0.85rem;
    }
  }
  
  @media (min-width: 768px) {
    .mobile-overlay {
      display: none;
    }

    .header-cta--desktop { display: inline-flex; }
    .header-cta--mobile { display: none; }
  }
  