/* ==========================================================================
   Vivache Premium — theme.css
   SINGLE SOURCE OF TRUTH for all design tokens.
   Change a value here → the whole premium layer reskins.
   Loaded first in premium_en.css / premium_ar.css (before base + components).
   Primary brand color: #263b3c, anchored by black + white.
   This file defines variables only — it changes nothing visually on its own.
   ========================================================================== */

:root {
  /* ---- Brand: primary ramp (anchor = --color-primary) ---- */
  --color-primary:      #263b3c;   /* brand anchor */
  --color-primary-50:   #f0f5f4;
  --color-primary-100:  #dde7e5;
  --color-primary-200:  #b5c5c3;
  --color-primary-300:  #87a09d;
  --color-primary-400:  #5c7c79;
  --color-primary-500:  #41615f;
  --color-primary-600:  #324d4d;
  --color-primary-700:  #263b3c;   /* = anchor */
  --color-primary-800:  #1c2e2e;
  --color-primary-900:  #14201f;   /* deepest, for hover/active */

  /* ---- Neutrals: black / white / grays ---- */
  --color-black:    #000000;
  --color-white:    #ffffff;
  --color-ink:      #141414;       /* body text (soft black for readability) */
  --color-heading:  #000000;       /* headings = true black */
  --gray-50:  #fafafa;
  --gray-100: #f4f4f4;
  --gray-200: #e8e8e8;
  --gray-300: #d6d6d6;
  --gray-400: #a3a3a3;
  --gray-500: #737373;
  --gray-600: #525252;
  --gray-700: #3f3f3f;
  --gray-800: #262626;
  --gray-900: #171717;

  /* ---- Semantic (point components at these, not raw values) ---- */
  --color-bg:          var(--color-white);
  --color-surface:     var(--color-white);
  --color-surface-alt: #f6f6f4;     /* warm off-white section bg */
  --color-text:        var(--color-ink);
  --color-text-muted:  var(--gray-500);
  --color-border:      var(--gray-200);
  --color-accent:      var(--color-primary);
  --color-on-accent:   var(--color-white);
  --color-price:       var(--color-ink);

  /* ---- Functional only (used sparingly, not part of brand palette) ---- */
  --color-sale:    #b3261e;         /* discount / error */
  --color-success: #1f7a4d;

  /* ---- Type scale ---- */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;  /* LTR (confirm brand font) */
  --font-ar:   'Almarai', sans-serif;                          /* RTL (matches current) */
  --fs-xs: .75rem;
  --fs-sm: .875rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.25rem;
  --fs-2xl: 1.5rem;
  --fs-3xl: 2rem;
  --fs-4xl: 2.75rem;
  --lh-tight: 1.15;
  --lh-normal: 1.5;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* ---- Spacing scale (4px base) ---- */
  --sp-1: .25rem;
  --sp-2: .5rem;
  --sp-3: .75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;

  /* ---- Radius / shadow / motion ---- */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 6px 18px rgba(0,0,0,.08);
  --shadow-lg: 0 16px 40px rgba(0,0,0,.12);
  --ease: cubic-bezier(.2,.6,.2,1);
  --dur-fast: 140ms;
  --dur: 240ms;
  --dur-slow: 420ms;

  /* ---- Layout (full-width / edge-to-edge philosophy) ---- */
  --content-max: 1320px;            /* max width for text-heavy/centered content only */
  --gutter: clamp(1rem, 4vw, 4rem); /* fluid side padding; sections go full-bleed */
  --product-ratio: 9 / 16;          /* client product images */
}

/* ==========================================================================
   Vivache Premium — base.css
   Premium resets / scoped utilities built on the tokens in theme.css.
   Intentionally EMPTY in patch1 so the setup patch makes zero visual change.
   Global resets (e.g. iOS 16px-input rule, prefers-reduced-motion, full-bleed
   helpers) will be added in a deliberate "global" step, reviewed before shipping.
   Component styles live in components/<name>_en.css and <name>_ar.css.
   ========================================================================== */

/* --- header_en.css --- */
/* ==========================================================================
   VIVACHE — World-class header (vh-*). Self-owned. No theme dependency.
   Uses design tokens from theme.css. Direction-neutral (logical properties).
   ========================================================================== */

/* ---------------- Announcement / marquee (seamless) ---------------- */
body .tf-marquee { background: var(--color-primary) !important; border: 0 !important; padding-block: var(--sp-2) !important; overflow: hidden; }
body .tf-marquee .marquee-wrapper { width: max-content; animation: vhMarquee 38s linear infinite !important; }
body .tf-marquee .marquee-wrapper:hover { animation-play-state: paused !important; }
body .tf-marquee .initial-child-container { display: flex; flex-wrap: nowrap; align-items: center; }
body .tf-marquee .marquee-child-item { display: inline-flex; align-items: center; padding-inline: var(--sp-4); }
body .tf-marquee .text-btn-uppercase { margin: 0; color: var(--color-on-accent); font-size: clamp(.6rem, 2.2vw, .76rem); letter-spacing: .14em; line-height: 1; white-space: nowrap; text-transform: uppercase; }
body .tf-marquee .icon { color: var(--color-on-accent); opacity: .8; font-size: .78rem; }
@keyframes vhMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* =========================================================================
   HEADER SHELL — sticky (we own the element; the theme's script can't touch it)
   ========================================================================= */
.vh-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--color-white);
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.vh-header.is-stuck { box-shadow: 0 1px 0 var(--color-border), var(--shadow-sm); border-bottom-color: var(--color-border); }

.vh-bar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: var(--sp-3);
  max-width: var(--content-max); margin-inline: auto;
  padding: var(--sp-4) var(--gutter);
  transition: padding var(--dur) var(--ease);
}
.vh-header.is-stuck .vh-bar { padding-block: var(--sp-2); }

/* ---------------- clusters ---------------- */
.vh-cluster { display: inline-flex; align-items: center; gap: var(--sp-2); }
.vh-cluster--start { justify-self: start; }
.vh-cluster--end { justify-self: end; gap: var(--sp-1); }

/* ---------------- logo ---------------- */
.vh-logo { justify-self: center; display: inline-flex; align-items: center; line-height: 0; }
.vh-logo img { height: clamp(34px, 8vw, 46px); width: auto; transition: height var(--dur) var(--ease); }
.vh-header.is-stuck .vh-logo img { height: clamp(30px, 6vw, 38px); }

/* ---------------- icon buttons ---------------- */
.vh-icon {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer;
  color: var(--color-ink); text-decoration: none;
}
.vh-icon .icon { font-size: 1.3rem; line-height: 1; transition: color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease); }
.vh-icon:hover .icon { color: var(--color-primary); }
.vh-icon:active .icon { transform: scale(.9); }
.vh-cart__count {
  position: absolute; top: 4px; inset-inline-end: 2px; min-width: 18px; height: 18px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--color-primary); color: var(--color-on-accent);
  font-size: 10px; font-weight: var(--fw-semibold); line-height: 1; border-radius: var(--radius-pill);
}

/* visibility helpers */
.vh-only-desktop { display: none !important; }
.vh-only-mobile  { display: inline-flex !important; }

/* =========================================================================
   CUSTOM SELECT (currency / language) — fully owned, no bootstrap-select
   ========================================================================= */
.vh-select { position: relative; }
.vh-select__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  height: 40px; padding: 0 14px 0 12px; cursor: pointer;
  border: 1px solid var(--color-border); border-radius: var(--radius-pill);
  background: var(--color-white); color: var(--color-ink);
  font-size: 13px; font-weight: var(--fw-medium); line-height: 1; white-space: nowrap;
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.vh-select__btn:hover { border-color: var(--color-ink-soft); }
.vh-select.is-open .vh-select__btn { border-color: var(--color-primary); }
.vh-select__flag { width: 22px; height: 16px; border-radius: 2px; object-fit: cover; flex: 0 0 auto; }
.vh-select__label { display: inline-block; }
.vh-select__chev { width: 7px; height: 7px; border-inline-end: 1.5px solid var(--color-ink-soft); border-block-end: 1.5px solid var(--color-ink-soft); transform: translateY(-2px) rotate(45deg); transition: transform var(--dur-fast) var(--ease); flex: 0 0 auto; }
.vh-select.is-open .vh-select__chev { transform: translateY(1px) rotate(-135deg); }

.vh-select__panel {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 50;
  min-width: 220px; max-height: 60vh; overflow-y: auto; margin: 0; padding: var(--sp-1); list-style: none;
  background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-6px); pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), visibility var(--dur-fast) var(--ease);
}
.vh-select.is-open .vh-select__panel { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
.vh-select__opt {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-md);
  font-size: 14px; color: var(--color-ink); cursor: pointer; white-space: nowrap;
  transition: background var(--dur-fast) var(--ease);
}
.vh-select__opt img { width: 22px; height: 16px; border-radius: 2px; object-fit: cover; flex: 0 0 auto; }
.vh-select__opt:hover { background: var(--gray-50); }
.vh-select__opt.is-selected { background: var(--color-primary-50); color: var(--color-primary); font-weight: var(--fw-semibold); }
.vh-native { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* =========================================================================
   ACCOUNT — desktop popover
   ========================================================================= */
.vh-account { position: relative; }
.vh-pop {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 50; width: 240px;
  display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-4);
  background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-6px); pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), visibility var(--dur-fast) var(--ease);
}
.vh-account.is-open .vh-pop { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
.vh-pop__link { padding: 8px 4px; font-size: 14px; color: var(--color-ink-soft); text-decoration: none; text-align: center; border-radius: var(--radius-md); transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.vh-pop__link:hover { background: var(--gray-50); color: var(--color-ink); }
.vh-pop__note { margin: 4px 0 0; font-size: 13px; color: var(--color-ink-soft); text-align: center; }
.vh-pop__note a { color: var(--color-primary); font-weight: var(--fw-semibold); text-decoration: none; }

/* buttons */
.vh-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 var(--sp-5); border-radius: var(--radius-md); font-size: 14px; font-weight: var(--fw-semibold); letter-spacing: .04em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease); border: 1.5px solid transparent; }
.vh-btn--primary { background: var(--color-primary); color: var(--color-on-accent); border-color: var(--color-primary); }
.vh-btn--primary:hover { background: var(--color-primary-900); border-color: var(--color-primary-900); color: var(--color-on-accent); }
.vh-btn--ghost { background: var(--color-white); color: var(--color-ink); border-color: var(--color-ink); }
.vh-btn--ghost:hover { background: var(--gray-100); }

/* =========================================================================
   DESKTOP nav (categories) — logo left · categories spread · empty center · utilities right
   ========================================================================= */
.vh-nav { display: none; }

@media (min-width: 1200px) {
  .vh-only-desktop { display: inline-flex !important; }
  .vh-only-mobile  { display: none !important; }

  .vh-bar { display: flex; align-items: center; gap: var(--sp-5); }
  .vh-logo { justify-self: auto; order: 1; margin-inline-end: var(--sp-6); }
  .vh-cluster--start { display: none; }
  .vh-nav { display: block; order: 2; flex: 0 1 auto; max-width: 55%; }
  .vh-cluster--end { order: 3; margin-inline-start: auto; gap: var(--sp-2); }

  .vh-nav .menu-list { display: flex; align-items: center; gap: clamp(var(--sp-4), 2.4vw, var(--sp-8)); margin: 0; padding: 0; list-style: none; }
  .vh-nav .menu-item { position: static; }
  .vh-nav .menu-item > .item-link {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 0;
    font-size: 13px; font-weight: var(--fw-medium); letter-spacing: .1em; text-transform: uppercase;
    color: var(--color-ink); text-decoration: none; white-space: nowrap; position: relative;
  }
  .vh-nav .menu-item > .item-link .icon { font-size: .7rem; transition: transform var(--dur-fast) var(--ease); }
  .vh-nav .menu-item > .item-link::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1.5px; background: var(--color-primary); transform: scaleX(0); transform-origin: inline-start; transition: transform var(--dur) var(--ease); }
  .vh-nav .menu-item:hover > .item-link { color: var(--color-primary); }
  .vh-nav .menu-item:hover > .item-link::after { transform: scaleX(1); }
  .vh-nav .menu-item:hover > .item-link .icon { transform: rotate(180deg); }

  /* MEGA MENU — full-width panel anchored to the header (own reveal, theme-independent) */
  .vh-nav .menu-item > .sub-menu.mega-menu {
    position: absolute; inset-inline: 0; top: 100%; z-index: 60;
    background: var(--color-white); border-top: 1px solid var(--color-border); box-shadow: var(--shadow-lg);
    padding: var(--sp-6) 0; margin: 0;
    opacity: 0; visibility: hidden; transform: translateY(8px); pointer-events: none;
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur) var(--ease);
  }
  .vh-nav .menu-item:hover > .sub-menu.mega-menu { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
  .vh-nav .sub-menu.mega-menu > .container { max-width: var(--content-max); margin-inline: auto; padding-inline: var(--gutter); }
  .vh-nav .menu-heading { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--color-ink-soft); margin-bottom: var(--sp-2); }
  .vh-nav .menu-link-text { color: var(--color-ink); text-decoration: none; font-size: 14px; transition: color var(--dur-fast) var(--ease); }
  .vh-nav .menu-link-text:hover { color: var(--color-primary); }
  .vh-nav .mega-menu .menu-list { display: block; }
  .vh-nav .mega-menu .menu-list li { margin-bottom: 6px; }

  /* hide mobile drawer entirely on desktop */
  .vh-drawer { display: none !important; }
}

/* =========================================================================
   MOBILE account drawer (compact card)
   ========================================================================= */
.vh-drawer {
  position: fixed; top: var(--vh-header-bottom, 56px); inset-inline: 0; z-index: 999;
  display: flex; flex-direction: column; gap: var(--sp-3);
  background: var(--color-white); box-shadow: var(--shadow-lg);
  border-end-start-radius: var(--radius-lg); border-end-end-radius: var(--radius-lg);
  padding: var(--sp-3) var(--gutter) var(--sp-4);
  opacity: 0; visibility: hidden; transform: translateY(-10px); pointer-events: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur) var(--ease);
}
.vh-drawer.is-open { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
.vh-drawer__head { display: flex; align-items: center; justify-content: space-between; }
.vh-drawer__title { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--color-ink-soft); }
.vh-drawer__close { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; padding: 0; line-height: 1; font-size: 20px; color: var(--color-ink); background: var(--color-white); border: 1px solid var(--color-border); border-radius: 50%; cursor: pointer; transition: background var(--dur-fast) var(--ease); }
.vh-drawer__close:hover { background: var(--gray-100); }
.vh-drawer__selects { display: flex; gap: var(--sp-3); }
.vh-drawer__selects .vh-select { flex: 1 1 0; min-width: 0; }
.vh-drawer__selects .vh-select__btn { width: 100%; height: 52px; border-radius: var(--radius-md); font-size: 14px; }
.vh-drawer__selects .vh-select__panel { inset-inline: 0; min-width: 0; }
.vh-drawer__link { min-height: 48px; display: flex; align-items: center; padding: 0 var(--sp-3); font-size: 15px; color: var(--color-ink); text-decoration: none; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.vh-drawer__btn { width: 100%; }

/* backdrop + scroll lock */
.vh-overlay { position: fixed; inset: 0; z-index: 998; background: rgba(20,20,20,.45); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity var(--dur) var(--ease), visibility var(--dur) var(--ease); }
.vh-overlay.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
html.vh-lock, body.vh-lock { overflow: hidden !important; overscroll-behavior: contain; }

@media (prefers-reduced-motion: reduce) {
  .vh-header, .vh-bar, .vh-logo img, .vh-select__panel, .vh-pop, .vh-drawer, .vh-overlay,
  .vh-nav .sub-menu.mega-menu, body .tf-marquee .marquee-wrapper { transition: none !important; animation: none !important; }
}

/* =========================================================================
   v2 REFINEMENTS — desktop mega-menu hierarchy + motion, bigger words
   ========================================================================= */
@media (min-width: 1200px) {
  .vh-nav .menu-item > .item-link { font-size: 14px; letter-spacing: .15em; }
  .vh-nav .menu-item > .sub-menu.mega-menu { padding: var(--sp-8) 0 var(--sp-10); }

  /* clear typographic hierarchy between levels */
  .vh-nav .mega-menu-categories-side .mega-menu-item > .menu-heading:first-child .menu-link-text {
    font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--color-primary); font-weight: var(--fw-semibold);
  }
  .vh-nav .mega-menu-second-col .menu-heading .menu-link-text {
    font-size: 16px; font-weight: var(--fw-bold) !important; color: var(--color-ink); letter-spacing: .04em; text-transform: uppercase;
  }
  .vh-nav .mega-menu .menu-list { display: block; margin-top: var(--sp-3); }
  .vh-nav .mega-menu .menu-list li { margin-bottom: 11px; }
  .vh-nav .mega-menu .menu-list .menu-link-text { font-size: 14.5px; color: var(--color-ink-soft); font-weight: var(--fw-regular); }
  .vh-nav .mega-menu .menu-list .menu-link-text:hover { color: var(--color-primary); }

  /* recent products side */
  .vh-nav .mega-menu .wrapper-sub-shop > .menu-heading { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--color-ink-soft); margin-bottom: var(--sp-4); }
  .vh-nav .mega-menu .card-product .title { font-size: 14px; color: var(--color-ink); font-weight: var(--fw-medium); }
  .vh-nav .mega-menu .card-product .price { font-size: 14px; color: var(--color-ink); font-weight: var(--fw-semibold); }

  /* staged reveal: panel fades, content rises just after */
  .vh-nav .menu-item > .sub-menu.mega-menu .row { opacity: 0; transform: translateY(12px); transition: opacity var(--dur-slow) var(--ease) 70ms, transform var(--dur-slow) var(--ease) 70ms; }
  .vh-nav .menu-item:hover > .sub-menu.mega-menu .row { opacity: 1; transform: none; }
}

/* =========================================================================
   MOBILE SIDE MENU (vh-mobmenu) — text-first, bigger words, smooth
   ========================================================================= */
#mobileMenu.canvas-mb.vh-mobmenu {
  width: 100vw !important; max-width: 100vw !important; inset-inline-start: 0 !important; inset-inline-end: auto !important;
  /*top: var(--vh-header-bottom, 88px) !important; height: calc(100vh - var(--vh-header-bottom, 88px)) !important;*/
  background: var(--color-white) !important; border: 0 !important; box-shadow: none !important;
  transform: translateX(-100%); transition: transform var(--dur) var(--ease) !important; visibility: hidden;
}
[dir="rtl"] #mobileMenu.canvas-mb.vh-mobmenu { transform: translateX(100%); }
#mobileMenu.canvas-mb.vh-mobmenu.show { transform: translateX(0) !important; visibility: visible; }
.offcanvas-backdrop, .offcanvas-backdrop.show { opacity: 0 !important; background: transparent !important; }

.vh-mobmenu__head { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-4) var(--gutter); border-bottom: 1px solid var(--color-border); }
.vh-mobmenu__brand { font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--color-ink-soft); }
.vh-mobmenu__close { position: relative; width: 40px; height: 40px; flex: 0 0 40px; padding: 0; border: 1px solid var(--color-border); border-radius: 50%; background: var(--color-white); cursor: pointer; transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease); }
.vh-mobmenu__close span { position: absolute; top: 50%; left: 50%; width: 15px; height: 1.5px; background: var(--color-ink); transition: transform var(--dur) var(--ease); }
.vh-mobmenu__close span:nth-child(1) { transform: translate(-50%, -50%) rotate(45deg); }
.vh-mobmenu__close span:nth-child(2) { transform: translate(-50%, -50%) rotate(-45deg); }
.vh-mobmenu__close:hover { background: var(--gray-100); }
.vh-mobmenu__close:hover span:nth-child(1) { transform: translate(-50%, -50%) rotate(135deg); }
.vh-mobmenu__close:hover span:nth-child(2) { transform: translate(-50%, -50%) rotate(45deg); }
.vh-mobmenu__close:active { transform: scale(.92); }

.vh-mobmenu__body { height: calc(100% - 73px); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: var(--sp-5) var(--gutter) var(--sp-10); }

.vh-mobtabs { display: flex; gap: var(--sp-2); margin-bottom: var(--sp-6); }
.vh-mobtab { flex: 1 1 0; min-width: 0; height: 48px; padding: 0 var(--sp-3); display: flex; align-items: center; justify-content: center; border: 1px solid var(--color-border); border-radius: var(--radius-pill); background: var(--color-white); color: var(--color-ink-soft); font-size: 14px; font-weight: var(--fw-semibold); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.vh-mobtab.is-active { background: var(--color-primary); color: var(--color-on-accent); border-color: var(--color-primary); }

.vh-mobpanel { display: none; }
.vh-mobpanel.is-active { display: block; animation: vhMobFade var(--dur) var(--ease); }
@keyframes vhMobFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.vh-moblink--all { display: inline-flex; margin-bottom: var(--sp-3); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--color-primary); font-weight: var(--fw-semibold); text-decoration: none; }

.vh-mobcat { border-bottom: 1px solid var(--color-border); }
.vh-mobcat__head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-4) 0; background: transparent; border: 0; cursor: pointer; font-size: 20px; font-weight: var(--fw-medium); color: var(--color-ink); text-align: start; }
.vh-mobcat__chev { width: 9px; height: 9px; flex: 0 0 auto; border-inline-end: 2px solid var(--color-ink-soft); border-block-end: 2px solid var(--color-ink-soft); transform: rotate(45deg); transition: transform var(--dur) var(--ease); }
.vh-mobcat.is-open .vh-mobcat__chev { transform: rotate(-135deg); }
.vh-mobcat__body { max-height: 0; overflow: hidden; transition: max-height var(--dur-slow) var(--ease); }
.vh-mobcat.is-open .vh-mobcat__body { max-height: 70vh; }
.vh-mobsub { display: block; padding: 11px 0 11px var(--sp-3); font-size: 16px; color: var(--color-ink-soft); text-decoration: none; }
.vh-mobsub:hover { color: var(--color-primary); }
.vh-mobsub--all { color: var(--color-primary); font-weight: var(--fw-semibold); }
.vh-mobcat__body > .vh-mobsub:last-child { padding-bottom: var(--sp-4); }
.vh-mobcat--link { display: block; padding: var(--sp-4) 0; font-size: 20px; font-weight: var(--fw-medium); color: var(--color-ink); text-decoration: none; border-bottom: 1px solid var(--color-border); }

@media (prefers-reduced-motion: reduce) {
  #mobileMenu.canvas-mb.vh-mobmenu, .vh-mobcat__body, .vh-mobpanel, .vh-mobmenu__close span,
  .vh-nav .menu-item > .sub-menu.mega-menu .row { transition: none !important; animation: none !important; }
}

/* =========================================================================
   v3 FINAL — hover-intent reveal, premium mega-menu, icon-led mobile menu
   ========================================================================= */
@media (min-width: 1200px) {
  /* JS-driven reveal (hover-intent) — survives the link→panel gap */
  .vh-nav .menu-item.vh-mega-open > .sub-menu.mega-menu { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
  .vh-nav .menu-item.vh-mega-open > .sub-menu.mega-menu .row { opacity: 1; transform: none; }
  .vh-nav .menu-item.vh-mega-open > .item-link { color: var(--color-primary); }
  .vh-nav .menu-item.vh-mega-open > .item-link::after { transform: scaleX(1); }
  .vh-nav .menu-item.vh-mega-open > .item-link .icon { transform: rotate(180deg); }
  /* invisible bridge so the diagonal move is never over dead space */
  .vh-nav .menu-item > .sub-menu.mega-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -18px; height: 18px; }

  /* premium spacing + a refined divider between categories and products */
  .vh-nav .sub-menu.mega-menu { padding: var(--sp-10) 0; }
  .vh-nav .mega-menu-products-side { border-inline-start: 1px solid var(--color-border); padding-inline-start: clamp(var(--sp-6), 3vw, var(--sp-12)); }
  .vh-nav .mega-menu-categories-side { padding-inline-end: var(--sp-4); }
  .vh-nav .mega-menu .menu-list li { margin-bottom: 13px; }
  .vh-nav .mega-menu .menu-list .menu-link-text { display: inline-block; transition: color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease); }
  .vh-nav .mega-menu .menu-list .menu-link-text:hover { color: var(--color-primary); transform: translateX(3px); }
  [dir="rtl"] .vh-nav .mega-menu .menu-list .menu-link-text:hover { transform: translateX(-3px); }
  .vh-nav .mega-menu-second-col .menu-heading { margin-bottom: var(--sp-3); }
}

/* ---------------- mobile side menu — premium, icon-led ---------------- */
.vh-mobmenu__body { padding: var(--sp-5) var(--gutter) var(--sp-12); }

/* flain-style tabs: filled, rounded, generous touch */
.vh-mobtabs { gap: var(--sp-3); margin-bottom: var(--sp-6); }
.vh-mobtab { height: 54px; border-radius: var(--radius-pill); border-color: transparent; background: var(--gray-50); color: var(--color-ink); letter-spacing: .1em; }
.vh-mobtab.is-active { background: var(--color-primary); color: var(--color-on-accent); border-color: var(--color-primary); box-shadow: var(--shadow-sm); }

.vh-moblink--all { margin-bottom: var(--sp-4); }

/* category as icon banner (no name) — natural height, no forced crop */
.vh-mobcat { border-bottom: 0; margin-bottom: var(--sp-4); }
.vh-mobcat__head { width: 100%; display: block; position: relative; padding: 0; background: transparent; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.vh-mobcat__icon { width: 100%; height: auto; display: block; border-radius: var(--radius-lg); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.vh-mobcat__head:active .vh-mobcat__icon,
.vh-mobcat--icon:active .vh-mobcat__icon { transform: scale(.985); }
.vh-mobcat__name { display: block; padding: var(--sp-4) 0; font-size: 22px; font-weight: var(--fw-medium); color: var(--color-ink); }

/* chevron: overlaid on the icon banner; centered for the text fallback */
.vh-mobcat__chev { position: absolute; width: 10px; height: 10px; flex: 0 0 auto; border-inline-end: 2px solid var(--color-ink); border-block-end: 2px solid var(--color-ink); transition: transform var(--dur) var(--ease); top: 50%; inset-inline-end: 2px; transform: translateY(-50%) rotate(45deg); }
.vh-mobcat__head--icon .vh-mobcat__chev { top: auto; bottom: 14px; inset-inline-end: 14px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); box-shadow: var(--shadow-sm); transform: none; }
.vh-mobcat__head--icon .vh-mobcat__chev::after { content: ""; position: absolute; top: 50%; left: 50%; width: 9px; height: 9px; border-inline-end: 2px solid var(--color-ink); border-block-end: 2px solid var(--color-ink); transform: translate(-50%, -65%) rotate(45deg); transition: transform var(--dur) var(--ease); }
.vh-mobcat.is-open .vh-mobcat__chev { transform: translateY(-50%) rotate(-135deg); }
.vh-mobcat.is-open .vh-mobcat__head--icon .vh-mobcat__chev { transform: none; }
.vh-mobcat.is-open .vh-mobcat__head--icon .vh-mobcat__chev::after { transform: translate(-50%, -35%) rotate(-135deg); }

/* measured accordion (JS sets max-height in px → no cut-off) */
.vh-mobcat__body { max-height: 0; overflow: hidden; transition: max-height var(--dur-slow) var(--ease); padding-inline: var(--sp-1); }
.vh-mobsub { padding: 12px 0 12px var(--sp-2); font-size: 16px; }
.vh-mobcat__body > .vh-mobsub:first-child { padding-top: var(--sp-3); }
.vh-mobcat__body > .vh-mobsub:last-child { padding-bottom: var(--sp-5); }

/* direct-link category (no children) */
.vh-mobcat--link.vh-mobcat--icon { display: block; padding: 0; margin-bottom: var(--sp-4); border-bottom: 0; }

/* =========================================================================
   v4 — sticky mobile tabs, no MENU text, web parent-category banners
   ========================================================================= */
.vh-mobmenu__head { justify-content: flex-end; }

/* tabs pin to the top of the menu while content scrolls (full-bleed bar) */
.vh-mobmenu__body { padding-top: 0; }
.vh-mobmenu__body > .vh-mobpanel:first-child { padding-top: var(--sp-5); } /* when there is only one main category (no tabs) */
.vh-mobtabs {
  position: sticky; top: 0; z-index: 5;
  background: var(--color-white);
  margin-inline: calc(var(--gutter) * -1);
  padding: var(--sp-4) var(--gutter);
  margin-bottom: var(--sp-5);
  border-bottom: 1px solid var(--color-border);
}

/* ---------------- web mega-menu: parent-category banner + name ---------------- */
@media (min-width: 1200px) {
  .vh-nav .mega-menu .mega-menu-second-col { max-width: 340px; }
  .vh-nav .mega-menu .mega-cat-thumb { display: block; overflow: hidden; border-radius: var(--radius-lg); margin-bottom: var(--sp-3); background: var(--gray-50); }
  .vh-nav .mega-menu .mega-cat-thumb img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; transition: transform var(--dur-slow) var(--ease); }
  .vh-nav .mega-menu .mega-cat-thumb:hover img { transform: scale(1.05); }
  .vh-nav .mega-menu .mega-menu-second-col .menu-heading { margin-top: 0 !important; margin-bottom: var(--sp-3); }
  .vh-nav .mega-menu .mega-menu-second-col .menu-heading .menu-link-text { font-size: 16px; letter-spacing: .06em; }
}

@media (prefers-reduced-motion: reduce) {
  .vh-nav .mega-menu .mega-cat-thumb img { transition: none !important; }
}

/* =========================================================================
   v5 — WEB mega-menu premium pass (rounded corners + clear divider + balance)
   (mobile menu untouched — no mobile selectors here)
   ========================================================================= */
@media (min-width: 1200px) {
  .vh-nav .sub-menu.mega-menu { padding: clamp(var(--sp-8), 3vw, var(--sp-12)) 0; }

  /* parent-category banner: rounded, refined proportion, subtle depth */
  .vh-nav .mega-menu .mega-cat-thumb { display: block; overflow: hidden; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); margin-bottom: var(--sp-4); }
  .vh-nav .mega-menu .mega-cat-thumb img { width: 100%; aspect-ratio: 0; object-fit: cover; display: block; transition: transform var(--dur-slow) var(--ease); }
  .vh-nav .mega-menu .mega-cat-thumb:hover img { transform: scale(1.04); }
  .vh-nav .mega-menu .mega-menu-second-col { max-width: 300px; }
  .vh-nav .mega-menu .mega-menu-second-level-row { gap: clamp(var(--sp-5), 2.2vw, var(--sp-8)) !important; align-items: flex-start; }

  /* recent-product cards: rounded image corners to match the banners */
  .vh-nav .mega-menu .card-product .product-img { border-radius: var(--radius-lg); overflow: hidden; display: block; }
  .vh-nav .mega-menu .card-product .product-img img { border-radius: var(--radius-lg); }

  /* clean, premium full-height divider between sub-cats and recent products */
  .vh-nav .mega-menu .row { align-items: stretch; }
  .vh-nav .mega-menu-categories-side { padding-inline-end: clamp(var(--sp-6), 3vw, var(--sp-10)); }
  .vh-nav .mega-menu-products-side {
    border-inline-start: 1px solid var(--color-border) !important;
    padding-inline-start: clamp(var(--sp-8), 4vw, var(--sp-12)) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vh-nav .mega-menu .mega-cat-thumb img { transition: none !important; }
}

