/* =====================================================================
   دریانو هوم — استایل اصلی
   ---------------------------------------------------------------------
   فهرست:
   01 فونت و متغیرها      06 پنل فروش ویژه      11 صفحه محصول
   02 پایه و ریست          07 کارت محصول         12 سبد خرید
   03 دکمه‌ها و فرم‌ها      08 ردیف‌های محصول     13 اعلان و ابزارها
   04 هدر و ناوبری         09 بنر و مزایا         14 واکنش‌گرایی
   05 اسلایدر صفحه اصلی    10 فوتر                15 دسترس‌پذیری
   ===================================================================== */

/* ---------- 01 فونت و متغیرها ---------- */
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn-800.woff2') format('woff2'); font-weight: 800; font-display: swap; }

:root {
  /* هویت رنگی — برای تغییر برند فقط همین بلوک را عوض کنید */
  --ink:        #1c2b41;   /* سرمه‌ای متن و هدر */
  --ink-2:      #142032;   /* هدر تیره‌تر / فوتر */
  --primary:    #1a56db;   /* دکمه‌های معمولی و لینک‌ها */
  --primary-d:  #1240a8;
  --sale:       #e11d48;   /* قرمز: فقط فروش ویژه و تخفیف */
  --sale-d:     #be123c;
  --amber:      #f59e0b;   /* ستاره و تأکید کوچک */
  --bg:         #f5f6fa;
  --card:       #ffffff;
  --line:       #e6e9f2;
  --text:       #23293b;
  --muted:      #667085;
  --muted-2:    #98a1b3;

  --r-lg: 24px;  --r-md: 16px;  --r-sm: 12px;
  --shadow-1: 0 2px 10px rgba(23, 35, 59, .06);
  --shadow-2: 0 14px 34px -12px rgba(23, 35, 59, .18);
  --container: 1280px;
  --header-h: 118px;
}

/* ---------- 02 پایه و ریست ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* وسط‌چینی پایدار در زوم: گاتر اسکرول‌بار همیشه رزرو می‌شود و
   سرریز افقی احتمالی بدون ساخت اسکرول‌بر بریده می‌شود */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
  overflow-x: hidden;
  overflow-x: clip;
}
body {
  margin: 0;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.9;
  /* لایهٔ دوم محافظ افقی: فقط clip — برخلاف hidden، فضای اسکرول نمی‌سازد و
     position: sticky هدر را در هیچ مرورگری نمی‌شکند؛ مرورگرهای قدیمی‌تر هم
     به‌سادگی این خط را نادیده می‌گیرند (html خودش clip دارد) */
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-d); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.6; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
button { font-family: inherit; cursor: pointer; }
/* حس لمسی طبیعی‌تر در موبایل: حذف فلش پیش‌فرض مرورگر هنگام ضربه */
a, button, summary, .p-card { -webkit-tap-highlight-color: transparent; }
input, select, textarea { font-family: inherit; font-size: 1rem; }
::selection { background: rgba(26, 86, 219, .18); }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.hidden { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; clip: rect(0 0 0 0); overflow: hidden; }
main { min-height: 60vh; }
.skip-link {
  position: absolute; top: 8px; inset-inline-start: 8px;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 10px; z-index: 300;
  /* پنهان‌سازی با transform به‌جای آفست ‎-9999px: عناصر مطلقِ هزاران پیکسل بیرون از صفحه
     در RTL می‌توانند در iOS/سافاری ناحیهٔ پن افقی بسازند؛ transform هرگز وارد ناحیهٔ اسکرول نمی‌شود */
  transform: translateY(-64px); opacity: 0; transition: transform .2s, opacity .2s;
}
.skip-link:focus { transform: none; opacity: 1; }

/* ---------- 03 دکمه‌ها و فرم‌ها ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: var(--r-sm); padding: 11px 22px;
  font-size: .95rem; font-weight: 700; line-height: 1.6;
  transition: background .2s, transform .15s, box-shadow .2s, color .2s;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-d); color: #fff; }
.btn-sale { background: var(--sale); color: #fff; }
.btn-sale:hover { background: var(--sale-d); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-white { background: #fff; color: var(--ink); }
.btn-white:hover { color: var(--sale); }
.btn-lg { padding: 14px 30px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.input, .select {
  width: 100%; border: 1.5px solid var(--line); border-radius: var(--r-sm);
  padding: 10px 14px; background: #fff; color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
.input:focus, .select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26, 86, 219, .14); }
.input::placeholder { color: var(--muted-2); }
label { font-size: .88rem; font-weight: 700; color: var(--ink); }

/* ---------- 04 هدر و ناوبری ---------- */
.topline { background: var(--sale); color: #fff; text-align: center; font-size: .8rem; padding: 6px 12px; }
.topline b { font-weight: 700; }

.site-header {
  position: sticky; top: 0; z-index: 120; background: var(--ink); color: #fff; box-shadow: var(--shadow-1);
  /* هدر هوشمند: با اسکرول به پایین محو می‌شود و با اولین اسکرول به بالا
     (یا نزدیکی بالای صفحه) برمی‌گردد — هم در ویندوز هم در موبایل.
     چون sticky است، پنهان‌شدن با transform هیچ پرش محتوایی ایجاد نمی‌کند. */
  transition: transform .32s cubic-bezier(.22, .8, .3, 1);
  will-change: transform;
}
.site-header.is-hidden { transform: translateY(-100%); }
.header-main { display: flex; align-items: center; gap: 18px; padding-block: 14px 10px; }

.logo { display: inline-flex; align-items: center; gap: 10px; color: #fff; flex-shrink: 0; }
.logo:hover { color: #fff; }
.logo__mark { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, var(--sale) 0%, #f43f5e 100%); display: grid; place-items: center; flex-shrink: 0; }
.logo__mark svg { width: 22px; height: 22px; fill: #fff; }
.logo__fa { font-weight: 800; font-size: 1.18rem; line-height: 1.3; }
.logo__fa small { display: block; font-size: .62rem; font-weight: 500; letter-spacing: .35em; color: #aab6cf; }

.search { flex: 1; max-width: 560px; position: relative; }
.search input {
  width: 100%; border: 0; border-radius: 999px; padding: 12px 52px 12px 18px;
  font-size: .93rem; background: #fff; color: var(--text);
}
.search input::placeholder { color: var(--muted-2); }
.search input:focus { outline: 2px solid rgba(255, 255, 255, .35); }
.search button {
  position: absolute; inset-inline-end: 4px; top: 50%; translate: 0 -50%;
  width: 38px; height: 38px; border-radius: 999px; border: 0;
  background: var(--sale); display: grid; place-items: center;
}
.search button svg { width: 17px; height: 17px; fill: none; stroke: #fff; stroke-width: 2.2; }

.header-actions { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.header-actions .btn-login {
  display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 0; color: #fff;
  font-size: .9rem; font-weight: 500; padding: 8px 10px; border-radius: 10px;
}
.header-actions .btn-login:hover { background: rgba(255, 255, 255, .08); }
.header-actions .btn-login svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 1.8; }

.cart-btn { position: relative; background: rgba(255, 255, 255, .1); border: 0; border-radius: 12px; width: 44px; height: 44px; display: grid; place-items: center; }
.cart-btn:hover { background: rgba(255, 255, 255, .18); }
.cart-btn svg { width: 21px; height: 21px; fill: none; stroke: #fff; stroke-width: 1.8; }
.cart-count[hidden], .cart-badge[hidden], .bottom-nav .cart-badge[hidden] { display: none; }
.cart-count {
  position: absolute; top: -6px; inset-inline-start: -6px;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: var(--amber); color: #fff; font-size: .72rem; font-weight: 700;
  display: grid; place-items: center; border: 2px solid var(--ink);
}
/* ضربان نشان سبد هنگام افزودن کالای جدید */
.cart-count.bump, .cart-badge.bump { animation: dh-pop .4s cubic-bezier(.3, 1.6, .4, 1); }
@keyframes dh-pop { 45% { transform: scale(1.4); } }

.burger { display: none; background: transparent; border: 0; width: 42px; height: 42px; border-radius: 10px; }
.burger svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2; }

.nav-row { display: flex; align-items: stretch; gap: 14px; padding-bottom: 0; }
.cat-wrap { position: relative; }
.cat-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--sale); color: #fff; border: 0;
  border-radius: var(--r-sm) var(--r-sm) 0 0; padding: 12px 18px;
  font-size: .93rem; font-weight: 700; height: 100%;
}
.cat-btn svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2; }
.cat-btn .chev { transition: rotate .25s; width: 14px; }
.cat-btn[aria-expanded="true"] .chev { rotate: 180deg; }
.cat-panel {
  /* لنگر به سمت شروع (راست در RTL) تا پنل هرگز از لبهٔ صفحه بیرون نزند */
  position: absolute; inset-inline-start: 0; top: 100%;
  width: min(300px, calc(100vw - 40px));
  background: #fff; color: var(--text);
  border-radius: var(--r-md) 0 var(--r-md) var(--r-md);
  box-shadow: var(--shadow-2); padding: 10px; display: none; z-index: 130;
}
@media (max-width: 1024px) {
  .cat-panel { top: calc(100% + 6px); border-radius: var(--r-md); }
}
.cat-panel.open { display: block; }
.cat-panel a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 10px; color: var(--text); font-size: .92rem; font-weight: 500;
}
.cat-panel a:hover { background: #f2f5ff; color: var(--primary); }
.cat-panel a img { width: 34px; height: 34px; border-radius: 8px; object-fit: contain; background: #f4f6fa; }
.cat-panel a .chev-l { margin-inline-start: auto; width: 14px; height: 14px; fill: none; stroke: var(--muted-2); stroke-width: 2; transition: stroke .2s, translate .2s; }
.cat-panel a:hover .chev-l { stroke: var(--primary); translate: -3px 0; }

.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; color: #e8ecf5; font-size: .92rem; padding: 12px 14px; border-radius: 10px 10px 0 0;
}
.nav-links a:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.nav-links a.is-active { color: #fff; font-weight: 700; box-shadow: inset 0 -3px 0 var(--sale); }

/* کشوی موبایل */
.overlay { position: fixed; inset: 0; background: rgba(15, 22, 36, .55); z-index: 140; opacity: 0; pointer-events: none; transition: opacity .25s; }
.overlay.show { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: 300px; max-width: 86vw;
  background: #fff; z-index: 150;
  /* پارک کشو با transform (نه آفست منفی): در iOS پن افقی نمی‌سازد و انیمیشن روان‌تر است */
  transform: translateX(-100%);
  transition: transform .3s cubic-bezier(.22, .8, .3, 1);
  display: flex; flex-direction: column; overflow-y: auto;
}
.drawer.open { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; background: var(--ink); color: #fff; }
.drawer__head b { font-size: 1rem; }
.drawer__close { background: transparent; border: 0; color: #fff; width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; }
.drawer__close:hover { background: rgba(255, 255, 255, .12); }
.drawer__close svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2; }
.drawer__links { list-style: none; margin: 0; padding: 10px; }
.drawer__links a { display: flex; align-items: center; gap: 10px; padding: 12px 12px; color: var(--text); font-weight: 500; border-radius: 10px; }
.drawer__links a:hover { background: #f2f5ff; }
.drawer__sec { padding: 6px 18px; font-size: .78rem; font-weight: 700; color: var(--muted-2); margin-top: 10px; }

/* سبد کنار هدر (کشوی ریز) */
.cart-drawer { position: fixed; top: 0; bottom: 0; inset-inline-start: 0; width: 360px; max-width: 92vw; background: #fff; z-index: 150; transform: translateX(100%); transition: transform .3s cubic-bezier(.22, .8, .3, 1); display: flex; flex-direction: column; }
.cart-drawer.open { transform: none; }
.cart-drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.cart-drawer__head b { color: var(--ink); }
.cart-drawer__body { flex: 1; overflow-y: auto; padding: 12px 16px; }
.cart-drawer__foot { border-top: 1px solid var(--line); padding: 14px 16px; }
.cart-mini { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.cart-mini:last-child { border-bottom: 0; }
.cart-mini img { width: 58px; height: 58px; object-fit: contain; border-radius: 10px; background: #f4f6fa; }
.cart-mini__t { font-size: .85rem; font-weight: 700; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.cart-mini__p { font-size: .82rem; color: var(--sale); font-weight: 700; }
.cart-mini__x { margin-inline-start: auto; background: transparent; border: 0; color: var(--muted-2); width: 30px; height: 30px; border-radius: 8px; }
.cart-mini__x:hover { background: #fee2e2; color: var(--sale); }
.cart-empty { text-align: center; padding: 40px 10px; color: var(--muted); }
.cart-empty svg { width: 54px; height: 54px; margin-bottom: 10px; fill: none; stroke: var(--muted-2); stroke-width: 1.4; }

/* breadcrumb */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .84rem; color: var(--muted); padding: 16px 0 4px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }
.crumbs .sep { color: var(--muted-2); }
.crumbs .here { color: var(--ink); font-weight: 700; }

/* عنوان بخش‌ها
   توجه: از margin-block استفاده شده تا margin-inline:auto مربوط به
   .container (وسط‌چینی) بازنویسی نشود؛ در غیر این صورت در زوم منفی
   بخش‌های صفحهٔ اصلی از وسط به سمت راست شیفت می‌کردند. */
.section { margin-block: 34px; }
.section-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.section-head h2 { margin: 0; font-size: 1.3rem; font-weight: 800; white-space: nowrap; }
.section-head .rule { flex: 1; height: 1px; background: var(--line); }
.section-head .more { font-size: .88rem; font-weight: 700; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.section-head .more svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; }

/* ---------- 05 اسلایدر صفحه اصلی ---------- */
.hero { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--ink-2); }
.hero__stage { position: relative; aspect-ratio: 1440 / 470; min-height: 230px; }
.hero__slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; pointer-events: none; }
.hero__slide.is-on { opacity: 1; pointer-events: auto; }
.hero__slide img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(16, 24, 40, .80) 8%, rgba(16, 24, 40, .40) 48%, rgba(16, 24, 40, .05) 80%); }
.hero__content {
  position: absolute; inset-block: 0; inset-inline-end: 0; width: 46%; z-index: 2;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  padding: 32px 44px; color: #fff; gap: 6px;
}
.hero__kicker { display: inline-flex; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3); border-radius: 999px; padding: 4px 14px; font-size: .78rem; font-weight: 700; backdrop-filter: blur(4px); }
.hero__title { color: #fff; font-size: clamp(1.35rem, 2.6vw, 2.2rem); font-weight: 800; margin: 8px 0 4px; line-height: 1.5; }
.hero__sub { color: rgba(255, 255, 255, .85); font-size: .95rem; margin: 0 0 14px; max-width: 380px; }
.hero__nav { position: absolute; z-index: 5; top: 50%; translate: 0 -50%; width: 42px; height: 42px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .9); display: grid; place-items: center; box-shadow: var(--shadow-1); transition: background .2s; }
.hero__nav:hover { background: #fff; }
.hero__nav svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 2.4; }
.hero__prev { inset-inline-start: 16px; }
.hero__next { inset-inline-end: 16px; }
.hero__dots { position: absolute; z-index: 5; bottom: 14px; inset-inline-start: 50%; translate: 50% 0; display: flex; gap: 7px; }
.hero__dots button { width: 9px; height: 9px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .5); transition: width .25s, background .25s; padding: 0; }
.hero__dots button.is-on { width: 26px; background: #fff; }

/* دسته‌بندی‌های تصویری */
.cat-tiles { display: grid; grid-template-columns: repeat(9, 1fr); gap: 12px; }
.cat-tile {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 10px; text-align: center; color: var(--text); font-weight: 700; font-size: .84rem;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.cat-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: transparent; color: var(--primary); }
.cat-tile__img { aspect-ratio: 1/1; border-radius: 12px; background: linear-gradient(180deg, #fafbfd, #f0f2f8); display: grid; place-items: center; overflow: hidden; margin-bottom: 8px; }
.cat-tile__img img { width: 82%; height: 82%; object-fit: contain; }

/* ---------- 06 پنل فروش ویژه ---------- */
.sale-panel {
  border-radius: var(--r-lg); padding: 18px 20px;
  background: radial-gradient(120% 160% at 85% 0%, #f43f5e 0%, var(--sale) 45%, var(--sale-d) 100%);
  display: grid; grid-template-columns: 205px 1fr; gap: 16px; align-items: stretch;
}
.sale-intro { color: #fff; display: flex; flex-direction: column; justify-content: center; gap: 8px; position: relative; overflow: hidden; }
.sale-intro__t { font-size: 1.42rem; font-weight: 800; line-height: 1.55; }
.sale-intro__t .w2 { display: inline-block; margin-inline-start: 18px; }
.sale-intro__t .w3 { display: inline-block; margin-inline-start: 36px; color: #ffe08a; }
.sale-intro p { color: rgba(255, 255, 255, .85); font-size: .84rem; margin: 0 0 6px; }
.sale-seal { position: relative; width: 76px; height: 76px; margin-top: 6px; }
.sale-seal svg.ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: dh-spin 14s linear infinite; }
.sale-seal .core {
  position: absolute; inset: 12px; border-radius: 999px; background: #fff; color: var(--sale);
  display: grid; place-items: center; font-weight: 800; font-size: .82rem; text-align: center; line-height: 1.4;
}
@keyframes dh-spin { to { rotate: 360deg; } }

.sale-track-wrap { position: relative; min-width: 0; }
.sale-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 36px) / 4);
  gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 4px 2px 12px;
}
.sale-track::-webkit-scrollbar { display: none; }
.sale-track > * { scroll-snap-align: start; }
.sale-track .p-card { border-radius: 14px; }
.track-nav { position: absolute; top: 38%; z-index: 4; width: 36px; height: 36px; border-radius: 999px; border: 0; background: #fff; color: var(--ink); display: grid; place-items: center; box-shadow: var(--shadow-2); }
.track-nav:hover { color: var(--sale); }
.track-nav svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.track-nav.prev { inset-inline-start: -6px; }
.track-nav.next { inset-inline-end: -6px; }
.track-dots { display: flex; gap: 6px; justify-content: center; padding-top: 4px; }
.track-dots button { width: 8px; height: 8px; border-radius: 999px; border: 0; padding: 0; background: rgba(255, 255, 255, .45); transition: width .25s; }
.track-dots button.is-on { width: 22px; background: #fff; }

/* ---------- 07 کارت محصول (استاندارد یکدست) ----------
   قواعد یکدستی:
   - قاب تصویر با نسبت ثابت ۱/۱ و پس‌زمینهٔ یکنواخت
   - تصویر با object-fit:contain و بدون برش
   - عنوان دو خطهٔ ثابت (min-height) تا ارتفاع کارت‌ها برابر بماند
   - ردیف امتیاز با ارتفاع ثابت و قیمت با margin-top:auto
     تا قیمت‌ها همیشه در یک ارتفاع بنشینند
   ------------------------------------------------------- */
.p-grid { display: grid; gap: 16px; }
.p-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.p-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.p-grid.cols-5 { grid-template-columns: repeat(5, 1fr); }

.p-card {
  position: relative; display: flex; flex-direction: column; height: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
  overflow: hidden; transition: box-shadow .25s, transform .25s, border-color .25s;
}
.p-card:hover { box-shadow: var(--shadow-2); border-color: transparent; transform: translateY(-4px); }
.p-card__media {
  position: relative; aspect-ratio: 1 / 1; overflow: hidden;
  background: linear-gradient(180deg, #fafbfd 0%, #f1f3f8 100%);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.p-card__media img { width: 100%; height: 100%; object-fit: contain; transition: transform .35s ease; }
.p-card:hover .p-card__media img { transform: scale(1.05); }
.p-card__off {
  position: absolute; top: 10px; inset-inline-start: 10px; z-index: 2;
  background: var(--sale); color: #fff; font-size: .78rem; font-weight: 800;
  border-radius: 999px; padding: 2px 10px;
}
.p-card__body { display: flex; flex-direction: column; gap: 4px; padding: 13px 15px 15px; flex: 1; }
.p-card__cat { font-size: .76rem; color: var(--muted-2); }
.p-card__title {
  font-size: .9rem; font-weight: 700; color: var(--ink); line-height: 1.75;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: calc(2 * 1.75em); /* ارتفاع ثابت دو خط */
}
.p-card__title a { color: inherit; }
.p-card__title a:hover { color: var(--primary); }
.p-card__rate { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); min-height: 20px; }
.p-card__rate .stars { color: var(--amber); letter-spacing: 2px; font-size: .8rem; }
.p-card__pricebox { margin-top: auto; padding-top: 8px; min-height: 46px; display: flex; flex-direction: column; justify-content: flex-end; }
.p-card__old { font-size: .8rem; color: var(--muted-2); text-decoration: line-through; visibility: hidden; }
.p-card__old.has { visibility: visible; }
.p-card__price { font-size: 1.02rem; font-weight: 800; color: var(--ink); }
.p-card__price .unit { font-size: .76rem; font-weight: 500; color: var(--muted); margin-inline-start: 4px; }
.p-card.is-off .p-card__price { color: var(--sale); }
.p-card__actions { display: flex; gap: 8px; margin-top: 10px; }
.p-card__actions .btn-add {
  flex: 1; border: 0; border-radius: 10px; background: #eef3ff; color: var(--primary);
  font-size: .84rem; font-weight: 700; padding: 9px 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background .2s, color .2s;
}
.p-card__actions .btn-add:hover { background: var(--primary); color: #fff; }
.p-card__actions .btn-add svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.p-card__actions .btn-view {
  width: 38px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--muted);
  display: grid; place-items: center; transition: border-color .2s, color .2s;
}
.p-card__actions .btn-view:hover { border-color: var(--primary); color: var(--primary); }
.p-card__actions .btn-view svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ---------- 08 بنر تبلیغاتی ---------- */
.promo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.promo {
  position: relative; border-radius: var(--r-lg); overflow: hidden; min-height: 220px;
  display: flex; align-items: flex-end; color: #fff; isolation: isolate;
}
.promo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .5s ease; }
.promo:hover img { transform: scale(1.04); }
.promo::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(5deg, rgba(14, 20, 34, .82) 18%, rgba(14, 20, 34, .12) 62%); }
.promo__body { padding: 22px 24px; }
.promo__body h3 { color: #fff; font-size: 1.15rem; font-weight: 800; margin: 0 0 6px; }
.promo__body p { color: rgba(255, 255, 255, .85); font-size: .87rem; margin: 0 0 12px; }

/* مزایا */
.benefits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.benefit { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; }
.benefit__ic { width: 48px; height: 48px; border-radius: 14px; background: #eef3ff; display: grid; place-items: center; flex-shrink: 0; }
.benefit__ic svg { width: 24px; height: 24px; fill: none; stroke: var(--primary); stroke-width: 1.7; }
.benefit b { display: block; color: var(--ink); font-size: .95rem; }
.benefit span { font-size: .8rem; color: var(--muted); }

/* ---------- 10 فوتر ---------- */
.site-footer { background: var(--ink-2); color: #cdd5e4; margin-top: 46px; }
.footer-main { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 28px; padding: 40px 0 30px; }
.f-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.f-logo .logo__mark { background: linear-gradient(135deg, var(--sale), #f97316); }
.f-logo b { color: #fff; font-size: 1.15rem; font-weight: 800; }
.f-logo b i { font-style: normal; color: var(--amber); }
.f-about { font-size: .87rem; line-height: 2; color: #9da9bf; }
.f-newsletter { display: flex; gap: 8px; margin-top: 14px; }
.f-newsletter input { flex: 1; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); color: #fff; border-radius: 10px; padding: 9px 14px; font-size: .86rem; }
.f-newsletter input::placeholder { color: #7e8aa3; }
.f-newsletter button { border: 0; border-radius: 10px; background: var(--sale); color: #fff; font-weight: 700; padding: 9px 16px; font-size: .86rem; }
.f-title { color: #fff; font-size: .98rem; font-weight: 700; margin-bottom: 14px; }
.f-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.f-links a { color: #9da9bf; font-size: .88rem; display: inline-flex; align-items: center; gap: 8px; }
.f-links a::before { content: ''; width: 6px; height: 6px; border-radius: 999px; background: var(--sale); flex-shrink: 0; }
.f-links a:hover { color: #fff; }
.f-contact { display: grid; gap: 12px; font-size: .88rem; }
.f-contact .row { display: flex; gap: 10px; align-items: flex-start; color: #9da9bf; }
.f-contact .row svg { width: 18px; height: 18px; fill: none; stroke: var(--amber); stroke-width: 1.8; flex-shrink: 0; margin-top: 4px; }
.f-contact .row b { color: #e6ebf5; font-weight: 700; }
/* شمارهٔ تماس و ایمیل در فوتر با رنگ زرد کهن برای دیده‌شدن بهتر */
.f-contact .row a { color: #ffd479; font-weight: 800; }
.f-contact .row a:hover { color: #ffe7ae; }
.footer-bar { border-top: 1px solid rgba(255, 255, 255, .08); padding: 14px 0; }
.footer-bar .container { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .8rem; color: #7e8aa3; flex-wrap: wrap; }
.f-social { display: flex; gap: 8px; }
.f-social a { width: 34px; height: 34px; border-radius: 999px; background: rgba(255, 255, 255, .08); display: grid; place-items: center; }
.f-social a:hover { background: var(--sale); }
.f-social svg { width: 16px; height: 16px; fill: #fff; }

/* نوار پایین موبایل */
/* مقاوم‌سازی نوار پایین موبایل: علاوه بر inset-inline، مقادیر فیزیکی هم ست می‌شود
   تا در هر تراز و هر مرورگری دقیقاً هم‌عرض صفحه‌نمایش بماند */
.bottom-nav { display: none; position: fixed; bottom: 0; inset-inline: 0; left: 0; right: 0; width: 100%; margin: 0; z-index: 110; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(23, 35, 59, .08); }
/* سه آیتم استاندارد: خانه، فروشگاه، سبد خرید (بدون مقالات طبق بازخورد) */
.bottom-nav ul { display: grid; grid-template-columns: repeat(3, 1fr); list-style: none; margin: 0; padding: 7px 4px calc(7px + env(safe-area-inset-bottom)); }
.bottom-nav a { display: grid; justify-items: center; gap: 2px; font-size: .7rem; color: var(--muted); position: relative; transition: color .2s; }
.bottom-nav a.is-active { color: var(--primary); font-weight: 700; }
.bottom-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.bottom-nav .cart-badge { position: absolute; top: -4px; inset-inline-end: 18%; min-width: 17px; height: 17px; border-radius: 999px; background: var(--sale); color: #fff; font-size: .66rem; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }

/* ---------- 11 صفحه فروشگاه ---------- */
.shop-layout { display: grid; grid-template-columns: 270px 1fr; gap: 20px; align-items: start; }
.sidebar { position: sticky; top: calc(var(--header-h) + 8px); display: grid; gap: 14px; }
.filter-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; }
.filter-box > b { display: flex; justify-content: space-between; align-items: center; color: var(--ink); font-size: .95rem; margin-bottom: 12px; }
.filter-box > b .reset { font-size: .76rem; color: var(--muted); border: 0; background: transparent; font-weight: 500; }
.filter-box > b .reset:hover { color: var(--sale); }
.f-cats { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.f-cats button {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: transparent; border: 0; text-align: start; padding: 9px 10px;
  border-radius: 10px; font-size: .88rem; color: var(--text); font-weight: 500;
}
.f-cats button:hover { background: #f2f5ff; }
.f-cats button.is-on { background: #eef3ff; color: var(--primary); font-weight: 700; }
.f-cats .cnt { font-size: .74rem; color: var(--muted-2); background: #f1f3f8; border-radius: 999px; padding: 1px 8px; }
.f-cats button.is-on .cnt { background: #dfe9ff; color: var(--primary); }
.price-row { display: flex; gap: 8px; align-items: center; margin: 8px 0 10px; }
.price-row input { padding: 8px 10px; font-size: .86rem; }
.price-row span { color: var(--muted-2); }
.check-row { display: flex; align-items: center; gap: 9px; font-size: .88rem; color: var(--text); cursor: pointer; }
.check-row input { width: 17px; height: 17px; accent-color: var(--sale); }
.range-note { font-size: .78rem; color: var(--muted-2); margin-top: 8px; }

.shop-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 16px; margin-bottom: 16px; }
.shop-toolbar .count { font-size: .86rem; color: var(--muted); margin-inline-end: auto; }
.shop-toolbar .count b { color: var(--ink); }
.shop-toolbar .field { display: flex; align-items: center; gap: 7px; font-size: .84rem; color: var(--muted); }
.shop-toolbar .select { width: auto; padding: 7px 10px; font-size: .86rem; }
.view-toggle { display: flex; gap: 4px; border: 1.5px solid var(--line); border-radius: 10px; padding: 3px; }
.view-toggle button { border: 0; background: transparent; border-radius: 7px; width: 32px; height: 28px; display: grid; place-items: center; color: var(--muted-2); }
.view-toggle button.is-on { background: #eef3ff; color: var(--primary); }
.view-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.btn-filters { display: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chips:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 7px; background: #eef3ff; color: var(--primary); border-radius: 999px; padding: 5px 8px 5px 12px; font-size: .8rem; font-weight: 700; }
.chip button { border: 0; background: rgba(26, 86, 219, .12); color: inherit; width: 19px; height: 19px; border-radius: 999px; display: grid; place-items: center; font-size: .8rem; line-height: 1; }
.chip button:hover { background: var(--primary); color: #fff; }

.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 26px; flex-wrap: wrap; }
.pagination button {
  min-width: 40px; height: 40px; border-radius: 10px; border: 1.5px solid var(--line);
  background: #fff; color: var(--text); font-size: .9rem; font-weight: 700; padding: 0 8px;
}
.pagination button:hover:not([disabled]) { border-color: var(--primary); color: var(--primary); }
.pagination button.is-on { background: var(--sale); border-color: var(--sale); color: #fff; }
.pagination button[disabled] { opacity: .4; cursor: not-allowed; }
.pagination .dots { color: var(--muted-2); }

.empty-state { text-align: center; background: var(--card); border: 1px dashed var(--line); border-radius: var(--r-lg); padding: 60px 20px; color: var(--muted); }
.empty-state svg { width: 60px; height: 60px; fill: none; stroke: var(--muted-2); stroke-width: 1.4; margin-bottom: 12px; }
.empty-state h3 { color: var(--ink); }

/* ---------- 12 صفحه محصول ---------- */
.pdp { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; display: grid; grid-template-columns: minmax(0, 460px) 1fr; gap: 30px; margin-top: 12px; }
.pdp-gallery { display: grid; gap: 12px; align-content: start; }
.pdp-media { aspect-ratio: 1/1; background: linear-gradient(180deg, #fafbfd, #f1f3f8); border-radius: var(--r-md); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; padding: 26px; overflow: hidden; }
.pdp-media img { width: 100%; height: 100%; object-fit: contain; transition: transform .4s ease; }
.pdp-media:hover img { transform: scale(1.06); }
.pdp-gallery__note { text-align: center; color: var(--muted-2); font-size: .78rem; }
.pdp-info { display: flex; flex-direction: column; gap: 12px; }
.pdp-info h1 { font-size: 1.35rem; font-weight: 800; margin: 0; }
.pdp-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: .84rem; color: var(--muted); }
.pdp-meta .stars { color: var(--amber); letter-spacing: 2px; }
.pdp-price { display: flex; align-items: baseline; gap: 12px; background: #fdf2f5; border: 1px solid #fbd5de; border-radius: var(--r-md); padding: 14px 18px; }
.pdp-price .new { font-size: 1.5rem; font-weight: 800; color: var(--sale); }
.pdp-price .new .unit { font-size: .82rem; color: var(--muted); font-weight: 500; }
.pdp-price .old { color: var(--muted-2); text-decoration: line-through; font-size: .95rem; }
.pdp-price .off { background: var(--sale); color: #fff; border-radius: 999px; font-size: .8rem; font-weight: 800; padding: 2px 10px; }
.pdp-buy { display: flex; gap: 10px; flex-wrap: wrap; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.qty button { width: 40px; height: 44px; border: 0; background: #f7f8fc; font-size: 1.1rem; color: var(--ink); }
.qty button:hover { background: #eef3ff; color: var(--primary); }
.qty input { width: 52px; text-align: center; border: 0; font-weight: 700; color: var(--ink); }
.qty input:focus { outline: none; }
.pdp-features { display: grid; gap: 8px; list-style: none; margin: 6px 0 0; padding: 0; }
.pdp-features li { display: flex; gap: 8px; align-items: center; font-size: .86rem; color: var(--muted); }
.pdp-features li svg { width: 17px; height: 17px; fill: none; stroke: #16a34a; stroke-width: 2.2; flex-shrink: 0; }

.tabs { margin-top: 26px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.tabs__nav { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 8px 12px 0; overflow-x: auto; }
.tabs__nav button { border: 0; background: transparent; padding: 12px 18px; font-size: .93rem; font-weight: 700; color: var(--muted); border-radius: 12px 12px 0 0; position: relative; white-space: nowrap; }
.tabs__nav button.is-on { color: var(--primary); }
.tabs__nav button.is-on::after { content: ''; position: absolute; inset-inline: 12px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--primary); }
.tabs__body { padding: 20px 24px 26px; }
.tabs__pane { display: none; }
.tabs__pane.is-on { display: block; }
.spec-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.spec-table th, .spec-table td { border: 1px solid var(--line); padding: 10px 14px; text-align: start; }
.spec-table th { background: #f7f8fc; color: var(--ink); width: 200px; font-weight: 700; }
.review { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.review:last-of-type { border-bottom: 0; }
.review__ava { width: 42px; height: 42px; border-radius: 999px; background: #eef3ff; color: var(--primary); display: grid; place-items: center; font-weight: 800; flex-shrink: 0; }
.review b { font-size: .9rem; color: var(--ink); }
.review .stars { color: var(--amber); font-size: .8rem; letter-spacing: 2px; }
.review p { margin: 4px 0 0; font-size: .88rem; color: var(--muted); }

/* ---------- 13 سبد خرید (صفحه) ---------- */
.cart-page { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; margin-top: 12px; }
.cart-list { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 8px 20px; }
.cart-row { display: grid; grid-template-columns: 88px 1fr auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px dashed var(--line); }
.cart-row:last-child { border-bottom: 0; }
.cart-row img { width: 88px; height: 88px; object-fit: contain; border-radius: var(--r-sm); background: #f4f6fa; }
.cart-row__t { font-weight: 700; color: var(--ink); font-size: .93rem; }
.cart-row__cat { font-size: .78rem; color: var(--muted-2); }
.cart-row__price { font-size: .84rem; color: var(--muted); margin-top: 4px; }
.cart-row__price b { color: var(--sale); font-size: .95rem; }
.cart-row__side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.cart-row__remove { border: 0; background: transparent; color: var(--muted-2); font-size: .8rem; display: inline-flex; gap: 5px; align-items: center; }
.cart-row__remove:hover { color: var(--sale); }
.cart-row__remove svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.summary { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; position: sticky; top: calc(var(--header-h) + 8px); }
.summary h3 { font-size: 1.05rem; margin-bottom: 14px; }
.sum-row { display: flex; justify-content: space-between; font-size: .9rem; color: var(--muted); padding: 7px 0; }
.sum-row b { color: var(--ink); }
.sum-row .save { color: var(--sale); font-weight: 700; }
.sum-total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; font-size: 1rem; }
.sum-total b { color: var(--sale); font-size: 1.2rem; }
.coupon { display: flex; gap: 8px; margin: 12px 0; }
.coupon input { flex: 1; }
.demo-note { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: var(--r-sm); padding: 10px 14px; font-size: .8rem; line-height: 1.9; margin-top: 12px; }
.checkout-steps { display: flex; gap: 6px; margin-bottom: 16px; }
.checkout-steps span { flex: 1; text-align: center; font-size: .78rem; color: var(--muted-2); border-bottom: 3px solid var(--line); padding-bottom: 8px; }
.checkout-steps span.is-on { color: var(--primary); border-color: var(--primary); font-weight: 700; }
.form-grid { display: grid; gap: 12px; margin-bottom: 14px; }
.success-box { text-align: center; padding: 30px 10px; }
.success-box .ok { width: 66px; height: 66px; margin: 0 auto 14px; border-radius: 999px; background: #dcfce7; display: grid; place-items: center; }
.success-box .ok svg { width: 32px; height: 32px; fill: none; stroke: #16a34a; stroke-width: 2.6; }
.success-box .meta { display: grid; gap: 8px; max-width: 430px; margin: 0 auto 16px; text-align: start; font-size: .88rem; color: var(--muted); }
.success-box .meta b { color: var(--ink); }

/* فرآیند خرید چندمرحله‌ای */
.co-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; align-items: center; }
.co-actions .spacer { flex: 1; }
.co-2col { grid-template-columns: 1fr 1fr; }
.pay-opt { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; cursor: pointer; transition: border-color .2s, background .2s; background: #fff; }
.pay-opt:hover { border-color: var(--primary); }
.pay-opt.is-on { border-color: var(--primary); background: #f4f8ff; }
.pay-opt input { accent-color: var(--primary); width: 17px; height: 17px; flex-shrink: 0; }
.pay-opt b { color: var(--ink); font-size: .9rem; display: block; }
.pay-opt span span { font-size: .78rem; color: var(--muted); display: block; }
.co-spinner { width: 17px; height: 17px; border: 2.5px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 999px; display: inline-block; vertical-align: -3px; animation: dh-rot .7s linear infinite; }
@keyframes dh-rot { to { rotate: 360deg; } }
.order-code { display: inline-flex; align-items: center; gap: 6px; background: #f0fdf4; border: 1px dashed #86efac; color: #166534; font-weight: 800; font-size: .95rem; border-radius: 12px; padding: 8px 18px; margin: 4px 0 14px; letter-spacing: .04em; }
.checkout-steps span.done { color: #166534; border-color: #16a34a; }
@media (max-width: 640px) {
  .co-2col { grid-template-columns: 1fr; }
  .co-actions .btn { flex: 1; }
}

/* ---------- 13-ب اعلان و ابزارها ---------- */
.toast-wrap { position: fixed; bottom: 22px; inset-inline-start: 50%; translate: -50% 0; z-index: 400; display: grid; gap: 8px; width: min(360px, 90vw); }
.toast { background: var(--ink); color: #fff; border-radius: 12px; padding: 12px 18px; font-size: .88rem; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-2); animation: dh-toast .3s ease; }
.toast.ok::before { content: '✓'; width: 22px; height: 22px; border-radius: 999px; background: #16a34a; display: grid; place-items: center; font-size: .8rem; flex-shrink: 0; }
.toast.warn::before { content: '!'; width: 22px; height: 22px; border-radius: 999px; background: var(--amber); display: grid; place-items: center; font-size: .85rem; flex-shrink: 0; }
@keyframes dh-toast { from { opacity: 0; transform: translateY(12px); } }
.to-top { position: fixed; bottom: 20px; inset-inline-start: 20px; z-index: 100; width: 44px; height: 44px; border-radius: 999px; border: 0; background: #fff; color: var(--ink); box-shadow: var(--shadow-2); display: grid; place-items: center; opacity: 0; pointer-events: none; transition: opacity .25s; }
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- 14 واکنش‌گرایی ---------- */
@media (max-width: 1200px) {
  .p-grid.cols-5 { grid-template-columns: repeat(4, 1fr); }
  .cat-tiles { grid-template-columns: repeat(6, 1fr); }
  .cat-tile:nth-child(n+7) { display: none; }
}
@media (max-width: 1024px) {
  :root { --header-h: 108px; }
  .nav-links { display: none; }
  .nav-row .cat-btn { border-radius: var(--r-sm); }
  .burger { display: grid; place-items: center; }
  .sale-panel { grid-template-columns: 1fr; }
  .sale-intro { flex-direction: row; align-items: center; gap: 18px; }
  .sale-intro p { margin: 0; }
  .sale-track { grid-auto-columns: calc((100% - 24px) / 3); }
  .p-grid.cols-4, .p-grid.cols-5 { grid-template-columns: repeat(3, 1fr); }
  .shop-layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: 0; z-index: 160; background: #fff; overflow-y: auto;
    padding: 18px; top: 0; display: none;
  }
  .sidebar.open { display: grid; align-content: start; }
  .btn-filters { display: inline-flex; }
  .pdp { grid-template-columns: 1fr; }
  /* فوتر خلاصه در تبلت: بدون متن معرفی و خبرنامه، دو ستون فشرده */
  .footer-main { grid-template-columns: 1fr 1fr; gap: 12px 18px; padding: 18px 0 12px; }
  .f-about, .f-newsletter { display: none; }
  .f-logo { margin-bottom: 2px; }
  .f-title { margin-bottom: 6px; font-size: .92rem; }
  .f-links { gap: 3px 12px; grid-template-columns: 1fr 1fr; }
  .f-links a { font-size: .82rem; }
  .f-contact { gap: 5px; font-size: .82rem; }
  .site-footer { margin-top: 24px; }
  .footer-bar { padding: 10px 0; }
  .footer-bar .container { justify-content: center; text-align: center; gap: 2px 14px; line-height: 1.9; font-size: .74rem; }
}
@media (max-width: 820px) {
  .p-grid.cols-4, .p-grid.cols-5 { grid-template-columns: repeat(2, 1fr); }
  .p-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .benefits { grid-template-columns: 1fr 1fr; }
  .promo-grid { grid-template-columns: 1fr; }
  .cat-tiles { grid-template-columns: repeat(4, 1fr); }
  .cat-tile:nth-child(n+5) { display: none; }
  .hero__stage { aspect-ratio: 8/5; }
  .hero__content { width: 70%; padding: 22px 26px; }
  .hero__sub { display: none; }
  .cart-page { grid-template-columns: 1fr; }
  .summary { position: static; }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .header-main { flex-wrap: wrap; gap: 10px; padding-block: 10px 8px; }
  .logo__fa small { display: none; }
  .search { order: 5; flex-basis: 100%; max-width: none; }
  .btn-login span { display: none; }
  .header-actions .btn-login { padding: 8px; }
  /* در موبایل فقط «یک» دکمهٔ سبد وجود دارد: مرجع، نوار پایین است؛
     آیکون سبد هدر پنهان می‌شود تا دوباره‌کاری نباشد */
  .header-actions .cart-btn { display: none; }
  .hero__stage { aspect-ratio: 4/3; min-height: 0; }
  .hero__content { width: 100%; justify-content: flex-end; padding: 18px; background: linear-gradient(0deg, rgba(14, 20, 34, .65), transparent); }
  .hero__title { font-size: 1.1rem; margin: 2px 0; }
  .hero__nav { display: none; }
  .sale-track { grid-auto-columns: calc((100% - 12px) / 2); }
  .sale-intro { flex-direction: column; align-items: flex-start; }
  .track-nav { display: none; }
  .cat-tiles { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat-tile:nth-child(n+10) { display: none; }
  .benefits { grid-template-columns: 1fr; }
  .p-card__actions { display: none; } /* در موبایل کل کارت کلیک‌پذیر است */
  .p-card__body { padding: 11px 12px 13px; }
  .pdp { padding: 16px; }
  .tabs__body { padding: 16px; }
  .cart-row { grid-template-columns: 70px 1fr; }
  .cart-row img { width: 70px; height: 70px; }
  .cart-row__side { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  /* فوتر خیلی خلاصه در موبایل: فقط لوگو + دسترسی سریع دوستونه + تماس؛
   ستون دسته‌بندی‌ها حذف می‌شود و فاصله‌ها حداقلی است تا ارتفاع فوتر کم بماند */
  .site-footer { margin-top: 16px; }
  .footer-main { grid-template-columns: 1fr; gap: 8px; padding: 14px 0 8px; }
  .footer-main > div:nth-child(3) { display: none; } /* ستون دسته‌بندی‌ها */
  .f-links { grid-template-columns: 1fr 1fr; gap: 1px 10px; }
  .f-links a { font-size: .8rem; line-height: 1.75; }
  .f-title { margin-bottom: 3px; font-size: .88rem; }
  .f-logo { margin-bottom: 0; }
  .f-logo b { font-size: 1rem; }
  .f-contact { gap: 3px; font-size: .8rem; line-height: 1.75; }
  .f-contact .row svg { margin-top: 3px; }
  /* نوار پایین فوتر: هر قطعه در یک ردیف وسط‌چین — تراز بی‌نقص در گوشه‌ها */
  .footer-bar { padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); }
  .footer-bar .container { display: grid; justify-items: center; text-align: center; gap: 3px; line-height: 1.8; font-size: .73rem; }
  .f-social a { width: 30px; height: 30px; }
  .bottom-nav { display: block; }
  body { padding-bottom: 62px; }
  .to-top { bottom: 74px; }
  .toast-wrap { bottom: 76px; }
}
@media (max-width: 400px) {
  .cat-tile { font-size: .74rem; }
  .p-card__title { font-size: .82rem; }
}

/* ---------- 15 دسترس‌پذیری و حرکت ---------- */
:focus-visible { outline: 3px solid rgba(26, 86, 219, .55); outline-offset: 2px; border-radius: 6px; }
.site-header :focus-visible, .site-footer :focus-visible, .hero :focus-visible { outline-color: rgba(255, 255, 255, .75); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .sale-seal svg.ring { animation: none; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 16 نشان برند و پیشنهاد جست‌وجو ---------- */
.p-card__brand {
  position: absolute; top: 10px; inset-inline-end: 10px; z-index: 2;
  background: rgba(255, 255, 255, .92); color: var(--ink);
  border: 1px solid var(--line); border-radius: 999px;
  font-size: .72rem; font-weight: 700; padding: 2px 10px;
  backdrop-filter: blur(2px); max-width: calc(100% - 60px);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.p-card__off ~ .p-card__brand { top: 44px; } /* زیر نشان تخفیف تا همپوشانی نشود */

.pdp-brand {
  display: inline-flex; align-items: center; gap: 6px;
  background: #eef3ff; color: var(--primary); border-radius: 999px;
  font-size: .82rem; font-weight: 700; padding: 4px 12px; width: fit-content;
}

/* پیشنهاد زندهٔ جست‌وجو */
.sugg {
  position: absolute; top: calc(100% + 8px); inset-inline: 0; z-index: 140;
  background: #fff; color: var(--text); border-radius: var(--r-md);
  box-shadow: var(--shadow-2); padding: 8px; display: none;
  max-height: 420px; overflow-y: auto;
}
.sugg.open { display: block; }
.sugg__head { font-size: .74rem; color: var(--muted-2); padding: 4px 10px 8px; }
.sugg a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border-radius: 10px; color: var(--text);
}
.sugg a:hover, .sugg a.is-sel { background: #f2f5ff; }
.sugg a img { width: 42px; height: 42px; object-fit: contain; border-radius: 8px; background: #f4f6fa; flex-shrink: 0; }
.sugg a .t { font-size: .86rem; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.sugg a .b { font-size: .74rem; color: var(--muted-2); }
.sugg a .pr { margin-inline-start: auto; font-size: .82rem; font-weight: 700; color: var(--ink); white-space: nowrap; }
.sugg__empty { padding: 14px 10px; text-align: center; color: var(--muted); font-size: .86rem; }
.sugg__more { display: block; text-align: center; font-size: .82rem; font-weight: 700; padding: 8px; border-top: 1px dashed var(--line); }

/* ---------- 17 مقالات ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--ink) 0%, #24395c 100%);
  border-radius: var(--r-lg); color: #fff; padding: 30px 32px; margin: 18px 0 26px;
}
.page-hero h1 { color: #fff; font-size: 1.5rem; font-weight: 800; margin: 0 0 8px; }
.page-hero p { color: rgba(255, 255, 255, .82); margin: 0; max-width: 640px; font-size: .92rem; }

.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.post-card {
  display: flex; flex-direction: column; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
  transition: box-shadow .25s, transform .25s, border-color .25s; height: 100%;
}
.post-card:hover { box-shadow: var(--shadow-2); border-color: transparent; transform: translateY(-4px); }
.post-card__media { aspect-ratio: 16 / 9; overflow: hidden; background: #eef1f6; display: block; }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-card:hover .post-card__media img { transform: scale(1.05); }
.post-card__body { display: flex; flex-direction: column; gap: 8px; padding: 15px 16px 17px; flex: 1; }
.post-card__cat {
  align-self: flex-start; font-size: .72rem; font-weight: 700; color: var(--primary);
  background: #eef3ff; border-radius: 999px; padding: 2px 10px;
}
.post-card__title { font-size: .98rem; font-weight: 800; color: var(--ink); line-height: 1.8; margin: 0; }
.post-card__title a { color: inherit; }
.post-card__title a:hover { color: var(--primary); }
.post-card__excerpt {
  font-size: .84rem; color: var(--muted); margin: 0; line-height: 1.9;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card__meta {
  margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: .76rem; color: var(--muted-2);
}
.post-card__meta svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; vertical-align: -2px; }
.post-more { display: inline-flex; align-items: center; gap: 5px; font-size: .84rem; font-weight: 700; color: var(--primary); }
.post-more svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; }

/* صفحهٔ تک‌مقاله */
.article { max-width: 820px; margin-inline: auto; }
.article__head { text-align: center; margin: 22px 0 18px; }
.article__head .post-card__cat { margin-bottom: 10px; }
.article__head h1 { font-size: 1.45rem; font-weight: 800; line-height: 1.8; margin: 0 0 10px; }
.article__meta { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
.article__meta svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; vertical-align: -2px; }
.article__cover { border-radius: var(--r-lg); overflow: hidden; margin: 0 0 22px; }
.article__cover img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; display: block; }
.article__body { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px 28px; }
.article__body h2 { font-size: 1.12rem; font-weight: 800; margin: 26px 0 10px; }
.article__body h2::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--sale); margin-inline-end: 9px; vertical-align: 1px; }
.article__body h3 { font-size: 1rem; font-weight: 800; margin: 18px 0 8px; color: var(--ink); }
.article__body > div:first-child h2 { margin-top: 0; }
.article__body p { font-size: .93rem; line-height: 2.2; color: var(--text); margin: 0 0 14px; }
.article__body ul { margin: 0 0 16px; padding-inline-start: 22px; display: grid; gap: 7px; }
.article__body li { font-size: .92rem; line-height: 2; color: var(--text); }
.article__body li::marker { color: var(--sale); }
.article__body a { font-weight: 600; text-decoration: underline; text-decoration-color: rgba(26, 86, 219, .35); text-underline-offset: 3px; }
.article__lead { font-size: .95rem !important; color: var(--muted) !important; background: #f7f8fc; border-inline-start: 3px solid var(--primary); border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 12px 16px; }

/* فهرست مطالب مقاله */
.article__toc { background: #f7f8fc; border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 18px; margin: 0 0 20px; }
.article__toc b { display: block; font-size: .9rem; color: var(--ink); margin-bottom: 8px; }
.article__toc ol { margin: 0; padding-inline-start: 20px; display: grid; gap: 4px; }
.article__toc a { font-size: .87rem; color: var(--primary); }
.article__toc a:hover { color: var(--primary-d); }

/* تصویر داخل متن مقاله */
.article__img { margin: 20px 0; }
.article__img img { width: 100%; border-radius: var(--r-md); border: 1px solid var(--line); }
.article__img figcaption { text-align: center; font-size: .78rem; color: var(--muted-2); padding-top: 8px; }

/* سؤال‌های متداول داخل مقاله */
.article__faq { display: grid; gap: 10px; margin: 18px 0; }
.faq-item { border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; overflow: hidden; }
.faq-item summary { cursor: pointer; list-style: none; padding: 12px 16px; font-weight: 700; font-size: .9rem; color: var(--ink); position: relative; padding-inline-end: 38px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; position: absolute; inset-inline-end: 14px; top: 50%; translate: 0 -50%; width: 22px; height: 22px; border-radius: 999px; background: #eef3ff; color: var(--primary); display: grid; place-items: center; font-weight: 800; transition: rotate .2s; }
.faq-item[open] summary::after { content: '−'; rotate: 180deg; }
.faq-item__a { padding: 0 16px 14px; font-size: .88rem; line-height: 2.1; color: var(--muted); }

.article__note {
  background: #fffbeb; border: 1px solid #fde68a; color: #92400e;
  border-radius: var(--r-sm); padding: 13px 16px; font-size: .87rem; line-height: 2; margin: 18px 0;
}
.article__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border-top: 1px dashed var(--line); margin-top: 24px; padding-top: 16px; font-size: .84rem; color: var(--muted);
}

/* فیلتر دسته‌های مقالات + نشان کارت */
.blog-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.chip-f { border: 1.5px solid var(--line); background: #fff; color: var(--muted); border-radius: 999px; padding: 7px 16px; font-size: .84rem; font-weight: 700; transition: all .2s; }
.chip-f:hover { border-color: var(--primary); color: var(--primary); }
.chip-f.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.post-card { position: relative; }
.post-card__badge { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 2; background: var(--primary); color: #fff; font-size: .72rem; font-weight: 800; border-radius: 999px; padding: 3px 12px; box-shadow: var(--shadow-1); }

/* ---------- 18 درباره ما و تماس ---------- */
.about-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 22px; align-items: stretch; }
.about-story { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px 28px; }
.about-story h2 { font-size: 1.15rem; margin-bottom: 12px; }
.about-story p { font-size: .92rem; line-height: 2.2; color: var(--text); }
.about-media { border-radius: var(--r-lg); overflow: hidden; min-height: 260px; position: relative; }
.about-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 22px 0; }
.stat-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); text-align: center; padding: 18px 10px; }
.stat-box b { display: block; font-size: 1.35rem; font-weight: 800; color: var(--primary); }
.stat-box span { font-size: .8rem; color: var(--muted); }

.designer-card {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: linear-gradient(135deg, var(--ink) 0%, #24395c 100%);
  border-radius: var(--r-lg); color: #fff; padding: 24px 26px; margin-top: 26px;
}
.designer-card .ava {
  width: 64px; height: 64px; border-radius: 999px; background: rgba(255, 255, 255, .12);
  border: 2px solid rgba(255, 255, 255, .35); display: grid; place-items: center;
  font-size: 1.3rem; font-weight: 800; flex-shrink: 0;
}
.designer-card h3 { color: #fff; font-size: 1.05rem; margin: 0 0 4px; }
.designer-card p { color: rgba(255, 255, 255, .8); font-size: .85rem; margin: 0 0 6px; }
.designer-card .row { display: flex; gap: 14px; flex-wrap: wrap; font-size: .84rem; }
.designer-card .row a, .designer-card .row b { color: #ffd479; font-weight: 700; }
.designer-card .row svg { width: 14px; height: 14px; fill: none; stroke: #ffd479; stroke-width: 2; vertical-align: -2px; }

.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.contact-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; text-align: center; }
.contact-card .ic { width: 46px; height: 46px; margin: 0 auto 10px; border-radius: 14px; background: #eef3ff; display: grid; place-items: center; }
.contact-card .ic svg { width: 22px; height: 22px; fill: none; stroke: var(--primary); stroke-width: 1.8; }
.contact-card b { display: block; color: var(--ink); font-size: .92rem; margin-bottom: 4px; }
.contact-card span { font-size: .84rem; color: var(--muted); line-height: 1.9; display: block; }
.contact-card a { color: var(--primary); font-weight: 700; }
.contact-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; align-items: start; }
.contact-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.contact-form h2 { font-size: 1.1rem; margin-bottom: 14px; }
.contact-side { display: grid; gap: 14px; }
.contact-side .demo-note { margin-top: 0; }
.form-ok {
  display: flex; align-items: center; gap: 10px; background: #f0fdf4; border: 1px solid #bbf7d0;
  color: #166534; border-radius: var(--r-sm); padding: 12px 14px; font-size: .88rem; margin-top: 12px;
}
.form-ok svg { width: 20px; height: 20px; fill: none; stroke: #16a34a; stroke-width: 2.4; flex-shrink: 0; }

/* واکنش‌گرایی بخش‌های جدید */
@media (max-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .contact-layout { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr; }
  .page-hero { padding: 22px 20px; }
  .article__body { padding: 18px 16px; }
  .article__head h1 { font-size: 1.2rem; }
  .stats-row { gap: 10px; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-form { padding: 18px 16px; }
  .designer-card { padding: 20px; }
}

/* فهرست برندها در سایدبار فروشگاه */
.f-brands { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 230px; overflow-y: auto; }
.f-brands .check-row { padding: 7px 10px; border-radius: 10px; transition: background .15s; }
.f-brands .check-row:hover { background: #f2f5ff; }
