/* ===== فونت وزیرمتن (محلی، OFL) ===== */
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/vazirmatn-arabic-400-normal.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/vazirmatn-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/vazirmatn-arabic-500-normal.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/vazirmatn-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/vazirmatn-arabic-700-normal.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/vazirmatn-latin-700-normal.woff2') format('woff2');
}

/* ===== متغیرهای پیش‌فرض تم (با /theme.css بازنویسی می‌شود) ===== */
:root {
  --primary: #5f6b33;
  --primary-dark: #4a5328;
  --accent: #fe6309;
  --badge: #a85d5e;

  --bg: #ffffff;
  --bg-soft: #fdf4ec;
  --tile: #fbe9dc;
  --card: #ffffff;
  --line: #efe2d8;
  --text: #2a2723;
  --muted: #7a746c;
  --star: #f5a623;

  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --shadow: 0 8px 26px rgba(74, 60, 42, 0.08);
  --shadow-sm: 0 2px 10px rgba(74, 60, 42, 0.06);
  --container: 1320px;
  --header-h: 64px;
  /*
   * رنگ «نوار کرم» بالای هدر. جدا نگه داشته شده چون در حالت فشرده کل این
   * نوار حذف می‌شود و رنگش جایی دیگر لازم نیست.
   */
  --header-band: rgb(253, 238, 226);
}

/* ===== بازنشانی و پایه ===== */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: 'Vazirmatn', Tahoma, 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.9;
  direction: rtl;
  text-align: right;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.5; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 16px; }

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

.skip-link {
  position: absolute; right: -9999px; top: 0;
  background: var(--primary); color: #fff; padding: 10px 18px; z-index: 999;
}
.skip-link:focus { right: 8px; top: 8px; }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 60%, #fff); outline-offset: 2px; }

/* ===== دکمه‌ها ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--primary); color: #fff;
  border: 1px solid var(--primary);
  border-radius: var(--radius-pill);
  padding: 11px 26px;
  font-weight: 500;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-outline { background: transparent; color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-ghost {
  background: transparent; color: var(--text); border-color: var(--line);
}
.btn-ghost:hover { background: var(--bg-soft); color: var(--text); border-color: var(--line); }
.btn-danger { background: var(--badge); border-color: var(--badge); }
.btn-danger:hover { background: #c23e29; border-color: #c23e29; }
.btn-sm { padding: 7px 16px; font-size: 13px; }

/* ===== هدر ===== */
/*
 * مدل هدر، عیناً همان مدل سایت مرجع (Woodmart در حالت `whb-sticky-real`):
 *
 *   ┌──────────── نوار سبز روشن ─────────────┐   آیکن‌های شبکهٔ اجتماعی
 *   │     ┌───── نوار سفید گرد ۱۳۲۰px ─────┐ │   ۷۳px — «خلیج» + لوگو
 *   ├─────┴──── نوار سبز منو ۱۱۵۰px ───────┴─┤   ۵۰px
 *   └────────────────────────────────────────┘
 *
 *   • بالای صفحه: هدر کامل — ارتفاع کل ۲۳۶px
 *   • اسکرول به پایین: هدر به بالا سُر می‌خورد و کامل پنهان می‌شود
 *   • اسکرول به بالا: نسخهٔ فشرده — ارتفاع کل ۱۲۳px — از بالا برمی‌گردد
 *
 * ⚠️ این فقط «چسبیدن» نیست. در مرجع هم هدر موقع اسکرول به پایین پنهان
 * می‌شود و فقط وقتی به بالا برمی‌گردید ظاهر می‌شود؛ کلاس `is-compact`
 * همان `whb-sticked` مرجع است و `is-hidden` همان بیرون‌رفتن.
 *
 * همهٔ اعداد از اندازه‌گیری پیکسلی خودِ مرجع (ویوپورت ۱۴۲۵px، عرض هدر
 * ۱۴۱۰px) آمده‌اند، نه از روی حدس:
 *   نوار سبز روشن تا y=۱۵۰ · نوار سفید ۱۳۲۰×۷۳ با شعاع ۴۴ روی y=۱۱۳ ·
 *   نوار منو ۱۱۵۰×۵۰ با شعاع پایین ۴۱ روی y=۱۸۶ · صفحهٔ لوگو ۲۳۹px و
 *   «خلیج» با دایرهٔ ۲۶۶px، هر دو حول یک نقطه.
 *
 * ⚠️ سه عدد در هر دو حالت ثابت می‌مانند و کل هندسه روی همین‌ها سوار است:
 *   ارتفاع نوار سفید (۷۳)، فاصلهٔ لبهٔ پایین صفحهٔ لوگو از لبهٔ پایین نوار
 *   سفید (۸۱)، و مرکز دایرهٔ «خلیج» که روی همان لبه‌ها می‌نشیند. اگر این‌ها
 *   را جداگانه برای هر حالت هاردکد کنید، دایره و خلیج از هم می‌افتند.
 */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--header-band, color-mix(in srgb, var(--primary) 9%, #ffffff));
  /*
   * ⚠️ اینجا `overflow: hidden` نیست — و نباید باشد.
   *
   * در حالت فشرده بالای دایرهٔ لوگو (۴۶px) از بالای هدر بیرون می‌زند و باید
   * دیده نشود. ولی چون هدر `sticky` روی `top: 0` است، همان بخش naturally
   * بیرون از قاب دید است و خودش دیده نمی‌شود؛ نیازی به بُرش نیست.
   * اگر `overflow: hidden` بگذاریم، منوی کشویی «محصولات» هم بُرش می‌خورد و
   * دیگر باز نمی‌شود — چون زیرمجموعهٔ همین هدر است و از کادرش بیرون می‌زند.
   */
  transition: background-color .3s ease;
}
@media (prefers-reduced-motion: reduce) {
  .site-header, .header-container, .topbar-pill, .social-row,
  .logo-circle, .header-cove { transition: none !important; }
}

.header-container {
  position: relative;
  max-width: 100%; margin: 0 auto;
  /* ۴۲ + ۱۰۸ − ۳۷ = نوار سفید روی y=۱۱۳ ، درست مثل مرجع */
  padding: var(--pad-top) 20px 0;
  transition: padding-top .45s cubic-bezier(.4, 0, .2, 1);

  --edge: 20px;          /* فاصلهٔ افقی نوارها از لبهٔ صفحه */
  --pad-top: 42px;
  --social-band: 108px;  /* ارتفاع نوار سبز روشن */
  --bar-h: 73px;         /* ارتفاع نوار سفید */
  --bar-radius: 44px;    /* گردی نوار سفید */
  --bar-overlap: 37px;   /* چقدر نوار سفید روی نوار سبز روشن می‌نشیند */
  --menu-radius: 41px;   /* گردی گوشه‌های پایین نوار منو */
  --nav-h: 50px;         /* ارتفاع نوار سبز منو */

  /*
   * ⚠️ قطر صفحهٔ لوگو در حالت عادی `--logo-base` است، نه `--logo-size`.
   *
   * حالت فشرده باید دایره را کوچک کند ولی در بریک‌پوینت‌های مختلف نه به یک
   * اندازه. اگر مستقیماً `--logo-size` را در بریک‌پوینت عوض کنیم، بلوک
   * فشرده هم باید برای هر بریک‌پوینت جداگانه تکرار شود. پس بریک‌پوینت‌ها
   * فقط `--logo-base` را می‌گذارند و حالت فشرده با یک نسبت ثابت (۲۰۰/۲۳۹
   * از خود مرجع) از آن حساب می‌کند.
   */
  --logo-base: 239px;
  --logo-size: var(--logo-base);
  /*
   * سقف اندازهٔ تصویر لوگو.
   *
   * ⚠️ از `--logo-size` مشتق می‌شود، نه یک عدد ثابت. با عدد ثابت باید همین
   * مقدار در هر بریک‌پوینت و در حالت فشرده جداگانه تکرار شود؛ کافی است یکی
   * فراموش شود تا لوگو از دایره بیرون بزند یا بیهوده کوچک بماند.
   *
   * ⚠️ عدد ۰٫۷۵۳۱ عمداً همان نسبتِ **قبلی** است، نه یک مقدار تازه.
   *
   * پیش‌تر این مقدار سه بار جداگانه هاردکد شده بود: ۱۸۰px روی دسکتاپ،
   * ۱۴۰px روی تبلت و ۱۴۹٫۹px در حالت فشرده. هر سه تقریباً یک نسبت‌اند
   * (۰٫۷۵۳ / ۰٫۷۳۷ / ۰٫۷۵۰) ولی چون جدا نوشته شده بودند، با هر تغییر
   * اندازهٔ پایه از هم واگرا می‌شدند. با مشتق‌کردن از `--logo-size` هر سه
   * یکی می‌شوند و اندازهٔ دیده‌شده روی دسکتاپ و حالت فشرده — همان دو حالتی
   * که تأیید شده‌اند — مو‌به‌مو حفظ می‌شود.
   */
  --logo-img: calc(var(--logo-size) * 0.7531);
  --cove-r: 133px;       /* شعاع دایرهٔ «خلیج» — حلقهٔ سفید دور لوگو */

  /*
   * کلید کل هندسه: لبهٔ پایین صفحهٔ لوگو ۸۱px زیر لبهٔ پایین نوار سفید
   * می‌افتد و این عدد در هر دو حالت یکی است (۲۶۷−۱۸۶ = ۱۵۴−۷۳ = ۸۱).
   * پس فشرده‌شدن دایره از بالا اتفاق می‌افتد و پایینش تکان نمی‌خورد.
   *
   * ⚠️ این ۸۱ به اندازهٔ خودِ دایره بسته نیست، به «خلیج» بسته است:
   * ۸۱ ≈ ۰٫۶۰۹ × شعاع خلیج. پس همین‌جا مشتق می‌شود تا در هر بریک‌پوینتی
   * فقط `--cove-r` را عوض کنید و بقیه خودشان جا بیفتند.
   */
  --disc-hang: calc(var(--cove-r) * 0.609);

  /*
   * ⚠️ `bottom` این دو عنصر نسبت به لبهٔ پایین `.navbar-wrap` حساب می‌شود،
   * چون داخل همان ظرف مطلق‌اند. پس در هر کدام باید `--nav-h` کم شود تا
   * لنگر واقعی «لبهٔ پایین نوار سفید» به دست بیاید.
   *
   *   خلیج:  مرکزش روی مرکز نوار سفید است → پایینش = شعاع − نصف ارتفاع نوار
   *   لوگو:  پایینش = ۸۱px زیر لبهٔ پایین نوار سفید (اندازه‌گیری مرجع)
   */
  --cove-bottom: calc(var(--cove-r) - var(--bar-h) / 2 - var(--nav-h));
  --disc-bottom: calc(var(--disc-hang) - var(--nav-h));
}

/*
 * آیکن‌های شبکهٔ اجتماعی روی نوار سبز روشن.
 *
 * ⚠️ نوار هرگز جمع نمی‌شود، حتی وقتی هیچ شبکهٔ اجتماعی تنظیم نشده. کل
 * هندسهٔ هدر (محل نوار سفید، «خلیج» و صفحهٔ لوگو) روی همین ارتفاع سوار
 * است؛ اگر نبودِ آیکن‌ها ارتفاع را صفر کند، هدر بی‌اجازه به هندسهٔ فشرده
 * می‌پرد. آیکن‌ها اگر باشند می‌آیند، اگر نباشند نوار خالی می‌ماند — مثل مرجع.
 */
.social-row {
  height: var(--social-band);
  display: flex; align-items: flex-start; justify-content: flex-start;
  /* ۴۲ (بالای ظرف) + ۳۲ = ۷۴ — همان ارتفاعی که آیکن‌ها در مرجع دارند */
  gap: 2px; padding-top: 32px; overflow: hidden;
  transition: height .45s cubic-bezier(.4, 0, .2, 1), padding-top .45s cubic-bezier(.4, 0, .2, 1);
}
.social-link {
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 50%; color: #7f8d7f;
}
.social-link:hover { color: var(--primary); background: rgba(255, 255, 255, .85); }

/* نوار سفید گرد — با margin منفی روی نوار سبز روشن می‌نشیند */
.topbar-pill {
  position: relative; z-index: 2;
  max-width: var(--container); margin: calc(-1 * var(--bar-overlap)) auto 0;
  background: #fff; border-radius: var(--bar-radius);
  min-height: var(--bar-h); padding: 8px 26px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  box-shadow: 0 12px 34px rgba(74, 60, 42, .08);
  transition: border-radius .45s cubic-bezier(.4, 0, .2, 1),
              margin .45s cubic-bezier(.4, 0, .2, 1);
}
.topbar-start, .topbar-end { display: flex; align-items: center; gap: 14px; }
.announce {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text); font-weight: 500; white-space: nowrap;
}
.announce-ico { display: inline-flex; color: var(--primary); }
.announce svg { flex: none; }

/* جستجو: فیلد مانند نسخه مرجع تا کلیک پنهان است */
.search-box { display: flex; align-items: center; gap: 12px; }
.search-box .search-input { display: none; }
.site-header.search-open .search-box .search-input {
  display: block;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: var(--radius-pill);
  padding: 9px 18px;
  width: 230px;
}
.site-header.search-open .search-box .search-input:focus {
  outline: none; border-color: var(--primary); background: #fff;
}
.search-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary); color: #fff; border: none;
  border-radius: var(--radius-pill);
  padding: 9px 8px 9px 20px;
  cursor: pointer; font-weight: 500;
}
.search-btn .search-btn-icon {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: #fff; color: var(--primary);
}

.header-icons { display: flex; align-items: center; gap: 6px; }
.header-icon {
  position: relative;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px; border-radius: 12px; color: var(--text);
}
.header-icon:hover { background: var(--bg-soft); }
.header-icon .count {
  min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: 11px; font-weight: 700;
  display: grid; place-items: center;
  position: absolute; top: 0; left: 0;
}
.header-icon .price-label { font-size: 13px; color: var(--muted); }

/*
 * نوار سبز منو.
 *
 * `position: relative` لازم است چون «خلیج» و صفحهٔ لوگو داخل همین ظرف
 * مطلق‌اند و `bottom`شان از لبهٔ پایین همین ظرف حساب می‌شود.
 */
.navbar-wrap { position: relative; }
.navbar {
  background: var(--primary);
  border-radius: 0 0 var(--menu-radius) var(--menu-radius);
  color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px;
  padding: 0 43px;
  min-height: var(--nav-h);
  max-width: 1150px; margin: 0 auto;
}
.nav-list { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
/*
 * ⚠️ ارتفاع لینک عمداً ۴۰px ثابت است، نه padding عمودی.
 *
 * اگر ارتفاع را با padding بسازیم، ارتفاع نهایی به line-height فونت
 * وابسته می‌شود و نوار منو ۳px بلندتر از مرجع درمی‌آید — که خودش کل هدر
 * را جابه‌جا می‌کند. با ارتفاع صریح، `.navbar` دقیقاً روی min-height
 * خودش (۵۰px) می‌ماند، همان‌قدر که در مرجع اندازه‌گیری شد.
 */
.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 14px; border-radius: var(--radius-pill);
  color: #fff; font-weight: 500;
  transition: background .15s ease;
}
.nav-link:hover, .nav-link:focus-visible { background: rgba(0, 0, 0, .16); }

.nav-item { position: relative; }
.nav-dropdown {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: #fff; color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 230px; padding: 8px;
  display: none; z-index: 70;
}
.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown { display: block; }
.nav-dropdown a { display: block; padding: 9px 12px; border-radius: 10px; }
.nav-dropdown a:hover { background: var(--bg-soft); color: var(--primary); }

/*
 * «خلیج» — شکل سفیدی که نوار سفید بالا را به حلقهٔ دور لوگو و بعد به نوار
 * سبز پایین وصل می‌کند. فایلش تولیدشده است (`.scratch/ref/mkcove.mjs`) و
 * در `src/views/layout.js` درون‌خطی می‌شود.
 *
 * ⚠️ اندازه‌اش در هر دو حالت یکی است — در مرجع هم همین‌طور است (کادر
 * ۳۶۴×۳۲۵ در هر دو حالت، فقط جابه‌جا می‌شود). پس اینجا هیچ‌وقت کوچک
 * نمی‌شود؛ فقط مرکزش با نوار سفید بالا و پایین می‌رود.
 */
/* ⚠️ اینجا عمداً هیچ سایه‌ای نیست — و دلیلش ظریف است.
 *
 * «خلیج» و نوار سفید هر دو سفیدند و باید یک‌پارچه دیده شوند. ولی کادر خلیج
 * فقط ۳۳۰px عرض دارد و وسط نواری ۱۳۲۰px نشسته؛ پس لبه‌های چپ و راست خودِ
 * خلیج، درست وسط نواری هم‌رنگش می‌افتند. اگر روی خلیج `drop-shadow` بگذاریم،
 * مرورگر دورِ تمام دورِ شکلش — از جمله همان دو لبهٔ میانی — سایه می‌کشد و
 * دو خط عمودی محو وسط نوار سفید ظاهر می‌شود که خلیج را «جدا» نشان می‌دهد.
 * عمق را به‌جایش نوار سفید و نوار منو می‌دهند، که سایه‌شان دور کل نوار است.
 */
.header-cove {
  position: absolute; bottom: calc(-1 * var(--cove-bottom));
  right: 50%; transform: translateX(50%);
  /*
   * ⚠️ عرض کادر ۳۳۰px است ولی دایره‌اش ۲۶۶px — یعنی کادر مربع نیست.
   *
   * خودِ SVG هم ۳۳۰×۲۶۶ است. اگر کادر را مربع (۲۶۶×۲۶۶) بگیریم،
   * `preserveAspectRatio` پیش‌فرضِ SVG شکل را روی ۸۰٪ کوچک می‌کند و وسط
   * کادر شناور می‌گذارد؛ نتیجه‌اش این است که نوار افقی «خلیج» دیگر روی
   * نوار سفید هدر نمی‌افتد و یک شکاف ۱۴px‌ی بینشان می‌ماند — همان چیزی که
   * دایره را «جدا» نشان می‌دهد.
   *
   * پس ارتفاع کادر باید دقیقاً به نسبت خودِ SVG باشد، نه برابر قطر دایره.
   */
  width: calc(var(--cove-r) * 2.4812);   /* ۳۳۰ / ۱۳۳ */
  height: calc(var(--cove-r) * 2);       /* ۲۶۶ / ۱۳۳ */
  z-index: 56; pointer-events: none;
}
.header-cove svg { display: block; width: 100%; height: 100%; }

/*
 * صفحهٔ لوگو.
 *
 * ⚠️ ‏`bottom` (نه `top`) لنگر است: لبهٔ پایین صفحه ۸۱px زیر لبهٔ پایین نوار
 * سفید می‌نشیند و این عدد در هر دو حالت یکی است. این‌طور وقتی قطر از ۲۳۹
 * به ۲۰۰ می‌رسد، دایره از بالا کوچک می‌شود و پایینش سر جایش می‌ماند —
 * دقیقاً همان رفتاری که در مرجع اندازه‌گیری شد.
 *
 * رنگ: در حالت عادی خاکستری روشن (#f5f5f5، اندازه‌گیری‌شده از مرجع) و در
 * حالت فشرده سفید. حلقهٔ سفید دورش را خودِ «خلیج» می‌سازد، نه border.
 */
.logo-circle {
  position: absolute; bottom: calc(-1 * var(--disc-bottom));
  right: 50%; transform: translateX(50%);
  width: var(--logo-size); height: var(--logo-size);
  background: var(--disc-bg, #f5f5f5); border-radius: 50%;
  display: grid; place-items: center;
  z-index: 58; overflow: hidden;
  transition: width .45s cubic-bezier(.4, 0, .2, 1),
              height .45s cubic-bezier(.4, 0, .2, 1),
              background-color .45s ease;
}
/*
 * تصویر لوگو داخل دایره.
 *
 * ⚠️ `max-width` هم باید از `--logo-img` بیاید، نه `100%`.
 *
 * با `100%` یک لوگوی **مربعی** (که رایج‌ترین حالت است) تا لبه‌های دایره کش
 * می‌آمد: چون `max-height` سقف ارتفاع را می‌گرفت ولی عرض آزاد بود، تصویر
 * مربعی می‌ماند و گوشه‌هایش با `overflow:hidden` بریده می‌شد. نتیجه همان
 * «دایره‌ای که لوگو در آن گم است» بود.
 *
 * الان هر دو بُعد یک سقف دارند، پس تصویر به‌اندازهٔ خودش داخل دایره می‌نشیند
 * و حاشیهٔ تنفس می‌گیرد. `object-fit` هم تضمین می‌کند نسبت تصویر به‌هم
 * نریزد (بدون آن، تصویرِ بی‌نسبت کشیده می‌شد).
 *
 * ⚠️ `mix-blend-mode: darken` اینجا کارِ «حذف پس‌زمینه» را می‌کند.
 *
 * بیشتر لوگوها PNG/JPG با پس‌زمینهٔ سفید یا تقریباً سفید هستند (لوگوی فعلی:
 * RGB ۲۵۴٬۲۵۴٬۲۵۴). بدون این خط، آن مستطیل سفید روی دایرهٔ خاکستری
 * (#f5f5f5) مثل یک کادر چسبانده‌شده دیده می‌شود — همان چیزی که اپراتور
 * می‌بیند و فکر می‌کند «آپلود خراب است».
 *
 * `darken` در هر پیکسل تیره‌ترِ دو لایه را نگه می‌دارد:
 *   • پس‌زمینهٔ سفید تصویر روشن‌تر از دایره است → رنگ دایره برنده می‌شود،
 *     یعنی پس‌زمینه خودبه‌خود ناپدید می‌شود.
 *   • رنگ‌های خودِ لوگو تیره‌ترند → **دقیقاً** دست‌نخورده می‌مانند.
 *
 * چرا `darken` و نه `multiply`؟ چون `multiply` رنگ‌های لوگو را هم تیره
 * می‌کند (سفیدِ دایره در آن‌ها ضرب می‌شود)، ولی `darken` فقط مقایسه می‌کند
 * و رنگ اصلی لوگو را دست‌نخورده رد می‌کند. پس وفاداری رنگ حفظ می‌شود.
 *
 * لوگوی PNG با پس‌زمینهٔ شفاف هم بدون تغییر درست نمایش داده می‌شود: پیکسل
 * شفاف چیزی برای ترکیب ندارد و همان دایره دیده می‌شود.
 */
.logo-circle img {
  max-height: var(--logo-img); max-width: var(--logo-img);
  width: auto; height: auto;
  object-fit: contain;
  mix-blend-mode: darken;
}
.logo-text {
  font-weight: 700; font-size: 26px; color: var(--primary);
  text-align: center; line-height: 1.3;
}
.logo-text small { display: block; font-size: 12px; color: var(--muted); font-weight: 500; letter-spacing: 0; }

/*
 * حالت فشرده — معادل `whb-sticked` در مرجع. همان چهار تغییری که در CSS
 * خودِ مرجع هست: نوار سبز روشن (`whb-top-bar`) کامل حذف می‌شود، نوار سفید
 * تمام‌عرض و بی‌گرد می‌شود، صفحهٔ لوگو ۲۳۹ → ۲۰۰ و رنگش سفید می‌شود، و
 * نوار منو مستقیم زیرش می‌آید.
 */
.site-header.is-compact .header-container {
  --pad-top: 0px;
  --social-band: 0px;
  --bar-overlap: 0px;     /* نوار سبز روشن رفته، پس چیزی برای هم‌پوشانی نیست */
  /*
   * نسبت ۲۰۰/۲۳۹ از خود مرجع، تا در هر بریک‌پوینتی درست کار کند — نه
   * عدد ثابت ۲۰۰px که فقط روی دسکتاپ جا می‌افتد.
   */
  --logo-size: calc(var(--logo-base) * 0.837);
  --disc-bg: #fff;
}
.site-header.is-compact .social-row { padding-top: 0; }
.site-header.is-compact .logo-circle .logo-text { font-size: 22px; }
.site-header.is-compact .logo-circle .logo-text small { font-size: 10px; }
/*
 * نوار سفید تمام‌عرض: `.header-container` به‌اندازهٔ `--edge` حاشیهٔ افقی
 * دارد؛ با حاشیهٔ منفیِ همان اندازه نوار واقعاً تا لبهٔ صفحه می‌رود و فقط
 * محتوایش ۲۶px تو می‌آید — عیناً مثل مرجع که نوار سفیدش ۰ تا ۱۴۰۹ است.
 */
.site-header.is-compact .topbar-pill {
  border-radius: 0; max-width: none;
  margin-left: calc(-1 * var(--edge));
  margin-right: calc(-1 * var(--edge));
}
/*
 * نوار منو در حالت فشرده باید روی «شانه‌های» خلیج بیفتد، پس از آن بالاتر
 * می‌آید؛ ولی خودِ دایرهٔ لوگو همچنان باید رو باشد.
 */
.site-header.is-compact .navbar-wrap { z-index: 57; }

/* هدر موبایل */
.mobile-header { display: none; }
.mobile-drawer { display: none; }

/* ===== محتوای اصلی ===== */
main { min-height: 55vh; }
.section { padding: 34px 0; }
.section-soft { background: var(--bg-soft); }

.section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-bottom: 22px;
}
.section-title { font-size: 22px; font-weight: 700; margin: 0; }
.section-title::after {
  content: ''; display: block; width: 54px; height: 4px;
  background: var(--primary); border-radius: 4px; margin-top: 6px;
}
.section-more { color: var(--primary); font-weight: 500; font-size: 14px; }
.section-more:hover { text-decoration: underline; }

/* ===== بنر اصلی ===== */
.hero { padding-top: 26px; }
.hero-grid { display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); }
.hero-grid.single { grid-template-columns: 1fr; }
.banner {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
  min-height: 300px;
  box-shadow: var(--shadow-sm);
}
.banner img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.banner-content {
  position: relative; z-index: 2;
  height: 100%; min-height: 300px;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  gap: 14px;
  padding: 40px;
}
.banner::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to left, rgba(32, 26, 20, .62), rgba(32, 26, 20, .12));
  z-index: 1;
}
.banner-title { color: #fff; font-size: 30px; margin: 0; text-shadow: 0 2px 10px rgba(0,0,0,.35); }
.banner-subtitle { color: rgba(255,255,255,.92); font-size: 17px; margin: 0; }

/* ===== کارت دسته‌بندی ===== */
.cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.cat-card {
  background: var(--tile);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  transition: transform .18s ease, box-shadow .18s ease;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.cat-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.cat-card .cat-name { font-weight: 700; font-size: 16px; }
.cat-card .cat-count { color: var(--muted); font-size: 12px; }

/* ===== کارت محصول ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}
.product-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.product-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: transparent; }

.product-media {
  position: relative;
  aspect-ratio: 1;
  background: #fff;
  overflow: hidden;
}
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.product-card:hover .product-media img { transform: scale(1.04); }

.badge-discount {
  position: absolute; top: 10px; right: 10px;
  background: var(--primary); color: #fff;
  border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 700;
  padding: 4px 12px; z-index: 3;
}
.badge-preorder {
  position: absolute; top: 44px; right: 10px;
  background: var(--accent); color: #3a2a10;
  border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 700;
  padding: 4px 10px; z-index: 3;
}
.badge-soldout {
  position: absolute; inset: auto 0 0 0;
  background: rgba(31, 39, 33, .82); color: #fff;
  text-align: center; font-size: 12px; padding: 6px; z-index: 3;
}

.wish-btn {
  position: absolute; top: 10px; left: 10px; z-index: 3;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: #fff; border: 1px solid var(--line);
  border-radius: 50%; cursor: pointer; color: var(--muted);
  transition: color .15s ease, background .15s ease;
}
.wish-btn:hover { color: var(--badge); }
.wish-btn.active { color: var(--badge); background: #fff2ef; border-color: #ffd9d1; }

.product-body { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-title {
  font-size: 14px; font-weight: 500; line-height: 1.85;
  min-height: 3.4em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-title a:hover { color: var(--primary); }

.stars { display: inline-flex; align-items: center; gap: 3px; color: var(--star); font-size: 13px; }
.stars .score { color: var(--muted); font-size: 12px; margin-inline-start: 6px; }
.stars .empty { color: #d7dcd7; }

.price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.price-now { color: var(--primary); font-weight: 700; font-size: 15px; }
.price-old { color: var(--muted); font-size: 12.5px; text-decoration: line-through; }
.price-unit { color: var(--muted); font-size: 12px; }

.qty-control {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius-pill);
  overflow: hidden;
}
.qty-control button {
  width: 34px; height: 34px;
  background: var(--bg-soft); border: none; cursor: pointer;
  font-size: 16px; line-height: 1;
}
.qty-control button:hover { background: var(--tile); color: var(--primary); }
.qty-control input {
  width: 44px; height: 34px; border: none; text-align: center;
  background: #fff; -moz-appearance: textfield; appearance: textfield;
}
.qty-control input::-webkit-outer-spin-button,
.qty-control input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.add-cart-btn { margin-top: 6px; width: 100%; }
.add-cart-btn.added { background: var(--primary-dark); }

/* ===== برندها ===== */
.brand-strip {
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
}
.brand-chip {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 10px 22px; font-weight: 500; color: var(--muted);
  transition: all .15s ease;
}
.brand-chip:hover { color: var(--primary); border-color: var(--primary); }

/* ===== مقالات ===== */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow .18s ease, transform .18s ease;
}
.post-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.post-media { aspect-ratio: 16/9; overflow: hidden; position: relative; }
.post-media img { width: 100%; height: 100%; object-fit: cover; }
.post-date {
  position: absolute; top: 12px; right: 12px;
  background: var(--primary); color: #fff;
  border-radius: 12px; text-align: center;
  font-size: 12px; line-height: 1.5; padding: 6px 10px;
}
.post-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-title { font-size: 16px; margin: 0; }
.post-title a:hover { color: var(--primary); }
.post-excerpt { color: var(--muted); font-size: 13.5px; flex: 1; }
.post-meta { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12.5px; }

/* ===== صفحهٔ مقاله =====
 * ⚠️ پیش‌تر `.post-full` و `.post-hero` **هیچ قاعده‌ای نداشتند**؛ نه فونت،
 * نه عرض، نه فاصلهٔ پاراگراف. متن مقاله با اندازهٔ پیش‌فرض مرورگر و بدون
 * هیچ ریتمی رندر می‌شد. این بخش کل تایپوگرافی مقاله را تعریف می‌کند.
 */
.article-wrap { max-width: 1100px; }
.crumb-current { color: var(--muted); }

.article {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  margin-bottom: 40px;
}

.article-head { padding: 34px 40px 0; }
.article-title {
  font-size: 30px; line-height: 1.55; font-weight: 700;
  margin: 0 0 16px; color: var(--primary-dark);
}
.article-meta {
  display: flex; flex-wrap: wrap; gap: 18px;
  color: var(--muted); font-size: 13px; padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.am-item { display: inline-flex; align-items: center; gap: 6px; }
.am-ico { display: inline-flex; opacity: .75; }
.article-lead {
  font-size: 16.5px; line-height: 2; color: var(--muted);
  margin: 20px 0 0; padding-inline-start: 14px;
  border-inline-start: 3px solid var(--primary);
}

.article-hero { margin: 26px 0 0; }
.article-hero img {
  width: 100%; height: auto; max-height: 460px;
  object-fit: cover; display: block;
}

.article-layout { padding: 8px 40px 40px; }

/* فهرست مطالب — تودرتو و جمع‌شدنی
 * ⚠️ تیترهای اصلی شماره‌گذاری می‌شوند، زیرتیترها نه. شمارهٔ زیرتیترها
 * شمارندهٔ «۱» را دو بار نشان می‌داد (یک بار روی تیتر و یک بار روی
 * زیرتیتر) و شمارش را بی‌معنا می‌کرد.
 */
.article-toc {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 20px; margin: 26px 0 30px;
}
.toc-title {
  font-size: 14px; font-weight: 700; color: var(--primary-dark);
  cursor: pointer; list-style: none; padding-inline-end: 18px;
  position: relative;
}
.toc-title::-webkit-details-marker { display: none; }
.toc-title::after {
  content: "▾"; position: absolute; inset-inline-end: 0; top: 0;
  transition: transform .18s ease; color: var(--primary);
}
.article-toc:not([open]) .toc-title::after { transform: rotate(-90deg); }
.article-toc:not([open]) .toc-title { margin-bottom: 0; }

.article-toc ol {
  margin: 10px 0 0; padding-inline-start: 22px;
  counter-reset: toc;
  /* شمارهٔ تیترهای اصلی را خودِ `::before` می‌نویسد؛ نشانگر پیش‌فرض
   * `<ol>` باید خاموش شود وگرنه هر ردیف «۱. ۱.» می‌شود. */
  list-style: none;
}
.article-toc ol ol { margin: 4px 0 6px; padding-inline-start: 16px; counter-reset: none; }
.article-toc li { line-height: 1.95; font-size: 13.5px; }
.article-toc > ol > li.toc-h2 { counter-increment: toc; }
.article-toc > ol > li.toc-h2 > a::before {
  content: counter(toc) ". "; color: var(--primary); font-weight: 700;
}
.article-toc li.toc-h3 { list-style: circle; font-size: 12.5px; color: var(--muted); }
.article-toc a { color: var(--fg); }
.article-toc a:hover { color: var(--primary); }

/* ----- بدنهٔ مقاله ----- */
.article-body {
  font-size: 16px;
  line-height: 2.15;
  color: var(--fg);
  /* ⚠️ `justify` در فارسی با کشیدگی‌های نامنظم بدترین حالت است؛ راست‌چین
   * طبیعی مرورگر همیشه بهتر خوانده می‌شود. */
  text-align: start;
}
.article-body > p { margin: 0 0 1.35em; }
.article-body > p:last-child { margin-bottom: 0; }

/* حرف اول هر پاراگراف کمی بزرگ‌تر؟ نه — در فارسی با «بسم‌الله» و رقم
 * قاطی می‌شود و بیشتر آزاردهنده است تا زیبا. */

.article-body h2 {
  font-size: 21px; line-height: 1.7; font-weight: 700;
  color: var(--primary-dark);
  margin: 2.2em 0 .7em;
  padding-bottom: .45em;
  border-bottom: 2px solid var(--bg-soft);
}
.article-body h2:first-child { margin-top: 0; }
.article-body h3 {
  font-size: 17.5px; line-height: 1.7; font-weight: 700;
  color: var(--primary);
  margin: 1.8em 0 .5em;
}

.article-figure { margin: 1.9em 0; }
.article-figure img {
  width: 100%; height: auto; display: block;
  /*
   * ⚠️ `max-height` + `object-fit` جلوی یک عکس عمودی بلند را می‌گیرد که
   * وگرنه چند صفحه ارتفاع می‌گرفت و متن را دفن می‌کرد. بدون `contain`
   * تصویر باریک برش می‌خورد؛ با آن، کامل دیده می‌شود و فقط حاشیه‌اش
   * پر می‌شود.
   */
  max-height: 620px; object-fit: contain;
  background: var(--bg-soft);
  border-radius: var(--radius); border: 1px solid var(--line);
}
.article-figure figcaption {
  margin-top: .7em; font-size: 13px; line-height: 1.7;
  color: var(--muted); text-align: center;
}

.article-footer {
  margin-top: 2.2em; padding-top: 1.4em;
  border-top: 1px solid var(--line);
}

/* ریتم خواندن روی صفحهٔ باریک */
@media (max-width: 720px) {
  .article-head { padding: 22px 18px 0; }
  .article-title { font-size: 23px; }
  .article-layout { padding: 8px 18px 26px; }
  .article-body { font-size: 15.5px; line-height: 2.05; }
  .article-body h2 { font-size: 19px; }
  .article-body h3 { font-size: 16.5px; }
  .article-toc { padding: 14px 16px; }
  .article-hero img { max-height: 260px; }
}

/* صفحات ثابت (ارسال، بازگشت کالا، حریم خصوصی، قوانین) از `staticPage`
 * می‌آیند و همان ریتم خواندن مقاله را می‌خواهند. */
.post-full {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px 36px;
  font-size: 15.5px; line-height: 2.1;
}
.post-full > p { margin: 0 0 1.2em; }
.post-full > p:last-child { margin-bottom: 0; }
@media (max-width: 720px) {
  .post-full { padding: 20px 18px; font-size: 15px; line-height: 2; }
}

/* ===== نظرات مشتریان ===== */
.testi-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(300px, 1fr);
  gap: 18px; overflow-x: auto; padding-bottom: 10px;
  scroll-snap-type: x mandatory;
}
.testi-track::-webkit-scrollbar { height: 8px; }
.testi-track::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
.testi-card {
  scroll-snap-align: start;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
}
.testi-text { color: var(--text); font-size: 14px; flex: 1; }
.testi-author { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: grid; place-items: center; font-weight: 700;
}
.testi-product { color: var(--muted); font-size: 12.5px; }

/* ===== نقد و بررسی‌ها ===== */
.review-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.review-item {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
  display: flex; flex-direction: column; gap: 8px;
}
.review-item .review-body { font-size: 14px; color: var(--text); flex: 1; }
.review-item .review-meta { color: var(--muted); font-size: 12.5px; }

/* ===== فروشگاه (لیست + فیلتر) ===== */
.page-head { padding: 26px 0 6px; }
.breadcrumb { color: var(--muted); font-size: 13px; display: flex; gap: 6px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--primary); }
.page-title { font-size: 26px; margin: 10px 0 0; }

.shop-layout { display: grid; grid-template-columns: 260px 1fr; gap: 26px; align-items: start; padding-bottom: 40px; }
.filters {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
  position: sticky; top: calc(var(--header-h) + 96px);
  display: flex; flex-direction: column; gap: 18px;
}
.filter-group h3 { font-size: 15px; margin: 0 0 10px; }
.filter-list { display: flex; flex-direction: column; gap: 8px; }
.filter-list label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; cursor: pointer; }
.filter-list label:hover { color: var(--text); }
.filter-list input[type='checkbox'], .filter-list input[type='radio'] { accent-color: var(--primary); width: 16px; height: 16px; }
.price-inputs { display: flex; gap: 8px; }
.price-inputs input { width: 100%; }

.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-bottom: 18px; flex-wrap: wrap;
}
.result-count { color: var(--muted); font-size: 14px; }
.sort-select { border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 9px 16px; background: #fff; }

.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 28px; }
.page-link {
  min-width: 40px; height: 40px; padding: 0 12px;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.page-link:hover { border-color: var(--primary); color: var(--primary); }
.page-link.current { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-link.disabled { opacity: .45; pointer-events: none; }

/* ===== صفحه محصول ===== */
.product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; padding-bottom: 34px; }
.gallery-main {
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: #fff; aspect-ratio: 1;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gallery-thumbs button {
  width: 76px; height: 76px; padding: 0;
  border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; background: #fff; cursor: pointer;
}
.gallery-thumbs button.active { border-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 35%, transparent); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.product-info h1 { font-size: 24px; margin-bottom: 8px; }
.info-meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; margin-bottom: 14px; }
.product-price-box {
  background: var(--bg-soft); border-radius: var(--radius);
  padding: 16px 18px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.product-price-box .price-now { font-size: 22px; }
.stock-ok { color: var(--primary); font-size: 13.5px; }
.stock-low { color: var(--badge); font-size: 13.5px; }
.buy-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }

.spec-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.spec-table th, .spec-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: right; }
.spec-table th { width: 34%; color: var(--muted); font-weight: 500; background: var(--bg-soft); }

.tab-content { padding: 18px 0; }
.reviews-form { display: flex; flex-direction: column; gap: 12px; max-width: 560px; }

/* ===== سبد خرید ===== */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 26px; align-items: start; padding-bottom: 40px; }
.cart-items { display: flex; flex-direction: column; gap: 12px; }
.cart-item {
  display: grid; grid-template-columns: 96px 1fr auto; gap: 14px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px; align-items: center;
}
.cart-item img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; }
.cart-item .ci-name { font-weight: 500; font-size: 14px; }
.cart-item .ci-unit { color: var(--muted); font-size: 13px; }
.cart-item .ci-total { font-weight: 700; color: var(--primary); white-space: nowrap; }
.ci-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.link-danger { color: var(--badge); font-size: 13px; background: none; border: none; cursor: pointer; padding: 0; }
.link-danger:hover { text-decoration: underline; }

.summary-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
  position: sticky; top: calc(var(--header-h) + 96px);
}
.summary-card h2 { font-size: 17px; }
.summary-row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; font-size: 14px; }
.summary-row.total { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 14px; font-weight: 700; font-size: 16px; }
.summary-row.total .val { color: var(--primary); }

/* ===== فرم‌ها ===== */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13.5px; font-weight: 500; }
.field .req { color: var(--badge); }
.field input, .field select, .field textarea {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 14px; background: #fff; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}
.field textarea { min-height: 110px; resize: vertical; }
.field .hint { color: var(--muted); font-size: 12px; }
.field .error { color: var(--badge); font-size: 12.5px; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--badge); }

.alert {
  border-radius: 12px; padding: 12px 16px; font-size: 14px; margin-bottom: 16px;
  border: 1px solid transparent;
}
.alert-error { background: #fdecea; border-color: #f8c9c2; color: #96321f; }
.alert-success { background: #eaf7ec; border-color: #c5e8cc; color: #22603a; }
.alert-info { background: var(--bg-soft); border-color: var(--line); color: var(--text); }

/*
 * روش پرداخت: هر گزینه یک کارت است، نه یک ردیف ساده.
 *
 * ⚠️ دایرهٔ گزینه عمداً `appearance: none` است و دستی کشیده می‌شود.
 * دایرهٔ پیش‌فرض مرورگر در فایرفاکس و کروم متفاوت است، اندازه‌اش قابل
 * تغییر نیست و `accent-color` فقط رنگ می‌دهد — همان چیزی که کوچک و
 * بی‌ریخت دیده می‌شد. با `::before` یک نقطهٔ ۱۲px داخل حلقهٔ ۲۴px
 * می‌سازیم که با `transform: scale()` بزرگ می‌شود.
 *
 * ⚠️ `.choice:has(input:checked)` استایل کارتِ انتخاب‌شده است؛ اگر این
 * خط را بردارید، مشتری دیگر نمی‌فهمد کدام روش فعال است (دایره به‌تنهایی
 * روی موبایل به‌سختی دیده می‌شود).
 */
.choice-list { display: flex; flex-direction: column; gap: 12px; }
.choice {
  display: flex; gap: 14px; align-items: flex-start;
  border: 1.5px solid var(--line); border-radius: 16px; padding: 16px 18px;
  cursor: pointer; background: var(--card);
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.choice:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); }
.choice:has(input:checked) {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 5%, #fff);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent);
}
.choice:focus-within { outline: 2px solid color-mix(in srgb, var(--primary) 55%, #fff); outline-offset: 2px; }
/*
 * ⚠️ `padding: 0` حیاتی است. قاعدهٔ عمومی `.field input`
 * (`padding: 11px 14px`) روی همین رادیو هم اعمال می‌شد؛ چون من هیچ
 * `padding`ی اعلام نکرده بودم، آن مقدار می‌ماند و با `box-sizing:
 * border-box` جعبه را از ۲۴×۲۴ به ۳۲×۲۶ می‌برد — حلقه بیضی و کج
 * می‌شد، دقیقاً همان چیزی که گزارش شد (اندازه‌گیری‌شده: ۳۲×۲۶).
 */
.choice input[type="radio"] {
  appearance: none; -webkit-appearance: none;
  flex: 0 0 auto; width: 24px; height: 24px; margin: 1px 0 0; padding: 0;
  border: 2px solid #c3cfc0; border-radius: 50%; background: #fff;
  display: grid; place-content: center; cursor: pointer;
  transition: border-color .15s ease;
}
.choice input[type="radio"]::before {
  content: ""; width: 12px; height: 12px; border-radius: 50%;
  background: var(--primary); transform: scale(0);
  transition: transform .15s ease;
}
.choice input[type="radio"]:checked { border-color: var(--primary); }
.choice input[type="radio"]:checked::before { transform: scale(1); }
.choice.disabled { opacity: .55; cursor: not-allowed; }
.choice .c-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }

/*
 * نسخهٔ فشرده برای ستون خلاصهٔ سبد خرید.
 *
 * ⚠️ همان `input[type=radio]` را به ارث می‌برد، پس دایره و نقطهٔ سبز یکسان
 * است؛ فقط `padding: 0` هم لازم است چون قاعدهٔ `.field input` این‌جا هم
 * اعمال می‌شود (همان تلپی که رادیوی تسویه را ۳۲×۲۶ کرد).
 */
.choice-sm {
  gap: 10px; padding: 9px 12px; border-radius: 12px; border-width: 1px;
  align-items: center;
}
.choice-sm input[type="radio"] {
  width: 20px; height: 20px; padding: 0; margin: 0;
}
.choice-sm input[type="radio"]::before { width: 10px; height: 10px; }
.choice-sm .c-title { font-size: 13.5px; font-weight: 500; }
/* مبلغ کنار هر گزینه؛ `margin-inline-start: auto` آن را به لبهٔ چپ می‌برد */
.choice-sm .c-val {
  margin-inline-start: auto; font-size: 13px; font-weight: 600;
  color: var(--primary-dark); white-space: nowrap;
}
/*
 * «پس‌کرایه» به‌جای مبلغ یک نشانهٔ زمانی می‌گیرد، نه عدد.
 * ⚠️ رنگش کم‌رنگ‌تر از `.c-val` است تا با مبلغ اشتباه گرفته نشود؛
 * اگر مثل مبلغ سبز و پررنگ بود، دوباره «قیمت» خوانده می‌شد.
 */
.choice-sm .c-val-note {
  margin-inline-start: auto; font-size: 12px; font-weight: 500;
  color: var(--muted); white-space: nowrap;
}

.ship-mode { margin-top: 14px; }
.ship-mode-title {
  font-size: 13px; font-weight: 600; color: var(--text);
  margin-bottom: 8px;
}
.ship-mode > .choice-sm + .choice-sm { margin-top: 8px; }
.ship-mode-hint { color: var(--muted); font-size: 12px; margin: 8px 0 0; line-height: 1.7; }
.ship-mode-note {
  color: var(--muted); font-size: 12px; margin: 8px 0 0; line-height: 1.7;
}
/* برچسب «کرایه هنگام تحویل» — صفحهٔ سفارش، و ردیف هزینهٔ ارسال در سبد/تسویه */
.ship-mode-flag {
  display: inline-block; margin-top: 4px;
  font-size: 11.5px; font-weight: 500; color: var(--primary-dark);
  background: color-mix(in srgb, var(--primary) 12%, #fff);
  border-radius: var(--radius-pill); padding: 2px 10px;
}
/* داخل ردیف خلاصه جا برای `margin-top` نیست؛ برچسب باید هم‌خط با عنوان بماند */
.summary-row .ship-mode-flag { margin-top: 0; margin-inline-start: 6px; vertical-align: middle; }
.choice .c-title { font-weight: 600; font-size: 14.5px; }
.choice .c-desc { color: var(--muted); font-size: 13px; line-height: 1.7; }
.choice .c-note {
  align-self: flex-start; margin-top: 5px;
  font-size: 12.5px; font-weight: 500; color: var(--primary-dark);
  background: color-mix(in srgb, var(--primary) 12%, #fff);
  border-radius: var(--radius-pill); padding: 3px 11px;
}

/* ===== فوتر ===== */
.site-footer { background: var(--primary-dark); color: rgba(255,255,255,.88); margin-top: 40px; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 28px;
  padding: 44px 0 30px;
}
.footer-col h3 { color: #fff; font-size: 16px; }
.footer-col a { display: block; padding: 5px 0; color: rgba(255,255,255,.82); font-size: 14px; }
.footer-col a:hover { color: #fff; padding-right: 5px; transition: all .15s; }
.footer-about { font-size: 14px; color: rgba(255,255,255,.8); }
.footer-contact li { padding: 5px 0; font-size: 14px; }
.social-links { display: flex; gap: 10px; margin-top: 12px; }
.social-links a {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.14);
  display: grid; place-items: center; padding: 0;
}
.social-links a:hover { background: #fff; color: var(--primary-dark); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.16);
  padding: 16px 0; font-size: 13px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  color: rgba(255,255,255,.7);
}

/* ===== نوار اعلان پایین صفحه ===== */
.announce-bar {
  position: fixed; inset: auto 0 0 0; z-index: 80;
  background: var(--primary); color: #fff;
  padding: 12px 46px;
  text-align: center; font-size: 14px;
  box-shadow: 0 -4px 14px rgba(0,0,0,.12);
}
.announce-bar[hidden] { display: none; }
.announce-close {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #fff; font-size: 20px;
  cursor: pointer; line-height: 1; padding: 4px 8px;
}

/* ===== ناوبری پایین موبایل ===== */
.bottom-nav { display: none; }

/* ===== حساب کاربری / پیام‌ها ===== */
.auth-card {
  max-width: 440px; margin: 40px auto;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
}
.auth-card h1 { font-size: 21px; }
.auth-alt { text-align: center; margin-top: 16px; font-size: 14px; color: var(--muted); }
.auth-alt a { color: var(--primary); font-weight: 500; }
.auth-alt .link-btn { color: var(--primary); font-weight: 500; background: none; border: none; cursor: pointer; padding: 0; font-size: inherit; }
.auth-alt .link-btn:hover { text-decoration: underline; }

.empty-state {
  text-align: center; padding: 60px 20px; color: var(--muted);
  border: 1px dashed var(--line); border-radius: var(--radius);
}
.empty-state .icon { font-size: 42px; margin-bottom: 10px; }

.order-box {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; margin-bottom: 18px;
}
.order-box .order-head {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border-bottom: 1px dashed var(--line); padding-bottom: 12px; margin-bottom: 12px;
}
.status-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: var(--radius-pill); padding: 4px 14px; font-size: 12.5px; font-weight: 500;
}
.status-pending { background: #fff4e2; color: #9a6511; }
.status-paid { background: #e7f6ec; color: #1e7a45; }
.status-shipped { background: #e8f1fd; color: #1f5bad; }
.status-delivered { background: #eaf7ec; color: #22603a; }
.status-cancelled { background: #fdecea; color: #96321f; }

/* ===== کارت به کارت ===== */
.pay-layout {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 22px;
  margin-bottom: 22px; align-items: start;
}

/*
 * کارت بانکی: به شکل یک کارت واقعی.
 *
 * ⚠️ نسبت ابعاد `1.586` همان نسبت کارت بانکی استاندارد است (۸۵٫۶ × ۵۳٫۹۸
 * میلی‌متر). بدون آن، کارت هرچه عرض ستون بود پهن می‌شد و شبیه یک بنر
 * افقی می‌شد نه کارت. `max-width` هم لازم است، چون ستون سمت راست در
 * دسکتاپ حدود ۶۰۰ پیکسل است و کارت ۶۰۰ پیکسلی غیرواقعی و عظیم می‌شد.
 *
 * ⚠️ شماره و نام صاحب حساب عمداً وسط کارت می‌آیند (`bc-mid` با
 * `justify-content: center`)؛ این همان جایی است که روی کارت واقعی چاپ
 * می‌شوند. مبلغ که روی کارت نیست، پایین و جدا با یک خط نازک می‌آید.
 *
 * ⚠️ `text-align: center` روی والد و `text-align: center` روی شماره لازم
 * است: شماره `dir="ltr"` است و بدون آن، درست‌چین شدنش وسط نمی‌ماند.
 */
.bank-card {
  position: relative; overflow: hidden;
  width: 100%; max-width: 430px;
  aspect-ratio: 1.586 / 1;
  margin: 0 auto 12px;
  display: flex; flex-direction: column;
  border-radius: 18px; padding: 20px 22px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary) 55%, var(--primary-dark));
  color: #fff; box-shadow: 0 14px 32px rgba(0,0,0,.20);
  text-align: center;
}
.bank-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 80% at 100% 0%, rgba(255,255,255,.20), transparent 60%);
}
/* محتوا بالای حاشیهٔ نوری می‌نشیند، وگرنه لبه‌ها کم‌رنگ دیده می‌شوند */
.bank-card > * { position: relative; z-index: 1; }
.bc-top { display: flex; justify-content: space-between; align-items: center; }
.bc-bank { font-weight: 700; font-size: 15px; }
.bc-chip {
  width: 38px; height: 28px; border-radius: 6px; flex: 0 0 auto;
  background: linear-gradient(135deg, #f5d98a, #c9a24a);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.15);
}
.bc-mid {
  flex: 1 1 auto; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
}
.bc-label { font-size: 11px; opacity: .75; letter-spacing: .02em; }
.bc-number {
  font-family: ui-monospace, "Courier New", monospace;
  font-size: clamp(15px, 4.4vw, 20px);
  letter-spacing: .12em; font-weight: 600;
  direction: ltr; text-align: center; user-select: all;
  white-space: nowrap; margin: 2px 0 10px;
}
.bc-holder { font-size: 16px; font-weight: 700; letter-spacing: .02em; }
.bc-foot {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  border-top: 1px solid rgba(255,255,255,.22); padding-top: 10px;
}
.bc-amount-val { font-size: 16px; font-weight: 700; white-space: nowrap; }

/* بخش بارگذاری فیش */
.receipt-box {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; margin-bottom: 18px;
}
.receipt-box h2 { font-size: 17px; margin-bottom: 14px; }
.receipt-drop { margin-bottom: 14px; }
.receipt-pick {
  display: flex; align-items: center; gap: 12px;
  border: 2px dashed var(--line); border-radius: 14px;
  padding: 18px 20px; cursor: pointer; background: var(--bg-soft);
  transition: border-color .15s ease, background .15s ease;
}
.receipt-pick:hover, .receipt-pick:focus-within {
  border-color: var(--primary); background: color-mix(in srgb, var(--primary) 6%, transparent);
}
.receipt-pick .rp-ico { color: var(--primary); display: inline-flex; flex: 0 0 auto; }
.receipt-pick .rp-text { font-size: 14px; font-weight: 500; word-break: break-all; }
/* فیلد فایل پنهان است ولی کلیک روی برچسب آن را باز می‌کند و فوکوس‌پذیر می‌ماند */
.receipt-pick input[type="file"] {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.receipt-hint { color: var(--muted); font-size: 12.5px; margin: 8px 0 0; }
.receipt-drop.has-error .receipt-pick { border-color: var(--badge); }
.receipt-drop .error { color: var(--badge); font-size: 12.5px; display: block; margin-top: 6px; }
.receipt-preview { margin: 14px 0; }
.receipt-preview[hidden] { display: none; }
.receipt-preview img {
  max-width: 100%; max-height: 320px; display: block; margin: 0 auto;
  border-radius: 12px; border: 1px solid var(--line); background: var(--bg-soft);
}
.receipt-note { color: var(--muted); font-size: 12.5px; margin: 12px 0 0; text-align: center; }

.support-box {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 22px; margin-bottom: 18px;
}
.support-box .sb-title { font-weight: 700; color: var(--primary-dark); margin-bottom: 6px; }
.support-box p { color: var(--muted); font-size: 13.5px; margin: 0 0 12px; }

/* فیش در صفحهٔ سفارش مشتری */
.receipt-block .rb-title { font-size: 16px; margin-bottom: 12px; }
.receipt-block .rb-thumb { display: inline-flex; flex-direction: column; gap: 8px; align-items: center; }
.receipt-block .rb-thumb img {
  width: 150px; height: 150px; object-fit: cover;
  border-radius: 12px; border: 1px solid var(--line);
}
.receipt-block .rb-thumb span { font-size: 13px; color: var(--primary); }
.receipt-block .rb-empty { color: var(--muted); font-size: 13.5px; margin: 0 0 12px; }

@media (max-width: 992px) {
  .pay-layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .bank-card { padding: 16px; border-radius: 16px; }
  .bc-number { letter-spacing: .08em; }
  .bc-holder { font-size: 15px; }
  .bc-amount-val { font-size: 14.5px; }
}

/* ===== toast ===== */
.toast {
  position: fixed; bottom: 84px; right: 50%; transform: translateX(50%);
  background: #2a2723; color: #fff;
  padding: 12px 22px; border-radius: var(--radius-pill);
  font-size: 14px; z-index: 120; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity .25s ease, bottom .25s ease;
}
.toast.show { opacity: 1; bottom: 96px; }
.toast.success { background: var(--primary); }
.toast.error { background: var(--badge); }

/* ===== ابزارک‌های کمکی (جایگزین style درون‌خطی برای سازگاری CSP) ===== */
.badge-inline { position: static; }
.wish-inline { position: static; width: 44px; height: 44px; }
.container-flush { padding: 0; }
.mt-lg { margin-top: 22px; }

/* ===== ریسپانسیو ===== */
@media (max-width: 1200px) {
  .product-grid, .product-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 992px) {
  .product-grid, .product-grid.cols-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .post-grid, .review-list { grid-template-columns: repeat(2, 1fr); }
  .shop-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .product-layout { grid-template-columns: 1fr; }
  .cart-layout { grid-template-columns: 1fr; }
  .summary-card { position: static; }
  .site-header.search-open .search-box .search-input { width: 170px; }
  /*
   * روی تبلت فقط «پایه‌ها» را کوچک می‌کنیم — دایره، خلیج، ارتفاع‌ها و
   * حالت فشرده همه از همین‌ها مشتق می‌شوند، پس جای دیگری دست نمی‌زنیم.
   */
  .header-container {
    --social-band: 92px;
    --logo-base: 190px;
    --cove-r: 106px;
  }
  .logo-circle .logo-text { font-size: 21px; }
  .logo-circle .logo-text small { font-size: 11px; }
  .site-header.is-compact .logo-circle .logo-text { font-size: 18px; }
  .site-header.is-compact .logo-circle .logo-text small { font-size: 9px; }
}

@media (max-width: 768px) {
  body { font-size: 14.5px; padding-bottom: 66px; }
  .header-zone { display: none; }
  .site-header { background: #fff; border-bottom: 1px solid var(--line); }

  .mobile-header {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; padding: 10px 14px;
    max-width: var(--container); margin: 0 auto;
  }
  .mobile-header .logo-inline {
    display: flex; align-items: center; gap: 8px;
    position: absolute; right: 50%; transform: translateX(50%);
  }
  /*
   * لوگوی هدر موبایل.
   *
   * ⚠️ `max-width` هم لازم است، نه فقط `max-height`. لوگوی مربعی با فقط
   * `max-height: 42px` عرضِ ۴۲px هم می‌گرفت و روی نمایشگرهای باریک با دکمهٔ
   * منو و سبد خرید تلاقی می‌کرد. نسبت تصویر هم با `object-fit` حفظ می‌شود.
   */
  .mobile-header .logo-inline img {
    max-height: 42px; max-width: 118px;
    width: auto; height: auto;
    object-fit: contain;
  }
  .mobile-header .logo-inline .logo-text { font-size: 17px; }
  .mobile-menu-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: none; border: none; cursor: pointer; font-weight: 500; padding: 6px;
  }
  .mobile-menu-btn .bars { display: grid; gap: 4px; }
  .mobile-menu-btn .bars span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; }

  .mobile-drawer {
    position: fixed; inset: 0; z-index: 200;
    display: none;
  }
  .mobile-drawer.open { display: block; }
  .mobile-drawer .backdrop { position: absolute; inset: 0; background: rgba(15, 25, 18, .5); }
  .mobile-drawer .panel {
    position: absolute; top: 0; right: 0; bottom: 0;
    width: min(320px, 86vw); background: #fff;
    padding: 20px; overflow-y: auto;
    box-shadow: var(--shadow);
  }
  .mobile-drawer .panel a {
    display: block; padding: 12px 6px; border-bottom: 1px solid var(--line); font-weight: 500;
  }
  .mobile-drawer .drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
  .mobile-drawer .drawer-close { background: none; border: none; font-size: 24px; cursor: pointer; }

  .hero-grid { grid-template-columns: 1fr; }
  .banner, .banner-content { min-height: 220px; }
  .banner-content { padding: 24px; }
  .banner-title { font-size: 22px; }

  .section { padding: 24px 0; }
  .section-title { font-size: 18px; }

  .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .cat-card { padding: 10px; }
  .cat-card .cat-name { font-size: 13.5px; }

  .product-grid, .product-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-body { padding: 10px 10px 12px; }
  .product-title { font-size: 13px; min-height: 3.6em; }
  .price-now { font-size: 14px; }
  .badge-discount { font-size: 11px; padding: 3px 9px; }
  .qty-control input { width: 38px; }
  .btn { padding: 10px 18px; font-size: 14px; }

  .post-grid, .review-list { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; padding: 30px 0 20px; }

  .cart-item { grid-template-columns: 72px 1fr; }
  .cart-item img { width: 72px; height: 72px; }
  .cart-item .ci-total { grid-column: 1 / -1; text-align: left; }

  .page-title { font-size: 21px; }
  .product-info h1 { font-size: 19px; }

  /* نوار پایین موبایل */
  .bottom-nav {
    display: flex; position: fixed; inset: auto 0 0 0; z-index: 90;
    background: #fff; border-top: 1px solid var(--line);
    box-shadow: 0 -4px 16px rgba(0,0,0,.07);
  }
  .bottom-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 8px 4px 10px; font-size: 11.5px; color: var(--muted);
    position: relative;
  }
  .bottom-nav a.active { color: var(--primary); }
  .bottom-nav .bn-badge {
    position: absolute; top: 2px; left: 50%; margin-left: 4px;
    min-width: 17px; height: 17px; padding: 0 4px;
    background: var(--primary); color: #fff; border-radius: var(--radius-pill);
    font-size: 10px; font-weight: 700; display: grid; place-items: center;
  }
  .announce-bar { font-size: 12.5px; padding: 10px 40px; }
}

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