/* ============================================================
   بوبوتل — استایل اصلی
   ساختار: ۱) توکن‌ها  ۲) پایه  ۳) اجزای عمومی  ۴) بخش‌ها  ۵) واکنش‌گرا
   ============================================================ */

/* ── ۱) توکن‌ها ───────────────────────────────────────────── */
:root {
  /* رنگ */
  --teal-900: #0B3B39;   /* تیره‌ترین: بخش عمده‌فروشی و فوتر */
  --teal-700: #12706B;   /* رنگ برند: تیترها و تأکید */
  --teal-500: #1B8C84;
  --teal-050: #E7F1EF;
  --amber:    #D98A16;   /* دکمه‌های اقدام */
  --amber-dk: #B87111;
  --paper:    #F6F9F9;   /* پس‌زمینه صفحه */
  --white:    #FFFFFF;
  --ink:      #16292C;   /* متن اصلی */
  --ink-soft: #5B7175;   /* متن ثانویه */
  --line:     #DCE7E5;
  --whatsapp: #1FA855;

  /* فاصله و شعاع */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --gap: 24px;
  --wrap: 1180px;
  --header-h: 72px;

  /* سایه: فقط دو سطح، برای حفظ سلسله‌مراتب */
  --shadow-1: 0 1px 2px rgba(11, 59, 57, .06);
  --shadow-2: 0 18px 40px -24px rgba(11, 59, 57, .45);
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

body {
  margin: 0;
  font-family: Vazirmatn, "Segoe UI", Tahoma, sans-serif;
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0 0 .6em; line-height: 1.35; font-weight: 800; }
p  { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
a  { color: var(--teal-700); text-decoration: none; }
a:hover { color: var(--teal-500); }
img { max-width: 100%; display: block; }

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

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }

.skip-link {
  position: absolute; inset-inline-start: -9999px; top: 8px;
  background: var(--teal-900); color: var(--white);
  padding: 10px 16px; border-radius: var(--r-sm); z-index: 200;
}
.skip-link:focus { inset-inline-start: 16px; color: var(--white); }

/* ── ۳) اجزای عمومی ──────────────────────────────────────── */

/* دکمه‌ها */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px;
  font: inherit; font-weight: 700;
  border: 1.5px solid transparent; border-radius: var(--r-md);
  cursor: pointer; text-align: center;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn-sm    { padding: 9px 16px; font-size: .9rem; border-radius: var(--r-sm); }
.btn-block { width: 100%; }

.btn-amber   { background: var(--amber); color: var(--white); }
.btn-amber:hover { background: var(--amber-dk); color: var(--white); }

.btn-teal    { background: var(--teal-700); color: var(--white); }
.btn-teal:hover { background: var(--teal-900); color: var(--white); }

.btn-outline { background: transparent; color: var(--teal-900); border-color: var(--line); }
.btn-outline:hover { border-color: var(--teal-700); color: var(--teal-700); background: var(--white); }

.btn-whatsapp { background: var(--whatsapp); color: var(--white); }
.btn-whatsapp:hover { background: #17853F; color: var(--white); }

.icon-btn {
  position: relative;
  display: inline-grid; place-items: center;
  width: 42px; height: 42px;
  background: var(--white); color: var(--teal-900);
  border: 1.5px solid var(--line); border-radius: var(--r-md);
  cursor: pointer;
}
.icon-btn svg { width: 21px; height: 21px; }
.icon-btn:hover { border-color: var(--teal-700); color: var(--teal-700); }

.cart-count {
  position: absolute; top: -7px; inset-inline-end: -7px;
  min-width: 20px; height: 20px; padding: 0 5px;
  display: grid; place-items: center;
  background: var(--amber); color: var(--white);
  font-size: .72rem; font-weight: 700; border-radius: 999px;
}

/* عنوان بخش‌ها */
.section { padding: 76px 0; }
.section-paper { background: var(--white); border-block: 1px solid var(--line); }

.section-head { max-width: 62ch; margin-bottom: 34px; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.05rem); color: var(--teal-900); }
.section-head p  { color: var(--ink-soft); margin: 0; }

.empty-state { color: var(--ink-soft); text-align: center; padding: 30px 0; }

/* ── ۴) بخش‌ها ───────────────────────────────────────────── */

/* هدر */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(246, 249, 249, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  min-height: var(--header-h);
  display: flex; align-items: center; gap: 18px;
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--teal-900); }
.brand-mark svg { width: 40px; height: 40px; display: block; }
.brand-text strong { display: block; font-size: 1.06rem; font-weight: 800; line-height: 1.2; }
.brand-text small  { display: block; font-size: .72rem; color: var(--ink-soft); }

.main-nav { display: flex; gap: 4px; margin-inline: auto; }
.main-nav a {
  padding: 9px 14px; border-radius: var(--r-sm);
  color: var(--ink); font-size: .95rem; font-weight: 600;
}
.main-nav a:hover { background: var(--teal-050); color: var(--teal-700); }
.main-nav a.is-current { background: var(--teal-050); color: var(--teal-900); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.menu-toggle { display: none; }

/* هیرو */
.hero { padding: 56px 0 64px; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 48px; align-items: center;
}

.hero-badge {
  display: inline-block; margin: 0 0 20px;
  padding: 7px 15px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .82rem; font-weight: 600; color: var(--teal-700);
}

.hero-logo {
  width: 226px; max-width: 100%;
  padding: 10px; margin-bottom: 22px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-1);
}
.hero-logo svg { width: 100%; height: auto; }

.hero-title {
  font-size: clamp(2.1rem, 6vw, 3.5rem);
  font-weight: 900; color: var(--teal-700);
  letter-spacing: -.5px; margin-bottom: .35em;
}
/* «انتخاب باب دل» با رنگ کهربایی دکمه‌ها.
   از --amber-dk استفاده شده تا کنتراست متن روی پس‌زمینه روشن استاندارد باشد. */
.hero-title .accent { color: var(--amber-dk); }

.hero-lead {
  max-width: 46ch; font-size: 1.06rem; color: var(--ink-soft); margin-bottom: 28px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-stats {
  display: flex; flex-wrap: wrap; gap: 34px;
  margin-top: 36px; padding-top: 26px; border-top: 1px solid var(--line);
}
.hero-stats b    { display: block; font-size: 1.35rem; color: var(--teal-900); }
.hero-stats span { font-size: .85rem; color: var(--ink-soft); }

.hero-media { position: relative; margin: 0; }
.hero-art {
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-2);
  background: var(--teal-050);
}
.hero-art img {
  width: 100%; height: auto; display: block;
  aspect-ratio: 4 / 3;      /* عکس عمودی یا افقی هر نسبتی باشد، کادر ثابت می‌ماند */
  object-fit: cover;
  object-position: center;
}

.hero-chip {
  position: absolute; inset-inline-start: 22px; bottom: 22px;
  inset-inline-end: 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, .95);
  border-radius: var(--r-md);
  font-size: .9rem; font-weight: 600; color: var(--teal-900);
}
.hero-chip b {
  padding: 5px 12px;
  background: var(--teal-900); color: var(--white);
  border-radius: 999px; font-size: .8rem;
}

/* انیمیشن ورود: فقط یک لحظه در بارگذاری صفحه */
.js-reveal { opacity: 0; transform: translateY(10px); }
.is-ready .js-reveal {
  animation: rise .55s cubic-bezier(.22, .8, .3, 1) forwards;
}
.is-ready .hero-title { animation-delay: .1s; }
.is-ready .hero-lead  { animation-delay: .18s; }
.is-ready .hero-cta   { animation-delay: .26s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* نوار مزیت‌ها */
.strip { background: var(--teal-900); color: var(--white); padding: 26px 0; }
.strip-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap);
}
.strip-grid b    { display: block; font-size: 1rem; }
.strip-grid span { font-size: .85rem; color: rgba(246, 249, 249, .72); }

/* گروه‌های اصلی — بافت شبکه‌ای برگرفته از دیوار قاب مغازه */
.group-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.group-card {
  padding: 28px 26px 24px;
  background:
    linear-gradient(rgba(255,255,255,.94), rgba(255,255,255,.98)),
    repeating-linear-gradient(90deg, var(--teal-050) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(0deg, var(--teal-050) 0 1px, transparent 1px 26px);
  border: 1px solid var(--line); border-radius: var(--r-lg);
}
.group-card h3 { font-size: 1.2rem; color: var(--teal-900); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chips li {
  padding: 5px 12px;
  background: var(--teal-050); color: var(--teal-700);
  border-radius: 999px; font-size: .82rem; font-weight: 600;
}

.link-cta { font-weight: 700; border-bottom: 2px solid var(--amber); padding-bottom: 2px; }

/* کاتالوگ */
.filters { display: flex; flex-wrap: wrap; gap: 10px; }
.filter {
  padding: 9px 18px;
  font: inherit; font-size: .92rem; font-weight: 600;
  color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.filter:hover { border-color: var(--teal-500); color: var(--teal-700); }
.filter.is-active { background: var(--teal-900); border-color: var(--teal-900); color: var(--white); }

/* نوار ابزار کاتالوگ: فیلتر گروه + جستجو */
.catalog-tools {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 14px; margin-bottom: 14px;
}

.search-box { position: relative; flex: 1 1 280px; max-width: 360px; }
.search-box input {
  width: 100%;
  padding: 11px 44px 11px 38px;          /* جا برای آیکن ذره‌بین و دکمه پاک‌کردن */
  font: inherit; font-size: .92rem; color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--line); border-radius: 999px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.search-box input::placeholder { color: var(--ink-soft); }
.search-box input:focus {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(27, 140, 132, .15);
}
.search-box input::-webkit-search-cancel-button { display: none; }

.search-icon {
  position: absolute; inset-inline-start: 15px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; pointer-events: none;
  fill: none; stroke: var(--ink-soft); stroke-width: 2; stroke-linecap: round;
}
.search-clear {
  position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; display: grid; place-items: center;
  font-size: 1.3rem; line-height: 1; color: var(--ink-soft);
  background: transparent; border: 0; border-radius: 50%; cursor: pointer;
}
.search-clear:hover { background: var(--teal-050); color: var(--teal-700); }
/* display: grid بالا، خاصیت hidden را خنثی می‌کند؛ این خط آن را برمی‌گرداند */
.search-clear[hidden] { display: none; }

.search-count {
  font-size: .88rem; color: var(--ink-soft);
  margin: 0 0 18px;
}

.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }

.product {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden;
}
.product[hidden] { display: none; }

/* نشان گوشه کارت، مثلاً «پرفروش» */
.badge {
  position: absolute; top: 12px; inset-inline-start: 12px; z-index: 2;
  padding: 4px 11px;
  background: var(--amber); color: var(--white);
  font-size: .76rem; font-weight: 700; border-radius: 999px;
}

.loading-state {
  grid-column: 1 / -1; text-align: center;
  color: var(--ink-soft); padding: 40px 0;
}

/* تصویر محصول: نسبت ثابت تا شبکه به‌هم نریزد */
.thumb {
  width: 100%;
  aspect-ratio: 15 / 14;
  height: auto;
  object-fit: cover;
  background: linear-gradient(#FDFEFE, #E9EFEE);
  border-bottom: 1px solid var(--line);
}

.product-body { padding: 20px 20px 8px; flex: 1; }
.tag {
  display: inline-block; margin-bottom: 8px;
  font-size: .78rem; font-weight: 700; color: var(--teal-500);
}
.product-body h3 { font-size: 1.05rem; color: var(--teal-900); margin-bottom: .4em; }
.product-body p  { font-size: .92rem; color: var(--ink-soft); margin-bottom: .6em; }
.product-meta {
  font-size: .84rem !important; font-weight: 600;
  color: var(--teal-700) !important; margin-bottom: .5em !important;
}
.price { font-weight: 700; color: var(--ink) !important; }

/* کالای ناموجود */
.badge-out { background: var(--ink-soft); }
.product-actions .btn[disabled] {
  opacity: .55; cursor: not-allowed; pointer-events: none;
}

/* جای خالی تصویر، وقتی محصولی عکس ندارد */
.thumb-empty {
  width: 100%; aspect-ratio: 15 / 14;
  background: repeating-linear-gradient(45deg,
    var(--teal-050) 0 10px, var(--paper) 10px 20px);
}

/* صفحه‌بندی */
.pager {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 8px; margin-top: 34px;
}
.page-btn {
  min-width: 42px; padding: 9px 14px;
  font: inherit; font-size: .9rem; font-weight: 600;
  color: var(--ink); background: var(--white);
  border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}
.page-btn:hover:not([disabled]) { border-color: var(--teal-500); color: var(--teal-700); }
.page-btn.is-active {
  background: var(--teal-900); border-color: var(--teal-900); color: var(--white);
}
.page-btn[disabled] { opacity: .45; cursor: not-allowed; }
.page-info {
  margin-inline-start: 10px; font-size: .85rem; color: var(--ink-soft);
}
.pager[hidden] { display: none; }

/* توضیحات محصول: پیش‌فرض بسته، با یک کلیک باز می‌شود */
.product-desc { margin-top: 10px; }
.product-desc summary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; margin-inline-start: -10px;
  font-size: .85rem; font-weight: 600; color: var(--teal-700);
  border-radius: var(--r-sm); cursor: pointer; list-style: none;
  transition: background-color .15s ease;
}
.product-desc summary::-webkit-details-marker { display: none; }
.product-desc summary:hover { background: var(--teal-050); }
.product-desc summary:focus-visible { outline: 2px solid var(--teal-500); outline-offset: 2px; }

.product-desc .i-info,
.product-desc .i-chevron {
  width: 15px; height: 15px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.product-desc .i-chevron { width: 13px; height: 13px; transition: transform .2s ease; }
.product-desc[open] .i-chevron { transform: rotate(180deg); }

.product-desc > p {
  margin: 4px 0 0 !important;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: .9rem !important; color: var(--ink-soft) !important;
}
.product-desc[open] > p { animation: descIn .18s ease both; }
@keyframes descIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

.product-actions { display: grid; gap: 8px; padding: 0 20px 20px; }

/* همکاری عمده‌فروشی */
.wholesale { background: var(--teal-900); color: var(--white); }
.wholesale-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: start;
}
.wholesale h2 { color: var(--white); font-size: clamp(1.5rem, 3vw, 2.05rem); }
.wholesale-copy p { color: rgba(246, 249, 249, .8); max-width: 48ch; }

.check-list { margin-top: 24px; display: grid; gap: 12px; }
.check-list li {
  position: relative; padding-inline-start: 30px;
  color: rgba(246, 249, 249, .9);
}
.check-list li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 11px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--amber);
}

.wholesale-form {
  padding: 30px; background: var(--white); color: var(--ink);
  border-radius: var(--r-lg);
}
.wholesale-form h3 { font-size: 1.15rem; color: var(--teal-900); margin-bottom: 20px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px;
  font: inherit; font-size: .95rem; color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line); border-radius: var(--r-sm);
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--teal-500); background: var(--white); outline: none;
}
.field textarea { resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.form-note { margin: 12px 0 0; font-size: .87rem; color: var(--teal-700); min-height: 1.4em; }
.form-note.is-error { color: #B3261E; }

/* شهرها */
.city-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.city-grid li {
  padding: 18px 20px; text-align: center;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md);
  font-weight: 600; color: var(--teal-900);
}

/* گالری مغازه */
/* فید زندهٔ اینستاگرام */
.instagram-container { min-height: 180px; }
.instagram-container[hidden] { display: none; }
.ig-grid[hidden] { display: none; }

/* شبکهٔ پست‌های اینستاگرام (جایگزین فید زنده) */
.ig-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px;
  align-items: stretch;
}
.ig-card { margin: 0; height: 100%; }
.ig-card a {
  display: flex; flex-direction: column; height: 100%;   /* ته کارت‌ها هم‌تراز بماند */
  color: inherit; text-decoration: none;
  background: var(--white);
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.ig-card a:hover {
  transform: translateY(-3px);
  border-color: var(--teal-500); box-shadow: var(--shadow-2);
}
.ig-card a:focus-visible { outline: 2px solid var(--teal-500); outline-offset: 3px; }
.ig-card img {
  width: 100%; display: block;
  height: auto;                 /* بدون این، صفت height روی تگ غالب می‌شود */
  aspect-ratio: 1 / 1;          /* قاب مربع، مثل خود اینستاگرام */
  object-fit: cover;
}
.ig-card figcaption {
  flex: 1;
  padding: 11px 13px; font-size: .84rem; font-weight: 600; line-height: 1.5;
  color: var(--teal-900); background: var(--paper); border-top: 1px solid var(--line);
}
.ig-cta { text-align: center; margin-top: 26px; }

/* فوتر */
.site-footer { background: var(--teal-900); color: rgba(246, 249, 249, .82); padding: 58px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--gap); }
.site-footer h3 { color: var(--white); font-size: 1.3rem; }
.site-footer h4 { color: var(--white); font-size: 1rem; }
.site-footer a  { color: rgba(246, 249, 249, .82); }
.site-footer a:hover { color: var(--amber); }
.footer-list { display: grid; gap: 9px; font-size: .93rem; }

.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  margin-top: 40px; padding-top: 20px;
  border-top: 1px solid rgba(246, 249, 249, .16);
  font-size: .85rem; color: rgba(246, 249, 249, .6);
}

/* سبد خرید (کشویی) */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 110;
  background: rgba(11, 59, 57, .45);
}
.drawer {
  position: fixed; inset-block: 0; inset-inline-end: 0; z-index: 120;
  width: min(390px, 92vw);
  display: flex; flex-direction: column;
  background: var(--white);
  transform: translateX(100%);           /* حالت LTR: پنهان در سمت راست */
  transition: transform .25s ease;
  box-shadow: var(--shadow-2);
}
[dir="rtl"] .drawer { transform: translateX(-100%); } /* RTL: پنهان در سمت چپ */
.drawer.is-open, [dir="rtl"] .drawer.is-open { transform: none; }

.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--line);
}
.drawer-head h2 { margin: 0; font-size: 1.1rem; color: var(--teal-900); }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px; }
.drawer-foot { padding: 18px 22px; border-top: 1px solid var(--line); }
.drawer-note { font-size: .85rem; color: var(--ink-soft); margin-bottom: 12px; }

.cart-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.cart-row h4 { margin: 0; font-size: .95rem; font-weight: 700; }
.cart-row small { color: var(--ink-soft); font-size: .82rem; }
.qty { display: flex; align-items: center; gap: 8px; }
.qty button {
  width: 30px; height: 30px; font: inherit; font-weight: 700; cursor: pointer;
  background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-sm);
  color: var(--teal-900);
}
.qty button:hover { border-color: var(--teal-500); }

/* دکمه شناور واتساپ */
.fab-whatsapp {
  position: fixed; inset-inline-start: 20px; bottom: 20px; z-index: 90;
  width: 54px; height: 54px;
  display: grid; place-items: center;
  background: var(--whatsapp); color: var(--white);
  border-radius: 50%; box-shadow: var(--shadow-2);
}
.fab-whatsapp svg { width: 28px; height: 28px; }
.fab-whatsapp:hover { background: #17853F; color: var(--white); }

/* ── ۵) واکنش‌گرا ────────────────────────────────────────── */

@media (max-width: 1024px) {
  .ig-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-media { order: -1; }
  .hero-lead { max-width: none; }
  .group-grid, .product-grid { grid-template-columns: repeat(2, 1fr); }
  .strip-grid { grid-template-columns: repeat(2, 1fr); row-gap: 18px; }
  .wholesale-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
}

@media (max-width: 860px) {
  .menu-toggle { display: inline-grid; }
  .header-actions .btn { display: none; }

  .main-nav {
    position: absolute; inset-inline: 0; top: 100%;
    display: none; flex-direction: column; gap: 2px;
    padding: 12px 20px 18px;
    background: var(--white); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-2);
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 12px 14px; }
  .site-header { position: sticky; }
  .header-inner { position: relative; justify-content: space-between; }
}

@media (max-width: 620px) {
  .wrap { width: calc(100% - 32px); }
  .section { padding: 56px 0; }
  .hero { padding: 34px 0 48px; }
  .hero-cta .btn { flex: 1 1 100%; }
  .hero-stats { gap: 22px; }
  .group-grid, .product-grid, .strip-grid { grid-template-columns: 1fr; }
  .ig-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .city-grid { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .wholesale-form { padding: 22px; }
  .hero-chip { flex-direction: column; align-items: flex-start; gap: 6px; }
  .catalog-tools { flex-direction: column; align-items: stretch; }
  /* در چیدمان ستونی، flex-basis روی ارتفاع می‌نشیند؛ پس خنثی می‌شود */
  .search-box { flex: 0 0 auto; max-width: none; order: -1; }   /* روی موبایل جستجو بالای فیلترها */
}

/* احترام به تنظیم «کاهش حرکت» سیستم‌عامل */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-reveal { opacity: 1; transform: none; animation: none !important; }
  .product-desc[open] > p { animation: none !important; }
  * { transition-duration: .01ms !important; }
}

/* چاپ */
@media print {
  .site-header, .fab-whatsapp, .drawer, .drawer-backdrop, .product-actions,
  .catalog-tools, .search-count { display: none !important; }
  /* در چاپ همه توضیحات باز و دکمه‌شان حذف شود */
  .product-desc > p { display: block !important; }
  .product-desc summary { display: none !important; }
  body { background: #fff; }
}
