/* ══════════════════════════════════════════
   FAMINAB — Global Styles
   ══════════════════════════════════════════ */

/* ── Theme Variables ── */
[data-theme="light"] {
  color-scheme: light;
  /* Page background — pure white */
  --ink:          #FFFFFF;
  --page:         radial-gradient(120% 80% at 100% 0%, rgba(212,175,55,0.04) 0%, transparent 55%),
                  radial-gradient(120% 90% at 0% 100%, rgba(212,175,55,0.03) 0%, transparent 55%), #FFFFFF;
  /* Glass — very light gray */
  --glass:        #FFFFFF;
  --glass-2:      rgba(255, 255, 255, 0.95);
  --glass-bg:     #FFFFFF;
  --glass-border: rgba(0, 0, 0, 0.06);
  /* Borders */
  --line:         rgba(0, 0, 0, 0.08);
  --line-soft:    rgba(0, 0, 0, 0.06);
  --border:       var(--line-soft);
  --border-focus: rgba(212, 168, 87, 0.45);
  /* Text — navy + gray */
  --text:         #0D1B2A;
  --text-2:       #1B2E45;
  --text-3:       #94A3B8;
  --text-muted:   #64748B;
  --text-light:   #94A3B8;
  /* Gold */
  --gold:         #C9A227;
  --gold-soft:    #DFC05A;
  --gold-text:    #8B6914;
  --gold-grad:    linear-gradient(120deg, #B07E2E, #D4A857);
  --accent:       #C9A227;
  --accent-shine: #DFC05A;
  --accent-dark:  #8B6914;
  --accent-matte: #B8960C;
  --accent-glow:  rgba(201, 162, 39, 0.1);
  /* Compat aliases */
  --bg:           var(--ink);
  --bg-alt:       #F4F5F7;
  --bg-card:      #FFFFFF;
  --bg-card-hover:#F9FAFB;
  --input-bg:     #F4F5F7;
  /* UI chrome */
  --header-bg:    linear-gradient(rgba(255,255,255,0.92), rgba(255,255,255,0.72));
  --bar-bg:       rgba(255, 255, 255, 0.85);
  --sticky-bg:    rgba(255, 255, 255, 0.96);
  --menu-bg:      rgba(255, 255, 255, 0.98);
  --nav-bg:       var(--menu-bg);
  --header-border:rgba(0, 0, 0, 0.06);
  /* Orb opacities */
  --dot:          rgba(0, 0, 0, 0.04);
  --orb-a: 0.08; --orb-b: 0.06; --orb-c: 0.07;
  /* Shadows */
  --shadow:        0 20px 48px -24px rgba(0, 0, 0, 0.12);
  --card-shadow:   0 8px 32px -16px rgba(0, 0, 0, 0.08);
  --shadow-sm:     0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md:     0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg:     0 20px 48px -24px rgba(0, 0, 0, 0.12);
  --shadow-gold:   0 6px 24px rgba(201, 162, 39, 0.15);
  /* Section rhythm */
  --section-a:    #F4F5F7;
  --section-b:    #EDEEF1;
  /* Misc */
  --deals-bg:     #081223;
  --deals-text:   #ffffff;
  --gold-metallic: linear-gradient(135deg, #7d5a0c 0%, #c9a227 20%, #d4af37 35%, #f2d05c 50%, #d4af37 65%, #c9a227 80%, #7d5a0c 100%);
  --gold-badge-shadow: 0 2px 10px rgba(212, 175, 55, 0.3), inset 0 1px 0 rgba(255,255,255,0.3), inset 0 -1px 0 rgba(0,0,0,0.15);
}

[data-theme="dark"] {
  color-scheme: dark;
  /* Page background */
  --ink:          #0B1527;
  --page:         radial-gradient(120% 80% at 100% 0%, #142d4a 0%, transparent 55%),
                  radial-gradient(120% 90% at 0% 100%, #11243e 0%, transparent 55%), #0B1527;
  /* Section rhythm — alternating dark shades */
  --section-a:    rgba(255, 255, 255, 0.028);
  --section-b:    rgba(0, 0, 0, 0.18);
  /* Glass */
  --glass:        rgba(255, 255, 255, 0.055);
  --glass-2:      rgba(255, 255, 255, 0.08);
  --glass-bg:     rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.10);
  /* Borders (gold-tinted) */
  --line:         rgba(212, 168, 87, 0.20);
  --line-soft:    rgba(255, 255, 255, 0.10);
  --border:       var(--line-soft);
  --border-focus: rgba(212, 168, 87, 0.45);
  /* Text */
  --text:         #EAF0F8;
  --text-2:       #B0C4D8;
  --text-3:       #7A8FA6;
  --text-muted:   #B0C4D8;
  --text-light:   #7A8FA6;
  /* Gold */
  --gold:         #D4A857;
  --gold-soft:    #EBCB8C;
  --gold-text:    #EBCB8C;
  --gold-grad:    linear-gradient(120deg, #D4A857, #EBCB8C);
  --accent:       #D4A857;
  --accent-shine: #EBCB8C;
  --accent-dark:  #B8960C;
  --accent-matte: #C9A227;
  --accent-glow:  rgba(212, 168, 87, 0.18);
  /* Compat aliases */
  --bg:           var(--ink);
  --bg-alt:       #0a1525;
  --bg-card:      rgba(255, 255, 255, 0.055);
  --bg-card-hover:rgba(255, 255, 255, 0.09);
  --input-bg:     rgba(255, 255, 255, 0.08);
  /* UI chrome */
  --header-bg:    linear-gradient(rgba(7, 15, 28, 0.88), rgba(7, 15, 28, 0.6));
  --bar-bg:       rgba(7, 15, 28, 0.82);
  --sticky-bg:    rgba(7, 15, 28, 0.95);
  --menu-bg:      rgba(12, 26, 46, 0.96);
  --nav-bg:       var(--menu-bg);
  --header-border:rgba(255, 255, 255, 0.06);
  /* Orb opacities */
  --dot:          rgba(157, 176, 199, 0.08);
  --orb-a: 0.5; --orb-b: 0.2; --orb-c: 0.5;
  /* Shadows */
  --shadow:        0 30px 60px -25px rgba(0, 0, 0, 0.7);
  --card-shadow:   0 14px 34px -22px rgba(0, 0, 0, 0.7);
  --shadow-sm:     0 1px 4px rgba(0, 0, 0, 0.25);
  --shadow-md:     0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-lg:     0 30px 60px -25px rgba(0, 0, 0, 0.7);
  --shadow-gold:   0 8px 32px rgba(212, 168, 87, 0.2);
  /* Misc */
  --deals-bg:     #040a14;
  --deals-text:   #ffffff;
  --gold-metallic: linear-gradient(135deg, #7d5a0c 0%, #c9a227 20%, #d4af37 35%, #f2d05c 50%, #d4af37 65%, #c9a227 80%, #7d5a0c 100%);
  --gold-badge-shadow: 0 2px 10px rgba(212, 175, 55, 0.35), inset 0 1px 0 rgba(255,255,255,0.2), inset 0 -1px 0 rgba(0,0,0,0.25);
}

/* ── Reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: clip;
}
body {
  font-family: "Vazirmatn", "Segoe UI", system-ui, sans-serif;
  background: var(--ink);
  color: var(--text);
  line-height: 1.6;
  transition:
    background-color 0.4s,
    color 0.4s;
  overflow-x: clip;
}

/* ════════════════ LIVE BACKGROUND SYSTEM ════════════════ */
/* Fixed gradient mesh — never scrolls */
.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: var(--page);
  transition: background 0.4s;
}
/* Animated colour orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  mix-blend-mode: screen;
  will-change: transform;
  pointer-events: none;
}
.orb.a {
  width: 60vw; height: 60vw;
  background: radial-gradient(circle, #1f4f86, transparent 70%);
  opacity: var(--orb-a);
  top: -18vw; right: -12vw;
  animation: fmDrift1 26s cubic-bezier(.22,1,.36,1) infinite alternate;
}
.orb.b {
  width: 50vw; height: 50vw;
  background: radial-gradient(circle, #d4a857, transparent 70%);
  opacity: var(--orb-b);
  bottom: -14vw; left: -10vw;
  animation: fmDrift2 30s cubic-bezier(.22,1,.36,1) infinite alternate;
}
.orb.c {
  width: 45vw; height: 45vw;
  background: radial-gradient(circle, #274C77, transparent 70%);
  opacity: var(--orb-c);
  top: 40%; left: 30%;
  animation: fmDrift3 34s cubic-bezier(.22,1,.36,1) infinite alternate;
}
@keyframes fmDrift1 { to { transform: translate(-8vw, 12vh) scale(1.15); } }
@keyframes fmDrift2 { to { transform: translate(10vw, -10vh) scale(1.2); } }
@keyframes fmDrift3 { to { transform: translate(6vw, -14vh) scale(.85); } }
/* Dot grid overlay */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.55;
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(140% 100% at 50% 0%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(140% 100% at 50% 0%, #000 30%, transparent 80%);
  transition: opacity 0.4s;
}
@media (prefers-reduced-motion: reduce) {
  .orb { animation: none !important; }
}
img {
  max-width: 100%;
  display: block;
}
a {
  text-decoration: none;
  color: inherit;
}
button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
  -webkit-appearance: none;
  appearance: none;
}
input,
select,
textarea {
  font-family: inherit;
}
ul {
  list-style: none;
}

/* ── Utilities ── */
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}
.text-gold {
  color: var(--gold-text);
}
.section {
  padding: 80px 0;
}
.glass {
  background: var(--glass-2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line-soft);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}
.btn-gold {
  background: linear-gradient(135deg, #b8960c 0%, #d4af37 45%, #f2d05c 100%);
  color: #081223;
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.25);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--accent-glow);
  filter: brightness(1.07);
}
.btn-navy {
  background: #16314f;
  color: #fff;
  box-shadow: var(--shadow-md);
}
[data-theme="dark"] .btn-navy {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid var(--line-soft);
}
.btn-navy:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
[data-theme="dark"] .btn-navy:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--line);
}
.btn-ghost-light {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}
.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
}
.btn-outline-navy {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-outline-navy:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-outline-gold {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-outline-gold:hover {
  background: var(--accent-glow);
}
.btn-outline-light {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
}
.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
}
.btn-full {
  width: 100%;
  justify-content: center;
}
.btn-sm {
  padding: 8px 18px;
  font-size: 0.82rem;
  border-radius: 8px;
}

/* ════════════════════ GLOBAL BADGE SYSTEM — 3D Embossed ════════════════════ */
.fm-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px 3px;
  border-radius: 8px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  z-index: 4;
  transform: perspective(400px) rotateX(-4deg) translateZ(2px);
  transform-style: preserve-3d;
  backface-visibility: hidden;
  text-shadow: 0 1px 1px rgba(0,0,0,0.15);
  line-height: 1.2;
}
/* Position helpers for image-overlay badges */
.fm-badge--abs   { position: absolute; top: 10px; z-index: 4; }
.fm-badge--right { right: 10px; }
.fm-badge--left  { left: 10px; right: auto; }

/* ── Discount — neon red ── */
.fm-badge--discount {
  font-size: 0.82rem;
  font-weight: 800;
  padding: 6px 14px 5px;
  background: linear-gradient(145deg, #7f1d1d 0%, #dc2626 28%, #ff2d55 52%, #ff4d6d 72%, #e11d48 100%);
  color: #fff;
  text-shadow: 0 0 8px rgba(255, 45, 85, 0.85), 0 1px 2px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 120, 140, 0.55);
  animation: fmDiscPulse 2s ease-in-out infinite;
  box-shadow:
    0 0 14px rgba(255, 45, 85, 0.55),
    0 0 28px rgba(220, 38, 38, 0.35),
    0 2px 4px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}
@keyframes fmDiscPulse {
  0%, 100% {
    box-shadow:
      0 0 12px rgba(255, 45, 85, 0.5),
      0 0 24px rgba(220, 38, 38, 0.28),
      0 2px 4px rgba(0, 0, 0, 0.25),
      inset 0 1px 0 rgba(255, 255, 255, 0.3),
      inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  }
  50% {
    box-shadow:
      0 0 18px rgba(255, 45, 85, 0.85),
      0 0 36px rgba(255, 45, 85, 0.45),
      0 2px 4px rgba(0, 0, 0, 0.25),
      inset 0 1px 0 rgba(255, 255, 255, 0.4),
      inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  }
}

/* ── New — deep teal metallic, white text ── */
.fm-badge--new {
  background: linear-gradient(145deg, #064e3b 0%, #0f766e 35%, #14b8a6 65%, #0d9488 100%);
  background-size: 200% 100%;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    0 3px 12px rgba(13, 148, 136, 0.4),
    0 1px 2px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  animation: fmBadgeShimmer 3s linear infinite;
}
@keyframes fmBadgeShimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}

/* ── Hot / Bestseller — dark metal + bright white text ── */
.fm-badge--hot {
  background: linear-gradient(145deg, #1f2937 0%, #374151 35%, #4b5563 65%, #1f2937 100%);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 3px 14px rgba(15, 23, 42, 0.45),
    0 1px 3px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.25);
}

/* ── Default / neutral — gold ── */
.fm-badge--gold {
  background: linear-gradient(145deg, #c9a227 0%, #d4af37 40%, #f2d05c 70%, #d4af37 100%);
  color: #081223;
  box-shadow:
    0 3px 10px rgba(212,175,55,0.35),
    0 1px 2px rgba(0,0,0,0.15),
    inset 0 1px 0 rgba(255,255,255,0.35),
    inset 0 -1px 0 rgba(0,0,0,0.12);
}

/* ── Status — green ── */
.fm-badge--green {
  background: linear-gradient(145deg, #15803d 0%, #22c55e 50%, #4ade80 100%);
  color: #fff;
  box-shadow:
    0 3px 10px rgba(34,197,94,0.35),
    0 1px 2px rgba(0,0,0,0.15),
    inset 0 1px 0 rgba(255,255,255,0.25),
    inset 0 -1px 0 rgba(0,0,0,0.12);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .fm-badge { font-size: 0.6rem; padding: 3px 7px 2px; }
  .fm-badge--abs { top: 6px; }
  .fm-badge--right { right: 6px; }
  .fm-badge--left  { left: 6px; }
  .fm-badge--discount { font-size: 0.72rem; padding: 5px 10px 4px; }
}

/* ── Section header ── */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 40px;
  gap: 16px;
}
.section-tag {
  display: inline-block;
  margin-bottom: 8px;
  padding: 5px 14px 4px;
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(212,168,87,0.15), rgba(212,168,87,0.06));
  color: var(--gold-text);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  border: 1px solid var(--line);
  transform: perspective(400px) rotateX(-3deg) translateZ(1px);
  box-shadow:
    0 2px 8px rgba(212, 175, 55, 0.12),
    inset 0 1px 0 rgba(255,255,255,0.15),
    inset 0 -1px 0 rgba(0,0,0,0.06);
}
.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
}

/* ════════════════════ ANNOUNCEMENT BAR ════════════════════ */
.announce-bar {
  background: linear-gradient(90deg, #070F1C 0%, #102744 50%, #070F1C 100%);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.8rem;
  height: 36px;
  overflow: hidden;
  position: relative;
}
.announce-track {
  display: flex;
  align-items: center;
  gap: 24px;
  white-space: nowrap;
  animation: marqueeRtl 30s linear infinite;
  height: 100%;
}
.announce-track strong {
  color: var(--accent-shine);
}
.announce-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
@keyframes marqueeRtl {
  from {
    transform: translateX(-50%);
  }
  to {
    transform: translateX(0%);
  }
}

/* ════════════════════ HEADER ════════════════════ */
.header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--header-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line-soft);
  transition:
    background 0.3s ease,
    box-shadow 0.3s ease;
}
.header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-main {
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  z-index: 10;
  padding-top: 14px;
  padding-bottom: 14px;
}

/* Logo */
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}
.site-logo {
  display: block;
  height: 36px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
}
.site-logo--sm {
  height: 22px;
  max-width: 80px;
}
.site-logo--auth {
  height: 48px;
  max-width: 200px;
}
.header-logo .site-logo {
  height: 34px;
  max-width: 140px;
}
html[data-theme="light"] .site-logo,
[data-theme="light"] .site-logo {
  filter: invert(1);
}
.logo-text {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.logo-name {
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, var(--accent-dark), var(--accent-shine));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo-tagline {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1;
  margin-top: 2px;
}

/* ─── Search Bar — Minimal ─── */
.header-search-wrap {
  flex: 1;
  max-width: 560px;
  position: relative;
}
.search-goo-svg {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}
.header-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--input-bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 0 12px;
  min-height: 42px;
  position: relative;
  transition:
    border-color 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  transform: none;
  transform-origin: center;
}
.header-search:focus-within {
  border-color: var(--accent);
  background: var(--glass);
  box-shadow: 0 0 0 3px var(--accent-glow);
  transform: none;
}

/* Leading search icon */
.search-lead-icon {
  font-size: 1rem;
  color: var(--text-light);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}
.header-search:focus-within .search-lead-icon {
  color: var(--accent);
  transform: none;
}

.search-cat-select {
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-right: 1px solid var(--border);
  flex-shrink: 0;
  position: relative;
}

.search-cat-select select {
  display: none;
}

.cat-dd-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Vazirmatn', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 2px;
  white-space: nowrap;
  transition: color 0.2s;
}
.cat-dd-btn:hover,
.cat-dd-btn--open {
  color: var(--gold);
}
.cat-dd-chevron {
  font-size: 0.5rem;
  transition: transform 0.25s;
  opacity: 0.6;
}
.cat-dd-btn--open .cat-dd-chevron {
  transform: rotate(180deg);
  opacity: 1;
  color: var(--gold);
}

.cat-dd-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 180px;
  background: rgba(11, 21, 39, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 5px;
  z-index: 500;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: dropIn 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-theme="light"] .cat-dd-menu {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.1);
}
.cat-dd-menu--open {
  display: block;
}

.cat-dd-item {
  display: block;
  width: 100%;
  padding: 7px 12px;
  border: none;
  background: none;
  text-align: right;
  font-family: 'Vazirmatn', system-ui, sans-serif;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.12s;
}
.cat-dd-item + .cat-dd-item {
  margin-top: 1px;
}
.cat-dd-item:hover {
  background: rgba(201, 162, 39, 0.08);
  color: var(--gold);
  padding-right: 16px;
}
.cat-dd-item--active {
  color: var(--gold);
  font-weight: 700;
  background: rgba(201, 162, 39, 0.1);
}
.cat-dd-item--active::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  margin-left: 6px;
  vertical-align: middle;
}
.search-input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  padding: 11px 6px;
  font-size: 0.88rem;
  color: var(--text);
  font-family: inherit;
  transition: color 0.2s;
}
.search-input::placeholder {
  color: var(--text-light);
  transition: color 0.3s, opacity 0.3s;
}
.header-search:focus-within .search-input::placeholder {
  opacity: 0.7;
}
/* Clear button — appears when typing */
.search-clear {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.82rem;
  flex-shrink: 0;
  transition: background 0.18s, color 0.18s, transform 0.18s;
}
.search-clear:hover {
  background: var(--glass-2);
  color: var(--text);
  transform: rotate(90deg);
}
.header-search.has-value .search-clear {
  display: flex;
  animation: searchClearIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes searchClearIn {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}

/* ─── Suggestions Dropdown ─── */
.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  background: var(--menu-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  padding: 8px;
  box-shadow: var(--shadow);
  z-index: 301;
  display: none;
  animation: dropIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.search-suggestions.open {
  display: block;
}
.search-sug-header {
  padding: 4px 12px 6px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.search-sug-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 0.84rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.12s, color 0.12s, padding-right 0.15s;
}
.search-sug-item:hover {
  padding-right: 16px;
}
.search-sug-item:hover {
  background: var(--accent-glow);
  color: var(--text);
}
.search-sug-icon {
  font-size: 0.88rem;
  color: var(--text-light);
  flex-shrink: 0;
  transition: color 0.12s;
}
.search-sug-item:hover .search-sug-icon {
  color: var(--accent);
}
.search-sug-cat {
  font-size: 0.71rem;
  color: var(--text-light);
  background: var(--glass-2);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 1px 7px;
  margin-right: auto;
  white-space: nowrap;
  flex-shrink: 0;
}
.search-sug-item--link {
  text-decoration: none;
  color: inherit;
}
.search-sug-status {
  padding: 12px 14px 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.search-sug-spin {
  animation: searchSugSpin 0.8s linear infinite;
}
@keyframes searchSugSpin {
  to { transform: rotate(-360deg); }
}
.search-sug-product {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: background 0.12s, border-color 0.12s;
}
.search-sug-product:hover {
  background: var(--accent-glow);
}
.search-sug-thumb {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--glass-2);
  border: 1px solid var(--line-soft);
  color: var(--text-light);
  position: relative;
}
.search-sug-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.search-sug-disc {
  position: absolute;
  top: 3px;
  right: 3px;
  background: #ef4444;
  color: #fff;
  font-size: 0.58rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 4px;
  line-height: 1.3;
}
.search-sug-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.search-sug-brand {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
}
.search-sug-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-sug-price {
  flex-shrink: 0;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.35;
}
.search-sug-price small {
  font-size: 0.62rem;
  font-weight: 600;
  opacity: 0.8;
}
.search-sug-price--muted {
  color: var(--text-muted);
  font-weight: 600;
}
.search-sug-old {
  display: block;
  font-size: 0.66rem;
  font-weight: 500;
  color: var(--text-light);
  text-decoration: line-through;
}
.search-sug-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  background: var(--accent-glow);
  border: 1px solid var(--line-soft);
}
.search-sug-all:hover {
  filter: brightness(1.08);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 1.1rem;
  color: var(--text-2);
  transition: all 0.2s;
  position: relative;
}
.action-btn:hover {
  background: var(--accent-glow);
  color: var(--accent);
}
.action-btn--cart {
  background: var(--bg-alt);
  border: 1px solid var(--line-soft);
  color: var(--text);
}
[data-theme="dark"] .action-btn--cart {
  background: rgba(255, 255, 255, 0.07);
}
.action-btn--cart:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent);
}
.action-badge {
  position: absolute;
  top: -4px;
  left: -4px;
  min-width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: #081223;
  font-size: 0.62rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 2px 6px rgba(212, 175, 55, 0.4);
  border: 2px solid var(--glass);
}
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 1rem;
  color: var(--text-muted);
  transition: all 0.2s;
}
.theme-toggle:hover {
  background: var(--accent-glow);
  color: var(--accent);
}

/* Profile dropdown */
.header-profile {
  position: relative;
}
.profile-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 10px;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.2s;
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  font-family: 'Vazirmatn', system-ui, sans-serif;
}
.profile-btn:hover {
  background: var(--accent-glow);
}
.profile-btn[hidden] { display: none; }
.profile-btn--guest {
  border: 1px solid var(--line-soft);
  padding: 5px 14px 5px 10px;
}
.profile-btn--guest:hover {
  border-color: rgba(201, 162, 39, 0.25);
  background: var(--accent-glow);
}
.profile-btn--guest .profile-name {
  color: var(--gold);
  font-weight: 600;
}
.profile-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-dark), var(--accent-shine));
  color: #081223;
  font-size: 0.85rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-avatar--guest {
  background: rgba(201, 162, 39, 0.12);
  color: var(--gold);
  font-size: 1rem;
}
.profile-name {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.profile-logout {
  color: #ef4444 !important;
}
.profile-logout:hover {
  background: rgba(239, 68, 68, 0.06) !important;
  color: #ef4444 !important;
}
.profile-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0;
  padding-top: 10px;
  background: var(--menu-bg);
  background-clip: padding-box;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 10px 6px 6px;
  min-width: 210px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.04);
  z-index: 300;
  animation: dropIn 0.22s cubic-bezier(0.22,1,0.36,1);
}
[data-theme="light"] .profile-dropdown {
  background: rgba(255,255,255,0.97);
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 16px 48px rgba(0,0,0,0.1);
}
.header-profile:hover,
.header-profile.open {
  z-index: 330;
}
.header-profile:hover .profile-btn--user:not([hidden]) ~ .profile-dropdown,
.header-profile.open .profile-btn--user:not([hidden]) ~ .profile-dropdown {
  display: block;
}
.profile-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.15s;
  font-family: 'Vazirmatn', system-ui, sans-serif;
}
.profile-dropdown a i { font-size: 1rem; width: 18px; text-align: center; }
.profile-dropdown a:hover {
  background: var(--accent-glow);
  color: var(--accent);
}
.profile-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 6px;
}
.role-switch {
  color: var(--accent) !important;
  font-weight: 600;
}

@keyframes dropIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Nav / Menubar ─── */
.header-nav {
  background: var(--bar-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line-soft);
  position: relative;
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 46px;
  position: relative;
}

/* Nav link & trigger — unified style */
.nav-link,
.nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: default;
  white-space: nowrap;
  user-select: none;
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.nav-link:hover,
.nav-trigger:hover,
.nav-item.open > .nav-trigger {
  background: rgba(212, 168, 87, 0.08);
  color: var(--text);
}
.nav-link--active {
  color: var(--accent);
  background: rgba(212, 168, 87, 0.08);
}

/* Chevron indicator */
.nav-chevron {
  font-size: 0.6rem;
  opacity: 0.55;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.15s;
}
.nav-item.open > .nav-trigger .nav-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

/* RFQ accent pill */
.nav-link--rfq {
  margin-right: auto;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #A67C2E 0%, #C9A84C 55%, #F0C040 100%);
  color: #0D1B2A !important;
  font-weight: 700;
  border-radius: 10px;
  padding: 7px 18px;
  box-shadow:
    0 0 0 1px rgba(201,168,76,0.35),
    0 4px 18px rgba(201,168,76,0.28),
    inset 0 1px 0 rgba(255,255,255,0.25);
  transition: transform 0.2s, box-shadow 0.2s;
}
.nav-link--rfq::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.22) 50%, transparent 60%);
  transform: translateX(100%);
  transition: transform 0.55s ease;
}
.nav-link--rfq:hover::after {
  transform: translateX(-100%);
}
.nav-link--rfq:hover {
  background: linear-gradient(135deg, #A67C2E 0%, #C9A84C 55%, #F0C040 100%) !important;
  color: #0D1B2A !important;
  box-shadow:
    0 0 0 1px rgba(201,168,76,0.5),
    0 6px 24px rgba(201,168,76,0.38),
    inset 0 1px 0 rgba(255,255,255,0.3);
  transform: translateY(-2px);
}

/* Light mode — outlined gold */
[data-theme="light"] .nav-link--rfq {
  background: rgba(201,168,76,0.07) !important;
  color: #8A6510 !important;
  box-shadow:
    0 0 0 1.5px #C9A84C,
    0 3px 12px rgba(201,168,76,0.15);
}
[data-theme="light"] .nav-link--rfq::after {
  background: linear-gradient(105deg, transparent 40%, rgba(201,168,76,0.18) 50%, transparent 60%);
}
[data-theme="light"] .nav-link--rfq:hover {
  background: linear-gradient(135deg, #A67C2E 0%, #C9A84C 55%, #F0C040 100%) !important;
  color: #0D1B2A !important;
  box-shadow:
    0 0 0 1.5px #C9A84C,
    0 6px 20px rgba(201,168,76,0.32),
    inset 0 1px 0 rgba(255,255,255,0.3);
}

/* ── Mega Menu ── */
.nav-item {
  position: relative;
}
.mega-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 580px;
  background: var(--menu-bg);
  background-clip: padding-box;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  /* padding-top bridge keeps hover alive between trigger and panel */
  padding: 12px 20px 14px;
  margin-top: 0;
  box-shadow: var(--shadow), 0 0 0 0.5px var(--line);
  z-index: 300;
  animation: dropIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-item.open {
  z-index: 320;
}
.nav-item.open > .mega-menu {
  display: block;
}
.mega-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 14px;
  margin-bottom: 12px;
}
.mega-col {
  padding: 0 12px;
}
[dir="rtl"] .mega-col + .mega-col {
  border-right: 1px solid var(--line-soft);
}

.mega-col-header,
a.mega-col-header {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
}
a.mega-col-header:hover span {
  color: var(--fm-accent, #C9A84C);
}
.mega-col-header {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
  letter-spacing: 0.2px;
}
.mega-col-header i {
  font-size: 0.88rem;
}
.mega-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 6px;
  border-radius: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s, color 0.12s, padding-right 0.12s;
}
.mega-item::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  opacity: 0.3;
  transition: opacity 0.12s;
}
.mega-item:hover {
  background: rgba(212, 168, 87, 0.08);
  color: var(--text);
  padding-right: 10px;
}
.mega-item:hover::before {
  opacity: 1;
}
.mega-footer {
  display: flex;
  justify-content: center;
}
.mega-all-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 20px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold-text);
  border: 1px solid var(--line);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.mega-all-link:hover {
  background: rgba(212, 168, 87, 0.08);
  border-color: var(--accent);
  color: var(--accent);
}

/* Brands mega panel */
.mega-menu--brands {
  min-width: 480px;
}

/* ── Products mega: L1 sidebar → L2 pills → L3 group cards ── */
.mega-menu--products {
  display: none;
  flex-direction: column;
  left: auto;
  right: 0;
  width: min(1280px, calc(100vw - 24px));
  min-width: min(1100px, calc(100vw - 24px));
  max-width: calc(100vw - 20px);
  max-height: min(82vh, 680px);
  padding: 0 !important;
  overflow: hidden;
  background: var(--menu-bg, #0d1520);
  background-clip: padding-box;
  box-shadow: 0 28px 56px rgba(0, 0, 0, 0.38);
}
.nav-item.open > .mega-menu--products {
  display: flex;
  flex-direction: column;
}
/* Single-row header: panel spans header-main, not the trigger */
.header--ak-single .nav-item.nav-item--products,
.header--ak-single .nav-item--products {
  position: static;
}
.header--ak-single .header-main--ak-single {
  position: relative;
  overflow: visible;
}
.header--ak-single .mega-menu--products {
  left: 8px;
  right: 8px;
  width: auto;
  min-width: 0;
  max-width: none;
}
.mega-cats {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  max-height: none;
  overflow: hidden;
}
.mega-cats__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 10px;
  background: rgba(0, 0, 0, 0.28);
  border-left: 1px solid var(--line-soft, rgba(255, 255, 255, 0.08));
  overflow-y: auto;
  scrollbar-width: thin;
}
[dir="rtl"] .mega-cats__nav {
  border-left: none;
  border-right: 1px solid var(--line-soft, rgba(255, 255, 255, 0.08));
}
.mega-cats__tab {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted, #9db0c7);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  text-align: right;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.mega-cats__tab i:first-child {
  font-size: 1.05rem;
  color: var(--accent, #C9A84C);
  opacity: 0.85;
  flex-shrink: 0;
}
.mega-cats__tab-label {
  flex: 1;
  line-height: 1.35;
}
.mega-cats__tab-chevron {
  font-size: 0.7rem;
  opacity: 0.35;
  flex-shrink: 0;
}
.mega-cats__tab:hover {
  background: rgba(201, 168, 76, 0.08);
  color: var(--text, #fff);
}
.mega-cats__tab.is-active {
  background: rgba(201, 168, 76, 0.14);
  color: var(--text, #fff);
  box-shadow: inset 3px 0 0 var(--accent, #C9A84C);
}
[dir="rtl"] .mega-cats__tab.is-active {
  box-shadow: inset -3px 0 0 var(--accent, #C9A84C);
}
.mega-cats__tab.is-active i:first-child,
.mega-cats__tab.is-active .mega-cats__tab-chevron {
  opacity: 1;
  color: var(--accent, #C9A84C);
}
.mega-cats__panels {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: transparent;
}
.mega-cats__panel {
  display: none;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.mega-cats__panel.is-active {
  display: flex;
  animation: megaPanelIn 0.18s ease;
}
@keyframes megaPanelIn {
  from { opacity: 0; transform: translateX(-6px); }
  to { opacity: 1; transform: translateX(0); }
}
[dir="rtl"] @keyframes megaPanelIn {
  from { opacity: 0; transform: translateX(6px); }
  to { opacity: 1; transform: translateX(0); }
}
.mega-cats__panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--line-soft, rgba(255, 255, 255, 0.08));
}
.mega-cats__panel-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text, #fff);
}
.mega-cats__panel-title i {
  color: var(--accent, #C9A84C);
  font-size: 1rem;
}
.mega-cats__panel-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted, #9db0c7);
  text-decoration: none;
  transition: color 0.15s;
}
.mega-cats__panel-all:hover {
  color: var(--accent, #C9A84C);
}
.mega-cats__panel-body {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 14px 18px 20px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.mega-cats__subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.mega-cats__subtab {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted, #9db0c7);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.mega-cats__subtab:hover {
  color: #fff;
  border-color: rgba(201, 168, 76, 0.35);
  background: rgba(201, 168, 76, 0.08);
}
.mega-cats__subtab.is-active {
  color: #0d1520;
  background: var(--accent, #C9A84C);
  border-color: var(--accent, #C9A84C);
}
.mega-cats__section {
  display: none;
}
.mega-cats__section.is-active {
  display: block;
  animation: megaPanelIn 0.16s ease;
}
.mega-cats__section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.mega-cats__section-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent, #C9A84C);
}
.mega-cats__section-all {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted, #9db0c7);
  text-decoration: none;
}
.mega-cats__section-all:hover {
  color: #fff;
}
.mega-cats__groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  align-items: start;
}
/* دو گروه مثل رنگ | پوشش دکوراتیو — کنار هم، کارت‌های عریض‌تر */
.mega-cats__groups--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.mega-cats__groups--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.mega-cats__group-card {
  min-width: 0;
  padding: 0;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
}
.mega-cats__group-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 12px 10px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
}
.mega-cats__group-head > span:first-child {
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}
.mega-cats__group-head:hover {
  color: var(--accent, #C9A84C);
}
.mega-cats__group-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted, #9db0c7);
  font-size: 0.7rem;
  font-weight: 800;
  flex-shrink: 0;
}
.mega-cats__group-links {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 2px 8px;
  padding: 0 8px 8px;
}
.mega-cats__groups--2 .mega-cats__group-links,
.mega-cats__groups--3 .mega-cats__group-links {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
.mega-cats__group-links .mega-cats__link {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 0.78rem;
  line-height: 1.35;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}
.mega-cats__group-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.mega-cats__chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}
.mega-cats__chip {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted, #9db0c7);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  transition: background 0.14s, color 0.14s, border-color 0.14s;
}
.mega-cats__chip--sm {
  min-height: 36px;
  padding: 7px 11px;
  font-size: 0.76rem;
}
.mega-cats__chip:hover {
  color: #fff;
  border-color: rgba(201, 168, 76, 0.45);
  background: rgba(201, 168, 76, 0.12);
}
.mega-cats__leaf-card {
  display: grid;
  gap: 8px;
}
.mega-cats__leaf-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.mega-cats__leaf-link:hover {
  border-color: rgba(201, 168, 76, 0.45);
  background: rgba(201, 168, 76, 0.1);
}
.mega-cats__leaf-link i {
  color: var(--accent, #C9A84C);
}
.mega-cats__empty-all {
  display: inline-flex;
  color: var(--accent, #C9A84C);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}
.mega-cats__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 10px;
}
.mega-cats__link {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-muted, #9db0c7);
  text-decoration: none;
  transition: background 0.14s, color 0.14s;
}
.mega-cats__link:hover {
  background: rgba(201, 168, 76, 0.1);
  color: var(--text, #fff);
}
.mega-menu--products .mega-footer {
  flex-shrink: 0;
  padding: 10px 18px 12px;
  border-top: 1px solid var(--line-soft, rgba(255, 255, 255, 0.08));
  background: rgba(0, 0, 0, 0.22);
  position: relative;
  z-index: 2;
}
@media (max-width: 1200px) {
  .mega-menu--products {
    width: min(1120px, calc(100vw - 20px));
    min-width: min(960px, calc(100vw - 20px));
  }
  .mega-cats {
    grid-template-columns: 180px minmax(0, 1fr);
  }
}
@media (max-width: 900px) {
  .mega-menu--products {
    width: min(100vw - 16px, 720px);
    min-width: min(100vw - 16px, 720px);
    max-width: calc(100vw - 12px);
    max-height: min(78vh, 620px);
  }
  .mega-cats {
    grid-template-columns: 1fr;
  }
  .mega-cats__nav {
    flex-direction: row;
    overflow-x: auto;
    border: 0;
    border-bottom: 1px solid var(--line-soft, rgba(255, 255, 255, 0.08));
    padding: 10px;
    gap: 6px;
  }
  .mega-cats__tab {
    white-space: nowrap;
    flex: 0 0 auto;
    padding: 10px 12px;
  }
  .mega-cats__tab-chevron { display: none; }
  .mega-cats__groups--2,
  .mega-cats__groups--3 {
    grid-template-columns: 1fr;
  }
  .mega-cats__group-links {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .mega-cats__chips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mega-cats__subnav {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }
  .mega-cats__subtab {
    flex: 0 0 auto;
  }
}

@media (max-width: 480px) {
  .mob-menu-chip-grid {
    grid-template-columns: 1fr;
  }
  .mob-menu-sub--nested {
    margin-inline-start: 2px;
    padding-inline-start: 8px;
  }
}

.ak-brands-mega {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.ak-brands-mega__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 80px;
  padding: 12px 8px;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  background: var(--bg-alt, rgba(255, 255, 255, 0.03));
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.ak-brands-mega__item img {
  width: 72px;
  height: 32px;
  object-fit: contain;
  opacity: 0.85;
}
.ak-brands-mega__item span {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
}
.ak-brands-mega__item:hover {
  border-color: var(--accent);
  background: rgba(212, 168, 87, 0.08);
  transform: translateY(-1px);
}
.ak-brands-mega__item:hover img { opacity: 1; }
.ak-brands-mega__item:hover span { color: var(--accent); }
@media (max-width: 640px) {
  .ak-brands-mega { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── Small dropdown (O2O / B2B) ── */
.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 250px;
  background: var(--menu-bg);
  background-clip: padding-box;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 10px 6px 6px;
  margin-top: 0;
  box-shadow: var(--shadow);
  z-index: 300;
  animation: dropIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-item.open > .nav-dropdown {
  display: block;
}
.nav-drop-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: default;
  transition: background 0.12s;
  text-decoration: none;
}
.nav-drop-item:hover {
  background: rgba(212, 168, 87, 0.07);
}
.drop-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--glass-2);
  border: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.drop-icon--gold {
  background: rgba(212, 168, 87, 0.1);
  border-color: rgba(212, 168, 87, 0.2);
  color: var(--accent);
}
.nav-drop-item:hover .drop-icon {
  background: rgba(212, 168, 87, 0.1);
  border-color: rgba(212, 168, 87, 0.25);
  color: var(--accent);
}
.drop-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}
.drop-label--gold {
  color: var(--gold-text);
}
.drop-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.3;
}
.nav-drop-sep {
  height: 1px;
  background: var(--line-soft);
  margin: 4px 0;
}

/* Mobile hamburger */
.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 1.3rem;
  color: var(--text);
  align-items: center;
  justify-content: center;
}

/* Mobile overlay */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 400;
  background: var(--menu-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  flex-direction: column;
  padding: 20px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.mobile-nav-overlay.open {
  display: flex;
  animation: fadeIn 0.2s ease;
}
.mobile-nav-close {
  align-self: flex-start;
  font-size: 1.4rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mobile-nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  transition: background 0.2s;
}
.mobile-nav a:hover,
.mobile-nav a:active {
  background: var(--accent-glow);
  color: var(--accent);
}
.mobile-nav a i {
  font-size: 1.2rem;
  width: 24px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Mobile Menu Accordion ── */
.mob-menu-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  transition: background 0.2s;
  min-height: 52px;
}
.mob-menu-link:hover, .mob-menu-link:active,
.mob-menu-link--active {
  background: var(--accent-glow);
  color: var(--accent);
}
.mob-menu-link i:first-child {
  font-size: 1.15rem;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--glass-2);
  color: var(--accent);
  flex-shrink: 0;
}

.mob-menu-group {
  border-radius: 14px;
  overflow: hidden;
  transition: background 0.2s;
}
.mob-menu-group.is-open {
  background: var(--glass-2);
}
.mob-menu-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  min-height: 52px;
  text-align: right;
  transition: background 0.2s, color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.mob-menu-trigger:hover { background: var(--accent-glow); }
.mob-menu-group.is-open > .mob-menu-trigger,
.mob-menu-nest.is-open > .mob-menu-trigger { color: var(--text); }
.mob-menu-trigger i:first-child {
  font-size: 1.15rem;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  flex-shrink: 0;
}
.mob-menu-trigger span {
  flex: 1;
  line-height: 1.35;
}
.mob-menu-arrow {
  margin-right: auto;
  margin-inline-start: auto;
  font-size: 0.7rem;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.mob-menu-group.is-open > .mob-menu-trigger .mob-menu-arrow,
.mob-menu-nest.is-open > .mob-menu-trigger .mob-menu-arrow {
  transform: rotate(180deg);
  color: var(--text-muted);
}
.mob-menu-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  flex-shrink: 0;
}

.mob-menu-sub {
  display: none;
  flex-direction: column;
  padding: 0 12px 12px;
  gap: 4px;
}
.mob-menu-group.is-open > .mob-menu-sub,
.mob-menu-nest.is-open > .mob-menu-sub {
  display: flex;
  animation: mobSubIn 0.25s ease-out;
}
@keyframes mobSubIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mob-menu-nest {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
}
.mob-menu-sub--nested {
  margin: 0 4px 6px;
  padding: 6px 0 8px 10px;
  border-inline-start: 2px solid rgba(255, 255, 255, 0.1);
}
.mob-menu-trigger--l1 {
  min-height: 48px;
  padding: 12px 14px;
  font-size: 0.94rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  margin-bottom: 2px;
  color: var(--text);
}
.mob-menu-nest.is-open > .mob-menu-trigger--l1 {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}
.mob-menu-nest.is-open > .mob-menu-trigger--l1 i:first-child {
  color: var(--accent);
  background: rgba(201, 168, 76, 0.12);
}
.mob-menu-trigger--l2 {
  min-height: 44px;
  padding: 10px 12px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}
.mob-menu-trigger--l3 {
  min-height: 42px;
  padding: 9px 12px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
}
.mob-menu-block {
  margin: 4px 0 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}
.mob-menu-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.mob-menu-block-title {
  color: #fff !important;
  font-size: 0.86rem !important;
  font-weight: 800 !important;
  padding: 0 !important;
  background: none !important;
  border: 0 !important;
}
.mob-menu-block-title:hover {
  color: var(--accent) !important;
}
.mob-menu-viewall {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 2px 0 10px;
  padding: 11px 12px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted) !important;
  font-size: 0.8rem !important;
  font-weight: 650 !important;
  background: rgba(255, 255, 255, 0.03) !important;
  min-height: 42px;
}
.mob-menu-viewall:hover,
.mob-menu-viewall:active {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.18);
}
.mob-menu-chip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 2px 0 4px;
}
.mob-menu-chip {
  display: flex !important;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 12px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--text-muted) !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  line-height: 1.35;
}
.mob-menu-chip:hover,
.mob-menu-chip:active {
  color: #fff !important;
  border-color: rgba(201, 168, 76, 0.4);
  background: rgba(201, 168, 76, 0.1) !important;
}
.mob-menu-chip i {
  font-size: 0.75rem !important;
  width: auto !important;
  height: auto !important;
  background: none !important;
  color: var(--text-muted) !important;
}
.mob-menu-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mob-menu-links a {
  min-height: 42px;
  padding: 10px 12px !important;
  border-radius: 8px !important;
  font-size: 0.84rem !important;
  color: var(--text-muted) !important;
}
.mob-menu-links a:hover,
.mob-menu-links a:active {
  background: var(--accent-glow) !important;
  color: var(--text) !important;
}

.mob-menu-sub-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  padding: 10px 0 4px;
  letter-spacing: 0.2px;
  text-decoration: none;
}
a.mob-menu-sub-head:hover {
  color: var(--accent);
  opacity: 0.9;
}
.mob-menu-sub-head i { font-size: 0.82rem; }
.mob-menu-sub a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}
.mob-menu-sub a:hover {
  background: var(--accent-glow);
  color: var(--text);
}
.mob-menu-sub a i { font-size: 0.92rem; color: var(--text-light); }
.mob-menu-sub a:hover i { color: var(--accent); }
.mob-menu-all {
  margin-top: 8px;
  padding: 12px 14px !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
  color: var(--gold-text) !important;
  border: 1px solid var(--line);
  text-align: center;
  justify-content: center;
  min-height: 48px;
}
.mob-menu-all:hover {
  background: var(--accent-glow) !important;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}

.mob-menu-rfq {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 700;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #A67C2E 0%, #C9A84C 55%, #F0C040 100%);
  color: #0D1B2A;
  box-shadow:
    0 0 0 1px rgba(201,168,76,0.3),
    0 6px 20px rgba(201,168,76,0.3),
    inset 0 1px 0 rgba(255,255,255,0.2);
  min-height: 52px;
  transition: transform 0.2s, box-shadow 0.2s;
}
[data-theme="light"] .mob-menu-rfq {
  background: rgba(201,168,76,0.08);
  color: #8A6510;
  box-shadow:
    0 0 0 1.5px #C9A84C,
    0 4px 16px rgba(201,168,76,0.15);
}

/* ════════════════════ MOBILE BOTTOM NAV (GLOBAL) ════════════════════ */
.mob-nav { display: none; }

.mob-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 4px 0;
  color: rgba(157,176,199,0.45);
  font-size: 0.6rem;
  font-weight: 600;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  transition: color 0.18s;
  -webkit-tap-highlight-color: transparent;
}
.mob-nav-item i {
  font-size: 1.25rem;
  line-height: 1;
  transition: transform 0.18s;
}
.mob-nav-item:hover { color: rgba(234,240,248,0.85); }
.mob-nav-item:hover i { transform: translateY(-2px); }
.mob-nav-item--active { color: var(--accent) !important; }

.mob-cart-badge {
  position: absolute;
  top: 5px;
  left: calc(50% + 4px);
  min-width: 16px; height: 16px;
  border-radius: 99px;
  font-size: 0.56rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border: 2px solid rgba(4,10,20,0.95);
  background: #ef4444;
  color: #fff;
}

@media (max-width: 768px) {
  .mob-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: calc(58px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: linear-gradient(to top, rgba(4,10,20,0.98), rgba(7,15,28,0.95));
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(212,175,55,0.12);
    box-shadow: 0 -4px 24px rgba(0,0,0,0.5), 0 -1px 0 rgba(212,175,55,0.06);
    z-index: 350;
  }
  [data-theme="light"] .mob-nav {
    background: linear-gradient(to top, rgba(245,247,250,0.98), rgba(255,255,255,0.95));
    border-top-color: var(--line-soft);
    box-shadow: 0 -4px 24px rgba(0,0,0,0.08);
  }
  [data-theme="light"] .mob-nav-item { color: rgba(100,116,139,0.6); }
  [data-theme="light"] .mob-nav-item:hover { color: var(--text); }
  [data-theme="light"] .mob-cart-badge { border-color: rgba(255,255,255,0.95); }
  .has-mob-nav { padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px)); }
}

/* ════════════════════ FAB BUTTONS ════════════════════ */
/* Scroll-to-top: fixed LEFT — Consult: fixed RIGHT */
.fab--top {
  position: fixed;
  bottom: 28px; left: 20px; z-index: 300;
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  background: var(--glass-2);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: var(--text-muted);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(20px);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}
.fab--top.visible {
  opacity: 1; transform: translateY(0);
  pointer-events: all;
}
.fab--top:hover {
  color: var(--accent); border-color: var(--accent);
  transform: translateY(-3px);
}

.fab--consult {
  position: fixed;
  bottom: 28px; right: 20px; z-index: 300;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  height: 50px;
  padding: 0 18px 0 16px;
  border-radius: 12px;
  font-size: 1.15rem;
  background: #050508;
  color: #2dd4a8;
  border: 1px solid rgba(26, 158, 122, 0.85);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(45, 212, 168, 0.08),
    0 0 22px rgba(45, 212, 168, 0.18);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  white-space: nowrap;
  -webkit-user-select: none; user-select: none;
  animation: none;
}
.fab--consult:hover {
  transform: translateY(-3px) scale(1.03);
  animation: none;
  border-color: #2dd4a8;
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(45, 212, 168, 0.2),
    0 0 28px rgba(45, 212, 168, 0.28);
}
.fab--consult:active { transform: translateY(0) scale(0.97); animation: none; }

.fab--consult .fab-label {
  font-family: var(--font-persian, 'Vazirmatn', sans-serif);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: inherit;
}

/* Light mode */
[data-theme="light"] .fab--consult {
  background: #ffffff;
  color: #1a9e7a;
  border: 1px solid rgba(26, 158, 122, 0.55);
  box-shadow:
    0 8px 24px rgba(10, 10, 16, 0.12),
    0 0 0 1px rgba(45, 212, 168, 0.12),
    0 0 18px rgba(45, 212, 168, 0.14);
  animation: none;
}
[data-theme="light"] .fab--consult:hover {
  animation: none;
  transform: translateY(-3px) scale(1.03);
  border-color: #1a9e7a;
  box-shadow:
    0 14px 36px rgba(10, 10, 16, 0.16),
    0 0 0 1px rgba(45, 212, 168, 0.22),
    0 0 24px rgba(45, 212, 168, 0.2);
}

@media (max-width: 768px) {
  .fab--top { bottom: calc(70px + env(safe-area-inset-bottom, 0px)); left: 14px; width: 40px; height: 40px; font-size: 1rem; }
  .fab--consult {
    bottom: calc(70px + env(safe-area-inset-bottom, 0px));
    right: 14px;
    width: 48px; height: 48px;
    padding: 0;
    gap: 0;
    font-size: 1.15rem;
  }
  .fab--consult .fab-label { display: none; }
}

/* Legacy wrapper — keep for pages that still use it */
.fab-group {
  display: contents;
}

/* ════════════════════ FOOTER ════════════════════ */
/* ═══════════════ PWA INSTALL BANNER ═══════════════ */
.pwa-banner {
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .pwa-banner {
  background: linear-gradient(135deg, rgba(12,22,42,0.95), rgba(6,13,26,0.98));
  border-bottom: 1px solid rgba(212,175,55,0.08);
}
[data-theme="light"] .pwa-banner {
  background: linear-gradient(135deg, #edf0f4, #e4e7ec);
  border-bottom: 1px solid var(--line);
}
.pwa-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-glow), transparent 60%);
  pointer-events: none;
}
.pwa-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0;
  position: relative;
}
.pwa-banner__content {
  display: flex;
  align-items: center;
  gap: 14px;
}
.pwa-banner__icon {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--accent-glow);
  border: 1px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--accent);
  flex-shrink: 0;
}
.pwa-banner__pulse {
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 2px solid var(--accent);
  opacity: 0;
  animation: pwa-pulse 2.5s ease-out infinite;
}
@keyframes pwa-pulse {
  0% { opacity: 0.6; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.25); }
}
.pwa-banner__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pwa-banner__text strong {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text);
}
.pwa-banner__text span {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.5;
}
.pwa-banner__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.pwa-banner__btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: var(--radius-xl);
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  background: var(--gold-metallic);
  color: #0d1b2a;
  box-shadow: var(--shadow-gold);
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s;
  white-space: nowrap;
}
.pwa-banner__btn:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 8px 32px rgba(212, 175, 55, 0.35);
}
.pwa-banner__btn:active { transform: scale(0.98); }

/* ═══════════════════ FOOTER ═══════════════════ */
.ft {
  position: relative;
  margin-top: 0;
  overflow: hidden;
}
[data-theme="dark"] .ft {
  background: linear-gradient(180deg, #060d1a 0%, #040a14 100%);
  color: rgba(255, 255, 255, 0.7);
  border-top: 1px solid rgba(212, 175, 55, 0.08);
}
[data-theme="light"] .ft {
  background: linear-gradient(180deg, #f0f2f5 0%, #e8ebef 100%);
  color: var(--text-muted);
  border-top: 1px solid var(--line);
}

.ft__glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 240px;
  border-radius: 50%;
  pointer-events: none;
}
[data-theme="dark"] .ft__glow {
  background: radial-gradient(ellipse, rgba(212,175,55,0.06) 0%, transparent 70%);
}
[data-theme="light"] .ft__glow {
  background: radial-gradient(ellipse, rgba(212,175,55,0.08) 0%, transparent 70%);
}

/* Grid */
.ft__grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1.2fr;
  gap: 56px;
  padding-top: 56px;
  padding-bottom: 44px;
  position: relative;
}

/* Brand */
.ft__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  transition: opacity 0.2s;
  text-decoration: none;
}
.ft__logo .site-logo {
  height: 40px;
  max-width: 168px;
}
.ft__logo:hover { opacity: 0.85; }

.ft__desc {
  font-size: var(--text-sm);
  line-height: 1.85;
  margin-bottom: 20px;
  max-width: 300px;
}
[data-theme="dark"] .ft__desc { color: rgba(255,255,255,0.5); }
[data-theme="light"] .ft__desc { color: var(--text-muted); }

.ft__socials {
  display: flex;
  gap: 8px;
}
.ft__socials a {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.25s var(--ease-out);
}
[data-theme="dark"] .ft__socials a {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.4);
}
[data-theme="dark"] .ft__socials a:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(212,175,55,0.15);
}
[data-theme="light"] .ft__socials a {
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--text-light);
  box-shadow: var(--shadow-sm);
}
[data-theme="light"] .ft__socials a:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Column headings */
.ft__heading {
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
[data-theme="dark"] .ft__heading {
  color: rgba(255,255,255,0.88);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
[data-theme="light"] .ft__heading {
  color: var(--text);
  border-bottom: 1px solid var(--line);
}
.ft__chevron {
  font-size: 0.7rem;
  transition: transform 0.3s var(--ease-out);
  display: none;
}

/* Links */
.ft__links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ft__links li {
  line-height: 1.4;
}
.ft__links a {
  font-size: 0.835rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  position: relative;
  padding: 2px 0;
}
[data-theme="dark"] .ft__links a { color: rgba(255,255,255,0.5); }
[data-theme="light"] .ft__links a { color: var(--text-muted); }
.ft__links a::before {
  content: '';
  width: 0;
  height: 1px;
  position: absolute;
  bottom: -1px;
  right: 0;
  background: var(--accent);
  transition: width 0.3s var(--ease-out);
}
.ft__links a:hover::before { width: 100%; }
[data-theme="dark"] .ft__links a:hover { color: var(--accent-shine); padding-right: 4px; }
[data-theme="light"] .ft__links a:hover { color: var(--accent-dark); padding-right: 4px; }

/* Contact */
.ft__contact {
  margin-top: 18px;
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--line-soft);
}
.ft__contact a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  transition: color 0.2s;
}
[data-theme="dark"] .ft__contact a { color: rgba(255,255,255,0.5); }
[data-theme="light"] .ft__contact a { color: var(--text-muted); }
.ft__contact a:hover { color: var(--accent); }
.ft__contact i { color: var(--accent); font-size: 0.85rem; }

/* Divider */
.ft__divider {
  height: 1px;
  margin-bottom: 28px;
}
[data-theme="dark"] .ft__divider {
  background: linear-gradient(90deg, transparent, rgba(212,175,55,0.12) 50%, transparent);
}
[data-theme="light"] .ft__divider {
  background: linear-gradient(90deg, transparent, var(--line) 50%, transparent);
}

/* Trust badges */
.ft__badges-wrap { padding-bottom: 36px; }
.ft__badges {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.ft__badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 24px;
  border-radius: var(--radius-lg);
  text-decoration: none;
  font-size: var(--text-xs);
  font-weight: 600;
  min-width: 110px;
  transition: all 0.3s var(--ease-out);
}
[data-theme="dark"] .ft__badge {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.45);
}
[data-theme="dark"] .ft__badge:hover {
  background: rgba(212,175,55,0.06);
  border-color: rgba(212,175,55,0.2);
  color: var(--accent-shine);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(212,175,55,0.1);
}
[data-theme="light"] .ft__badge {
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
}
[data-theme="light"] .ft__badge:hover {
  background: var(--bg-card);
  border-color: var(--accent);
  color: var(--accent-dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(201,162,39,0.12);
}

.ft__badge-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}
[data-theme="dark"] .ft__badge-icon {
  background: rgba(212,175,55,0.08);
  color: var(--accent);
}
[data-theme="light"] .ft__badge-icon {
  background: rgba(201,162,39,0.08);
  color: var(--accent-dark);
}

/* Bottom bar */
.ft__bottom {
  padding: 16px 0;
}
[data-theme="dark"] .ft__bottom {
  border-top: 1px solid rgba(255,255,255,0.04);
  background: rgba(0,0,0,0.2);
}
[data-theme="light"] .ft__bottom {
  border-top: 1px solid var(--line);
  background: rgba(0,0,0,0.02);
}
.ft__bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: var(--text-xs);
}
[data-theme="dark"] .ft__copy { color: rgba(255,255,255,0.28); }
[data-theme="light"] .ft__copy { color: var(--text-light); }

.ft__payments {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xs);
}
[data-theme="dark"] .ft__payments { color: rgba(255,255,255,0.28); }
[data-theme="light"] .ft__payments { color: var(--text-light); }

.ft__pay-icon {
  width: 40px;
  height: 26px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}
[data-theme="dark"] .ft__pay-icon {
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.3);
  border: 1px solid rgba(255,255,255,0.06);
}
[data-theme="light"] .ft__pay-icon {
  background: var(--bg-card);
  color: var(--text-light);
  border: 1px solid var(--line);
}

/* Minimal footer variant (checkout) */
.ft--minimal { margin-top: 40px; }
.ft--minimal .ft__bottom { border-top: none; }

/* ════════════════════ RESPONSIVE ════════════════════ */
@media (max-width: 1024px) {
  .header-search-wrap { max-width: 400px; }
  .profile-name { display: none; }
  .ft__grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .ft__brand { grid-column: 1 / -1; }
  .ft__badges { gap: 14px; }
}

@media (max-width: 768px) {
  .section { padding: 56px 0; }
  .header-nav { display: none; }
  .mobile-menu-btn { display: flex; }
  .search-cat-select { display: none; }
  /* clip horizontal bleed without creating a scrollport that hides dropdowns */
  .header { overflow-x: clip; overflow-y: visible; }

  /* Two-row header: logo+actions top, search below */
  .header-main {
    flex-wrap: wrap;
    padding-top: 3px;
    padding-bottom: 0;
    gap: 8px;
    align-items: center;
  }
  .header-logo { flex: 1; order: 1; min-width: 0; }
  .header-actions { order: 2; gap: 4px; flex-shrink: 0; }
  .header-search-wrap {
    order: 3;
    flex-basis: 100%;
    max-width: none;
    padding-bottom: 10px;
  }
  .header-search { max-width: none; border-radius: 10px; }
  .profile-btn { display: none; }
  .action-btn, .theme-toggle { width: 44px; height: 44px; font-size: 1.15rem; }
  .mobile-menu-btn { width: 44px; height: 44px; }
  .action-btn--cart {
    background: var(--accent-glow);
    border: 1.5px solid var(--accent);
    color: var(--accent-dark);
  }
  [data-theme="dark"] .action-btn--cart {
    background: rgba(212,175,55,0.12);
    border-color: rgba(212,175,55,0.4);
    color: var(--accent);
  }
  .announce-bar { font-size: 0.74rem; }

  /* Footer */
  .ft__grid { grid-template-columns: 1fr; gap: 0; padding-top: 40px; padding-bottom: 20px; }
  .ft__brand { margin-bottom: 8px; padding-bottom: 20px; border-bottom: 1px solid var(--line-soft); }
  .ft__desc { max-width: none; }
  .ft__chevron { display: block; }
  .ft__heading { cursor: pointer; margin-bottom: 0; padding: 15px 0; border-bottom: none; user-select: none; font-size: 0.9rem; }
  .ft__col { border-bottom: 1px solid var(--line-soft); }
  .ft__links { max-height: 0; overflow: hidden; transition: max-height 0.35s var(--ease-out), padding 0.35s; padding: 0; }
  .ft__col.is-open .ft__links { max-height: 300px; padding-bottom: 14px; }
  .ft__col.is-open .ft__chevron { transform: rotate(180deg); }
  .ft__contact { padding: 0; max-height: 0; overflow: hidden; transition: max-height 0.35s var(--ease-out), padding 0.35s, margin 0.35s; margin-top: 0; border-top: none; }
  .ft__col.is-open .ft__contact { max-height: 120px; margin-top: 8px; padding-bottom: 14px; }
  .ft__badges-wrap { padding-bottom: 28px; }
  .ft__divider { margin-bottom: 20px; }
  .ft__badges { gap: 10px; }
  .ft__badge { min-width: 75px; padding: 14px 12px; }
  .ft__badge-icon { width: 38px; height: 38px; font-size: 1.15rem; }
  .pwa-banner__inner { flex-direction: column; text-align: center; gap: 16px; padding: 28px 16px; }
  .pwa-banner__content { flex-direction: column; gap: 10px; }
  .pwa-banner__actions { width: 100%; justify-content: center; padding-top: 4px; }
  .pwa-banner__icon { width: 38px; height: 38px; font-size: 1.05rem; }
  .pwa-banner__btn { padding: 10px 20px; font-size: 0.8rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .logo-tagline { display: none; }
  .header-logo .site-logo { height: 28px; max-width: 118px; }
  .header-main { gap: 6px; }
  .header-search-wrap { padding-bottom: 8px; }
  .header-search { padding: 0 6px 0 12px; }
  .search-input { padding: 9px 6px; font-size: 16px; }
  .action-btn, .theme-toggle { width: 44px; height: 44px; font-size: 1.1rem; }
  .mobile-menu-btn { width: 44px; height: 44px; font-size: 1.25rem; }
  .ft__grid { padding-top: 32px; }
  .ft__bottom-inner { flex-direction: column; text-align: center; gap: 8px; }
  .ft__badges { gap: 8px; }
  .ft__badge { min-width: 68px; padding: 12px 8px; font-size: 0.68rem; }
  .ft__badge-icon { width: 34px; height: 34px; font-size: 1.05rem; }
}

@media (max-width: 360px) {
  .container { padding: 0 12px; }
  .header-logo .site-logo { height: 24px; max-width: 100px; }
  .header-main { gap: 4px; padding-top: 3px; }
  .header-search-wrap { padding-bottom: 6px; }
  .search-input { padding: 8px 4px; font-size: 0.82rem; }
  .action-btn, .theme-toggle, .mobile-menu-btn { width: 44px; height: 44px; font-size: 1.1rem; }
  .announce-bar { height: 30px; font-size: 0.68rem; }
}

/* ════════════════════ CART SIDEBAR ════════════════════ */
.cart-sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-slow) var(--ease-out),
              visibility var(--duration-slow);
}
.cart-sidebar-overlay.open {
  opacity: 1;
  visibility: visible;
}

body.fm-cart-open .mob-nav {
  visibility: hidden;
  pointer-events: none;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 420px;
  max-width: 92vw;
  z-index: var(--z-modal);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform var(--duration-slow) var(--ease-out);
  /* Glass effect */
  background: var(--glass-2);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-left: 1px solid var(--line-soft);
  box-shadow: 8px 0 40px rgba(0, 0, 0, 0.15);
}
[data-theme="dark"] .cart-sidebar {
  background: rgba(11, 21, 39, 0.85);
  border-left-color: var(--line);
  box-shadow: 8px 0 60px rgba(0, 0, 0, 0.5);
}
.cart-sidebar.open {
  transform: translateX(0);
}

/* ── Header ── */
.cart-sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line-soft);
  flex-shrink: 0;
}
.cart-sidebar__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text);
}
.cart-sidebar__title i {
  font-size: 1.25rem;
  color: var(--accent);
}
.cart-sidebar__count {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  background: var(--accent-glow);
  border: 1px solid var(--line-soft);
  padding: 2px 10px;
  border-radius: var(--radius-full);
}
.cart-sidebar__close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  transition: all var(--duration-fast);
  font-size: 1rem;
}
.cart-sidebar__close:hover {
  background: var(--accent-glow);
  border-color: var(--line-soft);
  color: var(--accent);
}

/* ── Body / Scrollable ── */
.cart-sidebar__body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-soft) transparent;
}
.cart-sidebar__body::-webkit-scrollbar {
  width: 5px;
}
.cart-sidebar__body::-webkit-scrollbar-track {
  background: transparent;
}
.cart-sidebar__body::-webkit-scrollbar-thumb {
  background: var(--line-soft);
  border-radius: 10px;
}

/* ── Cart Item ── */
.cart-sidebar__item {
  display: flex;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--glass);
  border: 1px solid var(--line-soft);
  margin-bottom: 12px;
  transition: border-color var(--duration-fast),
              box-shadow var(--duration-fast);
  position: relative;
}
.cart-sidebar__item:hover {
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .cart-sidebar__item {
  background: rgba(255, 255, 255, 0.04);
}
[data-theme="dark"] .cart-sidebar__item:hover {
  background: rgba(255, 255, 255, 0.07);
}

.cart-sidebar__item-img {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-alt);
  border: 1px solid var(--line-soft);
}
.cart-sidebar__item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-sidebar__item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cart-sidebar__item-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}
.cart-sidebar__item-variant {
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.cart-sidebar__item-price-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}
.cart-sidebar__item-price {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--accent);
}
.cart-sidebar__item-orig {
  font-size: var(--text-xs);
  color: var(--text-3);
  text-decoration: line-through;
}

/* ── Item Actions ── */
.cart-sidebar__item-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.cart-sidebar__qty {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  border: 1px solid var(--line-soft);
  overflow: hidden;
}
[data-theme="dark"] .cart-sidebar__qty {
  background: rgba(255, 255, 255, 0.06);
}
.cart-sidebar__qty-btn {
  width: 28px;
  height: 28px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: all var(--duration-fast);
}
.cart-sidebar__qty-btn:hover {
  color: var(--accent);
  background: var(--accent-glow);
}
.cart-sidebar__qty-val {
  min-width: 24px;
  text-align: center;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text);
}
.cart-sidebar__remove {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-3);
  font-size: 0.8rem;
  transition: all var(--duration-fast);
}
.cart-sidebar__remove:hover {
  color: var(--color-error);
  background: rgba(239, 68, 68, 0.1);
}

/* ── Remove animation ── */
.cart-sidebar__item.removing {
  animation: cartItemRemove 0.35s var(--ease-out) forwards;
}
@keyframes cartItemRemove {
  to {
    opacity: 0;
    transform: translateX(-40px) scale(0.95);
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
    overflow: hidden;
  }
}

/* ── Empty state ── */
.cart-sidebar__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  padding: 60px 20px;
  color: var(--text-muted);
}
.cart-sidebar__empty[hidden] {
  display: none;
}
.cart-sidebar__empty i {
  font-size: 3rem;
  color: var(--text-3);
  opacity: 0.5;
}
.cart-sidebar__empty p {
  font-size: var(--text-base);
  font-weight: 500;
}

/* ── Footer ── */
.cart-sidebar__footer {
  flex-shrink: 0;
  padding: 20px 24px;
  border-top: 1px solid var(--line-soft);
  background: var(--glass);
}
[data-theme="dark"] .cart-sidebar__footer {
  background: rgba(11, 21, 39, 0.6);
}

.cart-sidebar__shipping {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.15);
  color: var(--color-success);
  font-size: var(--text-xs);
  font-weight: 500;
  margin-bottom: 16px;
}
.cart-sidebar__shipping i {
  font-size: 1rem;
  flex-shrink: 0;
}

.cart-sidebar__summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.cart-sidebar__summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-sm);
  color: var(--text-2);
}
.cart-sidebar__total {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--text);
}
.cart-sidebar__summary-row--savings {
  color: var(--color-success);
  font-weight: 600;
}
.cart-sidebar__savings {
  font-weight: 700;
  font-size: var(--text-sm) !important;
}

.cart-sidebar__checkout {
  margin-bottom: 12px;
  padding: 14px 24px;
  font-size: var(--text-base);
  font-weight: 700;
  border-radius: var(--radius-lg);
}

.cart-sidebar__view-full {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px;
  border-radius: var(--radius-md);
  transition: all var(--duration-fast);
}
.cart-sidebar__view-full:hover {
  color: var(--accent);
  background: var(--accent-glow);
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .cart-sidebar {
    width: 100%;
    max-width: 100vw;
    border-left: none;
  }
  .cart-sidebar__header {
    padding: 16px 16px;
  }
  .cart-sidebar__body {
    padding: 12px 14px;
  }
  .cart-sidebar__item {
    padding: 12px;
    gap: 10px;
  }
  .cart-sidebar__item-img {
    width: 60px;
    height: 60px;
  }
  .cart-sidebar__footer {
    padding: 16px;
  }
  .cart-sidebar__checkout {
    padding: 12px 20px;
    font-size: var(--text-sm);
  }
}

/* ══════════════════════════════════════════
   SEO TEXT BOX — shared listing pages
   ══════════════════════════════════════════ */
.seo-box {
  margin-top: 56px;
  position: relative;
}
.seo-box__inner {
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 20px;
  padding: 36px 40px 40px;
  position: relative;
  overflow: hidden;
}
.seo-box__inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(201,168,76,0.04) 0%, transparent 55%);
  pointer-events: none;
}
.seo-box__title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  gap: 10px;
}
.seo-box__title i {
  color: var(--accent);
  font-size: 1.1em;
}
.seo-box__body {
  max-height: 200px;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.4,0,0.2,1);
  position: relative;
}
.seo-box__body.is-open {
  max-height: 4000px;
}
.seo-box__body p {
  font-size: var(--text-sm);
  line-height: 2;
  color: var(--text-secondary);
  margin-bottom: 14px;
}
.seo-box__body p:last-child {
  margin-bottom: 0;
}
.seo-box__body h3 {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  margin: 20px 0 10px;
}
.seo-box__fade {
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  height: 100px;
  background: linear-gradient(to bottom, transparent, var(--surface-glass, rgba(13,27,42,0.98)));
  pointer-events: none;
  transition: opacity 0.3s;
}
.seo-box__body.is-open ~ .seo-box__fade {
  opacity: 0;
  pointer-events: none;
}
.seo-box__toggle-wrap {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}
.seo-box__toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 28px;
  background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 50px;
  color: var(--accent);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  font-family: Vazirmatn, sans-serif;
}
.seo-box__toggle:hover {
  background: rgba(201,168,76,0.18);
  border-color: rgba(201,168,76,0.4);
  transform: translateY(-1px);
}
.seo-box__toggle i {
  transition: transform 0.35s;
  font-size: 1em;
}
.seo-box__toggle.is-open i {
  transform: rotate(180deg);
}

/* light mode */
[data-theme="light"] .seo-box__inner {
  background: rgba(255,255,255,0.85);
  border-color: rgba(0,0,0,0.08);
}
[data-theme="light"] .seo-box__fade {
  background: linear-gradient(to bottom, transparent, #f8f9fa);
}
[data-theme="light"] .seo-box__title {
  border-bottom-color: rgba(0,0,0,0.08);
}

@media (max-width: 768px) {
  .seo-box__inner {
    padding: 24px 20px 28px;
  }
  .seo-box__title {
    font-size: var(--text-lg);
  }
}
