/* ═══════════════════════════════════════════════════
   نیارا گلد — 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: #f7f3eb;
  --bg-elevated: #fffdf8;
  --bg-soft: #efe6d4;
  --text: #1a1410;
  --text-muted: #6b5a48;
  --gold: #c9a227;
  --gold-bright: #e8c547;
  --gold-deep: #8a6a12;
  --gold-glow: rgba(201, 162, 39, 0.35);
  --line: rgba(26, 20, 16, 0.12);
  --danger: #b33a3a;
  --success: #2f6b4f;
  --radius: 4px;
  --nav-h: 72px;
  --font-display: 'Cormorant Garamond', 'Vazirmatn', serif;
  --font-body: 'Vazirmatn', sans-serif;
  --shadow: 0 20px 60px rgba(26, 20, 16, 0.08);
  --hero-overlay: linear-gradient(120deg, rgba(247,243,235,0.92) 0%, rgba(247,243,235,0.55) 45%, rgba(247,243,235,0.15) 100%);
}

[data-theme="dark"] {
  --bg: #0c0a08;
  --bg-elevated: #16120e;
  --bg-soft: #1e1812;
  --text: #f3e9d7;
  --text-muted: #a89478;
  --gold: #d4af37;
  --gold-bright: #f0d78c;
  --gold-deep: #a67c00;
  --gold-glow: rgba(212, 175, 55, 0.4);
  --line: rgba(243, 233, 215, 0.12);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  --hero-overlay: linear-gradient(120deg, rgba(12,10,8,0.94) 0%, rgba(12,10,8,0.6) 45%, rgba(12,10,8,0.2) 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 10% -10%, var(--gold-glow), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(138, 106, 18, 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; }

/* ─── Nav ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
}
.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: 48px;
  width: auto;
  max-width: 160px;
  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: 56px;
  max-width: 180px;
}
.dash-topbar-brand .brand-logo {
  height: 36px;
  max-width: 120px;
}
.dash-brand .brand-logo {
  height: 52px;
  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.4rem;
  align-items: center;
  font-size: 0.92rem;
}
.nav-links a {
  position: relative;
  color: var(--text-muted);
  transition: color .25s;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-links a::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 { transform: scaleX(1); }

.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; }

/* ─── Hero cinematic ─── */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    var(--hero-overlay),
    radial-gradient(circle at 70% 40%, rgba(201,162,39,0.22), transparent 45%),
    linear-gradient(160deg, var(--bg-soft), var(--bg));
  z-index: 0;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  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, var(--text) 20%, var(--gold-bright) 55%, var(--gold-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: titleReveal 1.4s ease both;
}
.hero-copy p {
  max-width: 34rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  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 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;
}
/* لایت مود: گلو طلایی نرم */
[data-theme="light"] .hero-glow {
  display: block;
  background: radial-gradient(ellipse at center,
    rgba(212, 175, 55, 0.55) 0%,
    rgba(201, 162, 39, 0.28) 40%,
    rgba(201, 162, 39, 0.08) 65%,
    transparent 78%);
  opacity: 0.95;
}
/* دارک مود: گلو روشن طلایی زیر تصویر */
[data-theme="dark"] .hero-glow {
  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, var(--gold) 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: var(--gold-bright);
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 14px var(--gold);
}
.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;
}
.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;
}
[data-theme="light"] .hero-slide.is-active img {
  filter:
    drop-shadow(0 0 22px rgba(212, 175, 55, 0.35))
    drop-shadow(0 16px 22px rgba(138, 106, 18, 0.18));
}
[data-theme="dark"] .hero-slide.is-active img {
  filter:
    drop-shadow(0 0 28px rgba(255, 214, 120, 0.35))
    drop-shadow(0 22px 40px rgba(0, 0, 0, 0.55));
}
.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 var(--gold);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: width .35s ease, background .35s ease;
}
.hero-dots button.is-active {
  width: 26px;
  background: var(--gold);
}
.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;
}
.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);
  overflow: hidden;
  display: flex;
  align-items: end;
  padding: 1.4rem;
  border: 1px solid var(--line);
  transition: transform .4s ease;
}
.category-tile:hover { transform: scale(1.015); }
.category-tile .label {
  font-family: var(--font-display);
  font-size: 1.7rem;
  z-index: 1;
}
.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;
}
.category-tile:hover .shine { transform: translateX(100%); }

/* Products */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.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;
}
.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;
}
.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; }
.product-body h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 0.35rem;
}
.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.product-price {
  margin-top: 0.7rem;
  font-weight: 700;
  color: var(--gold-deep);
}
[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;
}

/* 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(--nav-h) + 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;
  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-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.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 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 {
  background: color-mix(in srgb, var(--gold) 18%, transparent);
  color: var(--gold);
}
.dash-main { padding: 1.5rem; }
.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;
}
.stat-card .val {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--gold);
}

.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-mobile-extras { display: none; }
.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: 64px; }
  .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; }
  .category-row { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .desktop-only-action { display: none !important; }
  .nav-mobile-extras {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px solid var(--line);
  }
  .nav-extra-btn {
    text-align: right;
    background: transparent;
    border: 0;
    color: inherit;
    padding: .9rem .4rem;
    font: inherit;
    cursor: pointer;
  }
  .nav-links { display: none; }
  .mobile-toggle { display: grid; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h);
    right: 0; left: 0;
    z-index: 1200;
    max-height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
    background: var(--bg-elevated);
    padding: .5rem 1rem 1.25rem;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .nav-links.open a,
  .nav-links.open .nav-extra-btn {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: .85rem .4rem;
    font-size: 1rem;
  }
  .nav-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    background: rgba(0,0,0,.45);
    z-index: 1100;
  }
  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: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .75rem 1rem;
    padding-top: calc(.75rem + env(safe-area-inset-top));
    border-bottom: 1px solid var(--line);
    background: var(--bg-elevated);
    position: sticky;
    top: 0;
    z-index: 50;
  }
  .dash-layout { grid-template-columns: 1fr; }
  .dash-side {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(280px, 86vw);
    height: 100dvh;
    z-index: 80;
    transform: translateX(-105%);
    transition: transform .28s ease;
    overflow-y: auto;
  }
  [dir="rtl"] .dash-side {
    inset: 0 0 0 auto;
    transform: translateX(105%);
  }
  .dash-side.open { transform: translateX(0); }
  .dash-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 70;
  }
  body.dash-open { overflow: hidden; }
  .dash-main { padding: 1rem; }
  .dash-brand { display: none; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .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) {
  .brand-logo { height: 40px; max-width: 132px; }
  .footer-logo { height: 48px; 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: .85rem .8rem 1rem; }
  .product-body h3 { font-size: 1rem; }
  .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; }
}

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

/* 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-grid-home { margin-top: .5rem; }
.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-avatar { width: 72px; height: 72px; }
  .story-ring { width: 70px; }
  .story-ring-avatar { width: 62px; height: 62px; }
}
