@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ─── Dark Theme (default) ─── */
:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1220;
  --surface: #111827;
  --surface-2: #1f2937;
  --muted: #94a3b8;
  --text: #f8fafc;
  --text-secondary: #cbd5e1;
  --accent: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.4);
  --danger: #ef4444;
  --success: #22c55e;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.45);
  --card-border: rgba(148, 163, 184, 0.12);
  --nav-bg: rgba(15, 23, 42, 0.92);
  --nav-border: rgba(148, 163, 184, 0.35);
  --nav-glow: rgba(255, 255, 255, 0.07);
  --nav-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
  --nav-item: rgba(148, 163, 184, 0.7);
  --nav-hover: rgba(255, 255, 255, 0.08);
  --chip-bg: rgba(15, 23, 42, 0.7);
  --overlay-start: rgba(15, 23, 42, 0);
  --overlay-mid: rgba(15, 23, 42, 0.85);
  --overlay-end: rgba(15, 23, 42, 0.97);
  --banner-bg: rgba(15, 23, 42, 0.92);
  --toast-bg: rgba(15, 23, 42, 0.88);
  --hero-glow: rgba(59, 130, 246, 0.25);
  --btn-ghost-bg: rgba(148, 163, 184, 0.15);
  --btn-ghost-color: #fff;
  --stock-bg: rgba(15, 23, 42, 0.6);
  --input-bg: #0f172a;
  --input-border: rgba(148, 163, 184, 0.35);
}

/* ─── Light Theme ─── */
[data-theme="light"] {
  color-scheme: light;
  --bg: #f1f5f9;
  --surface: #ffffff;
  --surface-2: #e2e8f0;
  --muted: #64748b;
  --text: #0f172a;
  --text-secondary: #475569;
  --accent: #2563eb;
  --accent-glow: rgba(37, 99, 235, 0.35);
  --danger: #dc2626;
  --success: #16a34a;
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.08);
  --card-border: rgba(0, 0, 0, 0.08);
  --nav-bg: rgba(255, 255, 255, 0.88);
  --nav-border: rgba(0, 0, 0, 0.12);
  --nav-glow: rgba(255, 255, 255, 0.9);
  --nav-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  --nav-item: #64748b;
  --nav-hover: rgba(0, 0, 0, 0.05);
  --chip-bg: rgba(255, 255, 255, 0.85);
  --overlay-start: rgba(241, 245, 249, 0);
  --overlay-mid: rgba(241, 245, 249, 0.88);
  --overlay-end: rgba(241, 245, 249, 0.97);
  --banner-bg: rgba(255, 255, 255, 0.92);
  --toast-bg: rgba(255, 255, 255, 0.92);
  --hero-glow: rgba(37, 99, 235, 0.12);
  --btn-ghost-bg: rgba(0, 0, 0, 0.06);
  --btn-ghost-color: var(--text);
  --stock-bg: rgba(241, 245, 249, 0.7);
  --input-bg: #ffffff;
  --input-border: rgba(148, 163, 184, 0.75);
}

* {
  box-sizing: border-box;
}

/* جلوگیری از zoom/اسکرول افقی ناخواسته موبایل (۱۰۰vw معمولاً ≥ عرض مؤثر) */
html {
  overflow-x: hidden;
  max-width: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  font-family: "Vazirmatn", "Tahoma", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background 0.35s ease, color 0.35s ease;
  overflow-x: hidden;
  position: relative;
}

/* فقط محتوای عکس/ویدیو؛ آیکن‌های کوچک SVG دکمه‌ها مقدار width/height ثابت دارند */
img,
video {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
  padding-top: 66px;
  padding-bottom: max(120px, calc(120px + env(safe-area-inset-bottom, 0px)));
}

.app-shell--enamad {
  padding-bottom: 200px;
}

.shop-topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 45;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* محتوای اصلی زیر notch/لبه گوشی (بدون تغییر ارتفاع کل ۵۸px) */
  padding: 8px max(12px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--card-border);
}

.shop-topbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.shop-topbar__brand img,
.shop-topbar__logo-fallback {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--card-border);
}

.shop-topbar__logo-fallback {
  display: grid;
  place-items: center;
  background: var(--surface-2);
  font-weight: 800;
}

.shop-topbar__brand strong {
  font-size: 13px;
  max-width: 54vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-topbar__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.shop-topbar__menu {
  display: none;
  align-items: center;
  gap: 14px;
}

.shop-topbar__menu a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 0;
}

.shop-topbar__menu a:hover {
  color: var(--text);
}

.shop-topbar__icon-btn--search svg {
  display: block;
}

.shop-topbar__icon-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: var(--surface);
  display: grid;
  place-items: center;
  font-size: 16px;
}

button.shop-topbar__icon-btn {
  font: inherit;
  color: var(--text);
  cursor: pointer;
  padding: 0;
}

.shop-topbar__badge {
  position: absolute;
  top: -4px;
  left: -4px;
  min-width: 17px;
  height: 17px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  display: grid;
  place-items: center;
  padding: 0 3px;
}

/* ─── Enamad trust seal (فقط صفحهٔ اصلی و دربارهٔ ما؛ در فوتر) ─── */
.site-footer--trust {
  margin-top: 20px;
  padding: 18px max(14px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)) 10px;
  border-top: 1px solid var(--card-border);
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--surface-2) 55%, transparent));
}

.about-page .site-footer--trust {
  margin-top: 24px;
}

.enamad-trust {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
}

.enamad-trust__link {
  display: inline-block;
  line-height: 0;
  border-radius: 12px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.enamad-trust__link:hover,
.enamad-trust__link:focus-visible {
  opacity: 0.92;
  transform: scale(1.02);
}

.enamad-trust__img {
  display: block;
  max-width: 125px;
  height: auto;
  cursor: pointer;
  border-radius: 8px;
}

/* ─── Hero ─── */
.hero {
  padding: 16px 16px 14px;
  background: radial-gradient(circle at top right, var(--hero-glow), transparent 55%);
  border-bottom: 1px solid var(--card-border);
}

.hero.hero--compact {
  padding: 10px 16px 12px;
}

.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;
}

/* ══════════════════════════════════════
   Hero Slideshow
══════════════════════════════════════ */
.hero-slideshow {
  position: relative;
  width: 100%;
  margin: 14px 0 0;
  overflow: hidden;
  border-radius: 18px;
  background: #111;
  touch-action: pan-y;
  user-select: none;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
}

.hero-slideshow__track {
  display: flex;
  will-change: transform;
}

.hero-slideshow__slide {
  flex: 0 0 100%;
  position: relative;
  display: block;
  height: 300px;
  overflow: hidden;
  text-decoration: none;
}

.hero-slideshow__slide--static {
  cursor: default;
  color: inherit;
}

.hero-slideshow__slide--static:hover .hero-slideshow__img {
  transform: none;
}

.hero-slideshow__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  pointer-events: none;
  transition: transform 0.5s ease;
}

.hero-slideshow__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.78) 0%,
    rgba(0,0,0,0.35) 45%,
    rgba(0,0,0,0.08) 100%
  );
}

.hero-slideshow__content {
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero-slideshow__badge {
  display: inline-block;
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 6px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.hero-slideshow__name {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.hero-slideshow__price {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.hero-slideshow__price-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-slideshow__price--sale {
  font-size: 16px;
  font-weight: 700;
  color: #fca5a5;
}

.hero-slideshow__price-original {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  text-decoration: line-through;
}

.hero-slideshow__disc {
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(239,68,68,0.25);
  color: #fca5a5;
  font-size: 11px;
  font-weight: 700;
  direction: ltr;
}

.hero-slideshow__cta {
  display: inline-flex;
  align-self: flex-start;
  padding: 5px 14px;
  border-radius: 20px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(4px);
  margin-top: 2px;
  transition: background 0.2s;
}

.hero-slideshow__slide:hover .hero-slideshow__cta {
  background: rgba(255,255,255,0.25);
}

a.hero-slideshow__cta--link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

a.hero-slideshow__cta--link:hover {
  background: rgba(255,255,255,0.25);
}

/* فلش‌ها */
.hero-slideshow__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.35);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s;
  backdrop-filter: blur(4px);
}

.hero-slideshow__arrow:hover { background: rgba(0,0,0,0.6); }
.hero-slideshow__arrow--prev { right: 10px; }
.hero-slideshow__arrow--next { left: 10px; }

/* نقاط */
.hero-slideshow__dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

.hero-slideshow__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, width 0.2s;
}

.hero-slideshow__dot--active {
  background: #fff;
  width: 20px;
  border-radius: 4px;
}

@media (min-width: 640px) {
  .hero-slideshow {
    width: 100%;
    margin: 16px 0 0;
    border-radius: 20px;
  }
  .hero-slideshow__slide { height: 400px; }
  .hero-slideshow__name { font-size: 22px; }
}

@media (min-width: 1024px) {
  .hero-slideshow {
    max-width: 900px;
    margin: 20px auto 0;
  }
  .hero-slideshow__slide { height: 460px; }
  .hero-slideshow__name { font-size: 26px; }
}

/* اسلایدر صفحهٔ اصله: پس‌زمینه تا لبه نرود — padding روی همان بلوک زیر پس‌زمینه می‌رود؛ حاشیه با margin */
.hero-slideshow.home-section {
  box-sizing: border-box;
  padding-inline: 0;
  margin-inline: max(14px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  width: auto;
  max-width: 100%;
}

@media (min-width: 640px) {
  .hero-slideshow.home-section {
    margin-inline: max(16px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  }
}

@media (min-width: 900px) {
  .hero-slideshow.home-section {
    margin-inline: auto;
    max-width: min(900px, calc(100% - 2 * max(24px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px))));
  }
}

@media (min-width: 1024px) {
  .hero-slideshow.home-section {
    max-width: 900px;
  }
}

.store-header {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.store-logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--card-border);
  flex-shrink: 0;
  color: var(--text);
}

.store-logo.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700;
  font-size: 20px;
}

.store-info h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.store-meta {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

/* جستجو داخل header */
.hero-search {
  margin-top: 4px;
}

.hero.hero--compact .hero-search {
  margin-top: 0;
}

/* هدف لینک #shop-search (داک جستجو خارج از دید) */
#shop-search {
  scroll-margin-top: 76px;
}

.catalog-search-dock {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  z-index: 5;
  background: var(--surface);
  border-bottom: 1px solid var(--card-border);
  overflow-x: hidden;
}

/* بسته: بدون جابه‌جایی بزرگ در محور X که گاهی عرض سند را بزرگ می‌کند */
.catalog-search-dock:not(.catalog-search-dock--open) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  left: 0;
  top: 0;
  pointer-events: none;
}

.catalog-search-dock.catalog-search-dock--open {
  position: relative;
  left: auto;
  top: auto;
  padding: 10px 16px 12px;
  pointer-events: auto;
}

.shop-public-banner {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.shop-public-banner__inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.shop-public-banner__line {
  display: block;
}

/* ─── Filter Bar ─── */
.filter-bar {
  padding: 10px 16px 6px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon-wrap {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  min-width: 22px;
  max-width: 22px;
  min-height: 22px;
  max-height: 22px;
  color: var(--muted);
  pointer-events: none;
  flex-shrink: 0;
}

.search-icon-wrap .search-icon {
  width: 18px;
  height: 18px;
  min-width: 18px;
  max-width: 18px;
  min-height: 18px;
  max-height: 18px;
  display: block;
}

.search-box input {
  width: 100%;
  min-width: 0;
  flex: 1 1 0;
  padding: 12px 42px 12px 40px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  /* رنگ صریح + webkit-fill برای نمایش متن تایپ‌شده در بعضی مرورگرها/PWA (var(--text) گاهی اعمال نمی‌شود) */
  color: #f8fafc;
  -webkit-text-fill-color: #f8fafc;
  caret-color: var(--accent);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.45;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

[data-theme="light"] .search-box input {
  color: #0f172a;
  -webkit-text-fill-color: #0f172a;
}

.search-box input::placeholder {
  color: var(--muted);
  -webkit-text-fill-color: var(--muted);
  opacity: 1;
  font-size: 13px;
}

.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.search-clear {
  position: absolute;
  left: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.search-clear:hover {
  color: var(--text);
}

.search-clear svg {
  width: 14px;
  height: 14px;
}

.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 4px;
}

/* ─── View Toggle ─── */
.view-toggle {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  padding-top: 8px;
}

.view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.view-btn svg {
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.view-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.view-btn:hover:not(.active) {
  border-color: var(--accent);
  color: var(--text);
}


.hidden {
  display: none !important;
}

/* ─── Catalog Grid ─── */
.catalog {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 12px 20px 30px;
}

.product-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--card-border);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
  transform: translateY(-2px);
}

.product-image {
  position: relative;
  height: 210px;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.chip {
  position: absolute;
  top: 12px;
  right: 12px;
  width: fit-content;
  max-width: calc(50% - 18px);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: var(--chip-bg);
}

.chip--in { color: var(--success); }
.chip--out { color: var(--danger); }
.chip--special {
  right: auto;
  left: 12px;
  color: #fff;
  background: rgba(220, 38, 38, 0.82);
}
.product-image .chip--special ~ .chip--in,
.product-image .chip--special ~ .chip--out {
  right: 12px;
  left: auto;
}

/* بخش فروش ویژه (فقط وقتی محصول فروش ویژه وجود دارد) */
.special-offer-section {
  margin: 18px 0 10px;
}

/* ── Section Header (عنوان بخش‌ها) ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  margin-bottom: 12px;
}

.section-header__title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 7px;
}

.section-header__icon {
  font-size: 16px;
  line-height: 1;
}

.special-offer-section__title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  padding: 0 4px;
}

/* هم‌تراز با .category-tiles--h-scroll .category-tile (عرض یکسان + گپ ۱۰px) */
.home-promo-banners {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.home-promo-banners--wide1 .home-promo-banner-card {
  /* عرض تقریباً دو کارت دسته‌بندی کنار هم (همان کلَمپ + یک گپ بین دو کارت) */
  flex: 0 1 min(100%, calc(2 * clamp(132px, 46vw, 200px) + 10px));
  width: min(100%, calc(2 * clamp(132px, 46vw, 200px) + 10px));
  max-width: 100%;
}

.home-promo-banners--grid4 .home-promo-banner-card {
  flex: 0 1 clamp(132px, 46vw, 200px);
  width: clamp(132px, 46vw, 200px);
  max-width: 100%;
}

.home-promo-banner-card {
  position: relative;
  display: block;
  border-radius: 14px;
  overflow: hidden;
  min-height: 130px;
  border: 1px solid var(--border);
  background: var(--card-bg, rgba(15, 23, 42, 0.2));
}

.home-promo-banner-card img {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.home-promo-banner-card__title {
  position: absolute;
  right: 8px;
  left: 8px;
  bottom: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 12px;
  background: rgba(2, 6, 23, 0.62);
  color: #fff;
}
.catalog--special {
  margin-top: 0;
}

.product-info {
  padding: 16px 16px 18px;
}

.product-info h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.product-meta {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}

.price {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 8px;
  color: var(--accent);
}

/* ── قیمت فروش ویژه — کارت محصول ── */
.price-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.price--sale {
  color: #ef4444;
  font-weight: 700;
  font-size: 16px;
}

.price-original {
  font-size: 13px;
  color: var(--muted);
  text-decoration: line-through;
  font-weight: 400;
}

.discount-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  font-size: 11px;
  font-weight: 700;
  direction: ltr;
}

.desc {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 10px;
}

.views {
  color: var(--muted);
  font-size: 12px;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 60px 0;
}

/* ─── Product Detail Page ─── */
.product-page {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 100px;
}

/* ── Image Slider ── */
.media-slider {
  position: relative;
  width: 100%;
  flex-shrink: 0;
  background: var(--surface);
  /* Height is driven by .media-item below */
}

.media-track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.media-track::-webkit-scrollbar {
  display: none;
}

.media-item {
  flex: 0 0 100%;
  width: 100%;
  height: clamp(200px, 42vh, 340px);
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.media-item img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

/* ─── Tablet slider safety fix
   برای رول‌بک فقط این media block حذف شود. ─── */
@media (min-width: 768px) and (max-width: 1180px) {
  .media-item {
    height: clamp(320px, 52vh, 560px);
  }

  .media-item img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
    object-position: center;
  }
}

/* ── Swipe Indicators ── */
.media-indicators {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 6px 0 2px;
}

.media-indicators .dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--muted);
  opacity: 0.4;
  transition: all 0.3s ease;
  cursor: pointer;
}

.media-indicators .dot.active {
  background: var(--accent);
  opacity: 1;
  width: 20px;
}

/* Swipe hint shown only when there are multiple images */
.swipe-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
  padding: 3px 0 5px;
  transition: opacity 0.4s ease;
}

.swipe-hint svg {
  width: 14px !important;
  height: 14px !important;
  flex-shrink: 0;
  opacity: 0.5;
  animation: swipe-nudge 1.8s ease-in-out infinite;
}

@keyframes swipe-nudge {
  0%, 100% { transform: translateX(0); }
  40%       { transform: translateX(-4px); }
  60%       { transform: translateX(4px); }
}

/* ── Badge روی اسلایدر صفحه محصول ── */
.product-page-badge {
  position: absolute;
  top: 12px;
  width: fit-content;
  white-space: nowrap;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  z-index: 2;
}
.product-page-badge--special {
  left: 12px;
  background: rgba(220, 38, 38, 0.82);
  color: #fff;
}
.product-page-badge--in {
  right: 12px;
  background: var(--chip-bg);
  color: var(--success);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.product-page-badge--out {
  right: 12px;
  background: var(--chip-bg);
  color: var(--danger);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.media-slider .product-page__fav {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 3;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(2, 6, 23, 0.62);
  color: transparent;
  font-size: 0;
  cursor: pointer;
}

/* ── Product Detail Info Section ── */
.product-info {
  padding: 14px 16px 0;
  display: flex;
  flex-direction: column;
}

.product-info__name {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
}

.product-info__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.product-info__meta span {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--surface);
  border-radius: 6px;
  padding: 3px 9px;
}

/* ── انتخاب رنگ (Phase D) ── */
.product-color-picker {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 4px 0 12px;
}
.product-color-picker__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}
.product-color-picker--single .product-color-single {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
}
.product-color-single__name {
  font-weight: 600;
}
.product-color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}
.product-color-swatch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.product-color-swatch-btn.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent);
}
.product-color-swatch-btn.is-out-of-stock {
  opacity: 0.65;
}
.product-color-swatch-btn.is-out-of-stock .product-color-swatch-btn__name::after {
  content: " · ناموجود";
  font-size: 10px;
  color: var(--text-secondary);
}
.product-color-swatch-btn.is-disabled,
.product-color-swatch-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.product-color-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--text) 20%, transparent);
  flex-shrink: 0;
}
.product-color-swatch--text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  background: var(--bg);
  color: var(--text-secondary);
}
.product-color-swatch-btn__name {
  white-space: nowrap;
}

.product-info__price {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

/* ── قیمت فروش ویژه — صفحه محصول ── */
.product-info__price-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.product-info__price--sale {
  font-size: 22px;
  font-weight: 700;
  color: #ef4444;
}

.product-info__price-original {
  font-size: 14px;
  color: var(--muted);
  text-decoration: line-through;
  font-weight: 400;
}

.product-info__discount-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  font-size: 13px;
  font-weight: 700;
  direction: ltr;
}

/* ── قیمت فروش ویژه — محصولات مرتبط ── */
.related-card__price-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.related-card__price--sale {
  color: #ef4444;
  font-weight: 700;
  font-size: 13px;
}

.related-card__price-original {
  font-size: 11px;
  color: var(--muted);
  text-decoration: line-through;
}

.product-info__desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.product-info__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.product-trust-row {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.product-trust-row span {
  font-size: 11px;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--surface);
}

.stock {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--stock-bg);
  width: fit-content;
}

.stock--in { color: var(--success); }
.stock--out { color: var(--danger); }

/* ─── Buttons ─── */
.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s ease;
}

.btn:active { opacity: 0.85; }
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-ghost {
  background: var(--btn-ghost-bg);
  color: var(--btn-ghost-color);
}

.btn-whatsapp {
  background: #25d366;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
}
.btn-whatsapp:hover { opacity: 0.88; }

.btn-danger {
  background: var(--danger);
  color: white;
}

/* ─── Bottom Navigation ─── */
.bottom-nav {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 20px;
  background: var(--nav-bg);
  border: 1.5px solid var(--nav-border);
  backdrop-filter: blur(28px) saturate(1.6);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  box-shadow:
    var(--nav-shadow),
    0 0 0 1px var(--nav-glow) inset;
  z-index: 20;
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  /* 100% نسبت به گرداننده (viewport) — بدون باگ 100vw+اسکرول عمودی */
  max-width: calc(100% - 12px);
  box-sizing: border-box;
  overflow-x: auto;
  scrollbar-width: none;
}

.bottom-nav::-webkit-scrollbar { display: none; }

.bottom-nav a,
.bottom-nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 10px;
  font-weight: 500;
  color: var(--nav-item);
  padding: 8px 14px;
  border-radius: 14px;
  transition: all 0.25s ease;
  position: relative;
  min-width: 52px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}

.bottom-nav a:hover,
.bottom-nav button:hover {
  color: var(--text);
  background: var(--nav-hover);
}

.bottom-nav a.active {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.bottom-nav a.active svg {
  filter: drop-shadow(0 0 4px var(--accent-glow));
}

.bottom-nav svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.8;
}

.bottom-nav__icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bottom-nav__badge {
  position: absolute;
  top: -5px;
  left: -6px;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: grid;
  place-items: center;
  padding: 0 3px;
  line-height: 1;
  pointer-events: none;
  box-shadow: 0 0 0 2px var(--nav-bg);
}

.bottom-nav a.active .bottom-nav__badge {
  box-shadow: 0 0 0 2px var(--accent);
}

.bottom-nav__about-icon {
  stroke-width: 2;
}

/* گوشی‌های پهن‌تر یا بلندتر: منوی پایین کمی خوانا‌تر، بدون شلوغی */
@media (max-width: 899px) and (min-width: 380px) {
  .bottom-nav {
    gap: 6px;
    padding: 7px 10px;
    border-radius: 22px;
  }

  .bottom-nav a,
  .bottom-nav button {
    font-size: 11px;
    padding: 9px 16px;
    min-width: 56px;
    gap: 3px;
    border-radius: 16px;
  }

  .bottom-nav svg {
    width: 22px;
    height: 22px;
  }

  .theme-toggle svg {
    width: 22px;
    height: 22px;
  }
}

@media (max-width: 899px) and (min-height: 720px) {
  .bottom-nav a,
  .bottom-nav button {
    padding: 10px 16px;
  }
}

/* theme toggle in nav */
.theme-toggle {
  color: var(--nav-item);
}
.theme-toggle:hover {
  color: var(--text);
  background: var(--nav-hover);
}
.theme-toggle svg {
  width: 20px;
  height: 20px;
}
.theme-toggle .icon-sun,
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* ─── Install Banner ─── */
.install-banner {
  position: fixed;
  right: 16px;
  left: 16px;
  bottom: calc(90px + env(safe-area-inset-bottom));
  background: var(--banner-bg);
  border: 1px solid var(--nav-border);
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 30;
}

.install-banner__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

.install-banner__actions {
  display: flex;
  gap: 8px;
}

/* ─── Toast ─── */
.toast {
  position: fixed;
  top: 16px;
  right: 50%;
  transform: translateX(50%);
  background: var(--toast-bg);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--nav-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 40;
  font-size: 13px;
}

.hidden {
  display: none;
}

/* ─── Offline ─── */
.offline {
  display: flex;
  min-height: 70vh;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.offline-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  max-width: 420px;
  border: 1px solid var(--card-border);
}

/* ─── Store Details ─── */
.store-details {
  padding: 20px;
  margin: 0 20px 40px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
}

.store-details h2 {
  margin-top: 0;
}

.store-details__meta {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  display: grid;
  gap: 6px;
}

/* ─── حالت ۲ ستون موبایل ─── */
.catalog.view-2col {
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 12px 12px 30px;
}

.catalog.view-2col .product-image {
  height: 140px;
}

.catalog.view-2col .product-info {
  padding: 10px 10px 12px;
}

.catalog.view-2col .product-info h3 {
  font-size: 13px;
  margin: 0 0 5px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.catalog.view-2col .product-meta {
  font-size: 11px;
  gap: 6px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.catalog.view-2col .price {
  font-size: 13px;
  margin-bottom: 0;
}

.catalog.view-2col .desc {
  display: none;
}

.catalog.view-2col .views {
  font-size: 11px;
}

.catalog.view-2col .chip {
  font-size: 10px;
  padding: 4px 8px;
  top: 6px;
  right: 6px;
}
.catalog.view-2col .chip--special {
  right: auto;
  left: 6px;
}

/* ─── Filter Row: Select + Stock Toggle ─── */
.filter-selects {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.filter-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  max-width: 200px;
}

.filter-select-icon {
  position: absolute;
  right: 10px;
  width: 14px;
  height: 14px;
  color: var(--muted);
  pointer-events: none;
  flex-shrink: 0;
}

.filter-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 0 34px 0 28px;
  height: 36px;
  font-family: inherit;
  font-size: 16px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 10px center;
}

[data-theme="light"] .filter-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

.filter-select:focus {
  border-color: var(--accent);
}

.stock-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.stock-toggle svg {
  opacity: 0;
  transition: opacity 0.15s;
  flex-shrink: 0;
}

.stock-toggle:hover {
  border-color: var(--accent);
  color: var(--text);
}

.stock-toggle.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.stock-toggle.active svg {
  opacity: 1;
}

/* ─── Desktop ─── */
@media (min-width: 900px) {
  .catalog {
    grid-template-columns: repeat(2, 1fr);
    max-width: 960px;
    margin: 0 auto;
  }

  .catalog.view-2col {
    grid-template-columns: repeat(4, 1fr);
  }

  .hero {
    padding: 32px 32px 10px;
  }

  .hero.hero--compact {
    padding: 16px 32px 12px;
  }

  .scroll-top-btn {
    left: calc(50% - 500px);
  }
}

/* ─── About Page ─── */
.about-page {
  padding-bottom: 100px;
}

.about-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 20px 24px;
  gap: 10px;
  text-align: center;
}

.about-hero__logo {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  object-fit: cover;
  border: 2px solid var(--border);
}

.about-hero__avatar {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 800;
}

.about-hero__name {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
}

.about-hero__hours {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--surface);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.about-section {
  margin: 0 16px 20px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  padding: 18px 16px;
}

.about-section--text {}

.about-section__title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.about-text {
  margin: 0;
  font-size: 14px;
  color: var(--text);
  line-height: 1.9;
  white-space: pre-line;
}

/* Contact List */
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.contact-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.contact-item:first-child {
  padding-top: 0;
}

.contact-item--address {
  align-items: flex-start;
}

.contact-item__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-item__icon--phone    { background: rgba(34,197,94,0.15);  color: #22c55e; }
.contact-item__icon--whatsapp { background: rgba(37,211,102,0.15); color: #25d366; }
.contact-item__icon--instagram{ background: rgba(225,48,108,0.15); color: #e1306c; }
.contact-item__icon--address  { background: rgba(59,130,246,0.15); color: #3b82f6; }

.contact-item__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.contact-item__label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

.contact-item__value {
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  word-break: break-word;
}

a.contact-item__value:hover { color: var(--accent); }

.contact-item__action {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}

.contact-item__action--whatsapp {
  background: #25d366;
}

/* About CTA */
.about-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 16px 16px;
}

/* About — قوانین (کارت لینک به /terms) */
.about-legal {
  padding-top: 16px;
}

.about-legal-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  padding: 14px 14px 14px 12px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s ease, transform 0.1s ease, border-color 0.15s ease;
  border-inline-start: 3px solid var(--accent, #3b82f6);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.about-legal-tile:hover {
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  border-color: var(--card-border);
}

.about-legal-tile:active {
  transform: scale(0.99);
}

.about-legal-tile__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent, #3b82f6);
}

.about-legal-tile__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
}

.about-legal-tile__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.about-legal-tile__desc {
  font-size: 12px;
  line-height: 1.65;
  color: var(--text-secondary);
}

.about-legal-tile__desc strong {
  color: var(--accent, #3b82f6);
  font-weight: 600;
}

.about-legal-tile__action {
  display: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

@media (min-width: 400px) {
  .about-legal-tile__action {
    display: block;
  }
}

.about-legal-tile__chev {
  flex-shrink: 0;
  color: var(--text-secondary);
  opacity: 0.7;
}

.about-legal-tile:hover .about-legal-tile__chev {
  color: var(--accent);
  opacity: 1;
}

.about-legal-note {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-secondary);
  padding-inline: 2px;
}

/* ─── Error Pages (404 / 500) ─── */
.error-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
  gap: 12px;
  background: var(--bg);
}
.error-page__code {
  font-size: 80px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -2px;
}
.error-page__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.error-page__desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 12px;
}

/* ─── Related Products ─── */
.related-section {
  margin: 24px 0 0;
  padding: 0 16px;
}

.related-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.related-section__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  flex: 1;
  min-width: 0;
}
.related-section__all {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent, #3b82f6);
  text-decoration: none;
  white-space: nowrap;
}
.related-section__all:hover {
  text-decoration: underline;
}

/* ─── شماره کارت واریز (کارت‌به‌کارت) ─── */
.store-bank-cards {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.store-bank-cards__lead {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.store-bank-cards__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.store-bank-cards__item {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-elevated, rgba(0, 0, 0, 0.12));
  border: 1px solid var(--border);
}
.store-bank-cards__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}
.store-bank-cards__bank {
  font-weight: 600;
  color: var(--text);
}
.store-bank-cards__pan-row,
.store-bank-cards__iban-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.store-bank-cards__pan,
.store-bank-cards__iban {
  font-size: 14px;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px dashed var(--border);
}
.store-bank-cards__iban-label {
  font-size: 11px;
  color: var(--text-muted);
}
.store-bank-cards__note {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.related-card {
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease;
}
.related-card:active { transform: scale(0.97); }
.related-card__img {
  position: relative;
  height: 110px;
  overflow: hidden;
}
.related-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}
.related-card__info {
  padding: 8px 10px 10px;
}
.related-card__name {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-card__price {
  margin: 0;
  font-size: 11px;
  color: var(--text-secondary);
}

/* ─── WhatsApp Float Button ─── */
.whatsapp-fab {
  position: fixed;
  left: max(20px, env(safe-area-inset-left, 0px));
  bottom: calc(var(--nav-h, 72px) + 16px + env(safe-area-inset-bottom, 0px));
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
  z-index: 900;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  text-decoration: none;
}
.whatsapp-fab:hover,
.whatsapp-fab:focus-visible {
  transform: scale(1.08);
  box-shadow: 0 6px 22px rgba(37, 211, 102, 0.6);
}

/* ─── Public Flash Messages ─── */
.flash-list {
  margin: 12px 16px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.flash {
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  border: 1px solid transparent;
}

.flash--success {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #10b981;
}

.flash--error {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #ef4444;
}

.flash--warning {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: #f59e0b;
}

/* ─── Customer Auth / Account ─── */
.auth-page {
  padding: 18px 16px 96px;
}

/* ── Terms Page ── */
.terms-page {
  padding: 18px 16px 96px;
}

.terms-card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.terms-card__header {
  padding: 20px 20px 14px;
  border-bottom: 1px solid var(--card-border);
}

.terms-card__title {
  margin: 0;
  font-size: 20px;
  color: var(--text);
}

.terms-card__subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.terms-card__body {
  padding: 20px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.9;
  white-space: pre-wrap;
}

.terms-card__body p {
  margin: 0 0 12px;
}

.terms-empty {
  color: var(--muted);
  text-align: center;
  padding: 32px 0;
}

.terms-card__footer {
  padding: 14px 20px;
  border-top: 1px solid var(--card-border);
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

/* ── Accept Terms Checkbox ── */
.auth-accept-terms {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.auth-accept-terms input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.auth-accept-terms a {
  color: var(--accent);
  text-decoration: underline;
}

.auth-card {
  max-width: 560px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.auth-card h1 {
  margin: 0;
  font-size: 20px;
  color: var(--text);
}

.auth-card__desc {
  margin: 8px 0 14px;
  color: var(--text-secondary);
  font-size: 13px;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.auth-form input,
.auth-form textarea,
.auth-form select {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
}

.auth-form input[type="file"] {
  padding: 8px 12px;
  cursor: pointer;
}

.auth-form input:not([type="hidden"]):focus,
.auth-form textarea:focus,
.auth-form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.password-field {
  position: relative;
  display: block;
  width: 100%;
}

.password-field > input {
  padding-inline-end: 46px;
  width: 100%;
  box-sizing: border-box;
}

.password-toggle-btn {
  position: absolute;
  inset-inline-end: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.password-toggle-btn:hover {
  color: var(--accent);
  background: rgba(59, 130, 246, 0.12);
}

.cart-qty-stepper:focus-within {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.auth-form input::placeholder,
.auth-form textarea::placeholder {
  color: var(--muted);
}

.captcha-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.captcha-img {
  width: 170px;
  max-width: 100%;
  height: 56px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
}

.auth-card__meta {
  margin: 14px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.auth-card__meta a {
  color: var(--accent);
  text-decoration: none;
}

.auth-inline-form {
  margin-top: 10px;
}

.auth-inline-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.account-list {
  margin: 0;
  display: grid;
  gap: 10px;
}

.account-list > div {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}

.account-list dt {
  margin: 0 0 4px;
  color: var(--text-secondary);
  font-size: 12px;
}

.account-list dd {
  margin: 0;
  color: var(--text);
  font-size: 14px;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
}

.status--ok {
  background: rgba(16, 185, 129, 0.16);
  color: #10b981;
}

.status--warn {
  background: rgba(245, 158, 11, 0.16);
  color: #f59e0b;
}

.status--info {
  background: rgba(59, 130, 246, 0.16);
  color: #3b82f6;
}

.status--danger {
  background: rgba(239, 68, 68, 0.16);
  color: #ef4444;
  margin-inline-start: 6px;
}

.nav-badge {
  position: absolute;
  top: 2px;
  inset-inline-end: 6px;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  padding: 0 4px;
}

.product-cart-form {
  display: inline-flex;
}

.auth-form textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}

.address-list {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.address-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}

.address-item p {
  margin: 4px 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.address-item__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.address-item__actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cart-list {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.cart-item {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
}

.cart-item__thumb {
  display: block;
  width: 86px;
  height: 86px;
  border-radius: 10px;
  overflow: hidden;
}

.cart-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item__name {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.cart-item__meta {
  margin: 4px 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.cart-item__price {
  margin: 0;
  font-size: 13px;
  color: var(--text);
}

.cart-item__body {
  min-width: 0;
}

.cart-item__actions {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cart-item__actions form {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

/* ── باندل در سبد ── */
.cart-bundle-section {
  margin-top: 18px;
}

.cart-bundle-section__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  margin: 0 0 8px;
}

.cart-item--bundle {
  grid-template-columns: 52px 1fr;
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
}

.cart-item__bundle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  width: 52px;
  height: 52px;
}

.cart-item__price-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 4px 0;
}

.cart-item__price-original {
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: line-through;
}

/* ── صفحه باندل: بخش خرید ── */
.bundle-purchase-box {
  border: 1px solid var(--accent);
  border-radius: 16px;
  padding: 16px;
  margin: 0 0 20px;
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bundle-purchase-box__prices {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.bundle-purchase-box__price {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
}

.bundle-purchase-box__original {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: line-through;
}

.bundle-purchase-box__discount-badge {
  font-size: 12px;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  border-radius: 20px;
  padding: 2px 10px;
}

.bundle-purchase-box__saving {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
}

.bundle-purchase-box__btn {
  align-self: stretch;
}

.cart-qty-form {
  display: inline-flex;
  align-items: center;
}

.cart-qty-stepper {
  display: inline-flex;
  flex-direction: row;
  align-items: stretch;
  direction: ltr;
  border: 1px solid var(--input-border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--input-bg);
  max-width: 100%;
}

.cart-qty-middle {
  box-sizing: border-box;
  flex: 0 0 auto;
  min-width: 56px;
  min-height: 42px;
  margin: 0;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--input-border);
  border-right: 1px solid var(--input-border);
  background: var(--input-bg);
  position: relative;
  z-index: 0;
}

/* رنگ و فونت صریح — بعضی PWA/وب‌کیت با var(--text) روی span داخل flex رندر نمی‌دهند */
.cart-qty-display {
  display: inline-block;
  font-family: "Vazirmatn", "Tahoma", system-ui, sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.02em;
  text-align: center;
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
  unicode-bidi: plaintext;
  color: #f1f5f9 !important;
  -webkit-text-fill-color: #f1f5f9 !important;
  opacity: 1 !important;
  visibility: visible !important;
  -webkit-font-smoothing: antialiased;
}

[data-theme="light"] .cart-qty-display {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
}

html[data-theme="light"] .cart-qty-display[style] {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
}

.cart-qty-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-width: 40px;
  border: none;
  background: var(--surface-2);
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 2;
}

.cart-qty-btn:hover {
  background: var(--nav-hover);
}

.cart-summary {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}

.cart-summary p {
  margin: 4px 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.checkout-block {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}

.checkout-block h3 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--text);
}

.checkout-choice {
  display: flex !important;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  margin-top: 8px;
  background: var(--surface);
}
.checkout-choice.shipping-option.is-hidden {
  display: none !important;
}

.checkout-choice input[type="radio"] { margin-top: 3px; }
.checkout-choice span { display: flex; flex-direction: column; gap: 3px; }
.checkout-choice small { color: var(--text-secondary); font-size: 12px; }

.checkout-pickup-address {
  color: var(--text-muted, var(--text-secondary));
  line-height: 1.55;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.orders-list {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

.order-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}

.order-card p {
  margin: 4px 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.order-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

/* ── Ticket styles ── */
.ticket-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.ticket-card {
  display: block;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ticket-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.ticket-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.ticket-card__number {
  font-size: 11px;
  font-family: monospace;
  color: var(--muted);
}

.ticket-card__subject {
  margin: 0;
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

.ticket-card__date {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--muted);
}

.ticket-card--unread {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
}

.ticket-card__unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.ticket-card__hint {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--accent);
}

.ticket-form textarea {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  width: 100%;
  resize: vertical;
  transition: border-color 0.2s;
}

.ticket-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.ticket-form .auth-form__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.ticket-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 14px 0;
}

.ticket-msg {
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
}

.ticket-msg--customer {
  background: var(--surface);
  margin-left: 24px;
}

.ticket-msg--admin {
  background: rgba(59, 130, 246, 0.07);
  border-color: rgba(59, 130, 246, 0.2);
  margin-right: 24px;
}

.ticket-msg__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.ticket-msg__sender {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.ticket-msg--admin .ticket-msg__sender {
  color: var(--accent);
}

.ticket-msg__time {
  font-size: 11px;
  color: var(--muted);
}

.ticket-msg__body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.ticket-msg__image-link {
  display: block;
  margin-top: 8px;
}

.ticket-msg__image {
  display: block;
  width: 100%;
  max-width: 280px;
  max-height: 240px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--input-bg);
}

.ticket-reply-form {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ticket-reply-form textarea {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  resize: vertical;
  transition: border-color 0.2s;
}

.ticket-reply-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.ticket-reply-form__file {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.ticket-reply-form__file input[type="file"] {
  font-size: 14px;
  color: var(--text);
}

.ticket-reply-form__hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.ticket-closed-note {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  margin-top: 12px;
}

.status--muted {
  background: rgba(148, 163, 184, 0.15);
  color: var(--muted);
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}

.empty-state p {
  margin-bottom: 14px;
  font-size: 14px;
}

/* ══════════════════════════════════════
   صفحات حساب کاربری — بازطراحی
══════════════════════════════════════ */
.account-page {
  max-width: 540px;
  margin: 0 auto;
  padding: 16px 16px 100px;
}

/* هدر پروفایل */
.account-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 0 16px;
}

.account-avatar {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.account-hero__info { flex: 1; min-width: 0; }

.account-hero__name {
  margin: 0 0 2px;
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-hero__mobile {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.account-hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* بنر تأیید موبایل */
.account-verify-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #f59e0b;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 14px;
  transition: background 0.2s;
}

.account-verify-banner svg { width: 18px; height: 18px; flex-shrink: 0; }
.account-verify-banner:hover { background: rgba(245, 158, 11, 0.18); }

/* کارت‌های آمار */
.account-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.account-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.15s;
}

.account-stat-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.account-stat-card svg { width: 20px; height: 20px; color: var(--accent); }

.account-stat-card__value {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.account-stat-card__label {
  font-size: 11px;
  color: var(--muted);
}

/* منوی حساب */
.account-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.account-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}

.account-menu-item:hover { border-color: var(--accent); }

.account-menu-item__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.account-menu-item__icon svg { width: 20px; height: 20px; color: var(--accent); }

.account-menu-item__text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.account-menu-item__text strong { font-size: 14px; }
.account-menu-item__text small { font-size: 12px; color: var(--muted); }

.account-menu-item__arrow {
  width: 16px;
  height: 16px;
  color: var(--muted);
  transform: scaleX(-1);
}

.account-menu-item--danger { color: #ef4444; }
.account-menu-item--danger .account-menu-item__icon svg { color: #ef4444; }
.account-menu-item--danger:hover { border-color: #ef4444; background: rgba(239,68,68,0.05); }

/* ══════════════════════════════════════
   صفحه پروفایل و آدرس‌ها — مشترک
══════════════════════════════════════ */
.page-wrap {
  max-width: 540px;
  margin: 0 auto;
  padding: 16px 16px 100px;
}

/* صفحهٔ مشاهدهٔ همهٔ دسته‌ها — عرض بیشتر برای گرید مانند ویترین محصولات */
.page-wrap--shop-browse {
  max-width: min(920px, 100%);
}

.page-section-header {
  margin-bottom: 18px;
}

.page-back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 8px;
}

.page-back-link svg { width: 16px; height: 16px; }

.page-section-header h1 {
  margin: 0;
  font-size: 20px;
}

/* فرم پروفایل */
.profile-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 400px) {
  .profile-form__grid { grid-template-columns: 1fr; }
}

.profile-form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-form__field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.profile-form__field input,
.profile-form__field textarea,
.profile-form__field select {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.2s;
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
}

.profile-form__field input[type="file"] {
  padding: 8px 12px;
  cursor: pointer;
}

.profile-form__field input:focus,
.profile-form__field textarea:focus,
.profile-form__field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.profile-form__field--readonly small {
  font-size: 11px;
  color: var(--muted);
}

.profile-readonly-value {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  color: var(--muted);
  background: var(--bg);
}

.profile-form__checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}

/* کارت‌های آدرس */
.address-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: var(--surface);
  margin-bottom: 10px;
  transition: border-color 0.2s;
}

.address-card--default { border-color: var(--accent); }

.address-card__head { margin-bottom: 10px; }

.address-card__title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.address-card__title { font-size: 15px; }

.address-card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.address-card__line {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

.address-card__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

/* بخش افزودن آدرس */
.address-add-section {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  background: var(--surface);
}

.address-add-section__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* ══════════════════════════════════════
   page-header مشترک برای صفحات عملکردی
══════════════════════════════════════ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.page-header h1 {
  margin: 0;
  font-size: 20px;
}

.page-header--stacked {
  flex-wrap: wrap;
}

/* ── فیلتر وضعیت سفارش‌ها (حساب کاربری) ── */
.order-status-filter {
  margin: 0 0 16px;
}

.order-status-filter__track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2px 0 10px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.order-status-filter__card {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 108px;
  max-width: 160px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.order-status-filter__card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.order-status-filter__card--active {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 2px var(--accent);
}

.order-status-filter__label {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  text-align: right;
}

.order-status-filter__count {
  font-size: 18px;
  font-weight: 800;
  font-feature-settings: "tnum" 1;
  color: var(--accent);
  line-height: 1.1;
}

/* ── کارت سفارش مشتری ── */
.my-order-card {
  display: block;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: var(--surface);
  margin-bottom: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.my-order-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.my-order-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.my-order-card__num {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.my-order-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
}

.my-order-card__meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.my-order-card__meta-label {
  font-size: 11px;
  color: var(--muted);
}

.my-order-card__meta-value {
  font-size: 13px;
  color: var(--text);
}

.my-order-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  font-size: 13px;
}

.my-order-card__amount {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

/* ── کارت کیف پول ── */
.wallet-balance-card {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover, #2563eb) 100%);
  border-radius: 16px;
  padding: 20px;
  color: #fff;
  margin-bottom: 20px;
  text-align: center;
}

.wallet-balance-card__label {
  font-size: 13px;
  opacity: 0.85;
  margin: 0 0 6px;
}

.wallet-balance-card__amount {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 4px;
}

.wallet-balance-card__unit {
  font-size: 13px;
  opacity: 0.75;
}

.wallet-topup-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 14px;
  margin-bottom: 14px;
}

.wallet-topup-card__head h2 {
  margin: 0;
  font-size: 16px;
}

.wallet-topup-card__head p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.wallet-topup-form {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wallet-topup-form__label {
  margin: 0;
  font-size: 13px;
  color: var(--text);
}

.wallet-topup-form__amount-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wallet-topup-form__amount-input {
  width: 100%;
}

.wallet-topup-form__amount-hint {
  font-size: 12px;
  color: var(--muted);
}

.wallet-topup-form__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wallet-chip {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.wallet-chip:hover {
  border-color: var(--accent);
}

.wallet-gateway-list {
  display: grid;
  gap: 8px;
}

.wallet-gateway-item {
  justify-content: flex-start;
}

.wallet-gateway-single {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.wallet-topup-form__submit {
  width: 100%;
  margin-top: 2px;
}

.wallet-topup-history {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 12px;
  margin-bottom: 14px;
}

.wallet-topup-history__title {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.wallet-topup-history__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wallet-topup-history__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}

.wallet-topup-history__main {
  min-width: 0;
}

.wallet-topup-history__amount {
  margin: 0;
  font-size: 14px;
  color: var(--text);
  font-weight: 700;
}

.wallet-topup-history__meta {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.wallet-topup-history__error {
  margin: 6px 0 0;
  font-size: 12px;
  color: #ef4444;
}

.wallet-topup-history__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}

.wallet-topup-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  border: 1px solid transparent;
}

.wallet-topup-status--pending {
  background: rgba(234, 179, 8, 0.12);
  color: #b45309;
  border-color: rgba(234, 179, 8, 0.26);
}

.wallet-topup-status--paid {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
  border-color: rgba(34, 197, 94, 0.26);
}

.wallet-topup-status--failed,
.wallet-topup-status--cancelled {
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.22);
}

/* ── ردیف تراکنش ── */
.tx-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tx-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--surface);
}

.tx-item__icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.tx-item__icon--credit { background: rgba(34,197,94,0.12); color: #16a34a; }
.tx-item__icon--debit  { background: rgba(239,68,68,0.10); color: #dc2626; }

.tx-item__body {
  flex: 1;
  min-width: 0;
}

.tx-item__desc {
  font-size: 14px;
  color: var(--text);
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tx-item__date {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

.tx-item__amount {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.tx-item__amount--credit { color: #16a34a; }
.tx-item__amount--debit  { color: #dc2626; }

/* ── جزئیات سفارش مشتری ── */
.order-detail-section {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  margin-bottom: 12px;
  overflow: hidden;
}

.order-detail-section__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  margin: 0;
  color: var(--text-secondary);
}

.order-info-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.order-info-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}

.order-info-list li:last-child { border-bottom: none; }

.order-info-list .label { color: var(--text-secondary); }
.order-info-list .value { font-weight: 600; color: var(--text); }

.order-info-list li.order-tipax-tracking-li {
  align-items: flex-start;
}
.order-tipax-tracking-li__value {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  text-align: left;
  max-width: 100%;
}
.order-tipax-tracking-code {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.order-tipax-tracking-btn.btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  max-width: 100%;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  transition: opacity 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.order-tipax-tracking-btn.btn:hover {
  opacity: 0.95;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.order-tipax-tracking-btn.btn:active {
  transform: scale(0.98);
}
.order-tipax-tracking-btn__icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  opacity: 0.95;
}

.order-info-list li.order-courier-phone-li {
  align-items: flex-start;
  flex-wrap: wrap;
}
.order-courier-phone-li__value {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  text-align: end;
  max-width: 100%;
}
.order-courier-phone-li__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.order-courier-phone-li__btns .btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* ── سبد خرید بهتر ── */
.cart-summary-box {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 14px;
  margin-top: 12px;
}

.cart-summary-box__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.cart-summary-box__row:last-child { border-bottom: none; }
.cart-summary-box__row.total { font-size: 15px; font-weight: 700; color: var(--text); }

/* ─── کادر کد تخفیف در checkout ─── */
.coupon-section {
  padding: 10px 0 4px;
  border-top: 1px dashed var(--border);
  margin-top: 6px;
}
.coupon-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.coupon-input-row input {
  flex: 1;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--input-bg, var(--bg));
  color: var(--text);
  font-size: 13px;
  font-family: monospace;
  letter-spacing: 1px;
  outline: none;
  transition: border-color .2s;
}
.coupon-input-row input:focus { border-color: var(--accent); }
.coupon-result {
  font-size: 12px;
  margin-top: 6px;
  padding: 6px 10px;
  border-radius: 8px;
}
.coupon-result--ok    { background: rgba(16,185,129,.12); color: #10b981; }
.coupon-result--error { background: rgba(239,68,68,.1);  color: #ef4444; }
.coupon-discount-row strong { color: #10b981; }

/* ── checkout بهتر ── */
.checkout-form .profile-form__field input[type="file"] {
  padding: 8px 12px;
  cursor: pointer;
}

.checkout-section {
  margin-bottom: 16px;
}

.checkout-section__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.checkout-page .page-section-header {
  margin-bottom: 10px;
}

.checkout-hero-card {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}

.checkout-hero-card span {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 11px;
  text-align: center;
  padding: 8px 4px;
  font-weight: 700;
}

.checkout-choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkout-inline-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--accent);
}

.checkout-submit-btn {
  width: 100%;
  margin-top: 14px;
  font-size: 15px;
  padding: 12px;
}

/* ── Home: فروشگاهی مدرن ── */
.home-section {
  margin-top: 18px;
  box-sizing: border-box;
  padding-inline: max(14px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
}

.home-section .shop-grid--h-scroll {
  margin-inline: 0;
  padding-inline: 0;
}

@media (min-width: 900px) {
  .home-section {
    padding-inline: max(24px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
    max-width: 960px;
    margin-inline: auto;
  }
}

.shop-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 10px;
  gap: 8px;
}

.shop-section-head--title-only {
  justify-content: flex-start;
}

.shop-section-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.shop-section-head a {
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.store-collection-subtitle {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 13px;
}

.shop-category-filters {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface, rgba(255, 255, 255, 0.04));
}

.shop-category-filters__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

.shop-category-filters__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: min(100%, 200px);
  flex: 1 1 160px;
}

.shop-category-filters__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.shop-category-filters__select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg, #111);
  color: var(--text);
  font-size: 14px;
}

.shop-category-filters__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-inline-start: auto;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.shop-grid--h-scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
  margin-inline: -2px;
  padding-inline: 2px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

/* عرض یکسان کارت محصول و «مشاهده همه»: width + flex:none به‌جای فقط flex-basis */
.shop-grid--h-scroll > .store-card,
.shop-grid--h-scroll > .home-see-all-card {
  flex: none;
  width: clamp(140px, 44vw, 200px);
  max-width: 100%;
  scroll-snap-align: start;
}

/*
  کارت «مشاهده همه»: مستقل از .store-card.
  همان مدل ۱px چهار طرف مثل .store-card تا عرض بیرونی دقیقاً هم‌تراز نوار اسکرول باشد.
  flex ستونی + justify/align center = مرکز عمودی و افقی بدون absolute (سازگار با RTL).
*/
.home-see-all-card {
  --ha-muted: var(--text-secondary);

  box-sizing: border-box;
  direction: rtl;
  text-decoration: none;
  cursor: pointer;
  color: var(--ha-muted);
  align-self: stretch;
  min-height: 0;
  min-width: 0;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 10px 8px;
  overflow: hidden;

  container-type: inline-size;
  container-name: home-see-all;

  border: 1px solid var(--border);
  border-top-color: var(--success);
  border-right-color: var(--success);
  border-bottom-color: var(--success);
  border-radius: 14px;

  background: linear-gradient(180deg, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0)), var(--surface);

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

[data-theme="light"] .home-see-all-card {
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}

.home-see-all-card__stack {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

@supports (width: 1cqmin) {
  .home-see-all-card__stack {
    gap: clamp(12px, 12cqmin, 18px);
  }
}

.home-see-all-card__graphic {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.home-see-all-card__illus {
  display: block;
  width: 62px;
  height: auto;
  aspect-ratio: 1;
  color: var(--ha-muted);
  transition:
    transform 0.2s ease,
    color 0.2s ease,
    filter 0.2s ease;
}

@supports (width: 1cqi) {
  .home-see-all-card__illus {
    width: clamp(56px, 48cqi, 78px);
  }
}

.home-see-all-card__label {
  margin: 0;
  max-width: 11em;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
  color: var(--ha-muted);
  letter-spacing: -0.02em;
}

@supports (width: 1cqi) {
  .home-see-all-card__label {
    font-size: clamp(13px, 9.5cqi, 15px);
  }
}

.home-see-all-card:hover {
  border-left-color: var(--border);
  border-top-color: color-mix(in srgb, var(--success) 78%, black);
  border-right-color: color-mix(in srgb, var(--success) 78%, black);
  border-bottom-color: color-mix(in srgb, var(--success) 78%, black);
}

.home-see-all-card:hover .home-see-all-card__illus {
  color: color-mix(in srgb, var(--success) 38%, var(--ha-muted));
  transform: scale(1.04);
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--success) 28%, transparent));
}

.home-see-all-card:hover .home-see-all-card__label {
  color: color-mix(in srgb, var(--success) 15%, var(--ha-muted));
}

.home-see-all-card:focus-visible {
  outline: 2px solid var(--success);
  outline-offset: 2px;
}

.store-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0)), var(--surface);
  border-radius: 14px;
  overflow: hidden;
  min-width: 0;
  container-type: inline-size;
  container-name: store-card;
}

.store-card__media-wrap {
  position: relative;
}

.store-card__media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #0b1220;
}

.store-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transition: transform 0.25s ease;
}

.store-card:hover .store-card__media img {
  transform: scale(1.03);
}

.store-card__chip {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
  background: rgba(15, 23, 42, 0.72);
  color: #f8fafc;
}

.store-card__chip--special {
  right: auto;
  left: 8px;
  background: rgba(239, 68, 68, 0.88);
  border-color: rgba(255,255,255,0.28);
}

.store-card__chip--in {
  background: rgba(22, 163, 74, 0.86);
}

.store-card__chip--out {
  background: rgba(100, 116, 139, 0.86);
}

.store-card__media-wrap .store-card__fav {
  position: absolute;
  bottom: 8px;
  left: 8px;
  z-index: 3;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  background: rgba(2, 6, 23, 0.62);
  color: transparent;
  font-size: 0;
  cursor: pointer;
}

.store-card__fav::before {
  content: "♡";
  color: #e2e8f0;
  font-size: 17px;
  line-height: 1;
}

.store-card__fav.is-active::before {
  content: "♥";
  color: #ef4444;
}

.store-card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  min-width: 0;
}

.store-card__name {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
  min-height: 42px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.store-card__meta {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.store-card__price-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.store-card__price {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.store-card__price--sale {
  color: #22c55e;
}

.store-card__price-original {
  color: var(--muted);
  font-size: 12px;
  text-decoration: line-through;
}

.store-card__discount {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: #ef4444;
  padding: 3px 7px;
  border-radius: 999px;
}

.store-card__actions {
  margin-top: 2px;
  display: flex;
  gap: 6px;
  align-items: center;
}

.store-card__actions .btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 8px 6px;
  font-size: 12px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
}

/* کارت‌های باریک (مثلاً اسکرول افقی موبایل): دکمه‌ها زیر هم تا «مشاهده سریع» دوخطی نشود */
@container store-card (max-width: 280px) {
  .store-card__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
  }

  .store-card__actions .btn {
    flex: none;
    width: 100%;
    padding: 7px 8px;
    font-size: 11px;
  }
}

@supports not (container-type: inline-size) {
  @media (max-width: 420px) {
    .store-card__actions {
      flex-direction: column;
      align-items: stretch;
      gap: 5px;
    }

    .store-card__actions .btn {
      flex: none;
      width: 100%;
      padding: 7px 8px;
      font-size: 11px;
    }
  }
}

.category-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.category-tiles--h-scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
  margin-inline: -2px;
  padding-inline: 2px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.category-tiles--h-scroll .category-tile {
  flex: 0 0 clamp(132px, 46vw, 200px);
  width: clamp(132px, 46vw, 200px);
  max-width: 100%;
  scroll-snap-align: start;
}

/* /shop/categories — همهٔ دسته‌ها در گرید عمودی؛ بدون اسکرول افقی */
.category-tiles.category-tiles--browse-all {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  overflow: visible;
  margin-inline: 0;
  padding-inline: 0;
  padding-bottom: 0;
}

.category-tiles.category-tiles--browse-all .category-tile {
  width: auto;
  max-width: none;
  min-height: 118px;
  scroll-snap-align: unset;
}

@media (min-width: 480px) {
  .category-tiles.category-tiles--browse-all {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .category-tiles.category-tiles--browse-all {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }

  .category-tiles.category-tiles--browse-all .category-tile {
    min-height: 132px;
  }
}

/* صفحهٔ اصلی: دسته‌بندی‌ها ۲ ردیف × ۴ ستون، بدون اسکرول افقی */
.category-tiles.category-tiles--home-eight {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  overflow: visible;
  margin-inline: 0;
  padding-inline: 0;
  padding-bottom: 0;
}

.category-tiles.category-tiles--home-eight .category-tile {
  width: auto;
  max-width: none;
  min-height: 104px;
  scroll-snap-align: unset;
}

.category-tiles.category-tiles--home-eight .category-tile__content {
  min-height: 104px;
  padding: 8px 6px;
}

.category-tiles.category-tiles--home-eight .category-tile__content strong {
  font-size: 12px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-tiles.category-tiles--home-eight .category-tile__content small {
  font-size: 10px;
}

.category-tiles.category-tiles--home-eight .category-tile__icon {
  font-size: 16px;
}

.category-tiles.category-tiles--home-eight .home-see-all-card {
  width: 100%;
  min-width: 0;
  min-height: 104px;
  border-radius: 14px;
  align-self: stretch;
}

.category-tiles.category-tiles--home-eight .home-see-all-card .home-see-all-card__stack {
  gap: 8px;
}

.category-tiles.category-tiles--home-eight .home-see-all-card .home-see-all-card__illus {
  width: 44px;
}

.category-tiles.category-tiles--home-eight .home-see-all-card .home-see-all-card__label {
  font-size: 12px;
  max-width: 100%;
}

.category-tile {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  display: block;
  min-height: 130px;
  color: #fff;
  text-decoration: none;
}

.category-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  position: absolute;
  inset: 0;
}

.category-tile__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2,6,23,0.2), rgba(2,6,23,0.82));
}

.category-tile__content {
  position: relative;
  z-index: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 130px;
  gap: 4px;
}

.category-tile__icon {
  font-size: 20px;
}

.category-tile__content strong {
  font-size: 14px;
}

.category-tile__content small {
  color: #cbd5e1;
  font-size: 11px;
}

.brand-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.brand-pill {
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-pill span {
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
}

.brand-pill small {
  color: var(--text-secondary);
  font-size: 11px;
}

/* ── باندل‌های صفحه اصلی ── */
.bundle-cards-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 640px) {
  .bundle-cards-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .bundle-cards-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.bundle-home-card {
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 14px;
  padding: 14px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}

.bundle-home-card:hover,
.bundle-home-card:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 4px 18px rgba(0,0,0,.12);
  transform: translateY(-2px);
}

.bundle-home-card__icon {
  color: var(--accent);
  display: flex;
  align-items: center;
  margin-bottom: 2px;
}

.bundle-home-card__name {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.bundle-home-card__count {
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
}

.bundle-home-card__desc {
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.5;
}

body.catalog-search-modal-open {
  overflow: hidden;
  touch-action: none;
}

/* فاصله از بالای صفحه تا زیر نوار جستجو — با JS روی :root ست می‌شود تا پس‌زمینه و جعبه نتایج روی فیلد جستجو نیفتند */
:root {
  --catalog-search-modal-top: 132px;
}

.catalog-search-modal {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--catalog-search-modal-top) 12px 24px;
  box-sizing: border-box;
  pointer-events: none;
}

.catalog-search-modal.hidden {
  display: none;
}

.catalog-search-modal__backdrop {
  position: fixed;
  z-index: 0;
  left: 0;
  right: 0;
  bottom: 0;
  top: var(--catalog-search-modal-top);
  background: rgba(0, 0, 0, 0.55);
  pointer-events: auto;
}

.catalog-search-modal__dialog {
  position: relative;
  z-index: 1;
  pointer-events: auto;
  flex-shrink: 0;
  width: min(94vw, 440px);
  max-height: min(72vh, 520px);
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.catalog-search-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.catalog-search-modal__title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.catalog-search-modal__close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.catalog-search-modal__close:hover {
  background: var(--nav-hover);
}

.catalog-search-modal__list {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px 8px 12px;
}

.catalog-search-modal__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px;
  margin-bottom: 4px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.catalog-search-modal__row:last-child {
  margin-bottom: 0;
}

.catalog-search-modal__row:hover,
.catalog-search-modal__row:focus-visible {
  background: var(--surface-2);
  border-color: var(--card-border);
}

.catalog-search-modal__thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.catalog-search-modal__row-body {
  min-width: 0;
  flex: 1;
}

.catalog-search-modal__row-title {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.35;
  color: var(--text);
}

.catalog-search-modal__row-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.catalog-search-modal__row-price {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 4px;
}

.catalog-search-modal__empty {
  margin: 0;
  padding: 20px 16px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.quick-view-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
}

.quick-view-modal.hidden {
  display: none;
}

.quick-view-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
}

.quick-view-modal__card {
  position: relative;
  z-index: 1;
  width: min(92vw, 420px);
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 14px;
  display: grid;
  gap: 8px;
}

.quick-view-modal__close {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
}

.quick-view-modal__img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.quick-view-modal__card h3 {
  margin: 0;
  font-size: 16px;
  color: var(--text);
}

.quick-view-modal__card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.quick-view-modal__card strong {
  color: #22c55e;
  font-size: 15px;
}

.quick-view-modal__card span {
  color: var(--text-secondary);
  font-size: 13px;
}

.catalog .shop-section-head {
  grid-column: 1 / -1;
}

@media (min-width: 900px) {
  .app-shell {
    padding-top: 74px;
  }

  .shop-topbar {
    height: 64px;
    padding: 8px 22px;
  }

  .shop-topbar__brand strong {
    max-width: none;
    font-size: 14px;
  }

  .shop-topbar__menu {
    display: inline-flex;
  }

  .product-page {
    padding-bottom: 120px;
  }


  .shop-grid:not(.shop-grid--h-scroll) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }

  .shop-grid--h-scroll > .store-card,
  .shop-grid--h-scroll > .home-see-all-card {
    width: clamp(160px, 22vw, 220px);
  }

  .category-tiles:not(.category-tiles--h-scroll):not(.category-tiles--home-eight):not(.category-tiles--browse-all) {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .category-tiles.category-tiles--home-eight {
    gap: 10px;
  }

  .category-tiles.category-tiles--home-eight .category-tile,
  .category-tiles.category-tiles--home-eight .category-tile__content {
    min-height: 128px;
  }

  .category-tiles.category-tiles--home-eight .category-tile__content {
    padding: 12px;
  }

  .category-tiles.category-tiles--home-eight .category-tile__content strong {
    font-size: 14px;
  }

  .category-tiles.category-tiles--home-eight .category-tile__content small {
    font-size: 11px;
  }

  .category-tiles.category-tiles--home-eight .category-tile__icon {
    font-size: 20px;
  }

  .category-tiles.category-tiles--home-eight .home-see-all-card {
    min-height: 128px;
  }

  .category-tiles.category-tiles--home-eight .home-see-all-card .home-see-all-card__illus {
    width: 52px;
  }

  .category-tiles.category-tiles--home-eight .home-see-all-card .home-see-all-card__label {
    font-size: 14px;
  }

  .category-tiles--h-scroll .category-tile {
    flex: 0 0 clamp(160px, 20vw, 220px);
    width: clamp(160px, 20vw, 220px);
  }

  .brand-strip {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* ─── پاپ‌آپ تبلیغ / اطلاعیه (صفحهٔ اصلی) ─── */
.lux-promo-modal {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 14px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.38s ease, visibility 0.38s ease;
}

.lux-promo-modal.lux-promo-modal--open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.lux-promo-open {
  overflow: hidden;
}

.lux-promo-modal__backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(15, 23, 42, 0.55), rgba(2, 6, 23, 0.88));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.lux-promo-modal__shell {
  position: relative;
  max-width: 420px;
  width: 100%;
  transform: translateY(18px) scale(0.96);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease;
}

.lux-promo-modal.lux-promo-modal--open .lux-promo-modal__shell {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.lux-promo-modal__glow {
  position: absolute;
  inset: -2px;
  border-radius: 22px;
  background: linear-gradient(
    135deg,
    rgba(251, 191, 36, 0.55),
    rgba(244, 63, 94, 0.35),
    rgba(99, 102, 241, 0.45)
  );
  filter: blur(12px);
  opacity: 0.75;
  z-index: 0;
}

.lux-promo-modal__card {
  position: relative;
  z-index: 1;
  border-radius: 20px;
  padding: 26px 22px 20px;
  background: linear-gradient(165deg, rgba(30, 41, 59, 0.97), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.lux-promo-modal__close {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.lux-promo-modal__close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.lux-promo-modal__badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.lux-promo-modal__badge--discount {
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.25), rgba(245, 158, 11, 0.15));
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.lux-promo-modal__badge--product {
  background: linear-gradient(90deg, rgba(129, 140, 248, 0.3), rgba(99, 102, 241, 0.15));
  color: #c7d2fe;
  border: 1px solid rgba(165, 180, 252, 0.35);
}

.lux-promo-modal__title {
  margin: 0 0 10px;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.35;
  color: #f8fafc;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.lux-promo-modal__body {
  margin: 0 0 16px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.75;
}

.lux-promo-modal__body p {
  margin: 0 0 8px;
}

.lux-promo-modal__code-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px dashed rgba(251, 191, 36, 0.45);
}

.lux-promo-modal__code-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(252, 211, 77, 0.85);
}

.lux-promo-modal__code {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fef3c7;
}

.lux-promo-modal__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 4px;
}

.lux-promo-modal__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s;
}

.lux-promo-modal__btn:active {
  transform: scale(0.98);
}

.lux-promo-modal__btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lux-promo-modal__btn--ghost:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

.lux-promo-modal__btn--primary {
  background: linear-gradient(135deg, #f59e0b, #ea580c, #c026d3);
  color: #fff;
  box-shadow: 0 10px 28px rgba(234, 88, 12, 0.35);
}

.lux-promo-modal__btn--primary:hover {
  box-shadow: 0 12px 32px rgba(234, 88, 12, 0.5);
}

.lux-promo-modal__btn--compact {
  min-height: 38px;
  padding: 0 12px;
  font-size: 13px;
}

/* ── صفحه باندل سفارشی ── */
.bundle-customize-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text);
}
.bundle-customize-header__counter {
  font-size: 13px;
  color: var(--accent);
  font-weight: 700;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 20px;
  padding: 3px 12px;
}
.bundle-customize-progress {
  height: 5px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 18px;
}
.bundle-customize-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #fff));
  border-radius: 3px;
  transition: width .3s ease;
  min-width: 4px;
}
.bundle-customize-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.bundle-customize-card {
  position: relative;
  border: 2px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .1s;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  user-select: none;
}
.bundle-customize-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
}
.bundle-customize-card--selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
.bundle-customize-card__check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, border-color .15s;
  z-index: 1;
}
.bundle-customize-card--selected .bundle-customize-card__check {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.bundle-customize-card__check svg {
  width: 13px;
  height: 13px;
  opacity: 0;
  transition: opacity .15s;
}
.bundle-customize-card--selected .bundle-customize-card__check svg { opacity: 1; }
.bundle-customize-card__img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--bg);
}
.bundle-customize-card__img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.bundle-customize-card__body {
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}
.bundle-customize-card__name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bundle-customize-card__brand {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}
.bundle-customize-card__price {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin: 4px 0 0;
  direction: ltr;
  text-align: right;
}
.bundle-customize-footer {
  position: sticky;
  bottom: 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 14px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10;
}
.bundle-customize-footer__prices {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.bundle-customize-footer__original {
  font-size: 13px;
  color: var(--muted);
  text-decoration: line-through;
}
.bundle-customize-footer__badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 20px;
  padding: 2px 8px;
}
.bundle-customize-footer__price {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}
.bundle-customize-footer__saving {
  font-size: 12px;
  color: #16a34a;
  margin: 0;
}
.bundle-customize-footer__btn {
  width: 100%;
  min-height: 48px;
}
.bundle-customize-footer__btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ── نوار پیشرفت تخفیف خودکار سبد ── */
.auto-discount-bar {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 12px;
}
.auto-discount-bar__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}
.auto-discount-bar__row:last-child {
  border-bottom: none;
}
.auto-discount-bar__row--achieved {
  background: color-mix(in srgb, #22c55e 10%, transparent);
}
.auto-discount-bar__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.auto-discount-bar__icon--check {
  color: #22c55e;
}
.auto-discount-bar__icon--gift {
  color: var(--accent);
}
.auto-discount-bar__text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.auto-discount-bar__text strong {
  font-size: 13px;
  color: var(--text);
}
.auto-discount-bar__text span {
  font-size: 12px;
  color: var(--muted);
}
.auto-discount-bar__badge {
  font-size: 11px;
  font-weight: 700;
  color: #16a34a;
  background: color-mix(in srgb, #22c55e 18%, transparent);
  border: 1px solid color-mix(in srgb, #22c55e 35%, transparent);
  border-radius: 20px;
  padding: 2px 8px;
  white-space: nowrap;
}
.auto-discount-bar__progress {
  height: 5px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  border-radius: 0;
  overflow: hidden;
}
.auto-discount-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #fff));
  border-radius: 0;
  transition: width .4s ease;
  min-width: 4px;
}
.auto-discount-bar--compact .auto-discount-bar__row {
  padding: 9px 12px;
}
.auto-discount-bar--compact .auto-discount-bar__text strong {
  font-size: 12px;
}
.auto-discount-bar--compact .auto-discount-bar__text span {
  font-size: 11px;
}

