/* =============================================================================
   Zagros Tech — Layout (page-level) + responsive
   آخرین فایل لود — می‌تواند هر چیزی را override کند.
   ============================================================================= */

main { display: block; min-height: 42dvh; }
section { padding-block: var(--s-4); }
.section-head { display: flex; flex-direction: column; gap: var(--s-1); margin-bottom: var(--s-5); }
.section-head .eyebrow { align-self: flex-start; }
.eyebrow i, .eyebrow [class*='fa-'] { margin-inline-end: 6px; font-size: 0.95em; }

/* ---------- Panel (فریم استاندارد سکشن‌ها) ---------- */
.panel {
  border: 1px solid var(--border); border-radius: var(--r-3);
  background: var(--surface); overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: var(--s-3) var(--s-4) var(--s-3) var(--s-3);
  border-block-end: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-2) 45%, var(--surface));
}
/* نوارِ لهجه‌ی عمودی کنارِ عنوان — حسِ صنعتی/دقیق */
.panel-head-t {
  display: flex; flex-direction: column; gap: 2px;
  padding-inline-start: var(--s-3);
  border-inline-start: 3px solid var(--brand);
}
.panel-head .eyebrow { align-self: flex-start; font-size: 10px; letter-spacing: 0.16em; }
.panel-head h2 { font-size: var(--fs-lg); line-height: 1.3; }
.panel-head .btn { flex-shrink: 0; }
.panel-body { padding: var(--s-5); }
.panel--cta { position: relative; overflow: hidden; background: color-mix(in srgb, var(--brand-tint) 45%, var(--surface)); }
/* بافت عکسِ بسیار محو پس‌زمینه — زیرکانه (فایل طبق IMAGE-PROMPTS؛ تا آن زمان فقط تینت دیده می‌شود) */
.panel--cta::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: url('/assets/images/textures/bg-cta.webp') center / cover no-repeat;
  opacity: 0.07;
}
.panel--cta > .panel-body { position: relative; z-index: 1; }

/* پس‌زمینه‌ی محوِ صفحه‌ی گالری */
.gallery-bg { position: relative; }
.gallery-bg::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: url('/assets/images/textures/bg-gallery.webp') center / cover no-repeat fixed;
  opacity: 0.05;
}
@media (max-width: 560px) {
  .panel-head { flex-direction: column; align-items: flex-start; gap: var(--s-2); }
  .panel-body { padding: var(--s-4); }
}

/* ---------- Hero — تیره، دوستونه، بلوپرینت (pattern.png) ---------- */
.hero {
  position: relative; overflow: hidden;
  background: #080d13; color: #f2f5f7;
  --h-line: #39b9d8;
  --h-amber: #d9a441;
  --h-dim: #9aa5b3;
  --h-hair: rgba(255, 255, 255, 0.12);
  --h-panel: rgba(255, 255, 255, 0.035);
  padding-block: 132px var(--s-6);
  border-block-end: 1px solid rgba(255, 255, 255, 0.06);
}
.hero > .container {
  position: relative; z-index: 5;
  max-width: 1320px; padding-inline: clamp(var(--s-4), 5.5vw, 76px);
  display: grid; gap: var(--s-5);
}

/* تصویر — سمت راست، برشِ زاویه‌دار */
.hero-media {
  position: absolute; top: 0; bottom: 0; right: 0; width: 60%; z-index: 1;
  background: #0b1119;
  clip-path: polygon(15% 0, 100% 0, 100% 100%, 0 100%, 0 22%);
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 900ms var(--ease); will-change: opacity;
  filter: brightness(0.98) saturate(0.9) contrast(1.04);
}
.hero-slide.is-active { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .hero-slide { transition: none; } }

/* اسکریم خوانایی — چپ تیره، راست شفاف */
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(90deg, #080d13 20%, rgba(8, 13, 19, 0.82) 40%, rgba(8, 13, 19, 0.28) 60%, transparent 78%),
    linear-gradient(0deg, rgba(8, 13, 19, 0.55), transparent 42%);
}

/* لایه‌ی خطوط نقشه‌ی مهندسی */
.hero-blueprint {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3;
  color: var(--h-line); opacity: 0.38; pointer-events: none;
}

/* برچسب PRECISION ENGINEERING روی تصویر */
.hero-tag {
  position: absolute; top: 116px; right: clamp(var(--s-4), 4vw, 64px); z-index: 4;
  display: flex; align-items: center; gap: var(--s-2);
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.22em; color: rgba(242, 245, 247, 0.55);
}
.hero-tag b { color: var(--h-amber); font-weight: 700; letter-spacing: 0.14em; }

.hero-eyebrow {
  align-self: start;
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 6px var(--s-3); border-radius: var(--r-pill);
  border: 1px solid rgba(57, 185, 216, 0.45);
  background: rgba(57, 185, 216, 0.1);
  color: #7fd6ee; font-size: var(--fs-xs); font-weight: 700;
}
.hero-eyebrow i { font-size: 10px; color: #7fd6ee; }

.hero h1 {
  font-size: clamp(30px, 3.7vw, 52px);
  line-height: 1.24; font-weight: 900; letter-spacing: -0.015em;
  color: #f2f5f7; max-width: 22ch; margin: 0; text-wrap: initial;
}
.hero h1 .hero-accent { color: var(--h-amber); }

.hero p.lead {
  font-size: var(--fs-md); color: var(--h-dim); line-height: 1.9;
  max-width: 40ch; margin: 0;
}

.hero-search {
  display: flex; gap: var(--s-2); width: min(560px, 100%);
  margin-block-start: var(--s-2);
}
.hero-search .field-wrap { position: relative; flex: 1; }
.hero-search .field-wrap > i {
  position: absolute; inset-inline-start: var(--s-3); inset-block-start: 50%;
  transform: translateY(-50%); color: var(--h-dim); font-size: 14px; pointer-events: none;
}
.hero-search .input {
  min-height: 56px; width: 100%; padding-inline-start: calc(var(--s-3) * 2 + 14px);
  background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f2f5f7; border-radius: 12px; font-size: var(--fs-sm);
}
.hero-search .input::placeholder { color: rgba(150, 166, 180, 0.85); }
.hero-search .input:focus { border-color: var(--h-line); box-shadow: 0 0 0 3px rgba(57, 185, 216, 0.18); }
.hero-search .btn {
  min-height: 54px; flex-shrink: 0;
  color: #17120a; border-color: #b98b33;
  background: linear-gradient(180deg, #e3b350, #cc9a3d);
}
.hero-search .btn:hover:not(:disabled) { filter: brightness(1.06); background: linear-gradient(180deg, #e3b350, #cc9a3d); }

.hero-cta { display: flex; gap: var(--s-3); flex-wrap: wrap; align-items: center; margin-block-start: var(--s-1); }
.hero-cta .btn-primary {
  color: #061019; border-color: #2f9bb8;
  background: linear-gradient(180deg, #4fc3de, #37a7c4);
}
.hero-cta .btn-primary:hover:not(:disabled) { filter: brightness(1.06); background: linear-gradient(180deg, #4fc3de, #37a7c4); }
.hero-cta .btn-ghost {
  color: rgba(242, 245, 247, 0.9); background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.18);
}
.hero-cta .btn-ghost:hover:not(:disabled) { color: #fff; border-color: rgba(255, 255, 255, 0.32); background: rgba(255, 255, 255, 0.09); }
.hero-cta .btn-quiet { color: rgba(242, 245, 247, 0.72); }
.hero-cta .btn-quiet:hover:not(:disabled) { color: #fff; background: rgba(255, 255, 255, 0.08); }

/* نوار اعتماد پایین هیرو — فریم‌دار، خط جداکننده‌ی یکدست بین کارت‌ها */
.hero-strip {
  display: grid; grid-template-columns: 1fr; gap: 0;
  margin-block-start: var(--s-6);
  border: 1px solid var(--h-hair);
  border-radius: var(--r-3);
  background: var(--h-panel);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  overflow: hidden;
}
.hs-item {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-4);
}
/* موبایل (تک‌ستون): خط افقی بین ردیف‌ها */
.hs-item:not(:last-child) { border-block-end: 1px solid var(--h-hair); }
.hs-item > i {
  font-size: 18px; flex-shrink: 0;
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--h-hair); border-radius: 10px;
}
.hs-item:nth-child(odd) > i { color: var(--h-line); }
.hs-item:nth-child(even) > i { color: var(--h-amber); }
.hs-item b { display: block; font-size: var(--fs-sm); font-weight: 700; color: #f2f5f7; }
.hs-item span { font-size: var(--fs-xs); color: var(--h-dim); }

.hero-dots {
  position: absolute; inset-block-end: var(--s-4); inset-inline-start: clamp(var(--s-4), 5.5vw, 76px); z-index: 6;
  display: flex; gap: var(--s-2);
}
.hero-dots button {
  width: 8px; height: 8px; border-radius: 50%; padding: 0;
  background: rgba(242, 245, 247, 0.35); border: 0;
  transition: width var(--dur) var(--ease), background var(--dur) var(--ease);
}
.hero-dots button[aria-current='true'] { width: 22px; border-radius: var(--r-pill); background: var(--h-amber); }

@media (min-width: 980px) {
  .hero { padding-block: 136px var(--s-8); min-height: min(90vh, 820px); }
  .hero > .container {
    grid-template-columns: minmax(0, 560px) 1fr;
    grid-template-rows: 1fr auto;
    direction: ltr; gap: var(--s-6) var(--s-5);
  }
  .hero-content { direction: rtl; grid-column: 1; grid-row: 1; align-self: center; display: grid; gap: var(--s-4); }
  .hero-strip {
    grid-column: 1 / -1; grid-row: 2; direction: rtl; align-self: end;
    grid-template-columns: repeat(4, 1fr); margin: 0;
  }
  .hs-item { padding: var(--s-4) var(--s-5); }
  /* دسکتاپ: فقط خط عمودی بین کارت‌ها، بدون خط افقی */
  .hs-item:not(:last-child) { border-block-end: 0; border-inline-end: 1px solid var(--h-hair); }
  .hero-dots { inset-block-end: calc(var(--s-8) / 2 - 4px); }
}
@media (max-width: 979px) {
  .hero { padding-block: 104px var(--s-5); text-align: right; }
  .hero-media { width: 100%; clip-path: none; }
  .hero-slide.is-active { opacity: 0.3; }
  .hero-tag { display: none; }
  .hero-content { display: grid; gap: var(--s-4); }
  .hero-eyebrow { align-self: start; }
  /* دات‌ها بالا-چپ (RTL) زیرِ هدر — دیگر با کارتِ استریپ برخورد نمی‌کنند */
  .hero-dots {
    inset-block-end: auto; inset-inline-start: auto;
    inset-block-start: calc(var(--header-h) + var(--s-1));
    inset-inline-end: clamp(var(--s-4), 5vw, 28px);
  }
}
@media (min-width: 560px) and (max-width: 979px) {
  .hero-strip { grid-template-columns: 1fr 1fr; }
}

/* ---------- About band (معرفی) ---------- */
.about-band { display: grid; gap: var(--s-5); align-items: center; }
.about-band .media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--border); border-radius: var(--r-2); }
.about-band.no-media .media { display: none; }
.about-band ul { display: grid; gap: var(--s-2); margin-block-start: var(--s-4); }
.about-band li { display: flex; gap: var(--s-2); align-items: flex-start; color: var(--text-dim); font-size: var(--fs-sm); }
.about-band li i, .about-band li [class*='fa-'] { color: var(--accent-strong); margin-block-start: 4px; font-size: 12px; flex-shrink: 0; }
@media (min-width: 900px) { .about-band { grid-template-columns: 1fr 1fr; gap: var(--s-7); } }

/* ---------- Steps (فرآیند خرید) ---------- */
.steps { display: grid; gap: var(--s-4); grid-template-columns: 1fr; }
.step { position: relative; padding: var(--s-5); border: 1px solid var(--border); border-radius: var(--r-2); background: var(--surface-2); transition: border-color var(--dur) var(--ease), box-shadow var(--dur-in) var(--ease), transform var(--dur-in) var(--ease); }
.step:hover { border-color: var(--border-strong); box-shadow: var(--sh-2); transform: translateY(-3px); }
.step-n {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border-radius: var(--r-2); background: var(--brand-tint); color: var(--brand);
  margin-bottom: var(--s-3);
}
.step-n i, .step-n [class*='fa-'] { font-size: 19px; }
.step-count { display: block; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.08em; color: var(--brand); margin-bottom: 2px; }
.step h4 { font-size: var(--fs-md); margin-bottom: var(--s-1); }
.step p { font-size: var(--fs-sm); color: var(--text-dim); }
@media (prefers-reduced-motion: reduce) { .step:hover { transform: none; } }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Media gallery ---------- */
.media-gallery { display: grid; gap: var(--s-2); grid-template-columns: repeat(2, 1fr); grid-auto-rows: 46vw; grid-auto-flow: dense; }
.media-gallery a { position: relative; overflow: hidden; border-radius: var(--r-2); border: 1px solid var(--border); isolation: isolate; }
.media-gallery a.tall { grid-row: span 2; }
.media-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
.media-gallery a::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.66), transparent 55%); }
.media-gallery figcaption { position: absolute; inset-inline: var(--s-3); inset-block-end: var(--s-3); z-index: 1; color: #fff; font-size: var(--fs-xs); font-weight: 700; }
.media-gallery a:hover img { transform: scale(1.07); }
@media (prefers-reduced-motion: reduce) { .media-gallery a:hover img { transform: none; } }
@media (min-width: 700px) { .media-gallery { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 170px; } }
@media (min-width: 1000px) { .media-gallery { grid-auto-rows: 190px; } }

/* ---------- Gallery teaser (روی صفحه‌ی اصلی) ---------- */
.gallery-teaser { display: flex; flex-direction: column; gap: var(--s-4); align-items: flex-start; }
.gallery-teaser p { max-width: 62ch; }
.gallery-teaser-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2); width: 100%; }
.gallery-teaser-strip img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-2); border: 1px solid var(--border); }
@media (min-width: 700px) { .gallery-teaser-strip { grid-template-columns: repeat(6, 1fr); } }

/* ---------- Gallery page ---------- */
.gallery-tabs { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-5); }
.gallery-masonry { columns: 2 180px; column-gap: var(--s-3); }
.gallery-masonry figure {
  break-inside: avoid; margin-bottom: var(--s-3); position: relative;
  border: 1px solid var(--border); border-radius: var(--r-2); overflow: hidden; background: var(--surface-2);
}
.gallery-masonry img { width: 100%; display: block; transition: transform 600ms var(--ease); }
.gallery-masonry figure:hover img { transform: scale(1.05); }
.gallery-masonry figcaption {
  position: absolute; inset-inline: 0; inset-block-end: 0; padding: var(--s-3) var(--s-3) var(--s-2);
  color: #fff; font-size: var(--fs-xs); font-weight: 700;
  background: linear-gradient(0deg, rgba(0,0,0,.72), transparent);
}
.gallery-masonry figure.is-hidden { display: none; }
@media (prefers-reduced-motion: reduce) { .gallery-masonry figure:hover img { transform: none; } }
@media (min-width: 700px) { .gallery-masonry { columns: 3 220px; } }
@media (min-width: 1100px) { .gallery-masonry { columns: 4 240px; } }

/* ---------- Category grid ---------- */
.cat-grid { display: grid; gap: var(--s-3); grid-template-columns: repeat(2, 1fr); }
.cat-card {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  aspect-ratio: 3 / 2; padding: var(--s-4); border-radius: var(--r-2);
  border: 1px solid var(--border); background: var(--surface-2); overflow: hidden; isolation: isolate;
  transition: transform var(--dur-in) var(--ease), box-shadow var(--dur-in) var(--ease), border-color var(--dur) var(--ease);
}
.cat-card img { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; opacity: 0.92; transition: transform 600ms var(--ease); }
.cat-card::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(0,0,0,.74), rgba(0,0,0,.12) 62%, transparent); }
.cat-card .t { color: #fff; font-weight: 800; font-size: var(--fs-md); }
.cat-card .c { color: rgba(255,255,255,.72); font-size: var(--fs-xs); }
.cat-card:hover { border-color: var(--border-strong); transform: translateY(-3px); box-shadow: var(--sh-hover); }
.cat-card:hover img { transform: scale(1.06); }
@media (prefers-reduced-motion: reduce) { .cat-card:hover { transform: none; } .cat-card:hover img { transform: none; } }

/* حالت بدون‌تصویر — تمیز و عمدی، نه خالی */
.cat-card--noimg {
  background:
    radial-gradient(130% 120% at 100% 0%, var(--brand-tint), transparent 58%),
    linear-gradient(155deg, var(--surface-2), var(--surface-3));
}
.cat-card--noimg::before { content: none; }
.cat-card--noimg .t { color: var(--text); font-size: var(--fs-md); }
.cat-card--noimg .c { color: var(--text-dim); }
.cat-card-ic {
  position: absolute; inset-block-start: var(--s-4); inset-inline-end: var(--s-4); z-index: 0;
  font-size: 40px; line-height: 1;
  color: color-mix(in srgb, var(--brand) 60%, var(--text-faint));
  transition: transform 600ms var(--ease);
}
.cat-card--noimg:hover .cat-card-ic { transform: scale(1.08) rotate(-4deg); }
@media (prefers-reduced-motion: reduce) { .cat-card--noimg:hover .cat-card-ic { transform: none; } }
@media (min-width: 700px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .cat-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } }

/* ---------- Product grid ---------- */
.pgrid { display: grid; gap: var(--s-3); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .pgrid { gap: var(--s-4); grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .pgrid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1360px) { .pgrid.pgrid-wide { grid-template-columns: repeat(5, 1fr); } }

/* ---------- List page: filter sidebar + grid ---------- */
/* صفحه‌ی لیست/دسته — فاصله‌های ماژولار */
.list-page { padding-block: var(--s-4) var(--s-8); }
.page-head { margin-block: var(--s-2) var(--s-5); }
.page-head h1 { font-size: var(--fs-2xl); }
.page-head p { font-size: var(--fs-sm); margin-block-start: var(--s-2); max-width: 68ch; }
.list-layout { display: grid; gap: var(--s-5); }
.list-toolbar { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.panel-head.list-toolbar { align-items: revert; }
.list-toolbar .count { color: var(--text-dim); font-size: var(--fs-sm); font-weight: 700; }
.toolbar-sort { display: inline-flex; align-items: center; gap: var(--s-2); margin-inline-start: auto; }
.toolbar-sort > i { color: var(--text-faint); font-size: 13px; flex-shrink: 0; }
.toolbar-sort .select { width: auto; min-width: 150px; }
.filter-toggle { display: inline-flex; }

/* موبایل: تولبار استاندارد — شمارش در یک خط، فیلتر و مرتب‌سازی نصف‌نصف با عرض کامل */
@media (max-width: 640px) {
  .panel-head.list-toolbar { flex-wrap: wrap; gap: var(--s-2) var(--s-3); padding: var(--s-3) var(--s-4); }
  .list-toolbar .count { order: -1; width: 100%; }
  .list-toolbar .filter-toggle { flex: 1 1 0; justify-content: center; }
  .list-toolbar .toolbar-sort { flex: 1 1 0; margin-inline-start: 0; }
  .list-toolbar .toolbar-sort .select { flex: 1; width: 100%; min-width: 0; }
}

/* --- Filters panel (redesign) --- */
.filters { display: flex; flex-direction: column; gap: var(--s-2); }
.filters-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s-1); }
.filters-head strong { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--fs-md); }
.filters-head strong i { color: var(--brand); font-size: 14px; }

.active-filters { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-2); }
.fchip {
  display: inline-flex; align-items: center; gap: var(--s-1);
  padding: 3px var(--s-2) 3px var(--s-3); border-radius: var(--r-pill);
  background: var(--brand-tint); color: var(--brand);
  font-size: var(--fs-xs); font-weight: 700;
}
.fchip button { color: inherit; display: inline-flex; align-items: center; font-size: 11px; }
.fchip button:hover { opacity: 0.65; }

.filter-group { border: 1px solid var(--border); border-radius: var(--r-2); background: var(--surface); overflow: hidden; }
.filter-group > summary {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-3) var(--s-4); cursor: pointer; list-style: none;
  font-size: var(--fs-sm); font-weight: 700; user-select: none;
  transition: color var(--dur) var(--ease);
}
.filter-group > summary::-webkit-details-marker { display: none; }
.filter-group > summary:hover { color: var(--brand); }
.filter-group > summary .chev { font-size: 12px; color: var(--text-faint); transition: transform var(--dur) var(--ease); }
.filter-group[open] > summary { border-block-end: 1px solid var(--border); }
.filter-group[open] > summary .chev { transform: rotate(180deg); }
.fg-body { padding: var(--s-3) var(--s-4) var(--s-4); display: flex; flex-direction: column; gap: var(--s-3); }
.input-sm { min-height: 36px; font-size: var(--fs-sm); }

.filter-list { display: flex; flex-direction: column; gap: 2px; }
.filter-list.scroll { max-height: 240px; overflow-y: auto; margin-inline-end: calc(-1 * var(--s-2)); padding-inline-end: var(--s-2); }
.filter-empty { font-size: var(--fs-xs); color: var(--text-faint); padding: var(--s-2); }

.filter-opt {
  display: flex; align-items: center; gap: var(--s-2); position: relative;
  padding: var(--s-2); border-radius: var(--r-1); cursor: pointer;
  font-size: var(--fs-sm); color: var(--text-dim);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.filter-opt:hover { background: var(--surface-2); color: var(--text); }
.filter-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.filter-opt .dot {
  width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; position: relative;
  border: 1.5px solid var(--border-strong);
  transition: border-color var(--dur) var(--ease);
}
.filter-opt input:checked ~ .dot { border-color: var(--brand); }
.filter-opt input:checked ~ .dot::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--brand); }
.filter-opt input:checked ~ .lbl { color: var(--brand); font-weight: 700; }
.filter-opt input:focus-visible ~ .dot { box-shadow: var(--sh-focus); }
.filter-opt.is-child { padding-inline-start: calc(var(--s-2) + var(--s-5)); }
.filter-opt.is-child .lbl { color: var(--text-faint); }
.filter-opt.is-child input:checked ~ .lbl { color: var(--brand); }
.filter-opt.is-hidden { display: none; }

.price-range { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.price-range label { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-xs); color: var(--text-dim); }

.filter-row {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  border: 1px solid var(--border); border-radius: var(--r-2); background: var(--surface);
  padding: var(--s-3) var(--s-4); font-size: var(--fs-sm); font-weight: 700;
}

@media (min-width: 900px) {
  .list-layout { grid-template-columns: 268px minmax(0, 1fr); align-items: start; gap: var(--s-5); }
  /* سایدبار: چسبان، به‌اندازه‌ی محتوا (بدون اسکرول داخلی)؛ لیست‌های بلند خودشان اسکرول دارند */
  .filters {
    position: sticky; inset-block-start: calc(var(--header-h) + var(--s-3));
  }
  .filter-toggle { display: none; }
}
@media (max-width: 899px) {
  .filters {
    position: fixed; inset-block: 0; inset-inline-start: 0; width: min(340px, 90vw);
    background: var(--bg); border-inline-end: 1px solid var(--border-strong);
    z-index: var(--z-drawer); padding: var(--s-4); overflow-y: auto;
    transform: translateX(-100%); transition: transform var(--dur-in) var(--ease);
  }
  [dir='rtl'] .filters { transform: translateX(100%); }
  .filters.is-open { transform: none; box-shadow: var(--sh-2); }
  .filters-head { position: sticky; inset-block-start: calc(-1 * var(--s-4)); background: var(--bg); padding-block: var(--s-2); margin: calc(-1 * var(--s-2)) 0 var(--s-1); z-index: 1; }
}

/* ---------- iOS-style toggle ---------- */
.toggle { position: relative; display: inline-flex; flex-shrink: 0; width: 46px; height: 28px; }
.toggle input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.toggle-track {
  position: absolute; inset: 0; border-radius: var(--r-pill);
  background: var(--surface-3); border: 1px solid var(--border-strong);
  transition: background 240ms var(--ease), border-color 240ms var(--ease);
}
.toggle-thumb {
  position: absolute; inset-block-start: 2px; inset-inline-start: 2px;
  width: 22px; height: 22px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35), 0 0 1px rgba(0, 0, 0, 0.3);
  transition: transform 240ms var(--ease);
}
.toggle input:checked + .toggle-track { background: var(--accent); border-color: var(--accent-strong); }
.toggle input:checked + .toggle-track .toggle-thumb { transform: translateX(18px); }
[dir='rtl'] .toggle input:checked + .toggle-track .toggle-thumb { transform: translateX(-18px); }
.toggle input:focus-visible + .toggle-track { box-shadow: var(--sh-focus); }
@media (prefers-reduced-motion: reduce) { .toggle-thumb, .toggle-track { transition: none; } }

/* ---------- Product detail ---------- */
.pd-top { display: grid; gap: var(--s-6); }
.pd-summary { display: flex; flex-direction: column; gap: var(--s-4); }
.pd-summary h1 { font-size: var(--fs-2xl); }
.pd-meta { display: flex; gap: var(--s-3); flex-wrap: wrap; color: var(--text-dim); font-size: var(--fs-sm); }
.pd-variants { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.pd-buy { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-5); border: 1px solid var(--border); border-radius: var(--r-2); background: var(--surface); }
.pd-buy .row { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
#sections { margin-block-start: var(--s-6); padding-block-end: var(--s-4); }
.pd-section { padding-block-start: var(--s-6); border-block-start: 1px solid var(--border); }
.pd-section:first-child { border-block-start: 0; padding-block-start: 0; }
.pd-section > h2 { font-size: var(--fs-lg); margin-bottom: var(--s-4); }
.pd-desc { max-width: 68ch; }
.pd-desc p { margin-block: var(--s-3); }
.breadcrumb { display: flex; gap: var(--s-2); flex-wrap: wrap; font-size: var(--fs-xs); color: var(--text-dim); margin-block: 0 var(--s-3); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb span::after { content: '/'; margin-inline-start: var(--s-2); color: var(--text-faint); }
.breadcrumb span:last-child::after { content: none; }
@media (min-width: 900px) {
  .pd-top { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .pd-buy { position: sticky; inset-block-start: calc(var(--header-h) + var(--s-4)); }
}

/* ---------- Video ---------- */
.pd-video video { width: 100%; border-radius: var(--r-2); border: 1px solid var(--border); background: #000; }

/* ---------- Trust strip ---------- */
.trust-grid { display: grid; gap: var(--s-4); grid-template-columns: 1fr; }
.trust-card { display: flex; gap: var(--s-3); padding: var(--s-4); border: 1px solid var(--border); border-radius: var(--r-2); background: var(--surface); transition: border-color var(--dur) var(--ease), box-shadow var(--dur-in) var(--ease); }
.trust-card svg { width: 28px; height: 28px; color: var(--brand); flex-shrink: 0; }
.trust-card i, .trust-card [class*='fa-'] { font-size: 24px; color: var(--brand); flex-shrink: 0; }
.trust-card:hover { border-color: var(--border-strong); box-shadow: var(--sh-2); }
.trust-card h4 { font-size: var(--fs-base); margin-bottom: var(--s-1); }
.trust-card p { font-size: var(--fs-sm); color: var(--text-dim); }
@media (min-width: 640px) { .trust-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .trust-grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Checkout / quote form pages ---------- */
.form-page { display: grid; gap: var(--s-6); max-width: 900px; margin-inline: auto; }
.form-card { padding: var(--s-5); border: 1px solid var(--border); border-radius: var(--r-2); background: var(--surface); }
.summary-line { display: flex; justify-content: space-between; padding: var(--s-2) 0; font-size: var(--fs-sm); }
.summary-line.total { border-block-start: 1px solid var(--border); margin-block-start: var(--s-2); padding-block-start: var(--s-3); font-size: var(--fs-md); font-weight: 800; }
.form-row { display: grid; gap: var(--s-3); }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .form-page.two-col { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } }

/* ---------- Account ---------- */
.account-layout { display: grid; gap: var(--s-5); }
.account-nav { display: flex; gap: var(--s-2); overflow-x: auto; padding-block-end: var(--s-1); }
.account-nav a {
  display: inline-flex; align-items: center; gap: 5px;
  white-space: nowrap; padding: var(--s-2) var(--s-4); border-radius: 10px;
  border: 1px solid var(--border); font-size: var(--fs-sm); font-weight: 600; color: var(--text-dim);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.account-nav a i, .account-nav a [class*='fa-'] { font-size: 12px; opacity: 0.75; }
.account-nav a:hover { border-color: var(--border-strong); color: var(--text); }
.account-nav a.is-active { border-color: var(--brand); color: var(--brand); background: var(--brand-tint); }
.account-nav a.is-active i { opacity: 1; }

/* فرم‌های استاندارد پنل حساب — بدون تداخل فیلد/دکمه */
.form-grid { display: grid; gap: var(--s-4); grid-template-columns: 1fr; align-items: start; }
.form-grid .field { margin-bottom: 0; }
.form-grid .form-actions { grid-column: 1 / -1; display: flex; gap: var(--s-3); flex-wrap: wrap; margin-block-start: var(--s-1); }
.form-row .field { margin-bottom: 0; }
@media (min-width: 620px) { .form-grid { grid-template-columns: 1fr 1fr; } }

/* ردیف نشست فعال — طبقه‌بندی‌شده، فشرده */
.session-row {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) 0; border-block-end: 1px solid var(--border);
}
.session-row:last-child { border-block-end: 0; }
.session-row > i { font-size: 16px; color: var(--text-faint); flex-shrink: 0; width: 20px; text-align: center; }
.session-row .sr-main { min-width: 0; flex: 1; }
.session-row .sr-ua { font-size: var(--fs-sm); font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.session-row .sr-meta { font-size: var(--fs-xs); color: var(--text-dim); }
.session-row .sr-cur { color: var(--accent); font-weight: 700; }
@media (min-width: 900px) {
  .account-layout { grid-template-columns: 220px minmax(0, 1fr); align-items: start; }
  .account-nav { flex-direction: column; }
}

/* ---------- OTP / auth modal specifics ---------- */
.otp-input { text-align: center; letter-spacing: 0.5em; font-family: var(--font-mono); font-size: var(--fs-xl); }

/* ---------- Cart line ---------- */
.cart-line { display: grid; grid-template-columns: 56px 1fr auto; gap: var(--s-3); padding: var(--s-3) 0; border-block-end: 1px solid var(--border); }
.cart-line img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--r-1); }
.cart-line .nm { font-size: var(--fs-sm); font-weight: 700; line-height: 1.4; }
.cart-line .pr { font-family: var(--font-mono); font-size: var(--fs-sm); }
