/* ==========================================================================
   AVAN — فروشگاه آنلاین کفش | Design System
   فونت: IRANYekan | جهت: RTL | استایل: Premium Minimal Flat
   ========================================================================== */

/* --- IRANYekan Font --- */
@font-face {
  font-family: 'IRANYekan Fallback';
  src: local('Tahoma');
  size-adjust: 96%;
  ascent-override: 88%;
  descent-override: 26%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'IRANYekan';
  font-style: normal;
  font-weight: 400;
  font-display: fallback;
  src: url('/static/fonts/iranyekan/IRANYekanWebRegular.woff2') format('woff2');
}
@font-face {
  font-family: 'IRANYekan';
  font-style: normal;
  font-weight: 500;
  font-display: fallback;
  src: url('/static/fonts/iranyekan/IRANYekanWebMedium.woff2') format('woff2');
}
@font-face {
  font-family: 'IRANYekan';
  font-style: normal;
  font-weight: 600;
  font-display: fallback;
  src: url('/static/fonts/iranyekan/IRANYekanWebBold.woff2') format('woff2');
}
@font-face {
  font-family: 'IRANYekan';
  font-style: normal;
  font-weight: 700;
  font-display: fallback;
  src: url('/static/fonts/iranyekan/IRANYekanWebBold.woff2') format('woff2');
}
@font-face {
  font-family: 'IRANYekan';
  font-style: normal;
  font-weight: 800;
  font-display: fallback;
  src: url('/static/fonts/iranyekan/IRANYekanWebExtraBold.woff2') format('woff2');
}
@font-face {
  font-family: 'IRANYekan';
  font-style: normal;
  font-weight: 900;
  font-display: fallback;
  src: url('/static/fonts/iranyekan/IRANYekanWebBlack.woff2') format('woff2');
}

/* --- Cross-document View Transitions — ناوبری MPA بدون فلش سفید ---
   مرورگرهای پشتیبان (Chrome 126+): محو نرم بین اسناد. سایر مرورگرها: بدون تغییر. */
@view-transition {
  navigation: auto;
}
::view-transition-old(root) {
  animation: vt-fade-out 0.18s ease both;
}
::view-transition-new(root) {
  animation: vt-fade-in 0.22s ease both;
}
@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-fade-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) { animation: none; }
}

/* --- Design Tokens --- */
:root {
  --color-primary: #2563EB;
  --color-primary-hover: #1D4ED8;
  --color-surface: #FFFFFF;
  --color-text: #111827;
  --color-text-muted: #6B7280;
  --color-bg: #F8FAFC;
  --color-success: #10B981;
  --color-danger: #EF4444;
  --color-border: #E5E7EB;

  --radius-card: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;

  --shadow-card: 0px 4px 16px rgba(0, 0, 0, 0.06);
  /* سایه هاور — دو لایه ظریف؛ ارتفاع و شدت کم تا کارت «بلند» به‌نظر نرسد */
  --shadow-hover: 0px 2px 6px rgba(17, 24, 39, 0.05), 0px 8px 18px rgba(17, 24, 39, 0.08);
  --shadow-modal: 0px 20px 40px rgba(0, 0, 0, 0.12);
}

/* --- Base --- */
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: 'IRANYekan', system-ui, -apple-system, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  margin: 0;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* محافظ سراسری: آیکون‌های SVG هرگز از حد معقول بزرگ‌تر نشوند */
svg { max-width: 100%; }

/* اعداد و قیمت‌ها با ارقام لاتین — tabular برای هم‌ترازی */
.tnum {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  direction: ltr;
  unicode-bidi: embed;
  display: inline-block;
}

/* --- آینه‌کردن آیکون‌های جهت‌دار در RTL --- */
[dir="rtl"] .rtl-flip {
  transform: scaleX(-1);
}

/* --- Scrollbar ظریف --- */
.scrollbar-thin::-webkit-scrollbar {
  height: 6px;
  width: 6px;
}
.scrollbar-thin::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 999px;
}
.scrollbar-thin::-webkit-scrollbar-track {
  background: transparent;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* --- انیمیشن‌های نرم --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
@keyframes slideOutRight {
  from { transform: translateX(0); }
  to { transform: translateX(100%); }
}
@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.animate-fade-up { animation: fadeInUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; }
.animate-fade-in { animation: fadeIn 0.4s ease both; }
.animate-scale-in { animation: scaleIn 0.25s cubic-bezier(0.22, 1, 0.36, 1) both; }

/* --- Skeleton loading --- */
.skeleton {
  background: linear-gradient(90deg, #EEF1F5 25%, #E2E8F0 37%, #EEF1F5 63%);
  background-size: 800px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

/* --- Product card hover --- */
.product-card {
  box-shadow: var(--shadow-card); /* سایه پایه اینجا (نه inline) تا :hover بتواند override کند */
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  text-decoration: none;
  color: inherit;
}
.product-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px); /* لیفت ظریف — 3px + سایه سنگین حس بزرگ‌نمایی می‌داد */
}
.product-card .product-image {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.product-card:hover .product-image {
  transform: scale(1.05);
}

/* --- Line clamp --- */
.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* --- Toast --- */
#toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

/* --- Drawer overlay --- */
.overlay-enter { animation: fadeIn 0.25s ease both; }
.drawer-enter { animation: slideInRight 0.3s cubic-bezier(0.22, 1, 0.36, 1) both; }
[dir="rtl"] .drawer-enter { animation: slideInRight 0.3s cubic-bezier(0.22, 1, 0.36, 1) both; }

/* حالت بسته‌شدن — انیمیشن خروج نرم */
#mobile-menu.is-closing .overlay-enter { animation: fadeOut 0.28s ease both; }
#mobile-menu.is-closing .drawer-enter { animation: slideOutRight 0.28s cubic-bezier(0.4, 0, 0.2, 1) both; }

/* --- پنل جستجوی تمام‌عرض موبایل (slide down از بالا) --- */
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }
@keyframes slideUp   { from { transform: translateY(0); } to { transform: translateY(-100%); } }
.search-panel-enter { animation: slideDown 0.28s cubic-bezier(0.22, 1, 0.36, 1) both; }
#mobile-search.is-closing .overlay-enter { animation: fadeOut 0.24s ease both; }
#mobile-search.is-closing .search-panel-enter { animation: slideUp 0.24s cubic-bezier(0.4, 0, 0.2, 1) both; }

/* --- Focus ring accessible --- */
.focus-ring:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* --- Focus-visible سراسری — WCAG 2.4.7: هر عنصر تعاملی بدون کلاس focus-ring هم نشانگر فوکوس می‌گیرد --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role='button']:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-primary, #2563eb);
  outline-offset: 2px;
  border-radius: 4px;
}
/* فیلدهایی که ring داخلی دارند، outline دوبل نگیرند */
.co-input:focus-visible,
.pp-input:focus-visible,
#search-input:focus-visible,
.newsletter-input:focus-visible {
  outline: none;
}

/* --- Skip Link — WCAG 2.4.1 --- */
.skip-link {
  position: fixed;
  top: -100px;
  right: 16px;
  z-index: 100;
  padding: 12px 20px;
  background: #2563eb;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border-radius: 12px;
  box-shadow: 0 8px 24px -6px rgba(37, 99, 235, 0.5);
  transition: top 0.2s ease;
}
.skip-link:focus-visible {
  top: 12px;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ==========================================================================
   HERO — بنر تمام‌عرض فقط-تصویر (بدون متن/دکمه/اورلی تیره)
   نسبت تصویر: دسکتاپ 3:1 (مثلاً 1920×640) — موبایل 4:3 (مثلاً 800×600)
   ========================================================================== */

/* Viewport — ارتفاع از نسبت تصویر می‌آید؛ تصویر همیشه وسط‌چین (object-cover center) */
.hero-viewport {
  aspect-ratio: 3 / 1;
  max-height: 640px;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.hero-viewport.is-dragging { cursor: grabbing; }
.hero-viewport.is-dragging .hero-slide { transition: none; }
/* موبایل: نسبت 4:3 تا بنر حضور کافی داشته باشد و وسط تصویر دیده شود */
@media (max-width: 640px) { .hero-viewport { aspect-ratio: 4 / 3; max-height: none; } }

.hero-slider { background: #f3f4f6; }

/* اسلایدها — فید نرم */
.hero-slide {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
  pointer-events: none;
}
.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.hero-dots, .hero-arrow { z-index: 30; }

/* فلش‌های ناوبری — دایره شیشه‌ای (روی هر تصویری خوانا) */
.hero-arrow {
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 9999px;
  place-items: center;
  background: rgba(17, 24, 39, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s ease;
}
.hero-arrow:hover { background: rgba(17, 24, 39, 0.55); }

/* دات‌ها — پیل با نوار پیشرفت + سایه برای خوانایی روی تصویر روشن
   نکته a11y: ناحیه لمس واقعی با padding نامرئی به ≥۲۴px افزایش یافته (HIG tap target) */
.hero-dot {
  position: relative;
  width: 26px;
  height: 6px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  transition: width 0.3s ease, background 0.3s ease;
}
/* \u0646\u0627\u062d\u06cc\u0647 \u0644\u0645\u0633 \u06af\u0633\u062a\u0631\u062f\u0647 \u0646\u0627\u0645\u0631\u0626\u06cc \u2014 \u062d\u062f\u0627\u0642\u0644 \u06f3\u06f2\u00d7\u06f3\u06f2px \u0628\u062f\u0648\u0646 \u062a\u063a\u06cc\u06cc\u0631 \u0638\u0627\u0647\u0631 (WCAG 2.5.8 / HIG tap target) */
.hero-dot::after {
  content: '';
  position: absolute;
  inset: -13px -8px;
}
/* fill \u062f\u0627\u062e\u0644 \u067e\u06cc\u0644 \u0645\u06cc\u200c\u0645\u0627\u0646\u062f \u2014 overflow \u0627\u0632 \u062e\u0648\u062f \u062f\u0627\u062a \u062d\u0630\u0641 \u0634\u062f \u062a\u0627 ::after \u0642\u0637\u0639 \u0646\u0634\u0648\u062f\u061b \u06af\u0631\u062f\u06cc \u0628\u0627 radius \u062e\u0648\u062f fill \u062d\u0641\u0638 \u0645\u06cc\u200c\u0634\u0648\u062f */
.hero-dot .hero-dot-fill { max-width: 100%; }
.hero-dot.is-active { width: 46px; background: rgba(255, 255, 255, 0.45); }
.hero-dot-fill {
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  border-radius: 9999px;
  background: #2563eb;
}
.hero-dot.is-active .hero-dot-fill {
  animation: dotProgress var(--hero-duration, 6.5s) linear forwards;
}
@keyframes dotProgress {
  from { width: 0%; }
  to { width: 100%; }
}

/* کاهش حرکت */
@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: opacity 0.2s ease; }
  .hero-dot.is-active .hero-dot-fill { animation: none; width: 100%; }
}

/* CTA اصلی — درخشش هنگام هاور */
.cta-primary { position: relative; overflow: hidden; }
.cta-primary::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent);
  transition: left 0.6s ease;
}
.cta-primary:hover::after { left: 130%; }

/* کارت‌های برند — لوگو همیشه با رنگ اصلی برند، بدون تغییر رنگ با هاور */
.brand-card { border: 1px solid transparent; }
.brand-card:hover { border-color: rgba(17, 24, 39, 0.08); box-shadow: 0 14px 30px -10px rgba(17, 24, 39, 0.18) !important; }

/* نوار برندها — marquee ملایم (baقی‌مانده) */
.brand-track { animation: marquee 28s linear infinite; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
[dir="rtl"] .brand-track { animation: marqueeRtl 28s linear infinite; }
@keyframes marqueeRtl {
  from { transform: translateX(0); }
  to { transform: translateX(50%); }
}

/* احترام به کاهش حرکت */
@media (prefers-reduced-motion: reduce) {
  .brand-track,
  .hero-dot.is-active .hero-dot-fill { animation: none !important; }
  .hero-slide { transition: opacity 0.3s ease; }
}

/* --- Range slider تخصصی --- */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--color-border);
  border-radius: 999px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--color-primary);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* ==========================================================================
   اسلایدر محصولات — ریسپانسیو، snap، اسکرول‌بار پنهان
   ========================================================================== */
/* نکتهٔ مهم: overflow-x:auto طبق مشخصات CSS باعث می‌شود overflow-y هم auto محاسبه شود؛
   یعنی خود ریل اسلایدر حرکت hover کارت به بالا (translateY) و سایه‌اش را clip می‌کند —
   نه والدی با overflow:hidden. راه‌حل در index.tsx: فضای تنفس با padding (pt-3 px-3 pb-6)
   که با margin منفی معادل جبران شده تا چیدمان ثابت بماند. */
.slider-track {
  scroll-behavior: smooth;
  scrollbar-width: none;              /* Firefox */
  -ms-overflow-style: none;           /* IE/Edge */
  scroll-padding-inline: 0.75rem;     /* هماهنگ با px-3 ریل */
}
.slider-track::-webkit-scrollbar { display: none; }  /* Chrome/Safari */

/* کشیدن با ماوس روی دسکتاپ */
@media (hover: hover) and (pointer: fine) {
  .slider-track { cursor: grab; }
  .slider-track.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;              /* هنگام درگ، بدون انیمیشن */
    scroll-snap-type: none;             /* اجازه‌ی حرکت آزاد در حین درگ */
  }
  .slider-track.is-dragging a,
  .slider-track.is-dragging img,
  .slider-track.is-dragging * { user-select: none; }
  /* هیرو */
  .hero-viewport { cursor: grab; }
  .hero-viewport.is-dragging { cursor: grabbing; }
  .hero-viewport.is-dragging * { user-select: none; }
  /* کنترل‌ها همیشه کرسر اشاره‌گر داشته باشند (نه grab) و در حین درگ هم قابل کلیک بمانند */
  .hero-viewport .hero-dot,
  .hero-viewport .hero-arrow { cursor: pointer; }
  .hero-viewport.is-dragging .hero-dot,
  .hero-viewport.is-dragging .hero-arrow { cursor: pointer; }
}

/* عرض هر آیتم بر اساس تعداد کارت قابل مشاهده در هر بریک‌پوینت.
   gap ~ 1rem را با calc جبران می‌کنیم تا لبه‌ی کارت بعدی «پیک» بخورد. */
.slider-item {
  flex: 0 0 auto;
  width: calc((100% - 0.6rem) / 1.3);       /* موبایل: ~۱.۳ کارت — لبه‌ی کارت بعدی مشخص */
}
@media (min-width: 480px) {
  .slider-item { width: calc((100% - 1rem) / 2); }     /* موبایل بزرگ: ۲ کارت */
}
@media (min-width: 640px) {
  .slider-item { width: calc((100% - 2rem) / 2.5); }   /* sm: ~۲.۵ */
}
@media (min-width: 768px) {
  .slider-item { width: calc((100% - 3rem) / 3); }     /* md: ۳ کارت دقیق */
}
@media (min-width: 1024px) {
  .slider-item { width: calc((100% - 4.5rem) / 4); }   /* lg: ۴ کارت دقیق */
}

/* دکمه‌های ناوبری */
.slider-btn {
  transition: opacity .25s ease, transform .2s ease, color .2s ease;
}
.slider-btn:not(:disabled):hover { transform: translateY(-50%) scale(1.06); }

/* در حالت لمسی، پرش نرم */
@media (hover: none) {
  .slider-track { scroll-snap-type: x mandatory; }
}

/* ==========================================================================
   وضعیت ورود / خروج (Fake Auth)
   پیش‌فرض روی <body data-auth="out">؛ JS مقدار را می‌خواند/می‌نویسد.
   عناصر .auth-in فقط هنگام ورود و .auth-out فقط هنگام خروج نمایش داده می‌شوند.
   نمایش پیش‌فرض این عناصر inline-flex است تا آیکن+متن درست بچینند.
   ========================================================================== */
.auth-in, .auth-out { display: none !important; }
body[data-auth="in"]  .auth-in  { display: inline-flex !important; align-items: center; justify-content: center; }
body[data-auth="out"] .auth-out { display: inline-flex !important; align-items: center; justify-content: center; }
/* منوی حساب (کانتینر dropdown) باید بلوک نسبی بماند، نه inline-flex، تا Panel درست جای‌گذاری شود */
body[data-auth="in"] [data-account-menu].auth-in { display: inline-block !important; }

/* آیتم‌های حساب در پایین Drawer موبایل:
   قانون عمومی بالا justify-content:center می‌دهد؛ اینجا با specificity بالاتر
   full-width و راست‌چین می‌کنیم تا هم‌راستا با آیتم‌های منو باشند. */
body[data-auth="in"] .auth-in.drawer-auth-item {
  display: flex !important;
  width: 100%;
  justify-content: flex-start;
  text-align: right;
}
/* آیتم‌های شبکه‌ای (bottom-nav) از flex-col استفاده می‌کنند؛ همچنان با inline-flex سازگارند */

/* ==========================================================================
   Dropdown منوی حساب کاربری (دسکتاپ)
   ========================================================================== */
.account-menu-panel {
  opacity: 0;
  transform: translateY(-6px) scale(0.97);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
}
.account-menu-panel.is-open {
  display: block !important;
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
[data-account-menu] [data-account-chevron] { transform: rotate(0deg); }
[data-account-menu].is-open [data-account-chevron] { transform: rotate(180deg); }

/* --- فرم خبرنامه: placeholder فارسی راست‌چین، ولی ایمیل تایپ‌شده (لاتین) LTR --- */
.newsletter-input:not(:placeholder-shown) {
  direction: ltr;
  text-align: left;
}

/* ==========================================================================
   Bottom Navigation — موبایل
   ========================================================================== */
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;                 /* gray-500 */
  position: relative;
  transition: color .2s ease, transform .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav-item span:last-child { line-height: 1; }
.bottom-nav-item:active { transform: scale(0.92); }
.bottom-nav-item.is-active { color: #2563eb; }   /* Royal Blue */
/* نشانگر فعال — خط کوچک بالای آیتم */
.bottom-nav-item.is-active::before {
  content: "";
  position: absolute;
  top: 0;
  width: 26px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: #2563eb;
}
/* سلول ثابت که آیتم فعال داخل آن تمام‌قد می‌نشیند (جلوگیری از شکستن شبکه) */
.bottom-nav-cell { display: block; height: 100%; }
.bottom-nav-cell .bottom-nav-item { width: 100%; height: 100%; }

/* آیتم‌های auth در bottom-nav باید flex ستونی بمانند */
body[data-auth="in"]  .bottom-nav-item.auth-in  { display: flex !important; }
body[data-auth="out"] .bottom-nav-item.auth-out { display: flex !important; }

/* توجه: فضای لازم برای نوار پایین توسط اسپیسر هم‌رنگ فوتر تأمین می‌شود
   (نه padding-bottom روی body)، تا هیچ ناحیه‌ی روشنی زیر فوتر تیره دیده نشود. */

/* نوار پایین: در موبایلِ صفحه محصول، وقتی CTA از دید خارج شود جای خود را به نوار خرید می‌دهد */
#bottom-nav {
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
#bottom-nav.bn-hidden {
  transform: translateY(110%);
  pointer-events: none;
}
@media (min-width: 768px) {
  #bottom-nav.bn-hidden { transform: none; pointer-events: auto; }
}

/* هدر پس از اسکرول: پس‌زمینه مات‌تر + سایه تا روی سکشن‌های تیره خوانا بماند */
#site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.97);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 4px 20px -6px rgba(17, 24, 39, 0.12);
  border-bottom-color: transparent;
}

/* ==================== اسلایدر نظرات (فقط موبایل) ====================
   موبایل: scroll-snap افقی بومی مرورگر (بدون JS برای حرکت) + دات‌های همگام.
   md+: به گرید ۳ستونه برمی‌گردد و این قوانین بی‌اثر می‌شوند. */
.testimonials-track {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;                 /* Firefox */
  overscroll-behavior-x: contain;        /* جلوگیری از سرریز اسکرول افقی */
}
.testimonials-track::-webkit-scrollbar { display: none; }
.testimonials-track:focus-visible { outline: 2px solid #2563eb; outline-offset: 4px; border-radius: 12px; }

.testimonial-dot {
  width: 8px; height: 8px;
  border-radius: 9999px;
  background: #d1d5db;
  transition: all 0.3s ease;
}
.testimonial-dot.is-active { width: 22px; background: #2563eb; }

/* ==================== صفحه جزئیات محصول (Product Page) ====================
   پیشوند pp- برای همه‌ی کلاس‌های این صفحه. تعاملات در app.js → initProductPage() */

/* --- کلیک روی گالری = بازشدن لایت‌باکس (زوم حذف شد) --- */
.pp-gallery-main .pp-slide { cursor: pointer; overflow: hidden; }

/* --- انتخاب‌گر رنگ --- */
.pp-color {
  border-color: rgba(17, 24, 39, 0.12);
  position: relative;
}
.pp-color.is-selected {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--color-primary);
}
/* تیک روی رنگ انتخاب‌شده — SVG داخلی؛ مستقل از جهت صفحه (RTL-safe) */
.pp-color.is-selected::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 14px; height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  filter: drop-shadow(0 0 1.5px rgba(0, 0, 0, 0.5));
}

/* --- انتخاب‌گر سایز --- */
.pp-size:hover { border-color: #9CA3AF; }
.pp-size.is-selected {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.30);
}
/* لرزش نرم گروه سایزها وقتی بدون انتخاب سایز روی خرید کلیک شود */
@keyframes ppShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(4px); }
  75% { transform: translateX(-4px); }
}
#pp-sizes.is-shaking { animation: ppShake 0.28s ease 2; }

/* --- تب‌ها: زیرخط لغزنده با ::after --- */
.pp-tab::after {
  content: '';
  position: absolute;
  bottom: -1px;
  right: 12px; left: 12px;
  height: 2.5px;
  border-radius: 999px;
  background: var(--color-primary);
  transform: scaleX(0);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.pp-tab.is-active::after { transform: scaleX(1); }

/* ورود نرم پنل تب هنگام سوییچ */
.pp-panel { animation: fadeInUp 0.35s cubic-bezier(0.22, 1, 0.36, 1) both; }
.pp-panel.hidden { animation: none; }

/* --- نوار خرید چسبان موبایل — سایه‌ی رو به بالا + ورود نرم --- */
.pp-buybar {
  box-shadow: 0 -8px 24px rgba(17, 24, 39, 0.08);
  transform: translateY(110%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.pp-buybar.is-shown { transform: translateY(0); }
/* جای خالی اضافه در انتهای صفحه محصول در موبایل تا محتوا زیر نوار خرید نماند */
@media (max-width: 767px) {
  body.has-buybar main { padding-bottom: 76px; }
}

/* --- ورود نرم حالت «در سبد» (شمارنده + مشاهده سبد خرید) --- */
.pp-cart-state:not(.hidden) { animation: fadeInUp 0.3s cubic-bezier(0.22, 1, 0.36, 1) both; }

/* --- بندانگشتی‌های گالری — انتخاب با ring داخلی (بدون تغییر layout) --- */
.pp-thumb {
  position: relative;
  border: 2px solid transparent;
}
.pp-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid transparent;
  transition: border-color 0.2s;
  pointer-events: none;
}
.pp-thumb:hover::after { border-color: #e5e7eb; }
.pp-thumb.is-active { border-color: var(--color-primary); }
.pp-thumb.is-active::after { border-color: transparent; }

/* --- شمارنده تعداد (pill) — حالت «در سبد» --- */
.pp-stepper {
  background: #eff6ff; /* blue-50 */
  border: 1.5px solid #bfdbfe; /* blue-200 */
  box-shadow: inset 0 1px 2px rgba(37, 99, 235, 0.06);
}
.pp-step-btn {
  background: #fff;
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.1);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.pp-step-btn:hover { box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2); }
.pp-step-btn:active { transform: scale(0.9); }
.pp-step-btn:disabled { opacity: 0.35; box-shadow: none; transform: none; cursor: default; }
/* پالس کوتاه عدد هنگام تغییر */
@keyframes ppQtyPulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  100% { transform: scale(1); }
}
.pp-qty-val.is-bumping { display: inline-block; animation: ppQtyPulse 0.28s cubic-bezier(0.22, 1, 0.36, 1); }

/* --- گالری اسلایدی: نقطه‌های نشانگر (فقط موبایل/تبلت) --- */
.pp-dot {
  width: 8px; height: 8px;
  border-radius: 9999px;
  background: rgba(17, 24, 39, 0.25);
  padding: 0;
  position: relative;
  transition: width 0.25s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.25s;
}
/* بزرگ‌کردن ناحیه لمس دات‌ها بدون تغییر ظاهر */
.pp-dot::after {
  content: '';
  position: absolute;
  inset: -9px -8px;
}
.pp-dot.is-active {
  width: 20px;
  background: var(--color-primary);
}
/* ترک اسلاید — رفتار لمسی نرم */
.pp-track { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
/* درگ با ماوس در بریک‌پوینت موبایل: snap موقتاً غیرفعال تا درگ نرم باشد */
.pp-track.is-dragging { scroll-snap-type: none; scroll-behavior: auto; cursor: grabbing; }
.pp-track.is-dragging img { pointer-events: none; user-select: none; }

/* راهنمای سوایپ گالری موبایل — پالس ملایم، با اولین تعامل محو می‌شود */
.pp-swipe-hint { animation: ppHintPulse 1.8s ease-in-out infinite; transition: opacity 0.4s ease; }
.pp-swipe-hint.is-gone { opacity: 0; animation: none; }
.pp-hint-arrow { animation: ppHintArrow 1.8s ease-in-out infinite; }
@keyframes ppHintPulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}
@keyframes ppHintArrow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .pp-swipe-hint, .pp-hint-arrow { animation: none; }
}

/* --- فرم ثبت دیدگاه --- */
.pp-review-form-wrap:not(.hidden) { animation: fadeInUp 0.35s cubic-bezier(0.22, 1, 0.36, 1) both; }
.pp-input:focus {
  background: #fff;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  outline: none;
}
.pp-input.is-invalid { background: #fef2f2; border-color: #fca5a5; }
.pp-input.is-invalid:focus { box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1); }
select.pp-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' 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 14px center;
  background-size: 16px;
  padding-left: 40px;
}
.pp-rate-star { transition: transform 0.15s cubic-bezier(0.22, 1, 0.36, 1); }
.pp-rate-star:hover { transform: scale(1.15); }
.pp-rate-star:active { transform: scale(0.95); }
.pp-my-review { animation: fadeInUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) both; }
/* جای فرم زیر هدر چسبان گیر نکند */
#pp-review-form-wrap { scroll-margin-top: 96px; }

/* ==========================================================================
   صفحه محصولات (PLP) — فیلترها، سورت، صفحه‌بندی، شیت‌های موبایل
   ========================================================================== */

/* --- گروه فیلتر (آکاردئون) --- */
.plp-fgroup .plp-fgroup-body { display: none; }
.plp-fgroup.is-open .plp-fgroup-body { display: block; animation: fadeInUp 0.25s ease both; }
.plp-fgroup.is-open .plp-fgroup-chev { transform: rotate(180deg); }

/* --- چک‌باکس سفارشی --- */
.plp-check-box {
  width: 18px; height: 18px; border-radius: 6px;
  border: 1.5px solid #D1D5DB; background: #fff;
  display: grid; place-items: center; color: #fff;
  transition: all 0.15s ease; flex-shrink: 0;
}
.plp-check-box svg { opacity: 0; transform: scale(0.5); transition: all 0.15s ease; }
.plp-check-input:checked + .plp-check-box {
  background: var(--color-primary); border-color: var(--color-primary);
}
.plp-check-input:checked + .plp-check-box svg { opacity: 1; transform: scale(1); }
.plp-check-input:focus-visible + .plp-check-box { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25); }

/* --- سایز (چیپ‌های مربعی خودکفا — بدون وابستگی به کلاس‌های tailwind تا با .tnum تداخل نکند) --- */
.plp-size { display: block; }
.plp-size-box {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 40px; border-radius: 10px;
  border: 1.5px solid #E5E7EB; background: #fff;
  font-size: 14px; font-weight: 600; color: #374151;
  font-feature-settings: "tnum"; font-variant-numeric: tabular-nums;
  transition: all 0.15s ease; user-select: none;
}
.plp-size-box:hover { border-color: #9CA3AF; background: #F9FAFB; }
.plp-size input:checked + .plp-size-box {
  background: #111827; color: #fff; border-color: #111827; font-weight: 700;
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.25);
}
.plp-size input:focus-visible + .plp-size-box { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25); }

/* --- رنگ --- */
.plp-color input:checked + .plp-color-dot {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--color-primary);
}
.plp-color input:checked + .plp-color-dot .plp-color-check { opacity: 1; }
.plp-color input:focus-visible + .plp-color-dot { box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(37, 99, 235, 0.5); }
.plp-color-dot:hover { transform: scale(1.1); }

/* --- سوییچ (Toggle) --- */
.plp-toggle-track {
  position: relative; width: 40px; height: 22px; border-radius: 999px;
  background: #E5E7EB; transition: background 0.2s ease; flex-shrink: 0;
}
.plp-toggle-thumb {
  position: absolute; top: 2px; right: 2px; width: 18px; height: 18px;
  border-radius: 999px; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.plp-toggle-input:checked ~ .plp-toggle-track { background: var(--color-primary); }
.plp-toggle-input:checked ~ .plp-toggle-track .plp-toggle-thumb { transform: translateX(-18px); }
.plp-toggle-input:focus-visible ~ .plp-toggle-track { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25); }

/* --- فیلدهای نمایش مقدار قیمت --- */
.plp-price-field {
  display: flex; align-items: baseline; gap: 5px;
  padding: 8px 10px; border-radius: 10px;
  background: #F9FAFB; border: 1px solid #F3F4F6;
  min-width: 0;
}
.plp-price-field-label { font-size: 11px; color: #9CA3AF; flex-shrink: 0; }
.plp-price-field-value { font-size: 13px; font-weight: 800; color: #111827; white-space: nowrap; }
.plp-price-field-unit { font-size: 11px; color: #9CA3AF; flex-shrink: 0; }

/* --- اسلایدر قیمت دوطرفه (RTL) ---
   نکته: سلکتور input[type="range"].plp-range-input لازم است تا بر قانون
   سراسری input[type="range"] (با specificity بالاتر) غلبه کند —
   وگرنه height:4px و پس‌زمینه خاکستری آن روی اسلایدر PLP اعمال می‌شود. */
input[type="range"].plp-range-input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  appearance: none; -webkit-appearance: none; background: transparent;
  pointer-events: none; margin: 0;
}
input[type="range"].plp-range-input::-webkit-slider-thumb {
  -webkit-appearance: none; pointer-events: auto;
  width: 22px; height: 22px; border-radius: 999px;
  background: var(--color-primary); border: 4px solid #fff;
  box-shadow: 0 0 0 1px #D1D5DB, 0 2px 6px rgba(0, 0, 0, 0.2); cursor: grab;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
input[type="range"].plp-range-input::-webkit-slider-thumb:hover {
  transform: scale(1.12);
  box-shadow: 0 0 0 1px var(--color-primary), 0 0 0 6px rgba(37, 99, 235, 0.12), 0 2px 6px rgba(0, 0, 0, 0.2);
}
input[type="range"].plp-range-input::-webkit-slider-thumb:active { cursor: grabbing; transform: scale(1.05); }
input[type="range"].plp-range-input::-moz-range-thumb {
  pointer-events: auto; width: 22px; height: 22px; border-radius: 999px;
  background: var(--color-primary); border: 4px solid #fff;
  box-shadow: 0 0 0 1px #D1D5DB, 0 2px 6px rgba(0, 0, 0, 0.2); cursor: grab;
}
input[type="range"].plp-range-input::-moz-range-track { background: transparent; }
.plp-range-fill { right: 0; left: 0; }

/* --- میان‌برهای بازه قیمت --- */
.plp-price-preset {
  font-size: 11px; font-weight: 600; color: #4B5563;
  background: #F3F4F6; border-radius: 999px; padding: 5px 10px;
  transition: all 0.15s ease; white-space: nowrap;
}
.plp-price-preset:hover { background: #E5E7EB; color: #111827; }
.plp-price-preset.is-active { background: #EFF6FF; color: var(--color-primary); box-shadow: inset 0 0 0 1.5px var(--color-primary); }

/* --- پیل‌های سورت (دسکتاپ) --- */
.plp-sort-pill { background: #F3F4F6; color: #4B5563; }
.plp-sort-pill:hover { background: #E5E7EB; color: #111827; }
.plp-sort-pill.is-active { background: #2563eb; color: #fff; font-weight: 700; box-shadow: 0 4px 12px -2px rgba(37, 99, 235, 0.35); }

/* --- گزینه‌های سورت (شیت موبایل) --- */
.plp-sort-radio {
  width: 20px; height: 20px; border-radius: 999px;
  border: 2px solid #D1D5DB; transition: all 0.15s ease; flex-shrink: 0;
}
.plp-sort-option.is-active { color: var(--color-primary); font-weight: 700; }
.plp-sort-option.is-active .plp-sort-radio {
  border-color: var(--color-primary);
  box-shadow: inset 0 0 0 4.5px var(--color-primary);
}

/* --- چیپ‌های فیلتر فعال --- */
.plp-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: 999px;
  background: #EFF6FF; color: #1D4ED8;
  font-size: 12px; font-weight: 600;
  border: 1px solid #DBEAFE; transition: all 0.15s ease;
  animation: fadeInUp 0.25s ease both;
}
.plp-chip:hover { background: #DBEAFE; }
.plp-chip svg { color: #60A5FA; }
.plp-chip:hover svg { color: #1D4ED8; }
.plp-chip-clear { background: #FEF2F2; color: #DC2626; border-color: #FECACA; }
.plp-chip-clear:hover { background: #FEE2E2; }

/* --- صفحه‌بندی --- */
.plp-page-btn {
  min-width: 40px; height: 40px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; background: #fff; color: #4B5563;
  font-size: 14px; font-weight: 600;
  border: 1px solid var(--color-border);
  transition: all 0.15s ease;
}
.plp-page-btn:hover:not(:disabled):not(.is-active) { border-color: #9CA3AF; color: #111827; }
.plp-page-btn.is-active {
  background: #2563EB; color: #fff; border-color: #2563EB;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}
.plp-page-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.plp-page-dots { color: #9CA3AF; padding: 0 4px; user-select: none; }

/* --- انیمیشن ورود کارت‌ها --- */
.plp-card-in { animation: fadeInUp 0.35s cubic-bezier(0.22, 1, 0.36, 1) both; }
#plp-grid > .plp-card-in:nth-child(2) { animation-delay: 0.03s; }
#plp-grid > .plp-card-in:nth-child(3) { animation-delay: 0.06s; }
#plp-grid > .plp-card-in:nth-child(4) { animation-delay: 0.09s; }
#plp-grid > .plp-card-in:nth-child(5) { animation-delay: 0.12s; }
#plp-grid > .plp-card-in:nth-child(6) { animation-delay: 0.15s; }
#plp-grid > .plp-card-in:nth-child(n+7) { animation-delay: 0.18s; }

/* --- شیت‌های موبایل (Bottom Sheet) --- */
#plp-filter-drawer .plp-sheet-overlay,
#plp-sort-sheet .plp-sheet-overlay { animation: fadeIn 0.25s ease both; }
#plp-filter-drawer .plp-sheet,
#plp-sort-sheet .plp-sheet { animation: plpSheetUp 0.3s cubic-bezier(0.22, 1, 0.36, 1) both; }
#plp-filter-drawer.is-closing .plp-sheet-overlay,
#plp-sort-sheet.is-closing .plp-sheet-overlay { animation: fadeOut 0.25s ease both; }
#plp-filter-drawer.is-closing .plp-sheet,
#plp-sort-sheet.is-closing .plp-sheet { animation: plpSheetDown 0.25s cubic-bezier(0.4, 0, 0.2, 1) both; }
@keyframes plpSheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes plpSheetDown { from { transform: translateY(0); } to { transform: translateY(100%); } }

/* --- اسکرول‌بار مخفی برای نوار پیل‌ها --- */
.no-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* سایدبار: اسکرول‌بار ظریف */
#plp-sidebar { scrollbar-width: thin; scrollbar-color: #D1D5DB transparent; }
#plp-sidebar::-webkit-scrollbar { width: 4px; }
#plp-sidebar::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 4px; }

/* ==========================================================================
   صفحه سبد خرید (/cart)
   ========================================================================== */
/* نوار پیشرفت ارسال رایگان — گرادیانت آبی، سبز پس از تکمیل */
.cart-fs-bar {
  background: linear-gradient(90deg, #3B82F6, #2563EB);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s;
}
.cart-fs-bar.is-done { background: linear-gradient(90deg, #34D399, #10B981); }

/* ورود نرم ردیف‌های سبد */
.cart-row { animation: cartRowIn 0.35s ease both; }
@keyframes cartRowIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* اینپوت کوپن: uppercase خودکار برای UX بهتر */
.cart-coupon-input { text-transform: uppercase; }
.cart-coupon-input:disabled { opacity: 0.6; background: #F3F4F6; }

/* در موبایل، جای نوار پرداخت چسبان را پایین صفحه خالی کن */
@media (max-width: 1023px) {
  body:has(#cart-mobile-bar:not(.hidden)) #cart-page { padding-bottom: 76px; }
}

/* ==========================================================================
   صفحه تسویه حساب — /checkout
   ========================================================================== */

/* ---------- استپر ۳ مرحله‌ای ---------- */
.co-stepper { max-width: 480px; margin-inline: auto; }
.co-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 76px;
}
.co-step-dot {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 9999px;
  background: #fff;
  border: 2px solid #E5E7EB;
  color: #9CA3AF;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.co-step-dot .co-step-check { display: none; }
.co-step-label {
  font-size: 12px;
  font-weight: 600;
  color: #9CA3AF;
  transition: color 0.3s;
}
.co-step.is-active .co-step-dot {
  border-color: #2563EB;
  background: #2563EB;
  color: #fff;
  box-shadow: 0 6px 16px -4px rgba(37, 99, 235, 0.45), 0 0 0 5px rgba(37, 99, 235, 0.10);
}
.co-step.is-active .co-step-label { color: #111827; font-weight: 800; }
.co-step.is-done .co-step-dot {
  border-color: #10B981;
  background: #ECFDF5;
  color: #10B981;
}
.co-step.is-done .co-step-dot .co-step-icon { display: none; }
.co-step.is-done .co-step-dot .co-step-check { display: block; }
.co-step.is-done .co-step-label { color: #10B981; }
.co-step-line {
  flex: 1;
  height: 2px;
  background: #E5E7EB;
  border-radius: 2px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  min-width: 32px;
}
.co-step-line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #34D399, #10B981);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.co-step-line.is-done::after { transform: scaleX(1); }

/* ---------- ورود نرم پنل مرحله ---------- */
.co-panel:not(.hidden) { animation: coPanelIn 0.35s ease both; }
@keyframes coPanelIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- فیلدهای فرم ---------- */
.co-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 8px;
}
.co-input {
  width: 100%;
  height: 46px;
  padding-inline: 14px;
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  color: #111827;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.co-input::placeholder { color: #C4C9D2; }
.co-input:focus {
  background: #fff;
  border-color: #93C5FD;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}
.co-err {
  display: none;
  font-size: 11px;
  color: #EF4444;
  margin-top: 6px;
  font-weight: 500;
}
.co-field.is-invalid .co-err { display: block; }
.co-field.is-invalid .co-input {
  border-color: #FCA5A5;
  background: #FEF2F2;
}
.co-field.is-invalid .co-input:focus { box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.10); }

/* ---------- کارت‌های گزینه (ارسال / درگاه) ---------- */
.co-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 1.5px solid #E5E7EB;
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.co-option:hover { border-color: #BFDBFE; }
.co-option.is-selected {
  border-color: #2563EB;
  background: #EFF6FF;
  box-shadow: 0 4px 14px -6px rgba(37, 99, 235, 0.25);
}
.co-option-radio {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  border: 2px solid #D1D5DB;
  position: relative;
  transition: border-color 0.2s;
}
.co-option.is-selected .co-option-radio { border-color: #2563EB; }
.co-option.is-selected .co-option-radio::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 9999px;
  background: #2563EB;
  animation: coRadioIn 0.18s ease both;
}
@keyframes coRadioIn {
  from { transform: scale(0); }
  to { transform: scale(1); }
}
.co-option:has(input:focus-visible) {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

/* ---------- اسکرول لیست آیتم‌های خلاصه ---------- */
.co-items-scroll { scrollbar-width: thin; scrollbar-color: #E5E7EB transparent; }
.co-items-scroll::-webkit-scrollbar { width: 4px; }
.co-items-scroll::-webkit-scrollbar-thumb { background: #E5E7EB; border-radius: 4px; }

/* ---------- حلقه موفقیت ---------- */
.co-success-ring {
  animation: coPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  box-shadow: 0 0 0 10px rgba(16, 185, 129, 0.08), 0 0 0 22px rgba(16, 185, 129, 0.04);
}
@keyframes coPop {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   صفحه ورود / ثبت‌نام — /auth (الگوی دیجی‌کالا: موبایل + OTP)
   ========================================================================== */
.auth-card {
  box-shadow: 0 10px 40px -12px rgba(17, 24, 39, 0.1), 0 2px 8px rgba(17, 24, 39, 0.04);
}
.auth-panel {
  position: relative;
  animation: coPanelIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- دکمه بازگشت گوشه پنل --- */
.auth-back-btn {
  position: absolute;
  top: -6px;
  left: -6px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #9ca3af;
  transition: background 0.15s, color 0.15s;
}
.auth-back-btn:hover { background: #f3f4f6; color: #111827; }

/* --- ورودی اصلی (شماره / رمز) --- */
.auth-field { position: relative; }
.auth-input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1.5px solid #e5e7eb;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  background: #fff;
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  outline: none;
}
.auth-input::placeholder { color: #d1d5db; font-weight: 400; }
.auth-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}
.auth-field.is-invalid .auth-input {
  border-color: #ef4444;
  background: #fef2f2;
}
.auth-err {
  min-height: 18px;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #ef4444;
}

/* --- دکمه اصلی --- */
.auth-btn-primary {
  width: 100%;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  background: #2563eb;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 10px 24px -8px rgba(37, 99, 235, 0.45);
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s, opacity 0.15s;
}
.auth-btn-primary:hover:not(:disabled) { background: #1d4ed8; }
.auth-btn-primary:active:not(:disabled) { transform: scale(0.985); }
.auth-btn-primary:disabled {
  background: #e5e7eb;
  color: #9ca3af;
  box-shadow: none;
  cursor: not-allowed;
}

/* --- خانه‌های OTP --- */
.auth-otp-input {
  width: 50px;
  height: 58px;
  border: 1.5px solid #e5e7eb;
  border-radius: 14px;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  color: #111827;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s, transform 0.12s;
  outline: none;
  caret-color: #2563eb;
}
@media (max-width: 380px) {
  .auth-otp-input { width: 44px; height: 52px; font-size: 20px; }
}
.auth-otp-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}
.auth-otp-input.is-filled {
  border-color: #2563eb;
  background: #eff6ff;
  transform: scale(1.03);
}
.auth-otp-input.is-error {
  border-color: #ef4444;
  background: #fef2f2;
  color: #ef4444;
}
.auth-shake { animation: authShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97); }
@keyframes authShake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60% { transform: translateX(6px); }
}

/* --- دکمه چشم رمز عبور --- */
.auth-eye-btn {
  position: absolute;
  top: 26px;
  left: 14px;
  transform: translateY(-50%);
  color: #9ca3af;
  transition: color 0.15s;
}
.auth-eye-btn:hover { color: #374151; }

/* --- اسپینر داخل دکمه --- */
.auth-spinner {
  width: 17px;
  height: 17px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: authSpin 0.7s linear infinite;
}
.auth-btn-primary:disabled .auth-spinner {
  border-color: rgba(156, 163, 175, 0.35);
  border-top-color: #9ca3af;
}
@keyframes authSpin { to { transform: rotate(360deg); } }

/* --- بج مجیک‌کد تست --- */
.auth-magic {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px dashed #fbbf24;
  background: #fffbeb;
  color: #92400e;
  font-size: 12px;
  font-weight: 600;
}
.auth-magic b { font-weight: 800; letter-spacing: 2px; }

/* --- حلقه موفقیت --- */
.auth-success-ring {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dcfce7;
  color: #16a34a;
  box-shadow: 0 0 0 10px #f0fdf4;
  animation: coPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==========================================================================
   صفحه سفارش‌های من — /account/orders
   ========================================================================== */

/* --- تب‌های وضعیت --- */
.orders-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 38px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  color: #6b7280;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s, background 0.15s, box-shadow 0.15s;
}
.orders-tab:hover { border-color: #bfdbfe; color: #2563eb; }
.orders-tab.is-active {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 6px 16px -6px rgba(37, 99, 235, 0.4);
}
.orders-tab-count { font-size: 11px; opacity: 0.75; }
.orders-tab-count:empty { display: none; }

/* --- بج وضعیت --- */
.orders-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}
.orders-badge.is-processing { background: #eff6ff; color: #2563eb; }
.orders-badge.is-delivered  { background: #ecfdf5; color: #059669; }
.orders-badge.is-canceled   { background: #fef2f2; color: #dc2626; }

/* --- تایم‌لاین سه‌مرحله‌ای داخل کارت --- */
.orders-timeline {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0 2px;
}
.orders-tl-step {
  position: relative;
  padding-right: 14px;
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
  white-space: nowrap;
}
.orders-tl-step::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e5e7eb;
}
.orders-tl-step.is-done { color: #059669; }
.orders-tl-step.is-done::before { background: #10b981; }
.orders-tl-step.is-current { color: #2563eb; }
.orders-tl-step.is-current::before {
  background: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
  animation: ordersPulse 1.6s ease-in-out infinite;
}
@keyframes ordersPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18); }
  50% { box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.08); }
}
.orders-tl-line {
  flex: 1;
  height: 2px;
  min-width: 14px;
  border-radius: 2px;
  background: #e5e7eb;
}
.orders-tl-line.is-done { background: #10b981; }

/* --- کارت و جزئیات --- */
.orders-card { animation: coPanelIn 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
.orders-details { animation: ordersSlide 0.25s ease-out; }
@keyframes ordersSlide {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   صفحه حساب کاربری — /account (داشبورد پروفایل)
   ========================================================================== */
/* آیتم ناوبری سایدبار */
.acc-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #4b5563;
  text-align: right;
  transition: background .18s ease, color .18s ease;
  cursor: pointer;
}
.acc-nav-item:hover { background: #f9fafb; color: #111827; }
.acc-nav-item.is-active {
  background: #eff6ff;
  color: #2563eb;
  font-weight: 800;
}
.acc-nav-item.is-active .acc-nav-chev { opacity: 1; transform: translateX(-2px); }
.acc-nav-chev { opacity: 0; transition: opacity .18s ease, transform .18s ease; }
.acc-nav-item:hover .acc-nav-chev { opacity: .6; }
/* خروج از حساب — همیشه قرمز (نه فقط هنگام هاور) */
.acc-nav-item.is-danger { color: #ef4444; }
.acc-nav-item.is-danger:hover { background: #fef2f2; color: #dc2626; }
.acc-nav-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 11px;
  font-weight: 800;
}
.acc-nav-badge:empty { display: none; }

/* پنل‌ها — انیمیشن ورود
   نکته: transform ماندگارِ انیمیشن (fill both) stacking context می‌سازد؛
   بدون z-index بالاتر، پاپ‌اورهای داخل پنل (مثل دیت‌پیکر) زیر فوتر رندر می‌شدند. */
.acc-panel { position: relative; z-index: 10; animation: coPanelIn .3s ease both; }

/* کارت آمار داشبورد */
.acc-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-card);
  transition: transform .18s ease, box-shadow .18s ease;
}
.acc-stat:hover { transform: translateY(-3px); box-shadow: 0 10px 30px -8px rgb(2 6 23 / .12); }
.acc-stat-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  margin-bottom: 2px;
}
.acc-stat strong { font-size: 22px; font-weight: 800; color: #111827; line-height: 1; }
.acc-stat-label { font-size: 11px; color: #9ca3af; font-weight: 600; }

/* چیپ‌های تکمیل پروفایل */
.acc-hint-chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: #fffbeb;
  border: 1px dashed #fcd34d;
  color: #b45309;
  font-size: 11px;
  font-weight: 700;
  transition: background .15s ease;
  cursor: pointer;
}
.acc-hint-chip:hover { background: #fef3c7; }

/* ردیف سفارش اخیر */
.acc-recent-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #f3f4f6;
  transition: border-color .18s ease, background .18s ease;
}
.acc-recent-row:hover { border-color: #dbeafe; background: #fafcff; }
/* بج وضعیت + قیمت — دسکتاپ: کنار هم در انتهای ردیف */
.acc-recent-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
/* موبایل باریک: بج و قیمت زیر هم در ستون دوم — بدون شکستن و بهم‌ریختگی */
@media (max-width: 420px) {
  .acc-recent-row { align-items: flex-start; }
  .acc-recent-meta {
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }
}

/* خطای فیلد فرم */
.acc-field-err {
  font-size: 11px;
  color: #ef4444;
  font-weight: 600;
  margin-top: 6px;
  min-height: 14px;
}
.acc-field-err:empty { margin-top: 0; min-height: 0; }

/* کارت آدرس */
.acc-addr-card {
  border: 1px solid #f3f4f6;
  border-radius: 16px;
  padding: 16px;
  transition: border-color .18s ease;
  animation: coPanelIn .3s ease both;
}
.acc-addr-card:hover { border-color: #e5e7eb; }
.acc-addr-card.is-default { border-color: #bfdbfe; background: #fafcff; }
.acc-default-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 10px;
  font-weight: 800;
}
.acc-addr-act {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #9ca3af;
  transition: color .15s ease, background .15s ease;
  cursor: pointer;
}
.acc-addr-act:hover { color: #2563eb; background: #eff6ff; }

/* سنجه قدرت رمز */
.acc-strength-seg {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: #f3f4f6;
  transition: background .25s ease;
}

/* ==========================================================================
   صفحه جستجو — /search
   ========================================================================== */
/* هایلایت عبارت جستجو در نام/برند */
.sp-mark {
  background: #FEF08A;
  color: inherit;
  border-radius: 3px;
  padding: 0 1px;
}

/* چیپ پیشنهاد (پرطرفدار / حالت خالی) */
.sp-suggest-chip {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: #F3F4F6;
  color: #374151;
  font-size: 13px;
  font-weight: 600;
  transition: all .18s ease;
}
.sp-suggest-chip:hover {
  background: #DBEAFE;
  color: #1D4ED8;
  transform: translateY(-1px);
}

/* چیپ جستجوی اخیر — با دکمه حذف داخلی */
.sp-recent-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #E5E7EB;
  overflow: hidden;
  transition: border-color .18s ease;
}
.sp-recent-chip:hover { border-color: #BFDBFE; }
.sp-recent-go {
  padding: 8px 6px 8px 4px;
  padding-right: 14px;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
}
.sp-recent-go:hover { color: #1D4ED8; }
.sp-recent-del {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-left: 6px;
  border-radius: 999px;
  color: #9CA3AF;
  transition: all .15s ease;
}
.sp-recent-del:hover { background: #FEE2E2; color: #DC2626; }

/* --- رفع آیکون × دوبل: حذف دکمه پاک‌کردن بومی مرورگر روی input[type=search] --- */
/* ما دکمه پاک‌کردن سفارشی خودمان (#sp-clear و ...) را داریم؛ نسخه بومی WebKit/IE حذف می‌شود */
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}
input[type="search"]::-ms-clear,
input[type="search"]::-ms-reveal {
  display: none;
  width: 0;
  height: 0;
}

/* صفحه برندها — /brands */
@keyframes brands-marquee { from { transform: translateX(0); } to { transform: translateX(-33.33%); } }
#brands-hero .marquee-row { animation: brands-marquee 40s linear infinite; will-change: transform; }
@media (prefers-reduced-motion: reduce) { #brands-hero .marquee-row { animation: none; } }

/* ─── دیت‌پیکر شمسی حساب کاربری (تاریخ تولد) ─── */
.acc-dp {
  position: absolute;
  z-index: 40;
  top: calc(100% - 18px);
  right: 0;
  left: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  box-shadow: 0 20px 40px -12px rgba(17, 24, 39, 0.18);
  padding: 0.75rem;
  animation: acc-dp-in 0.18s ease;
}
@keyframes acc-dp-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.acc-dp-cols {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 0.375rem;
}
.acc-dp-col {
  height: 12.5rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 0.625rem;
  background: #f9fafb;
  padding: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
}
.acc-dp-col::-webkit-scrollbar { width: 4px; }
.acc-dp-col::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
.acc-dp-item {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #4b5563;
  padding: 0.5rem 0.25rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.12s, color 0.12s;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.acc-dp-item:hover { background: #eff6ff; color: #2563eb; }
.acc-dp-item.is-active { background: #2563eb; color: #fff; font-weight: 800; }
.acc-dp-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.625rem;
  padding-top: 0.625rem;
  border-top: 1px solid #f3f4f6;
}
.acc-dp-btn-ghost {
  font-size: 0.75rem;
  font-weight: 700;
  color: #9ca3af;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  transition: color 0.12s, background-color 0.12s;
}
.acc-dp-btn-ghost:hover { color: #ef4444; background: #fef2f2; }
.acc-dp-btn-ok {
  font-size: 0.8125rem;
  font-weight: 800;
  color: #fff;
  background: #2563eb;
  padding: 0.5rem 1.5rem;
  border-radius: 0.625rem;
  transition: background-color 0.12s;
}
.acc-dp-btn-ok:hover { background: #1d4ed8; }

/* ==========================================================================
   LIGHTBOX گالری محصول — تمام‌صفحه مشکی، مینیمال (الگوی دیجی‌کالا)
   بدون سایه/افکت سه‌بعدی — فقط انیمیشن اسلاید ۳۰۰ms روی ترک
   ========================================================================== */
.pp-lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: #000;
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}
.pp-lightbox.is-open {
  opacity: 1; visibility: visible;
  transition: opacity 0.25s ease;
}
/* قفل اسکرول بدنه هنگام باز بودن */
body.lb-locked { overflow: hidden; }

/* هدر — ضربدر (در RTL با row-reverse سمت چپ می‌افتد) + شمارنده */
.lbx-header {
  display: flex; flex-direction: row-reverse;
  align-items: center; justify-content: space-between;
  padding: 14px 18px;
  flex-shrink: 0;
}
.lbx-close {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border-radius: 9999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.15s ease;
}
.lbx-close:hover { background: rgba(255, 255, 255, 0.22); }
.lbx-counter { font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, 0.75); }

/* صحنه — تصویر وسط، همیشه fit (بدون کراپ) */
.lbx-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  /* اجازهٔ اسکرول عمودی به مرورگر، درگ افقی به دست ما (Pointer Events) */
  touch-action: pan-y;
  cursor: grab;
}
.lbx-stage:active { cursor: grabbing; }
.lbx-stage img { -webkit-user-drag: none; user-select: none; }
.lbx-track {
  display: flex;
  height: 100%;
  will-change: transform;
}
.lbx-slide {
  flex: 0 0 100%;
  height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 8px clamp(16px, 6vw, 96px);
}
.lbx-img {
  max-width: min(100%, 920px);
  max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  user-select: none; -webkit-user-select: none;
}

/* فلش‌ها — دایره سفید ساده، دو طرف (فقط دسکتاپ) */
.lbx-arrow {
  position: absolute; top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: 9999px;
  background: #fff;
  color: #111827;
  transition: transform 0.15s ease;
}
.lbx-arrow:hover { transform: translateY(-50%) scale(1.06); }
.lbx-prev { right: 20px; }
.lbx-next { left: 20px; }
@media (max-width: 640px) { .lbx-arrow { display: none; } }

/* نوار بندانگشتی پایین — اسکرول افقی، فعال با کادر سفید */
.lbx-thumbs {
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 12px 16px 16px;
  overflow-x: auto;
  flex-shrink: 0;
  scrollbar-width: none;
}
.lbx-thumbs::-webkit-scrollbar { display: none; }
@media (max-width: 640px) { .lbx-thumbs { justify-content: flex-start; } }
.lbx-thumb {
  flex: 0 0 auto;
  width: 56px; height: 56px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  opacity: 0.55;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}
.lbx-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lbx-thumb.is-active { border-color: #fff; opacity: 1; }
.lbx-thumb:hover { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .pp-lightbox { transition: none !important; }
  .lbx-track { transition: none !important; }
}

/* ==========================================================================
   کمبوباکس جستجوپذیر استان/شهرستان — .avan-combo
   select بومی مخفی می‌ماند (منبع مقدار فرم)؛ input + پنل جایگزین UI است
   ========================================================================== */
.avan-combo { position: relative; }
.avan-combo-native {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.avan-combo-input { cursor: pointer; }
.avan-combo-input:focus { cursor: text; }
.avan-combo.is-disabled .avan-combo-input { cursor: not-allowed; opacity: 0.6; }
/* شورون سمت چپ (RTL) — با باز شدن پنل می‌چرخد */
.avan-combo::after {
  content: '';
  position: absolute;
  left: 14px; top: 50%;
  width: 8px; height: 8px;
  margin-top: -6px;
  border-left: 2px solid #9ca3af;
  border-bottom: 2px solid #9ca3af;
  transform: rotate(-45deg);
  pointer-events: none;
  transition: transform 0.2s ease;
}
.avan-combo.is-open::after { transform: rotate(135deg); margin-top: -2px; }
.avan-combo-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0; left: 0;
  z-index: 40;
  max-height: 264px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 12px 32px -8px rgba(17, 24, 39, 0.16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s;
}
.avan-combo.is-open .avan-combo-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.avan-combo-opt {
  display: block;
  width: 100%;
  text-align: right;
  font-size: 13.5px;
  font-weight: 600;
  color: #374151;
  padding: 10px 14px;
  transition: background 0.1s ease;
}
.avan-combo-opt:hover, .avan-combo-opt.is-hi { background: #f3f4f6; }
.avan-combo-opt.is-selected { color: #2563eb; background: #eff6ff; }
.avan-combo-empty {
  font-size: 13px;
  font-weight: 600;
  color: #9ca3af;
  text-align: center;
  padding: 18px 14px;
}
