/* ═══════════════════════════════════════════════════════════
   Pasargad Shop — UI Kit v13
   ═══════════════════════════════════════════════════════════ */

/* ───── پالت گرم ───── */
:root {
  --ps-bg:        #f7f7f8;   /* پس‌زمینه کلی — خاکستری خیلی روشن */
  --ps-bg-2:      #f2f2f4;   /* کمی تیره‌تر برای سکشن‌های متناوب */
  --ps-card:      #ffffff;   /* کارت‌ها سفید */
  --ps-border:    #e5e5e8;
  --ps-text:      #1f2937;
  --ps-muted:     #6b7280;
}

/* ───── پس‌زمینه کلی — کرم گرم ───── */
html, body {
  background: var(--ps-bg) !important;
  background-color: var(--ps-bg) !important;
}

/* کارت‌های سفید روی کرم نرم‌تر دیده می‌شن */
.ps-card { background: var(--ps-bg-card) !important; }

/* بخش‌های خاکستری رو به کرم تبدیل کن */
.bg-gray-50,
.bg-gray-100 { background: var(--ps-bg-2) !important; }

/* ═══════════════════════════════════════════════════════════
   PRODUCT GRID
   3 ستون دسکتاپ — تک ستونه موبایل
   ═══════════════════════════════════════════════════════════ */
.ps-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;   /* پیش‌فرض: تک ستونه (موبایل) */
  gap: 12px !important;
  width: 100% !important;
  align-items: stretch !important;
}

/* تبلت کوچیک به بالا: ۲ ستون */
@media (min-width: 480px) {
  .ps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }
}

/* تبلت: ۳ ستون */
@media (min-width: 768px) {
  .ps-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 18px !important;
  }
}

/* دسکتاپ: ۳ ستون (مطابق درخواست) */
@media (min-width: 1024px) {
  .ps-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 20px !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   PRODUCT CARD
   ═══════════════════════════════════════════════════════════ */
.ps-card {
  display: flex !important;
  flex-direction: column !important;
  background: var(--ps-bg-card) !important;
  border: 1px solid var(--ps-line) !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  transition: transform .3s cubic-bezier(.22,1,.36,1),
              box-shadow .3s cubic-bezier(.22,1,.36,1) !important;
  position: relative !important;
  height: 100% !important;
}
.ps-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: var(--ps-shadow) !important;
}

/* ───── تصویر — ارتفاع کم روی موبایل ───── */
.ps-card__image {
  display: block !important;
  position: relative !important;
  aspect-ratio: 4 / 3 !important;   /* افقی‌تر — کمتر بلند */
  max-height: 200px !important;      /* سقف ارتفاع */
  background: linear-gradient(135deg, #eef4f0 0%, #e3ece7 100%) !important;
  overflow: hidden !important;
  text-decoration: none !important;
  flex-shrink: 0 !important;
}
.ps-card__image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  transition: transform .6s cubic-bezier(.22,1,.36,1) !important;
}
.ps-card:hover .ps-card__image img { transform: scale(1.05) !important; }

/* ───── موبایل: عکس کوچیک‌تر ───── */
@media (max-width: 479px) {
  .ps-card__image {
    aspect-ratio: 16 / 10 !important;   /* افقی‌تر */
    max-height: 170px !important;
  }
}

/* ───── تبلت: متوسط ───── */
@media (min-width: 480px) and (max-width: 767px) {
  .ps-card__image {
    aspect-ratio: 4 / 3 !important;
    max-height: 180px !important;
  }
}

.ps-card__noimg {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  height: 100% !important;
  gap: 6px !important;
  color: rgba(11,107,58,.35) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
}

.ps-card__badge {
  position: absolute !important;
  top: 10px !important;
  left: 10px !important;
  background: linear-gradient(135deg, #e6c64a, #c9a52e) !important;
  color: #1a1a1a !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  padding: 4px 8px !important;
  border-radius: 999px !important;
  z-index: 2 !important;
  box-shadow: 0 4px 12px -4px rgba(212,175,55,.6) !important;
}

.ps-card__oos {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(247,245,240,.85) !important;
  backdrop-filter: blur(6px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #dc2626 !important;
  font-weight: 800 !important;
  font-size: 12px !important;
  z-index: 2 !important;
}

/* ───── بدنه کارت ───── */
.ps-card__body {
  padding: 12px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
  flex: 1 !important;
}
.ps-card__title {
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.55 !important;
  margin: 0 !important;
  min-height: 40px !important;
  color: var(--ps-ink) !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}
.ps-card__title a {
  color: inherit !important;
  text-decoration: none !important;
  transition: color .2s !important;
}
.ps-card__title a:hover { color: var(--ps-green) !important; }

.ps-card__oldprice {
  font-size: 11px !important;
  color: #a8a29e !important;
  text-decoration: line-through !important;
}
.ps-card__price {
  font-size: 15px !important;
  font-weight: 900 !important;
  color: var(--ps-green) !important;
  letter-spacing: -.2px !important;
}
.ps-card__unit {
  font-size: 10px !important;
  font-weight: 500 !important;
  color: var(--ps-ink-soft) !important;
  margin-right: 2px !important;
}
.ps-card__stock {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-size: 10px !important;
  margin-top: 2px !important;
}
.ps-card__dot {
  display: inline-block !important;
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
}
.ps-card__dot--ok   { background: var(--ps-green) !important; }
.ps-card__dot--warn { background: #f59e0b !important; }
.ps-card__dot--no   { background: #dc2626 !important; }
.ps-card__stock--ok   { color: var(--ps-green) !important; font-weight: 600 !important; }
.ps-card__stock--warn { color: #d97706 !important; font-weight: 600 !important; }
.ps-card__stock--no   { color: #dc2626 !important; font-weight: 600 !important; }

.ps-card__form {
  margin: auto 0 0 0 !important;
  padding-top: 10px !important;
}
.ps-card__btn {
  width: 100% !important;
  height: 38px !important;
  border: none !important;
  border-radius: 10px !important;
  background: linear-gradient(180deg, #0b6b3a, #095c31) !important;
  color: #fff !important;
  font-family: inherit !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: transform .15s, box-shadow .2s, filter .2s !important;
  box-shadow: 0 4px 12px -6px rgba(11,107,58,.5) !important;
}
.ps-card__btn:hover:not(:disabled) {
  filter: brightness(1.08) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 22px -10px rgba(11,107,58,.6) !important;
}
.ps-card__btn:active:not(:disabled) {
  transform: translateY(0) scale(.98) !important;
}
.ps-card__btn:disabled {
  background: #e5e7eb !important;
  color: #9ca3af !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

/* ═══════════════════════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════════════════════ */
.ps-pagination {
  display: flex !important;
  justify-content: center !important;
  gap: 8px !important;
  margin-top: 32px !important;
  flex-wrap: wrap !important;
}
.ps-pagination__btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 40px !important;
  height: 40px !important;
  padding: 0 12px !important;
  border-radius: 10px !important;
  background: #fff !important;
  border: 1px solid var(--ps-line) !important;
  color: var(--ps-ink) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  transition: all .2s !important;
  cursor: pointer !important;
}
.ps-pagination__btn:hover {
  background: var(--ps-bg-2) !important;
  border-color: var(--ps-green) !important;
  color: var(--ps-green) !important;
}
.ps-pagination__btn--current {
  background: var(--ps-green) !important;
  border-color: var(--ps-green) !important;
  color: #fff !important;
  cursor: default !important;
}
.ps-pagination__dots { color: #a8a29e !important; cursor: default !important; }

/* ═══════════════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════════════ */
.ps-empty {
  padding: 60px 24px !important;
  text-align: center !important;
  background: var(--ps-bg-2) !important;
  border-radius: 16px !important;
  border: 1px dashed rgba(11,107,58,.2) !important;
}
.ps-empty p {
  font-weight: 700 !important;
  color: var(--ps-ink) !important;
  font-size: 15px !important;
  margin: 0 0 16px 0 !important;
}
.ps-empty a {
  display: inline-block !important;
  padding: 11px 28px !important;
  border-radius: 999px !important;
  background: var(--ps-green) !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  cursor: pointer !important;
}

/* ═══════════════════════════════════════════════════════════
   HTMX INDICATOR
   ═══════════════════════════════════════════════════════════ */
.htmx-indicator {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity .2s !important;
}
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* ═══════════════════════════════════════════════════════════
   COUPON BOX
   ═══════════════════════════════════════════════════════════ */
.coupon-box {
  padding-top: 14px !important;
  margin-top: 14px !important;
  border-top: 1px solid var(--ps-line) !important;
}
.coupon-box__form { display: flex !important; gap: 8px !important; }
.coupon-box__input {
  flex: 1 !important;
  height: 40px !important;
  padding: 0 12px !important;
  border: 1.5px solid var(--ps-line) !important;
  border-radius: 10px !important;
  font-family: inherit !important;
  font-size: 12px !important;
  direction: ltr !important;
  background: #fff !important;
  transition: border-color .2s, box-shadow .2s !important;
}
.coupon-box__input:focus {
  outline: none !important;
  border-color: var(--ps-green) !important;
  box-shadow: 0 0 0 3px rgba(11,107,58,.1) !important;
}
.coupon-box__btn {
  height: 40px !important;
  padding: 0 18px !important;
  border: none !important;
  border-radius: 10px !important;
  background: var(--ps-green) !important;
  color: #fff !important;
  font-family: inherit !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
}
.coupon-box__error {
  margin-top: 8px !important;
  font-size: 11px !important;
  color: #dc2626 !important;
}
.coupon-applied__inner {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 10px 14px !important;
  background: linear-gradient(135deg, #eef7f1, #e3f0e8) !important;
  border: 1px solid rgba(11,107,58,.15) !important;
  border-radius: 10px !important;
  gap: 8px !important;
}
.coupon-applied__code {
  font-family: monospace !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  color: var(--ps-green) !important;
  direction: ltr !important;
}
.coupon-applied__remove {
  background: none !important;
  border: none !important;
  color: #dc2626 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  padding: 4px 8px !important;
  font-family: inherit !important;
}
.discount-row {
  display: flex !important;
  justify-content: space-between !important;
  padding: 10px 0 !important;
  font-size: 13px !important;
  color: var(--ps-green) !important;
  font-weight: 700 !important;
  border-top: 1px dashed rgba(11,107,58,.25) !important;
  margin-top: 10px !important;
}

/* ═══════════════════════════════════════════════════════════
   MOBILE — فشرده‌تر
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 479px) {
  .ps-card__body { padding: 10px !important; gap: 4px !important; }
  .ps-card__title { font-size: 12px !important; min-height: 36px !important; }
  .ps-card__price { font-size: 14px !important; }
  .ps-card__btn { height: 36px !important; font-size: 11px !important; }
  .ps-card__oldprice { font-size: 10px !important; }
  .ps-card__stock { font-size: 10px !important; }
}


/* ═══════════════════════════════════════════════════════════
   پاکسازی نوار قهوه‌ای + یکدست‌سازی پس‌زمینه
   ═══════════════════════════════════════════════════════════ */
.bg-gray-50,
.bg-gray-100,
.bg-gray-200,
section.bg-gray-50,
div.bg-gray-50 {
  background: var(--ps-bg) !important;
  background-color: var(--ps-bg) !important;
}

/* اگه نوار بالای صفحه (sub-header) کرم تیره داره */
section:first-of-type,
.breadcrumb,
.breadcrumbs {
  background: var(--ps-bg) !important;
}


/* ═══════════════════════════════════════════════════════════
   MOBILE FULL-WIDTH FIX
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
  /* گرید تک ستونه و تمام عرض */
  .ps-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  /* کارت تمام عرض */
  .ps-card {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* والدهای گرید هم عرض کامل */
  #products-grid,
  #products-grid-wrap,
  #products-grid-wrap > section,
  section#products-grid-wrap {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* اگه داخل گرید ۲ ستونه هست، تک ستونه کن */
  main > div,
  section > div {
    grid-template-columns: 1fr !important;
  }

  /* اگه والد grid هست (مثل grid-cols-4 که سایدبار کنارشه)، توی موبایل تک ستونه */
  .grid.grid-cols-4,
  .grid.lg\:grid-cols-4,
  .grid.md\:grid-cols-4 {
    grid-template-columns: 1fr !important;
  }
}


/* ═══════════════════════════════════════════════════
   MOBILE FIX v15 — تمام عرض، تک ستون، بدون فاصله اضافی
   ═══════════════════════════════════════════════════ */
@media (max-width: 767px) {

  /* ریست کامل کانتینرها در موبایل */
  html, body {
    width: 100% !important;
    overflow-x: hidden !important;
  }

  main,
  .container,
  .max-w-6xl,
  .max-w-7xl,
  .max-w-5xl,
  .max-w-4xl {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* گرید محصولات: تک ستون، تمام عرض */
  .ps-grid,
  #products-grid,
  [class*="products-grid"],
  .grid.grid-cols-2,
  .grid.grid-cols-3,
  .grid.grid-cols-4,
  .grid[class*="lg:grid-cols"],
  .grid[class*="md:grid-cols"] {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* اگه والد گرید flex دوستونه (main + sidebar) بود */
  .flex > main,
  .flex > .content,
  .flex > section {
    width: 100% !important;
    flex: 1 1 100% !important;
  }

  /* سایدبار: مخفی یا تمام عرض در موبایل */
  aside, .sidebar, [class*="sidebar"] {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
    margin: 0 0 12px 0 !important;
  }

  /* کارت محصول: تمام عرض */
  .ps-card,
  article,
  [class*="product-card"] {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }

  /* همه عناصر: جلوگیری از سرریز افقی */
  * {
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* ═══════════════════════════════════════════════════════════
   v16 — fix قطعی پس‌زمینه و موبایل (نه سفید، نه کرم)
   ═══════════════════════════════════════════════════════════ */

/* پس‌زمینه: خاکستری خیلی روشن */
html, body.ps-body {
  background: #f7f7f8 !important;
  background-color: #f7f7f8 !important;
}

/* موبایل و تبلت: کارت‌های محصول تمام عرض، بدون محدودیت */
@media (max-width: 1023px) {
  /* والدهای گرید محصولات */
  #products-grid-wrap,
  #products-grid,
  #products-grid > .ps-grid {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
  }

  /* والد دوسطونه (aside + section) توی موبایل تک‌ستونه شود */
  .grid[class*="lg:grid-cols"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* سایدبار تمام عرض */
  aside, .sidebar {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
    margin: 0 !important;
  }

  /* کارت‌ها تک‌ستونه و پهن */
  .ps-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .ps-card {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   v17 — بازگرداندن bg-ink (hero و بخش‌های تیره)
   این قانون بعد از همه قوانین قبلی میاد → override می‌کنه
   ═══════════════════════════════════════════════════════════ */

/* ── بخش‌های تیره (hero, CTA, footer) تیره بمونن ── */
section.bg-ink,
div.bg-ink,
footer.bg-ink,
.bg-ink {
  background-color: #111827 !important;
  background-image: none !important;
}

/* ── متن‌های داخل بخش تیره روشن ── */
section.bg-ink,
section.bg-ink h1,
section.bg-ink h2,
section.bg-ink h3,
section.bg-ink p,
section.bg-ink span,
section.bg-ink a {
  color: #ffffff;
}

/* ── استثنا: متن‌های طلایی داخل hero ── */
section.bg-ink .text-gold,
section.bg-ink [class*="text-amber"],
section.bg-ink [class*="text-yellow"],
section.bg-ink [class*="text-brand"] {
  color: #d4af37 !important;
}

/* ── متن‌های خاکستری روشن داخل hero ── */
section.bg-ink .text-white\/70,
section.bg-ink [class*="text-white/"] {
  color: rgba(255,255,255,.75) !important;
}

/* ═══════════════════════════════════════════════════════════
   v18 — MOBILE ONLY (Digikala style)
   فقط روی موبایل، لپ‌تاپ دست‌نخورده
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 767px) {

  /* ── فضای پایین صفحه برای نوار ناوبری ── */
  body { padding-bottom: 68px !important; }

  /* ── گرید: ۲ ستونه فشرده مثل دیجی‌کالا ── */
  .ps-grid,
  #products-grid > .ps-grid,
  .grid.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  /* ── کارت محصول: فشرده ── */
  .ps-card {
    width: 100% !important;
    border-radius: 10px !important;
  }
  .ps-card__body {
    padding: 8px !important;
    gap: 4px !important;
  }
  .ps-card img,
  .ps-card picture img {
    aspect-ratio: 1/1 !important;
    object-fit: cover !important;
  }
  .ps-card__title {
    font-size: 12px !important;
    line-height: 1.4 !important;
    -webkit-line-clamp: 2 !important;
  }
  .ps-card__price {
    font-size: 13px !important;
    font-weight: 800 !important;
  }

  /* ── سایدبار فیلتر: پنهان تا وقتی دکمه فیلتر بزنی ── */
  aside.ps-sidebar,
  #products-grid-wrap ~ aside,
  main > div > aside {
    display: none !important;
  }
  aside.ps-sidebar.ps-open {
    display: block !important;
    position: fixed;
    inset: 0;
    z-index: 80;
    background: #fff;
    padding: 16px;
    overflow-y: auto;
  }

  /* ── هدر و topbar: فشرده ── */
  header.sticky { position: sticky; top: 0; }
  header .hidden.md\:block { display: none !important; }

  /* ═══════════════════════════════════════════════════════════
     BOTTOM NAVIGATION — Digikala style
     ═══════════════════════════════════════════════════════════ */
  .ps-mobile-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #ffffff;
    border-top: 1px solid #eee;
    box-shadow: 0 -2px 12px rgba(0,0,0,.06);
    z-index: 90;
    align-items: center;
    justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom, 0);
    direction: rtl;
  }

  .ps-mobile-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #9ca3af;
    font-size: 10px;
    text-decoration: none;
    padding: 6px 0;
    transition: color .15s;
    position: relative;
  }
  .ps-mobile-nav__item svg {
    width: 22px;
    height: 22px;
    stroke-width: 2;
  }
  .ps-mobile-nav__item.is-active,
  .ps-mobile-nav__item:hover { color: #0b6b3a; }
  .ps-mobile-nav__item.is-active svg { stroke: #0b6b3a; }

  /* ── نشان سبد خرید ── */
  .ps-mobile-nav__badge {
    position: absolute;
    top: 4px;
    right: calc(50% - 18px);
    background: #ef4444;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
  }
}

/* در دسکتاپ مخفی */
.ps-mobile-nav { display: none; }

/* ═══════════════════════════════════════════════════════════
   v20 — HOME + FOOTER mobile (Digikala style)
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 767px) {

  /* ── بخش محصولات دسته‌بندی‌شده (h-scroll) → گرید ۲ ستونه ── */
  .h-scroll {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    scroll-snap-type: none !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .h-scroll > * {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    flex-shrink: 1 !important;
  }

  /* ── دسته‌بندی‌ها (آیکون‌ها) → ۴ ستونه فشرده ── */
  section .grid.grid-cols-3.md\:grid-cols-6 {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
  }
  section .grid.grid-cols-3.md\:grid-cols-6 > a {
    padding: 8px 4px !important;
    border-radius: 12px !important;
  }
  section .grid.grid-cols-3.md\:grid-cols-6 > a svg,
  section .grid.grid-cols-3.md\:grid-cols-6 > a img {
    width: 32px !important;
    height: 32px !important;
  }
  section .grid.grid-cols-3.md\:grid-cols-6 > a span,
  section .grid.grid-cols-3.md\:grid-cols-6 > a p {
    font-size: 11px !important;
    line-height: 1.3 !important;
  }

  /* ── هدر هر سکشن: تیتر + دکمه «مشاهده همه» ── */
  section .flex.items-center.justify-between h2,
  section .flex.items-center.justify-between h3 {
    font-size: 15px !important;
  }
  section .flex.items-center.justify-between a {
    font-size: 12px !important;
  }

  /* ── فاصله‌ی عمودی سکشن‌ها روی موبایل کمتر ── */
  section.py-10 { padding-top: 20px !important; padding-bottom: 20px !important; }
  section.py-14,
  section.py-16 { padding-top: 24px !important; padding-bottom: 24px !important; }

  /* ═══════════════════════════════════════════════════════════
     FOOTER
     ═══════════════════════════════════════════════════════════ */
  footer.bg-ink {
    margin-top: 24px !important;
    padding-top: 24px !important;
    padding-bottom: 90px !important;   /* برای نوار پایین */
  }

  /* ستون‌های فوتر: ۲ ستونه، فشرده */
  footer.bg-ink .grid.grid-cols-2.md\:grid-cols-4,
  footer.bg-ink .grid.grid-cols-1.sm\:grid-cols-2.lg\:grid-cols-4 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px 12px !important;
  }

  footer.bg-ink h3,
  footer.bg-ink h4 {
    font-size: 13px !important;
    font-weight: 700 !important;
    margin-bottom: 8px !important;
  }
  footer.bg-ink a,
  footer.bg-ink p,
  footer.bg-ink li {
    font-size: 12px !important;
    line-height: 1.7 !important;
  }
  footer.bg-ink svg {
    width: 18px !important;
    height: 18px !important;
  }

  /* کپی‌رایت پایین فوتر */
  footer.bg-ink .border-t {
    padding-top: 12px !important;
    margin-top: 16px !important;
    font-size: 11px !important;
    text-align: center !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   v21 — برگرداندن کاروسل + fix دسته‌بندی + فوتر + هیرو
   ═══════════════════════════════════════════════════════════ */

/* ── خنثی‌کردن v20 که h-scroll رو grid کرده بود ── */
@media (max-width: 767px) {
  .h-scroll {
    display: flex !important;
    grid-template-columns: none !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 10px !important;
    width: auto !important;
    max-width: none !important;
    margin-inline: -12px !important;
    padding: 4px 12px 12px !important;
    scrollbar-width: none !important;
  }
  .h-scroll::-webkit-scrollbar { display: none !important; }
  .h-scroll > * {
    flex: 0 0 auto !important;
    scroll-snap-align: start !important;
    width: 45vw !important;
    min-width: 160px !important;
    max-width: 200px !important;
  }
  /* کارت‌های کوچک‌تر دسته‌بندی داخل کاروسل */
  .h-scroll .scroll-item-cat {
    width: 26vw !important;
    min-width: 90px !important;
    max-width: 120px !important;
  }
}

/* ── دسته‌بندی‌ها (آیکون‌ها) → کاروسل افقی روی موبایل ── */
@media (max-width: 767px) {
  section .grid.grid-cols-3.md\:grid-cols-6 {
    display: flex !important;
    grid-template-columns: none !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 8px !important;
    margin-inline: -12px !important;
    padding: 4px 12px 8px !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }
  section .grid.grid-cols-3.md\:grid-cols-6::-webkit-scrollbar { display: none !important; }
  section .grid.grid-cols-3.md\:grid-cols-6 > a {
    flex: 0 0 auto !important;
    width: 78px !important;
    scroll-snap-align: start !important;
    padding: 10px 4px !important;
    text-align: center !important;
  }
  section .grid.grid-cols-3.md\:grid-cols-6 > a svg,
  section .grid.grid-cols-3.md\:grid-cols-6 > a img {
    width: 34px !important;
    height: 34px !important;
    margin: 0 auto 4px !important;
    display: block !important;
  }
  section .grid.grid-cols-3.md\:grid-cols-6 > a span,
  section .grid.grid-cols-3.md\:grid-cols-6 > a p {
    font-size: 10px !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   هیرو — تیره قطعی (بالاترین specificity)
   ═══════════════════════════════════════════════════════════ */
body section.relative.bg-ink,
body section.bg-ink,
html body section.bg-ink {
  background-color: #0a0a0a !important;
  background-image: none !important;
}
body section.bg-ink * {
  border-color: rgba(255,255,255,0.1);
}
body section.bg-ink h1,
body section.bg-ink h2,
body section.bg-ink h3,
body section.bg-ink p,
body section.bg-ink span,
body section.bg-ink a,
body section.bg-ink li {
  color: inherit;
}

/* ═══════════════════════════════════════════════════════════
   فوتر — فشرده‌تر و تمیزتر روی موبایل
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
  footer.bg-ink,
  body footer {
    margin-top: 32px !important;
    padding-top: 28px !important;
    padding-bottom: 90px !important;
  }

  footer .grid {
    gap: 20px 16px !important;
  }

  footer h3, footer h4 {
    font-size: 13px !important;
    font-weight: 700 !important;
    margin-bottom: 10px !important;
    color: #d4af37 !important;
  }

  footer a, footer p, footer li, footer span {
    font-size: 12px !important;
    line-height: 1.9 !important;
    color: rgba(255,255,255,0.75) !important;
  }

  footer a:hover { color: #fff !important; }

  footer svg {
    width: 18px !important;
    height: 18px !important;
  }

  /* لوگو و توضیحات فوتر */
  footer > div > div:first-child {
    text-align: center !important;
    margin-bottom: 20px !important;
    padding-bottom: 20px !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
  }

  /* کپی‌رایت */
  footer .border-t,
  footer > div:last-child {
    padding-top: 16px !important;
    margin-top: 16px !important;
    border-top: 1px solid rgba(255,255,255,0.1) !important;
    text-align: center !important;
    font-size: 11px !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   v22 — Fix قطعی هیرو و فوتر (نه color:inherit دیگه)
   ═══════════════════════════════════════════════════════════ */

/* ── هیرو: پس‌زمینه تیره قطعی ── */
html body section.bg-ink {
  background-color: #0a0a0a !important;
}
html body section.bg-ink,
html body section.bg-ink h1,
html body section.bg-ink h2,
html body section.bg-ink h3,
html body section.bg-ink h4,
html body section.bg-ink h5,
html body section.bg-ink h6 {
  color: #ffffff !important;
}
html body section.bg-ink p,
html body section.bg-ink span,
html body section.bg-ink li,
html body section.bg-ink small,
html body section.bg-ink label {
  color: rgba(255,255,255,0.85) !important;
}

/* طلایی‌ها توی هیرو خراب نشن */
html body section.bg-ink .gradient-text-gold,
html body section.bg-ink [class*="text-gold"] {
  color: #d4af37 !important;
}
html body section.bg-ink [class*="text-white/"],
html body section.bg-ink .text-white {
  color: rgba(255,255,255,0.85) !important;
}
html body section.bg-ink .text-white {
  color: #ffffff !important;
}

/* لینک‌های هیرو */
html body section.bg-ink a {
  color: #ffffff !important;
}
html body section.bg-ink a.bg-gold,
html body section.bg-ink a[class*="bg-gold"] {
  color: #0a0a0a !important;
}

/* ── فوتر: پس‌زمینه تیره قطعی ── */
html body footer.bg-ink {
  background-color: #0a0a0a !important;
}
html body footer.bg-ink,
html body footer.bg-ink h1,
html body footer.bg-ink h2,
html body footer.bg-ink h3,
html body footer.bg-ink h4,
html body footer.bg-ink p,
html body footer.bg-ink span,
html body footer.bg-ink li,
html body footer.bg-ink a,
html body footer.bg-ink small {
  color: #ffffff !important;
}
html body footer.bg-ink h3,
html body footer.bg-ink h4 {
  color: #d4af37 !important;
}
html body footer.bg-ink p,
html body footer.bg-ink small,
html body footer.bg-ink .text-white\/70,
html body footer.bg-ink [class*="text-white/"] {
  color: rgba(255,255,255,0.7) !important;
}
html body footer.bg-ink a:hover {
  color: #d4af37 !important;
}

/* ── اسپیس بهتر توی فوتر روی موبایل ── */
@media (max-width: 767px) {
  html body footer.bg-ink {
    padding-top: 32px !important;
    padding-bottom: 96px !important;
  }
  html body footer.bg-ink .grid {
    gap: 24px 16px !important;
  }
  html body footer.bg-ink > div {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* ── بخش‌های دیگر که bg-ink دارن (CTA ها) هم تیره بمونن ── */
html body section.bg-ink.rounded-3xl,
html body div.bg-ink.rounded-2xl,
html body div.bg-ink.rounded-3xl {
  background-color: #0a0a0a !important;
}

/* ═══════════════════════════════════════════════════════════
   v25 — Hero mobile improvement (فقط موبایل)
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 767px) {

  /* ── فضای کلی هیرو ── */
  body section.bg-ink {
    padding-top: 44px !important;
    padding-bottom: 56px !important;
    min-height: auto !important;
  }
  body section.bg-ink > div {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  /* ── تیتر: بزرگ‌تر، تنگ‌تر، خوانا ── */
  body section.bg-ink h1,
  body section.bg-ink .text-3xl,
  body section.bg-ink .md\:text-5xl {
    font-size: 26px !important;
    line-height: 1.4 !important;
    font-weight: 900 !important;
    letter-spacing: -0.01em !important;
    margin-bottom: 14px !important;
  }

  /* ── زیرتیتر: خوانا و آروم ── */
  body section.bg-ink p {
    font-size: 14px !important;
    line-height: 1.95 !important;
    color: rgba(255,255,255,0.72) !important;
    margin-bottom: 24px !important;
    max-width: 100% !important;
  }

  /* ── کانتینر دکمه‌ها: کنار هم، هم‌اندازه ── */
  body section.bg-ink > div > div > div[class*="flex"],
  body section.bg-ink > div > div > div[class*="gap"] {
    display: flex !important;
    gap: 10px !important;
    margin-bottom: 8px !important;
  }
  body section.bg-ink > div > div > div[class*="flex"] > a,
  body section.bg-ink > div > div > div[class*="gap"] > a,
  body section.bg-ink > div > div > div[class*="flex"] > button,
  body section.bg-ink > div > div > div[class*="gap"] > button {
    flex: 1 1 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    min-height: 48px !important;
    padding: 0 12px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 14px !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
  }

  /* ── آمار: ۳ ستون، وسط‌چین، با خط جدا ── */
  body section.bg-ink [class*="grid-cols-3"] {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
    margin-top: 28px !important;
    padding-top: 22px !important;
    border-top: 1px solid rgba(255,255,255,0.12) !important;
  }
  body section.bg-ink [class*="grid-cols-3"] > * {
    text-align: center !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 2px !important;
  }
  body section.bg-ink [class*="grid-cols-3"] > * > *:first-child {
    font-size: 20px !important;
    font-weight: 900 !important;
    color: #d4af37 !important;
    line-height: 1.15 !important;
    margin: 0 !important;
  }
  body section.bg-ink [class*="grid-cols-3"] > * > *:last-child {
    font-size: 11px !important;
    color: rgba(255,255,255,0.6) !important;
    line-height: 1.4 !important;
    margin: 0 !important;
  }

  /* ── اشکال تزئینی (مربع‌های رنگی) روی موبایل مخفی ── */
  body section.bg-ink > div > div > div:has(svg):not(:first-child) {
    display: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   v26 — Hero موبایل = بنر کوچیک دیجی‌کالایی
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 767px) {

  /* ── ۱) هیرو خیلی کوچیک بشه ── */
  body section.bg-ink {
    padding: 22px 16px 24px !important;
    min-height: auto !important;
    height: auto !important;
  }

  /* ── ۲) گرید به تک ستون ── */
  body section.bg-ink .grid,
  body section.bg-ink [class*="grid-cols-2"] {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    text-align: center !important;
    align-items: center !important;
  }

  /* ── ۳) اشکال تزئینی (مربع‌های سبز و طلایی) مخفی ── */
  body section.bg-ink > div > div > div:nth-child(2),
  body section.bg-ink .grid > div:not(:first-child),
  body section.bg-ink svg,
  body section.bg-ink [class*="blur-"] {
    display: none !important;
  }

  /* ── ۴) تیتر: کوچیک، وسط، خط‌فاصله فشرده ── */
  body section.bg-ink h1,
  body section.bg-ink h2 {
    font-size: 19px !important;
    line-height: 1.55 !important;
    font-weight: 900 !important;
    text-align: center !important;
    margin: 0 auto 8px auto !important;
    max-width: 280px !important;
  }

  /* ── ۵) زیرتیتر: کوچیک و آروم ── */
  body section.bg-ink p {
    font-size: 12px !important;
    line-height: 1.85 !important;
    color: rgba(255,255,255,0.65) !important;
    text-align: center !important;
    margin: 0 auto 16px auto !important;
    max-width: 300px !important;
  }

  /* ── ۶) دکمه‌ها: فقط دکمه اصلی، تمام عرض، کوچیک ── */
  body section.bg-ink [class*="flex"] {
    display: flex !important;
    justify-content: center !important;
    gap: 8px !important;
    margin: 0 !important;
  }

  /* فقط دکمه اصلی (طلایی) بمونه */
  body section.bg-ink a[class*="border"],
  body section.bg-ink a[class*="bg-transparent"] {
    display: none !important;
  }

  body section.bg-ink a[class*="bg-gold"],
  body section.bg-ink a[class*="bg-brand"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 42px !important;
    padding: 0 28px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    border-radius: 12px !important;
    width: auto !important;
    min-width: 160px !important;
    max-width: 220px !important;
  }

  /* ── ۷) آمار (+5 / 24/7 / 100%) مخفی ── */
  body section.bg-ink [class*="grid-cols-3"],
  body section.bg-ink [class*="border-t"] {
    display: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   v27 — Fix duplication + زیباسازی هیرو
   ═══════════════════════════════════════════════════════════ */

/* روی موبایل، سرچ قدیمی دسکتاپ رو مخفی کن (force) */
@media (max-width: 767px) {
  header form[action="/search"] { display: none !important; }
}

/* ── هیرو زیبا روی موبایل ── */
@media (max-width: 767px) {
  body section.bg-ink {
    padding: 44px 22px 48px !important;
    background-color: #0a0a0a !important;
    background-image:
      radial-gradient(ellipse 90% 60% at 15% 10%, rgba(11,107,58,.30) 0%, transparent 60%),
      radial-gradient(ellipse 70% 50% at 85% 90%, rgba(212,175,55,.16) 0%, transparent 55%),
      linear-gradient(180deg, #050505 0%, #0f1310 55%, #060806 100%) !important;
    position: relative !important;
    overflow: hidden !important;
    border-radius: 0 0 22px 22px !important;
  }

  /* هاله طلایی گوشه چپ */
  body section.bg-ink::before {
    content: '' !important;
    position: absolute !important;
    top: -50px !important;
    left: -50px !important;
    width: 180px !important;
    height: 180px !important;
    border-radius: 50% !important;
    background: radial-gradient(circle, rgba(212,175,55,.18) 0%, transparent 70%) !important;
    pointer-events: none !important;
  }

  /* نوار سبز pill */
  body section.bg-ink [class*="rounded-full"][class*="border"] {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px 12px !important;
    font-size: 11px !important;
    background: rgba(11,107,58,.20) !important;
    border: 1px solid rgba(11,107,58,.45) !important;
    color: #6ee7a7 !important;
    margin-bottom: 20px !important;
  }

  /* تیتر بزرگ‌تر و پررنگ‌تر */
  body section.bg-ink h1,
  body section.bg-ink h2 {
    font-size: 26px !important;
    line-height: 1.5 !important;
    letter-spacing: -0.015em !important;
    font-weight: 900 !important;
    margin-bottom: 16px !important;
    text-align: center !important;
  }

  /* زیرتیتر */
  body section.bg-ink p {
    font-size: 13px !important;
    line-height: 2.1 !important;
    color: rgba(255,255,255,.72) !important;
    text-align: center !important;
    margin: 0 auto 26px auto !important;
    max-width: 300px !important;
  }

  /* دکمه‌ها: تمام عرض، فاصله‌دار */
  body section.bg-ink a[class*="bg-gold"],
  body section.bg-ink a[class*="bg-brand"],
  body section.bg-ink a[class*="border"] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 260px !important;
    min-height: 48px !important;
    margin: 0 auto 10px auto !important;
    padding: 0 20px !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    border-radius: 14px !important;
  }

  /* اشکال تزئینی (اگر هست) رو مخفی کن */
  body section.bg-ink > div > div > div:has(svg):not(:first-child) > svg {
    display: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   v28 — بهبود بصری هدر دسکتاپ
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 768px) {

  /* topbar: کمی بلندتر، حس حرفه‌ای */
  header + div, body > div.bg-gradient-to-l {
    min-height: 40px;
  }

  /* main header row — فضای بیشتر */
  header.sticky > div {
    padding-top: 14px !important;
    padding-bottom: 14px !important;
  }

  /* ── لوگو: بزرگ‌تر + گرادیان پشت ── */
  header.sticky a[href="/"] {
    gap: 12px !important;
  }
  header.sticky a[href="/"] > div:first-child {
    width: 44px !important;
    height: 44px !important;
    border-radius: 14px !important;
    box-shadow: 0 6px 18px -6px rgba(11,107,58,0.45), 0 2px 6px -2px rgba(11,107,58,0.25) !important;
    transition: transform .3s cubic-bezier(.22,1,.36,1), box-shadow .3s !important;
  }
  header.sticky a[href="/"]:hover > div:first-child {
    transform: translateY(-2px) scale(1.05) !important;
    box-shadow: 0 10px 24px -8px rgba(11,107,58,0.55), 0 4px 10px -3px rgba(11,107,58,0.3) !important;
  }
  header.sticky a[href="/"] > div:first-child svg {
    width: 22px !important;
    height: 22px !important;
  }
  /* اسم برند */
  header.sticky a[href="/"] > span {
    font-size: 20px !important;
    font-weight: 900 !important;
    letter-spacing: -0.01em !important;
  }

  /* ── سرچ: بلندتر، با سایه‌ی نرم، focus بهتر ── */
  header form[action="/search"] input[name="q"] {
    height: 48px !important;
    border-radius: 14px !important;
    padding-right: 44px !important;
    padding-left: 16px !important;
    background: #f3f4f6 !important;
    border: 1px solid transparent !important;
    font-size: 14px !important;
    transition: all .2s cubic-bezier(.22,1,.36,1) !important;
  }
  header form[action="/search"] input[name="q"]:hover {
    background: #ececef !important;
  }
  header form[action="/search"] input[name="q"]:focus {
    background: #ffffff !important;
    border-color: #0b6b3a !important;
    box-shadow: 0 0 0 4px rgba(11,107,58,0.10), 0 4px 12px -4px rgba(11,107,58,0.15) !important;
  }
  header form[action="/search"] button[type="submit"] {
    width: 40px !important;
    height: 40px !important;
    border-radius: 10px !important;
    transition: background .2s !important;
  }
  header form[action="/search"] button[type="submit"]:hover {
    background: rgba(11,107,58,0.10) !important;
    color: #0b6b3a !important;
  }

  /* ── آیکون‌های اکشن: بزرگ‌تر، گرد‌تر، hover بهتر ── */
  header.sticky button.tap-target,
  header.sticky a.tap-target {
    width: 44px !important;
    height: 44px !important;
    border-radius: 12px !important;
    transition: background .2s, transform .2s !important;
  }
  header.sticky button.tap-target:hover,
  header.sticky a.tap-target:hover {
    background: rgba(11,107,58,0.08) !important;
    transform: translateY(-1px) !important;
  }
  header.sticky button.tap-target svg,
  header.sticky a.tap-target svg {
    width: 22px !important;
    height: 22px !important;
  }

  /* ── سبد خرید (دکمه سبز): ارتفاع هم‌سطح سرچ ── */
  header.sticky a[href="/cart"] {
    height: 44px !important;
    border-radius: 12px !important;
    padding: 0 18px !important;
    box-shadow: 0 4px 14px -4px rgba(11,107,58,0.4) !important;
    transition: transform .2s, box-shadow .2s, background .2s !important;
  }
  header.sticky a[href="/cart"]:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 8px 22px -6px rgba(11,107,58,0.55) !important;
  }
  header.sticky a[href="/cart"] svg {
    width: 20px !important;
    height: 20px !important;
  }
}

/* ── سایدبار ناوبری دسکتاپ (زیر هدر): جداکننده‌های بهتر ── */
@media (min-width: 768px) {
  header nav.border-t {
    height: 48px !important;
    padding: 0 8px !important;
    background: linear-gradient(to bottom, #ffffff, #fafbfa) !important;
  }
  header nav.border-t a {
    position: relative;
    padding: 14px 12px !important;
    font-weight: 600 !important;
    transition: color .2s !important;
  }
  header nav.border-t a:hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 8px;
    right: 8px;
    height: 2.5px;
    background: #0b6b3a;
    border-radius: 2px 2px 0 0;
    animation: nav-underline .25s ease-out;
  }
  @keyframes nav-underline {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
  }
}
