/* ═══ ps-mobile — لایه‌ی تمیز موبایل (آخرین CSS لودشده) ═══ */
@media (max-width: 767px) {

  html, body { max-width: 100%; overflow-x: hidden; }
  body main { overflow-x: clip; }
  body main img, body main svg, body main video { max-width: 100%; }

  /* ── لیست محصولات: ردیف افقی مثل دیجی‌کالا (عکس راست، جزئیات چپ) ── */
  body .ps-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  body .ps-grid .ps-card {
    display: grid !important;
    grid-template-columns: 116px minmax(0, 1fr) !important;
    column-gap: 12px !important;
    align-items: start !important;
    height: auto !important;
    padding: 10px !important;
    border-radius: 16px !important;
    transform: none !important;
  }
  body .ps-grid .ps-card:hover { transform: none !important; }
  body .ps-grid .ps-card__image {
    width: 116px !important;
    height: 116px !important;
    aspect-ratio: 1 / 1 !important;
    max-height: none !important;
    border-radius: 12px !important;
  }
  body .ps-grid .ps-card__body {
    padding: 0 !important;
    gap: 3px !important;
    min-width: 0 !important;
    min-height: 116px !important;
  }
  body .ps-grid .ps-card__title { font-size: 13px !important; min-height: 0 !important; line-height: 1.6 !important; }
  body .ps-grid .ps-card__price { font-size: 15px !important; font-weight: 800 !important; }
  body .ps-grid .ps-card__form { margin-top: auto !important; }
  body .ps-grid .ps-card__btn {
    width: 100% !important;
    height: 34px !important;
    padding: 0 8px !important;
    font-size: 12px !important;
    border-radius: 10px !important;
  }

  /* ── صفحه‌ی اصلی: اسلایدر افقی تمیز ── */
  body .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: 0 -16px !important;
    padding: 4px 16px 12px !important;
    scrollbar-width: none !important;
  }
  body .h-scroll::-webkit-scrollbar { display: none !important; }
  body .h-scroll > * {
    flex: 0 0 160px !important;
    width: 160px !important;
    min-width: 160px !important;
    max-width: 160px !important;
    scroll-snap-align: start !important;
  }
  body .h-scroll .ps-card__image { aspect-ratio: 1 / 1 !important; max-height: none !important; }
  body .h-scroll .ps-card__title { font-size: 12px !important; }

  /* ── صفحه‌ی محصول: ردیف قیمت نشکند بیرون ── */
  body .bg-brand-light\/50 .flex { flex-wrap: wrap !important; row-gap: 6px !important; }
  body .bg-brand-light\/50 .whitespace-nowrap { white-space: normal !important; }
  body .bg-brand-light\/50 .text-5xl,
  body .bg-brand-light\/50 .text-4xl,
  body .bg-brand-light\/50 .text-3xl { font-size: clamp(1.5rem, 7.5vw, 2rem) !important; }

  /* ── فوتر (اصلاح امن تا دیدن کدش) ── */
  body footer { padding-top: 28px !important; padding-bottom: 88px !important; }
  body footer .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 22px 14px !important;
  }
  body footer .grid > :first-child { grid-column: 1 / -1 !important; }
  body footer ul { display: flex; flex-direction: column; gap: 8px; }
  body footer h3, body footer h4 { font-size: 14px !important; margin-bottom: 10px !important; }
  body footer a, body footer li { font-size: 13px !important; }
}

/* ── فوتر آکاردئونی ── */
.ps-ftr-chev { display: none; margin-inline-start: auto; transition: transform .25s; opacity: .6; }
@media (max-width: 767px) {
  body footer .grid-cols-1.sm\:grid-cols-2 { grid-template-columns: 1fr !important; gap: 0 !important; }
  body footer .grid-cols-1.sm\:grid-cols-2 > :first-child { padding-bottom: 18px; }
  .ps-ftr-acc { border-top: 1px solid rgba(255,255,255,.1); }
  .ps-ftr-h { margin: 0 !important; padding: 14px 0 !important; cursor: pointer; }
  .ps-ftr-chev { display: block; }
  .ps-ftr-h.is-open .ps-ftr-chev { transform: rotate(180deg); }
  .ps-ftr-body { display: none; padding-bottom: 14px; }
  .ps-ftr-body.is-open { display: block; }
  body footer .grid.grid-cols-2.md\:grid-cols-4 { gap: 12px !important; }
}
@media (min-width: 768px) {
  .ps-ftr-body { display: block !important; }
}

/* ── دکمه‌ی جمع‌وجور در کارت لیست ── */
@media (max-width: 767px) {
  body .ps-grid .ps-card__form { margin-top: auto !important; display: flex !important; justify-content: flex-start !important; }
  body .ps-grid .ps-card__btn {
    width: auto !important;
    min-width: 0 !important;
    height: 28px !important;
    padding: 0 14px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: #0b6b3a !important;
    border: 1.5px solid #0b6b3a !important;
    box-shadow: none !important;
  }
  body .ps-grid .ps-card__btn:active { background: #0b6b3a !important; color: #fff !important; }
  body .ps-grid .ps-card__btn:disabled { color: #9ca3af !important; border-color: #d1d5db !important; }
}
