/* ═══════════════════════════════════════════════════
   نیارا گلد — cinematic gold & jewelry storefront
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Vazirmatn:wght@300;400;500;600;700&display=swap');

:root {
  --bg: #faf7f1;
  --bg-elevated: #ffffff;
  --bg-soft: #f1ebe0;
  --text: #1c1814;
  --text-muted: #6e6256;
  --gold: #b8922a;
  --gold-bright: #d4af37;
  --gold-deep: #8a6a14;
  --gold-glow: rgba(184, 146, 42, 0.28);
  --line: rgba(28, 24, 20, 0.10);
  --danger: #b33a3a;
  --success: #2f6b4f;
  --radius: 10px;
  --nav-h: 88px;
  --topbar-h: 40px;
  --header-stack: calc(var(--topbar-h) + var(--nav-h));
  --font-display: 'Cormorant Garamond', 'Vazirmatn', serif;
  --font-body: 'Vazirmatn', sans-serif;
  --shadow: 0 18px 50px rgba(60, 45, 20, 0.08);
  --hero-overlay: linear-gradient(115deg, rgba(250,247,241,0.96) 0%, rgba(250,247,241,0.72) 42%, rgba(250,247,241,0.18) 100%);
}

[data-theme="dark"] {
  --bg: #0f1729;
  --bg-elevated: #172033;
  --bg-soft: #1c2740;
  --text: #e8eef8;
  --text-muted: #9aabc4;
  --gold: #d4af37;
  --gold-bright: #f0d78c;
  --gold-deep: #c9a227;
  --gold-glow: rgba(212, 175, 55, 0.32);
  --line: rgba(210, 224, 245, 0.12);
  --shadow: 0 24px 70px rgba(5, 12, 28, 0.55);
  --hero-overlay: linear-gradient(120deg, rgba(15,23,41,0.94) 0%, rgba(15,23,41,0.62) 45%, rgba(15,23,41,0.22) 100%);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.7;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse 80% 50% at 8% -8%, var(--gold-glow), transparent 55%),
    radial-gradient(ellipse 55% 40% at 100% 0%, rgba(138, 106, 20, 0.08), transparent 52%);
  transition: background-color .35s ease, color .25s ease;
}
[data-theme="dark"] body {
  background-image:
    radial-gradient(ellipse 70% 45% at 12% -10%, rgba(59, 110, 180, 0.22), transparent 55%),
    radial-gradient(ellipse 50% 35% at 100% 5%, rgba(212, 175, 55, 0.12), transparent 50%);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }

.container {
  width: min(1180px, calc(100% - 2.5rem));
  margin-inline: auto;
}

/* ─── Typography ─── */
.display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}

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

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border: 1px solid transparent;
  background: var(--gold);
  color: #1a1410;
  cursor: pointer;
  transition: transform .35s ease, background .35s ease, box-shadow .35s ease;
  font-weight: 600;
  border-radius: var(--radius);
}
.btn:hover {
  background: var(--gold-bright);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px var(--gold-glow);
}
.btn-outline {
  background: transparent;
  border-color: var(--gold);
  color: var(--gold);
}
.btn-outline:hover {
  background: var(--gold);
  color: #1a1410;
}
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.85rem; }

/* ─── Gold price top bar ─── */
.gold-topbar {
  position: sticky;
  top: 0;
  z-index: 110;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  background: #9ca3af;
  color: #b91c1c;
  border-bottom: 1px solid #8790a0;
  font-size: 0.85rem;
}
.gold-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  width: 100%;
  text-align: center;
}
.gold-topbar-label {
  color: #7f1d1d;
  letter-spacing: 0.02em;
}
.gold-topbar-price {
  color: #dc2626;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
}
.gold-topbar-unit {
  color: #991b1b;
  font-size: 0.78rem;
}

/* ─── Nav ─── */
.site-header {
  position: sticky;
  top: var(--topbar-h);
  z-index: 100;
  height: var(--nav-h);
  /* blur روی ::before — نه خود هدر؛ وگرنه fixed/drawer به هدر قفل و کلیپ می‌شود */
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--line);
  overflow: visible;
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
}
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 0;
}
.brand-logo {
  height: 52px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  display: block;
}
.brand-logo-light { display: none; }
html[data-theme="dark"] .brand-logo-dark { display: none; }
html[data-theme="dark"] .brand-logo-light { display: block; }
.footer-brand {
  display: inline-flex;
  align-items: center;
  margin-bottom: .6rem;
}
.footer-logo {
  height: 44px;
  max-width: 180px;
}
.dash-topbar-brand .brand-logo {
  height: 32px;
  max-width: 140px;
}
.dash-brand .brand-logo {
  height: 40px;
  max-width: 160px;
  margin-bottom: .4rem;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--gold-bright), var(--gold-deep));
  box-shadow: 0 0 20px var(--gold-glow);
  position: relative;
  animation: brandPulse 4s ease-in-out infinite;
}
.brand-mark::after {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: 50%;
}
@keyframes brandPulse {
  0%, 100% { box-shadow: 0 0 16px var(--gold-glow); }
  50% { box-shadow: 0 0 28px var(--gold-glow), 0 0 48px rgba(201,162,39,0.2); }
}

.nav-links {
  display: flex;
  gap: 1.1rem;
  align-items: center;
  font-size: 0.92rem;
}
.nav-links > a,
.nav-item > .nav-parent {
  position: relative;
  color: var(--text-muted);
  transition: color .25s;
}
.nav-links > a:hover,
.nav-links > a.active,
.nav-item > .nav-parent:hover { color: var(--gold); }
.nav-links > a::after,
.nav-item > .nav-parent::after {
  content: '';
  position: absolute;
  right: 0; left: 0; bottom: -6px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform .3s ease;
}
.nav-links > a:hover::after,
.nav-links > a.active::after,
.nav-item:hover > .nav-parent::after { transform: scaleX(1); }

.nav-item {
  position: relative;
}
.nav-item > .nav-parent {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}
.mega-menu {
  display: none;
  position: absolute;
  top: calc(100% + 2px);
  right: 50%;
  transform: translateX(50%);
  min-width: 520px;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1.1rem 1.2rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 10px;
  z-index: 200;
}
.mega-menu::before {
  content: '';
  position: absolute;
  top: -14px;
  right: 0;
  left: 0;
  height: 14px;
}
.nav-item:hover .mega-menu,
.nav-item:focus-within .mega-menu {
  display: grid;
}
.mega-col {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.mega-col strong {
  font-size: .78rem;
  color: var(--gold-deep);
  margin-bottom: .2rem;
}
.mega-col a {
  color: var(--text-muted);
  font-size: .88rem;
  padding: .2rem 0;
}
.mega-col a:hover { color: var(--gold); }
.icon-btn.compare-eq {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-decoration: none;
}
.footer-credit a {
  color: var(--gold-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pay-mode-card {
  display: flex;
  gap: .55rem;
  align-items: flex-start;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  padding: .65rem .85rem;
  border-radius: 8px;
  cursor: pointer;
  min-width: 150px;
}
.pay-mode-card:has(input:checked) {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}
.pay-mode-card strong { color: var(--text); font-size: .92rem; }
.deposit-story {
  background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 12%, var(--bg)), var(--bg-soft));
  border-block: 1px solid var(--line);
}
.deposit-story-inner { padding-block: .5rem; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.icon-btn {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
  transition: border-color .25s, transform .25s, background .25s;
  color: var(--text);
  padding: 0;
}
.icon-btn:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
  color: var(--gold);
}
.icon-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-btn .icon-moon {
  fill: currentColor;
  stroke: none;
}
.icon-btn .icon-sun circle {
  fill: currentColor;
  stroke: none;
}
.icon-btn .icon-sun,
.icon-btn .icon-moon {
  position: absolute;
}
[data-theme="light"] .icon-btn .icon-sun { display: none; }
[data-theme="light"] .icon-btn .icon-moon { display: block; }
[data-theme="dark"] .icon-btn .icon-sun { display: block; }
[data-theme="dark"] .icon-btn .icon-moon { display: none; }
.badge-count {
  position: absolute;
  top: -4px;
  left: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--gold);
  color: #1a1410;
  font-size: 0.65rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.mobile-toggle { display: none; }
.nav-drawer-head { display: none; }
.nav-mobile-extras { display: none; }

/* ─── Hero ─── */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-stack));
  display: grid;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(145deg, #fff9ef 0%, #f7f0e3 48%, #efe4d0 100%);
  color: var(--text);
  --hero-muted: var(--text-muted);
  --hero-overlay-dark: linear-gradient(120deg, rgba(15,23,41,0.92) 0%, rgba(15,23,41,0.58) 45%, rgba(15,23,41,0.2) 100%);
}
.hero .eyebrow { color: var(--gold-deep); }
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    var(--hero-overlay),
    radial-gradient(circle at 78% 38%, rgba(212,175,55,0.28), transparent 42%),
    radial-gradient(circle at 12% 80%, rgba(255,255,255,0.7), transparent 40%),
    linear-gradient(160deg, #fffaf2, #f0e6d4);
  z-index: 0;
}
.hero-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-bg.hero-bg-dim {
  background: linear-gradient(115deg, rgba(250,247,241,0.82) 0%, rgba(250,247,241,0.35) 50%, rgba(250,247,241,0.12) 100%);
  z-index: 1;
}
.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
  padding-block: 3rem;
}
.hero-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  margin: 0.4rem 0 1rem;
  background: linear-gradient(120deg, #2a2118 10%, #8a6a14 48%, #c9a227 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: titleReveal 1.4s ease both;
}
.hero-copy p {
  max-width: 34rem;
  color: var(--hero-muted);
  font-size: 1.08rem;
  animation: fadeUp 1s .25s ease both;
}
.hero-ctas {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 1.8rem;
  animation: fadeUp 1s .4s ease both;
}
.hero .btn {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  color: #fffaf2;
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(138, 106, 20, 0.22);
}
.hero .btn-outline {
  background: rgba(255,255,255,0.55);
  color: var(--gold-deep);
  border: 1px solid rgba(138, 106, 20, 0.35);
  backdrop-filter: blur(8px);
}
.hero .btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold-deep);
  background: #fff;
}
.hero .story-ring-label,
.hero .stories-under-title { color: var(--text); }

/* Dark theme: navy blue hero */
[data-theme="dark"] .hero {
  background: #0f1729;
  color: #e8eef8;
  --hero-muted: #9aabc4;
}
[data-theme="dark"] .hero .eyebrow { color: #f0d78c; }
[data-theme="dark"] .hero-bg {
  background:
    var(--hero-overlay-dark),
    radial-gradient(circle at 70% 40%, rgba(212,175,55,0.2), transparent 45%),
    radial-gradient(circle at 20% 70%, rgba(56, 110, 190, 0.25), transparent 48%),
    linear-gradient(160deg, #1a2744, #0f1729);
}
[data-theme="dark"] .hero-bg.hero-bg-dim {
  background: var(--hero-overlay-dark);
}
[data-theme="dark"] .hero-copy h1 {
  background: linear-gradient(120deg, #e8eef8 15%, #f0d78c 55%, #d4af37 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
[data-theme="dark"] .hero .btn {
  background: linear-gradient(135deg, #d4af37, #a67c00);
  color: #0f1729;
}
[data-theme="dark"] .hero .btn-outline {
  background: transparent;
  color: #e8eef8;
  border: 1px solid rgba(232, 238, 248, 0.32);
}
[data-theme="dark"] .hero .btn-outline:hover {
  border-color: #d4af37;
  color: #f0d78c;
}
[data-theme="dark"] .hero .story-ring-label,
[data-theme="dark"] .hero .stories-under-title { color: #e8eef8; }

/* Hero product showcase */
.hero-showcase {
  position: relative;
  height: min(560px, 78vw);
  display: grid;
  place-items: center;
  animation: fadeUp 1.1s .15s ease both;
  isolation: isolate;
}
.hero-glow {
  position: absolute;
  width: 72%;
  height: 42%;
  bottom: 8%;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  z-index: 0;
  filter: blur(28px);
  animation: glowPulse 4.5s ease-in-out infinite;
  pointer-events: none;
  display: block;
  background: radial-gradient(ellipse at center,
    rgba(255, 220, 120, 0.75) 0%,
    rgba(212, 175, 55, 0.45) 35%,
    rgba(201, 162, 39, 0.12) 65%,
    transparent 78%);
  opacity: 1;
}
.hero-orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, #d4af37 30%, transparent);
  pointer-events: none;
  z-index: 1;
}
.hero-orbit-a {
  width: 86%;
  height: 86%;
  animation: orbitSpin 26s linear infinite;
}
.hero-orbit-b {
  width: 68%;
  height: 68%;
  border-style: dashed;
  opacity: 0.55;
  animation: orbitSpin 18s linear infinite reverse;
}
.hero-orbit-a::before,
.hero-orbit-b::before {
  content: '';
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f0d78c;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 14px #d4af37;
}
.hero-stage {
  position: relative;
  width: min(420px, 82%);
  aspect-ratio: 1;
  z-index: 2;
  perspective: 1400px;
}
.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.82) rotateY(-28deg) translateY(18px);
  filter: blur(8px) brightness(0.7);
  transition:
    opacity 1.1s cubic-bezier(.22,.7,.2,1),
    transform 1.2s cubic-bezier(.22,.7,.2,1),
    filter 1.1s ease;
  pointer-events: none;
}
.hero-slide.is-active {
  opacity: 1;
  transform: scale(1) rotateY(0deg) translateY(0);
  filter: blur(0) brightness(1);
  pointer-events: auto;
}
.hero-slide.is-active img {
  animation: heroFloat 5.5s ease-in-out infinite;
  filter:
    drop-shadow(0 0 28px rgba(255, 214, 120, 0.35))
    drop-shadow(0 22px 40px rgba(0, 0, 0, 0.55));
}
.hero-slide.is-leaving {
  opacity: 0;
  transform: scale(1.08) rotateY(24deg) translateY(-12px);
  filter: blur(10px) brightness(1.15);
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.hero-dots {
  position: absolute;
  bottom: 0.4rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.45rem;
  z-index: 3;
}
.hero-dots button {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 1px solid #d4af37;
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: width .35s ease, background .35s ease;
}
.hero-dots button.is-active {
  width: 26px;
  background: #d4af37;
}

.hero-mini-stage {
  min-height: 260px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.hero-mini-img {
  width: min(220px, 70%);
  position: relative;
  z-index: 1;
  animation: heroFloat 6s ease-in-out infinite;
}
[data-theme="light"] .hero-mini-img {
  filter: drop-shadow(0 0 18px rgba(212, 175, 55, 0.35));
}
[data-theme="dark"] .hero-mini-img {
  filter: drop-shadow(0 0 22px rgba(255, 214, 120, 0.35));
}
.hero-glow-mini {
  width: 70%;
  height: 40%;
  bottom: 12%;
}

@keyframes glowPulse {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.85; }
  50% { transform: translateX(-50%) scale(1.12); opacity: 1; }
}
@keyframes heroFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-10px) rotate(1.5deg); }
}
@keyframes titleReveal {
  from { opacity: 0; letter-spacing: 0.2em; filter: blur(8px); }
  to { opacity: 1; letter-spacing: 0.02em; filter: blur(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes orbitSpin { to { transform: rotate(360deg); } }

/* ─── Rates ticker ─── */
.rates-section {
  padding: 2.5rem 0 1rem;
}
.rates-board {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.75rem;
}
.rate-tile {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  padding: 1rem 1.1rem;
  position: relative;
  overflow: hidden;
  transition: transform .35s, border-color .35s;
}
.rate-tile::before {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: scaleX(0);
  transition: transform .4s;
}
.rate-tile:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
}
.rate-tile:hover::before { transform: scaleX(1); }
.rate-tile .code {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--gold);
}
.rate-tile .price {
  font-weight: 600;
  font-size: 1.05rem;
  margin-top: 0.35rem;
}
.rate-tile .delta {
  font-size: 0.78rem;
  margin-top: 0.25rem;
}
.delta.up { color: var(--success); }
.delta.down { color: var(--danger); }

/* ─── Sections ─── */
.section {
  padding: 4.5rem 0;
  position: relative;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 2rem;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin: 0.3rem 0 0;
}

.category-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.category-tile {
  position: relative;
  min-height: 220px;
  background: var(--bg-soft) center/cover no-repeat;
  overflow: hidden;
  display: flex;
  align-items: end;
  padding: 1.4rem;
  border: 1px solid var(--line);
  transition: transform .4s ease;
}
.category-tile-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  z-index: 0;
}
.category-tile.has-image .category-tile-overlay {
  background: linear-gradient(180deg, transparent 35%, rgba(20,14,8,.72) 100%);
}
.category-tile:hover { transform: scale(1.015); }
.category-tile .label {
  font-family: var(--font-display);
  font-size: 1.7rem;
  z-index: 1;
  color: var(--text);
}
.category-tile.has-image .label {
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,.35);
}
.category-tile .shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(212,175,55,0.18), transparent 70%);
  transform: translateX(-100%);
  transition: transform .8s ease;
  z-index: 1;
}
.category-tile:hover .shine { transform: translateX(100%); }

/* Products */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

/* Product carousels (homepage sections) */
.product-carousel {
  display: flex;
  align-items: stretch;
  gap: .55rem;
  width: 100%;
  position: relative;
  direction: ltr; /* دکمه‌ها: قبلی چپ، بعدی راست — حرکت پایدار */
}
.product-carousel-viewport {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  touch-action: pan-y;
  direction: ltr;
}
.product-carousel-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem;
  will-change: transform;
  transition: transform .4s cubic-bezier(.22, .7, .2, 1);
  direction: ltr; /* اسکرول/ترنسفورم پایدار */
}
.product-carousel-track .product-card {
  flex: 0 0 auto !important;
  width: 260px !important;
  min-width: 260px !important;
  max-width: 260px !important;
  box-sizing: border-box;
  direction: rtl; /* متن کارت فارسی RTL بماند */
}
.product-carousel-track .carousel-empty {
  padding: 1rem .25rem;
  flex: 0 0 100%;
  direction: rtl;
}
.carousel-btn {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  align-self: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  transition: border-color .2s, color .2s, opacity .2s;
  z-index: 2;
  padding: 0;
}
.carousel-btn:hover:not(:disabled) {
  border-color: var(--gold);
  color: var(--gold);
}
.carousel-btn:disabled {
  opacity: .35;
  cursor: default;
}
.carousel-btn span {
  display: block;
  transform: translateY(-1px);
}
@media (max-width: 980px) {
  .product-carousel {
    margin-inline: 0;
    padding-inline: .15rem;
  }
  .product-carousel-track .product-card {
    width: min(68vw, 240px) !important;
    min-width: min(68vw, 240px) !important;
    max-width: min(68vw, 240px) !important;
  }
  .carousel-btn {
    flex-basis: 38px;
    width: 38px;
    height: 38px;
    font-size: 1.3rem;
  }
}
@media (max-width: 560px) {
  .product-carousel {
    gap: .35rem;
    margin-inline: 0;
  }
  .product-carousel-track {
    gap: .7rem;
  }
  .product-carousel-track .product-card {
    width: min(70vw, 220px) !important;
    min-width: min(70vw, 220px) !important;
    max-width: min(70vw, 220px) !important;
  }
  .product-carousel-track .product-body {
    padding: .75rem .7rem .9rem;
  }
  .product-carousel-track .product-body h3 {
    font-size: .95rem;
    -webkit-line-clamp: 2;
  }
  .product-carousel-track .product-price {
    font-size: .88rem;
  }
}

.product-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform .4s ease, box-shadow .4s ease;
  animation: fadeUp .7s ease both;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.product-card > a {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}
.product-media {
  aspect-ratio: 1;
  background:
    radial-gradient(circle at 50% 40%, rgba(212,175,55,0.18), transparent 60%),
    var(--bg-soft);
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
}
.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s ease;
}
.product-card:hover .product-media img { transform: scale(1.06); }
.product-body {
  padding: 1rem 1.1rem 1.2rem;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}
.product-body h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 0.35rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  min-width: 0;
}
.product-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.product-price {
  margin-top: 0.7rem;
  font-weight: 700;
  color: var(--gold-deep);
  font-size: .95rem;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
[data-theme="dark"] .product-price { color: var(--gold-bright); }

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 0.75rem;
}
.gallery-main {
  aspect-ratio: 1;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  overflow: hidden;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.gallery-thumbs button {
  border: 1px solid var(--line);
  padding: 0;
  background: var(--bg-soft);
  cursor: pointer;
  aspect-ratio: 1;
  overflow: hidden;
}
.gallery-thumbs button.active,
.gallery-thumbs button:hover { border-color: var(--gold); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.price-break {
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  padding: 1.2rem;
  margin: 1.2rem 0;
}
.price-break row, .price-break .row {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 1px dashed var(--line);
}
.price-break .row:last-child {
  border: 0;
  font-weight: 700;
  color: var(--gold);
  font-size: 1.15rem;
  padding-top: 0.8rem;
}

.pdp-price-main {
  margin: 1rem 0 .85rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  color: var(--gold-deep);
  line-height: 1.2;
}
[data-theme="dark"] .pdp-price-main { color: var(--gold-bright); }

.product-specs {
  margin: .5rem 0 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-elevated);
}
.product-specs .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .75rem .95rem;
  border-bottom: 1px solid var(--line);
  font-size: .95rem;
}
.product-specs .row:last-child { border-bottom: 0; }
.product-specs .row span:first-child {
  color: var(--text-muted);
  flex: 1 1 auto;
}
.product-specs .row span:last-child {
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

/* Forms */
.form-grid {
  display: grid;
  gap: 1rem;
}
.form-grid.two { grid-template-columns: 1fr 1fr; }
.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  transition: border-color .25s, box-shadow .25s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

/* Tables */
.table-wrap { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
}
table.data th, table.data td {
  padding: 0.85rem 0.7rem;
  border-bottom: 1px solid var(--line);
  text-align: right;
  font-size: 0.92rem;
}
table.data th { color: var(--text-muted); font-weight: 500; }

/* Messages */
.messages {
  position: fixed;
  top: calc(var(--header-stack) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: grid;
  gap: 0.5rem;
  width: min(480px, calc(100% - 2rem));
}
.flash {
  padding: 0.9rem 1.1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--gold);
  box-shadow: var(--shadow);
  animation: fadeUp .4s ease;
}

/* Footer */
.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--line);
  padding: 3rem 0 2rem;
  background: var(--bg-soft);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  margin-bottom: .6rem;
  color: var(--gold);
}
.footer-bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .6rem 1.5rem;
  align-items: center;
  text-align: center;
}

/* ─── Live chat widget (bottom-left) ─── */
.chat-launcher {
  position: fixed;
  bottom: 1.4rem;
  left: 1.4rem;
  z-index: 300;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  background: radial-gradient(circle at 30% 30%, var(--gold-bright), var(--gold-deep));
  box-shadow: 0 12px 30px var(--gold-glow);
  display: grid;
  place-items: center;
  animation: brandPulse 3s ease-in-out infinite;
}
.chat-launcher svg { width: 26px; height: 26px; fill: #1a1410; }

.chat-panel {
  position: fixed;
  bottom: 5.5rem;
  left: 1.4rem;
  z-index: 300;
  width: min(360px, calc(100vw - 2rem));
  height: 480px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: fadeUp .35s ease;
}
.chat-panel.open { display: flex; }
.chat-header {
  padding: 1rem 1.1rem;
  background: linear-gradient(120deg, var(--gold-deep), var(--gold));
  color: #1a1410;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.chat-bubble {
  max-width: 85%;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
}
.chat-bubble.visitor {
  align-self: flex-start;
  background: var(--bg-soft);
}
.chat-bubble.agent, .chat-bubble.system {
  align-self: flex-end;
  background: color-mix(in srgb, var(--gold) 28%, var(--bg-elevated));
}
.chat-footer {
  padding: 0.75rem;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 0.4rem;
}
.chat-footer input {
  flex: 1;
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 0.7rem;
  border-radius: var(--radius);
}
.chat-step { display: none; }
.chat-step.active { display: block; }

/* Dashboard */
.dash-body {
  overflow-x: hidden;
  min-width: 0;
}
.dash-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  min-width: 0;
}
.dash-side {
  background: var(--bg-soft);
  border-left: 1px solid var(--line);
  padding: 1.5rem 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.dash-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .5rem;
}
.dash-side-close { display: none; }
.dash-nav-hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1rem 0;
}
.dash-side a,
.dash-nav a {
  display: block;
  padding: 0.65rem 0.85rem;
  color: var(--text-muted);
  border-radius: var(--radius);
  margin-bottom: 0.2rem;
}
.dash-side a:hover, .dash-side a.active,
.dash-nav a:hover, .dash-nav a.active {
  background: color-mix(in srgb, var(--gold) 18%, transparent);
  color: var(--gold);
}
.logout-form {
  margin: 0;
  display: inline-flex;
}
.logout-form--nav {
  display: block;
  width: 100%;
}
.logout-form--nav .logout-link,
.dash-nav .logout-form--nav button {
  display: block;
  width: 100%;
  text-align: right;
  padding: 0.65rem 0.85rem;
  color: var(--text-muted);
  border: 0;
  border-radius: var(--radius);
  margin-bottom: 0.2rem;
  background: transparent;
  cursor: pointer;
  font: inherit;
}
.logout-form--nav .logout-link:hover,
.dash-nav .logout-form--nav button:hover {
  background: color-mix(in srgb, var(--gold) 18%, transparent);
  color: var(--gold);
}
.logout-form--drawer {
  width: 100%;
  display: block;
}
.logout-form--drawer .nav-drawer-cta-btn {
  width: 100%;
}
.logout-form--header {
  display: inline-flex;
  align-items: center;
}
.dash-topbar-actions {
  display: none;
}
.dash-main {
  padding: 1.5rem;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}
.dash-main > * { max-width: 100%; }
.dash-main .panel-box,
.dash-main form.panel-box {
  max-width: 100% !important;
  box-sizing: border-box;
}
.dash-main .table-wrap,
.dash-main .panel-box:has(> table.data),
.dash-main form.panel-box:has(> table.data) {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.dash-main table.data {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}
.dash-main canvas {
  max-width: 100% !important;
}
.dash-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: .25rem;
}
.dash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
}
.dash-actions form { margin: 0; }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  padding: 1.2rem;
  min-width: 0;
  border-radius: var(--radius);
}
.stat-card .val {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--gold);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.panel-box {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  padding: 1.4rem;
}

.page-hero {
  padding: 3rem 0 1.5rem;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0.3rem 0;
}

.split-2 {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: start;
}

.status-pill {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Reveal on scroll — همیشه قابل‌مشاهده؛ انیمیشن فقط تقویتی است */
.reveal {
  opacity: 1;
  transform: none;
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: fadeUp .7s ease both;
      animation-timeline: view();
      animation-range: entry 0% entry 35%;
    }
  }
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* Shop layout */
.shop-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  align-items: start;
}
.shop-filters summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--gold);
  list-style: none;
}
.shop-filters summary::-webkit-details-marker { display: none; }
.shop-filters[open] summary { margin-bottom: .25rem; }
.nav-backdrop { display: none; }
.cart-cards { display: none; }
.cart-table-desktop { display: block; }
.cart-timer-box {
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  border-color: var(--gold);
}
.cart-countdown { font-size: 2rem; color: var(--gold); min-width: 5ch; text-align: center; }
.cart-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.cart-total { font-size: 2rem; color: var(--gold); }
.mobile-fluid-title { font-size: clamp(1.6rem, 5vw, 2.4rem); }
.pager {
  display: flex;
  gap: .5rem;
  margin-top: 1.5rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  border: 0;
}
.chat-close {
  border: 0;
  background: rgba(0,0,0,.06);
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}
.dash-topbar { display: none; }
.dash-backdrop { display: none; }
.dash-brand { margin-bottom: 1.5rem; display: flex; }

/* Responsive */
@media (max-width: 980px) {
  :root { --nav-h: 72px; --topbar-h: 38px; }
  .container { width: min(1180px, calc(100% - 1.5rem)); }
  .section { padding: 2.75rem 0; }
  .page-hero { padding: 2rem 0 1rem; }
  .hero {
    min-height: auto;
    padding: 1.5rem 0 2rem;
  }
  .hero-grid, .split-2, .footer-grid, .gallery { grid-template-columns: 1fr; }
  .shop-layout { grid-template-columns: 1fr; }
  .shop-filters { order: 2; }
  .shop-products { order: 1; }
  .rates-board { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: .85rem; }
  .product-grid .product-card {
    min-width: 0;
  }
  .product-body { padding: .8rem .75rem .95rem; }
  .product-body h3 { font-size: .98rem; }
  .product-price { font-size: .88rem; }
  .category-row { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  /* موبایل: همبرگر راست | لوگو وسط | تم+سبد چپ */
  .nav-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: .5rem;
  }
  .mobile-toggle {
    display: grid;
    justify-self: start; /* در RTL = سمت راست */
    grid-column: 1;
    position: relative;
    z-index: 40;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  .brand {
    position: static;
    left: auto;
    transform: none;
    justify-self: center;
    z-index: 1;
    grid-column: 2;
    max-width: min(160px, 42vw);
    pointer-events: auto;
  }
  .nav-actions {
    justify-self: end; /* در RTL = سمت چپ */
    grid-column: 3;
    gap: .4rem;
    position: relative;
    z-index: 30;
  }
  .brand-logo { height: 40px; max-width: 160px; }
  .mega-menu { display: none !important; }
  .desktop-only-action { display: none !important; }

  /* ── Mobile drawer: jewelry panel ── */
  .nav-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    width: min(340px, 92vw);
    max-width: 92vw;
    height: 100vh;
    height: 100dvh;
    z-index: 12000;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0;
    margin: 0;
    padding: 0 0 calc(1.25rem + env(safe-area-inset-bottom));
    border: 0;
    border-left: 1px solid color-mix(in srgb, var(--gold) 35%, var(--line));
    box-shadow: -24px 0 60px rgba(20, 14, 6, .28);
    background:
      radial-gradient(ellipse 90% 45% at 100% 0%, var(--gold-glow), transparent 55%),
      radial-gradient(ellipse 70% 35% at 0% 100%, color-mix(in srgb, var(--gold) 12%, transparent), transparent 60%),
      linear-gradient(165deg, var(--bg-elevated) 0%, var(--bg-soft) 100%);
    transform: translate3d(110%, 0, 0);
    transition: transform .38s cubic-bezier(.22,.7,.2,1), visibility .38s;
    pointer-events: none;
    visibility: hidden;
    grid-column: 1;
    grid-row: 1;
  }
  .nav-links.open {
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
    visibility: visible;
  }

  .nav-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin: 0;
    padding: calc(.95rem + env(safe-area-inset-top)) 1.15rem 1rem;
    border-bottom: 1px solid color-mix(in srgb, var(--gold) 28%, var(--line));
    background: linear-gradient(180deg, color-mix(in srgb, var(--gold) 10%, transparent), transparent);
  }
  .nav-drawer-brand {
    display: flex;
    align-items: center;
    gap: .7rem;
    min-width: 0;
  }
  .nav-drawer-logo {
    height: 36px !important;
    width: auto !important;
    max-width: 96px !important;
    flex: 0 0 auto;
  }
  .nav-drawer-brand-text {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    min-width: 0;
  }
  .nav-drawer-brand-text strong {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: .02em;
    color: var(--text);
  }
  .nav-drawer-brand-text span {
    font-size: .72rem;
    color: var(--gold-deep);
    letter-spacing: .04em;
  }
  [data-theme="dark"] .nav-drawer-brand-text span { color: var(--gold-bright); }

  .nav-drawer-close {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    color: var(--text);
    display: grid;
    place-items: center;
    cursor: pointer;
    padding: 0;
    transition: border-color .25s, background .25s, color .25s, transform .25s;
  }
  .nav-drawer-close svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
  }
  .nav-drawer-close:active {
    transform: scale(.94);
    border-color: var(--gold);
    color: var(--gold);
  }

  .nav-links > a,
  .nav-links > .nav-item > .nav-parent {
    position: relative;
    min-height: 52px;
    display: flex;
    align-items: center;
    margin: 0 .85rem;
    padding: .9rem 1rem;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text);
    border: 0;
    border-radius: 12px;
    background: transparent;
    transition: background .25s, color .25s, transform .25s;
  }
  .nav-links > a::after,
  .nav-links > .nav-item > .nav-parent::after {
    display: none;
  }
  .nav-links > a:active,
  .nav-links > .nav-item > .nav-parent:active {
    background: color-mix(in srgb, var(--gold) 14%, transparent);
    color: var(--gold-deep);
    transform: translateX(-2px);
  }
  [data-theme="dark"] .nav-links > a:active,
  [data-theme="dark"] .nav-links > .nav-item > .nav-parent:active {
    color: var(--gold-bright);
  }
  .nav-links > .nav-item {
    width: auto;
    margin: 0;
  }
  .nav-links > .nav-item > .nav-parent {
    width: calc(100% - 1.7rem);
  }
  .nav-links > a:first-of-type {
    margin-top: .55rem;
  }

  .nav-links.open > a,
  .nav-links.open > .nav-item,
  .nav-links.open .nav-drawer-section,
  .nav-links.open .nav-drawer-cta {
    animation: navDrawerIn .48s cubic-bezier(.22,.7,.2,1) both;
  }
  .nav-links.open > a:nth-of-type(1) { animation-delay: .04s; }
  .nav-links.open > .nav-item { animation-delay: .08s; }
  .nav-links.open > a:nth-of-type(2) { animation-delay: .12s; }
  .nav-links.open > a:nth-of-type(3) { animation-delay: .16s; }
  .nav-links.open > a:nth-of-type(4) { animation-delay: .2s; }
  .nav-links.open > a:nth-of-type(5) { animation-delay: .24s; }
  .nav-links.open > a:nth-of-type(6) { animation-delay: .28s; }
  .nav-links.open .nav-drawer-section:nth-of-type(1) { animation-delay: .32s; }
  .nav-links.open .nav-drawer-section:nth-of-type(2) { animation-delay: .38s; }
  .nav-links.open .nav-drawer-section:nth-of-type(3) { animation-delay: .44s; }
  .nav-links.open .nav-drawer-cta { animation-delay: .5s; }

  @keyframes navDrawerIn {
    from { opacity: 0; transform: translateX(18px); }
    to { opacity: 1; transform: translateX(0); }
  }

  .nav-mobile-extras {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    margin-top: .85rem;
    padding: 1.1rem 1.15rem 0;
    border-top: 1px solid color-mix(in srgb, var(--gold) 22%, var(--line));
  }
  .nav-drawer-section { margin: 0; }
  .nav-drawer-label {
    margin: 0 0 .55rem;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--gold);
  }
  .nav-drawer-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
  }
  .nav-drawer-chips a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: .4rem .85rem;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--gold) 30%, var(--line));
    background: color-mix(in srgb, var(--bg-elevated) 80%, var(--gold-glow));
    color: var(--text);
    font-size: .86rem;
    font-weight: 500;
    transition: border-color .25s, background .25s, color .25s;
  }
  .nav-drawer-chips a:active {
    border-color: var(--gold);
    color: var(--gold-deep);
    background: color-mix(in srgb, var(--gold) 16%, var(--bg-elevated));
  }
  .nav-drawer-cats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .45rem;
  }
  .nav-drawer-cats a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 48px;
    padding: .55rem .5rem;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    font-size: .88rem;
    font-weight: 500;
    box-shadow: 0 6px 18px rgba(40, 28, 10, .04);
    transition: border-color .25s, transform .25s, box-shadow .25s;
  }
  .nav-drawer-cats a:active {
    border-color: var(--gold);
    transform: translateY(1px);
    box-shadow: none;
  }
  .nav-drawer-more-links {
    display: flex;
    flex-direction: column;
    gap: .15rem;
  }
  .nav-drawer-more-links a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: .55rem .35rem;
    font-size: .95rem;
    color: var(--text-muted);
    border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
    transition: color .25s;
  }
  .nav-drawer-more-links a:last-child { border-bottom: 0; }
  .nav-drawer-more-links a:active { color: var(--gold); }

  .nav-drawer-cta {
    display: flex;
    flex-direction: column;
    gap: .55rem;
    padding-top: .25rem;
  }
  .nav-drawer-cta-btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
    border-radius: 12px;
    font-weight: 600;
  }

  .mobile-toggle[aria-expanded="true"] {
    border-color: var(--gold);
    color: var(--gold);
    background: color-mix(in srgb, var(--gold) 12%, var(--bg-elevated));
  }

  .nav-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(12, 10, 6, .52);
    backdrop-filter: blur(4px);
    z-index: 11900;
    animation: navBackdropIn .3s ease both;
  }
  @keyframes navBackdropIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  body.nav-open { overflow: hidden; }
  .gallery-thumbs {
    flex-direction: row;
    overflow-x: auto;
    gap: .5rem;
    padding-bottom: .35rem;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }
  .gallery-thumbs button {
    flex: 0 0 72px;
    scroll-snap-align: start;
  }
  .hero-showcase { min-height: 280px; }
  .hero-dots button {
    width: 44px; height: 44px;
    position: relative;
    background: transparent;
    border: 0;
  }
  .hero-dots button::after {
    content: "";
    position: absolute;
    inset: 17px 14px;
    border-radius: 99px;
    background: var(--line);
  }
  .hero-dots button.is-active::after {
    background: var(--gold);
    inset: 17px 8px;
  }
  .hero-ctas { flex-wrap: wrap; }
  .hero-ctas .btn { flex: 1 1 140px; }
  .product-meta { flex-wrap: wrap; gap: .35rem .75rem; }
  .chat-panel {
    width: min(100vw - 1rem, 400px);
    height: min(70dvh, 520px);
    right: .5rem;
    bottom: calc(76px + env(safe-area-inset-bottom));
  }
  .chat-launcher {
    bottom: calc(14px + env(safe-area-inset-bottom));
    left: calc(14px + env(safe-area-inset-left));
  }
  .cart-cards { display: grid; gap: .85rem; }
  .cart-table-desktop { display: none; }
  .cart-card h3 { margin: 0 0 .6rem; font-size: 1.05rem; }
  .cart-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .85rem;
    color: var(--text-muted);
    font-size: .9rem;
    margin-bottom: .85rem;
  }
  .cart-card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .65rem;
    justify-content: space-between;
  }
  .cart-qty-form { display: flex; gap: .35rem; align-items: center; }
  .cart-qty-form input {
    width: 64px;
    padding: .55rem;
    border: 1px solid var(--line);
    background: var(--bg);
    border-radius: var(--radius);
  }
  .cart-line-total { color: var(--gold); }
  .cart-summary .btn { width: 100%; }
  .dash-topbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .5rem;
    padding: .65rem .75rem;
    padding-top: calc(.65rem + env(safe-area-inset-top));
    border-bottom: 1px solid var(--line);
    background: var(--bg-elevated);
    position: sticky;
    top: 0;
    z-index: 90;
  }
  .dash-menu-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-height: 40px;
    padding-inline: .75rem;
    white-space: nowrap;
  }
  .dash-menu-icon {
    width: 16px;
    height: 12px;
    display: inline-block;
    background:
      linear-gradient(var(--text), var(--text)) 0 0 / 100% 2px no-repeat,
      linear-gradient(var(--text), var(--text)) 0 5px / 100% 2px no-repeat,
      linear-gradient(var(--text), var(--text)) 0 10px / 100% 2px no-repeat;
  }
  .dash-topbar-brand {
    justify-self: center;
    min-width: 0;
  }
  .dash-topbar-brand .brand-logo {
    height: 28px;
    max-width: 110px;
  }
  .dash-topbar-actions {
    display: flex;
    justify-self: end;
    align-items: center;
    gap: .35rem;
  }
  .dash-topbar-site {
    min-height: 40px;
  }
  .dash-layout { grid-template-columns: 1fr; }
  .dash-side {
    position: fixed;
    top: 0;
    bottom: 0;
    width: min(300px, 88vw);
    height: 100dvh;
    z-index: 100;
    padding: 0;
    transform: translateX(-105%);
    transition: transform .28s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
  }
  [dir="rtl"] .dash-side {
    right: 0;
    left: auto;
    transform: translateX(105%);
  }
  [dir="ltr"] .dash-side {
    left: 0;
    right: auto;
  }
  .dash-side.open,
  [dir="rtl"] .dash-side.open,
  [dir="ltr"] .dash-side.open { transform: translateX(0); }
  .dash-side-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .85rem 1rem;
    padding-top: calc(.85rem + env(safe-area-inset-top));
    border-bottom: 1px solid var(--line);
    flex: 0 0 auto;
  }
  .dash-side-close {
    display: inline-flex !important;
    width: 40px;
    height: 40px;
    font-size: 1.4rem;
    padding: 0;
  }
  .dash-brand {
    display: flex !important;
    margin: 0;
  }
  .dash-brand .brand-logo {
    height: 36px;
    max-width: 140px;
  }
  .dash-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: .75rem .85rem calc(1rem + env(safe-area-inset-bottom));
  }
  .dash-nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
    font-size: .95rem;
  }
  .dash-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 95;
  }
  body.dash-open { overflow: hidden; }
  .dash-main {
    padding: .85rem .75rem calc(1.25rem + env(safe-area-inset-bottom));
    width: 100%;
    box-sizing: border-box;
  }
  .dash-main .display {
    font-size: clamp(1.35rem, 6vw, 1.9rem);
    word-break: break-word;
  }
  .dash-body .form-grid.two,
  .dash-body .split-2 {
    grid-template-columns: 1fr !important;
  }
  .dash-body .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: .65rem;
  }
  .dash-body .stat-card { padding: .9rem; }
  .dash-body .stat-card .val { font-size: 1.25rem; }
  .dash-body .panel-box { padding: 1rem; }
  .dash-body input,
  .dash-body select,
  .dash-body textarea {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }
  .dash-body .btn {
    max-width: 100%;
  }
  .dash-body img {
    max-width: 100%;
    height: auto;
  }
  .dash-actions {
    width: 100%;
  }
  .dash-actions .btn {
    flex: 1 1 auto;
  }
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .dash-body .section-head {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .dash-body .section-head h1 {
    font-size: clamp(1.3rem, 6vw, 1.8rem);
    word-break: break-word;
  }
  .btn, .icon-btn { touch-action: manipulation; }
}

@media (max-width: 700px) {
  .product-grid { grid-template-columns: 1fr; }
  .rates-board { grid-template-columns: 1fr 1fr; gap: .65rem; }
  .rate-tile .price { font-size: .95rem; word-break: break-word; }
}

@media (max-width: 560px) {
  .dash-body .stat-grid { grid-template-columns: 1fr; }
  .dash-body .stat-card .val { font-size: 1.35rem; }
  .dash-main table.data { min-width: 480px; }
  .dash-toolbar .btn { width: 100%; }
  .dash-body td.dash-actions,
  .dash-body .dash-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .dash-body td.dash-actions .btn,
  .dash-body .dash-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .gold-topbar { font-size: 0.78rem; }
  .gold-topbar-price { font-size: 0.88rem; }
  .gold-topbar-inner { gap: 0.4rem; }
  .brand-logo { height: 40px; max-width: 168px; }
  .footer-logo { height: 36px; max-width: 150px; }

  .container { width: min(100% - 1.1rem, 1180px); }
  .section { padding: 2.2rem 0; }
  .rates-board, .category-row, .form-grid.two, .stat-grid { grid-template-columns: 1fr; }
  .category-card { min-height: 160px; }
  .hero-copy h1 { font-size: clamp(2rem, 10vw, 2.8rem); }
  .hero-showcase { min-height: 240px; }
  .product-body { padding: .8rem .75rem .95rem; }
  .product-body h3 { font-size: .95rem; }
  .product-price { font-size: .86rem; }
  .footer-bottom { padding-inline: .75rem; text-align: center; }
  .messages { inset-inline: .75rem; }
  .btn { width: auto; min-height: 44px; }
  .cart-countdown { font-size: 1.65rem; }
  .cart-total { font-size: 1.55rem; }
  .dash-body .ig-admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@supports (padding: max(0px)) {
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}

/* Price formula note */
.price-formula-note {
  margin: 1rem 0 0;
  padding: .85rem 1rem;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg-soft) 80%, transparent);
  font-size: .88rem;
  line-height: 1.7;
}
.price-formula-note strong { display: block; margin-bottom: .35rem; }
.price-formula-note code {
  display: block;
  direction: ltr;
  text-align: left;
  font-size: .82rem;
  color: var(--gold-deep);
  word-break: break-word;
  white-space: pre-wrap;
}
[data-theme="dark"] .price-formula-note code { color: var(--gold-bright); }

/* Articles */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.article-card { padding: 0; overflow: hidden; }
.article-card-link { display: block; color: inherit; text-decoration: none; }
.article-card-media {
  aspect-ratio: 16/10;
  background: var(--bg-soft);
  overflow: hidden;
}
.article-card-media img { width: 100%; height: 100%; object-fit: cover; }
.article-card-fallback {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 2rem; color: var(--gold);
}
.article-card-body { padding: 1rem 1.1rem 1.2rem; }
.article-card-body h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 .45rem;
  line-height: 1.4;
}
.article-cover {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.25rem;
  border: 1px solid var(--line);
}
.article-cover img { width: 100%; max-height: 420px; object-fit: cover; display: block; }
.article-excerpt {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}
.article-content { font-size: 1.05rem; line-height: 2; }

.social-link-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.license-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: .75rem;
}
.license-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  text-align: center;
  color: inherit;
  text-decoration: none;
  font-size: .82rem;
}
.license-card img {
  width: 100%;
  max-width: 140px;
  aspect-ratio: 1;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: .4rem;
}

@media (max-width: 980px) {
  .article-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .article-grid { grid-template-columns: 1fr; }
}

/* Desktop shop: filters always open look */
@media (min-width: 981px) {
  .shop-layout {
    grid-template-columns: 1fr 280px;
  }
  .shop-products { order: 1; }
  .shop-filters { order: 2; }
  .shop-filters summary {
    cursor: default;
    margin-bottom: .75rem;
    pointer-events: none;
  }
}


/* ========== Stories under hero title ========== */
.stories-under-title {
  margin: .85rem 0 1.1rem;
  max-width: 100%;
}
.stories-topbar {
  display: none;
}
.hero-stories-cover { display: none !important; }
.story-rings {
  position: relative;
  z-index: 2;
  display: flex;
  gap: .85rem;
  overflow-x: auto;
  padding: .15rem 0 .35rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.story-rings::-webkit-scrollbar { display: none; }
.story-ring {
  flex: 0 0 auto;
  width: 78px;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  padding: 0;
  text-align: center;
}
.story-ring-avatar {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto .4rem;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, #f6d27a, #c9a227, #8a6a12, #f0b429);
  overflow: hidden;
  box-sizing: border-box;
}
.story-ring-avatar img,
.story-ring-avatar .story-ring-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50% !important;
  object-fit: cover;
  border: 2px solid var(--bg);
  background: var(--bg-elevated);
  display: block;
  overflow: hidden;
}
.story-ring-fallback {
  display: grid !important;
  place-items: center;
  font-size: .85rem;
  color: var(--gold);
}
.story-ring-label {
  display: block;
  font-size: .7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 78px;
  margin-inline: auto;
}
@media (max-width: 800px) {
  .stories-under-title .story-rings { justify-content: center; }
}
.story-viewer {
  position: fixed; inset: 0;
  z-index: 12000;
  background: rgba(0,0,0,.94);
  display: grid;
  place-items: center;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.story-viewer[hidden] { display: none !important; }
body.story-open { overflow: hidden; }
.story-viewer-media {
  width: min(420px, 94vw);
  aspect-ratio: 9/16;
  max-height: min(86vh, 780px);
  border-radius: 16px;
  overflow: hidden;
  background: #111;
  position: relative;
}
.story-viewer-media img,
.story-viewer-media video {
  width: 100%; height: 100%; object-fit: cover;
}
.story-viewer-media[data-filter="warm"] img,
.story-viewer-media[data-filter="warm"] video { filter: sepia(.25) saturate(1.15); }
.story-viewer-media[data-filter="cool"] img,
.story-viewer-media[data-filter="cool"] video { filter: hue-rotate(15deg) saturate(.9) brightness(1.05); }
.story-viewer-bar {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  left: 50%; transform: translateX(-50%);
  width: min(420px, 92vw);
  height: 3px;
  background: rgba(255,255,255,.2);
  border-radius: 99px;
  overflow: hidden;
  z-index: 2;
}
.story-viewer-progress {
  height: 100%; width: 0;
  background: #fff;
}
.story-viewer-close {
  position: absolute;
  top: calc(22px + env(safe-area-inset-top));
  left: 16px;
  z-index: 3;
  width: 40px; height: 40px;
  border: 0; border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: #fff; font-size: 1.5rem; cursor: pointer;
}
.story-viewer-meta {
  position: absolute;
  bottom: calc(24px + env(safe-area-inset-bottom));
  left: 50%; transform: translateX(-50%);
  width: min(420px, 92vw);
  color: #fff;
  text-shadow: 0 1px 8px rgba(0,0,0,.6);
  z-index: 2;
  pointer-events: none;
}
.story-viewer-meta p { margin: .25rem 0 0; opacity: .9; font-size: .95rem; }
.story-nav {
  position: absolute; top: 0; bottom: 0; width: 28%;
  background: transparent; border: 0; cursor: pointer;
  z-index: 1;
}
.story-nav-prev { right: 0; }
.story-nav-next { left: 0; }

/* ========== Instagram gallery ========== */
.ig-container { max-width: 720px; }
.ig-profile {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: center;
  margin-bottom: 1.5rem;
}
.ig-avatar {
  width: 86px; height: 86px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, #f6d27a, #c9a227, #8a6a12);
}
.ig-avatar img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg);
  background: var(--bg-elevated);
}
.ig-profile-meta h2 { margin: 0 0 .5rem; font-size: 1.35rem; }
.ig-stats { display: flex; gap: 1.1rem; flex-wrap: wrap; margin-bottom: .5rem; font-size: .92rem; }
.ig-bio { margin: 0; color: var(--text-muted); font-size: .9rem; }
.ig-tabs {
  display: flex; gap: .35rem;
  border-top: 1px solid var(--line);
  margin-bottom: .75rem;
}
.ig-tab {
  flex: 1;
  background: transparent;
  border: 0;
  border-top: 2px solid transparent;
  color: var(--text-muted);
  padding: .85rem .5rem;
  cursor: pointer;
  font: inherit;
}
.ig-tab.is-active {
  color: var(--gold);
  border-top-color: var(--gold);
}
.ig-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.ig-home-heading { margin-bottom: 1.5rem; }
.ig-home-panel {
  overflow: hidden;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--gold) 22%, var(--line));
  border-radius: 24px;
  background:
    radial-gradient(ellipse at 100% 0, color-mix(in srgb, var(--gold) 10%, transparent), transparent 45%),
    color-mix(in srgb, var(--bg-elevated) 94%, var(--bg));
  box-shadow: 0 24px 70px rgba(22, 18, 10, .08);
}
.ig-home-profile {
  display: flex;
  align-items: center;
  gap: .8rem;
  min-height: 58px;
  padding: 2px 4px 14px;
}
.ig-home-avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border: 2px solid transparent;
  border-radius: 50%;
  background: linear-gradient(var(--bg-elevated), var(--bg-elevated)) padding-box,
    linear-gradient(135deg, #f6d27a, #c9a227, #8a6a12) border-box;
  color: var(--gold);
  font-size: 1.75rem;
}
.ig-home-profile-copy { display: grid; gap: .16rem; }
.ig-home-profile-copy strong { font-size: .95rem; }
.ig-home-profile-copy small { color: var(--text-muted); font-size: .78rem; }
.ig-home-profile-mark {
  margin-inline-start: auto;
  color: var(--text-muted);
  font-size: .78rem;
  letter-spacing: .08em;
}
.ig-grid-home {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: clamp(130px, 19vw, 220px);
  gap: 10px;
  margin-top: 0;
}
.ig-home-cell {
  aspect-ratio: auto;
  border-radius: 14px;
  isolation: isolate;
}
.ig-home-cell:first-child {
  grid-column: span 2;
  grid-row: span 2;
}
.ig-home-cell img,
.ig-home-cell video {
  transition: transform .65s cubic-bezier(.2, .7, .2, 1);
}
.ig-home-cell::after {
  position: absolute;
  z-index: 1;
  inset: 25% 0 0;
  background: linear-gradient(180deg, transparent 5%, rgba(13, 13, 16, .72));
  content: "";
  opacity: .9;
  transition: opacity .25s ease;
}
.ig-home-cell-overlay {
  position: absolute;
  z-index: 2;
  inset: auto 0 0;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: .5rem;
  padding: 1.2rem .8rem .75rem;
  color: #fff;
  font-size: .8rem;
  line-height: 1.7;
  opacity: .95;
  transition: opacity .25s ease;
}
.ig-home-cell-open {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 50%;
  font-size: .9rem;
}
.ig-home-cell .ig-badge-video {
  z-index: 3;
  top: .7rem;
  left: .7rem;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 50%;
  background: rgba(15, 15, 18, .38);
  backdrop-filter: blur(8px);
  font-size: .7rem;
}
.ig-home-cell-empty {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, color-mix(in srgb, var(--gold) 30%, #30261d), #17191e);
  color: #f4d782;
  font-size: 3rem;
}
.ig-home-cell:hover img,
.ig-home-cell:hover video { transform: scale(1.07); }
.ig-home-cell:hover .ig-home-cell-overlay { opacity: 1; }
.ig-home-empty {
  position: relative;
  display: grid;
  justify-items: center;
  gap: .55rem;
  overflow: hidden;
  min-height: 260px;
  padding: 2rem 1.25rem;
  border: 1px solid color-mix(in srgb, var(--gold) 17%, var(--line));
  border-radius: 17px;
  background:
    radial-gradient(circle at 50% 115%, color-mix(in srgb, var(--gold) 17%, transparent), transparent 45%),
    color-mix(in srgb, var(--bg-soft) 75%, transparent);
  text-align: center;
}
.ig-home-empty-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin-bottom: .2rem;
  border: 1px solid color-mix(in srgb, var(--gold) 55%, var(--line));
  border-radius: 50%;
  color: var(--gold);
  font-size: 2.5rem;
  box-shadow: 0 0 35px color-mix(in srgb, var(--gold) 18%, transparent);
}
.ig-home-empty strong { font-size: 1.05rem; }
.ig-home-empty p {
  max-width: 28rem;
  margin: 0;
  color: var(--text-muted);
  font-size: .9rem;
}
.ig-cell {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 0;
  padding: 0;
  background: #12151b;
  cursor: pointer;
  display: block;
  color: inherit;
}
.ig-cell img,
.ig-cell video {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
  transition: transform .45s ease;
}
.ig-cell:hover img,
.ig-cell:hover video { transform: scale(1.04); }
.ig-badge-video {
  position: absolute;
  top: .4rem; left: .4rem;
  color: #fff;
  font-size: .75rem;
  text-shadow: 0 1px 4px rgba(0,0,0,.7);
}
.ig-lightbox {
  position: fixed; inset: 0;
  z-index: 11000;
  background: rgba(0,0,0,.92);
  display: grid;
  place-items: center;
  padding: 1rem;
}
.ig-lightbox[hidden] { display: none !important; }
body.ig-lb-open { overflow: hidden; }
.ig-lb-body {
  width: min(560px, 96vw);
  max-height: 78vh;
}
.ig-lb-body img,
.ig-lb-body video {
  width: 100%; max-height: 78vh; object-fit: contain; border-radius: 8px;
}
.ig-lb-caption {
  color: #fff; margin: .75rem 0 0; text-align: center;
  max-width: 560px;
}
.ig-lb-close {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  left: 14px;
  width: 40px; height: 40px;
  border: 0; border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: #fff; font-size: 1.4rem; cursor: pointer;
}
@media (max-width: 560px) {
  .ig-home-panel { padding: 9px; border-radius: 18px; }
  .ig-grid-home { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(128px, 42vw); gap: 7px; }
  .ig-home-cell:first-child { grid-column: span 2; grid-row: span 2; }
  .ig-home-cell { border-radius: 10px; }
  .ig-home-cell-overlay { padding: 1rem .55rem .55rem; font-size: .72rem; }
  .ig-home-profile-mark { font-size: .66rem; }
  .ig-avatar { width: 72px; height: 72px; }
  .story-ring { width: 70px; }
  .story-ring-avatar { width: 62px; height: 62px; }
}
@media (min-width: 561px) and (max-width: 900px) {
  .ig-grid-home { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: clamp(150px, 24vw, 205px); }
}
@media (hover: none) {
  .ig-home-cell-overlay { opacity: 1; }
}

/* carousel-fix-1788877538 */

/* ─── Homepage light polish ─── */
.page-home .hero {
  border-bottom: 1px solid color-mix(in srgb, var(--gold) 22%, transparent);
}
.page-home .hero-showcase {
  filter: drop-shadow(0 28px 50px rgba(120, 90, 30, 0.16));
}
[data-theme="dark"] .page-home .hero-showcase {
  filter: drop-shadow(0 28px 60px rgba(8, 20, 45, 0.55));
}
.page-home .section:nth-of-type(even) {
  background:
    linear-gradient(180deg, transparent, color-mix(in srgb, var(--bg-soft) 70%, transparent) 12%, color-mix(in srgb, var(--bg-soft) 70%, transparent) 88%, transparent);
}
.page-home .section-head .eyebrow {
  letter-spacing: 0.22em;
}
.page-home .section-head h2 {
  position: relative;
  display: inline-block;
}
.page-home .section-head h2::after {
  content: '';
  display: block;
  width: 3.2rem;
  height: 2px;
  margin-top: .55rem;
  margin-inline-start: auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 2px;
}
.page-home .category-tile {
  border-radius: 14px;
  min-height: 240px;
  box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--gold) 18%, var(--line));
}
.page-home .category-tile:hover {
  transform: translateY(-8px) scale(1.01);
}
.page-home .category-tile .label {
  font-family: var(--font-display);
  font-size: 1.45rem;
  text-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.page-home .product-card {
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(80, 60, 20, 0.06);
  border-color: color-mix(in srgb, var(--gold) 14%, var(--line));
  background:
    linear-gradient(180deg, var(--bg-elevated), color-mix(in srgb, var(--bg-soft) 35%, var(--bg-elevated)));
}
.page-home .product-card:hover {
  box-shadow: 0 18px 40px rgba(120, 90, 30, 0.14);
  border-color: color-mix(in srgb, var(--gold) 45%, var(--line));
}
[data-theme="dark"] .page-home .product-card {
  box-shadow: 0 12px 36px rgba(4, 10, 24, 0.4);
  background: linear-gradient(180deg, var(--bg-elevated), color-mix(in srgb, #243353 40%, var(--bg-elevated)));
}
.page-home .product-carousel {
  padding: .35rem .15rem 1rem;
}
.page-home .rate-tile {
  border-radius: 12px;
  background:
    linear-gradient(160deg, var(--bg-elevated), color-mix(in srgb, var(--bg-soft) 55%, var(--bg-elevated)));
}
.page-home .panel-box {
  border-radius: 14px;
}
html[data-theme="light"] {
  color-scheme: light;
}
html[data-theme="dark"] {
  color-scheme: dark;
}

@media (prefers-reduced-motion: reduce) {
  .nav-links,
  .nav-links.open > a,
  .nav-links.open > .nav-item,
  .nav-links.open .nav-drawer-section,
  .nav-links.open .nav-drawer-cta,
  .nav-backdrop:not([hidden]) {
    animation: none !important;
    transition: none !important;
  }
}

/* ─── Gold topbar: white bg ─── */
.gold-topbar {
  background: #ffffff;
  color: #b91c1c;
  border-bottom: 1px solid rgba(28, 24, 20, 0.08);
}
[data-theme="dark"] .gold-topbar {
  background: #ffffff;
  color: #b91c1c;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.gold-topbar-label { color: #7f1d1d; }
.gold-topbar-price { color: #dc2626; }
.gold-topbar-unit { color: #991b1b; }

/* ─── Search drawer (from left) ─── */
.search-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 12900;
  background: rgba(12, 10, 6, .45);
  backdrop-filter: blur(3px);
}
.search-backdrop:not([hidden]) { display: block; }
.search-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(400px, 92vw);
  z-index: 13000;
  background:
    radial-gradient(ellipse 80% 40% at 0% 0%, var(--gold-glow), transparent 55%),
    linear-gradient(165deg, var(--bg-elevated), var(--bg-soft));
  border-right: 1px solid color-mix(in srgb, var(--gold) 30%, var(--line));
  box-shadow: 18px 0 50px rgba(20, 14, 6, .25);
  transform: translate3d(-105%, 0, 0);
  transition: transform .34s cubic-bezier(.22,.7,.2,1), visibility .34s;
  visibility: hidden;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  padding: calc(.9rem + env(safe-area-inset-top)) 1rem calc(1rem + env(safe-area-inset-bottom));
}
.search-drawer.open {
  transform: translate3d(0, 0, 0);
  visibility: visible;
  pointer-events: auto;
}
.search-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .85rem;
}
.search-drawer-head strong {
  font-family: var(--font-display);
  font-size: 1.45rem;
}
.search-drawer-close svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round;
}
.search-drawer-form {
  display: flex;
  gap: .45rem;
  margin-bottom: .65rem;
}
.search-drawer-form input[type="search"] {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  border-radius: 12px;
  padding: .75rem .9rem;
  font: inherit;
}
.search-drawer-form input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}
.search-drawer-hint { font-size: .82rem; margin-bottom: .5rem; }
.search-drawer-results {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  -webkit-overflow-scrolling: touch;
}
.search-result {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: .7rem;
  align-items: center;
  padding: .55rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: inherit;
  text-decoration: none;
  transition: border-color .2s, background .2s;
}
.search-result:hover, .search-result:focus-visible {
  border-color: var(--gold);
  background: color-mix(in srgb, var(--gold) 10%, var(--bg-elevated));
}
.search-result-img {
  width: 56px; height: 56px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--bg-soft);
}
.search-result-img--empty {
  display: grid; place-items: center;
  color: var(--text-muted); font-size: .75rem;
}
.search-result-body strong {
  display: block;
  font-size: .95rem;
  line-height: 1.35;
}
.search-result-body span {
  display: block;
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: .15rem;
}
.search-result-price {
  font-size: .82rem;
  font-weight: 700;
  color: var(--gold-deep);
  white-space: nowrap;
}
[data-theme="dark"] .search-result-price { color: var(--gold-bright); }
body.search-open { overflow: hidden; }

/* ─── Floating WhatsApp + chat ─── */
.float-stack {
  position: fixed;
  bottom: 1.4rem;
  left: 1.4rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .65rem;
}
.float-stack .chat-launcher {
  position: static;
  bottom: auto; left: auto;
}
.whatsapp-launcher {
  width: 54px; height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #25d366;
  color: #fff;
  box-shadow: 0 10px 28px rgba(37, 211, 102, .4);
  transition: transform .25s, box-shadow .25s;
}
.whatsapp-launcher:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(37, 211, 102, .5); }
.whatsapp-launcher svg { width: 28px; height: 28px; }
@media (max-width: 560px) {
  .float-stack { bottom: 1rem; left: 1rem; }
  .whatsapp-launcher { width: 50px; height: 50px; }
  .float-stack .chat-launcher { width: 54px; height: 54px; }
}

/* ─── Category carousel cards — متن روی عکس ─── */
.cat-carousel .product-carousel-track .cat-card,
.product-carousel-track .cat-card {
  flex: 0 0 min(200px, 68vw);
  width: min(200px, 68vw);
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: inherit;
  text-decoration: none;
  min-height: 0;
  aspect-ratio: 3 / 4;
  position: relative;
  transition: transform .3s, box-shadow .3s;
}
.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: transparent;
}
.cat-card-media {
  display: block;
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
  background:
    linear-gradient(145deg, var(--bg-soft), color-mix(in srgb, var(--gold) 12%, var(--bg-elevated)));
  background-size: cover;
  background-position: center;
}
.cat-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 10, 6, .25) 0%, rgba(12, 10, 6, .45) 100%);
  pointer-events: none;
}
.cat-card-label {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  margin: 0;
  padding: .75rem;
  font-size: clamp(1.35rem, 2.8vw, 2.1rem);
  font-weight: 700;
  font-family: var(--font-display);
  line-height: 1.25;
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0,0,0,.55);
  white-space: normal;
  overflow: hidden;
}
.cat-card-body { display: none; }
.cat-card-all { display: none !important; }

/* Categories page grid */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.category-list-card {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: inherit;
  text-decoration: none;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.category-list-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--gold) 40%, var(--line));
  box-shadow: var(--shadow);
}
.category-list-media {
  display: block;
  aspect-ratio: 16/10;
  background: linear-gradient(145deg, var(--bg-soft), color-mix(in srgb, var(--gold) 10%, var(--bg)));
  background-size: cover;
  background-position: center;
}
.category-list-body {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1rem 1.05rem 1.15rem;
}
.category-list-body strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
}
.category-list-body .muted { font-size: .88rem; line-height: 1.65; }
@media (max-width: 900px) {
  .categories-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .categories-grid { grid-template-columns: 1fr; }
}

/* Price formula typography */
.price-formula-note {
  margin: 1rem 0 0;
  padding: 1rem 1.1rem;
  border: 1px solid color-mix(in srgb, var(--gold) 28%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg-soft) 75%, transparent);
}
.price-formula-note strong {
  display: block;
  margin-bottom: .45rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text);
}
.price-formula-text {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.9;
  color: var(--gold-deep);
  direction: rtl;
  text-align: right;
}
[data-theme="dark"] .price-formula-text { color: var(--gold-bright); }
.price-formula-note code { display: none; }

/* Dashboard product thumbs + category sort */
.dash-product-thumb {
  width: 56px; height: 56px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  display: block;
  background: var(--bg-soft);
}
.dash-product-thumb--empty {
  display: grid; place-items: center;
  color: var(--text-muted); font-size: .75rem;
}
.cat-sortable {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.cat-sort-item {
  display: grid;
  grid-template-columns: auto 48px 1fr auto;
  gap: .65rem;
  align-items: center;
  padding: .55rem .65rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  cursor: grab;
}
.cat-sort-item.is-dragging {
  opacity: .65;
  border-color: var(--gold);
  box-shadow: var(--shadow);
}
.cat-sort-handle {
  color: var(--text-muted);
  letter-spacing: -2px;
  font-size: 1rem;
  user-select: none;
}
.cat-sort-thumb {
  width: 48px; height: 48px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--bg-soft);
}
.cat-sort-thumb--empty { display: block; border: 1px dashed var(--line); }
.cat-sort-info { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.cat-sort-item .dash-actions { display: flex; gap: .35rem; flex-wrap: wrap; }
@media (max-width: 700px) {
  .cat-sort-item {
    grid-template-columns: auto 40px 1fr;
  }
  .cat-sort-item .dash-actions { grid-column: 1 / -1; }
}
