/* ==========================================================================
   Istalif Gallery — public site
   Warm museum-gallery look. Works LTR (English) and RTL (Dari).
   ========================================================================== */

@view-transition { navigation: auto; }

:root {
  --ground: #F6F1E9;
  --ground-2: #EFE7DA;
  --line: #E2D8C8;
  --line-2: #CFC3B0;
  --ink: #1F2A44;
  --ink-2: #3A4767;
  --muted: #5E554A;
  --accent: #8E2C23;
  --accent-2: #74221B;
  --gold: #C9962E;
  --sand: #E3B98A;
  --white: #FFFFFF;
  --radius: 4px;
  --shadow: 0 18px 50px -20px rgba(31, 42, 68, .35);
  --shadow-sm: 0 6px 20px -10px rgba(31, 42, 68, .3);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1240px;
  --header-h: 84px;
}
html[lang="fa"] {
  --serif: 'Vazirmatn', 'Cormorant Garamond', Tahoma, sans-serif;
  --sans: 'Vazirmatn', 'Inter', Tahoma, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html[lang="fa"] body { line-height: 1.85; }
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: var(--ink); text-underline-offset: 4px; transition: color .25s var(--ease); }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.1; margin: 0; letter-spacing: -.005em; }
html[lang="fa"] h1, html[lang="fa"] h2, html[lang="fa"] h3 { font-weight: 700; line-height: 1.4; letter-spacing: 0; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.ico { flex: none; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 24px; }
.section { padding-block: clamp(56px, 8vw, 104px); }
.section-tint { background: var(--ground-2); }
.section-dark { background: var(--ink); color: var(--ground); }
.section-dark a:not(.btn) { color: var(--ground); }
.section-dark .btn-light, .section-dark .btn-light:hover { color: var(--ink); }
.eyebrow {
  margin: 0 0 14px; font-family: var(--sans); font-size: 12px; font-weight: 600;
  letter-spacing: .24em; text-transform: uppercase; color: var(--accent);
}
html[lang="fa"] .eyebrow { letter-spacing: 0; font-size: 14px; }
.section-dark .eyebrow { color: var(--sand); }
.h-xl { font-size: clamp(42px, 6.2vw, 76px); }
.h-lg { font-size: clamp(34px, 4.4vw, 52px); }
.h-md { font-size: clamp(26px, 3vw, 36px); }
html[lang="fa"] .h-xl { font-size: clamp(34px, 5vw, 58px); }
html[lang="fa"] .h-lg { font-size: clamp(28px, 3.6vw, 42px); }
.lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--muted); max-width: 560px; }
.section-dark .lead { color: #D9D3C7; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 40px; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; text-decoration: none; }
.link-arrow .ico { transition: transform .3s var(--ease); }
.link-arrow:hover .ico { transform: translateX(4px); }
[dir="rtl"] .link-arrow .ico, [dir="rtl"] .btn .ico-arrow { transform: scaleX(-1); }
[dir="rtl"] .link-arrow:hover .ico { transform: scaleX(-1) translateX(4px); }
.skip { position: absolute; inset-inline-start: 8px; top: 8px; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; transform: translateY(-200%); transition: transform .2s; }
.skip:focus { transform: none; }
html, body { overflow-x: clip; }

/* ---------- Buttons ---------- */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 26px; border-radius: var(--radius);
  font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; background: none;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s, color .25s, border-color .25s;
}
.btn::after { /* soft light sweep on hover */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.18) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .7s var(--ease);
}
.btn:hover::after { transform: translateX(120%); }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn-dark { background: var(--ink); color: var(--ground); }
.btn-dark:hover { color: #fff; background: #17203A; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { color: #fff; background: var(--accent-2); }
.btn-line { border-color: var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--ground); }
.btn-light { background: var(--ground); color: var(--ink); }
.btn-light:hover { color: var(--ink); }
.btn-ghost { color: var(--ink); padding-inline: 14px; }
.btn-ghost:hover { background: var(--ground-2); box-shadow: none; }
.btn-block { width: 100%; }
.btn-lg { min-height: 56px; font-size: 16px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ---------- Top bar ---------- */
.topbar { background: var(--ink); color: #E8E2D6; font-size: 13px; }
.topbar-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 20px; min-height: 40px; padding-block: 6px; }
.topbar a { color: #E8E2D6; }
.topbar a:hover { color: #fff; }
.addr-link { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.addr-link span { text-decoration: underline; text-decoration-color: rgba(255,255,255,0); text-underline-offset: 3px; transition: text-decoration-color .3s; }
.addr-link:hover span { text-decoration-color: currentColor; }
.topbar-banner { letter-spacing: .04em; }
.topbar-hours { display: inline-flex; align-items: center; gap: 8px; opacity: .9; }

/* ---------- Header & logo (one component, aligned everywhere) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 241, 233, .92);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .35s var(--ease), background-color .35s;
}
.site-header.is-scrolled { box-shadow: 0 10px 30px -18px rgba(31,42,68,.35); background: rgba(246, 241, 233, .97); }
.header-in {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px;
  min-height: var(--header-h); transition: min-height .35s var(--ease);
}
.site-header.is-scrolled .header-in { min-height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); line-height: 1; }
.brand:hover { color: var(--ink); }
.brand-logo { display: inline-flex; align-items: center; justify-content: center; height: 48px; flex: none; }
.brand-logo img { height: 100%; width: auto; max-width: 180px; object-fit: contain; }
.brand-logo .brand-mark { color: var(--accent); }
.brand-text { display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.brand-name { font-family: var(--serif); font-size: 28px; font-weight: 600; letter-spacing: .01em; white-space: nowrap; }
.brand-tag { font-family: var(--sans); font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
html[lang="fa"] .brand-name { font-size: 22px; font-weight: 700; }
html[lang="fa"] .brand-tag { letter-spacing: 0; font-size: 12px; }
.site-header.is-scrolled .brand-logo { height: 40px; }
.brand-logo { transition: height .35s var(--ease); }

.main-nav { display: flex; justify-content: center; align-items: center; gap: 4px; }
.nav-link {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px; font-weight: 500; font-size: 15px; text-decoration: none; color: var(--ink);
}
.nav-link::after {
  content: ""; position: absolute; inset-inline: 14px; bottom: 4px; height: 1.5px; background: var(--accent);
  transform: scaleX(0); transform-origin: var(--origin, left); transition: transform .35s var(--ease);
}
[dir="rtl"] .nav-link::after { --origin: right; }
.nav-link:hover::after, .nav-link.is-active::after { transform: scaleX(1); }
.nav-link.is-active { color: var(--accent); }
.chev { transition: transform .3s var(--ease); }
.has-mega { position: relative; }
.mega {
  position: absolute; top: calc(100% + 10px); left: 50%; translate: -50% 0;
  width: min(640px, 90vw); padding: 14px; border-radius: 6px;
  background: var(--white); box-shadow: var(--shadow); border: 1px solid var(--line);
  opacity: 0; visibility: hidden; transform: translateY(8px) scale(.98);
  transition: opacity .25s var(--ease), transform .3s var(--ease), visibility .3s;
}
.mega::before { content: ""; position: absolute; inset-inline: 0; top: -14px; height: 14px; }
.has-mega:hover .mega, .has-mega:focus-within .mega { opacity: 1; visibility: visible; transform: none; }
.has-mega:hover .chev { transform: rotate(180deg); }
.mega-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.mega-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 10px; border-radius: 4px; text-decoration: none; text-align: center; transition: background-color .25s, transform .3s var(--ease); }
.mega-card:hover { background: var(--ground); transform: translateY(-2px); }
.mega-ico { color: var(--accent); }
.mega-name { font-weight: 500; font-size: 14px; color: var(--ink); }
.mega-all .mega-ico { color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: 14px; }
.lang-switch { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; }
.lang-switch a { min-width: 44px; min-height: 34px; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600; text-decoration: none; color: var(--muted); transition: background-color .25s, color .25s; }
.lang-switch a[lang="fa"], .lang-switch a:last-child { font-family: 'Vazirmatn', sans-serif; }
.lang-switch a.on { background: var(--ink); color: var(--ground); }
.btn-wa { min-height: 44px; padding: 0 18px; }
.menu-toggle { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; position: relative; }
.menu-toggle span { position: absolute; inset-inline: 11px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .35s var(--ease), opacity .2s; }
.menu-toggle span:nth-child(1) { top: 15px; } .menu-toggle span:nth-child(2) { top: 21px; } .menu-toggle span:nth-child(3) { top: 27px; }
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.drawer-extra { display: none; }
.nav-scrim { position: fixed; inset: 0; background: rgba(20, 24, 36, .45); z-index: 48; opacity: 0; transition: opacity .35s; }
.menu-open .nav-scrim { opacity: 1; }

@media (max-width: 1060px) {
  /* backdrop-filter would trap the fixed drawer inside the header */
  .site-header, .site-header.is-scrolled { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--ground); }
  .main-nav {
    position: fixed; top: 0; bottom: 0; inset-inline-end: 0; z-index: 49;
    width: min(380px, 88vw); padding: 96px 24px 32px; overflow-y: auto;
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0;
    background: var(--ground); box-shadow: var(--shadow);
    transform: translateX(105%); visibility: hidden; transition: transform .45s var(--ease), visibility 0s .45s;
  }
  [dir="rtl"] .main-nav { transform: translateX(-105%); }
  .menu-open .main-nav { transform: none; visibility: visible; transition: transform .45s var(--ease), visibility 0s; }
  .nav-link { padding: 14px 4px; font-size: 18px; border-bottom: 1px solid var(--line); }
  .nav-link::after { display: none; }
  .has-mega .mega, .has-mega .chev { display: none; }
  .drawer-extra { display: block; margin-top: 28px; }
  .drawer-label { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
  .drawer-cat { display: flex; align-items: center; gap: 14px; padding: 10px 0; text-decoration: none; color: var(--ink); }
  .drawer-cat .ico { color: var(--accent); }
  .drawer-contact { margin-top: 24px; font-size: 14px; }
  .menu-toggle { display: inline-block; z-index: 51; }
  .header-in { grid-template-columns: 1fr auto; }
}
@media (max-width: 620px) {
  .header-actions .btn-wa { display: none; } /* the floating WhatsApp button covers it on phones */
  .header-in { gap: 12px; }
  .brand { min-width: 0; gap: 10px; }
  .brand-text { min-width: 0; }
  .brand-name { overflow: hidden; text-overflow: ellipsis; }
  .brand-tag { display: none; }
  .brand-name { font-size: 21px; }
  html[lang="fa"] .brand-name { font-size: 19px; }
  .brand-logo { height: 38px; }
  .topbar-banner, .topbar-hours { display: none; }
  .header-actions { gap: 8px; }
  .lang-switch a { min-width: 38px; padding: 0 8px; }
}

/* ---------- Flash & toast ---------- */
.flash { max-width: var(--wrap); margin: 16px auto 0; padding: 14px 18px; display: flex; gap: 10px; align-items: center; border-radius: var(--radius); animation: drop .5s var(--ease); width: calc(100% - 48px); }
.flash-success { background: #E5EEDF; color: #2C4A22; }
.flash-error { background: #F6E0DC; color: #7A2018; }
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } }
.toast { position: fixed; bottom: 28px; left: 50%; translate: -50% 0; z-index: 90; background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 14px; box-shadow: var(--shadow); opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .3s, transform .4s var(--ease); }
.toast.show { opacity: 1; transform: none; }

/* ---------- Motion ---------- */
.page-enter { animation: pageIn .7s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } }
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(48px, 7vw, 96px) clamp(56px, 8vw, 110px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { margin-bottom: 24px; }
.hero h1 em { font-style: italic; color: var(--accent); }
html[lang="fa"] .hero h1 em { font-style: normal; }
.hero .lead { margin-bottom: 36px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); }
.hero-fact { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.hero-fact .ico { color: var(--accent); }
.hero-mosaic { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 12px; height: clamp(360px, 46vw, 580px); }
.hero-mosaic .tile { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--ground-2); }
.hero-mosaic .tile:first-child { grid-column: span 2; grid-row: span 2; }
.hero-mosaic img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); animation: settle 1.8s var(--ease) forwards; }
.hero-mosaic .tile:nth-child(2) img { animation-delay: .15s; }
.hero-mosaic .tile:nth-child(3) img { animation-delay: .3s; }
@keyframes settle { to { transform: scale(1); } }
.tile .ph { width: 100%; height: 100%; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-mosaic { height: 420px; }
}

/* Placeholder when a piece has no photo yet */
.ph {
  display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.75);
  background-color: var(--ph, #8E2C23);
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 2px, transparent 2px 14px);
}
.ph-1 { --ph: #8E2C23; } .ph-2 { --ph: #6B4A33; } .ph-3 { --ph: #2E3A57; } .ph-4 { --ph: #5C5E3A; }

/* ---------- Category tiles ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.cat-tile { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius); text-decoration: none; color: #fff; isolation: isolate; }
.cat-tile img, .cat-tile .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.cat-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(20, 24, 36, .78), rgba(20, 24, 36, 0) 55%); z-index: 1; }
.cat-tile:hover img, .cat-tile:hover .ph { transform: scale(1.06); }
.cat-tile-body { position: absolute; inset-inline: 22px; bottom: 20px; z-index: 2; display: flex; flex-direction: column; gap: 6px; }
.cat-tile-ico { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(246, 241, 233, .16); backdrop-filter: blur(6px); margin-bottom: 6px; transition: background-color .3s, transform .4s var(--ease); }
.cat-tile:hover .cat-tile-ico { background: var(--accent); transform: rotate(-8deg); }
.cat-tile-name { font-family: var(--serif); font-size: 28px; font-weight: 600; line-height: 1.1; }
.cat-tile-count { font-size: 13px; opacity: .85; }
.cat-tile:hover { color: #fff; }

/* ---------- Product cards ---------- */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 44px 28px; }
.card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); }
.card:hover { color: var(--ink); }
.card-media { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius); margin-bottom: 12px; background: var(--ground-2); }
.card-media img, .card-media .ph { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease), filter .6s; }
.card:hover .card-media img, .card:hover .card-media .ph { transform: scale(1.05); }
.card-media::after { content: ""; position: absolute; inset: auto 0 0; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: var(--origin, left); transition: transform .5s var(--ease); }
[dir="rtl"] .card-media::after { --origin: right; }
.card:hover .card-media::after { transform: scaleX(1); }
.card-meta { font-size: 12px; color: var(--muted); letter-spacing: .08em; }
.card-title { font-family: var(--serif); font-size: 23px; font-weight: 600; line-height: 1.2; }
html[lang="fa"] .card-title { font-size: 18px; }
.card-sub { font-size: 14px; color: var(--muted); }
.card-price { font-weight: 600; margin-top: 2px; }
.card-price.is-sold { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.badge { position: absolute; top: 12px; inset-inline-start: 12px; padding: 4px 10px; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; background: var(--ground); color: var(--ink); border-radius: 2px; }
.badge-reserved { background: var(--gold); color: var(--ink); }
.badge-sold { background: var(--ink); color: var(--ground); }

/* ---------- Story / steps ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.story-media { aspect-ratio: 1 / 1; overflow: hidden; border-radius: var(--radius); }
.story-media img, .story-media .ph { width: 100%; height: 100%; object-fit: cover; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 32px; counter-reset: s; }
.step { border-top: 2px solid var(--ink); padding-top: 24px; }
.step-n { font-family: var(--serif); font-size: 44px; color: var(--accent); line-height: 1; }
.step h3 { font-family: var(--sans); font-size: 19px; font-weight: 600; margin: 12px 0 8px; }
.step p { color: var(--muted); margin: 0; }

/* Custom-order promo band with drifting icons */
.promo { position: relative; overflow: hidden; }
.promo-marquee { display: flex; gap: 18px; width: max-content; animation: drift 38s linear infinite; margin-top: 40px; }
[dir="rtl"] .promo-marquee { animation-direction: reverse; }
.promo:hover .promo-marquee { animation-play-state: paused; }
@keyframes drift { to { transform: translateX(-50%); } }
.promo-chip { display: inline-flex; align-items: center; gap: 12px; padding: 14px 22px 14px 16px; border: 1px solid rgba(246,241,233,.2); border-radius: 999px; color: var(--ground); text-decoration: none; white-space: nowrap; transition: background-color .3s, border-color .3s; }
.promo-chip:hover { background: rgba(246,241,233,.08); border-color: var(--sand); color: #fff; }
.promo-chip .ico { color: var(--sand); }

/* ---------- Map box (redesigned) ---------- */
.mapbox { position: relative; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); border-radius: 8px; overflow: hidden; background: var(--white); box-shadow: var(--shadow); border: 1px solid var(--line); }
.mapbox-stage { position: relative; min-height: 440px; background: #E9E1D2; color: var(--ink-2); overflow: hidden; }
.mapbox-stage iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
  filter: grayscale(.55) sepia(.28) saturate(1.1) contrast(1.02);
  opacity: 0; transform: scale(1.04); transition: opacity 1s var(--ease), transform 1.4s var(--ease), filter .8s var(--ease);
}
.mapbox-stage.is-loaded iframe { opacity: 1; transform: none; }
.mapbox:hover .mapbox-stage iframe { filter: none; }
.mapbox-cover { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; transition: opacity .8s var(--ease); }
.mapbox-stage.is-loaded .mapbox-cover { opacity: 0; pointer-events: none; }
.mapbox-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.mb-road { fill: none; stroke: #fff; stroke-width: 10; stroke-linecap: round; stroke-dasharray: 900; stroke-dashoffset: 900; animation: road 2.4s var(--ease) forwards; }
.mb-road-2 { stroke-width: 7; animation-delay: .3s; } .mb-road-3 { stroke-width: 6; animation-delay: .5s; }
.mb-river { fill: none; stroke: #B9C9CF; stroke-width: 16; stroke-linecap: round; opacity: .7; }
@keyframes road { to { stroke-dashoffset: 0; } }
.mapbox-pin { position: relative; color: var(--accent); filter: drop-shadow(0 6px 8px rgba(0,0,0,.25)); animation: bob 2.6s ease-in-out infinite; }
.mapbox-pin .pulse { position: absolute; left: 50%; bottom: -6px; width: 16px; height: 6px; translate: -50% 0; border-radius: 50%; background: rgba(142, 44, 35, .45); animation: pulse 2.6s ease-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(142,44,35,.45); } 100% { box-shadow: 0 0 0 26px rgba(142,44,35,0); } }
.mapbox-loading { position: absolute; bottom: 18px; inset-inline-start: 20px; font-size: 13px; color: var(--muted); }
.mapbox-card { position: relative; padding: clamp(28px, 4vw, 44px); display: flex; flex-direction: column; justify-content: center; gap: 14px; background: var(--white); }
.mapbox-card::before { content: ""; position: absolute; inset-block: 32px; inset-inline-start: 0; width: 1px; background: var(--line); }
.mapbox-card h3 { font-size: 34px; }
.mapbox-addr { display: flex; gap: 12px; align-items: flex-start; font-size: 17px; text-decoration: none; }
.mapbox-addr span { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 5px; transition: text-decoration-color .3s; }
.mapbox-addr:hover span { text-decoration-color: var(--accent); }
.mapbox-addr .ico, .mapbox-hours .ico { color: var(--accent); margin-top: 3px; }
.mapbox-hours { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); margin: 0; }
.mapbox-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.mapbox-actions .btn { min-height: 44px; padding-inline: 18px; font-size: 14px; }
.mapbox-actions .btn-dark { flex: 1 1 100%; }
.mapbox-compact { grid-template-columns: 1fr; }
.mapbox-compact .mapbox-stage { min-height: 260px; }
.mapbox-compact .mapbox-card::before { display: none; }
@media (max-width: 860px) {
  .mapbox { grid-template-columns: 1fr; }
  .mapbox-stage { min-height: 320px; }
  .mapbox-card::before { display: none; }
}

/* ---------- Page heads / breadcrumbs ---------- */
.page-head { padding-block: 44px 28px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs a { color: var(--muted); }
.page-head h1 { margin-bottom: 12px; }

/* ---------- Collection ---------- */
.cat-chips { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2); text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 500; background: transparent; cursor: pointer; transition: background-color .25s, color .25s, border-color .25s; }
.chip .ico { color: var(--accent); }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.chip.on .ico { color: var(--sand); }
.filter-bar { position: sticky; top: 68px; z-index: 20; background: rgba(246,241,233,.95); backdrop-filter: blur(8px); border-block: 1px solid var(--line); }
.filter-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; }
.filter-group { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.select { min-height: 44px; padding: 0 38px 0 14px; border: 1px solid var(--line-2); border-radius: var(--radius); background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%231F2A44' stroke-width='1.6'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center; appearance: none; font-size: 14px; cursor: pointer; }
[dir="rtl"] .select { padding: 0 14px 0 38px; background-position: left 14px center; }
.search-box { position: relative; }
.search-box input { min-height: 44px; width: 220px; padding-inline: 40px 14px; border: 1px solid var(--line-2); border-radius: var(--radius); background: transparent; }
.search-box .ico { position: absolute; inset-inline-start: 13px; top: 50%; translate: 0 -50%; color: var(--muted); }
.result-count { font-size: 14px; color: var(--muted); margin: 32px 0 24px; }
.empty { text-align: center; padding: 72px 24px; color: var(--muted); }
.empty .ico { color: var(--line-2); margin: 0 auto 16px; }
.pager { display: flex; justify-content: center; gap: 8px; margin-top: 56px; }
.pager a, .pager span { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-2); border-radius: var(--radius); text-decoration: none; }
.pager .on { background: var(--ink); color: var(--ground); border-color: var(--ink); }

/* ---------- Item page ---------- */
.item-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: start; padding-bottom: 80px; }
@media (max-width: 900px) { .item-grid { grid-template-columns: 1fr; } }
.gallery-main { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--ground-2); cursor: zoom-in; }
.gallery-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .5s var(--ease), transform .8s var(--ease); }
.gallery-main img.is-out { opacity: 0; transform: scale(1.03); }
.gallery-main .ph { width: 100%; height: 100%; }
.gallery-count { position: absolute; bottom: 14px; inset-inline-end: 14px; background: rgba(20,24,36,.7); color: #fff; font-size: 12px; padding: 4px 10px; border-radius: 999px; }
.thumbs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.thumb { aspect-ratio: 1; padding: 0; border: 2px solid transparent; border-radius: var(--radius); overflow: hidden; cursor: pointer; background: var(--ground-2); transition: border-color .25s, opacity .25s; opacity: .7; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.on, .thumb:hover { opacity: 1; }
.thumb.on { border-color: var(--ink); }
.item-info { position: sticky; top: 100px; }
.item-code { font-size: 12px; letter-spacing: .16em; color: var(--muted); margin-bottom: 10px; }
.item-info h1 { font-size: clamp(36px, 4vw, 52px); margin-bottom: 10px; }
.item-origin { font-size: 17px; color: var(--muted); }
.item-price { font-size: 28px; font-weight: 600; margin: 18px 0 26px; }
.item-price small { font-size: 14px; font-weight: 400; color: var(--muted); display: block; margin-top: 4px; }
.item-ctas { display: grid; gap: 10px; margin-bottom: 32px; }
.specs { display: grid; grid-template-columns: 140px 1fr; margin: 0 0 32px; border-top: 1px solid var(--line); }
.specs dt, .specs dd { padding: 12px 0; border-bottom: 1px solid var(--line); margin: 0; }
.specs dt { color: var(--muted); font-size: 14px; }
.info-box { background: var(--ground-2); padding: 22px 24px; border-radius: var(--radius); display: grid; gap: 10px; font-size: 15px; }
.info-box p { margin: 0; display: flex; gap: 10px; align-items: flex-start; color: var(--muted); }
.info-box .ico { color: var(--accent); margin-top: 3px; }
.lightbox { position: fixed; inset: 0; z-index: 95; background: rgba(12, 14, 22, .94); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s; }
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; transform: scale(.96); transition: transform .45s var(--ease); }
.lightbox.open img { transform: none; }
.lb-btn { position: absolute; width: 52px; height: 52px; border-radius: 50%; border: 0; background: rgba(255,255,255,.1); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lb-btn:hover { background: rgba(255,255,255,.2); }
.lb-close { top: 20px; inset-inline-end: 20px; }
.lb-prev { inset-inline-start: 20px; } .lb-next { inset-inline-end: 20px; }
[dir="rtl"] .lb-prev .ico, [dir="rtl"] .lb-next .ico { transform: scaleX(-1); }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; }
.field label, .field .label { font-size: 13px; font-weight: 600; color: var(--ink); }
.field .hint { font-size: 13px; color: var(--muted); font-weight: 400; }
.input, .textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--radius);
  background: var(--white); transition: border-color .25s, box-shadow .25s;
}
.textarea { min-height: 110px; resize: vertical; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(31, 42, 68, .1); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.inline-order { margin-top: 32px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.inline-order summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; justify-content: space-between; list-style: none; min-height: 44px; }
.inline-order summary::-webkit-details-marker { display: none; }
.inline-order[open] summary .ico { transform: rotate(45deg); }
.inline-order summary .ico { transition: transform .3s var(--ease); }
.inline-order form { margin-top: 18px; display: grid; gap: 16px; }

/* ---------- Custom order builder ---------- */
.builder { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; padding-bottom: 100px; }
@media (max-width: 1000px) { .builder { grid-template-columns: 1fr; } }
.progress { display: flex; gap: 6px; margin-bottom: 36px; counter-reset: p; }
.progress-step { flex: 1; display: flex; flex-direction: column; gap: 8px; font-size: 12px; color: var(--muted); background: none; border: 0; padding: 0; text-align: start; cursor: pointer; }
.progress-step::before { content: ""; height: 4px; border-radius: 2px; background: var(--line); transition: background-color .5s var(--ease); }
.progress-step.done::before, .progress-step.on::before { background: var(--accent); }
.progress-step.on { color: var(--ink); font-weight: 600; }
.progress-step[disabled] { cursor: default; }
@media (max-width: 620px) { .progress-step span { display: none; } }

.b-step { border: 0; padding: 0; margin: 0 0 48px; min-width: 0; }
.js .b-step { display: none; margin: 0; }
.js .b-step.on { display: block; animation: stepIn .55s var(--ease); }
.js .b-step.on.back { animation-name: stepBack; }
@keyframes stepIn { from { opacity: 0; transform: translateX(28px); } }
@keyframes stepBack { from { opacity: 0; transform: translateX(-28px); } }
[dir="rtl"] .js .b-step.on { animation-name: stepBack; }
[dir="rtl"] .js .b-step.on.back { animation-name: stepIn; }
.b-step legend { font-family: var(--serif); font-size: clamp(28px, 3vw, 38px); margin-bottom: 6px; padding: 0; }
.b-step legend:focus { outline: none; }
.b-step .step-hint { color: var(--muted); margin-bottom: 26px; }
.b-group { margin-bottom: 28px; }
.b-group-title { display: flex; align-items: center; gap: 10px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; font-family: var(--sans); font-weight: 600; }
html[lang="fa"] .b-group-title { letter-spacing: 0; font-size: 14px; }
.b-group-title .ico { color: var(--accent); }

.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt label {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center;
  min-height: 136px; padding: 18px 12px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--white);
  cursor: pointer; font-size: 14px; font-weight: 500; line-height: 1.3;
  transition: border-color .25s, transform .35s var(--ease), box-shadow .35s var(--ease), background-color .25s;
}
.opt label .ico { color: var(--ink-2); transition: color .25s, transform .45s var(--ease); }
.opt label:hover { border-color: var(--line-2); transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.opt label:hover .ico { transform: scale(1.08) rotate(-4deg); }
.opt input:checked + label { border-color: var(--accent); background: #FBF4EF; box-shadow: 0 0 0 3px rgba(142, 44, 35, .12); }
.opt input:checked + label .ico { color: var(--accent); }
.opt input:checked + label::after {
  content: ""; position: absolute; top: 10px; inset-inline-end: 10px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 14px no-repeat;
  animation: pop .35s var(--ease);
}
@keyframes pop { from { transform: scale(0); } }
.opt input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 3px; }
.opt.is-hidden { display: none; }
.opt-swatch { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12); position: absolute; bottom: 10px; inset-inline-end: 10px; }

.size-presets { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.size-presets .opt label { min-height: 48px; padding: 8px 18px; flex-direction: row; border-radius: 999px; }
.size-presets .opt input:checked + label::after { display: none; }
.size-custom { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 520px; }

.color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; }
.color-opt input { position: absolute; opacity: 0; }
.color-opt label { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; border-radius: 8px; border: 1.5px solid transparent; cursor: pointer; font-size: 13px; text-align: center; transition: border-color .25s, background-color .25s; }
.color-dot { width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(0,0,0,.1); box-shadow: inset 0 -6px 12px rgba(0,0,0,.12); transition: transform .35s var(--ease); }
.color-opt label:hover .color-dot { transform: scale(1.08); }
.color-opt input:checked + label { border-color: var(--accent); background: var(--white); }
.color-opt input:checked + label .color-dot { transform: scale(1.1); box-shadow: 0 0 0 3px var(--white), 0 0 0 5px var(--accent); }
.color-opt input:focus-visible + label { outline: 2px solid var(--accent); }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--white); }
.qty button { width: 48px; height: 48px; border: 0; background: none; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.qty input { width: 64px; text-align: center; border: 0; height: 48px; background: none; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.dropzone { position: relative; display: flex; align-items: center; gap: 14px; padding: 18px; border: 1.5px dashed var(--line-2); border-radius: 8px; background: var(--white); cursor: pointer; transition: border-color .25s, background-color .25s; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: #FBF4EF; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .ico { color: var(--accent); }
.dropzone img { width: 56px; height: 56px; object-fit: cover; border-radius: 4px; }

.b-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.no-js-submit { margin-top: 24px; }
.js .no-js-submit { display: none; }

.summary { position: sticky; top: 100px; background: var(--ink); color: var(--ground); border-radius: 8px; padding: 28px; overflow: hidden; }
.summary::before { content: ""; position: absolute; inset: -40% -30% auto auto; width: 260px; height: 260px; border-radius: 50%; border: 40px solid rgba(227, 185, 138, .07); }
[dir="rtl"] .summary::before { inset: -40% auto auto -30%; }
.summary h3 { font-size: 28px; margin-bottom: 18px; position: relative; }
.summary-visual { position: relative; height: 150px; display: flex; align-items: center; justify-content: center; margin-bottom: 18px; border-radius: 6px; background: rgba(246, 241, 233, .06); color: var(--sand); }
.summary-visual .ico { transition: transform .6s var(--ease), opacity .3s; }
.summary-visual.bump .ico { animation: bump .6s var(--ease); }
@keyframes bump { 40% { transform: scale(1.15) rotate(-6deg); } }
.summary-colors { position: absolute; bottom: 12px; display: flex; gap: 6px; }
.summary-colors span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--ink); animation: pop .35s var(--ease); }
.summary dl { margin: 0; display: grid; gap: 0; position: relative; }
.summary dl div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid rgba(246, 241, 233, .12); font-size: 14px; }
.summary dt { color: #B9B3A8; }
.summary dd { margin: 0; text-align: end; font-weight: 500; }
.summary dd.empty-val { color: #8A8478; font-weight: 400; }
.summary-note { font-size: 13px; color: #B9B3A8; margin: 18px 0 0; position: relative; }
@media (max-width: 1000px) { .summary { position: static; order: -1; } }

.done-card { max-width: 640px; margin: 40px auto 100px; text-align: center; padding: 48px 28px; background: var(--white); border-radius: 8px; box-shadow: var(--shadow); }
.done-check { width: 84px; height: 84px; margin: 0 auto 22px; border-radius: 50%; background: #E5EEDF; color: #2C4A22; display: flex; align-items: center; justify-content: center; }
.done-check .ico path { stroke-dasharray: 60; stroke-dashoffset: 60; animation: drawCheck .8s .2s var(--ease) forwards; }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }
.ref-pill { display: inline-block; font-family: ui-monospace, monospace; background: var(--ground-2); padding: 6px 14px; border-radius: 999px; margin: 8px 0 24px; direction: ltr; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #D9D3C7; margin-top: 0; }
.site-footer a { color: #D9D3C7; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 40px; padding-block: 64px 48px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h3 { font-family: var(--sans); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--sand); margin-bottom: 16px; font-weight: 600; }
html[lang="fa"] .site-footer h3 { letter-spacing: 0; font-size: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-brand .brand { color: var(--ground); margin-bottom: 18px; }
.footer-brand .brand-tag { color: #B9B3A8; }
.footer-brand .brand-mark { color: var(--sand); }
.footer-brand p { font-size: 14px; max-width: 320px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(246,241,233,.2); display: flex; align-items: center; justify-content: center; transition: background-color .3s, border-color .3s; }
.footer-social a:hover { background: var(--accent); border-color: var(--accent); }
.footer-contact { display: grid; gap: 12px; align-content: start; font-size: 14px; }
.footer-contact a, .footer-hours { display: inline-flex; gap: 10px; align-items: flex-start; }
.footer-contact .ico { margin-top: 3px; color: var(--sand); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-block: 20px; border-top: 1px solid rgba(246,241,233,.12); font-size: 13px; }
.lang-switch-sm { border-color: rgba(246,241,233,.2); }
.lang-switch-sm a { color: #D9D3C7; min-height: 30px; }
.lang-switch-sm a.on { background: var(--ground); color: var(--ink); }

.wa-float {
  position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 40;
  width: 60px; height: 60px; border-radius: 50%; background: #1F7A4D; color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 30px -8px rgba(31, 122, 77, .6);
  transition: transform .35s var(--ease); animation: floatIn .8s 1s var(--ease) both;
}
.wa-float:hover { color: #fff; transform: scale(1.08); }
@keyframes floatIn { from { opacity: 0; transform: translateY(30px) scale(.6); } }
@media (max-width: 380px) {
  .brand-logo { height: 34px; }
  .brand-name { font-size: 18px; }
  html[lang="fa"] .brand-name { font-size: 17px; }
  .lang-switch a { min-width: 32px; padding: 0 6px; }
}
