/* ===========================================================================
   فست‌کارت — پایِ فهرست‌ها، نمای «شبکه / فهرست» و دکمهٔ شناورِ فیلتر. دور ۶۰ (docs/71)
   ===========================================================================

   سراسری (`layout/master.html`)، چون همین پا زیرِ فهرستِ دسته، برند، مجموعه، جست‌وجو، برچسب و مجله
   می‌نشیند (`_shared/listing_pager.html`) و شیوه‌نامهٔ یک صفحه جای واژگانِ شش صفحه نیست.
   =========================================================================== */

/* ---------- پایِ فهرست ---------- */
.lp {
    display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 24px;
}
.lp__more {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; min-width: 240px; padding: 0 28px; cursor: pointer;
    border: 1px solid var(--theme-border, #e2e8f0); border-radius: 999px;
    background: var(--theme-surface, #fff); color: var(--theme-ink, #0f172a);
    font-size: 14px; font-weight: 700; box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.lp__more:hover { background: var(--theme-ink, #0f172a); border-color: var(--theme-ink, #0f172a); color: var(--theme-surface, #fff); }
.lp__more:focus-visible { outline: 2px solid var(--theme-accent, #0da487); outline-offset: 3px; }
.lp__more[disabled] { cursor: progress; opacity: .75; }
.lp__spin {
    display: none; width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid currentColor; border-inline-end-color: transparent; animation: lp-spin .7s linear infinite;
}
.lp__more.is-loading .lp__spin { display: inline-block; }
.lp__note { margin: 0; font-size: 13px; color: var(--theme-muted, #64748b); }
.lp__nav[hidden] { display: none; }
.lp__nav .pagination { margin: 0; flex-wrap: wrap; justify-content: center; gap: 6px; }
.lp__nav .page-link {
    display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 10px !important;
    border: 1px solid var(--theme-border, #e2e8f0); background: var(--theme-surface, #fff); color: var(--theme-ink, #0f172a);
    font-weight: 700; font-variant-numeric: tabular-nums;
}
.lp__nav .page-item.active .page-link { background: var(--theme-accent-deep, #0b2a4d); border-color: var(--theme-accent-deep, #0b2a4d); color: var(--theme-on-accent-deep, #fff); }
.lp__nav .page-item.disabled .page-link { opacity: .45; }
.lp__nav a.page-link:hover { border-color: var(--theme-accent, #0da487); color: var(--theme-accent-strong, #0a7a64); }
.lp__sentinel { display: block; width: 100%; height: 1px; }
/* حالتِ پایین‌رفتن: جای دکمه یک نوارِ «در حالِ آوردن» تا خریدار بداند فهرست هنوز تمام نشده. */
.is-auto .lp__note:empty { display: none; }

@keyframes lp-spin { to { transform: rotate(360deg); } }

/* ---------- دکمه‌های «شبکه / فهرست» ---------- */
.hs-view-toggle { display: inline-flex; gap: 4px; margin-inline-start: auto; padding: 3px; border: 1px solid var(--theme-border, #e2e8f0); border-radius: 10px; }
.hs-view-toggle button {
    display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 8px;
    background: transparent; color: var(--theme-muted, #64748b); cursor: pointer;
}
.hs-view-toggle button[aria-pressed="true"] { background: var(--theme-accent-wash, #eef7f5); color: var(--theme-accent-strong, #0a7a64); }
.hs-view-toggle button:focus-visible { outline: 2px solid var(--theme-accent, #0da487); outline-offset: 2px; }
.lst-toolbar:has(.hs-view-toggle) { display: flex; align-items: center; flex-wrap: wrap; }

/* ---------- نمای فهرست: کارتِ ردیفی ----------
   تصویر کنارِ متن، قیمت و دکمه در ستونِ آخر — برای خریداری که مشخصات و نام را مقایسه می‌کند، نه تصویر. */
@media (min-width: 576px) {
    .plp-grid.is-list { grid-template-columns: 1fr; }
    .plp-grid.is-list .plp-card { display: grid; grid-template-columns: 180px 1fr; align-items: stretch; }
    .plp-grid.is-list .plp-card__media { aspect-ratio: auto; height: 100%; min-height: 180px; }
    .plp-grid.is-list .plp-card__body { border-top: 0; border-inline-start: 1px solid var(--plp-line-soft); padding: 12px 18px; }
    .plp-grid.is-list .plp-card__name { -webkit-line-clamp: 2; line-clamp: 2; min-height: 0; font-size: 15px; }
    .plp-grid.is-list .plp-card__price { justify-items: start; }
    .plp-grid.is-list .plp-card span.plp-card__scarce { justify-self: start; }
    .plp-grid.is-list .plp-card__actions { max-width: 320px; }
}

/* ---------- دکمهٔ شناورِ فیلتر روی گوشی ----------
   بالای نوارِ پایینیِ قالب (۶۴ پیکسل) و وسطِ صفحه؛ روی دسکتاپ ستونِ فیلتر کنارِ فهرست است. */
.hs-filter-fab { display: none; }
@media (max-width: 991.98px) {
    .hs-filter-fab {
        position: fixed; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); inset-inline-start: 50%; z-index: 30;
        display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 20px;
        transform: translateX(50%); border: 0; border-radius: 999px; cursor: pointer;
        background: var(--theme-ink, #0f172a); color: var(--theme-surface, #fff);
        font-size: 14px; font-weight: 700; box-shadow: 0 10px 24px -10px rgba(15, 23, 42, .55);
    }
    .hs-filter-fab:focus-visible { outline: 3px solid var(--theme-accent, #0da487); outline-offset: 3px; }
    body.is-drawer-open .hs-filter-fab { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .lp__more { transition: none; }
    .lp__spin { animation-duration: 2s; }
}
