/* =========================================================================
   بهداد پسته — سیستم طراحی
   -------------------------------------------------------------------------
   موتیف اصلی: «طاق» (arch) — همان فرمی که در عکس محصولات و روی جعبه هست.
   این شکل در کارت محصول، تصاویر و بخش‌های صفحه تکرار می‌شود.
   ========================================================================= */

/* ---------- فونت‌ها ---------- */
@font-face { font-family: 'Peyda'; src: url('../fonts/Peyda-Light.woff2') format('woff2');   font-weight: 300; font-display: swap; }
@font-face { font-family: 'Peyda'; src: url('../fonts/Peyda-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Peyda'; src: url('../fonts/Peyda-Medium.woff2') format('woff2');  font-weight: 500; font-display: swap; }
@font-face { font-family: 'Peyda'; src: url('../fonts/Peyda-Bold.woff2') format('woff2');    font-weight: 700; font-display: swap; }
@font-face { font-family: 'Peyda'; src: url('../fonts/Peyda-Black.woff2') format('woff2');   font-weight: 900; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('../fonts/Gotham-Book.woff2') format('woff2');   font-weight: 400; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('../fonts/Gotham-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('../fonts/Gotham-Black.woff2') format('woff2');  font-weight: 900; font-display: swap; }

/* ---------- توکن‌ها ---------- */
:root {
  --green:      #004422;
  --green-700:  #0a5c31;
  --green-300:  #6f9d82;
  --lime:       #bcd85f;
  --lime-soft:  #e4f0be;
  --orange:     #f4793b;
  --cream:      #fffcdf;
  --cream-2:    #f7f2cf;
  --paper:      #ffffff;
  --ink:        #062616;
  --muted:      #5c6f63;
  --line:       rgba(0, 68, 34, 0.14);
  --line-soft:  rgba(0, 68, 34, 0.08);

  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;
  --arch: 999px 999px var(--r-md) var(--r-md);

  --shadow-sm: 0 1px 2px rgba(0,68,34,.06), 0 6px 18px rgba(0,68,34,.05);
  --shadow-md: 0 2px 6px rgba(0,68,34,.07), 0 18px 44px rgba(0,68,34,.10);
  --shadow-lg: 0 30px 80px rgba(0,68,34,.20);

  --pad: clamp(1.1rem, 4vw, 3.5rem);
  --maxw: 1240px;

  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);

  --header-h: 68px;
}

/* ---------- پایه ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  direction: rtl;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: 'Peyda', system-ui, sans-serif;
  font-weight: 400;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked { overflow: hidden; }

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2.5px solid var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}

/* اعداد و متن لاتین همیشه چپ‌به‌راست */
.ltr, .num {
  direction: ltr;
  unicode-bidi: isolate;
  font-family: 'Gotham', 'Peyda', sans-serif;
}

.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* لینک‌های پک ویژه وقتی پکی نیست؛ هیچ قاعدهٔ display نباید آشکارشان کند */
[data-bundles][hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- تایپوگرافی ---------- */
h1, h2, h3, h4 {
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--green);
}

.display {
  font-size: clamp(2.4rem, 7.2vw, 5.4rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.h-section {
  font-size: clamp(1.75rem, 4.2vw, 3rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* متن‌های لاتین: inline-block هستند تا در چیدمان RTL از سمت راست شروع شوند.
   (اگر block باشند، text-align:start نسبت به direction:ltr خودشان حساب
   می‌شود و به چپ می‌چسبند.) */
.eyebrow {
  display: inline-block;
  font-family: 'Gotham', sans-serif;
  font-weight: 500;
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--green-300);
  direction: ltr;
  unicode-bidi: isolate;
}

.lede {
  font-size: clamp(1.02rem, 1.6vw, 1.22rem);
  font-weight: 300;
  color: var(--muted);
  max-width: 56ch;
}

/* ---------- دکمه‌ها ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .95rem 1.7rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .98rem;
  line-height: 1;
  transition: transform .25s var(--ease), background-color .25s var(--ease),
              box-shadow .25s var(--ease), color .25s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--green);
  color: var(--cream);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--green-700); box-shadow: var(--shadow-md); }

.btn-lime { background: var(--lime); color: var(--green); }
.btn-lime:hover { background: #cbe479; }

.btn-ghost {
  border: 1.5px solid var(--line);
  color: var(--green);
}
.btn-ghost:hover { background: rgba(0,68,34,.05); border-color: var(--green); }

.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* =========================================================================
   هدر
   ========================================================================= */
.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background-color .4s var(--ease), box-shadow .4s var(--ease);
}
.site-header::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--cream);
  opacity: 0;
  transition: opacity .4s var(--ease);
  border-bottom: 1px solid var(--line-soft);
}
.site-header.is-stuck::before { opacity: 1; }

.header-inner {
  position: relative;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* دو لوگو روی هم قرار می‌گیرند و با اسکرول کراس‌فید می‌شوند */
.logo { flex-shrink: 0; display: block; position: relative; line-height: 0; }
.logo img { height: 30px; width: auto; transition: opacity .3s var(--ease); }
.logo .logo-cream { position: absolute; inset-block-start: 0; inset-inline-start: 0; }

.site-header .logo-green { opacity: 0; }
.site-header .logo-cream { opacity: 1; }
.site-header.is-stuck .logo-green { opacity: 1; }
.site-header.is-stuck .logo-cream { opacity: 0; }

.nav {
  display: flex;
  gap: 1.9rem;
  margin-inline-start: auto;
  font-size: .95rem;
  font-weight: 500;
}
.nav a {
  color: var(--cream);
  position: relative;
  transition: color .3s var(--ease);
}
.nav a::after {
  content: '';
  position: absolute;
  inset-block-end: -5px; inset-inline: 0;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: inline-end;
  transition: transform .35s var(--ease);
}
.nav a:hover::after { transform: scaleX(1); transform-origin: inline-start; }
.site-header.is-stuck .nav a { color: var(--green); }

.header-actions { display: flex; align-items: center; gap: .5rem; margin-inline-start: auto; }
.nav + .header-actions { margin-inline-start: 0; }

.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1.1rem;
  border-radius: 999px;
  background: var(--lime);
  color: var(--green);
  font-weight: 700;
  font-size: .92rem;
  transition: transform .25s var(--ease), background-color .25s var(--ease);
}
.cart-btn:hover { transform: translateY(-2px); background: #cbe479; }
.cart-btn svg { width: 18px; height: 18px; }

/* وقتی سبد خالی است اصلاً جا نمی‌گیرد، وگرنه سمت چپ دکمه فضای خالی می‌ماند */
.cart-count:not(.is-visible) { display: none; }

.cart-count {
  min-width: 21px; height: 21px;
  display: grid; place-items: center;
  padding-inline: 5px;
  border-radius: 999px;
  background: var(--green);
  color: var(--cream);
  font-size: .74rem;
  font-weight: 700;
  transform: scale(0);
  transition: transform .35s var(--ease-out);
}
.cart-count.is-visible { transform: scale(1); }
.cart-count.pop { animation: pop .45s var(--ease-out); }
@keyframes pop { 0%{transform:scale(1)} 40%{transform:scale(1.45)} 100%{transform:scale(1)} }

.account-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .6rem 1rem;
  border-radius: 999px;
  border: 1.5px solid rgba(255,252,223,.3);
  color: var(--cream);
  font-weight: 500;
  font-size: .9rem;
  transition: background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
  max-width: 190px;
}
.account-btn svg { width: 17px; height: 17px; flex-shrink: 0; }
.account-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-btn:hover { background: rgba(255,252,223,.14); border-color: var(--cream); }
.site-header.is-stuck .account-btn { color: var(--green); border-color: var(--line); }
.site-header.is-stuck .account-btn:hover { background: rgba(0,68,34,.06); border-color: var(--green); }

.menu-btn { display: none; }

/* =========================================================================
   ورود / ثبت‌نام
   ========================================================================= */
.auth-lede { color: var(--muted); font-weight: 300; font-size: .95rem; margin: 0 0 1.4rem; }

.auth-note {
  background: var(--lime-soft);
  border-radius: var(--r-sm);
  padding: .85rem 1rem;
  font-size: .84rem;
  line-height: 1.7;
  color: var(--green-700);
  margin-block-end: 1.2rem;
}
.auth-note strong { font-size: 1.15rem; letter-spacing: .28em; color: var(--green); }

.otp-input {
  text-align: center;
  font-size: 1.5rem !important;
  font-weight: 700;
  letter-spacing: .5em;
  text-indent: .5em;
  font-family: 'Gotham', 'Peyda', sans-serif;
}

.otp-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.otp-paste {
  font-size: .84rem;
  font-weight: 600;
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-block-end: .4rem;
}

.auth-alt {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-block-start: 1rem;
  font-size: .87rem;
}
.auth-alt button { color: var(--green); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.auth-alt button[disabled] { color: var(--muted); text-decoration: none; pointer-events: none; }

.auth-phone-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  background: var(--cream-2);
  border-radius: var(--r-sm);
  padding: .7rem 1rem;
  margin-block-end: 1.2rem;
  font-size: .9rem;
}

/* پروفایل */
.profile-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-block-end: 1.3rem;
  margin-block-end: 1.3rem;
  border-bottom: 1px solid var(--line-soft);
}
.avatar {
  width: 52px; height: 52px;
  border-radius: 999px 999px 12px 12px;
  background: var(--lime);
  color: var(--green);
  display: grid; place-items: center;
  font-weight: 900;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.profile-head .n { font-weight: 700; color: var(--green); font-size: 1.05rem; }
.profile-head .p { font-size: .87rem; color: var(--muted); }

.auth-tabs { display: flex; gap: .4rem; margin-block-end: 1.4rem; }
.auth-tab {
  flex: 1;
  padding: .6rem 1rem;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  font-size: .88rem;
  font-weight: 500;
  color: var(--muted);
  transition: all .25s var(--ease);
}
.auth-tab.is-active { background: var(--green); border-color: var(--green); color: var(--cream); font-weight: 700; }

.order-card {
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: 1rem 1.15rem;
  margin-block-end: .8rem;
  background: var(--paper);
}
.order-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-block-end: .6rem;
}
.order-ref { font-weight: 700; color: var(--green); font-size: .92rem; }
.order-date { font-size: .8rem; color: var(--muted); }
.order-items { font-size: .85rem; color: var(--muted); font-weight: 300; line-height: 1.7; }
.order-total { margin-block-start: .6rem; font-weight: 700; color: var(--green); font-size: .92rem; }

.empty-state { text-align: center; padding-block: 2.5rem; color: var(--muted); font-size: .92rem; }

/* =========================================================================
   هیرو
   ========================================================================= */
/* تمام‌صفحه روی همهٔ اندازه‌ها. ویدئو دو برش دارد (app.js انتخاب می‌کند):
   افقی برای صفحهٔ افقی و عمودی برای گوشی؛ هر دو طوری قاب شده‌اند که
   محصول بیرون از جای تیتر بیفتد. */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding-block: var(--header-h) clamp(3rem, 8vh, 6rem);
  overflow: hidden;
  background: var(--green);
  isolation: isolate;
}

.hero-media { position: absolute; inset: 0; z-index: -2; }

/* ویدئو — به‌محض آماده‌شدن، جای اسلایدشو را می‌گیرد.
   z-index لازم است: اسلایدها بعد از ویدئو در DOM هستند و بدون این،
   اسلاید فعال روی ویدئو می‌افتد و ویدئو دیده نمی‌شود. */
.hero-video {
  position: absolute; inset: 0;
  z-index: 1;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}
.hero-video.is-ready { opacity: 1; }

/* اسلایدشوی جایگزین تا وقتی ویدئو آماده شود */
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 2s var(--ease);
  will-change: opacity, transform;
}
.hero-slide.is-active {
  opacity: 1;
  animation: kenburns 12s linear forwards;
}
@keyframes kenburns {
  from { transform: scale(1.04); }
  to   { transform: scale(1.16); }
}

.hero-scrim {
  position: absolute; inset: 0; z-index: -1;
  /* فقط پشت متن تیره است (راست و پایین) و بالای صفحه برای هدر؛
     محصول که سمت چپ و بالاست روشن و زنده می‌ماند */
  background:
    linear-gradient(to left, rgba(0,42,21,.72) 0%, rgba(0,42,21,.38) 38%, rgba(0,42,21,0) 60%),
    linear-gradient(to top, rgba(0,42,21,.88) 0%, rgba(0,42,21,.4) 35%, rgba(0,42,21,0) 60%, rgba(0,42,21,0) 80%, rgba(0,42,21,.5) 100%);
}

.hero-content { position: relative; width: 100%; }

/* بلندترین سطر تیتر حدود ۹٫۵ برابر اندازهٔ فونت است؛ با این سقف تیتر از
   نیمهٔ راست صفحه بیرون نمی‌زند و روی محصول نمی‌افتد */
.hero h1 { color: var(--cream); font-size: clamp(2.4rem, 4.4vw, 4.4rem); }
.hero h1 em {
  font-style: normal;
  color: var(--lime);
}

.hero-sub {
  margin-block-start: 1.4rem;
  color: rgba(255,252,223,.82);
  font-weight: 300;
  font-size: clamp(1.02rem, 1.7vw, 1.28rem);
  max-width: 44ch;
}

.hero-cta {
  margin-block-start: 2.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
}
.hero .btn-ghost { border-color: rgba(255,252,223,.42); color: var(--cream); }
.hero .btn-ghost:hover { background: rgba(255,252,223,.12); border-color: var(--cream); }

.scroll-cue {
  position: absolute;
  inset-block-end: 1.6rem;
  inset-inline-start: var(--pad);
  display: flex;
  align-items: center;
  gap: .6rem;
  color: rgba(255,252,223,.6);
  font-size: .8rem;
}
.scroll-cue span { width: 1px; height: 34px; background: currentColor; animation: cue 2s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0%,100%{transform:scaleY(.35);opacity:.4} 50%{transform:scaleY(1);opacity:1} }

/* =========================================================================
   نوار اعتماد
   ========================================================================= */
.trust {
  background: var(--green);
  color: var(--cream);
  padding-block: 1.1rem;
  overflow: hidden;
}
/* app.js آیتم‌ها را آن‌قدر تکرار می‌کند که هر نیمهٔ نوار از عرض صفحه پهن‌تر
   باشد، و مدت را با طولش تنظیم می‌کند. فاصله با margin است نه gap تا دو نیمه
   دقیقاً هم‌طول باشند و جابه‌جایی ۵۰٪ بی‌پرش و بی‌جای‌خالی برگردد. */
.trust-track {
  display: flex;
  width: max-content;
  animation: marquee var(--trust-dur, 34s) linear infinite;
}
.trust:hover .trust-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(50%); } }

.trust-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-inline-end: 3.5rem;
  font-size: .93rem;
  font-weight: 500;
  white-space: nowrap;
  color: rgba(255,252,223,.9);
}
.trust-item::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--lime);
  flex-shrink: 0;
}

/* =========================================================================
   بخش‌ها
   ========================================================================= */
.section { padding-block: clamp(3.75rem, 9vw, 7.5rem); }
.section-head { margin-block-end: clamp(2rem, 4vw, 3.25rem); }
.section-head .eyebrow { display: block; margin-block-end: .85rem; }
.section-head .lede { margin-block-start: 1rem; }

.head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

/* =========================================================================
   کارت محصول
   ========================================================================= */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: clamp(1.1rem, 2vw, 1.9rem);
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  /* بالای کارت هم «طاق» است، هم‌مرکز با طاق عکس: چون فاصلهٔ بالا و
     کناره‌ها یکی است، حاشیهٔ سفید دور عکس همه‌جا یک‌اندازه می‌ماند */
  border-radius: 999px 999px var(--r-lg) var(--r-lg);
  padding: .75rem .75rem 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out);
}
/* فقط جایی که واقعاً hover هست؛ روی گوشی لمس، hover را هم روشن می‌کرد و
   بالا پریدن کارت وسط چرخش، حس پرش می‌داد */
@media (hover: hover) {
  .card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
}

/* موتیف طاق */
/* قاب طاق دو رو دارد: عکس و توضیحات. overflow روی خود قاب نیست چون
   چرخش سه‌بعدی را صاف می‌کند؛ هر رو جدا طاقی و بریده است. */
.card-media {
  position: relative;
  aspect-ratio: 1 / 1.06;
  perspective: 1400px;
}
.card-flip {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  /* منحنی متقارن: نیمهٔ زمان دقیقاً نیمهٔ چرخش است (لبه‌به‌لبه)، پس جابه‌جایی
     دو رو در .4s درست همان لحظه‌ای است که کارت از نیم‌رخ دیده می‌شود */
  transition: transform .8s cubic-bezier(.45, 0, .55, 1);
}
.card.is-flipped .card-flip { transform: rotateY(180deg); }
.card-face {
  position: absolute; inset: 0;
  border-radius: var(--arch);
  overflow: hidden;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.card-media.has-desc { cursor: pointer; }
.card-front { background: var(--cream-2); }
/* هر رو دقیقاً وسط چرخش (لبه‌به‌لبه) پنهان یا پیدا می‌شود. backface-visibility
   به‌تنهایی در سافاری موبایل به برچسب‌ها (که backdrop-filter دارند) نمی‌رسید و
   برچسب‌ها وارونه از پشت روی سبز دیده می‌شدند. */
.card-front,
.card-back { transition: visibility 0s linear .4s; }
.card.is-flipped .card-front { visibility: hidden; }
.card-back { visibility: hidden; }
.card.is-flipped .card-back { visibility: visible; }
.card-back {
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  /* بالای طاق گرد است؛ متن از زیر انحنا شروع می‌شود؛ پایین جای «بستن» */
  padding: 30% 1.5rem 3.4rem;
  background: var(--green);
  color: var(--cream);
  text-align: center;
  overflow-y: auto;
  cursor: pointer;
}
/* margin خودکار وسط‌چین می‌کند ولی اگر متن بلند بود، اسکرول از اولش است */
.card-back p { margin-block: auto; font-size: .95rem; line-height: 1.95; white-space: pre-line; }
.card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease-out), opacity .35s var(--ease);
}
@media (hover: hover) {
  .card:hover .card-media img { transform: scale(1.045); }
}

/* پایین کادر قرار می‌گیرند چون بالای کادر «طاق» است و برچسب را می‌بُرد */
.card-badges {
  position: absolute;
  inset-block-end: .7rem;
  inset-inline: .7rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: .3rem;
}
.badge {
  padding: .3rem .7rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.5;
  background: var(--lime);
  color: var(--green);
}
.badge-soft { background: rgba(255,255,255,.9); color: var(--green); box-shadow: var(--shadow-sm); }
.badge-save { background: var(--orange); color: #fff; }

.card-body { padding: 1.15rem .6rem 0; display: flex; flex-direction: column; flex: 1; }

/* «توضیحات» روی عکس، ته ردیف برچسب‌ها (گوشهٔ پایین چپ) */
.desc-btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  margin-inline-start: auto;
  padding: .3rem .7rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.5;
  background: rgba(255,255,255,.92);
  color: var(--green);
  box-shadow: var(--shadow-sm);
  transition: background-color .2s var(--ease);
}
.desc-btn svg { width: 13px; height: 13px; }
.desc-btn:hover { background: #fff; }
/* «بستن» همان گوشه روی روی سبز */
.desc-close {
  position: absolute;
  inset-block-end: .7rem;
  inset-inline-end: .7rem;
  background: rgba(255,252,223,.14);
  color: var(--cream);
  box-shadow: none;
}
.desc-close:hover { background: rgba(255,252,223,.24); }

.card-title {
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--green);
}
.card-tagline {
  font-size: .86rem;
  color: var(--muted);
  font-weight: 300;
  margin-block-start: .15rem;
  min-height: 2.4em;
}

/* انتخاب وزن/طعم — کلیک مستقیم روی کارت، بدون رفتن به صفحهٔ محصول */
.variants {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-block-start: .9rem;
}
.variant {
  padding: .42rem .82rem;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  font-size: .82rem;
  font-weight: 500;
  color: var(--muted);
  transition: all .25s var(--ease);
  line-height: 1.5;
}
.variant:hover { border-color: var(--green-300); color: var(--green); }
.variant.is-active {
  background: var(--green);
  border-color: var(--green);
  color: var(--cream);
  font-weight: 700;
}

/* دکمه سمت راست (اول نگاه)، قیمت سمت چپ. row-reverse تا در DOM قیمت
   همچنان قبل از دکمه خوانده شود. */
.card-foot {
  margin-block-start: auto;
  padding-block-start: 1.1rem;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.card-foot .price, .bundle-foot .price { align-items: flex-end; }

.price { display: flex; flex-direction: column; line-height: 1.3; }
.price-now { font-size: 1.08rem; font-weight: 700; color: var(--green); }
.price-now .unit { font-size: .78rem; font-weight: 400; color: var(--muted); margin-inline-start: .2rem; }
.price-was {
  font-size: .82rem;
  color: var(--muted);
  text-decoration: line-through;
  opacity: .75;
}

.add-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .72rem 1.15rem;
  border-radius: 999px;
  background: var(--green);
  color: var(--cream);
  font-weight: 700;
  font-size: .88rem;
  transition: transform .25s var(--ease), background-color .25s var(--ease);
  flex-shrink: 0;
}
.add-btn:hover { background: var(--green-700); transform: translateY(-2px); }
.add-btn.is-added { background: var(--lime); color: var(--green); }
.add-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.card.is-soon { opacity: .95; }
.card.is-soon .card-media img { filter: grayscale(.35); }

/* =========================================================================
   باندل‌ها
   ========================================================================= */
.bundles { background: var(--green); color: var(--cream); }
.bundles h2, .bundles .h-section { color: var(--cream); }
.bundles .lede { color: rgba(255,252,223,.72); }
.bundles .eyebrow { color: var(--lime); }

.bundle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(1.1rem, 2vw, 1.7rem);
}

.bundle {
  display: flex;
  flex-direction: column;
  background: rgba(255,252,223,.06);
  border: 1px solid rgba(255,252,223,.14);
  border-radius: 999px 999px var(--r-lg) var(--r-lg); /* مثل کارت محصول */
  padding: .8rem .8rem 1.4rem;
  transition: transform .45s var(--ease-out), background-color .45s var(--ease);
}
.bundle:hover { transform: translateY(-6px); background: rgba(255,252,223,.1); }

.bundle-media {
  position: relative;
  border-radius: var(--arch);
  overflow: hidden;
  aspect-ratio: 1 / .92;
  background: var(--cream-2);
}
.bundle-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.bundle:hover .bundle-media img { transform: scale(1.045); }

.bundle-body { padding: 1.2rem .7rem 0; display: flex; flex-direction: column; flex: 1; }
.bundle-title { color: var(--cream); font-size: 1.2rem; font-weight: 700; }
.bundle-tagline { color: rgba(255,252,223,.6); font-size: .87rem; font-weight: 300; margin-block-start: .15rem; }

.bundle-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .42rem;
}
.bundle-list li {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  font-size: .87rem;
  font-weight: 300;
  color: rgba(255,252,223,.8);
  line-height: 1.6;
}
.bundle-list li::before {
  content: '';
  width: 5px; height: 5px;
  margin-block-start: .62rem;
  border-radius: 999px;
  background: var(--lime);
  flex-shrink: 0;
}

.bundle-foot {
  margin-block-start: auto;
  padding-block-start: 1.3rem;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
}
.bundle .price-now { color: var(--cream); font-size: 1.15rem; }
.bundle .price-now .unit { color: rgba(255,252,223,.6); }
.bundle .price-was { color: rgba(255,252,223,.5); }

/* مثل برچسب‌های محصول، پایین کادر می‌نشیند تا «طاق» آن را نبُرد */
.save-tag {
  position: absolute;
  inset-block-end: .85rem;
  inset-inline-start: .85rem;
  background: var(--orange);
  color: #fff;
  padding: .35rem .8rem;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 700;
}

/* =========================================================================
   داستان برند
   ========================================================================= */
.story {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.story-media {
  position: relative;
  border-radius: 999px 999px var(--r-lg) var(--r-lg);
  overflow: hidden;
  aspect-ratio: 1 / 1.25; /* هم‌نسبت با عکس اصلی (۱۰۸۰×۱۳۵۰) تا برشی نخورد */
  box-shadow: var(--shadow-md);
}
.story-media img { width: 100%; height: 100%; object-fit: cover; }

.story-tagline {
  margin: .6rem 0 0;
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  font-weight: 500;
  color: var(--green-700);
}
.story-text { margin-block-start: 1.5rem; max-width: 56ch; }
.story-text p {
  margin: 0 0 1rem;
  font-size: clamp(.98rem, 1.4vw, 1.08rem);
  font-weight: 300;
  line-height: 1.95;
  color: var(--muted);
}
/* جملهٔ آخر داستان، پررنگ‌تر و با خط سبز کنارش */
.story-text .story-close {
  margin: 0;
  padding-inline-start: 1rem;
  border-inline-start: 3px solid var(--lime);
  font-weight: 500;
  color: var(--green);
}

.pillars-title {
  margin-block-start: 2.5rem;
  font-size: 1.15rem;
}
.pillars-title + .pillars { margin-block-start: 1.35rem; }

.pillars {
  margin-block-start: 2.5rem;
  display: grid;
  gap: 1.35rem;
}
.pillar { display: flex; gap: 1rem; align-items: flex-start; }
.pillar-icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 999px 999px 8px 8px;
  background: var(--lime-soft);
  color: var(--green);
  display: grid; place-items: center;
}
.pillar-icon svg { width: 19px; height: 19px; }
.pillar h4 { font-size: 1rem; font-weight: 700; }
.pillar p { margin: .15rem 0 0; font-size: .89rem; color: var(--muted); font-weight: 300; line-height: 1.65; }

/* =========================================================================
   پرسش‌های پرتکرار
   ========================================================================= */
/* هم‌عرض بقیهٔ بخش‌ها (.wrap)؛ فقط متن پاسخ برای خوانایی کوتاه‌تر می‌ماند */
.faq-item { border-bottom: 1px solid var(--line-soft); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 0;
  text-align: start;
  font-size: 1.04rem;
  font-weight: 700;
  color: var(--green);
}
.faq-q svg { width: 18px; height: 18px; flex-shrink: 0; transition: transform .4s var(--ease); }
.faq-item.is-open .faq-q svg { transform: rotate(45deg); }
.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .45s var(--ease);
}
.faq-item.is-open .faq-a { grid-template-rows: 1fr; }
.faq-a > div { overflow: hidden; }
.faq-a p { margin: 0; padding-block-end: 1.4rem; color: var(--muted); font-weight: 300; max-width: 72ch; }

/* =========================================================================
   فوتر
   ========================================================================= */
.site-footer {
  background: var(--green);
  color: rgba(255,252,223,.72);
  padding-block: clamp(3rem, 6vw, 5rem) 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(140px, .8fr));
  gap: clamp(2rem, 4vw, 4rem);
  padding-block-end: 2.8rem;
  border-bottom: 1px solid rgba(255,252,223,.14);
}
.site-footer img { height: 46px; width: auto; }
.footer-about { margin-block-start: 1.2rem; font-weight: 300; font-size: .93rem; max-width: 34ch; }
.site-footer h5 {
  color: var(--cream);
  font-size: .95rem;
  font-weight: 700;
  margin: 0 0 1rem;
}
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; font-size: .92rem; font-weight: 300; }
.footer-links a { transition: color .25s var(--ease); }
.footer-links a:hover { color: var(--lime); }
.trust-seal {
  display: inline-block;
  background: var(--paper);
  border-radius: var(--r-sm);
  padding: .4rem;
  line-height: 0;
}
/* قاعدهٔ «.site-footer img» برای لوگوی برند است؛ مهر اینماد اندازهٔ خودش را نگه دارد */
.site-footer .trust-seal img { height: auto; width: auto; max-width: 110px; }
.footer-bottom {
  padding-block-start: 1.6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .82rem;
  color: rgba(255,252,223,.45);
}

/* =========================================================================
   کشوی سبد خرید
   ========================================================================= */
.scrim {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(6,38,22,.5);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s var(--ease);
}
.scrim.is-open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  z-index: 210;
  width: min(440px, 100vw);
  background: var(--cream);
  display: flex;
  flex-direction: column;
  /* صفحه RTL است، پس inset-inline-start یعنی لبهٔ راست؛
     برای پنهان‌کردن باید به سمت راست (X مثبت) خارج شود. */
  transform: translateX(102%);
  transition: transform .5s var(--ease-out);
  box-shadow: var(--shadow-lg);
}
.drawer.is-open { transform: translateX(0); }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 1.5rem;
  border-bottom: 1px solid var(--line-soft);
  flex-shrink: 0;
}
.drawer-head h3 { font-size: 1.15rem; }
.icon-btn {
  width: 38px; height: 38px;
  border-radius: 999px;
  display: grid; place-items: center;
  color: var(--green);
  transition: background-color .25s var(--ease);
}
.icon-btn:hover { background: rgba(0,68,34,.08); }
.icon-btn svg { width: 19px; height: 19px; }

.drawer-body { flex: 1; overflow-y: auto; padding: 1.25rem 1.5rem; }

.cart-empty { text-align: center; padding-block: 3.5rem; color: var(--muted); }
.cart-empty svg { width: 46px; height: 46px; margin-inline: auto; opacity: .3; margin-block-end: 1rem; }

.cart-line { display: flex; gap: .9rem; padding-block: 1rem; border-bottom: 1px solid var(--line-soft); }
.cart-line:last-child { border-bottom: 0; }
.cart-thumb {
  width: 74px; height: 82px;
  border-radius: 999px 999px 8px 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--paper);
}
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-info { flex: 1; min-width: 0; }
.cart-name { font-weight: 700; font-size: .95rem; color: var(--green); line-height: 1.45; }
.cart-variant { font-size: .8rem; color: var(--muted); font-weight: 300; }

/* عوض‌کردن وزن/طعم داخل سبد؛ هر گزینه قیمت خودش را هم دارد */
.cart-options { display: flex; flex-wrap: wrap; gap: .35rem; margin-block-start: .45rem; }
.cart-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: .34rem .7rem .38rem;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  font-size: .76rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--muted);
  text-align: start;
  transition: border-color .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease);
}
.cart-option small { font-size: .7rem; font-weight: 400; opacity: .85; }
.cart-option:hover { border-color: var(--green-300); color: var(--green); }
.cart-option.is-active {
  border-color: var(--green);
  background: var(--green);
  color: var(--cream);
  font-weight: 700;
}
.cart-line-foot { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-block-start: .55rem; }

.qty { display: flex; align-items: center; gap: .1rem; border: 1.5px solid var(--line); border-radius: 999px; padding: .12rem; }
.qty button {
  width: 27px; height: 27px;
  border-radius: 999px;
  display: grid; place-items: center;
  color: var(--green);
  font-weight: 700;
  transition: background-color .2s var(--ease);
}
.qty button:hover { background: rgba(0,68,34,.09); }
.qty output { min-width: 26px; text-align: center; font-size: .9rem; font-weight: 700; }
.cart-line-price { font-weight: 700; font-size: .93rem; color: var(--green); }

.drawer-foot {
  flex-shrink: 0;
  padding: 1.25rem 1.5rem calc(1.25rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line-soft);
  background: var(--cream-2);
}
.sum-row { display: flex; justify-content: space-between; font-size: .92rem; margin-block-end: .5rem; color: var(--muted); }
.sum-row.total { font-size: 1.12rem; font-weight: 700; color: var(--green); margin-block: .8rem; }
.ship-note { font-size: .8rem; color: var(--green-700); background: var(--lime-soft); padding: .55rem .8rem; border-radius: var(--r-sm); margin-block-end: .9rem; }

/* =========================================================================
   تسویه‌حساب
   ========================================================================= */
.modal {
  position: fixed; inset: 0; z-index: 220;
  display: grid; place-items: center;
  padding: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity .35s var(--ease);
}
.modal.is-open { opacity: 1; pointer-events: auto; }
.modal-card {
  position: relative;
  background: var(--cream);
  border-radius: var(--r-lg);
  width: min(560px, 100%);
  max-height: min(88svh, 820px);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: translateY(22px) scale(.98);
  transition: transform .45s var(--ease-out);
  overflow: hidden;
}
.modal.is-open .modal-card { transform: translateY(0) scale(1); }
.modal-body { overflow-y: auto; padding: 1.5rem; }

.field { margin-block-end: 1rem; }
.field label { display: block; font-size: .88rem; font-weight: 500; margin-block-end: .4rem; color: var(--green); }
.field input, .field textarea, .field select {
  width: 100%;
  padding: .85rem 1rem;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--line);
  background: var(--paper);
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.field textarea { resize: vertical; min-height: 84px; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0,68,34,.1);
}
.field input::placeholder, .field textarea::placeholder { color: #a8b5ac; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
.field-error { color: var(--orange); font-size: .8rem; margin-block-start: .3rem; display: none; }
.field.has-error input, .field.has-error textarea { border-color: var(--orange); }
.field.has-error .field-error { display: block; }

.pay-options { display: grid; gap: .6rem; }
/* دو کلاسه تا از `.field label { display: block }` جلو بزند */
.pay-options .pay-option {
  display: flex; align-items: center; gap: .75rem;
  padding: .95rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--paper);
  cursor: pointer;
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.pay-option:has(input:checked) { border-color: var(--green); background: var(--lime-soft); }
.pay-option input { accent-color: var(--green); width: 18px; height: 18px; }
.pay-option .t { font-weight: 700; font-size: .93rem; color: var(--green); }
.pay-option .d { font-size: .8rem; color: var(--muted); font-weight: 300; }
.pay-option-price { margin-inline-start: auto; font-size: .85rem; font-weight: 700; color: var(--green); white-space: nowrap; }

.order-review {
  background: var(--cream-2);
  border-radius: var(--r-md);
  padding: 1rem 1.15rem;
  margin-block-end: 1.4rem;
}
.order-review .sum-row:last-child { margin-block-end: 0; }
.sum-row.is-discount { color: var(--green-700); font-weight: 500; }
.sum-row.is-discount .ltr { font-size: .78rem; letter-spacing: .08em; }
/* مبلغ پیش از تخفیف کنار مبلغ تازه؛ روی گوشی اگر جا نشد، بالایش می‌رود و
   نه اینکه «تومان» تنها به خط بعد بیفتد */
.sum-row.total > span:first-child { white-space: nowrap; }
.sum-amount {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-end;
  column-gap: .55rem;
}
.sum-amount > span { white-space: nowrap; }
.sum-was { font-size: .8rem; font-weight: 400; color: var(--muted); }

.success { text-align: center; padding: 2.5rem 1.5rem; }
.success-mark {
  width: 68px; height: 68px;
  margin-inline: auto;
  border-radius: 999px;
  background: var(--lime);
  color: var(--green);
  display: grid; place-items: center;
  margin-block-end: 1.3rem;
}
.success-mark svg { width: 30px; height: 30px; }

/* نتیجهٔ پرداخت وقتی موفق نبوده — همان دایره با رنگ متفاوت، تا مشتری
   بدون خواندن متن هم بفهمد کار تمام نشده است. */
.success-mark.is-warn { background: rgba(244,121,59,.16); color: #b1451a; }
.success-mark.is-bad  { background: rgba(193,48,48,.12);  color: #a32020; }

/* =========================================================================
   توست
   ========================================================================= */
.toast {
  position: fixed;
  inset-block-end: 1.5rem;
  inset-inline-start: 50%;
  z-index: 300;
  background: var(--green);
  color: var(--cream);
  padding: .85rem 1.4rem;
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: .55rem;
  max-width: calc(100vw - 2rem);
  /* بسته که باشد کاملاً زیر صفحه و پنهان است؛ قبلاً translate(50%, 130%)
     ده پیکسل بالایش را پایین وسط صفحه بیرون می‌گذاشت (نیم‌دایرهٔ سبز) */
  transform: translate(50%, calc(100% + 2rem + env(safe-area-inset-bottom)));
  visibility: hidden;
  transition: transform .5s var(--ease-out), visibility 0s linear .5s;
}
.toast.is-visible {
  transform: translate(50%, 0);
  visibility: visible;
  transition: transform .5s var(--ease-out), visibility 0s;
}
.toast svg { width: 17px; height: 17px; color: var(--lime); flex-shrink: 0; }

/* =========================================================================
   بازگشت به بالای صفحه
   ========================================================================= */
.to-top {
  position: fixed;
  inset-block-end: calc(1.25rem + env(safe-area-inset-bottom));
  inset-inline-end: 1.25rem; /* در RTL یعنی گوشهٔ پایین چپ */
  z-index: 90;
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--lime);
  color: var(--green);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(.75rem);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s linear .3s, background-color .25s var(--ease);
}
.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s, background-color .25s var(--ease);
}
.to-top:hover { background: #cbe479; }
.to-top svg { width: 20px; height: 20px; }

/* =========================================================================
   منوی موبایل
   ========================================================================= */
.mobile-menu {
  position: fixed;
  inset-block-start: var(--header-h);
  inset-inline: 0;
  z-index: 99;
  background: var(--cream);
  border-bottom: 1px solid var(--line-soft);
  box-shadow: var(--shadow-md);
  display: grid;
  padding: .5rem var(--pad) 1.1rem;
  /* بسته که باشد کاملاً پنهان است؛ قبلاً با translateY(-115%) لبهٔ پایینش
     از پشت هدرِ شفاف روی هیرو بیرون می‌زد و بالای هدر را می‌پوشاند */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-.75rem);
  transition: opacity .3s var(--ease-out), transform .45s var(--ease-out), visibility 0s linear .45s;
}
.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .3s var(--ease-out), transform .45s var(--ease-out), visibility 0s;
}
body.has-announcement .mobile-menu { inset-block-start: calc(var(--header-h) + var(--ann-h)); }
.mobile-menu a {
  padding: .85rem 0;
  font-weight: 700;
  color: var(--green);
  border-bottom: 1px solid var(--line-soft);
}
.mobile-menu a:last-child { border-bottom: 0; }
@media (min-width: 721px) { .mobile-menu { display: none; } }

/* =========================================================================
   انیمیشن ورود هنگام اسکرول
   ========================================================================= */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.reveal.is-in { opacity: 1; transform: none; }

/* =========================================================================
   واکنش‌گرایی
   ========================================================================= */
@media (max-width: 900px) {
  .story { grid-template-columns: 1fr; }
  .story-media { aspect-ratio: 1 / 1; max-height: 60svh; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  :root { --header-h: 60px; }
  .nav { display: none; }
  .menu-btn {
    display: grid;
    place-items: center;
    width: 38px; height: 38px;
    color: var(--cream);
    margin-inline-start: auto;
  }
  .site-header.is-stuck .menu-btn { color: var(--green); }
  .header-actions { margin-inline-start: 0; }
  .logo img { height: 26px; }
  /* روی موبایل فقط آیکون؛ جا برای لوگو و سبد باز می‌شود */
  .account-btn { padding: .55rem; border-radius: 999px; }
  .account-btn span { display: none; }
  .cart-btn span:not(.cart-count) { display: none; }
  .header-actions { gap: .35rem; }
  /* گوشی: برش عمودی محصول را در بالای صفحه نگه می‌دارد؛ متن پایین است */
  .hero { padding-block-end: 2.25rem; }
  .hero-scrim {
    background: linear-gradient(to bottom,
      rgba(0,42,21,.55) 0,
      rgba(0,42,21,0) calc(var(--header-h) + 2rem),
      rgba(0,42,21,0) 30%,
      rgba(0,42,21,.7) 50%,
      rgba(0,42,21,.92) 100%);
  }
  .hero-sub { margin-block-start: 1.1rem; }
  /* دو دکمه کنار هم و هم‌عرض */
  .hero-cta { gap: .6rem; margin-block-start: 1.7rem; }
  .hero-cta .btn { flex: 1; padding-inline: .8rem; }
  .scroll-cue { display: none; }
  /* یک محصول در هر ردیف: عکس بزرگ‌تر و دکمهٔ خرید پهن و راحت برای لمس */
  .product-grid { grid-template-columns: 1fr; gap: 1.1rem; }
  .card-media { aspect-ratio: 1 / .92; }
  .add-btn {
    flex: 1;
    justify-content: center;
    padding: .95rem 1rem;
    font-size: .95rem;
  }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .field-row { grid-template-columns: 1fr; }
  .drawer { width: 100vw; }
  .modal { padding: 0; align-items: flex-end; }
  .modal-card { max-height: 92svh; border-radius: var(--r-lg) var(--r-lg) 0 0; width: 100%; }
}

/* گوشی‌های کوتاه (مثل iPhone SE): متن هیرو جمع‌وجورتر تا بالای صفحه
   جای کافی برای دیده‌شدن محصول در ویدئو بماند */
@media (max-width: 720px) and (max-height: 760px) {
  .hero { padding-block-end: 1.5rem; }
  .hero h1 { font-size: 2.1rem; }
  .hero-sub { margin-block-start: .8rem; font-size: .95rem; line-height: 1.65; }
  .hero-cta { margin-block-start: 1.2rem; gap: .55rem; }
  .hero-cta .btn { padding-block: .85rem; }
}

/* ---------- کاهش حرکت ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-slide.is-active { animation: none; }
}

/* ---------- چاپ ---------- */
@media print {
  .site-header, .drawer, .scrim, .modal, .toast, .to-top, .scroll-cue { display: none !important; }
}

/* =========================================================================
   حالت‌های داده‌ای — بارگذاری، خطا، وضعیت سفارش، نشانی‌ها
   -------------------------------------------------------------------------
   از وقتی محتوا از بک‌اند می‌آید، صفحه سه حالت دارد نه یکی:
   «در حال آمدن»، «آمد» و «نیامد». این بخش دو حالت اول و آخر را می‌سازد.
   ========================================================================= */

/* ---------- اسکلت بارگذاری ---------- */
@keyframes shimmer { to { background-position-x: -200%; } }

.skeleton {
  border-radius: var(--r-md);
  background: linear-gradient(100deg, var(--cream-2) 38%, rgba(255,255,255,.75) 50%, var(--cream-2) 62%);
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}
.skeleton-card { aspect-ratio: 1 / 1.62; border-radius: var(--arch); }
.skeleton-bundle {
  aspect-ratio: 1 / 1.35;
  background: linear-gradient(100deg, rgba(255,252,223,.10) 38%, rgba(255,252,223,.22) 50%, rgba(255,252,223,.10) 62%);
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}
@media (prefers-reduced-motion: reduce) { .skeleton, .skeleton-bundle { animation: none; } }

/* ---------- خطای بارگذاری کاتالوگ ---------- */
.api-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1.5rem;
  border: 1.5px dashed var(--line);
  border-radius: var(--r-lg);
  background: var(--paper);
}
.api-error-title { font-weight: 700; color: var(--green); margin: 0 0 .4rem; }
.api-error-hint { color: var(--muted); font-size: .87rem; font-weight: 300; margin: 0 0 1.4rem; }

/* ---------- چرخانک دکمه‌ها ---------- */
@keyframes spin { to { transform: rotate(360deg); } }

.spinner {
  display: inline-block;
  width: 15px; height: 15px;
  margin-inline-end: .5rem;
  vertical-align: -2px;
  border: 2px solid currentColor;
  border-block-start-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

/* ---------- پیام خطا و راهنمای فرم ---------- */
.form-error {
  background: rgba(244,121,59,.1);
  border: 1px solid rgba(244,121,59,.35);
  color: #b1451a;
  border-radius: var(--r-sm);
  padding: .7rem .9rem;
  font-size: .87rem;
  line-height: 1.7;
  margin-block: .9rem;
}
.form-hint { color: var(--muted); font-size: .8rem; font-weight: 300; margin: .4rem 0 0; }
.field.has-error select { border-color: var(--orange); }
.field input:disabled { background: var(--cream-2); color: var(--muted); cursor: not-allowed; }

.check-row {
  display: flex; align-items: center; gap: .6rem;
  font-size: .89rem; color: var(--green);
  margin-block: .2rem 1rem;
  cursor: pointer;
}
.check-row input { accent-color: var(--green); width: 17px; height: 17px; }

/* ---------- هدیه و کارت پستال ---------- */
.gift {
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--paper);
  margin-block: .2rem 1.1rem;
  transition: border-color .3s var(--ease), background-color .3s var(--ease), box-shadow .3s var(--ease);
}
.gift.is-open {
  border-color: var(--green);
  background: linear-gradient(to bottom, var(--lime-soft), var(--paper) 9rem);
  box-shadow: var(--shadow-sm);
}
.gift-toggle {
  position: relative;
  display: flex; align-items: center; gap: .8rem;
  padding: .9rem 1rem;
  cursor: pointer;
}
.gift-input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.gift-icon {
  flex: none;
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--lime-soft);
  color: var(--green);
  transition: background-color .3s var(--ease), transform .45s var(--ease-out);
}
.gift-icon svg { width: 22px; height: 22px; }
.gift.is-open .gift-icon { background: var(--lime); animation: gift-pop .5s var(--ease-out); }
@keyframes gift-pop {
  0%   { transform: scale(1) rotate(0); }
  40%  { transform: scale(1.14) rotate(-8deg); }
  70%  { transform: scale(.96) rotate(4deg); }
  100% { transform: scale(1) rotate(0); }
}
.gift-text { display: grid; gap: .15rem; }
.gift-text .t { font-weight: 700; font-size: .93rem; color: var(--green); }
.gift-text .d { font-size: .8rem; color: var(--muted); font-weight: 300; line-height: 1.6; }

/* کلید روشن/خاموش؛ صفحه راست‌به‌چپ است، پس دکمه به چپ می‌رود */
.gift-switch {
  flex: none;
  position: relative;
  margin-inline-start: auto;
  width: 44px; height: 26px;
  border-radius: 999px;
  background: rgba(0,68,34,.18);
  transition: background-color .25s var(--ease);
}
.gift-switch::after {
  content: '';
  position: absolute;
  inset-block-start: 3px; inset-inline-start: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform .3s var(--ease-out);
}
.gift-input:checked ~ .gift-switch { background: var(--green); }
.gift-input:checked ~ .gift-switch::after { transform: translateX(-18px); }
.gift-input:focus-visible ~ .gift-switch { outline: 2px solid var(--green); outline-offset: 2px; }

.gift-reveal {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows .45s var(--ease-out), opacity .3s var(--ease);
}
.gift.is-open .gift-reveal { grid-template-rows: 1fr; opacity: 1; }
.gift-reveal-inner { overflow: hidden; min-height: 0; }
.gift-field { padding: .2rem 1rem 1rem; margin: 0; }

.postcard {
  position: relative;
  border-radius: var(--r-sm);
  background: var(--cream);
  box-shadow: inset 0 0 0 1px var(--line), 0 6px 18px rgba(0,68,34,.08);
  padding: .5rem 1rem .4rem;
  transform: rotate(-.8deg);
  transition: transform .4s var(--ease-out), box-shadow .3s var(--ease);
}
.postcard:focus-within { transform: rotate(0); box-shadow: inset 0 0 0 1.5px var(--green), 0 8px 24px rgba(0,68,34,.12); }
.gift .postcard textarea {
  display: block;
  width: 100%;
  min-height: 8rem;
  padding: 0;
  padding-inline-end: 3.6rem;
  border: 0;
  border-radius: 0;
  resize: none;
  font-size: .95rem;
  line-height: 2rem;
  color: var(--ink);
  /* خط‌های کارت، که با متن پایین می‌روند */
  background: repeating-linear-gradient(to bottom, transparent 0 calc(2rem - 1px), rgba(0,68,34,.16) calc(2rem - 1px) 2rem);
  background-attachment: local;
}
.gift .postcard textarea:focus { outline: none; box-shadow: none; }
.postcard-stamp {
  position: absolute;
  inset-block-start: .7rem; inset-inline-end: .8rem;
  display: grid; place-items: center;
  width: 2.5rem; height: 2.9rem;
  border: 2px dashed var(--green-300);
  border-radius: 4px;
  background: var(--paper);
  color: var(--orange);
  transform: rotate(7deg);
  pointer-events: none;
}
.postcard-stamp svg { width: 18px; height: 18px; }
.gift-meta {
  display: flex; justify-content: space-between; gap: .8rem;
  margin-block-start: .7rem;
  font-size: .78rem; color: var(--muted); font-weight: 300;
}
.gift-count { font-variant-numeric: tabular-nums; white-space: nowrap; transition: color .2s; }
.gift-count.is-near { color: var(--orange); font-weight: 500; }

.gift-done {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-block-start: 1rem;
  padding: .5rem .9rem;
  border-radius: 999px;
  background: var(--lime-soft);
  color: var(--green);
  font-size: .85rem;
}
.gift-done svg { width: 18px; height: 18px; flex: none; }

@media (prefers-reduced-motion: reduce) {
  .gift-reveal, .postcard, .gift-switch::after { transition: none; }
  .gift.is-open .gift-icon { animation: none; }
}

/* ---------- کد تخفیف ---------- */
/* زیر خلاصهٔ مبلغ می‌نشیند، نزدیک‌تر از فاصلهٔ معمول بخش‌ها */
.order-review + .coupon { margin-block: -.6rem 1.4rem; }

.coupon-icon {
  flex: none;
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--lime-soft);
  color: var(--green);
}
.coupon-icon svg { width: 18px; height: 18px; }

.coupon-toggle {
  display: flex; align-items: center; gap: .7rem;
  width: 100%;
  padding: .65rem .9rem;
  border: 1.5px dashed var(--green-300);
  border-radius: var(--r-md);
  color: var(--green);
  font-weight: 500;
  font-size: .93rem;
  transition: background-color .25s var(--ease), border-color .25s var(--ease);
}
.coupon-toggle:hover { background: rgba(228,240,190,.55); border-color: var(--green); }
.coupon-plus { margin-inline-start: auto; display: grid; color: var(--green-300); }
.coupon-plus svg { width: 16px; height: 16px; }

.coupon-form {
  padding: .9rem 1rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--paper);
  animation: coupon-in .35s var(--ease-out);
}
.coupon-label { display: block; font-size: .88rem; font-weight: 500; color: var(--green); margin-block-end: .45rem; }
.coupon-row { display: flex; gap: .5rem; }
.coupon-row input {
  flex: 1; min-width: 0;
  padding: .7rem .95rem;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--line);
  background: var(--cream);
  font: 500 1rem 'Gotham', 'Peyda', sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.coupon-row input::placeholder { color: #b9c4bc; }
.coupon-row input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(0,68,34,.1); }
.coupon-form.has-error input { border-color: var(--orange); }
.coupon-apply { flex: none; padding-inline: 1.2rem; font-size: .9rem; }

.coupon-msg { margin-block-start: .65rem; font-size: .84rem; line-height: 1.8; color: #b1451a; }
.coupon-msg.is-info {
  color: var(--green-700);
  background: var(--lime-soft);
  padding: .75rem .9rem;
  border-radius: var(--r-sm);
}
.coupon-login { margin-block-start: .7rem; font-size: .9rem; }
.coupon-clear {
  display: block;
  margin-block-start: .35rem;
  font-size: .8rem;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.coupon-msg.is-info .coupon-clear { margin-inline: auto; margin-block-start: .55rem; }

/* کدِ نشسته: بلیت با لبهٔ خط‌چین و دو بریدگی نیم‌دایره در دو طرف */
.coupon-ticket {
  position: relative;
  display: flex; align-items: center; gap: .75rem;
  padding: .8rem 1rem;
  border: 1.5px dashed var(--green);
  border-radius: var(--r-md);
  background: var(--lime-soft);
  animation: coupon-in .45s var(--ease-out);
}
.coupon-ticket::before,
.coupon-ticket::after {
  content: '';
  position: absolute;
  inset-block-start: 50%;
  width: 14px; height: 14px;
  margin-block-start: -7px;
  border-radius: 50%;
  background: var(--cream);
}
.coupon-ticket::before { right: -8.5px; }
.coupon-ticket::after  { left: -8.5px; }
.coupon-ticket .coupon-icon { background: var(--lime); }
.coupon-ticket-body { flex: 1; min-width: 0; display: grid; gap: .1rem; }
.coupon-ticket-head { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem .55rem; }
.coupon-code { font-weight: 700; font-size: .98rem; letter-spacing: .14em; color: var(--green); }
/* نارنجی رنگ تخفیف است، مثل برچسب صرفه‌جویی پک‌ها (`.badge-save`) */
.coupon-pct {
  font-size: .74rem; font-weight: 700;
  padding: .05rem .5rem;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
}
.coupon-ticket-note { font-size: .78rem; color: var(--muted); line-height: 1.65; }
.coupon-urgent { color: #b1451a; font-weight: 500; }
.coupon-save { flex: none; display: grid; justify-items: end; line-height: 1.25; color: var(--green); }
.coupon-save .num { font-size: 1.02rem; font-weight: 700; }
.coupon-save .unit { font-size: .72rem; color: var(--muted); }
.coupon-remove {
  flex: none;
  display: grid; place-items: center;
  width: 30px; height: 30px;
  margin-inline-end: -.3rem;
  border-radius: 50%;
  color: var(--green);
  transition: background-color .2s var(--ease);
}
.coupon-remove:hover { background: rgba(0,68,34,.09); }
.coupon-remove svg { width: 15px; height: 15px; }

/* یادآور کدِ لینک در پایین سبد */
.coupon-pending {
  display: flex; align-items: center; gap: .5rem;
  margin-block-end: .9rem;
  padding: .5rem .8rem;
  border: 1.5px dashed var(--green-300);
  border-radius: var(--r-sm);
  font-size: .8rem;
  color: var(--green-700);
}
.coupon-pending svg { width: 16px; height: 16px; flex: none; }
.coupon-pending .ltr { font-weight: 700; letter-spacing: .08em; }

.form-error-action {
  font-weight: 700;
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@keyframes coupon-in {
  from { opacity: 0; transform: translateY(6px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 420px) {
  .coupon-ticket .coupon-icon { display: none; }
  .coupon-apply { padding-inline: .95rem; }
}

/* همان کادر با هر پیش‌نمایش تازه (عوض‌کردن روش ارسال) دوباره ساخته می‌شود؛
   انیمیشن فقط بار اولِ هر حالت */
.coupon-form.is-steady, .coupon-ticket.is-steady { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .coupon-form, .coupon-ticket { animation: none; }
}

/* ---------- برچسب وضعیت ---------- */
.chip {
  display: inline-block;
  padding: .18rem .6rem;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 700;
  margin-block-end: .5rem;
}
.chip-info  { background: rgba(0,68,34,.09);   color: var(--green); }
.chip-good  { background: var(--lime);          color: var(--green); }
.chip-warn  { background: rgba(244,121,59,.16); color: #a8411a; }
.chip-muted { background: rgba(92,111,99,.14);  color: var(--muted); }
.chip-lime  { background: var(--lime-soft);     color: var(--green-700); }

/* ---------- سبد: قلم ناموجود ---------- */
.cart-warn { font-size: .78rem; color: var(--orange); font-weight: 500; margin-block-start: .2rem; }

/* ---------- انتخاب نشانی در تسویه‌حساب ---------- */
.addr-picker { margin-block-end: 1.1rem; }
.addr-picker-label { display: block; font-size: .88rem; font-weight: 500; color: var(--green); margin-block-end: .45rem; }
.addr-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.addr-chip {
  padding: .45rem .85rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-size: .84rem;
  color: var(--muted);
  transition: border-color .2s var(--ease), color .2s var(--ease), background-color .2s var(--ease);
}
.addr-chip.is-active { border-color: var(--green); background: var(--lime-soft); color: var(--green); font-weight: 700; }

/* ---------- دفترچهٔ نشانی ---------- */
.addr-card {
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  padding: 1rem 1.1rem;
  margin-block-end: .8rem;
  background: var(--paper);
}
.addr-card.is-default { border-color: var(--green); }
.addr-card-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.addr-title { font-weight: 700; color: var(--green); font-size: .95rem; }
.addr-card .chip { margin-block-end: 0; }
.addr-line { font-size: .88rem; font-weight: 300; line-height: 1.75; margin: .35rem 0 .2rem; }
.addr-meta { font-size: .8rem; color: var(--muted); font-weight: 300; margin: 0; }
.addr-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-block-start: .7rem; }
.addr-actions button {
  font-size: .82rem; font-weight: 500; color: var(--green);
  text-decoration: underline; text-underline-offset: 3px;
}
.addr-actions button.danger { color: var(--orange); }
.addr-actions button[disabled] { opacity: .5; pointer-events: none; }

.addr-form {
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  padding: 1.1rem;
  margin-block-start: 1rem;
  background: var(--cream-2);
}
.addr-form-title { margin: 0 0 1rem; font-size: 1rem; color: var(--green); }
.addr-form-foot { display: flex; gap: .6rem; }
.addr-form-foot .btn { flex: 1; }

/* ---------- کارت سفارش ---------- */
.order-addr { font-size: .8rem; color: var(--muted); font-weight: 300; margin-block-start: .4rem; }
.order-pay { font-size: .78rem; font-weight: 400; color: var(--muted); }
.order-cancel {
  margin-block-start: .7rem;
  font-size: .82rem; font-weight: 500; color: var(--orange);
  text-decoration: underline; text-underline-offset: 3px;
}
.order-cancel[disabled] { opacity: .5; pointer-events: none; }

/* ---------- پیام بالای سایت ---------- */
:root { --ann-h: 36px; }

.announcement {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 120;
  min-height: var(--ann-h);
  display: flex; align-items: center; justify-content: center;
  padding: .35rem 1rem;
  background: var(--green);
  color: var(--cream);
  font-size: .83rem;
  font-weight: 500;
  text-align: center;
}
body.has-announcement .site-header { inset-block-start: var(--ann-h); }

/* پیام «محصولی نیست» باید کل عرض شبکه را بگیرد */
#productGrid .empty-state { grid-column: 1 / -1; }
