/* =========================================================
   LOCAL FONTS (Vazirmatn)
   ========================================================= */
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/Vazirmatn-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/Vazirmatn-Medium.woff2') format('woff2');
}
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/Vazirmatn-SemiBold.woff2') format('woff2');
}
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/Vazirmatn-Bold.woff2') format('woff2');
}

:root {
    /* Light */
    --bg: #f7f7f5;
    --surface: #ffffff;
    --surface-2: #f1f1ef;
    --surface-3: #e9e9e6;

    --text: #111111;
    --text-secondary: #686868;
    --text-muted: #999999;

    --border: rgba(0, 0, 0, 0.08);
    --border-strong: rgba(0, 0, 0, 0.14);

    --accent: #111111;
    --accent-contrast: #ffffff;

    --glass: rgba(255, 255, 255, 0.72);

    --shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
  }

  .dark {
    /* Dark */
    --bg: #050505;
    --surface: #101010;
    --surface-2: #171717;
    --surface-3: #202020;

    --text: #f5f5f5;
    --text-secondary: #969696;
    --text-muted: #5f5f5f;

    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);

    --accent: #ffffff;
    --accent-contrast: #000000;

    --glass: rgba(15, 15, 15, 0.72);

    --shadow: 0 25px 80px rgba(0, 0, 0, 0.45);
  }

  * {
    box-sizing: border-box;
  }

  html {
    scroll-behavior: smooth;
  }

  body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;

    background:
      radial-gradient(
        circle at 50% -10%,
        rgba(255, 255, 255, 0.07),
        transparent 35%
      ),
      var(--bg);

    color: var(--text);

    font-family:
      "Vazirmatn",
      "Inter",
      sans-serif;

    transition:
      background-color 300ms ease,
      color 300ms ease;
  }

  main {
    flex: 1;
  }

  /* =========================================================
     GLASS
     ========================================================= */

  .glass {
    background: var(--glass);

    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);

    border: 1px solid var(--border);
  }

  /* =========================================================
     CARD
     ========================================================= */

  .product-card {
    background:
      linear-gradient(
        145deg,
        rgba(255,255,255,.045),
        rgba(255,255,255,.012)
      ),
      var(--surface);

    border: 1px solid var(--border);

    transition:
      transform 400ms cubic-bezier(.22,1,.36,1),
      border-color 300ms ease,
      box-shadow 400ms ease;
  }

  .product-card:hover {
    transform: translateY(-6px);

    border-color:
      var(--border-strong);

    box-shadow:
      var(--shadow);
  }

  .product-image {
    transition:
      transform 600ms cubic-bezier(.22,1,.36,1);
  }

  .product-card:hover
  .product-image {
    transform: scale(1.035);
  }

  /* =========================================================
     BUTTON
     ========================================================= */

  .btn-primary {
    background: var(--accent);
    color: var(--accent-contrast);

    transition:
      transform 200ms ease,
      opacity 200ms ease;
  }

  .btn-primary:hover {
    transform: translateY(-2px);
    opacity: .9;
  }

  .btn-primary:active {
    transform: scale(.97);
  }

  .btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);

    transition:
      transform 200ms ease,
      background 200ms ease;
  }

  .btn-secondary:hover {
    background: var(--surface-2);
    transform: translateY(-2px);
  }

  .btn-secondary:active {
    transform: scale(.97);
  }

  /* =========================================================
     THEME SWITCH
     ========================================================= */

  .theme-switch {
    width: 58px;
    height: 32px;

    border-radius: 999px;

    background: var(--surface-3);

    border: 1px solid var(--border);

    position: relative;

    cursor: pointer;

    transition:
      background 300ms ease;
  }

  .theme-thumb {
    width: 26px;
    height: 26px;

    position: absolute;

    top: 2px;
    right: 2px;

    border-radius: 50%;

    background: var(--accent);

    color: var(--accent-contrast);

    display: flex;
    align-items: center;
    justify-content: center;

    transition:
      transform 350ms cubic-bezier(.22,1,.36,1);
  }

  .light .theme-thumb {
    transform: translateX(-26px);
  }

  /* =========================================================
     DRAWER
     ========================================================= */

  #cartDrawer {
    transition:
      opacity 300ms ease,
      visibility 300ms ease;
  }

  #cartDrawer.hidden-drawer {
    opacity: 0;
    visibility: hidden;
  }

  #cartDrawer.visible-drawer {
    opacity: 1;
    visibility: visible;
  }

  #cartPanel {
    transition:
      transform 400ms cubic-bezier(.22,1,.36,1);
  }

  .hidden-drawer #cartPanel {
    transform: translateX(100%);
  }

  .visible-drawer #cartPanel {
    transform: translateX(0);
  }

  /* =========================================================
     SCROLLBAR & DESKTOP ORIENTATION
     ========================================================= */

  html {
    direction: ltr;
  }

  body {
    direction: rtl;
    text-align: right;
  }

  ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }

  ::-webkit-scrollbar-track {
    background: transparent;
  }

  ::-webkit-scrollbar-thumb {
    background: var(--surface-3);
    border-radius: 999px;
  }

  ::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
  }

  * {
    scrollbar-width: thin;
    scrollbar-color: var(--surface-3) transparent;
  }

  /* =========================================================
     PRODUCT PLACEHOLDERS
     ========================================================= */

  .product-visual {
    background:
      radial-gradient(
        circle at center,
        rgba(255,255,255,.08),
        transparent 55%
      ),
      var(--surface-2);
  }

  /* =========================================================
     ANIMATIONS
     ========================================================= */

  @keyframes fadeUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .animate-on-scroll { opacity: 0; transform: translateY(20px); }

  .fade-up {
    animation:
      fadeUp .7s ease both;
  }

  @keyframes fadeIn {
    from {
      opacity: 0;
    }

    to {
      opacity: 1;
    }
  }

  .fade-in {
    animation:
      fadeIn .5s ease both;
  }

  /* =========================================================
     TOAST (Top Positioned)
     ========================================================= */

  #toast {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translate(-50%, -24px);
    opacity: 0;
    pointer-events: none;
    z-index: 300;
    transition:
      transform 320ms cubic-bezier(.16, 1, .3, 1),
      opacity 250ms ease;
  }

  @media (min-width: 640px) {
    #toast {
      top: 5.5rem;
    }
  }

  #toast.show {
    transform: translate(-50%, 0) !important;
    opacity: 1;
    pointer-events: auto;
  }

  /* =========================================================
     FORM ELEMENTS & VALIDATION
     ========================================================= */

  .form-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 14px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    outline: none;
    transition:
      border-color 200ms ease,
      box-shadow 200ms ease;
  }

  .form-input:focus {
    border-color: var(--border-strong);
    box-shadow: 0 0 0 3px var(--surface-3);
  }

  .form-input::placeholder {
    color: var(--text-muted);
  }

  .form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
  }

  /* Validation: Error Message under fields */
  .field-error-msg {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.4;
    color: #f87171;
    animation: fieldErrorSlideIn 200ms cubic-bezier(.16, 1, .3, 1) both;
  }

  html:not(.dark) .field-error-msg {
    color: #dc2626;
  }

  @keyframes fieldErrorSlideIn {
    from {
      opacity: 0;
      transform: translateY(-4px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .field-error-icon {
    flex-shrink: 0;
    width: 13px;
    height: 13px;
  }

  /* Invalid Inputs & Textareas */
  .form-input.is-invalid,
  input.form-input.is-invalid,
  textarea.form-input.is-invalid {
    border-color: rgba(248, 113, 113, 0.65) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
  }

  .form-input.is-invalid:focus,
  input.form-input.is-invalid:focus,
  textarea.form-input.is-invalid:focus {
    border-color: rgba(248, 113, 113, 0.95) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.22) !important;
  }

  /* Invalid Custom Select */
  .custom-select-wrap.is-invalid .custom-select-trigger {
    border-color: rgba(248, 113, 113, 0.65) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
  }

  .custom-select-wrap.is-invalid.open .custom-select-trigger,
  .custom-select-wrap.is-invalid .custom-select-trigger:focus {
    border-color: rgba(248, 113, 113, 0.95) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.22) !important;
  }

  /* Invalid Native Select */
  select.form-input.is-invalid,
  select.custom-select.is-invalid {
    border-color: rgba(248, 113, 113, 0.65) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
  }

  /* Invalid Custom Checkbox */
  .custom-checkbox.is-invalid .cb-box {
    border-color: rgba(248, 113, 113, 0.8) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18) !important;
  }

  /* Invalid Custom Radio */
  .custom-radio.is-invalid .rb-box {
    border-color: rgba(248, 113, 113, 0.8) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18) !important;
  }

  /* =========================================================
     TABS
     ========================================================= */

  .tab-button {
    position: relative;
    padding: 10px 16px;
    font-size: 13px;
    color: var(--text-muted);
    border-radius: 12px;
    transition:
      color 200ms ease,
      background 200ms ease;
  }

  .tab-button:hover {
    color: var(--text);
    background: var(--surface-2);
  }

  .tab-button.active {
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    font-weight: 500;
  }

  /* =========================================================
     ANIMATION DELAYS
     ========================================================= */

  .delay-1 { animation-delay: .1s; }
  .delay-2 { animation-delay: .2s; }
  .delay-3 { animation-delay: .3s; }

  /* =========================================================
     PAGE SPECIFIC HELPERS
     ========================================================= */

  .page-section {
    padding-top: 140px;
    padding-bottom: 80px;
  }

  /* =========================================================
     CUSTOM CHECKBOX & RADIO
     ========================================================= */

  .custom-checkbox, .custom-radio {
    position: relative;
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    user-select: none;
  }

  .custom-checkbox input, .custom-radio input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
  }

  .cb-box {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border-radius: 6px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: all 200ms ease;
  }

  .custom-checkbox input:checked ~ .cb-box {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-contrast);
  }

  .custom-checkbox input:focus-visible ~ .cb-box {
    box-shadow: 0 0 0 3px var(--surface-3);
  }

  .rb-box {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 200ms ease;
  }

  .rb-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-contrast);
    opacity: 0;
    transform: scale(0.5);
    transition: all 200ms ease;
  }

  .custom-radio input:checked ~ .rb-box {
    background: var(--accent);
    border-color: var(--accent);
  }

  .custom-radio input:checked ~ .rb-box .rb-dot {
    opacity: 1;
    transform: scale(1);
  }

  .custom-radio input:focus-visible ~ .rb-box {
    box-shadow: 0 0 0 3px var(--surface-3);
  }

  /* =========================================================
     CUSTOM SELECT
     ========================================================= */

  .custom-select-wrap {
    position: relative;
    display: inline-block;
  }

  .custom-select-wrap:not([class*="w-"]) {
    width: 100%;
    display: block;
  }

  .custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 14px;
    font-size: 13px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    user-select: none;
    transition: border-color 200ms ease, box-shadow 200ms ease;
  }

  .custom-select-trigger.text-xs,
  .custom-select-wrap.compact .custom-select-trigger {
    padding: 7px 11px;
    font-size: 11.5px;
    border-radius: 10px;
  }

  .custom-select-trigger:focus,
  .custom-select-wrap.open .custom-select-trigger {
    border-color: var(--border-strong);
    box-shadow: 0 0 0 3px var(--surface-3);
    outline: none;
  }

  .custom-select-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 100%;
    width: max-content;
    max-width: 320px;
    z-index: 60;
    max-height: 240px;
    overflow-y: auto;
    background: var(--glass);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 5px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 180ms cubic-bezier(.22,1,.36,1);
  }

  .custom-select-wrap.open .custom-select-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .custom-select-option {
    padding: 8px 12px;
    border-radius: 9px;
    font-size: 12px;
    cursor: pointer;
    transition: background 150ms ease, color 150ms ease;
    white-space: nowrap;
  }

  .custom-select-option:hover,
  .custom-select-option.focused {
    background: var(--surface-2);
  }

  .custom-select-option.selected {
    background: var(--accent);
    color: var(--accent-contrast);
    font-weight: 500;
  }

  /* =========================================================
     FLOATING CONTACT BUTTONS (Call & WhatsApp Mobile UI/UX)
     ========================================================= */

  .floating-contact-btn {
    position: fixed;
    z-index: 95;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    cursor: pointer;
    text-decoration: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform 220ms cubic-bezier(.22,1,.36,1), box-shadow 220ms ease, opacity 200ms ease;
    /* Touch target on mobile: generous 56px size */
    width: 54px;
    height: 54px;
    min-width: 54px;
    min-height: 54px;
    bottom: 106px; /* Sits comfortably right above mobile bottom dock */
  }

  @media (min-width: 640px) {
    .floating-contact-btn {
      width: 56px;
      height: 56px;
      min-width: 56px;
      min-height: 56px;
    }
  }

  @media (min-width: 768px) {
    .floating-contact-btn {
      bottom: 32px; /* When mobile dock is hidden on desktop */
    }
  }

  /* WhatsApp Floating Button */
  #floatingWhatsappBtn {
    left: 16px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #ffffff;
    box-shadow: 0 10px 26px rgba(37, 211, 102, 0.42), 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
  }

  @media (min-width: 640px) {
    #floatingWhatsappBtn {
      left: 24px;
    }
  }

  #floatingWhatsappBtn:hover {
    transform: translateY(-3px) scale(1.06);
    box-shadow: 0 14px 34px rgba(37, 211, 102, 0.52), 0 4px 10px rgba(0, 0, 0, 0.2);
  }

  #floatingWhatsappBtn:active {
    transform: scale(0.94);
  }

  /* WhatsApp pulse ring effect */
  #floatingWhatsappBtn::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 9999px;
    border: 2px solid rgba(37, 211, 102, 0.4);
    animation: waPulse 2.4s cubic-bezier(0.24, 0, 0.38, 1) infinite;
    pointer-events: none;
  }

  @keyframes waPulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.18); opacity: 0; }
    100% { transform: scale(1.18); opacity: 0; }
  }

  /* Call Floating Button */
  #floatingCallBtn {
    right: 16px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22), 0 2px 6px rgba(0, 0, 0, 0.08);
  }

  @media (min-width: 640px) {
    #floatingCallBtn {
      right: 24px;
    }
  }

  /* Call Button in Dark Mode */
  .dark #floatingCallBtn {
    background: #171717;
    color: #f5f5f5;
    border: 1.5px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  }

  /* Call Button in Light Mode */
  html:not(.dark) #floatingCallBtn,
  .light #floatingCallBtn {
    background: #ffffff;
    color: #111111;
    border: 1.5px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
  }

  #floatingCallBtn:hover {
    transform: translateY(-3px) scale(1.06);
    border-color: var(--text);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  }

  #floatingCallBtn:active {
    transform: scale(0.94);
  }

  /* =========================================================
     MOBILE BOTTOM NAVIGATION DOCK (UI, Ergonomics & Contrast)
     ========================================================= */

  #mobileBottomNav {
    position: fixed;
    bottom: 14px;
    left: 14px;
    right: 14px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    z-index: 100;
    border-radius: 28px;
    padding: 6px 8px;
    transition: background-color 250ms ease, border-color 250ms ease, box-shadow 250ms ease, transform 300ms ease;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
  }

  /* Dark Mode Dock Background */
  .dark #mobileBottomNav,
  #mobileBottomNav.is-dark-bg {
    background: rgba(16, 16, 16, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.3);
  }

  /* Light Mode Dock Background */
  html:not(.dark) #mobileBottomNav,
  .light #mobileBottomNav,
  #mobileBottomNav.is-light-bg {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(0, 0, 0, 0.10);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
  }

  /* Mobile Nav Links */
  .mobile-nav-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    border-radius: 18px;
    text-decoration: none;
    transition: all 200ms cubic-bezier(.22,1,.36,1);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }

  /* ---------------------------------------------------------
     CONTRAST RULE 1: DARK BACKGROUND
     Non-active menus must be light grey, Active is bright white
     --------------------------------------------------------- */
  .dark #mobileBottomNav:not(.is-light-bg) .mobile-nav-item:not(.active),
  #mobileBottomNav.is-dark-bg .mobile-nav-item:not(.active) {
    color: rgba(255, 255, 255, 0.65);
  }
  .dark #mobileBottomNav:not(.is-light-bg) .mobile-nav-item:not(.active):hover,
  .dark #mobileBottomNav:not(.is-light-bg) .mobile-nav-item:not(.active):active,
  #mobileBottomNav.is-dark-bg .mobile-nav-item:not(.active):hover,
  #mobileBottomNav.is-dark-bg .mobile-nav-item:not(.active):active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
  }

  .dark #mobileBottomNav:not(.is-light-bg) .mobile-nav-item.active,
  #mobileBottomNav.is-dark-bg .mobile-nav-item.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    font-weight: 600;
  }
  .dark #mobileBottomNav:not(.is-light-bg) .mobile-nav-item.active .nav-dot,
  #mobileBottomNav.is-dark-bg .mobile-nav-item.active .nav-dot {
    background-color: #ffffff;
  }

  /* ---------------------------------------------------------
     CONTRAST RULE 2: LIGHT / WHITE BACKGROUND
     When navigation bar background is white (in light mode OR
     when white in dark mode), ALL NON-ACTIVE MENUS MUST BE DARK!
     --------------------------------------------------------- */
  html:not(.dark) #mobileBottomNav .mobile-nav-item:not(.active),
  .light #mobileBottomNav .mobile-nav-item:not(.active),
  #mobileBottomNav.is-light-bg .mobile-nav-item:not(.active),
  #mobileBottomNav[data-bg="white"] .mobile-nav-item:not(.active),
  #mobileBottomNav.bg-white .mobile-nav-item:not(.active),
  .dark #mobileBottomNav.is-light-bg .mobile-nav-item:not(.active),
  .dark #mobileBottomNav[style*="white"] .mobile-nav-item:not(.active),
  .dark #mobileBottomNav[style*="#fff"] .mobile-nav-item:not(.active),
  .dark #mobileBottomNav.bg-white .mobile-nav-item:not(.active) {
    color: #4b5563 !important; /* Solid dark text & icon on white */
    font-weight: 500;
  }

  html:not(.dark) #mobileBottomNav .mobile-nav-item:not(.active):hover,
  .light #mobileBottomNav .mobile-nav-item:not(.active):hover,
  html:not(.dark) #mobileBottomNav .mobile-nav-item:not(.active):active,
  .light #mobileBottomNav .mobile-nav-item:not(.active):active,
  #mobileBottomNav.is-light-bg .mobile-nav-item:not(.active):hover,
  #mobileBottomNav.is-light-bg .mobile-nav-item:not(.active):active,
  #mobileBottomNav[data-bg="white"] .mobile-nav-item:not(.active):hover,
  #mobileBottomNav.bg-white .mobile-nav-item:not(.active):hover,
  .dark #mobileBottomNav.is-light-bg .mobile-nav-item:not(.active):hover,
  .dark #mobileBottomNav.bg-white .mobile-nav-item:not(.active):hover {
    color: #000000 !important;
    background: rgba(0, 0, 0, 0.06) !important;
  }

  /* Active item on Light/White Background */
  html:not(.dark) #mobileBottomNav .mobile-nav-item.active,
  .light #mobileBottomNav .mobile-nav-item.active,
  #mobileBottomNav.is-light-bg .mobile-nav-item.active,
  #mobileBottomNav[data-bg="white"] .mobile-nav-item.active,
  #mobileBottomNav.bg-white .mobile-nav-item.active,
  .dark #mobileBottomNav.is-light-bg .mobile-nav-item.active,
  .dark #mobileBottomNav[style*="white"] .mobile-nav-item.active,
  .dark #mobileBottomNav[style*="#fff"] .mobile-nav-item.active,
  .dark #mobileBottomNav.bg-white .mobile-nav-item.active {
    color: #000000 !important;
    background: rgba(0, 0, 0, 0.08) !important;
    font-weight: 600;
  }

  html:not(.dark) #mobileBottomNav .mobile-nav-item.active .nav-dot,
  .light #mobileBottomNav .mobile-nav-item.active .nav-dot,
  #mobileBottomNav.is-light-bg .mobile-nav-item.active .nav-dot,
  #mobileBottomNav[data-bg="white"] .mobile-nav-item.active .nav-dot,
  #mobileBottomNav.bg-white .mobile-nav-item.active .nav-dot,
  .dark #mobileBottomNav.is-light-bg .mobile-nav-item.active .nav-dot,
  .dark #mobileBottomNav.bg-white .mobile-nav-item.active .nav-dot {
    background-color: #000000 !important;
  }

  /* Product Nav View Contrast */
  .dark #mobileBottomNav:not(.is-light-bg) #productNavView span#mobileProductPrice {
    color: #ffffff;
  }
  .dark #mobileBottomNav:not(.is-light-bg) #productNavView .product-price-label {
    color: rgba(255, 255, 255, 0.6);
  }
  .dark #mobileBottomNav:not(.is-light-bg) #toggleNavViewBtn {
    color: rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
  }
  .dark #mobileBottomNav:not(.is-light-bg) #toggleProductViewBtn {
    color: rgba(255, 255, 255, 0.65);
  }

  html:not(.dark) #mobileBottomNav #productNavView span#mobileProductPrice,
  .light #mobileBottomNav #productNavView span#mobileProductPrice,
  #mobileBottomNav.is-light-bg #productNavView span#mobileProductPrice,
  #mobileBottomNav.bg-white #productNavView span#mobileProductPrice,
  .dark #mobileBottomNav.is-light-bg #productNavView span#mobileProductPrice {
    color: #111111 !important;
  }
  html:not(.dark) #mobileBottomNav #productNavView .product-price-label,
  .light #mobileBottomNav #productNavView .product-price-label,
  #mobileBottomNav.is-light-bg #productNavView .product-price-label,
  #mobileBottomNav.bg-white #productNavView .product-price-label,
  .dark #mobileBottomNav.is-light-bg #productNavView .product-price-label {
    color: #6b7280 !important;
  }
  html:not(.dark) #mobileBottomNav #toggleNavViewBtn,
  .light #mobileBottomNav #toggleNavViewBtn,
  #mobileBottomNav.is-light-bg #toggleNavViewBtn,
  #mobileBottomNav.bg-white #toggleNavViewBtn,
  .dark #mobileBottomNav.is-light-bg #toggleNavViewBtn {
    color: #374151 !important;
    background: rgba(0, 0, 0, 0.06) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
  }
  html:not(.dark) #mobileBottomNav #toggleProductViewBtn,
  .light #mobileBottomNav #toggleProductViewBtn,
  #mobileBottomNav.is-light-bg #toggleProductViewBtn,
  #mobileBottomNav.bg-white #toggleProductViewBtn,
  .dark #mobileBottomNav.is-light-bg #toggleProductViewBtn {
    color: #4b5563 !important;
  }

  /* Main Section Stacking Context Fix */
  main.page-section {
    transform: none !important;
  }

  /* ─────────────────────────────────────────────────────────────
     HEADER SPACING & DYNAMIC ANNOUNCEMENT CLEARANCE
     ───────────────────────────────────────────────────────────── */
  :root {
    --header-height: 5rem;   /* ~80px default header */
    --header-offset: 7rem;   /* ~112px default top offset */
  }

  /* Base page-section spacing */
  .page-section {
    padding-top: var(--header-offset, 7rem) !important;
  }

  /* When announcement bar is active (server or client-side) */
  body.has-announcement,
  html.has-announcement {
    --header-height: 8rem;     /* ~128px */
    --header-offset: 10.75rem; /* ~172px: generous clearance below announcement */
  }

  @media (max-width: 640px) {
    body.has-announcement,
    html.has-announcement {
      --header-height: 9rem;     /* ~144px on mobile when text wraps */
      --header-offset: 11.75rem; /* ~188px */
    }
  }

  body.has-announcement .page-section,
  html.has-announcement .page-section {
    padding-top: var(--header-offset, 10.75rem) !important;
  }

  body.has-announcement #heroSection,
  html.has-announcement #heroSection {
    padding-top: calc(var(--header-height, 8rem) + 3.5rem) !important;
  }

  /* ─────────────────────────────────────────────────────────────
     Z-INDEX CONTROLS: HEADER VS. FILTER (DESKTOP & MOBILE)
     ───────────────────────────────────────────────────────────── */

  /* Desktop: Header & Announcement bar strictly higher than filter */
  @media (min-width: 768px) {
    header.fixed,
    #siteHeader {
      z-index: 100 !important;
    }

    #shopSidebar {
      z-index: 20 !important;
      position: static !important;
    }

    #shopSidebar .sticky,
    .sticky-filter {
      z-index: 20 !important;
      top: calc(var(--header-height, 5rem) + 1.5rem) !important;
    }
  }

  /* No Scrollbar Utility */
  .no-scrollbar::-webkit-scrollbar {
    display: none;
  }
  .no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  /* Mobile Controls (max-width: 767px) */
  @media (max-width: 767px) {
    #headerCartBtn {
      display: none !important;
    }

    /* Mobile: Header & Announcement below filter drawer */
    header.fixed,
    #siteHeader {
      z-index: 50 !important;
    }

    /* Mobile Filter Drawer: strictly higher than header & announcement */
    #shopSidebar {
      position: fixed !important;
      inset: 0 !important;
      width: 100vw !important;
      height: 100vh !important;
      height: 100dvh !important;
      max-width: 100vw !important;
      z-index: 200 !important; /* Higher than header and announcement bar */
      background: var(--bg) !important;
    }

    #shopSidebar.flex,
    #shopSidebar.is-open {
      display: flex !important;
      visibility: visible !important;
      pointer-events: auto !important;
      flex-direction: column !important;
      padding: 18px 20px 24px !important;
      animation: filterDrawerSlide 260ms cubic-bezier(.22, 1, .36, 1) both;
      overflow-y: auto !important;
      -webkit-overflow-scrolling: touch;
    }

    #shopSidebar.hidden {
      display: none !important;
      visibility: hidden !important;
      pointer-events: none !important;
    }

    /* When mobile filter is open, ensure header stays underneath and body doesn't scroll */
    body.mobile-filter-open {
      overflow: hidden !important;
    }

    body.mobile-filter-open header.fixed,
    body.mobile-filter-open #siteHeader,
    body.mobile-filter-open #siteAnnouncementBar {
      z-index: 40 !important;
    }

    /* Hide background bottom dock and floating buttons when filter is open */
    body.mobile-filter-open #mobileBottomNav,
    body.mobile-filter-open #floatingCallBtn,
    body.mobile-filter-open #floatingWhatsappBtn,
    body.mobile-filter-open .floating-contact-btn {
      display: none !important;
      opacity: 0 !important;
      pointer-events: none !important;
    }

    @keyframes filterDrawerSlide {
      from {
        opacity: 0;
        transform: translateY(20px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
  }