/* =========================================================
   Dark Sistem – landing page
   RTL-first · Light (default) / Dark · Responsive
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  --font: "Vazirmatn", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --display: "Lalezar", "Vazirmatn", system-ui, sans-serif;
  --latin: "Poppins", "Vazirmatn", system-ui, sans-serif;

  --container: 1280px;
  --gutter: clamp(16px, 4vw, 48px);
  --header-h: 76px;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;

  /* Light theme (default) */
  --accent: #0a4dff;
  --accent-2: #3d7bff;
  --accent-soft: rgba(10, 77, 255, .1);
  --on-accent: #fff;
  --bg: #f2f5fd;
  --bg-hero: #f2f5fd;
  --surface: #ffffff;
  --surface-2: #eaeffb;
  --text: #0b1633;
  --text-strong: #0b1633;
  --muted: #5d6a8c;
  --line: #dbe3f5;
  --head-bg: rgba(255, 255, 255, .88);
  --shadow: 0 14px 34px -16px rgba(20, 45, 130, .28);
  --btn-bg: var(--accent);
  --btn-shadow: 0 10px 22px -10px rgba(10, 77, 255, .7);
  --media-bg: #f2f5fd;
  --red: #ff3b57;
  --star: #f5b301;
  --strip-gap: #f2f5fd;
  --hero-l2: var(--accent);
  --footer-bg: #ffffff;
}

/* Alternative: purple accent in light mode  ->  <html data-accent="purple"> */
:root[data-theme="light"][data-accent="purple"] {
  --accent: #6d3df0;
  --accent-2: #8b5cf6;
  --accent-soft: rgba(109, 61, 240, .1);
  --btn-shadow: 0 10px 22px -10px rgba(109, 61, 240, .7);
  --bg: #f6f3ff;
  --bg-hero: #f1edfd;
  --surface-2: #efeafd;
  --line: #e1d9fa;
}

:root[data-theme="dark"] {
  --accent: #8b5cf6;
  --accent-2: #a78bfa;
  --accent-soft: rgba(139, 92, 246, .16);
  --bg: #07061a;
  --bg-hero: #06051a;
  --surface: #0e0c25;
  --surface-2: #151236;
  --text: #ece9ff;
  --text-strong: #ffffff;
  --muted: #9a95c6;
  --line: rgba(139, 92, 246, .3);
  --head-bg: rgba(8, 7, 24, .86);
  --shadow: 0 14px 34px -16px rgba(0, 0, 0, .75);
  --btn-bg: linear-gradient(135deg, #7c3aed, #6d28d9);
  --btn-shadow: 0 10px 26px -8px rgba(124, 58, 237, .75);
  --strip-gap: #06051a;
  --media-bg: #06051a;
  --hero-l2: #a56dff;
  --footer-bg: #060516;
  color-scheme: dark;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  transition: background-color .25s, color .25s;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 200; padding: .5rem 1rem; background: var(--accent); color: var(--on-accent); border-radius: 8px; }
.skip-link:focus { top: 10px; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }

/* icons */
.i { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.i--sm { width: 16px; height: 16px; }
.i--star { width: 14px; height: 14px; fill: var(--star); stroke: var(--star); stroke-width: 1; }

.only-dark { display: none !important; }
:root[data-theme="dark"] .only-dark { display: flex !important; }
:root[data-theme="dark"] .only-light { display: none !important; }
.hl-dark { color: inherit; }
:root[data-theme="dark"] .hl-dark { color: var(--accent-2); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .75rem 1.6rem; border: 0; border-radius: 999px;
  background: var(--btn-bg); color: var(--on-accent);
  font-weight: 600; font-size: .95rem; line-height: 1.4;
  box-shadow: var(--btn-shadow);
  transition: transform .18s, filter .18s;
}
.btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--lg { padding: .95rem 2rem; font-size: 1.02rem; }
.btn--sm { padding: .55rem 1rem; font-size: .85rem; }
.btn--block { width: 100%; border-radius: 12px; }
.icon-btn {
  position: relative; display: inline-grid; place-items: center;
  width: 42px; height: 42px; border: 0; border-radius: 50%;
  background: transparent; color: var(--text);
  transition: background-color .18s, color .18s;
}
.icon-btn:hover { background: var(--accent-soft); color: var(--accent); }
.icon-btn:active { transform: scale(.94); }
.icon-btn:focus-visible, .main-nav a:focus-visible, .sub-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.icon-btn[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }

/* کاربر لاگین‌کرده: آیکون حساب جایش را به «نام و نام خانوادگی + خوش آمدید» می‌دهد.
   فقط نام کوتاه می‌شود؛ «خوش آمدید» همیشه کامل دیده می‌شود. */
.icon-btn.account-link.is-greeting { width: auto; padding-inline: .7rem; gap: .35rem; }
.icon-btn.account-link.is-greeting .i { display: none; }
.user-greet { display: inline-flex; align-items: baseline; gap: .28rem; font-size: .76rem; font-weight: 700; line-height: 1.7; color: var(--text-strong); white-space: nowrap; }
.user-greet[hidden] { display: none; }
.user-greet__name { display: block; max-width: clamp(4rem, 7vw, 7rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-greet__hello { flex: none; }
/* زیر ۱۲۰۰ پیکسل جای «نام + خوش آمدید» در یک ردیف با منو نیست؛ آیکون حساب (با نام در tooltip)
   برمی‌گردد تا هیچ‌وقت متن منو دو خطی یا سرریز نشود */
@media (max-width: 1199px) {
  .icon-btn.account-link.is-greeting { width: 42px; padding: 0; }
  .icon-btn.account-link.is-greeting .i { display: block; }
  .icon-btn.account-link.is-greeting .user-greet { display: none; }
}
.round-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
  border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  color: var(--accent); transition: background-color .18s, opacity .18s, border-color .18s;
}
.round-btn:hover:not(:disabled) { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.round-btn:disabled { opacity: .4; cursor: default; }

/* =========================================================
   Header (RTL: logo + nav on the right · search & icons on the left)
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--head-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s, background-color .2s;
}
.site-header.is-scrolled { box-shadow: 0 8px 24px -14px rgba(10, 20, 70, .35); }
.header__inner { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.5rem); height: var(--header-h); }
.brand img { height: 54px; width: auto; }
:root[data-theme="dark"] .brand img { filter: hue-rotate(38deg) saturate(1.1) brightness(1.15); }
.menu-toggle, .menu-close, .search-toggle { display: none; }

.main-nav { flex: none; }
.main-nav ul { display: flex; align-items: center; flex-wrap: nowrap; gap: clamp(1rem, 2.2vw, 2.2rem); }
.main-nav a, .sub-toggle {
  position: relative; display: inline-flex; align-items: center; gap: .3rem;
  padding: .5rem 0; border: 0; background: none; white-space: nowrap;
  font-size: .95rem; font-weight: 500; color: var(--text);
  transition: color .18s;
}
.main-nav a:hover, .sub-toggle:hover { color: var(--accent); }
.main-nav a.is-active { color: var(--accent); }
.main-nav a::after {
  content: ""; position: absolute; inset-inline: 0; bottom: -12px; height: 2px; border-radius: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: center; transition: transform .22s ease;
}
.main-nav a.is-active::after, .main-nav a:hover::after { transform: scaleX(1); }
.main-nav__head { display: none; }
.nav-mobile { display: none; }
.nav-mobile__label { display: inline-flex; align-items: center; gap: .5rem; }
.nav-mobile__badge.cart-badge { position: static; inset: auto; min-width: 20px; height: 20px; }
.has-sub { position: relative; }
.has-sub > .sub {
  position: absolute; top: calc(100% + 14px); inset-inline-start: -12px; min-width: 210px; z-index: 20;
  display: block; padding: .5rem; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s, transform .18s, visibility .18s;
}
.has-sub > .sub a { display: block; padding: .5rem .8rem; border-radius: 8px; font-size: .9rem; }
.has-sub > .sub a::after { display: none; }
.has-sub > .sub a:hover { background: var(--accent-soft); }
.has-sub:hover > .sub, .has-sub:focus-within > .sub, .has-sub.is-open > .sub { opacity: 1; visibility: visible; transform: none; }
.has-sub:hover .sub-toggle .i, .has-sub.is-open .sub-toggle .i { transform: rotate(180deg); }
.sub-toggle .i { transition: transform .2s; }

/* منوی دسته‌بندی‌ها (دسکتاپ): پنل عریض زیر هدر با کاشی‌های مرتب، نه یک لیست عمودی */
@media (min-width: 901px) {
  .main-nav { align-self: stretch; }
  .main-nav > ul { height: 100%; }
  .has-sub { position: static; align-self: stretch; display: flex; align-items: center; }
  .has-sub > .sub {
    inset-inline: 0; margin-inline: auto; top: 100%; width: min(1080px, calc(100% - var(--gutter) * 2)); min-width: 0;
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .6rem; padding: 1.1rem;
    border-radius: 0 0 var(--r-md) var(--r-md); border-top: 0;
    transform: translateY(8px);
  }
  .has-sub > .sub li { min-width: 0; }
  .has-sub > .sub a {
    display: flex; align-items: center; justify-content: space-between; gap: .6rem; height: 100%; min-height: 54px;
    padding: .7rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2);
    font-size: .88rem; font-weight: 600; line-height: 1.6; color: var(--text);
    transition: border-color .18s, background-color .18s, color .18s, transform .18s;
  }
  .has-sub > .sub a::after {
    content: ""; display: block; position: static; flex: none; width: 14px; height: 14px; inset: auto; background: currentColor; opacity: .45;
    transform: none; border-radius: 0;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 6-6 6 6 6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 6-6 6 6 6'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform .18s, opacity .18s;
  }
  .has-sub > .sub a:hover, .has-sub > .sub a:focus-visible { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); transform: translateY(-1px); }
  .has-sub > .sub a:hover::after { opacity: 1; transform: translateX(-3px); }
}
@media (min-width: 901px) and (max-width: 1199px) {
  .has-sub > .sub { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.header__actions { margin-inline-start: auto; display: flex; align-items: center; gap: .2rem; }
@media (min-width: 1200px) {
  .header__actions .account-link.is-greeting { border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); margin-inline-end: .35rem; }
  .header__actions .account-link.is-greeting:hover { border-color: var(--accent); }
}

/* بعد از ورود هم جعبه‌ی جستجو همیشه باز می‌ماند؛ فقط کمی جمع‌وجورتر می‌شود تا «خوش آمدید» جا شود */
@media (min-width: 1200px) {
  .site-header.has-user .search { width: clamp(170px, 15vw, 250px); }
  .site-header.has-user .header__inner { gap: clamp(.8rem, 1.4vw, 1.4rem); }
  .site-header.has-user .main-nav ul { gap: clamp(.85rem, 1.4vw, 1.4rem); }
}
.search {
  display: flex; align-items: center; gap: .5rem; width: clamp(190px, 22vw, 320px); height: 44px;
  padding-inline: 1rem; margin-inline-end: .6rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--muted);
  transition: border-color .18s, box-shadow .18s, background-color .18s;
}
.search:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.search:focus-within { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); color: var(--accent); }
.search .i { flex: none; width: 18px; height: 18px; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: .88rem; color: var(--text); }
.search input::-webkit-search-cancel-button { display: none; }
.search input::placeholder { color: var(--muted); }
.cart-badge {
  position: absolute; top: 1px; right: 0; min-width: 19px; height: 19px; padding-inline: 4px;
  display: grid; place-items: center; border-radius: 99px;
  background: var(--accent); color: var(--on-accent); font-size: .7rem; font-weight: 700; line-height: 1;
}
.cart-badge[hidden] { display: none; }
.theme-toggle { margin-inline-start: .2rem; }
.theme-toggle__sun { display: none; }
:root[data-theme="dark"] .theme-toggle__sun { display: block; }
:root[data-theme="dark"] .theme-toggle__moon { display: none; }
/* below the header (z 100): the drawer is inside the header's stacking context, so a higher backdrop would cover it */
.nav-backdrop { position: fixed; inset: 0; z-index: 99; background: rgba(5, 8, 30, .55); backdrop-filter: blur(2px); }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  --strip-w: clamp(280px, 30vw, 520px);
  --tile-w: clamp(118px, 10.3vw, 176px);
  --gap: 14px;
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: var(--strip-w) minmax(0, 29rem) 1fr; align-items: center;
  min-height: clamp(540px, 38.5vw, 680px);
  background: var(--bg-hero);
}
.hero__bg {
  position: absolute; inset: 8% 0 8% 0; z-index: -2;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14%, #000 86%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 14%, #000 86%, transparent 100%);
}
/* ---- hero slider: background images (one layer per slide, cross-fade) ---- */
.hero__bg-slide {
  position: absolute; inset: 0; pointer-events: none;
  background: left center / auto 100% no-repeat;
  opacity: 0; transform: scale(1.035); transform-origin: left center;
  transition: opacity .9s ease, transform 6s ease-out;
}
.hero__bg-slide.is-active { opacity: 1; transform: none; }
/* slide 1 – the original artwork (unchanged) */
.hero__bg-slide--1 { background-image: url("../img/back-light.webp"); }
:root[data-theme="dark"] .hero__bg-slide--1 { background-image: url("../img/back-dark.webp"); }
/* slides 2-3 load after the page is ready (JS adds .is-ready) so they never delay the first paint */
.hero.is-ready .hero__bg-slide--2 { background-image: url("../img/hero-insta-light.webp"); }
:root[data-theme="dark"] .hero.is-ready .hero__bg-slide--2 { background-image: url("../img/hero-insta-dark.webp"); }
.hero.is-ready .hero__bg-slide--3 { background-image: url("../img/hero-package-light.webp"); }
:root[data-theme="dark"] .hero.is-ready .hero__bg-slide--3 { background-image: url("../img/hero-package-dark.webp"); }
/* fade the right part so text & strip sit on a clean surface */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to left, var(--bg-hero) 0, var(--bg-hero) 52%, transparent 74%);
}

/* animated strip */
.hero__strip { position: relative; align-self: stretch; z-index: 1; }
.strip { position: absolute; inset: 0; display: none; }
:root[data-theme="light"] .strip--light, :root[data-theme="dark"] .strip--dark { display: block; }
.strip__cols {
  position: absolute; top: 50%; left: 50%;
  width: calc(var(--tile-w) * 2 + var(--gap)); height: 230%;
  display: flex; gap: var(--gap);
  transform: translate(-50%, -50%) rotate(16deg);
}
.strip__col { width: var(--tile-w); flex: none; animation: strip-up 36s linear infinite; will-change: transform; }
/* دو نوار خلاف هم: سمت راست (اولین فرزند در چیدمان RTL) از بالا به پایین، سمت چپ از پایین به بالا */
.strip__col--a { animation-name: strip-down; }
.strip__col--b { margin-top: -90px; }
.strip__col a {
  display: block; box-sizing: border-box; padding: 14px; background: var(--media-bg); margin-bottom: var(--gap); overflow: hidden;
  border: 1.5px solid #a56dff; border-radius: 14px;
  box-shadow: 0 0 10px rgba(165, 109, 255, .55), inset 0 0 12px rgba(165, 109, 255, .25);
}
:root[data-theme="light"] .strip__col a { border-color: #8b5cf6; box-shadow: 0 0 10px rgba(139, 92, 246, .45), inset 0 0 10px rgba(139, 92, 246, .18); }
.strip__col img {
  width: 100%; aspect-ratio: 1 / 1.06; object-fit: contain; display: block;
  background: transparent;
}
/* 3 identical sets -> shifting by 1/3 loops seamlessly in both directions */
@keyframes strip-up { from { transform: translateY(0); } to { transform: translateY(-33.3333%); } }
@keyframes strip-down { from { transform: translateY(-33.3333%); } to { transform: translateY(0); } }

/* content */
.hero__content { position: relative; z-index: 2; padding-block: 3rem 4.5rem; padding-inline: 1.5rem; }
.hero__kicker { font-size: clamp(.95rem, 1.35vw, 1.15rem); color: var(--muted); font-weight: 500; }
:root[data-theme="light"] .hero__kicker { color: #243a82; }
.hero h1, .hero .hero__title { font-family: var(--display); font-weight: 400; line-height: 1.12; margin-block: .6rem 1rem; font-size: clamp(3rem, 5.4vw, 5rem); letter-spacing: -.01em; }
.hero__l1, .hero__l2 { display: block; }
.hero__l1 { position: relative; color: #0d1c4a; width: fit-content; }
:root[data-theme="dark"] .hero__l1 { color: #f2f0ff; }
.hero__l1::before {
  content: ""; position: absolute; z-index: -1; inset: 22% -6% 8% -4%;
  background: linear-gradient(100deg, rgba(124, 58, 237, 0) 0, rgba(124, 58, 237, .5) 35%, rgba(124, 58, 237, .18) 100%);
  transform: skewX(-12deg); filter: blur(1px);
}
:root[data-theme="light"] .hero__l1::before {
  background: linear-gradient(100deg, rgba(139, 92, 246, 0) 0, rgba(139, 92, 246, .42) 35%, rgba(139, 92, 246, .16) 100%);
}
.hero__l2 { color: var(--hero-l2); }
:root[data-theme="dark"] .hero__l2 { background: linear-gradient(180deg, #c19bff, #8b4dff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__text { max-width: 30rem; font-size: clamp(.95rem, 1.2vw, 1.05rem); color: var(--text); opacity: .9; line-height: 1.95; }
.hero__brands { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.15rem; margin-block: 1.5rem 1.8rem; }

/* ---- hero slider: text slides ---- */
/* Only slide 1 takes part in layout, so the hero keeps exactly its original size; slides 2-3 overlay it. */
.hero__slides { position: relative; }
.hero__slide + .hero__slide { position: absolute; inset: 0 0 auto 0; }
.hero__slide {
  min-width: 0;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .45s ease, visibility 0s linear .45s;
}
.hero__slide.is-active { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .6s ease .3s, visibility 0s; }
.hero__slide > * { transform: translateY(16px); transition: transform .45s ease; }
.hero__slide.is-active > * { transform: none; transition: transform .7s cubic-bezier(.2, .7, .2, 1) calc(.3s + var(--i, 0) * .07s); }
.hero__slide > :nth-child(2) { --i: 1; } .hero__slide > :nth-child(3) { --i: 2; }
.hero__slide > :nth-child(4) { --i: 3; } .hero__slide > :nth-child(5) { --i: 4; }
/* feature words used instead of brand wordmarks on slides 2-3 */
.hero__brands--tags { gap: .55rem 1.3rem; }
.hero__brands--tags li { gap: .5rem; font-size: .9rem; font-weight: 600; color: var(--text); white-space: nowrap; }
.hero__brands--tags li::before { content: ""; width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }

/* ---- hero slider: dots (centered under the artwork) ---- */
.hero__dots {
  position: absolute; z-index: 4; bottom: 3.5rem; left: calc((100% - var(--strip-w) - 29rem) / 2); transform: translateX(-50%);
  display: flex; align-items: center; gap: .1rem; padding: .2rem .45rem; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
@supports (background: color-mix(in srgb, red 50%, transparent)) {
  .hero__dots { background: color-mix(in srgb, var(--surface) 72%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
}
.hero__dot { position: relative; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 99px; background: none; cursor: pointer; }
.hero__dot::before, .hero__dot::after { content: ""; grid-area: 1 / 1; height: 10px; border-radius: 99px; transition: width .35s ease, background-color .25s ease; }
.hero__dot::before { width: 10px; background: color-mix(in srgb, var(--text) 30%, transparent); }
@supports not (background: color-mix(in srgb, red 50%, transparent)) { .hero__dot::before { background: var(--line); } }
.hero__dot:hover::before { background: var(--accent-2); }
.hero__dot.is-active::before { width: 34px; background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.hero__dot::after { width: 34px; background: var(--accent); transform: scaleX(0); transform-origin: right center; opacity: 0; }
.hero__dot.is-active::after { opacity: 1; transform: scaleX(1); animation: hero-progress var(--hero-interval, 5s) linear; }
.hero:not(.is-autoplay) .hero__dot.is-active::after { animation: none; }
.hero.is-paused .hero__dot.is-active::after { animation-play-state: paused; }
@keyframes hero-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hero__brands > li { display: flex; align-items: center; }
.hero__brands .wm { font-size: .88rem; opacity: .85; }
.more-brands a { color: var(--accent-2); font-size: .8rem; font-weight: 500; display: inline-flex; gap: .3rem; align-items: center; }

/* brand wordmarks (text-based stand-ins – swap with real SVG logos) */
.wm { font-family: var(--latin); color: var(--text); white-space: nowrap; direction: ltr; line-height: 1; }
.wm--pioneer { font-style: italic; font-weight: 800; letter-spacing: -.02em; }
.wm--jbl { font-weight: 800; letter-spacing: -.01em; transform: scaleX(.9); }
.wm--alpine { font-weight: 700; font-style: italic; letter-spacing: .02em; }
.wm--alpine span { letter-spacing: -.12em; margin-inline-end: .15em; opacity: .8; }
.wm--kenwood { font-weight: 500; letter-spacing: .06em; }
.wm--sony { font-family: Georgia, "Times New Roman", serif; font-weight: 700; letter-spacing: .12em; }
.wm--rockford { font-weight: 700; font-style: italic; font-size: .8em; letter-spacing: -.01em; }
.wm--audison { font-weight: 500; letter-spacing: .02em; text-transform: lowercase; }

/* features bar */
.features {
  position: relative; z-index: 3; display: grid; grid-template-columns: repeat(5, 1fr);
  margin-top: -34px; padding: 1.1rem .5rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.feature { display: flex; align-items: center; gap: .85rem; padding: .35rem 1.2rem; }
.feature + .feature { border-inline-start: 1px solid var(--line); }
.feature__icon {
  display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 50%;
  color: var(--accent); background: var(--accent-soft); border: 1px solid var(--line);
}
:root[data-theme="dark"] .feature__icon { border-color: var(--accent); background: transparent; }
.feature__text { display: flex; flex-direction: column; line-height: 1.45; }
.feature__text strong { font-size: .92rem; font-weight: 700; color: var(--text-strong); }
.feature__text small { font-size: .78rem; color: var(--muted); }

/* =========================================================
   Sections
   ========================================================= */
.section { padding-block: clamp(2.5rem, 5vw, 4.5rem) 0; }
.section--tight { padding-top: clamp(1.8rem, 3vw, 2.5rem); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
.eyebrow { font-family: var(--latin); font-size: .72rem; letter-spacing: .14em; color: var(--accent); font-weight: 600; }
.eyebrow--accent { font-family: var(--font); letter-spacing: 0; font-size: .85rem; }
.section-head h2, .reviews h2, .services h2 { font-size: clamp(1.4rem, 2.6vw, 1.95rem); font-weight: 800; line-height: 1.4; color: var(--text-strong); }
.lead { font-size: .9rem; color: var(--muted); margin-top: .15rem; }
.carousel-ctrl { display: flex; align-items: center; gap: .55rem; flex: none; }

/* pager */
.pager { display: flex; align-items: center; gap: .4rem; }
.pager:empty { display: none; }
.pager--num button {
  min-width: 34px; height: 34px; padding-inline: .5rem; border-radius: 99px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); font-size: .75rem; font-family: var(--latin); transition: all .18s;
}
.pager--num button[aria-current="true"] { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.pager--dots { justify-content: center; margin-top: 1rem; }
.pager--dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: var(--line); transition: all .2s; }
.pager--dots button[aria-current="true"] { width: 22px; border-radius: 99px; background: var(--accent); }

/* generic track (scroll-snap carousel) */
.track {
  --gap: 16px; --per: 4;
  display: flex; gap: var(--gap); overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none; padding-block: 8px 34px; margin-block: -8px -34px;
}
.track::-webkit-scrollbar { display: none; }
.track > * { flex: 0 0 calc((100% - (var(--per) - 1) * var(--gap)) / var(--per)); scroll-snap-align: start; min-width: 0; }

/* category cards */
.track--cats { --per: 6; }
.cat-card a {
  display: flex; flex-direction: column; height: 100%; padding: 10px 10px 14px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); box-shadow: var(--shadow);
  transition: transform .2s, border-color .2s;
}
:root[data-theme="dark"] .cat-card a { background: linear-gradient(180deg, #14102f, #0a0820); }
.cat-card a:hover { transform: translateY(-3px); border-color: var(--accent); }
.cat-card__img { display: block; aspect-ratio: 5 / 4; border-radius: 10px; overflow: hidden; background: var(--media-bg); }
.cat-card__img img { width: 100%; height: 100%; object-fit: cover; -webkit-mask-image: linear-gradient(#000 80%, transparent); mask-image: linear-gradient(#000 80%, transparent); }
.cat-card h3 { margin: .8rem .3rem .2rem; font-size: .98rem; font-weight: 700; color: var(--text-strong); }
.cat-card__more { display: inline-flex; align-items: center; gap: .3rem; margin-inline: .3rem; font-size: .76rem; color: var(--muted); transition: color .18s; }
.cat-card a:hover .cat-card__more { color: var(--accent); }

/* brands banner (dark panel in both themes) */
.brand-banner {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: center; gap: 2rem;
  min-height: 230px; padding: 2rem clamp(1.2rem, 3vw, 2.5rem);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: #04030f; color: #f3f1ff;
}
.brand-banner__car {
  position: absolute; z-index: -1; top: 0; left: 0; height: 100%; width: auto; max-width: none;
  -webkit-mask-image: linear-gradient(to right, #000 70%, transparent); mask-image: linear-gradient(to right, #000 70%, transparent);
}
.brand-banner h2 { font-size: clamp(1.25rem, 2.4vw, 1.8rem); font-weight: 800; line-height: 1.6; color: #fff; }
.brand-banner p { margin-block: .5rem 1.1rem; font-size: .85rem; color: #bdb8e6; max-width: 26rem; }
.brand-banner .btn { background: linear-gradient(135deg, #7c3aed, #6d28d9); box-shadow: 0 10px 24px -8px rgba(124, 58, 237, .8); }
.brand-grid { max-width: 420px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6rem 1rem; justify-items: center; align-items: center; }
.brand-grid .wm { color: #fff; font-size: clamp(.95rem, 1.6vw, 1.3rem); opacity: .92; }
.brand-grid .wm--rockford { font-size: clamp(.8rem, 1.2vw, 1rem); }
.brand-grid .more-brands a { color: #b79bff; }

/* product cards */
.track--products { --per: 4; --gap: 18px; }
.p-card {
  position: relative; display: flex; flex-direction: column; padding: 12px 12px 14px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow);
}
:root[data-theme="dark"] .p-card { background: linear-gradient(180deg, #120f2e, #0a0820); }
.p-card__top { position: absolute; z-index: 2; inset: 20px 20px auto 20px; display: flex; align-items: center; gap: .4rem; }
.badge { padding: .18rem .6rem; border-radius: 99px; font-size: .72rem; font-weight: 700; color: #fff; line-height: 1.5; }
.badge--off { background: var(--red); }
.badge--hot { background: var(--accent); }
:root[data-theme="dark"] .badge--hot { background: #7c3aed; }
.fav { margin-inline-start: auto; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(8, 8, 30, .45); color: #d9d4ff; transition: all .18s; }
.fav .i { width: 18px; height: 18px; }
.fav:hover { background: rgba(8, 8, 30, .7); color: #fff; }
.fav[aria-pressed="true"] { color: var(--red); }
.fav[aria-pressed="true"] .i { fill: var(--red); }
/* تصویر محصول بدون پس‌زمینه است؛ کل تصویر داخل کادر جا می‌شود (برش نمی‌خورد) */
.p-card__img { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; padding: 10px; border-radius: 12px; overflow: hidden; background: var(--media-bg); }
.p-card__img img { width: 100%; height: 100%; object-fit: contain; object-position: center; background: transparent; transition: transform .3s; }
.p-card__out {
  position: absolute; z-index: 2; inset-inline-end: 10px; bottom: 10px;
  padding: .18rem .65rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); box-shadow: 0 2px 8px rgba(10, 20, 70, .08);
  font-size: .72rem; font-weight: 700; line-height: 1.7; pointer-events: none;
}
.p-card:hover .p-card__img img { transform: scale(1.04); }
.p-card__name { margin-top: .9rem; font-family: var(--latin); font-size: .95rem; font-weight: 600; text-align: right; color: var(--text-strong); line-height: 1.5; }
.p-card__name a:hover { color: var(--accent); }
.p-card__sub { font-family: var(--latin); font-size: .78rem; text-align: right; color: var(--muted); }
.p-card__rating { display: flex; align-items: center; gap: .4rem; margin-top: .4rem; font-size: .76rem; color: var(--muted); }
.stars { display: inline-flex; gap: 1px; direction: ltr; }
.p-card__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: .3rem .7rem; margin-block: .6rem .9rem; }
.p-card__price strong { font-size: 1.02rem; font-weight: 800; color: var(--text-strong); }
.p-card__price small { font-size: .75rem; font-weight: 500; color: var(--muted); }
.p-card__price del { font-size: .8rem; color: var(--muted); opacity: .8; }
.p-card .btn { margin-top: auto; }

/* services + reviews  (services on the right, reviews on the left) */
.section--split { padding-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.split { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: stretch; }
.services {
  position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; min-height: 250px;
  padding: 1.8rem clamp(1.2rem, 3vw, 2.2rem); border: 1px solid var(--line); border-radius: var(--r-lg);
  background: #04030f; color: #f3f1ff; box-shadow: var(--shadow);
}
.services__media { position: absolute; inset: 0; z-index: -1; }
.services__media img { width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.services__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to left, rgba(4, 3, 15, .96) 0, rgba(4, 3, 15, .88) 38%, rgba(4, 3, 15, .3) 68%, transparent 100%); }
.services__body { width: min(100%, 17.5rem); }
.services h2 { color: #fff; margin-bottom: .6rem; font-size: clamp(1.25rem, 2vw, 1.6rem); white-space: nowrap; }
.services__body li { display: flex; align-items: center; gap: .8rem; padding-block: .5rem; font-size: .92rem; font-weight: 500; color: #ece9ff; }
.services__icon { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; border: 1px solid rgba(167, 139, 250, .45); background: rgba(10, 8, 30, .6); color: #b79bff; }
.services__icon .i { width: 16px; height: 16px; }

.reviews {
  position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: center;
  padding: clamp(1.1rem, 3vw, 2rem); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow);
  background: #f2f5fd url("../img/reviews-bg-light.webp") center / cover no-repeat;
}
:root[data-theme="dark"] .reviews { background-color: #06051a; background-image: url("../img/reviews-bg-dark.webp"); }
.review-slider { position: relative; margin-top: 1.4rem; }
.track--reviews { --per: 1; --gap: 0px; }
.review {
  padding: 1.3rem 1.5rem 1.4rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow);
}
.review { background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
:root[data-theme="dark"] .review { background: rgba(14, 11, 38, .78); }
.review header { display: flex; align-items: center; gap: .75rem; }
.avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: #fff; font-weight: 700; }
.review header strong { font-size: .95rem; color: var(--text-strong); }
.review .stars { margin-inline-start: auto; }
.review p { margin-top: .8rem; font-size: .9rem; line-height: 1.95; color: var(--text); opacity: .9; }
.round-btn--side { position: absolute; top: 50%; translate: 0 -50%; z-index: 2; width: 36px; height: 36px; box-shadow: var(--shadow); }
.round-btn--r { right: -14px; }
.round-btn--l { left: -14px; }

/* =========================================================
   Footer (RTL: brand on the right … newsletter on the left)
   ========================================================= */
.site-footer { margin-top: 0; background: var(--footer-bg); border-top: 1px solid var(--line); }
.footer__grid { display: grid; grid-template-columns: 1.3fr 1fr .8fr 1.25fr; gap: clamp(1.5rem, 3vw, 3rem); padding-block: 3rem 2.4rem; }
.flogo { display: inline-flex; align-items: center; gap: .7rem; }
.flogo img { height: 66px; width: auto; }
:root[data-theme="dark"] .flogo img { filter: hue-rotate(38deg) saturate(1.1) brightness(1.15); }
.flogo__text { display: flex; flex-direction: column; line-height: 1.15; direction: ltr; }
.flogo__text strong { font-family: var(--latin); font-size: 1.15rem; font-weight: 700; letter-spacing: .02em; color: var(--text-strong); }
.flogo__text small { font-family: var(--latin); font-size: .55rem; letter-spacing: .16em; color: var(--muted); }
.footer__brand p { margin-block: 1rem; font-size: .86rem; line-height: 2; color: var(--muted); max-width: 22rem; }
.social { display: flex; gap: .6rem; }
.social a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); color: var(--muted); transition: all .18s; }
.social a:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.social .i { width: 17px; height: 17px; }
.footer__col h3 { margin-bottom: 1rem; font-size: 1rem; font-weight: 700; color: var(--text-strong); }
/* link columns turn into accordions on phones (main.js adds .has-acc); elsewhere the toggle is a plain heading */
.footer__toggle { display: flex; align-items: center; justify-content: space-between; gap: .6rem; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: start; pointer-events: none; }
.footer__chev { display: none; flex: none; color: var(--muted); transition: transform .2s; }
.footer__col p { font-size: .84rem; color: var(--muted); }
.contact li, .links li { display: flex; align-items: center; gap: .6rem; padding-block: .32rem; font-size: .86rem; color: var(--muted); }
.contact .i { width: 16px; height: 16px; color: var(--text); }
.contact a:hover, .links a:hover { color: var(--accent); }
.newsletter { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .8rem; }
.newsletter input { flex: 1 1 160px; min-width: 0; height: 42px; padding-inline: .9rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font-size: .84rem; }
.newsletter input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.newsletter.has-error input { border-color: var(--red, #e11d48); box-shadow: 0 0 0 3px rgba(225, 29, 72, .12); }
.newsletter .btn.is-loading { opacity: .65; cursor: progress; }
.newsletter__msg { flex: 1 1 100%; margin: 0; font-size: .78rem; line-height: 1.7; color: var(--red, #e11d48); }
.newsletter__msg[hidden] { display: none; }

/* اعلان کوتاه پایین صفحه */
.site-toast {
  position: fixed; z-index: 400; inset-inline: 0; bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)); margin-inline: auto;
  display: flex; align-items: center; gap: .6rem; width: fit-content; max-width: calc(100vw - 2rem); padding: .8rem 1.1rem;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text-strong);
  font-size: .88rem; font-weight: 600; line-height: 1.7; box-shadow: var(--shadow), 0 18px 40px -18px rgba(0, 0, 0, .45);
  opacity: 0; visibility: hidden; transform: translateY(16px); pointer-events: none;
  transition: opacity .22s, transform .22s, visibility .22s;
}
.site-toast.is-show { opacity: 1; visibility: visible; transform: none; }
.site-toast .i { flex: none; width: 20px; height: 20px; }
.site-toast--ok { border-color: rgba(16, 185, 129, .55); }
.site-toast--ok .i { color: #10b981; }
.site-toast--error { border-color: rgba(225, 29, 72, .55); }
.site-toast--error .i { color: #e11d48; }
@media (prefers-reduced-motion: reduce) { .site-toast { transition: none; } }
.footer__bottom { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.1rem; border-top: 1px solid var(--line); font-size: .78rem; color: var(--muted); }
.footer__bottom ul { display: flex; gap: 1.2rem; }
.footer__bottom a:hover { color: var(--accent); }
.footer__credits { flex-wrap: wrap; align-items: center; gap: .3rem 1rem; }
.footer__credit-names { display: inline-flex; align-items: center; gap: .35rem; }
.footer__credit-note { position: relative; padding-inline-start: 1rem; }
.footer__credit-note::before { content: ""; position: absolute; inset-inline-start: 0; top: 15%; bottom: 15%; width: 1px; background: var(--line); }

.to-top {
  position: fixed; z-index: 90; bottom: 20px; inset-inline-end: 20px; display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: 50%; border: 1px solid var(--accent); background: var(--surface); color: var(--accent); box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: all .22s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--accent); color: var(--on-accent); }

/* ---- product rows with 6 items (no arrows): grid on tablet/desktop, swipe track on mobile ---- */
.section-head > .btn { flex: none; }
@media (max-width: 480px) {
  .section-head:has(> .btn) { flex-wrap: wrap; align-items: flex-start; }
  .section-head:has(> .btn) > div { flex: 1 1 100%; }
}
@media (min-width: 768px) {
  .track--six { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; overflow: visible; scroll-snap-type: none; }
  .track--six > * { flex: none; }
}
@media (min-width: 1280px) {
  .track--six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  .track--six .p-card__top { inset: 16px 16px auto 16px; flex-wrap: wrap; }
  .track--six .p-card .btn { padding-inline: .4rem; gap: .35rem; font-size: .78rem; white-space: nowrap; }
  .track--six .p-card .btn .i { width: 17px; height: 17px; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1280px) {
  .track--cats { --per: 5; }
  .feature { padding-inline: .8rem; gap: .65rem; }
  .feature__icon { width: 40px; height: 40px; }
}

@media (max-width: 1100px) {
  .hero { --strip-w: clamp(240px, 32vw, 340px); grid-template-columns: var(--strip-w) minmax(0, 1fr); }
  .hero::before { background: linear-gradient(to left, var(--bg-hero) 0, var(--bg-hero) 58%, transparent 86%); }
  .track--cats { --per: 4; }
  .track--products { --per: 3; }
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); }
  .features { grid-template-columns: repeat(3, 1fr); row-gap: .8rem; }
  .feature:nth-child(4) { border-inline-start: 0; }
  .brand-banner { grid-template-columns: minmax(0, 1fr); }
  .brand-banner__car { left: 0; opacity: .5; }
}

/* tablet / mobile navigation */
@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .menu-toggle, .menu-close, .search-toggle { display: inline-grid; }
  .brand img { height: 44px; }
  .header__inner { gap: .5rem; }
  .brand { margin-inline-end: auto; }
  .header__actions { margin-inline-start: 0; }

  /* The header's backdrop-filter made the header the containing block of the fixed drawer (it collapsed to the
     header's height). Keep the blur on a pseudo-element instead so the drawer is positioned against the viewport. */
  .site-header { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .site-header::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: var(--head-bg); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  }

  .main-nav {
    position: fixed; z-index: 150; inset-block: 0; inset-inline-start: 0; width: min(86vw, 340px);
    padding: 1rem 1.2rem calc(2rem + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-inline-end: 1px solid var(--line);
    overflow-y: auto; overscroll-behavior: contain; transform: translateX(105%); visibility: hidden;
    transition: transform .28s ease, visibility 0s linear .28s;
  }
  .main-nav.is-open { transform: none; visibility: visible; box-shadow: 0 0 60px rgba(0, 0, 0, .4); transition: transform .28s ease, visibility 0s; }
  .main-nav__head { display: flex; align-items: center; justify-content: space-between; padding-bottom: .8rem; margin-bottom: .6rem; border-bottom: 1px solid var(--line); font-weight: 700; }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav a, .sub-toggle { width: 100%; padding: .9rem .2rem; font-size: 1rem; justify-content: space-between; border-bottom: 1px solid var(--line); }
  .main-nav a.is-active::after, .main-nav a:hover::after { display: none; }
  .has-sub > .sub { position: static; display: none; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: transparent; padding: 0 .8rem; }
  .has-sub.is-open > .sub { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; padding: .6rem .2rem .9rem; }
  .has-sub > .sub a { padding: .65rem .7rem; font-size: .88rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); justify-content: flex-start; }
  .has-sub:hover > .sub { display: none; }
  .has-sub.is-open:hover > .sub { display: grid; }

  .search {
    position: absolute; inset-inline: var(--gutter); top: calc(100% + 8px); width: auto; margin: 0; background: var(--surface);
    box-shadow: var(--shadow); display: none; z-index: 5;
  }
  .site-header.is-search-open .search { display: flex; }

  /* Hero: stacked */
  .hero { display: flex; flex-direction: column-reverse; align-items: stretch; min-height: 0; padding-top: clamp(200px, 52vw, 360px); --tile-w: 124px; --gap: 10px; }
  .hero__bg { inset: 0 0 auto 0; height: clamp(220px, 58vw, 400px); -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent); mask-image: linear-gradient(to bottom, #000 72%, transparent); }
  .hero::before { background: linear-gradient(to bottom, transparent 0, transparent clamp(80px, 24vw, 200px), var(--bg-hero) clamp(200px, 50vw, 360px)); }
  .hero__content { padding: 0 var(--gutter) 1.6rem; text-align: right; }
  .hero__dots { top: calc(clamp(200px, 52vw, 360px) - 34px); bottom: auto; left: 50%; }
  .hero h1, .hero .hero__title { font-size: clamp(2.8rem, 12vw, 4.4rem); }
  .hero__strip { height: 172px; overflow: hidden; margin-bottom: 2.2rem; }
  .strip { position: absolute; inset: 0; }
  .strip__cols { position: absolute; inset: 0; width: auto; height: auto; transform: none; flex-direction: column; gap: var(--gap); }
  .strip__col { width: max-content; height: calc(50% - var(--gap) / 2); display: flex; gap: var(--gap); animation: strip-x 32s linear infinite; }
  /* موبایل: نوارها افقی می‌شوند و مانند قبل ردیف اول و دوم خلاف هم جابه‌جا می‌شوند */
  .strip__col--a { animation-name: strip-x; }
  .strip__col--b { margin-top: 0; animation-direction: reverse; }
  .strip__col a { margin: 0; padding: 10px; }
  .strip__col img { width: 100px; height: 100%; aspect-ratio: auto; margin: 0; }
  @keyframes strip-x { to { transform: translateX(33.3333%); } }
  .features { margin-top: 0; }

  .track--cats { --per: 3.2; }
  .track--products { --per: 2.2; }
  .services { min-height: 300px; }
}

@media (max-width: 680px) {
  .hide-xs { display: none; }
  .main-nav .nav-mobile { display: block; }
  .section-head { align-items: flex-end; }
  .carousel-ctrl .round-btn { width: 36px; height: 36px; }
  .pager--num { display: none; }
  .track--cats { --per: 2.15; --gap: 12px; }
  .track--products { --per: 1.35; --gap: 14px; }
  .features { grid-template-columns: 1fr 1fr; padding: .6rem; }
  .feature { padding: .6rem .5rem; border: 0 !important; }
  .feature:last-child { grid-column: 1 / -1; }
  .brand-grid { grid-template-columns: repeat(2, 1fr); gap: 1.2rem 1rem; }
  .brand-banner { padding: 1.5rem 1.2rem; }
  .footer__grid { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; padding-block: 2.2rem 1.6rem; }
  .site-footer.has-acc .footer__grid { gap: 0; }
  .site-footer.has-acc .footer__brand { padding-bottom: 1.4rem; }
  .site-footer.has-acc .footer__news { padding-top: 1.6rem; }
  .site-footer.has-acc .footer__acc { border-top: 1px solid var(--line); }
  .site-footer.has-acc .footer__acc + .footer__acc { border-top: 0; }
  .site-footer.has-acc .footer__acc h3 { margin: 0; border-bottom: 1px solid var(--line); }
  .site-footer.has-acc .footer__toggle { min-height: 54px; pointer-events: auto; cursor: pointer; }
  .site-footer.has-acc .footer__chev { display: block; }
  .site-footer.has-acc .footer__acc.is-open .footer__chev { transform: rotate(180deg); color: var(--accent); }
  .site-footer.has-acc .footer__panel { display: none; padding-block: .7rem .5rem; }
  .site-footer.has-acc .footer__acc.is-open .footer__panel { display: block; }
  .footer__bottom { flex-direction: column-reverse; align-items: stretch; gap: .8rem; padding-inline-end: 4rem; }
  .footer__bottom p { line-height: 1.9; }
  .footer__credits { flex-direction: row; gap: .2rem .7rem; line-height: 1.9; }
  .footer__credit-lead, .footer__credit-names { flex: none; }
  .footer__credit-note { flex: 1 0 100%; padding-inline-start: 0; }
  .footer__credit-note::before { display: none; }
  .round-btn--side { display: none; }
}

@media (max-width: 400px) {
  .brand img { height: 38px; }
  .icon-btn { width: 38px; height: 38px; }
  .track--cats { --per: 1.7; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__bg-slide, .hero__slide, .hero__slide > * { transition-duration: .01ms !important; transition-delay: 0s !important; }
  .hero__bg-slide { transform: none; }
  html { scroll-behavior: auto; }
  .strip__col { animation: none; }
  * { transition-duration: .01ms !important; }
}

/* =========================================================
   نظرات مشتریان – حالت خالی اسلایدر
   ========================================================= */
.review--empty { justify-content: center; }
.review--empty p { margin: 0; text-align: center; color: var(--muted); }
