/* =====================================================================
   آرتادر – استایل اصلی سایت
   بدون فریم‌ورک و بدون مرحله Build؛ رنگ‌ها و اندازه‌ها از متغیرهای :root
   ===================================================================== */

@font-face {
  font-family: "Vazirmatn";
  src: url("/fonts/Vazirmatn-Variable.woff2") format("woff2-variations"),
       url("/fonts/Vazirmatn-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary: #0B6E79;
  --primary-600: #08545C;
  --primary-soft: #E6F2F3;
  --ink: #0F1B2D;
  --ink-2: #1E2D44;
  --navy: #1E3A5F;
  --text: #0F1B2D;
  --muted: #4A5568;
  --muted-2: #64748B;
  --line: #E2E8F0;
  --line-2: #CBD5E1;
  --bg: #F5F7FA;
  --surface: #FFFFFF;
  --surface-2: #F1F5F9;
  --accent: #F59E0B;
  --accent-600: #D97706;
  --accent-soft: #FCD34D;
  --success: #047857;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 20px;
  --shadow: 0 10px 28px rgba(15, 27, 45, .09);
  --container: 1280px;
  --gutter: 24px;
  --font: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
}

/* ---------- پایه ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  direction: rtl;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-600); }
h1, h2, h3, h4 { margin: 0; line-height: 1.45; font-weight: 800; }
h2 { font-size: 24px; }
h3 { font-size: 17px; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
ol, ul { margin: 0; padding: 0; }
address { font-style: normal; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: -100px; right: 16px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; color: #fff; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.muted { color: var(--muted); }
.center { display: flex; justify-content: center; margin-top: 20px; }
.mobile-only { display: none !important; }

/* ---------- دکمه‌ها ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 12px;
  border: 1.5px solid transparent; font-weight: 700; font-size: 15px;
  text-align: center; white-space: nowrap; transition: background .15s, color .15s, border-color .15s;
}
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn-block { display: flex; width: 100%; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-600); color: #fff; }
.btn-accent { background: var(--accent); color: var(--ink); font-weight: 800; }
.btn-accent:hover { background: var(--accent-soft); color: var(--ink); }
.btn-outline { border-color: var(--line); background: var(--surface); color: var(--text); font-weight: 500; }
.btn-outline:hover { border-color: var(--ink); color: var(--text); }
.btn-outline-primary { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline-primary:hover { background: var(--primary-soft); }
.btn-ghost { background: var(--surface-2); color: var(--text); }
.btn-ghost:hover { background: var(--line); color: var(--text); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.link-btn { background: none; border: 0; padding: 0; min-height: 44px; color: var(--primary); font-weight: 700; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 12px; border: 0;
  background: var(--surface-2); color: var(--text); flex: none;
}
.icon-btn-soft { background: var(--primary-soft); color: var(--primary); }
.icon-btn-primary { width: 44px; height: 44px; background: var(--primary); color: #fff; }
.icon-btn-primary:hover { background: var(--primary-600); }

.round-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid #334155;
  background: var(--ink-2); color: #fff;
}
.round-btn-accent { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.round-btn-accent:hover { background: var(--accent-600); border-color: var(--accent-600); color: var(--ink); }

/* ---------- نوار بالا و هدر ---------- */
.topbar { background: var(--ink); color: #E2E8F0; font-size: 13px; border-bottom: 3px solid var(--accent); }
.topbar-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; }
.topbar-phone { display: flex; align-items: center; gap: 8px; }
.topbar-phone a { color: #fff; font-weight: 700; }
.topbar-links { display: flex; gap: 20px; }
.topbar-links a { color: #E2E8F0; }
.topbar-links a:hover { color: #fff; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.header-row { display: flex; align-items: center; gap: 24px; padding-block: 16px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); flex: none; }
.logo:hover { color: var(--text); }
.logo-mark {
  width: 44px; height: 44px; border-radius: 12px; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.logo-img { height: 56px; width: auto; display: block; }
.logo-tagline { font-size: 12px; color: var(--muted); max-width: 120px; line-height: 1.6; padding-right: 10px; border-right: 1px solid var(--line); }

.search {
  flex: 1 1 360px; display: flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 0 14px; min-height: 48px; color: var(--muted);
}
.search:focus-within { border-color: var(--primary); background: var(--surface); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; min-height: 46px; outline: none; color: var(--text); }
.search-lg { max-width: 560px; width: 100%; margin-inline: auto; min-height: 54px; }
/* صفحه نتایج جستجو: عنوان کوچک‌تر و کادر جستجوی جمع‌وجور
   (در page-head ستونی، flex-basis: 360px کادر .search را ۳۶۰ پیکسل بلند می‌کرد) */
.page-head.page-head-search { gap: 12px; padding: 18px 22px; }
.page-head.page-head-search h1 { font-size: 20px; }
.page-head.page-head-search p { font-size: 14px; margin-top: 4px; }
.page-head.page-head-search .page-head-text { flex: 1 1 260px; }
.page-head.page-head-search .search-lg { flex: 0 1 440px; max-width: 440px; min-height: 44px; margin-inline: 0; }
@media (max-width: 760px) { .page-head.page-head-search .search-lg { flex-basis: 100%; max-width: none; } }
.page-head.page-head-search .search-lg input { min-height: 42px; font-size: 14px; }
.header-actions { display: flex; align-items: center; gap: 10px; flex: none; }

.main-nav { display: flex; align-items: center; gap: 8px; min-height: 54px; }
.nav-links { display: flex; gap: 2px; overflow: hidden; }
.nav-links a { padding: 10px 12px; color: var(--text); border-radius: var(--radius-sm); white-space: nowrap; }
.nav-links a:hover { background: var(--surface-2); color: var(--primary); }

/* مگامنو سه‌ستونه (الگوی تسلاکالا): دسته اصلی | زیردسته | سطح سوم */
.main-nav { position: relative; }
.mega { position: static; }
.mega-toggle {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 12px;
  border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface);
  font-weight: 700; color: var(--text); cursor: pointer; transition: background .2s, border-color .2s, color .2s;
}
.mega-toggle-icon { display: flex; color: var(--primary); }
.mega-caret { display: flex; color: var(--muted-2); transition: transform .25s; }
.mega-toggle:hover, .mega.is-open .mega-toggle { background: var(--primary); border-color: var(--primary); color: #fff; }
.mega-toggle:hover .mega-toggle-icon, .mega-toggle:hover .mega-caret,
.mega.is-open .mega-toggle-icon, .mega.is-open .mega-caret { color: #fff; }
.mega.is-open .mega-caret { transform: rotate(180deg); }

.mega-panel {
  position: absolute; top: 100%; right: var(--gutter); z-index: 3;
  width: min(1000px, calc(100% - 2 * var(--gutter))); height: 500px;
  display: grid; grid-template-columns: 260px 300px minmax(0, 1fr);
  background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--primary);
  border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 24px 48px rgba(15, 27, 45, .16);
  overflow: hidden;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .2s, transform .2s, visibility 0s .2s;
}
.mega-panel.no-l2 { grid-template-columns: 260px 0 minmax(0, 1fr); }
.mega-panel.no-l2 .mega-l2 { padding: 0; border: 0; overflow: hidden; }
.mega.is-open .mega-panel { opacity: 1; visibility: visible; transform: none; transition: opacity .2s, transform .2s; }

.mega-col { height: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.mega-col ul { list-style: none; margin: 0; padding: 0; }
.mega-col::-webkit-scrollbar { width: 6px; }
.mega-col::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 6px; }

/* ستون ۱ */
.mega-l1 { background: var(--surface-2); border-left: 1px solid var(--line); padding: 10px 8px !important; }
.mega-l1 a {
  display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 6px 10px; border-radius: 10px;
  color: var(--text); font-size: 14px; font-weight: 700; transition: background .15s, color .15s;
}
.mega-icon { display: flex; color: var(--primary); flex: none; }
img.cat-img { object-fit: contain; flex: none; }
.mega-label { flex: 1; min-width: 0; line-height: 1.6; }
.mega-arrow { display: flex; color: var(--muted-2); opacity: .5; flex: none; transition: opacity .15s, transform .15s; }
.mega-l1 li.is-active > a { background: var(--surface); color: var(--primary); box-shadow: 0 1px 4px rgba(15, 27, 45, .06); }
.mega-l1 li.is-active .mega-arrow { opacity: 1; color: var(--primary); transform: translateX(-3px); }

/* ستون ۲ */
.mega-l2 { border-left: 1px solid var(--line); padding: 10px 8px; }
.mega-l2 a {
  display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 6px 12px; border-radius: 10px;
  color: var(--text); font-size: 14px; font-weight: 500; transition: background .15s, color .15s;
}
.mega-l2 li.is-active > a { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.mega-l2 li.is-active .mega-arrow { opacity: 1; color: var(--primary); }

.mega-all {
  display: flex !important; align-items: center; gap: 4px; min-height: 36px !important; margin-bottom: 6px;
  color: var(--primary) !important; font-weight: 700 !important; font-size: 13px !important;
  border-bottom: 1px dashed var(--line-2); border-radius: 0 !important; background: transparent !important;
}
.mega-all:hover { color: var(--primary-600) !important; }

/* ستون ۳ */
.mega-l3 { padding: 16px 20px; }
.mega-l3-list { columns: 2; column-gap: 20px; }
.mega-l3-list li { break-inside: avoid; }
.mega-l3-list a { display: block; padding: 6px 0; color: var(--muted); font-size: 14px; line-height: 1.7; transition: color .15s, padding .15s; }
.mega-l3-list a:hover { color: var(--primary); padding-right: 4px; }

.mega-brands { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.mega-all + .mega-brands { margin-top: 4px; padding-top: 0; border-top: 0; }
.mega-brands-title { display: block; font-size: 13px; color: var(--muted-2); font-weight: 700; margin-bottom: 10px; }
.mega-brands-list { columns: 2; column-gap: 20px; }
.mega-brands-list li { break-inside: avoid; }
.mega-brands-list a { display: block; padding: 6px 0; color: var(--muted); font-size: 14px; line-height: 1.7; transition: color .15s, padding .15s; }
.mega-brands-list a:hover { color: var(--primary); padding-right: 4px; }
.drawer-brands { padding: 8px 0 4px; }
.drawer-brands > span { display: block; font-size: 12px; font-weight: 700; color: var(--muted-2); margin-bottom: 6px; }
.drawer-brands > div { display: flex; flex-wrap: wrap; gap: 6px; }
.drawer-list .drawer-brands a { display: inline-flex; min-height: 32px; padding: 0 12px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 500; color: var(--text); }
.mega-promo { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; }
.mega-promo[hidden] { display: none; }
.mega-promo-icon {
  width: 112px; height: 112px; border-radius: 28px; background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.mega-promo strong { font-size: 17px; }

.mega-pane { animation: mega-fade .18s ease-out; }
@keyframes mega-fade { from { opacity: 0; } to { opacity: 1; } }

/* تیره شدن صفحه زیر هدر هنگام باز بودن منو */
.mega-backdrop {
  position: fixed; left: 0; right: 0; bottom: 0; top: var(--mega-top, 0); z-index: 1;
  background: rgba(15, 27, 45, .35); animation: mega-fade .2s ease-out;
}

/* منوی کشویی موبایل */
.drawer { position: fixed; inset: 0; z-index: 60; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(15, 27, 45, .5); }
.drawer-panel {
  position: absolute; top: 0; bottom: 0; right: 0; width: min(340px, 86vw);
  background: var(--surface); display: flex; flex-direction: column; overflow-y: auto;
  animation: drawer-in .25s ease;
}
@keyframes drawer-in { from { transform: translateX(100%); } to { transform: none; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.drawer-list { list-style: none; padding: 8px; }
.drawer-list a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 10px; border-radius: var(--radius-sm); color: var(--text); font-weight: 700; }
.drawer-list a svg { color: var(--primary); }
.drawer-list a:hover { background: var(--surface-2); }
.drawer-acc summary {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 10px; border-radius: var(--radius-sm);
  font-weight: 700; cursor: pointer; list-style: none;
}
.drawer-acc summary::-webkit-details-marker { display: none; }
.drawer-acc summary > svg { color: var(--primary); }
.drawer-acc summary span { flex: 1; }
.drawer-acc summary:hover { background: var(--surface-2); }
.acc-caret { display: flex; color: var(--muted-2); font-style: normal; transition: transform .25s; }
.drawer-acc[open] > summary .acc-caret { transform: rotate(180deg); }
.drawer-acc[open] > summary { color: var(--primary); }
.drawer-acc ul { list-style: none; margin: 0 0 6px; padding: 0 22px 0 0; border-right: 2px solid var(--primary-soft); margin-right: 20px; }
.drawer-acc ul a { min-height: 40px; font-weight: 500; font-size: 14px; color: var(--muted); }
.drawer-acc-2 summary { min-height: 40px; font-weight: 500; font-size: 14px; color: var(--text); }
.drawer-all { color: var(--primary) !important; font-weight: 700 !important; }
.drawer-quick { list-style: none; margin: 4px 16px 8px; padding: 10px 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; }
.drawer-quick a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: 13px; font-weight: 500; }
.drawer-quick a:hover { color: var(--primary); }
.drawer-foot { margin-top: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); }

/* ---------- بخش‌ها ---------- */
.section { padding-top: 56px; }
.section-tight { padding-top: 20px; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-head a { font-weight: 700; }
.section-head-col { flex-direction: column; align-items: flex-start; gap: 4px; }
.section-head-col p { color: var(--muted); }

/* ---------- اسلایدر اصلی ---------- */
.hero-slider { position: relative; overflow: hidden; background: var(--ink); outline: none; }
.slides { position: relative; height: 400px; overflow: hidden; touch-action: pan-y; }
/* قبل از اجرای JS فقط اسلاید اول دیده می‌شود */
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; }
.slide.is-active { opacity: 1; visibility: visible; }
/* بعد از اجرای JS: ریل افقی با حرکت نرم (سبک دیجی‌کالا) */
.slides-track { display: flex; height: 100%; will-change: transform; transition: transform .55s cubic-bezier(.22, .61, .36, 1); }
.hero-slider.is-ready .slide { position: relative; inset: auto; flex: 0 0 100%; height: 100%; opacity: 1; visibility: visible; }
.hero-slider.is-dragging .slides { cursor: grabbing; }
.hero-slider.is-dragging .slide a { pointer-events: none; }
.slide-image a, .slide-image picture { display: block; width: 100%; height: 100%; -webkit-user-drag: none; user-select: none; }
.slide-image img { width: 100%; height: 100%; object-fit: cover; }
.slide-text { color: #fff; }
.slide-text.tone-primary { background: var(--primary); }
.slide-text.tone-ink { background: var(--ink); }
.slide-text.tone-navy { background: var(--navy); }
.slide-inner { height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 14px; padding-inline: 88px; }
.slide-eyebrow { color: var(--accent-soft); font-weight: 700; font-size: 14px; }
.slide-title { font-size: 38px; font-weight: 800; line-height: 1.4; max-width: 760px; }

/* دکمه‌های قبلی/بعدی: گوشه پایین، کنار هم، با hover ظاهر می‌شوند */
.slider-nav { position: absolute; bottom: 20px; right: 24px; display: flex; gap: 8px; z-index: 2; opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; }
.hero-slider:hover .slider-nav, .hero-slider:focus-within .slider-nav { opacity: 1; transform: none; }
.slider-arrow {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(15, 27, 45, .08);
  background: rgba(255, 255, 255, .92); color: var(--ink); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(15, 27, 45, .18); cursor: pointer; transition: background .2s, transform .2s;
}
.slider-arrow:hover { background: #fff; transform: scale(1.06); }

/* نقطه‌ها: پایین وسط، نقطه فعال کشیده و سفید */
.slider-dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 0; z-index: 1; pointer-events: none; }
.slider-dots button { width: 22px; height: 28px; border: 0; background: transparent; padding: 0; display: flex; align-items: center; justify-content: center; pointer-events: auto; cursor: pointer; }
.slider-dots button::before { content: ""; width: 6px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .6); box-shadow: 0 0 2px rgba(0, 0, 0, .25); transition: width .3s, background .3s; }
.slider-dots button[aria-current="true"] { width: 30px; }
.slider-dots button[aria-current="true"]::before { width: 20px; background: #fff; }

/* ---------- معرفی و مزیت‌ها ---------- */
.intro { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; }
.intro-text { flex: 1 1 420px; }
.intro h1 { font-size: 22px; }
.intro p { color: var(--muted); font-size: 14px; margin-top: 4px; }

.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; padding: 20px 24px; }
.trust-item { display: flex; align-items: center; gap: 12px; }
.trust-item > span:last-child { display: flex; flex-direction: column; line-height: 1.5; }
.trust-item small { color: var(--muted); font-size: 13px; }
.icon-tile {
  width: 44px; height: 44px; flex: none; border-radius: 12px;
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}

/* ---------- دسته‌ها ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.cat-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 12px; display: flex; flex-direction: column; align-items: center; gap: 12px;
  color: var(--text); text-align: center; transition: border-color .15s, box-shadow .15s;
}
.cat-card:hover { border-color: var(--primary); color: var(--text); box-shadow: var(--shadow); }
.cat-icon {
  width: 64px; height: 64px; border-radius: 16px; background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.cat-name { font-weight: 700; }

/* ---------- کارت محصول ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.product-grid.cols-5 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.pcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; display: flex; flex-direction: column; gap: 8px; height: 100%;
  transition: box-shadow .15s ease, transform .15s ease;
}
.pcard:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.pcard { position: relative; }
.pcard-tools { position: absolute; top: 22px; left: 22px; z-index: 2; display: flex; flex-direction: column; gap: 6px; }
.pcard-tool {
  width: 34px; height: 34px; border: 0; border-radius: 50%; padding: 0; cursor: pointer;
  background: rgba(255, 255, 255, .95); color: var(--muted); box-shadow: 0 2px 8px rgba(15, 27, 45, .12);
  display: flex; align-items: center; justify-content: center; transition: color .15s, background .15s, opacity .2s, transform .15s;
}
.pcard-tool:hover { color: var(--primary); transform: scale(1.06); }
.pcard-tool.is-on { color: var(--primary); background: var(--primary-soft); }
.pcard-tool[data-wishlist].is-on { color: #E11D48; background: #FFF1F2; }
.pcard-tool[data-wishlist].is-on svg { fill: currentColor; }
/* دسکتاپ: دکمه مقایسه با hover ظاهر می‌شود؛ قلب پر همیشه دیده می‌شود */
@media (hover: hover) {
  .pcard-tool { opacity: 0; }
  .pcard:hover .pcard-tool, .pcard:focus-within .pcard-tool, .pcard-tool.is-on { opacity: 1; }
}
.pcard-rating { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); margin-top: -4px; }
.pcard-rating .stars { font-size: 13px; }
.pcard-img { position: relative; display: block; aspect-ratio: 1 / 1; background: var(--surface-2); border-radius: 12px; overflow: hidden; }
.pcard-img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.pcard-badge {
  position: absolute; top: 10px; right: 10px; background: var(--accent); color: var(--ink);
  font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px;
}
.pcard-brand { font-size: 12px; color: var(--muted); }
.pcard-title { font-size: 15px; font-weight: 700; line-height: 1.6; min-height: 48px; }
.pcard-title a { color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-title a:hover { color: var(--primary); }
.pcard-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.pcard > .btn { margin-top: auto; }
.pcard-price { display: flex; flex-direction: column; line-height: 1.4; }
.pcard-price del { font-size: 12px; color: var(--muted-2); }
.pcard-price strong { font-size: 17px; font-weight: 800; }
.pcard-price small { font-size: 12px; font-weight: 500; color: var(--muted); }
.pcard-out { font-weight: 700; color: var(--muted-2); align-self: center; }

/* ---------- پیشنهادهای ویژه (کاروسل) ---------- */
.offers { background: var(--ink); border-radius: 24px; padding: 28px; }
.offers .section-head h2 { color: #fff; }
.carousel-controls { display: flex; gap: 8px; }
.carousel-controls .round-btn { transition: opacity .2s, background .2s; }
.carousel-controls .round-btn:disabled { opacity: .35; cursor: default; pointer-events: none; }
.carousel-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 48px) / 4); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; padding-bottom: 2px;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-item { scroll-snap-align: start; }
.offers .pcard { border-color: transparent; }

/* ---------- بنرها ---------- */
.banner-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 300px)); justify-content: center; gap: 20px; }
.banner { display: block; aspect-ratio: 1 / 1; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); transition: transform .2s, box-shadow .2s; }
.banner:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(15, 27, 45, .12); }
.banner img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) { .banner-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }

/* ---------- محل نصب ---------- */
.places { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.place-card { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: 13px; }
.chip:hover { background: var(--primary-soft); color: var(--primary); }

/* ---------- تب‌ها ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab {
  min-height: 44px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 700;
  border: 1.5px solid var(--line-2); background: var(--surface); color: var(--text);
}
.tab[aria-selected="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- مشاوره ---------- */
.consult {
  background: var(--primary); color: #fff; border-radius: 24px; padding: 40px;
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 40px; align-items: center;
}
.consult h2 { font-size: 28px; margin-bottom: 22px; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; }
.steps li > span:last-child { display: flex; flex-direction: column; }
.steps small { color: #E0F2F1; font-size: 14px; }
.step-num {
  width: 36px; height: 36px; flex: none; border-radius: 50%; background: #fff; color: var(--ink);
  font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.consult-form { background: var(--surface); color: var(--text); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.consult-form strong { font-size: 18px; }
.consult-form label { font-size: 14px; color: var(--muted); }
.consult-form input { min-height: 48px; border: 1px solid var(--line-2); border-radius: 12px; padding: 0 14px; background: #fff; }
.consult-form input[dir="ltr"] { text-align: right; }
.consult-form input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-soft); }
.consult-call { font-size: 14px; color: var(--muted); text-align: center; }

/* ---------- برندها ---------- */
.brand-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 5 * 14px) / 6); gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
  padding: 2px 2px 8px; margin: -2px -2px 0;
}
.brand-track::-webkit-scrollbar { display: none; }
.brand-track:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; border-radius: var(--radius); }
.brand-card {
  min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px 12px 14px; min-height: 140px;
  color: var(--text); text-align: center; transition: border-color .2s, box-shadow .2s, transform .2s;
}
.brand-card:hover { border-color: var(--primary); box-shadow: 0 6px 18px rgba(15, 27, 45, .08); transform: translateY(-2px); }
.brand-logo-box { position: relative; width: 100%; height: 56px; display: flex; align-items: center; justify-content: center; }
.brand-logo-box img { max-width: 100%; max-height: 56px; width: auto; height: auto; object-fit: contain; filter: grayscale(1); opacity: .8; transition: filter .2s, opacity .2s; }
.brand-card:hover .brand-logo-box img { filter: none; opacity: 1; }
/* بدون لوگو یا لوگوی خراب: فقط نام برند وسط کارت */
.brand-logo-box.no-logo { display: none; }
.brand-name { font-size: 13px; font-weight: 700; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.brand-card:not(:has(.brand-logo-box:not(.no-logo))) .brand-name { font-size: 14px; -webkit-line-clamp: 3; }
.brand-card:hover .brand-name { color: var(--primary); }
@media (max-width: 1100px) { .brand-track { grid-auto-columns: calc((100% - 4 * 14px) / 5); } }
@media (max-width: 960px) { .brand-track { grid-auto-columns: calc((100% - 3 * 10px) / 3.4); gap: 10px; } }
@media (max-width: 480px) { .brand-track { grid-auto-columns: calc((100% - 2 * 8px) / 2.5); gap: 8px; } .brand-card { padding: 12px 8px; min-height: 120px; } }

/* ---------- لیست قیمت و مقالات ---------- */
.split-1-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 24px; align-items: start; }
.list-card { padding: 24px; display: flex; flex-direction: column; }
.list-card h2 { font-size: 22px; margin-bottom: 8px; }
.list-card a { display: flex; align-items: center; gap: 10px; min-height: 50px; border-bottom: 1px solid #EEF2F6; color: var(--text); }
.list-card a:last-child { border-bottom: 0; }
.list-card a svg { color: var(--primary); flex: none; }
.list-card a:hover { color: var(--primary); }
.article-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.article-card { overflow: hidden; display: flex; flex-direction: column; }
.article-img { display: block; aspect-ratio: 16 / 10; background: var(--line); }
.article-img img { width: 100%; height: 100%; object-fit: cover; }
.article-card h3 { padding: 14px; font-size: 15px; line-height: 1.7; }
.article-card h3 a { color: var(--text); }
.article-card h3 a:hover { color: var(--primary); }

/* ---------- سؤالات متداول (آکاردئون نرم) ---------- */
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.faq-q button {
  width: 100%; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border: 0; background: transparent; font-size: 16px; font-weight: 700; text-align: right;
}
.faq-icon { font-size: 24px; line-height: 1; color: var(--primary); transition: transform .35s cubic-bezier(.4, 0, .2, 1); }
.faq-q button[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }
.faq-a { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .35s cubic-bezier(.4, 0, .2, 1), opacity .3s ease; }
.faq-a > div { overflow: hidden; min-height: 0; }
.faq-a p { padding: 0 18px 18px; color: var(--muted); }
.faq-q button[aria-expanded="true"] + .faq-a,
.faq-item:has(button[aria-expanded="true"]) .faq-a { grid-template-rows: 1fr; opacity: 1; }

/* ---------- متن سئو ---------- */
.seo-text { padding: 28px; }
.seo-text h2 { font-size: 20px; margin-bottom: 10px; }
.seo-body { color: var(--muted); display: flex; flex-direction: column; gap: 10px; }
.seo-text.is-collapsed .seo-body { max-height: 5.4em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }

/* ---------- breadcrumb ---------- */
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; }
.breadcrumb li + li::before { content: "/"; color: #94A3B8; margin-left: 6px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb [aria-current="page"] { font-weight: 700; }

/* ---------- صفحه خطا ---------- */
.status-page { padding-block: 80px; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.status-code { font-size: 72px; font-weight: 800; color: var(--primary); line-height: 1; }
.status-page h1 { font-size: 26px; }
.status-page p { color: var(--muted); max-width: 520px; }

/* ---------- فوتر ---------- */
.site-footer { background: var(--ink); color: #CBD5E1; font-size: 14px; margin-top: 56px; border-top: 3px solid var(--accent); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; padding-block: 48px 24px; }
.footer-col { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.footer-col a { color: #CBD5E1; }
.footer-col a:hover { color: #fff; }
.footer-logo { font-size: 22px; font-weight: 800; color: #fff; }
.footer-logo-img { height: 84px; width: auto; display: block; }
.footer-title { color: #fff; font-size: 15px; margin-bottom: 2px; }
.footer-phone { color: #fff !important; font-weight: 700; }
.quickpay { align-self: stretch; margin-top: 4px; }
.footer-col .quickpay { color: var(--ink); }
.trust-seal { background: #fff; border-radius: 12px; padding: 6px; }
.social { display: flex; gap: 10px; }
.social a { width: 44px; height: 44px; border-radius: 12px; background: var(--ink-2); color: #fff !important; display: flex; align-items: center; justify-content: center; }
.footer-bottom { border-top: 1px solid var(--ink-2); padding-block: 18px; font-size: 13px; color: #94A3B8; }

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

/* =====================================================================
   واکنش‌گرا
   ===================================================================== */
@media (max-width: 1100px) {
  .carousel-track { grid-auto-columns: calc((100% - 32px) / 3); }
}

@media (max-width: 960px) {
  :root { --gutter: 16px; }
  .hide-sm { display: none !important; }
  .mobile-only { display: inline-flex !important; }

  .header-row { flex-wrap: wrap; gap: 12px; padding-block: 12px; }
  .logo { order: 1; }
  .header-actions { order: 2; margin-right: auto; }
  .header-row > .mobile-only { order: 0; }
  .search { order: 3; flex-basis: 100%; }
  .logo-img { height: 42px; }
  .main-nav { display: none; }

  .slides { height: 240px; }
  .slide-inner { padding-inline: 24px; }
  .slide-title { font-size: 22px; }
  .slider-nav { display: none; }
  /* موبایل: کارت گوشه‌گرد با فاصله از لبه، نسبت تصویر موبایل ۵:۳ */
  .hero-slider.has-images { background: transparent; padding: 12px 12px 0; }
  .hero-slider.has-images .slides { height: auto; aspect-ratio: 5 / 3; border-radius: 16px; }
  .hero-slider.has-images .slider-dots { bottom: 4px; }

  .section { padding-top: 36px; }
  h2 { font-size: 20px; }
  .offers { padding: 18px; border-radius: 18px; }
  .carousel-track { grid-auto-columns: calc((100% - 12px) / 2); gap: 12px; }
  .carousel-controls { display: none; }

  .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .cat-card { padding: 12px 4px; gap: 6px; background: transparent; border: 0; }
  .cat-icon { width: 60px; height: 60px; background: var(--surface); border: 1px solid var(--line); }
  .cat-name { font-size: 12px; }

  .product-grid, .product-grid.cols-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pcard { padding: 10px; }
  .pcard-title { font-size: 13px; min-height: 42px; }
  .pcard-price strong { font-size: 15px; }

  .consult, .split-1-2 { grid-template-columns: 1fr; }
  .consult { padding: 24px; gap: 24px; }
  .consult h2 { font-size: 21px; }

  body { padding-bottom: 68px; }
  .mobile-nav {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; height: 68px;
    background: var(--surface); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mobile-nav a, .mobile-nav button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    color: var(--muted); font-size: 11px; font-weight: 700; border: 0; background: transparent;
  }
  .mobile-nav [aria-current="page"] { color: var(--primary); }
}

@media (max-width: 480px) {
  .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .intro { padding: 16px; }
  .intro h1 { font-size: 18px; }
  .btn-row .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* =====================================================================
   صفحات داخلی: لیست محصول، محصول، مقاله، لیست قیمت
   ===================================================================== */
.page-pad { padding-top: 20px; }
.page-pad > .breadcrumb { margin-bottom: 14px; }
.page-head { padding: 24px 28px; display: flex; flex-direction: column; gap: 14px; }
.page-head-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.page-head-text { flex: 1 1 360px; }
/* وقتی مستقیم داخل page-head ستونی است (مثلا صفحه مقالات)، flex-basis ارتفاع ۳۶۰ پیکسلی می‌ساخت */
.page-head > .page-head-text { flex: none; }
.page-head h1 { font-size: 28px; }
.page-head p { color: var(--muted); margin-top: 6px; max-width: 900px; }
.brand-logo { width: 96px; height: 96px; object-fit: contain; border: 1px solid var(--line); border-radius: 14px; padding: 8px; background: #fff; }
.chip-lg { min-height: 44px; padding: 0 16px; font-weight: 700; font-size: 14px; }
.chip-primary { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.brand-chips { align-items: center; margin-top: 12px; }
.brand-chips-label { font-size: 13px; font-weight: 700; color: var(--muted); margin-left: 4px; }
.page-head .chips + .brand-chips { padding-top: 12px; border-top: 1px dashed var(--line); }

/* لیست محصولات */
.listing { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.listing-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.filters {
  flex: 1 1 260px; max-width: 300px; padding: 20px; position: sticky; top: 16px; align-self: flex-start;
  /* فیلترهای بلندتر از صفحه: اسکرول داخلی */
  max-height: calc(100vh - 32px); overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
.filters::-webkit-scrollbar { width: 6px; }
.filters::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 6px; }
/* دکمه «اعمال فیلتر» پایین کادر همیشه دیده شود */
.filters [type="submit"] { position: sticky; bottom: 0; z-index: 1; box-shadow: 0 -12px 16px var(--surface); }
.filters form { display: flex; flex-direction: column; gap: 18px; }
.filters-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.filters-head strong { font-size: 17px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; font-weight: 700; cursor: pointer; }
.switch-row input, .check-row input { width: 20px; height: 20px; accent-color: var(--primary); flex: none; }
.facet { border: 0; border-top: 1px solid #EEF2F6; margin: 0; padding: 16px 0 0; display: flex; flex-direction: column; gap: 2px; }
.facet legend { font-weight: 800; padding: 0; margin-bottom: 8px; float: right; width: 100%; }
.check-row { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 14px; cursor: pointer; }
.check-label { flex: 1; }
.check-count { color: var(--muted-2); font-size: 12px; }
.price-range { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.price-range label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.price-range input { min-height: 44px; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 10px; width: 100%; }

.toolbar { padding: 6px 12px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.sorts { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.sorts-label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; margin-left: 6px; }
.sort { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--muted); font-size: 14px; }
.sort:hover { color: var(--text); background: var(--surface-2); }
.sort.is-active { background: var(--primary-soft); color: var(--primary); font-weight: 800; }
.result-count { color: var(--muted); font-size: 14px; }
.empty { padding: 48px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: var(--muted); }
.empty strong { color: var(--text); font-size: 18px; }

.pagination { display: flex; justify-content: center; margin-top: 8px; }
.pagination ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; }
.pagination a, .pagination span[aria-current] {
  display: flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 8px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 700;
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination span[aria-current] { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .gap { color: #94A3B8; padding: 0 4px; }

/* متن‌های HTML از پنل */
.prose-box { padding: 28px; margin-top: 20px; }
.prose-box > h2 { font-size: 22px; margin-bottom: 14px; }
.prose { color: #334155; line-height: 2; overflow-wrap: anywhere; }
.prose > * + * { margin-top: 14px; }
.prose h2 { font-size: 21px; margin-top: 28px; color: var(--text); }
.prose h3 { font-size: 18px; margin-top: 22px; color: var(--text); }
.prose img { border-radius: 12px; margin-inline: auto; }
.prose ul, .prose ol { padding-right: 22px; }
.prose li + li { margin-top: 4px; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.prose td, .prose th { border: 1px solid var(--line); padding: 8px 12px; }
.prose iframe, .prose video { max-width: 100%; border-radius: 12px; }

/* صفحه محصول */
.product-top { margin-top: 0; padding: 24px; display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.gallery { flex: 1 1 340px; max-width: 460px; display: flex; flex-direction: column; gap: 12px; }
.gallery-main { position: relative; aspect-ratio: 1 / 1; background: var(--surface-2); border-radius: 16px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.gallery-main img { cursor: zoom-in; }
.gallery-zoom {
  position: absolute; bottom: 12px; left: 12px; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .92); color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 27, 45, .1); transition: background .15s, color .15s;
}
.gallery-zoom:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

/* لایت‌باکس تصاویر محصول */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(10, 15, 25, .94); color: #fff; overflow: hidden;
}
.lightbox[open] { display: flex; flex-direction: column; animation: lb-in .2s ease-out; }
.lightbox::backdrop { background: transparent; }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.lb-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; flex: none; }
.lb-count { font-size: 14px; color: #CBD5E1; }
.lb-btn { border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #fff; background: rgba(255, 255, 255, .1); border-radius: 50%; transition: background .15s; }
.lb-btn:hover, .lb-btn:focus-visible { background: rgba(255, 255, 255, .22); }
.lb-close { width: 44px; height: 44px; }
.lb-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 72px; overflow: hidden; cursor: zoom-out; }
.lb-img {
  max-width: 100%; max-height: 100%; object-fit: contain; background: #fff; border-radius: 12px;
  cursor: zoom-in; opacity: 0; transition: opacity .2s, transform .25s ease;
}
.lb-img.is-in { opacity: 1; }
.lb-stage.is-zoomed .lb-img { transform: scale(2); cursor: zoom-out; border-radius: 0; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; }
.lb-prev { right: 16px; }
.lb-next { left: 16px; }
.lb-thumbs { flex: none; display: flex; justify-content: center; gap: 8px; padding: 14px; overflow-x: auto; }
.lb-thumbs button { flex: none; width: 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 10px; background: #fff; overflow: hidden; cursor: pointer; opacity: .55; transition: opacity .15s, border-color .15s; }
.lb-thumbs button[aria-current="true"] { opacity: 1; border-color: var(--accent); }
.lb-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.lightbox.is-single .lb-nav, .lightbox.is-single .lb-thumbs { display: none; }
@media (max-width: 640px) {
  .lb-stage { padding: 0 8px; }
  .lb-nav { width: 40px; height: 40px; top: auto; bottom: 96px; transform: none; }
  .lb-thumbs button { width: 52px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) { .lightbox[open], .lb-img { animation: none; transition: none; } }
.gallery-thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.thumb { flex: 0 0 72px; height: 72px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); padding: 4px; }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb[aria-pressed="true"] { border: 2px solid var(--primary); }
.product-info { flex: 999 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.product-brand { align-self: flex-start; font-weight: 700; font-size: 14px; }
.product-info h1 { font-size: 26px; line-height: 1.55; }
.product-en { color: var(--muted-2); font-size: 14px; text-align: right; }
.product-short { color: var(--muted); }
.product-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 14px; }
.product-points li { position: relative; padding-right: 16px; line-height: 1.8; }
.product-points li::before { content: ""; position: absolute; right: 2px; top: .8em; width: 5px; height: 5px; border-radius: 50%; background: #94A3B8; }
.key-specs { border-top: 1px solid #EEF2F6; padding-top: 14px; }
.key-specs ul { margin-top: 8px; padding-right: 18px; color: #334155; display: flex; flex-direction: column; gap: 4px; }
.key-specs li span { color: var(--muted); }
.key-specs a { display: inline-flex; margin-top: 6px; min-height: 36px; align-items: center; font-weight: 700; font-size: 14px; }
.options { border: 0; border-top: 1px solid #EEF2F6; margin: 0; padding: 14px 0 0; }
.options legend { font-weight: 800; padding: 0; margin-bottom: 10px; float: right; width: 100%; }
.option-list { display: flex; flex-wrap: wrap; gap: 10px; clear: both; }
.option {
  position: relative; display: flex; flex-direction: column; gap: 2px; min-height: 56px; padding: 8px 16px;
  border: 1.5px solid var(--line-2); border-radius: 12px; cursor: pointer; background: #fff;
}
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option-name { font-weight: 700; font-size: 14px; }
.option-price { font-size: 12px; color: var(--muted); }
.option:has(input:checked) { border: 2px solid var(--primary); background: var(--primary-soft); }
.option:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.option.is-disabled { opacity: .55; cursor: not-allowed; }

.buybox { flex: 1 1 280px; max-width: 320px; background: #F8FAFC; border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.stock { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.stock-in { color: var(--success); }
.stock-out { color: var(--muted-2); font-size: 18px; }
.buybox-price { display: flex; flex-direction: column; }
.buybox-price del { color: var(--muted-2); font-size: 14px; }
.buybox-price strong { font-size: 28px; font-weight: 800; }
.buybox-price small { font-size: 14px; font-weight: 500; color: var(--muted); }
.buybox-call-text { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; }
.buy-form { display: flex; flex-direction: column; gap: 12px; }
.qty-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 700; font-size: 14px; }
.qty { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; }
.qty button { width: 44px; height: 44px; border: 0; background: transparent; font-size: 20px; color: var(--primary); }
.qty input { width: 44px; border: 0; text-align: center; font-weight: 800; -moz-appearance: textfield; background: transparent; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.buybox-perks { list-style: none; border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: #334155; }
.buybox-perks li { display: flex; align-items: center; gap: 10px; }
.buybox-perks svg { color: var(--primary); flex: none; }

.section-nav { margin-top: 20px; padding: 0 12px; display: flex; flex-wrap: wrap; gap: 4px; position: sticky; top: 0; z-index: 10; }
.section-nav a { min-height: 52px; display: flex; align-items: center; padding: 0 14px; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; }
.section-nav a:hover { color: var(--primary); border-bottom-color: var(--primary); }
.section-nav:empty { display: none; }
.product-body { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.product-main { flex: 999 1 560px; min-width: 0; }
.product-side { flex: 1 1 260px; max-width: 320px; display: flex; flex-direction: column; gap: 16px; margin-top: 20px; position: sticky; top: 70px; }
.side-cta { background: var(--ink); color: #fff; border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.side-cta strong { font-size: 18px; }
.side-cta span { color: #CBD5E1; font-size: 14px; }
.side-box { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.spec-table { width: 100%; border-collapse: collapse; margin-bottom: 18px; }
.spec-table caption { text-align: right; font-weight: 800; color: var(--muted); font-size: 14px; padding-bottom: 8px; }
.spec-table th { text-align: right; font-weight: 500; color: var(--muted); width: 38%; }
.spec-table th, .spec-table td { padding: 12px 14px; border-bottom: 1px solid #EEF2F6; }
.spec-table td { font-weight: 700; }
.spec-table tr:nth-child(even) { background: #F8FAFC; }
.file-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 16px; }
.file-card { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); }
.file-card:hover { border-color: var(--primary); color: var(--text); }
.file-card > span:last-child { display: flex; flex-direction: column; line-height: 1.5; }
.file-card small { color: var(--muted-2); font-size: 12px; }
.file-badge { width: 44px; height: 44px; flex: none; border-radius: 10px; background: #FEF3C7; color: #B45309; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }

/* لیست قیمت */
.table-box { margin-top: 20px; padding: 8px; }
.table-scroll { overflow-x: auto; }
.price-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.price-table th { background: var(--surface-2); text-align: right; font-size: 14px; padding: 12px 14px; }
.price-table td { padding: 12px 14px; border-bottom: 1px solid #EEF2F6; }
.price-table td a { color: var(--text); font-weight: 700; }
.price-table td a:hover { color: var(--primary); }
.price-table .num { font-weight: 800; white-space: nowrap; }
.stock-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.stock-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.stock-dot.in::before { background: var(--success); }
.stock-dot.out::before { background: #94A3B8; }

/* مقاله */
.article-layout { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.article-box { flex: 999 1 600px; min-width: 0; padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.page-box { max-width: 900px; margin-inline: auto; }
.article-box h1 { font-size: 28px; line-height: 1.6; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; margin-top: 8px; }
.article-cover { width: 100%; max-height: 460px; object-fit: cover; border-radius: 14px; }
/* ---------- مقاله: زمان مطالعه، فهرست مطالب، محصول داخل متن، اشتراک‌گذاری ---------- */
.article-read { display: inline-flex; align-items: center; gap: 4px; }
.toc { margin: 18px 0 6px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); padding: 14px 18px; }
.toc summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 800; color: var(--text); list-style: none; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary svg { color: var(--primary); }
.toc ol { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; counter-reset: toc; }
.toc li a { display: block; padding: 4px 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.toc li a:hover { color: var(--primary); }
.toc .toc-l2 { counter-increment: toc; }
.toc .toc-l2 a::before { content: counter(toc, persian) ". "; color: var(--primary); font-weight: 700; }
.toc .toc-l3 { padding-right: 22px; }
.toc .toc-l3 a { font-size: 13px; }
.prose h2, .prose h3 { scroll-margin-top: 90px; }
.inline-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; margin: 18px 0; }
.inline-product { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none !important; transition: border-color .2s, box-shadow .2s; }
.inline-product:hover { border-color: var(--primary); box-shadow: 0 6px 18px rgba(15, 27, 45, .08); }
.inline-product img { width: 80px; height: 80px; object-fit: contain; flex: none; border-radius: 10px; background: var(--surface-2); margin: 0 !important; }
.ip-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.7; }
.ip-brand { font-size: 12px; color: var(--muted-2); }
.ip-name { font-size: 14px; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ip-price { font-size: 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.ip-price del { color: var(--muted-2); font-size: 12px; }
.ip-price strong { color: var(--primary); }
.ip-muted { color: var(--muted); font-size: 13px; }
.ip-cta { flex: none; font-size: 12px; font-weight: 700; color: var(--primary); background: var(--primary-soft); padding: 6px 10px; border-radius: 999px; }
@media (max-width: 480px) { .ip-cta { display: none; } }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.share a, .share button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 38px; height: 38px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.share a:hover, .share button:hover { border-color: var(--primary); color: var(--primary); }
.related-articles .article-grid { margin-top: 0; }
.article-lead { font-size: 17px; color: var(--text); font-weight: 500; line-height: 2; }
.article-side { flex: 1 1 260px; max-width: 320px; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 16px; }
.mini-products { display: flex; flex-direction: column; gap: 10px; }
.mini-product { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 14px; font-weight: 700; }
.mini-product img { width: 64px; height: 64px; object-fit: contain; background: var(--surface-2); border-radius: 10px; flex: none; }
.article-card-body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.article-card-body h3 { padding: 0; }
.article-card-body p { color: var(--muted); font-size: 14px; }
.article-card-body time { color: var(--muted-2); font-size: 12px; margin-top: auto; }
.article-grid-lg { margin-top: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }

@media (max-width: 960px) {
  .page-head { padding: 18px; }
  .page-head h1 { font-size: 22px; }
  .filters {
    display: none; position: fixed; inset: 0; z-index: 70; max-width: none; max-height: none; border-radius: 0;
    overflow-y: auto; padding-bottom: 90px;
  }
  .filters.is-open { display: block; }
  .filters [type="submit"] { position: fixed; bottom: 12px; left: 16px; right: 16px; width: auto; box-shadow: none; }
  .filters-open { justify-content: center; }
  .toolbar { padding: 4px 8px; }
  .sorts { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .sort { white-space: nowrap; padding: 0 10px; }
  .product-top { padding: 16px; gap: 18px; }
  .gallery, .buybox, .product-side, .article-side { max-width: none; }
  .product-info h1 { font-size: 21px; }
  .product-side, .article-side { position: static; }
  .prose-box, .article-box { padding: 20px; }
  .article-box h1 { font-size: 22px; }
}

/* =====================================================================
   فاز ۵.۴ – سبد خرید، ورود، تسویه حساب، حساب کاربری
   ===================================================================== */
.page-title { font-size: 22px; font-weight: 800; margin: 0 0 16px; }
.section-title-sm { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; margin: 0 0 14px; color: var(--ink); }
.d-block { display: block; }
.text-center { text-align: center; }
.text-start { text-align: start; }
/* فیلد ضد ربات: مخفی بدون left منفی (در RTL left منفی صفحه را افقی اسکرول‌دار می‌کرد) */
/* فیلد مخفی ضد ربات: !important تا قوانین عمومی فرم (width:100%) آن را پهن نکند و صفحه اسکرول افقی نگیرد */
.hp-field { position: absolute !important; inset-inline-start: 0 !important; top: 0 !important; width: 1px !important; height: 1px !important; min-height: 0 !important; max-width: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip-path: inset(50%) !important; white-space: nowrap; border: 0 !important; opacity: 0 !important; pointer-events: none !important; }
/* جلوگیری از اسکرول افقی ناخواسته در کل سایت (clip، sticky را خراب نمی‌کند) */
html, body { overflow-x: clip; }

/* ---------- هشدارها ---------- */
.alert { border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; font-size: 14px; border: 1px solid transparent; }
.alert p { margin: 6px 0 0; }
.alert-error { background: #FEF2F2; border-color: #FECACA; color: #991B1B; }
.alert-success { background: #ECFDF5; border-color: #A7F3D0; color: #065F46; }
.alert-warn { background: #FFFBEB; border-color: #FDE68A; color: #78350F; }

/* ---------- پیام کوتاه (toast) ---------- */
.toast-region { position: fixed; inset-inline: 0; bottom: 24px; z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding-inline: 16px; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 14px; max-width: 480px;
  background: var(--ink); color: #fff; border-radius: 12px; padding: 12px 18px; font-size: 14px;
  box-shadow: var(--shadow); animation: toast-in .25s ease-out; transition: opacity .35s, transform .35s;
}
.toast a { color: var(--accent-soft); font-weight: 700; white-space: nowrap; }
.toast-error { background: #991B1B; }
.toast.is-hiding { opacity: 0; transform: translateY(8px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- نشان تعداد سبد ---------- */
.cart-link { position: relative; }
.cart-badge {
  position: absolute; top: -4px; inset-inline-start: -4px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--accent); color: var(--ink); font-size: 12px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; line-height: 1;
}
.cart-badge[hidden] { display: none; }

/* ---------- فرم‌ها ---------- */
.form-stack { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.form-stack.narrow { max-width: 380px; }
.form-stack label, .field label { font-weight: 700; font-size: 14px; }
.form-stack input, .field input, .field select, .field textarea, .checkout-main textarea {
  width: 100%; min-height: 48px; border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 14px; background: #fff;
}
.form-stack input:focus, .field input:focus, .field select:focus, .field textarea:focus, .checkout-main textarea:focus {
  border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-soft);
}
.form-stack input[dir="ltr"], .field input[dir="ltr"] { text-align: right; }
.form-stack .btn { margin-top: 6px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.span-2 { grid-column: 1 / -1; }
.field-check { justify-content: flex-end; }
.field-check label { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.field-check input { width: 18px; min-height: 0; height: 18px; accent-color: var(--primary); }

/* ---------- صفحه ورود ---------- */
.auth-box { max-width: 440px; margin: 24px auto 48px; padding: 28px; }
.auth-box h1 { font-size: 22px; margin: 0 0 6px; }
.auth-box > p { margin: 0 0 16px; }
.link-sm { font-size: 13px; margin-inline-start: 8px; color: var(--primary); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--surface-2); padding: 4px; border-radius: 12px; margin-bottom: 16px; }
.auth-tabs button { border: 0; border-radius: 10px; min-height: 42px; background: transparent; font-weight: 700; color: var(--muted); cursor: pointer; }
.auth-tabs button[aria-selected="true"] { background: #fff; color: var(--primary); box-shadow: 0 1px 4px rgba(15, 27, 45, .08); }
.otp-input { font-size: 24px; letter-spacing: 12px; text-align: center !important; font-weight: 800; }
.resend { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; }

/* ---------- چیدمان سبد / تسویه ---------- */
.shop-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; margin-bottom: 40px; }
.shop-layout > .card, .checkout-main > .card { padding: 20px; }
.checkout-main { display: flex; flex-direction: column; gap: 16px; }
.summary { position: sticky; top: 96px; padding: 20px; }
.summary-title { font-size: 17px; margin: 0 0 12px; }
.summary-rows { margin: 0 0 12px; display: flex; flex-direction: column; gap: 10px; }
.summary-rows > div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.summary-rows dt { color: var(--muted); }
.summary-rows dd { margin: 0; font-weight: 700; }
.summary-rows .is-saving dd { color: #B91C1C; }
.summary-rows .is-total { border-top: 1px dashed var(--line-2); padding-top: 12px; font-size: 16px; }
.summary-rows .is-total dt { color: var(--text); font-weight: 700; }
.summary-rows .is-total dd { color: var(--primary); font-size: 18px; font-weight: 800; }
.summary .btn + .btn { margin-top: 8px; }
.summary-items { list-style: none; margin: 0 0 14px; padding: 0 0 14px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; max-height: 260px; overflow: auto; }
.summary-items li { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.summary-items img { width: 48px; height: 48px; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid var(--line); flex: none; }

.empty-state { padding: 48px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: var(--muted-2); margin-bottom: 40px; }
.empty-state h2 { font-size: 18px; color: var(--text); margin: 6px 0 0; }

/* ---------- ردیف سبد ---------- */
.cart-item { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-item:last-child { border-bottom: 0; }
.cart-item-img img { width: 96px; height: 96px; object-fit: contain; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.cart-item-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cart-item-name { font-weight: 700; color: var(--text); line-height: 1.6; }
.cart-item-name:hover { color: var(--primary); }
.cart-item-actions { display: flex; align-items: center; gap: 8px; }
.cart-item-actions .icon-btn:hover { background: #FEF2F2; color: #B91C1C; }
.cart-item-total { display: flex; flex-direction: column; align-items: flex-end; min-width: 120px; }
.cart-item-total del { color: var(--muted-2); font-size: 13px; }
.cart-item.is-unavailable { opacity: .65; }
.cart-item .stock-out { font-size: 14px; }

/* ---------- گزینه‌های ارسال / پرداخت ---------- */
.choice-list { display: flex; flex-direction: column; gap: 10px; }
.choice { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 12px; cursor: pointer; transition: border-color .15s, background .15s; }
.choice:hover { border-color: var(--primary); }
.choice:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.choice input { width: 18px; height: 18px; accent-color: var(--primary); flex: none; }
.choice-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.choice-price { font-weight: 700; font-size: 14px; white-space: nowrap; }
.choice-extra { margin: -4px 0 4px; padding: 12px 16px; border-radius: 12px; background: #FFFBEB; border: 1px dashed #FCD34D; font-size: 14px; line-height: 2; }

/* ---------- حساب کاربری ---------- */
.account-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 40px; }
.account-nav { padding: 8px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 96px; }
.account-nav a, .account-nav button {
  display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 12px; border-radius: 10px;
  color: var(--text); font-weight: 500; border: 0; background: transparent; width: 100%; cursor: pointer; text-align: start;
}
.account-nav a:hover, .account-nav button:hover { background: var(--surface-2); }
.account-nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.account-nav button { color: #B91C1C; }
.account-main { display: flex; flex-direction: column; gap: 16px; }
.account-main.card, .account-main > .card { padding: 20px; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { text-align: start; color: var(--muted); font-weight: 500; padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); }
.data-table tr:last-child td { border-bottom: 0; }

.status { display: inline-flex; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.status-1 { background: #FFFBEB; color: #92400E; }   /* در انتظار پرداخت */
.status-2, .status-3 { background: var(--primary-soft); color: var(--primary); }
.status-4 { background: #EFF6FF; color: #1D4ED8; }
.status-5 { background: #ECFDF5; color: var(--success); }
.status-6, .status-7 { background: #FEF2F2; color: #B91C1C; }

.order-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.order-head .page-title { margin: 0; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; margin: 0; }
.info-grid dt { color: var(--muted); font-size: 13px; }
.info-grid dd { margin: 2px 0 0; font-weight: 500; }
.pay-now { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 16px 0 0; }
.order-lines { list-style: none; margin: 0 0 14px; padding: 0; }
.order-lines li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }

/* ---------- نتیجه سفارش / پرداخت ---------- */
.result-box { max-width: 560px; margin: 24px auto 48px; padding: 32px 28px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.result-box h1 { font-size: 22px; margin: 8px 0 0; }
.result-box .alert { width: 100%; margin-top: 10px; }
.result-icon { width: 72px; height: 72px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.result-icon.is-success { background: #ECFDF5; color: var(--success); }
.result-icon.is-error { background: #FEF2F2; color: #B91C1C; }
.result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 14px; }

@media (max-width: 960px) {
  .shop-layout, .account-layout { grid-template-columns: 1fr; }
  .summary, .account-nav { position: static; }
  .account-nav { flex-direction: row; overflow-x: auto; }
  .account-nav a, .account-nav button { white-space: nowrap; width: auto; }
  .toast-region { bottom: 84px; }   /* بالای نوار ناوبری موبایل */
}
@media (max-width: 640px) {
  .form-grid, .info-grid { grid-template-columns: 1fr; }
  .cart-item { grid-template-columns: 72px minmax(0, 1fr); gap: 10px 12px; }
  .cart-item-img img { width: 72px; height: 72px; }
  .cart-item-actions { grid-column: 2; grid-row: 2; flex-direction: row; justify-content: flex-start; }
  .cart-item-total { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; min-width: 0; }
  .data-table thead { display: none; }
  .data-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .data-table td { border: 0; padding: 2px 0; }
  .data-table td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 12px; }
  .auth-box { padding: 22px 18px; }
}

/* ---------- قیمت همکار ---------- */
.dealer-tag { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; padding: 2px 10px; border-radius: 999px; background: #FEF3C7; color: #92400E; font-size: 12px; font-weight: 700; }
.price-table .dealer-col { background: #FFFBEB; color: #92400E; font-weight: 700; }

/* ---------- پرداخت سریع ---------- */
.epay-box { max-width: 480px; }
.epay-head { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.epay-head h1 { margin: 0; }
.epay-head p { margin: 4px 0 0; font-size: 14px; }
.epay-ico { flex: none; width: 52px; height: 52px; border-radius: 16px; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.epay-amount { position: relative; }
.epay-amount input { padding-left: 64px; font-size: 18px; font-weight: 700; letter-spacing: .5px; }
.epay-amount span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; pointer-events: none; }
.epay-notes { margin: 6px 0 0; padding: 14px 18px 14px 0; border-top: 1px dashed var(--line-2); color: var(--muted); font-size: 13px; line-height: 2; }
.epay-receipt { width: 100%; margin: 14px 0 0; border: 1px solid var(--line-2); border-radius: 14px; padding: 6px 16px; text-align: right; }
.epay-receipt div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line-2); }
.epay-receipt div:last-child { border-bottom: 0; }
.epay-receipt dt { color: var(--muted); }
.epay-receipt dd { margin: 0; font-weight: 700; }
@media print {
  .site-header, .topbar, .site-footer, .mobile-nav, .result-actions { display: none !important; }
  .result-box { box-shadow: none; border: 0; }
}

/* ---------- دکمه بازگشت به بالا (فقط دسکتاپ؛ در موبایل نوار پایین هست) ---------- */
.to-top {
  position: fixed; left: 24px; bottom: 24px; z-index: 45; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%;
  background: var(--surface); color: var(--primary); box-shadow: 0 6px 20px rgba(15, 27, 45, .18); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(16px) scale(.9);
  transition: opacity .25s, transform .25s, visibility .25s, background .2s, color .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--primary); color: #fff; }
.to-top:focus-visible { outline: 3px solid var(--primary-soft); outline-offset: 2px; }
.to-top-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.to-top-ring circle { fill: none; stroke-width: 3; }
.to-top-ring circle:first-child { stroke: var(--line); }
.to-top-ring circle:last-child { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .1s linear; }
.to-top:hover .to-top-ring circle:last-child { stroke: #fff; }
.to-top-arrow { position: relative; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.to-top:hover .to-top-arrow { transform: translateY(-2px); }
@media (max-width: 960px) { .to-top { display: none; } }
@media print { .to-top { display: none !important; } }

/* ---------- دسته‌بندی‌های صفحه اصلی به‌صورت کاروسل ---------- */
.cat-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 6 * 14px) / 7); gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
  padding: 2px 2px 8px; margin: -2px -2px 0;
}
.cat-track::-webkit-scrollbar { display: none; }
.cat-track:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; border-radius: var(--radius); }
.cat-track .cat-card { min-width: 0; }
@media (max-width: 1100px) { .cat-track { grid-auto-columns: calc((100% - 4 * 14px) / 5); } }
@media (max-width: 960px) {
  /* موبایل: کمی از کارت بعدی پیداست تا معلوم باشد قابل کشیدن است */
  .cat-track { grid-auto-columns: calc((100% - 3 * 10px) / 4.4); gap: 10px; }
}
@media (max-width: 480px) { .cat-track { grid-auto-columns: calc((100% - 3 * 8px) / 4.3); gap: 8px; } }

/* ---------- کد تخفیف در تسویه حساب ---------- */
.coupon-box { border-top: 1px dashed var(--line-2); padding: 14px 0 12px; margin-top: 4px; }
.coupon-box label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.coupon-row { display: flex; gap: 8px; }
.coupon-row input { flex: 1; min-width: 0; min-height: 44px; border: 1px solid var(--line-2); border-radius: 12px; padding: 8px 12px; background: #fff; text-transform: uppercase; letter-spacing: .5px; text-align: right; }
.coupon-row input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-soft); }
.coupon-row input[readonly] { background: #ECFDF5; border-color: #A7F3D0; color: #065F46; font-weight: 700; }
.coupon-row .btn { flex: none; min-height: 44px; padding-inline: 16px; }
.coupon-msg { margin: 8px 0 0; font-size: 13px; min-height: 0; }
.coupon-msg:empty { display: none; }
.coupon-msg.is-ok { color: #065F46; }
.coupon-msg.is-error { color: #B91C1C; }

/* ---------- نظرات و امتیاز ---------- */
.stars {
  --rating: 0; display: inline-block; font-size: 16px; line-height: 1; letter-spacing: 2px; direction: rtl; unicode-bidi: isolate;
  /* راست‌چین: از ستاره سمت راست پر می‌شود */
  background: linear-gradient(to left, #F59E0B calc(var(--rating) / 5 * 100%), #D9DEE5 calc(var(--rating) / 5 * 100%));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stars::before { content: "★★★★★"; }
.stars-lg { font-size: 22px; }
.product-rating { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin: -4px 0 8px; }
.product-rating:hover { color: var(--primary); }
.reviews-head { display: grid; grid-template-columns: 180px 1fr; gap: 24px; align-items: center; margin-bottom: 18px; }
.reviews-head > p { grid-column: 1 / -1; margin: 0; }
.reviews-score { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px; border-radius: 16px; background: var(--surface-2); }
.reviews-score strong { font-size: 36px; line-height: 1; color: var(--ink); }
.reviews-bars { display: grid; gap: 6px; }
.reviews-bar { display: grid; grid-template-columns: 44px 1fr 32px; gap: 10px; align-items: center; font-size: 13px; }
.reviews-bar .bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.reviews-bar .bar span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.review-form-box { margin-bottom: 18px; }
.review-form > summary { list-style: none; display: inline-flex; cursor: pointer; }
.review-form > summary::-webkit-details-marker { display: none; }
.review-form[open] > summary { margin-bottom: 14px; }
.review-form form { max-width: 560px; }
.review-form textarea { width: 100%; border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 14px; font: inherit; resize: vertical; }
.review-form textarea:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-soft); }
.star-input { border: 0; padding: 0; margin: 0 0 6px; }
.star-input legend { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.star-input-row { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.star-input-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input-row label { font-size: 32px; line-height: 1; color: #D9DEE5; cursor: pointer; transition: color .15s, transform .15s; }
.star-input-row label:hover, .star-input-row label:hover ~ label,
.star-input-row input:checked ~ label { color: #F59E0B; }
.star-input-row label:hover { transform: scale(1.12); }
.star-input-row input:focus-visible + label { outline: 2px solid var(--primary); border-radius: 6px; }
.review-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.review { padding: 16px 0; border-top: 1px solid var(--line); }
.review-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.review-verified { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: #ECFDF5; color: #065F46; font-size: 12px; font-weight: 700; }
.review-title { font-size: 15px; margin: 10px 0 0; }
.review-body { margin: 8px 0 0; line-height: 2; white-space: pre-line; }
.review-reply { margin-top: 10px; padding: 10px 14px; border-radius: 12px; background: var(--primary-soft); font-size: 14px; line-height: 1.9; }
.review-login a { font-weight: 700; }
@media (max-width: 640px) { .reviews-head { grid-template-columns: 1fr; } }

/* ---------- علاقه‌مندی‌ها و مقایسه ---------- */
.buybox-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.tool-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.tool-btn:hover { border-color: var(--primary); color: var(--primary); }
.tool-btn.is-on { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.tool-btn[data-wishlist].is-on { border-color: #FDA4AF; color: #E11D48; background: #FFF1F2; }
.tool-btn[data-wishlist].is-on svg { fill: currentColor; }
.wishlist-item { position: relative; }
.wishlist-remove { position: absolute; top: 10px; left: 10px; z-index: 2; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255,255,255,.95); color: #E11D48; box-shadow: 0 2px 8px rgba(15,27,45,.15); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.compare-bar { position: fixed; bottom: 20px; right: 24px; z-index: 44; display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 10px 30px rgba(15,27,45,.18); }
.compare-bar-items { display: flex; gap: 6px; }
.compare-bar-items img { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.compare-bar .btn { min-height: 40px; padding-inline: 16px; }
.compare-bar-clear { width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; }
@media (max-width: 640px) { .pcard-tools { top: 16px; left: 16px; } .pcard-tool { width: 30px; height: 30px; } }
@media (max-width: 960px) { .compare-bar { bottom: 80px; right: 12px; left: 12px; justify-content: space-between; } }
.compare-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.compare-diff { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.compare-table { width: 100%; min-width: calc(160px + var(--cols) * 200px); border-collapse: collapse; table-layout: fixed; }
.compare-table th, .compare-table td { padding: 12px; border-bottom: 1px solid var(--line); text-align: center; vertical-align: top; font-size: 14px; }
.compare-table .compare-label { width: 160px; text-align: right; color: var(--muted); font-weight: 700; background: var(--surface-2); position: sticky; right: 0; z-index: 1; }
.compare-product { position: relative; }
.compare-product img { width: 140px; height: 140px; object-fit: contain; display: block; margin: 0 auto 8px; }
.compare-name { display: block; font-weight: 700; color: var(--text); line-height: 1.7; }
.compare-remove { position: absolute; top: 6px; left: 6px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.compare-price strong { display: block; color: var(--primary); }
.compare-group th { background: var(--primary-soft); color: var(--primary); text-align: right; font-size: 14px; }
@media print { .compare-bar { display: none !important; } }

/* ---------- پنل کاربر: آدرس‌ها و نظرات من ---------- */
.account-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.account-head .page-title { margin: 0; }
.address-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.address-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 6px; }
.address-card.is-default { border-color: var(--primary); background: var(--primary-soft); }
.address-top { display: flex; align-items: center; gap: 8px; }
.address-text { margin: 0; line-height: 1.9; }
.address-card p.muted { margin: 0; }
.address-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.address-actions form { margin: 0; }
.address-delete { color: #B91C1C; }
.address-form-box { margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--line-2); scroll-margin-top: 90px; }
.address-form-title { font-size: 17px; margin: 0 0 14px; }
.address-form-box textarea { width: 100%; border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 14px; font: inherit; resize: vertical; }
.address-form-actions { display: flex; gap: 8px; margin-top: 16px; }
.my-reviews { list-style: none; margin: 0; padding: 0; }
.my-review { display: grid; grid-template-columns: 200px 1fr auto; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); align-items: start; }
.my-review:first-child { border-top: 0; }
.my-review-product { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 14px; line-height: 1.7; }
.my-review-product img { flex: none; width: 56px; height: 56px; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.my-review-delete { color: var(--muted); }
.my-review-delete:hover { color: #B91C1C; }
.review-state { padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.review-state.is-ok { background: #ECFDF5; color: #065F46; }
.review-state.is-wait { background: #FFFBEB; color: #92400E; }
.review-state.is-no { background: #FEF2F2; color: #991B1B; }
@media (max-width: 640px) { .my-review { grid-template-columns: 1fr auto; } .my-review-product { grid-column: 1 / -1; } }

/* ---------- جستجوی زنده ---------- */
.search { position: relative; }
.suggest {
  position: absolute; top: calc(100% + 6px); right: 0; left: 0; z-index: 60; max-height: min(70vh, 520px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 40px rgba(15, 27, 45, .16); padding: 6px;
}
.suggest-group { padding: 8px 10px 4px; font-size: 12px; font-weight: 700; color: var(--muted-2); }
.suggest-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--text); }
.suggest-item:hover, .suggest-item.is-active { background: var(--surface-2); color: var(--text); }
.suggest-item img { flex: none; width: 44px; height: 44px; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.suggest-text { display: grid; gap: 2px; min-width: 0; }
.suggest-text b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest-text small { font-size: 12px; color: var(--muted); }
.suggest-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 8px 8px; }
.suggest-chip { padding: 6px 12px; border-radius: 999px; background: var(--surface-2); font-size: 13px; }
.suggest-chip:hover, .suggest-chip.is-active { background: var(--primary-soft); color: var(--primary); }
.suggest-all { justify-content: center; margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; color: var(--primary); font-weight: 700; font-size: 14px; }
.suggest-empty { padding: 14px; text-align: center; color: var(--muted); font-size: 14px; }

/* ---------- بازدیدهای اخیر ---------- */
.recent .section-head { align-items: center; }
.link-btn { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.link-btn:hover { color: #B91C1C; }
.recent-track { display: grid; grid-auto-flow: column; grid-auto-columns: 160px; gap: 12px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 6px; scroll-snap-type: x proximity; }
.recent-card { scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); transition: border-color .15s, box-shadow .15s; }
.recent-card:hover { border-color: var(--primary); box-shadow: var(--shadow); color: var(--text); }
.recent-card img { width: 100%; height: 110px; object-fit: contain; border-radius: 10px; background: var(--surface-2); mix-blend-mode: multiply; }
.recent-name { font-size: 13px; font-weight: 600; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.recent-price { font-size: 12px; color: var(--primary); font-weight: 700; margin-top: auto; }
@media (max-width: 640px) { .recent-track { grid-auto-columns: 130px; } }

/* ---------- موجود شد خبرم کن ---------- */
.stock-alert { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px dashed var(--primary); border-radius: var(--radius); background: var(--primary-soft); margin: 4px 0 10px; }
.stock-alert strong { display: flex; align-items: center; gap: 6px; color: var(--primary); font-size: 15px; }
.stock-alert input { height: 44px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 12px; background: var(--surface); font: inherit; text-align: left; }
.stock-alert input:focus { outline: none; border-color: var(--primary); }
.stock-alert-done { margin: 0; color: var(--primary); font-weight: 700; line-height: 1.9; }


/* ---------- لیست قیمت (/listprice) ---------- */
.pl-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pl-actions .btn { gap: 6px; }
.pl-dealer-note { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 14px; border-radius: 12px; background: #FFFBEB; color: #92400E; font-size: 13px; font-weight: 700; }
.pl-tools { margin-top: 16px; padding: 14px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.pl-search { position: relative; flex: 1 1 260px; max-width: 420px; display: flex; align-items: center; }
.pl-search svg { position: absolute; right: 12px; color: var(--muted); pointer-events: none; }
.pl-search input { width: 100%; min-height: 44px; border: 1px solid var(--line-2, #CBD5E1); border-radius: 12px; padding: 8px 40px 8px 12px; background: #fff; font: inherit; font-size: 14px; }
.pl-search input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-soft); }
.pl-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; font-weight: 700; cursor: pointer; user-select: none; }
.pl-toggle input { width: 18px; height: 18px; accent-color: var(--primary); }
.pl-brands { flex-basis: 100%; padding-top: 12px; border-top: 1px dashed var(--line); }
.pl-brands .chip { border: 0; cursor: pointer; font: inherit; font-size: 13px; gap: 6px; }
.pl-brands .chip small { font-size: 11px; color: var(--muted); }
.pl-brands .chip.is-active { background: var(--primary); color: #fff; font-weight: 700; }
.pl-brands .chip.is-active small { color: rgba(255, 255, 255, .8); }
.pl-page .table-box { margin-top: 16px; }
.price-table .pl-idx { width: 64px; color: var(--muted); }
.price-table .pl-sku { font-size: 13px; color: var(--muted); white-space: nowrap; }
.price-table tbody tr:hover td { background: #F8FAFC; }
.price-table tbody tr:hover td.dealer-col { background: #FEF3C7; }
.pl-page .ltr { direction: ltr; unicode-bidi: isolate; }
.pl-empty { padding: 28px 16px; text-align: center; color: var(--muted); margin: 0; }
.pl-empty .link-btn { display: inline; min-height: 0; font-size: inherit; }
.pl-foot { margin: 0; padding: 12px 14px 6px; font-size: 13px; color: var(--muted); line-height: 1.9; }
.pl-foot a { color: var(--primary); font-weight: 700; }
.pl-others { margin-top: 20px; padding: 18px 20px; }
.pl-others h2 { font-size: 17px; margin-bottom: 12px; }
.pl-print-head { display: none; }

.pl-grid { margin-top: 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.pl-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; color: var(--text); transition: box-shadow .2s, transform .2s; }
.pl-card:hover { color: var(--text); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15, 27, 45, .1); }
.pl-card-icon { flex: none; width: 56px; height: 56px; border-radius: 14px; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.pl-card-icon img { width: 32px; height: 32px; object-fit: contain; }
.pl-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pl-card-body strong { font-size: 15px; }
.pl-card-body span { font-size: 13px; color: var(--muted); }
.pl-card-go { flex: none; color: var(--muted); }
.pl-card:hover .pl-card-go { color: var(--accent); }

@media (max-width: 760px) {
  .pl-actions { width: 100%; }
  .pl-actions .btn { flex: 1 1 auto; }
  .pl-search { max-width: none; flex-basis: 100%; }
  /* موبایل: قیمت بدون اسکرول افقی دیده شود */
  .pl-page .price-table { min-width: 0; }
  .pl-page .price-table .pl-idx, .pl-page .price-table .pl-sku, .pl-page .price-table .pl-brand { display: none; }
  .pl-page .price-table th, .pl-page .price-table td { padding: 10px 8px; font-size: 13px; }
  .pl-page .price-table .num { font-size: 13px; }
}

@media print {
  @page { size: A4; margin: 12mm 10mm; }
  body:has(.pl-page) { background: #fff; }
  .pl-page .breadcrumb, .pl-page .page-head, .pl-tools, .pl-others, .pl-page .prose-box, .pl-page [data-pl-empty],
  body:has(.pl-page) .compare-bar, body:has(.pl-page) .toast-region { display: none !important; }
  .pl-page { padding: 0 !important; max-width: none; }
  .pl-print-head { display: flex; align-items: center; gap: 14px; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 2px solid #F59E0B; }
  .pl-print-head img { width: 64px; height: auto; }
  .pl-print-head div { display: flex; flex-direction: column; gap: 3px; }
  .pl-print-head strong { font-size: 17px; }
  .pl-print-head span { font-size: 11px; color: #475569; }
  .pl-page .card { box-shadow: none !important; border: 0 !important; padding: 0 !important; margin: 0 !important; }
  .pl-page .table-scroll { overflow: visible; }
  .pl-page .price-table { min-width: 0; font-size: 11px; }
  .pl-page .price-table th { background: #F1F5F9 !important; padding: 6px 8px; font-size: 11px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pl-page .price-table td { padding: 5px 8px; border-bottom: 1px solid #E2E8F0; }
  .pl-page .price-table .pl-sku, .pl-page .stock-dot { font-size: 10px; }
  .pl-page .price-table tr { break-inside: avoid; }
  .pl-page .price-table td a { color: #000; font-weight: 600; text-decoration: none; }
  .pl-page .price-table .dealer-col { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pl-page .stock-dot::before { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pl-foot { font-size: 10px; padding: 8px 0 0; }
  .pl-foot a { color: #000; }
}

/* ---------- پنل کاربر: منو، پیشخوان، پروفایل، سفارش‌ها ---------- */
.account-nav { padding: 10px; gap: 8px; }
.account-user { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: var(--surface-2); color: var(--text); position: relative; }
.account-user:hover { background: var(--primary-soft); color: var(--text); }
.account-avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; }
.account-user-text { display: flex; flex-direction: column; min-width: 0; }
.account-user-text strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-user-text span { font-size: 12px; color: var(--muted); text-align: right; }
.account-dealer { position: absolute; left: 8px; top: 8px; min-height: 22px; padding: 0 8px; font-size: 11px; }
.account-links { display: flex; flex-direction: column; gap: 2px; }
.account-count { margin-right: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--ink); font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }

.account-hero { padding: 22px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.account-hero-text { flex: 1 1 280px; }
.account-hero h1 { font-size: 22px; margin: 0 0 6px; }
.account-hero p { margin: 0; font-size: 14px; }
.text-primary { color: var(--primary); }
.profile-meter { flex: 0 1 300px; padding: 14px 16px; border-radius: 14px; background: #FFFBEB; border: 1px solid #FDE68A; }
.profile-meter-top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: #78350F; }
.profile-meter-bar { height: 8px; border-radius: 8px; background: #FDE68A; margin: 8px 0 10px; overflow: hidden; }
.profile-meter-bar i { display: block; height: 100%; border-radius: 8px; background: var(--accent); }
.profile-tasks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.profile-tasks a { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: #92400E; background: #fff; border-radius: 999px; padding: 4px 10px; }
.profile-tasks a:hover { color: var(--primary); }

.account-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.account-stat { padding: 16px; display: flex; flex-direction: column; gap: 4px; color: var(--text); transition: box-shadow .2s, transform .2s; }
.account-stat:hover { color: var(--text); transform: translateY(-2px); box-shadow: 0 10px 22px rgba(15, 27, 45, .08); }
.account-stat b { font-size: 24px; font-weight: 800; line-height: 1.2; }
.account-stat > span:last-child { font-size: 13px; color: var(--muted); }
.account-stat-ico { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.account-stat-ico.tone-a { background: #E6F2F3; color: var(--primary); }
.account-stat-ico.tone-b { background: #EEF2FF; color: #4F46E5; }
.account-stat-ico.tone-c { background: #FFF1F2; color: #E11D48; }
.account-stat-ico.tone-d { background: #FFFBEB; color: #B45309; }

.account-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.last-order { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); }
.last-order:hover { border-color: var(--primary); color: var(--text); }
.last-order-main { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.empty-state-sm { padding: 24px 16px; margin-bottom: 0; }
.account-quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.account-quick a { display: flex; align-items: center; gap: 12px; padding: 16px; color: var(--text); font-weight: 700; }
.account-quick a:hover { color: var(--primary); }
.account-quick a span { display: flex; flex-direction: column; gap: 2px; }
.account-quick small { font-weight: 400; font-size: 12px; }

.profile-form .req { color: #B91C1C; }
.profile-form input[disabled] { background: var(--surface-2); color: var(--muted); }
.profile-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 18px; }
.profile-note { margin-top: 18px; line-height: 2; }
.profile-note a { color: var(--primary); font-weight: 700; }

.welcome-card { max-width: 440px; margin: 20px auto 60px; padding: 28px 26px; text-align: center; display: flex; flex-direction: column; gap: 10px; }
.welcome-card h1 { font-size: 22px; margin: 0; }
.welcome-card .form-stack { text-align: right; margin: 8px 0 0; }
.welcome-ico { width: 64px; height: 64px; margin: 0 auto 4px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; }

.order-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 16px; padding-bottom: 2px; scrollbar-width: none; }
.order-tabs::-webkit-scrollbar { display: none; }
.order-tabs a { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: 14px; font-weight: 700; }
.order-tabs a span { font-size: 12px; color: var(--muted); }
.order-tabs a[aria-current="page"] { background: var(--primary); color: #fff; }
.order-tabs a[aria-current="page"] span { color: rgba(255, 255, 255, .8); }
.order-tabs-empty { padding: 24px 0; text-align: center; }

.order-timeline { list-style: none; margin: 18px 0 6px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); counter-reset: ot; }
.order-timeline li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 13px; color: var(--muted); }
/* خط اتصال هر مرحله به مرحله قبلی (در RTL سمت راست) */
.order-timeline li::before { content: ""; position: absolute; top: 13px; left: 50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.order-timeline li:first-child::before { display: none; }
.order-timeline li.is-done::before, .order-timeline li.is-current::before { background: var(--primary); }
.ot-dot { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 3px solid var(--line); display: flex; align-items: center; justify-content: center; color: #fff; }
.is-done .ot-dot { background: var(--primary); border-color: var(--primary); }
.is-current .ot-dot { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(245, 158, 11, .2); }
.is-done .ot-title, .is-current .ot-title { color: var(--text); font-weight: 700; }
.ot-note { font-size: 11px; color: var(--muted); }
.tracking-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: #ECFDF5; border: 1px solid #A7F3D0; font-size: 14px; }
.tracking-box b { font-size: 15px; letter-spacing: .5px; }
.order-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.order-actions .btn { gap: 6px; }

.alert-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.alert-item { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; }
.alert-item.is-done { background: var(--surface-2); }
.alert-img { flex: none; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: #fff; }
.alert-img img { width: 100%; height: 100%; object-fit: contain; }
.alert-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.alert-name { font-weight: 700; color: var(--text); }
.alert-name:hover { color: var(--primary); }

@media (max-width: 960px) {
  /* موبایل: منوی حساب به‌صورت نوار افقی قابل اسکرول */
  .account-layout { grid-template-columns: minmax(0, 1fr); }
  .account-nav { padding: 8px; flex-direction: column; overflow: visible; min-width: 0; }
  .account-nav .account-user { width: 100%; }
  .account-links { flex-direction: row; overflow-x: auto; gap: 6px; scrollbar-width: none; padding-bottom: 2px; }
  .account-links::-webkit-scrollbar { display: none; }
  .account-links a, .account-links button { flex: none; width: auto; white-space: nowrap; min-height: 40px; padding: 0 12px; border-radius: 999px; background: var(--surface-2); }
  .account-links form { flex: none; }
  .account-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-quick { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .order-timeline li { font-size: 11px; }
  .alert-item { flex-wrap: wrap; }
  .alert-body { flex-basis: calc(100% - 80px); }
  .last-order > svg { display: none; }
}

/* ---------- پیام‌ها و تاریخچه سفارش (پنل مشتری) ---------- */
.order-messages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.order-messages li { padding: 12px 14px; border-radius: 14px; background: #FFFBEB; border: 1px solid #FDE68A; }
.order-messages p { margin: 4px 0 0; white-space: pre-line; line-height: 1.9; }
.order-history { padding: 0 !important; }
.order-history summary { padding: 16px 20px; cursor: pointer; font-weight: 700; }
.order-history ol { list-style: none; margin: 0; padding: 0 20px 18px; display: flex; flex-direction: column; gap: 10px; }
.order-history li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding-right: 14px; border-right: 2px solid var(--line); }
.order-msg-chip { min-height: 24px; padding: 0 8px; font-size: 11px; gap: 4px; margin-top: 4px; background: #FFFBEB; color: #92400E; }
.order-msg-banner { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px; background: #FFFBEB; border-color: #FDE68A; color: var(--text); }
.order-msg-banner:hover { color: var(--text); border-color: var(--accent); }
.order-msg-banner b { display: block; margin-bottom: 2px; }
.order-msg-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: var(--ink); display: flex; align-items: center; justify-content: center; }

/* ---------- فروش ویژه: شمارش معکوس ---------- */
.pcard-timer { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: auto; padding: 4px 8px; border-radius: 8px; background: #FEF2F2; color: #B91C1C; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pcard-timer + .pcard-foot { margin-top: 8px; }
.pcard-timer.is-ended { background: var(--surface-2); color: var(--muted); }
.sale-timer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-bottom: 12px; padding: 10px 14px; border-radius: 12px; background: linear-gradient(90deg, #DC2626, #F59E0B); color: #fff; }
.sale-timer-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; }
.sale-timer-left { font-size: 13px; }
.sale-timer-left b { font-size: 16px; font-variant-numeric: tabular-nums; }
.sale-timer.is-ended { background: var(--surface-2); color: var(--muted); }

/* ---------- صفحه و نوار فروش ویژه ---------- */
.promo-bar { background: linear-gradient(90deg, #B91C1C, #DC2626 45%, #F59E0B); color: #fff; }
.promo-bar-row { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.promo-bar-link { flex: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 16px; color: #fff; font-size: 14px; padding: 6px 0; }
.promo-bar-link:hover { color: #fff; }
.promo-bar-title { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; }
.promo-bar-off { background: rgba(255, 255, 255, .18); border-radius: 999px; padding: 2px 10px; font-weight: 700; font-size: 13px; }
.promo-bar-time b { font-variant-numeric: tabular-nums; font-size: 15px; }
.promo-bar-cta { display: inline-flex; align-items: center; gap: 2px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.promo-bar-close { flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .15); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.promo-bar-close:hover { background: rgba(255, 255, 255, .3); }
.promo-bar.is-ended { display: none; }
.nav-links .nav-promo { display: inline-flex; align-items: center; gap: 4px; color: #DC2626; font-weight: 800; }
.section-more { font-size: 13px; font-weight: 700; color: var(--primary); margin-right: 10px; vertical-align: middle; }
.promo-block { margin-bottom: 36px; }
.promo-hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 28px; margin-bottom: 18px; border-radius: var(--radius); background: linear-gradient(120deg, #7F1D1D, #DC2626 55%, #F59E0B); color: #fff; }
.promo-hero h2 { font-size: 26px; margin: 8px 0 6px; color: #fff; }
.promo-hero p { margin: 0; opacity: .95; }
.promo-hero-tag { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .18); border-radius: 999px; padding: 3px 12px; font-size: 13px; font-weight: 700; }
.promo-hero-timer { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 20px; border-radius: 16px; background: rgba(0, 0, 0, .18); }
.promo-hero-timer > span { font-size: 13px; opacity: .9; }
.promo-hero-timer b { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.promo-hero.is-ended { filter: grayscale(.8); }
.promo-grid { margin-top: 0; }
.page-head + .promo-grid { margin-top: 20px; }
@media (max-width: 760px) {
  .promo-bar-link { font-size: 12px; gap: 2px 10px; }
  .promo-bar-off { display: none; }
  .promo-hero { padding: 18px; }
  .promo-hero h2 { font-size: 20px; }
  .promo-hero-timer { width: 100%; }
  .promo-hero-timer b { font-size: 22px; }
}
.cd-clock { display: inline-block; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }

/* =====================================================================
   دکمه شناور «استعلام و مشاوره» (همه صفحات) – _ContactFab.cshtml
   دسکتاپ: پایین راست (نوار مقایسه کنارش جابه‌جا می‌شود)؛ موبایل: بالای نوار پایین، پنل به‌صورت برگه پایینی
   ===================================================================== */
.cfab { position: fixed; right: 24px; bottom: 24px; z-index: 46; }
.cfab-backdrop { display: none; }
.cfab-btn {
  position: relative; width: 60px; height: 60px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--ink); color: var(--accent); box-shadow: 0 10px 26px rgba(15, 27, 45, .32);
  display: flex; align-items: center; justify-content: center; transition: transform .2s, background .2s;
}
.cfab-btn:hover { transform: translateY(-2px); background: #1B2A40; }
.cfab-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.cfab-btn > span:not(.cfab-dot) { display: flex; transition: transform .25s, opacity .2s; }
.cfab-btn-x { position: absolute; opacity: 0; transform: rotate(-90deg) scale(.6); color: #fff; }
.cfab.is-open .cfab-btn-open { opacity: 0; transform: rotate(90deg) scale(.6); }
.cfab.is-open .cfab-btn-x { opacity: 1; transform: none; }
.cfab-dot {
  position: absolute; top: 6px; right: 6px; width: 13px; height: 13px; border-radius: 50%;
  background: #22C55E; border: 2px solid var(--ink);
}
.cfab-dot::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid #22C55E; animation: cfab-ping 2s ease-out infinite; }
.cfab.is-open .cfab-dot { display: none; }
@keyframes cfab-ping { 0% { transform: scale(1); opacity: .8; } 80%, 100% { transform: scale(2.2); opacity: 0; } }

.cfab-panel {
  position: absolute; right: 0; bottom: 74px; width: 320px; max-width: calc(100vw - 32px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: 0 24px 50px rgba(15, 27, 45, .22); overflow: hidden;
  transform-origin: bottom right; animation: cfab-in .2s ease-out;
}
.cfab-panel[hidden] { display: none; }
@keyframes cfab-in { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }
.cfab-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 16px 16px 12px; background: var(--ink); color: #fff; border-bottom: 3px solid var(--accent); }
.cfab-head strong { display: block; font-size: 15px; }
.cfab-head span { display: block; font-size: 12px; color: #CBD5E1; margin-top: 3px; }
.cfab-close { flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cfab-close:hover { background: rgba(255, 255, 255, .2); }
.cfab-list { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.cfab-item {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 10px; border-radius: 14px;
  border: 1px solid var(--line); color: var(--text); transition: border-color .15s, background .15s, transform .15s;
}
.cfab-item:hover { color: var(--text); transform: translateX(-2px); }
.cfab-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; }
.cfab-txt { display: flex; flex-direction: column; min-width: 0; }
.cfab-txt b { font-size: 14px; }
.cfab-txt small { font-size: 12px; color: var(--muted); }
.cfab-call { background: #FFFBEB; border-color: var(--accent-soft); }
.cfab-call:hover { background: #FEF3C7; border-color: var(--accent); }
.cfab-call .cfab-ico { background: var(--accent); color: var(--ink); }
.cfab-call small { font-size: 15px; font-weight: 800; color: var(--ink); text-align: right; }
.cfab-wa .cfab-ico { background: #25D366; }
.cfab-wa:hover { border-color: #25D366; background: #F0FDF4; }
.cfab-bale .cfab-ico { background: #2EA7AE; }
.cfab-bale:hover { border-color: #2EA7AE; background: #ECFEFF; }
.cfab-rubika .cfab-ico { background: linear-gradient(135deg, #8B5CF6, #EC4899); }
.cfab-rubika:hover { border-color: #A855F7; background: #FAF5FF; }
.cfab-hours { display: flex; align-items: center; gap: 6px; padding: 10px 16px 14px; font-size: 12px; color: var(--muted); border-top: 1px dashed var(--line); }

/* نوار مقایسه کنار دکمه شناور می‌نشیند */
@media (min-width: 961px) { .compare-bar { right: 96px; } }

@media (max-width: 960px) {
  .cfab { right: 14px; bottom: calc(80px + env(safe-area-inset-bottom)); }
  body:has(.compare-bar:not([hidden])) .cfab { bottom: calc(150px + env(safe-area-inset-bottom)); }
  .cfab-btn { width: 54px; height: 54px; }
  .cfab.is-open { z-index: 75; }
  .cfab-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: -1; background: rgba(15, 27, 45, .45); }
  .cfab-panel {
    position: fixed; left: 0; right: 0; bottom: 0; width: auto; max-width: none;
    border-radius: 22px 22px 0 0; padding-bottom: env(safe-area-inset-bottom); animation-name: cfab-up;
  }
  .cfab.is-open .cfab-btn { display: none; }
  @keyframes cfab-up { from { transform: translateY(100%); } to { transform: none; } }
}
body:has(.filters.is-open) .cfab, body:has(.drawer:not([hidden])) .cfab { display: none; }
@media print { .cfab { display: none !important; } }

/* ---------- استعلام قیمت آنلاین (صفحه کالای استعلامی) ---------- */
.inquiry-form { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--accent-soft); border-radius: var(--radius); background: #FFFBEB; margin: 4px 0 10px; }
.inquiry-form strong { display: flex; align-items: center; gap: 6px; font-size: 15px; color: var(--ink); }
.inquiry-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.inquiry-form input:not(.hp-field), .inquiry-form textarea { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px; background: var(--surface); font: inherit; }
.inquiry-form textarea { resize: vertical; min-height: 64px; }
.inquiry-form input:focus, .inquiry-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245, 158, 11, .18); }
.inquiry-form input[type="tel"] { text-align: left; }
.inquiry-qty { display: flex; align-items: center; gap: 10px; }
.inquiry-qty label { font-size: 14px; color: var(--muted); flex: none; }
.inquiry-qty input { max-width: 110px; text-align: center; }

/* ---------- همکاری با آرتادر (/dealer) ---------- */
.dealer-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 28px; align-items: center; padding: 28px; background: linear-gradient(135deg, var(--ink), #1B2A40); color: #fff; border: 0; border-bottom: 4px solid var(--accent); }
.dealer-hero h1 { font-size: 28px; margin: 12px 0 8px; color: #fff; }
.dealer-hero p { color: #CBD5E1; line-height: 2; }
.dealer-hero .chip { background: rgba(245, 158, 11, .16); color: var(--accent-soft); }
.dealer-perks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; }
.dealer-perks li { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border-radius: var(--radius); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); }
.dealer-perks b { display: block; font-size: 15px; margin-bottom: 2px; }
.dealer-perks small { display: block; color: #CBD5E1; font-size: 12.5px; line-height: 1.9; }
.dealer-perk-ico { flex: none; width: 42px; height: 42px; border-radius: 12px; background: var(--accent); color: var(--ink); display: flex; align-items: center; justify-content: center; }
.dealer-body { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; margin-top: 20px; align-items: start; }
.dealer-form-card, .dealer-faq { padding: 24px; }
.dealer-form-card h2, .dealer-faq h2 { font-size: 19px; margin: 0 0 14px; }
.dealer-form-card > p { margin-bottom: 14px; }
.dealer-form { display: flex; flex-direction: column; gap: 14px; }
.dealer-form .btn { align-self: flex-start; }
.dealer-form .req { color: #B91C1C; }
.dealer-form textarea { resize: vertical; }
.dealer-state { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--radius); margin-bottom: 18px; border: 1px solid var(--line); }
.dealer-state h2 { margin: 0 0 4px; font-size: 17px; }
.dealer-state p { margin: 0 0 10px; line-height: 1.9; }
.dealer-state-ico { flex: none; width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.dealer-state-ok { background: #ECFDF5; border-color: #A7F3D0; }
.dealer-state-ok .dealer-state-ico { background: var(--success); color: #fff; }
.dealer-state-wait { background: #FFFBEB; border-color: #FDE68A; }
.dealer-state-wait .dealer-state-ico { background: var(--accent); color: var(--ink); }
.dealer-state-no { background: #FEF2F2; border-color: #FECACA; }
.dealer-state-no .dealer-state-ico { background: #DC2626; color: #fff; }
.dealer-note { white-space: pre-line; padding: 10px 12px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, .7); font-size: 14px; }
.dealer-faq details { border-top: 1px solid var(--line); padding: 12px 0; }
.dealer-faq details:first-of-type { border-top: 0; padding-top: 0; }
.dealer-faq summary { cursor: pointer; font-weight: 700; font-size: 14.5px; }
.dealer-faq details p { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.9; }
@media (max-width: 960px) {
  .dealer-hero, .dealer-body { grid-template-columns: minmax(0, 1fr); }
  .dealer-hero { padding: 22px 18px; }
  .dealer-hero h1 { font-size: 23px; }
}
@media (max-width: 560px) { .dealer-perks { grid-template-columns: minmax(0, 1fr); } .dealer-form .btn { align-self: stretch; } }

/* ---------- کالاهای مکمل (خرید با هم) – صفحه محصول ---------- */
.bundle { margin-top: 20px; padding: 20px 22px; border-top: 3px solid var(--accent); }
.bundle-head h2 { font-size: 19px; margin: 0 0 4px; }
.bundle-head p { margin: 0 0 14px; }
.bundle-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.bundle-item { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .15s, opacity .15s; min-width: 0; }
.bundle-item:has(.bundle-cb:checked) { border-color: var(--accent); background: #FFFBEB; }
.bundle-item.is-off { opacity: .7; }
.bundle-cb { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--primary); cursor: pointer; }
.bundle-cb-spacer { flex: none; width: 20px; }
.bundle-img { flex: none; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: #fff; border: 1px solid var(--line); }
.bundle-img img { width: 100%; height: 100%; object-fit: contain; }
.bundle-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bundle-name { color: var(--text); font-size: 13.5px; font-weight: 700; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bundle-name:hover { color: var(--primary); }
.bundle-price { font-size: 13px; color: var(--muted); }
.bundle-price del { color: var(--muted-2); margin-left: 4px; font-size: 12px; }
.bundle-price b { color: var(--ink); font-size: 14px; }
.bundle-inquiry { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; }
.bundle-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.bundle-total { font-size: 14px; color: var(--muted); }
.bundle-total b { color: var(--ink); font-size: 17px; }
.bundle-foot .btn:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 560px) {
  .bundle { padding: 16px; }
  .bundle-list { grid-template-columns: minmax(0, 1fr); }
  .bundle-foot .btn { width: 100%; }
}

/* پیشنهاد تکمیل خرید در سبد */
.cart-suggest { margin-top: 28px; }

/* ---------- صفحه محصول: آیکون کنار عنوان بخش‌ها، ستون توضیحات تمام‌عرض ---------- */
.section-nav a { gap: 6px; }
.section-nav a svg { flex: none; color: var(--primary); opacity: .75; }
.section-nav a:hover svg { opacity: 1; }
.h-ico { display: flex; align-items: center; gap: 10px; }
.h-ico > svg { flex: none; width: 40px; height: 40px; padding: 8px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); }
.product-body .product-main { flex-basis: 100%; }
.product-tags { padding: 18px 20px; margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.product-tags strong { font-size: 14px; }
@media (max-width: 560px) { .h-ico > svg { width: 34px; height: 34px; padding: 7px; } }

/* محصولات مرتبط: یک ردیف ۵تایی در دسکتاپ */
@media (min-width: 1100px) { .related-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* ---------- ویدئوی محصول: گالری و لایت‌باکس ---------- */
.gallery-main [hidden] { display: none !important; }
.gallery-video { width: 100%; height: 100%; object-fit: contain; background: #0F1B2D; }
.thumb { position: relative; cursor: pointer; }
.thumb-video { padding: 0; overflow: hidden; background: #0F1B2D; }
.thumb-video video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; display: block; }
.thumb-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; background: rgba(15, 27, 45, .35); pointer-events: none; }
.thumb-play svg { filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .5)); }

.lb-tabs { display: none; gap: 6px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.lightbox.has-videos .lb-tabs { display: flex; }
.lb-tabs button { border: 0; cursor: pointer; min-height: 38px; padding: 0 16px; border-radius: 999px; background: transparent; color: #CBD5E1; font: inherit; font-size: 14px; font-weight: 700; }
.lb-tabs button:hover { color: #fff; }
.lb-tabs button.is-on { background: #fff; color: var(--ink); }
.lb-tabs button span { font-weight: 500; opacity: .8; }
.lb-top { gap: 12px; }
.lightbox:not(.has-videos) .lb-top { justify-content: space-between; }
.lightbox.has-videos .lb-count { margin-inline-start: auto; }
.lb-stage [hidden] { display: none !important; }
.lb-video { width: 100%; max-width: 1100px; height: auto; max-height: 100%; aspect-ratio: 16 / 9; border-radius: 12px; background: #000; cursor: auto; }
.lightbox.is-video .lb-stage { cursor: default; }
.lb-thumbs button.is-video { position: relative; background: #0F1B2D; }
.lb-thumbs button.is-video video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; display: block; }
.lb-play { position: absolute; inset: 0; pointer-events: none; background: rgba(15, 27, 45, .3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M10 8.5v7l5.5-3.5z'/%3E%3C/svg%3E") center / 24px no-repeat; }
@media (max-width: 640px) {
  .lb-tabs button { padding: 0 12px; font-size: 13px; }
  .lb-count { display: none; }
}
