/* =============================================================================
   PRODUCT LISTING — category · brand · search
   -----------------------------------------------------------------------------
   Reference: Docs/Redesign/Approved/product-listings/Daric Listing (standalone).html
   (a design-canvas bundle; the real document is the JSON-escaped string on raw
   line 403 — decode it before comparing anything against this file).

   ONE stylesheet for all three surfaces, because the reference is explicit that
   they are one design: "سه سطح (دسته / برند / جستجو) ۸۵٪ ساختار مشترک دارند …
   تفاوت‌ها فقط در سربرگ و ترکیب فَست‌ها است" (decoded line 278).

   NAMESPACE. Every class is prefixed `pl-`, the same discipline `pc-` (card) and
   `pd-` (product details) follow. The legacy selectors in products.css
   (.product-ctn, .right-side, .left-side, .box-cntent, .products-container,
   .empty-products, .price-slide …) therefore cannot match this markup, so there
   is no specificity fight with shop.css or Bootstrap and not one !important.

   TOKENS. Colours, radii and shadows come from tailwind/input.css STEP 15 and the
   families above it. No hex literal appears below except inside a shadow's rgba,
   which is shadow colour rather than brand colour — the same convention every
   other --brand-shadow-* follows.

   BREAKPOINTS (reference §11, stated as prose — the file itself has no @media):
     >=1200  4 columns
     992-1199  3 columns
     768-991   3 columns
     <768      2 columns
   The 276px filter column is fixed and sticky at >=992 and becomes a «فیلتر»
   button plus a full-screen sheet below it.

   SECTIONS
     1  Shell & two-column layout
     2  Breadcrumb
     3  Page header (category / brand / search)
     4  Subcategory tiles
     5  Sidebar — tree
     6  Sidebar — filter card, chips, controls, facets
     7  Results bar & sort rail
     8  Grid
     9  Showcase (1-2 results) & related row
     10 Load more
     11 Empty states
     12 Mobile bar & sheets
   ============================================================================= */


/* ── 0 · ICON FLOOR ───────────────────────────────────────────────────────
   Preflight is disabled in this project, so an inline <svg> carrying only a
   viewBox gets the SVG default of 300x150 and then STRETCHES to fill any
   flex or width:100% parent. _ListingIcon.cshtml deliberately emits no
   width/height so `currentColor` and the size both come from CSS — which means
   every icon needs a size here or it blows out its button. It did: the
   showcase's full-width mobile CTA rendered a cart glyph the size of the panel.

   This is the FLOOR, declared before every component so a more specific rule
   later in the file simply overrides it. */
.pl-page svg,
.pl-sheet svg {
    flex: none;
    width: 16px;
    height: 16px;
}

.pl-btn svg { width: 18px; height: 18px; }
.pl-btn--sm svg { width: 16px; height: 16px; }
.pl-badge svg { width: 12px; height: 12px; }
.pl-verified svg { width: 12px; height: 12px; }
.pl-head__link svg,
.pl-tile--more svg { width: 14px; height: 14px; }


/* ── 1 · SHELL & TWO-COLUMN LAYOUT ────────────────────────────────────────── */

.pl-page {
    max-width: var(--frame-w);
    margin: 0 auto;
    padding: 26px var(--listing-gutter-page) 48px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 22px;
    color: var(--brand-text);
    font-family: inherit;
}

/* The listing moves to the 1440 shell the frame, header, home page and footer
   already share. Legacy pages are still .container-manual at 1366; mixing the two
   is what produced the 37px-per-side step this page used to show inside the
   frame. */
@media (max-width: 991.98px) {
    .pl-page {
        padding: 14px var(--listing-gutter-page-sm) 32px;
        gap: 14px;
    }
}

.pl-columns {
    display: flex;
    align-items: flex-start;
    gap: var(--listing-gutter);
}

.pl-aside {
    flex: none;
    width: var(--listing-sidebar-w);
    display: flex;
    flex-direction: column;
    gap: 14px;
    /* §11: "ستون فیلتر دسکتاپ ۲۷۶px ثابت و چسبان است". The offset clears the
       fixed header; --header-inset is published by header-compact.js and already
       accounts for the compact bar's height. */
    position: sticky;
    top: calc(var(--header-inset, 96px) + 12px);
    max-height: calc(100vh - var(--header-inset, 96px) - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--brand-scroll-thumb) transparent;
}

/* The aside is a flex column with a max-height, so its children would SHRINK to fit
   rather than overflow — and .pl-filters is `overflow: hidden`, so a shrunk card
   silently CLIPS its own price control and every attribute facet below it instead of
   letting the column scroll. flex:none keeps each card at its natural height and
   hands the overflow to the aside, which is the thing that scrolls. */
.pl-aside > * { flex: none; }

.pl-aside::-webkit-scrollbar { width: 6px; }
.pl-aside::-webkit-scrollbar-thumb { background: var(--brand-scroll-thumb); border-radius: 3px; }

.pl-results {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Below 992 the sidebar is a sheet, so it leaves the flow entirely rather than
   stacking above the grid — the reference's mobile artboard has no inline filter
   column at all. */
@media (max-width: 991.98px) {
    .pl-columns { display: block; }
    .pl-aside { display: none; }
    .pl-results { gap: 13px; }
}

.pl-rule {
    height: 1px;
    background: linear-gradient(90deg, var(--brand-primary-hairline), transparent 70%);
    border: 0;
    margin: 0;
}

.pl-rule--flat { background: var(--brand-border); }


/* ── 2 · BREADCRUMB ───────────────────────────────────────────────────────── */

.pl-crumbs {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 500;
    color: var(--brand-text-muted);
    flex-wrap: wrap;
}

.pl-crumbs a { color: var(--brand-text-muted); text-decoration: none; transition: color .2s ease; }
.pl-crumbs a:hover { color: var(--brand-primary-deep); }
.pl-crumbs__current { font-weight: 700; color: var(--brand-text); }

.pl-crumbs__sep {
    flex: none;
    width: 13px;
    height: 13px;
    color: var(--brand-text-soft);
}

@media (max-width: 991.98px) {
    .pl-crumbs {
        font-size: 11px;
        gap: 6px;
        flex-wrap: nowrap;
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: none;
    }
    .pl-crumbs::-webkit-scrollbar { display: none; }
    .pl-crumbs__sep { width: 11px; height: 11px; }
}


/* ── 3 · PAGE HEADER ──────────────────────────────────────────────────────── */

.pl-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
}

.pl-head__text {
    display: flex;
    flex-direction: column;
    gap: 9px;
    max-width: 760px;
    min-width: 0;
}

.pl-head__titlerow {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.pl-head__title {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: -.02em;
    margin: 0;
    color: var(--brand-text);
}

/* The search header names the term inside the heading, so it needs a colour
   accent rather than a separate line. */
.pl-head__term { color: var(--brand-primary-deep); }

.pl-head__count {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--brand-text-soft);
}

.pl-head__desc {
    font-size: 13.5px;
    font-weight: 500;
    line-height: 2;
    color: var(--brand-text-muted);
    text-wrap: pretty;
    margin: 0;
    /* Long category copy is clamped rather than allowed to push the grid down the
       page; the «توضیح کامل دسته» link opens the rest. */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pl-head__desc.is-open { -webkit-line-clamp: unset; display: block; }

.pl-head__more {
    font-size: 12px;
    font-weight: 700;
    color: var(--brand-primary-deep);
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    align-self: flex-start;
    text-decoration: none;
}

.pl-head__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--brand-text-muted);
}

.pl-head__metasep { width: 1px; height: 14px; background: var(--brand-border); }
.pl-head__hint { font-size: 12px; font-weight: 500; color: var(--brand-text-soft); }

/* The decorative medallion beside a category title, and the brand logo plate. */
.pl-head__badge {
    flex: none;
    position: relative;
    width: 104px;
    height: 104px;
    border-radius: var(--radius-brand-card);
    border: 1px solid var(--brand-primary-rule);
    background: linear-gradient(160deg, var(--brand-card-well-from), var(--brand-card-well-to));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pl-head__badge::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--brand-primary-pale) 1px, transparent 1.1px);
    background-size: 12px 12px;
    opacity: .55;
}

.pl-head__badge img { position: relative; max-width: 74%; max-height: 74%; object-fit: contain; }

.pl-coin {
    position: relative;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: conic-gradient(from 205deg,
        var(--brand-coin-1), var(--brand-coin-2) 16%, var(--brand-coin-3) 32%,
        var(--brand-coin-4) 50%, var(--brand-coin-5) 68%, var(--brand-coin-6) 84%, var(--brand-coin-1));
}

.pl-coin::after {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    background: radial-gradient(circle at 36% 28%, var(--brand-coin-face-hi),
        color-mix(in oklab, var(--brand-primary) 40%, #F7ECD6) 60%,
        color-mix(in oklab, var(--brand-primary) 72%, #B8912F));
}

/* The brand hero: logo plate, name, verified chip, blurb, "all brands" link. */
.pl-brandhero {
    display: flex;
    align-items: flex-start;
    gap: 22px;
}

.pl-brandhero__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.pl-brandhero__name { font-size: 26px; font-weight: 800; line-height: 1.4; letter-spacing: -.02em; margin: 0; }

.pl-verified {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--brand-primary-band);
    border: 1px solid var(--brand-primary-edge);
    color: var(--brand-primary-deep);
    font-size: 11px;
    font-weight: 700;
}

.pl-head__link {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 14px;
    border-radius: var(--radius-brand-md);
    border: 1px solid var(--brand-border);
    background: var(--brand-card-face);
    color: var(--brand-text-muted);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.pl-head__link:hover {
    background: var(--brand-primary-band);
    border-color: var(--brand-primary-edge);
    color: var(--brand-primary-deep);
}

/* Related-search chips beside the search header. */
.pl-related-searches { flex: none; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

.pl-chip-link {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 13px;
    border-radius: 16px;
    background: var(--brand-card-face);
    border: 1px solid var(--brand-border);
    color: var(--brand-text-muted);
    font-size: 11.5px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .2s ease, color .2s ease;
}

.pl-chip-link:hover { border-color: var(--brand-primary-edge); color: var(--brand-primary-deep); }

@media (max-width: 991.98px) {
    .pl-head { gap: 14px; }
    .pl-head__title { font-size: 21px; }
    .pl-head__badge, .pl-related-searches { display: none; }
    .pl-head__desc { font-size: 12px; line-height: 1.85; -webkit-line-clamp: 2; }
    .pl-brandhero { gap: 14px; }
    .pl-brandhero__name { font-size: 19px; }
}


/* ── 4 · SUBCATEGORY TILES ────────────────────────────────────────────────── */

.pl-tiles { display: flex; flex-direction: column; gap: 11px; }

.pl-tiles__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.pl-tiles__title { font-size: 13px; font-weight: 700; }
.pl-tiles__count { font-size: 11px; font-weight: 500; color: var(--brand-text-soft); }

.pl-tiles__row { display: flex; flex-wrap: wrap; gap: 12px; }

.pl-tile {
    /* §5: flexible, but capped, so a row of two does not stretch into two slabs. */
    flex: 1 1 var(--listing-tile-min);
    max-width: var(--listing-tile-max);
    box-sizing: border-box;
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 12px;
    background: var(--brand-card-face);
    border: 1px solid var(--brand-primary-rule);
    border-radius: var(--radius-brand-tile);
    overflow: hidden;
    box-shadow: var(--brand-shadow-card-sm);
    text-decoration: none;
    transition: transform .24s ease, border-color .24s ease;
}

.pl-tile:hover { transform: translateY(-3px); border-color: var(--brand-primary); }

.pl-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--brand-primary-pale) 1px, transparent 1.1px);
    background-size: 13px 13px;
    opacity: .35;
}

.pl-tile__plate {
    position: relative;
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-brand);
    background: linear-gradient(160deg, var(--brand-card-well-from), var(--brand-surface-sand));
    border: 1px solid var(--brand-primary-rule);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pl-tile__plate img { width: 100%; height: 100%; object-fit: cover; }
.pl-tile__plate .pl-coin { width: 22px; height: 22px; }
.pl-tile__plate .pl-coin::after { inset: 2px; }

.pl-tile__body { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }

.pl-tile__name {
    font-size: 12px;
    font-weight: 700;
    color: var(--brand-text);
    /* §11: category names are one line with an ellipsis, everywhere they appear. */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pl-tile__count { font-size: 10.5px; font-weight: 500; color: var(--brand-text-soft); }

.pl-tile--more {
    justify-content: center;
    background: var(--brand-surface-recess);
    border: 1px dashed var(--brand-primary-edge);
    color: var(--brand-primary-deep);
    font-size: 12px;
    font-weight: 700;
    gap: 8px;
}

.pl-tile--more:hover { background: var(--brand-primary-band); transform: none; }

@media (max-width: 991.98px) {
    /* The tile row becomes a horizontal scroller, and the tiles go vertical. */
    .pl-tiles__row {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 9px;
        padding-bottom: 4px;
        scrollbar-width: none;
        scroll-snap-type: x proximity;
    }
    .pl-tiles__row::-webkit-scrollbar { display: none; }
    .pl-tile {
        flex: none;
        width: 132px;
        max-width: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 7px;
        padding: 10px;
        border-radius: var(--radius-brand-md);
        scroll-snap-align: start;
    }
    .pl-tile__plate { width: 32px; height: 32px; }
    .pl-tile__name { font-size: 11px; white-space: normal; }
    .pl-tile__count { font-size: 10px; }
    .pl-tile--more { flex-direction: row; align-items: center; justify-content: center; }
}


/* ── 5 · SIDEBAR — CATEGORY TREE ──────────────────────────────────────────── */

.pl-card {
    background: var(--brand-card-face);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-brand-card);
    box-shadow: 0 1px 2px rgba(42, 42, 40, .04);
}

.pl-tree { padding: 15px 16px; }

.pl-tree__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.pl-tree__title { font-size: 12.5px; font-weight: 700; }
.pl-tree__all { font-size: 11px; font-weight: 600; color: var(--brand-primary-deep); text-decoration: none; }

.pl-tree__list { display: flex; flex-direction: column; gap: 2px; list-style: none; margin: 0; padding: 0; }

/* Preflight is off, so a <ul> keeps the UA's 40px padding-inline-start unless it
   is cleared explicitly — see the 2026-09-01 note in conventions-and-known-issues. */
.pl-tree__children {
    list-style: none;
    margin: 0 5px 0 0;
    padding: 0 14px 0 0;
    border-inline-start: 0;
    border-inline-end: 1px solid var(--brand-border);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pl-tree__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--brand-text);
    text-decoration: none;
    transition: background .18s ease, color .18s ease;
}

.pl-tree__row:hover { background: var(--brand-surface-recess); color: var(--brand-text); }

.pl-tree__label {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.pl-tree__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-tree__n { flex: none; font-size: 10.5px; font-weight: 600; color: var(--brand-text-soft); }
.pl-tree__chev { flex: none; width: 12px; height: 12px; color: var(--brand-text-soft); }

/* An ancestor of the current node. */
.pl-tree__row--open { font-weight: 700; background: var(--brand-primary-band); }
.pl-tree__row--open .pl-tree__chev { color: var(--brand-primary-deep); }

/* The current node. Marked by ID, never by name — two categories in this
   catalogue share the display name «تمام بهار آزادی» and the previous partial
   compared by name, so both lit up at once. */
.pl-tree__row--current {
    font-weight: 700;
    color: var(--brand-primary-deep);
    background: var(--brand-primary-tint);
    border: 1px solid var(--brand-primary-edge);
    padding: 6px 7px;
}

.pl-tree__row--current .pl-tree__n { color: var(--brand-primary-deep); font-weight: 700; }
.pl-tree__row--leaf { font-size: 11.5px; color: var(--brand-text-muted); padding: 6px 8px; }


/* ── 6 · SIDEBAR — FILTER CARD ────────────────────────────────────────────── */

.pl-filters { overflow: hidden; }

.pl-filters__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--brand-border);
}

.pl-filters__title { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; }
.pl-filters__title svg { width: 15px; height: 15px; color: var(--brand-primary-deep); }
.pl-filters__state { font-size: 11px; font-weight: 600; color: var(--brand-text-soft); }

.pl-filters__badge {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--brand-primary);
    color: var(--brand-primary-ink);
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pl-filters__body { padding: 14px 16px; display: flex; flex-direction: column; gap: 14px; }
.pl-filters__group { border-top: 1px solid var(--brand-border); padding: 13px 16px; display: flex; flex-direction: column; gap: 9px; }

.pl-filters__grouphead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pl-filters__grouptitle { font-size: 12px; font-weight: 700; }
.pl-filters__groupcount { font-size: 10.5px; font-weight: 600; color: var(--brand-text-soft); }

/* Chips */
.pl-chips { padding: 12px 16px 0; display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }

.pl-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--brand-primary-band);
    border: 1px solid var(--brand-primary-edge);
    border-radius: 999px;
    padding: 5px 6px 5px 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--brand-primary-deep);
    text-decoration: none;
    max-width: 100%;
}

.pl-chip__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pl-chip__x {
    flex: none;
    width: 16px;
    height: 16px;
    border: 0;
    border-radius: 50%;
    background: var(--brand-primary-glow-strong);
    color: var(--brand-primary-deep);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.pl-chip__x svg { width: 9px; height: 9px; }

.pl-clear {
    border: 0;
    background: transparent;
    color: var(--brand-danger);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    padding: 5px 4px;
    text-decoration: none;
}

.pl-clear--outlined {
    height: 38px;
    padding: 0 14px;
    border-radius: 11px;
    border: 1px solid var(--brand-danger);
    background: var(--brand-surface-2);
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .2s ease;
}

.pl-clear--outlined:hover { background: var(--brand-danger-wash); }

/* Search-in-results field */
.pl-field {
    display: flex;
    align-items: center;
    gap: 9px;
    height: 40px;
    padding: 0 12px;
    background: var(--brand-surface-recess);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-brand);
    box-shadow: var(--brand-shadow-inset);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.pl-field:focus-within { border-color: var(--brand-primary); box-shadow: 0 0 0 3px var(--brand-primary-tint); }
.pl-field svg { flex: none; width: 15px; height: 15px; color: var(--brand-text-soft); }

.pl-field input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    font-size: 12px;
    font-weight: 500;
    color: var(--brand-text);
}

.pl-field input::placeholder { color: var(--brand-text-soft); }
.pl-field--sm { height: 34px; border-radius: 9px; }
.pl-field--sm svg { width: 13px; height: 13px; }

/* In-stock switch */
.pl-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pl-switch-row__label { font-size: 12px; font-weight: 600; }

.pl-switch {
    flex: none;
    width: 42px;
    height: 24px;
    border-radius: 12px;
    border: 1px solid var(--brand-primary-edge);
    background: var(--brand-surface-recess);
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    transition: background .2s ease, justify-content .2s ease;
}

.pl-switch__knob { width: 18px; height: 18px; border-radius: 50%; background: var(--brand-surface-2); box-shadow: var(--brand-shadow-switch-knob); }
.pl-switch[aria-checked="true"] { background: var(--brand-check-face); justify-content: flex-start; }

/* Price */
.pl-price { display: flex; flex-direction: column; gap: 11px; }
.pl-price__title { font-size: 12px; font-weight: 700; }
.pl-price__slider { position: relative; height: 22px; display: flex; align-items: center; }
.pl-price__inputs { display: flex; align-items: center; gap: 8px; }
.pl-price__inputs label { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pl-price__cap { font-size: 10px; font-weight: 500; color: var(--brand-text-soft); }

.pl-price__input {
    width: 100%;
    box-sizing: border-box;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--brand-border);
    border-radius: 9px;
    background: var(--brand-surface-recess);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    color: var(--brand-text);
    outline: 0;
}

.pl-price__input:focus { border-color: var(--brand-primary); }
.pl-price__dash { margin-top: 16px; width: 8px; height: 1px; background: var(--brand-text-soft); flex: none; }

/* noUiSlider 14.6.3, vendored as "PriceSlider". These override its own sheet's
   look only — never its geometry, which its JS measures. */
.pl-price__slider .noUi-target { border: 0; background: transparent; box-shadow: none; height: 5px; width: 100%; }
.pl-price__slider .noUi-base { height: 5px; }
.pl-price__slider .noUi-connects { height: 5px; border-radius: 3px; background: var(--brand-border); }
.pl-price__slider .noUi-connect { background: linear-gradient(90deg, var(--brand-primary-sheen), var(--brand-primary)); }

.pl-price__slider .noUi-handle {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--brand-card-face);
    border: 2px solid var(--brand-primary);
    box-shadow: var(--brand-shadow-facet-thumb);
    cursor: grab;
    right: -9px;
    top: -7px;
}

.pl-price__slider .noUi-handle::before,
.pl-price__slider .noUi-handle::after { display: none; }
.pl-price__slider .noUi-handle:active { cursor: grabbing; }

/* Facet groups */
.pl-facet { border-top: 1px solid var(--brand-border); }

.pl-facet__trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 13px 16px;
    border: 0;
    background: transparent;
    text-align: start;
    cursor: pointer;
    font: inherit;
    transition: background .18s ease;
}

.pl-facet__trigger:hover { background: var(--brand-surface-recess); }
.pl-facet__name { display: flex; align-items: center; gap: 8px; min-width: 0; }

.pl-facet__title {
    font-size: 12px;
    font-weight: 700;
    color: var(--brand-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pl-facet__picked {
    flex: none;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--brand-primary-band);
    border: 1px solid var(--brand-primary-edge);
    color: var(--brand-primary-deep);
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pl-facet__chev { flex: none; width: 15px; height: 15px; color: var(--brand-text-soft); transition: transform .2s ease, color .2s ease; }
.pl-facet__trigger[aria-expanded="true"] .pl-facet__chev { transform: rotate(180deg); color: var(--brand-primary-deep); }

.pl-facet__panel {
    padding: 0 16px 13px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-height: 186px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.pl-facet__panel[hidden] { display: none; }
.pl-facet__search { margin-bottom: 6px; }

.pl-opt {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 6px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    text-align: start;
    width: 100%;
    text-decoration: none;
    font: inherit;
    transition: background .18s ease;
}

.pl-opt:hover { background: var(--brand-surface-recess); }
.pl-opt[hidden] { display: none; }

.pl-opt__box {
    flex: none;
    width: 17px;
    height: 17px;
    border-radius: 5px;
    background: var(--brand-surface-recess);
    border: 1px solid var(--brand-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
}

.pl-opt__box svg { width: 11px; height: 11px; }

.pl-opt--on .pl-opt__box {
    background: var(--brand-check-face);
    border-color: var(--brand-check-edge);
    color: var(--brand-primary-ink);
}

.pl-opt__label {
    flex: 1;
    min-width: 0;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--brand-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pl-opt__n { flex: none; font-size: 10.5px; font-weight: 600; color: var(--brand-text-soft); }

.pl-note {
    font-size: 10.5px;
    font-weight: 500;
    line-height: 1.85;
    color: var(--brand-text-soft);
    padding: 0 4px;
    margin: 0;
}


/* ── 7 · RESULTS BAR & SORT RAIL ──────────────────────────────────────────── */

.pl-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 11px 15px;
    background: var(--brand-card-face);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-brand-lg);
    box-shadow: 0 1px 2px rgba(42, 42, 40, .04);
}

.pl-bar__count { flex: none; display: flex; align-items: center; gap: 10px; }
.pl-bar__n { font-size: 14px; font-weight: 800; }
.pl-bar__n--zero { color: var(--brand-danger); }
.pl-bar__sep { width: 1px; height: 15px; background: var(--brand-border); }
.pl-bar__ctx { font-size: 11.5px; font-weight: 500; color: var(--brand-text-soft); }

.pl-sort { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.pl-sort__label { flex: none; font-size: 11.5px; font-weight: 600; color: var(--brand-text-muted); }

.pl-sort__opt {
    flex: none;
    height: 32px;
    padding: 0 13px;
    border-radius: 16px;
    cursor: pointer;
    background: var(--brand-surface-recess);
    color: var(--brand-text-muted);
    border: 1px solid var(--brand-border);
    font: inherit;
    font-size: 11.5px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: border-color .2s ease, color .2s ease;
}

.pl-sort__opt:hover { border-color: var(--brand-primary-edge); color: var(--brand-primary-deep); }

.pl-sort__opt--on {
    background: var(--brand-check-face);
    color: var(--brand-primary-ink);
    border-color: var(--brand-check-edge);
    font-weight: 700;
    box-shadow: var(--brand-shadow-bar-hi);
}

@media (max-width: 991.98px) {
    .pl-bar { display: none; }
}


/* ── 8 · GRID ─────────────────────────────────────────────────────────────── */

.pl-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--listing-grid-gap);
    align-items: stretch;
}

/* §11's column bands, and nothing else decides them — there is no width-reading
   JavaScript in this component. */
@media (max-width: 1199.98px) { .pl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767.98px)  { .pl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--listing-grid-gap-sm); } }

/* Exactly three results stretch across three columns rather than leaving a gap
   in a four-column row (§7, decoded line 1569). */
.pl-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 991.98px) { .pl-grid--three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767.98px) { .pl-grid--three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }


/* ── 9 · SHOWCASE (1-2 RESULTS) & RELATED ─────────────────────────────────── */

.pl-showcase-wrap { display: flex; flex-direction: column; gap: 18px; }
.pl-showcase-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--listing-grid-gap); }
@media (max-width: 767.98px) { .pl-showcase-pair { grid-template-columns: 1fr; } }

.pl-showcase {
    display: flex;
    gap: 26px;
    padding: 14px;
    background: var(--brand-card-face);
    border: 1px solid var(--brand-primary);
    border-radius: 20px;
    box-shadow: var(--brand-shadow-showcase);
}

.pl-showcase__media {
    position: relative;
    flex: none;
    width: 330px;
    height: 330px;
    border-radius: 15px;
    overflow: hidden;
    background: linear-gradient(160deg, var(--brand-card-well-from), var(--brand-card-well-to));
    display: flex;
    align-items: center;
    justify-content: center;
}

.pl-showcase__media::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--brand-primary-pale) 1px, transparent 1.1px);
    background-size: 13px 13px;
    opacity: .5;
}

.pl-showcase__media img { position: relative; width: 100%; height: 100%; object-fit: contain; padding: 8%; box-sizing: border-box; }
.pl-showcase__media .pl-coin { width: 186px; height: 186px; }
.pl-showcase__media .pl-coin::after { inset: 16px; }

.pl-bracket { position: absolute; width: 20px; height: 20px; }
.pl-bracket--tr { top: 12px; right: 12px; border-top: 1px solid var(--brand-primary-bracket); border-right: 1px solid var(--brand-primary-bracket); border-top-right-radius: 5px; }
.pl-bracket--tl { top: 12px; left: 12px; border-top: 1px solid var(--brand-primary-bracket); border-left: 1px solid var(--brand-primary-bracket); border-top-left-radius: 5px; }
.pl-bracket--br { bottom: 12px; right: 12px; border-bottom: 1px solid var(--brand-primary-bracket); border-right: 1px solid var(--brand-primary-bracket); border-bottom-right-radius: 5px; }
.pl-bracket--bl { bottom: 12px; left: 12px; border-bottom: 1px solid var(--brand-primary-bracket); border-left: 1px solid var(--brand-primary-bracket); border-bottom-left-radius: 5px; }

.pl-showcase__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; padding: 8px 4px 4px; }
.pl-showcase__badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.pl-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
}

.pl-badge--gold { background: var(--brand-primary-band); border: 1px solid var(--brand-primary-edge); color: var(--brand-primary-deep); }
.pl-badge--info { background: var(--brand-surface-2); border: 1px solid var(--brand-info-edge); color: var(--brand-info); }
.pl-badge--stock { background: transparent; color: var(--brand-success); font-weight: 700; }
.pl-badge__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-success); }

.pl-showcase__title {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.5;
    letter-spacing: -.015em;
    color: var(--brand-text);
    text-decoration: none;
    margin: 0;
    transition: color .2s ease;
}

a.pl-showcase__title:hover { color: var(--brand-primary-deep); }

.pl-showcase__desc {
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.95;
    color: var(--brand-text-muted);
    max-width: 560px;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pl-specs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    background: var(--brand-border);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-brand-md);
    overflow: hidden;
}

.pl-specs__cell { background: var(--brand-surface-recess); padding: 11px 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pl-specs__k { font-size: 10px; font-weight: 500; color: var(--brand-text-soft); }
.pl-specs__v { font-size: 12.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pl-showcase__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-top: auto; flex-wrap: wrap; }
.pl-showcase__price { display: flex; flex-direction: column; gap: 5px; }
.pl-showcase__pricecap { font-size: 10px; font-weight: 600; letter-spacing: .06em; color: var(--brand-text-muted); }

.pl-showcase__amount {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.pl-showcase__was { font-size: 12px; font-weight: 500; color: var(--brand-text-soft); text-decoration: line-through; }
.pl-showcase__fresh { font-size: 10.5px; font-weight: 500; color: var(--brand-text-soft); }
.pl-showcase__actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.pl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    height: 52px;
    padding: 0 26px;
    border-radius: var(--radius-brand-lg);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid transparent;
    text-decoration: none;
    /* Persian action labels are long («افزودن به سبد خرید» is four words). Without this
       they wrap to three lines inside a fixed-height button and the row collapses. */
    white-space: nowrap;
    transition: transform .18s ease, background .22s ease, color .22s ease, border-color .22s ease;
}

.pl-btn--gold { background: var(--brand-check-face); color: var(--brand-primary-ink); border-color: var(--brand-check-edge); box-shadow: var(--brand-shadow-cta-lg); }
.pl-btn--gold:hover { transform: translateY(-2px); }
.pl-btn--ghost { background: var(--brand-surface-2); color: var(--brand-text-muted); border-color: var(--brand-primary-edge); }
.pl-btn--ghost:hover { background: var(--brand-primary-band); color: var(--brand-primary-deep); }
.pl-btn--sm { height: 46px; padding: 0 16px; font-size: 12.5px; border-radius: var(--radius-brand-cta); }
.pl-btn--block { width: 100%; }

/* Two-up showcase: same component, smaller and stacked. */
.pl-showcase--pair { flex-direction: column; gap: 0; padding: 8px; border-radius: var(--radius-brand-card-lg); }
.pl-showcase--pair .pl-showcase__media { width: 100%; height: 196px; border-radius: var(--radius-brand-tile); }
.pl-showcase--pair .pl-showcase__media .pl-coin { width: 126px; height: 126px; }
.pl-showcase--pair .pl-showcase__body { padding: 14px 8px 6px; gap: 12px; }
.pl-showcase--pair .pl-showcase__title { font-size: 15px; line-height: 1.65; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.pl-showcase--pair .pl-showcase__amount { font-size: 24px; }
.pl-showcase--pair .pl-specs { display: none; }
.pl-showcase--pair .pl-showcase__desc { display: none; }
.pl-showcase--pair .pl-showcase__foot { flex-direction: column; align-items: stretch; gap: 10px; }

@media (max-width: 767.98px) {
    .pl-showcase { flex-direction: column; gap: 0; padding: 8px; border-radius: var(--radius-brand-card-lg); }
    .pl-showcase__media { width: 100%; height: 240px; }
    .pl-showcase__media .pl-coin { width: 140px; height: 140px; }
    .pl-showcase__body { padding: 14px 8px 6px; gap: 12px; }
    .pl-showcase__title { font-size: 16px; line-height: 1.6; }
    .pl-showcase__amount { font-size: 22px; }
    .pl-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pl-showcase__foot { flex-direction: column; align-items: stretch; }
    .pl-showcase__actions { flex-direction: column; align-items: stretch; }
    /* SCOPED to the showcase's own action row. Written bare, `.pl-btn` put
       width:100% on every button below 768px — including the filter sheet's footer,
       where it made «پاک کردن» claim the full width and squeeze the apply button
       down to a 147px sliver hanging off the edge. */
    .pl-showcase__actions .pl-btn { height: 50px; width: 100%; }
}

/* Related row */
.pl-related { display: flex; flex-direction: column; gap: 12px; padding-top: 6px; }
.pl-related__head { display: flex; align-items: center; gap: 12px; }
.pl-related__title { font-size: 13px; font-weight: 700; }
.pl-related__rule { flex: 1; height: 1px; background: linear-gradient(90deg, var(--brand-primary-hairline), transparent); }
.pl-related__all { font-size: 11.5px; font-weight: 700; color: var(--brand-primary-deep); white-space: nowrap; text-decoration: none; }
.pl-related__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 991.98px) { .pl-related__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.pl-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-brand-tile);
    background: var(--brand-card-face);
    text-decoration: none;
    transition: transform .2s ease, border-color .2s ease;
}

.pl-mini:hover { transform: translateY(-2px); border-color: var(--brand-primary-edge); }

.pl-mini__thumb {
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: var(--radius-brand);
    background: linear-gradient(160deg, var(--brand-card-well-from), var(--brand-card-well-to));
    border: 1px solid var(--brand-primary-rule);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pl-mini__thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; box-sizing: border-box; }
.pl-mini__thumb .pl-coin { width: 26px; height: 26px; }
.pl-mini__thumb .pl-coin::after { inset: 3px; }
.pl-mini__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pl-mini__name { font-size: 11.5px; font-weight: 600; color: var(--brand-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-mini__price { font-size: 12px; font-weight: 700; color: var(--brand-primary-deep); font-variant-numeric: tabular-nums; }


/* ── 10 · LOAD MORE ───────────────────────────────────────────────────────── */

.pl-more { display: flex; flex-direction: column; align-items: center; gap: 9px; padding-top: 8px; }

.pl-more__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 48px;
    padding: 0 30px;
    border-radius: var(--radius-brand-lg);
    cursor: pointer;
    background: var(--brand-surface-2);
    color: var(--brand-primary-deep);
    border: 1px solid var(--brand-primary);
    font: inherit;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: var(--brand-shadow-loadmore);
    transition: background .22s ease, color .22s ease, transform .18s ease;
}

.pl-more__btn:hover { background: var(--brand-check-face); color: var(--brand-primary-ink); transform: translateY(-2px); }
.pl-more__btn svg { width: 16px; height: 16px; }
.pl-more__cap { font-size: 11px; font-weight: 500; color: var(--brand-text-soft); text-align: center; }

/* Loading */
.pl-more__btn[disabled] {
    cursor: wait;
    background: var(--brand-surface-recess);
    color: var(--brand-text-muted);
    border-color: var(--brand-border);
    box-shadow: none;
    transform: none;
}

.pl-spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--brand-border);
    border-top-color: var(--brand-primary);
    animation: plSpin .8s linear infinite;
}

@keyframes plSpin { to { transform: rotate(360deg); } }
@keyframes plPulse { 0% { opacity: .4 } 50% { opacity: .85 } 100% { opacity: .4 } }

.pl-skeletons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--listing-grid-gap); }
@media (max-width: 1199.98px) { .pl-skeletons { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767.98px)  { .pl-skeletons { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--listing-grid-gap-sm); } }

.pl-skeleton {
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-brand-card);
    padding: 8px;
    background: var(--brand-surface-recess);
    display: flex;
    flex-direction: column;
    gap: 11px;
    animation: plPulse 1.5s ease-in-out infinite;
}

.pl-skeleton__img { aspect-ratio: 1 / 1; border-radius: 11px; background: linear-gradient(160deg, var(--brand-skeleton-card-from), var(--brand-skeleton-card-to)); }
.pl-skeleton__bar { height: 11px; border-radius: 5px; background: var(--brand-skeleton-bar); margin: 0 6px; }
.pl-skeleton__bar--short { width: 62%; }
.pl-skeleton__bar--price { height: 22px; width: 52%; border-radius: 6px; background: var(--brand-skeleton-bar-strong); margin: 6px 6px 8px; }

/* End of results */
.pl-end { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 22px 24px; width: 100%; box-sizing: border-box; }
.pl-end__row { width: 100%; display: flex; align-items: center; gap: 14px; }
.pl-end__rule { flex: 1; height: 1px; }
.pl-end__rule--s { background: linear-gradient(90deg, transparent, var(--brand-primary-hairline)); }
.pl-end__rule--e { background: linear-gradient(90deg, var(--brand-primary-hairline), transparent); }
.pl-end__label { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--brand-primary-deep); white-space: nowrap; }
.pl-end__label svg { width: 14px; height: 14px; }
.pl-end__top { font-size: 11.5px; font-weight: 600; color: var(--brand-text-muted); text-decoration: none; background: none; border: 0; cursor: pointer; }
.pl-end__top:hover { color: var(--brand-primary-deep); }

@media (max-width: 991.98px) {
    .pl-more { padding-top: 16px; }
    .pl-more__btn { width: 100%; height: 48px; border-radius: var(--radius-brand-cta); }
    .pl-more__cap { font-size: 10.5px; }
}


/* ── 11 · EMPTY STATES ────────────────────────────────────────────────────── */

/* All three span the FULL results column — the old block sat in a single grid
   cell, so it rendered as a narrow card in the top corner of an empty grid. */
.pl-empty {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 44px 32px 40px;
    background: var(--brand-card-face);
    border: 1px solid var(--brand-primary-rule);
    border-radius: var(--radius-brand-card-lg);
    overflow: hidden;
    text-align: center;
}

.pl-empty::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--brand-primary-pale) 1px, transparent 1.1px);
    background-size: 16px 16px;
    opacity: .35;
}

.pl-empty > * { position: relative; }

.pl-empty__icon {
    width: 58px;
    height: 58px;
    border-radius: 17px;
    background: linear-gradient(160deg, var(--brand-card-well-from), var(--brand-surface-sand));
    border: 1px solid var(--brand-primary-rule);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary-deep);
}

.pl-empty__icon svg { width: 26px; height: 26px; }
.pl-empty__title { font-size: 19px; font-weight: 800; margin: 0; }
.pl-empty__body { font-size: 12.5px; font-weight: 500; line-height: 1.9; color: var(--brand-text-muted); max-width: 520px; text-wrap: pretty; margin: 0; }
.pl-empty__actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* Search-empty is wider, left-aligned and carries real suggestions. */
.pl-empty--search { align-items: stretch; text-align: start; gap: 24px; padding: 38px 40px 36px; }
.pl-empty--search .pl-empty__row { display: flex; align-items: flex-start; gap: 20px; }
.pl-empty--search .pl-empty__body { max-width: 660px; }
.pl-empty--search .pl-empty__title { font-size: 20px; line-height: 1.5; }
.pl-empty__block { display: flex; flex-direction: column; gap: 11px; }
.pl-empty__blocktitle { font-size: 12px; font-weight: 700; color: var(--brand-text-muted); }
.pl-empty__pills { display: flex; flex-wrap: wrap; gap: 8px; }

.pl-pill {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 15px;
    border-radius: 17px;
    background: var(--brand-surface-recess);
    border: 1px solid var(--brand-border);
    font-size: 12px;
    font-weight: 600;
    color: var(--brand-text);
    text-decoration: none;
    transition: border-color .2s ease, color .2s ease;
}

.pl-pill:hover { border-color: var(--brand-primary); color: var(--brand-primary-deep); }

.pl-shortcuts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 767.98px) { .pl-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* An empty-but-published subject is deliberately NEUTRAL, not gold: nothing has
   gone wrong and nothing needs urgency. */
.pl-empty--subject {
    flex-direction: row;
    align-items: center;
    text-align: start;
    gap: 26px;
    padding: 32px 34px;
    border-color: var(--brand-border);
}

.pl-empty--subject::before { background-image: radial-gradient(var(--brand-skeleton-card-to) 1px, transparent 1.1px); opacity: .6; }
.pl-empty--subject .pl-empty__icon { background: var(--brand-surface-recess); border-color: var(--brand-border); color: var(--brand-text-soft); }
.pl-empty--subject .pl-empty__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.pl-empty--subject .pl-empty__title { font-size: 18px; }
.pl-empty--subject .pl-empty__actions { flex: none; flex-direction: column; align-items: stretch; }

@media (max-width: 767.98px) {
    .pl-empty { padding: 30px 18px 28px; gap: 13px; }
    .pl-empty__title { font-size: 16px; }
    .pl-empty--search { padding: 26px 16px; gap: 18px; }
    .pl-empty--search .pl-empty__row { flex-direction: column; gap: 12px; }
    .pl-empty--search .pl-empty__title { font-size: 17px; line-height: 1.6; }
    .pl-empty--subject { flex-direction: column; align-items: stretch; text-align: center; padding: 26px 18px; }
    .pl-empty--subject .pl-empty__icon { align-self: center; }
    .pl-empty__actions { flex-direction: column; align-items: stretch; }
    .pl-empty__actions .pl-btn { width: 100%; }
}


/* ── 12 · MOBILE BAR & SHEETS ─────────────────────────────────────────────── */

/* The desktop-only counterpart of .pl-bar. Sticky under the header so the count,
   the filter entry and the sort entry are always reachable — the reference makes
   the result count visible on mobile, which it was not before. */
.pl-mobilebar { display: none; }

@media (max-width: 991.98px) {
    .pl-mobilebar {
        display: block;
        position: sticky;
        top: var(--header-inset, 64px);
        z-index: 20;
        margin: 4px calc(-1 * var(--listing-gutter-page-sm)) 0;
        padding: 0 var(--listing-gutter-page-sm);
        background: color-mix(in oklab, var(--brand-card-face) 97%, transparent);
        border-top: 1px solid var(--brand-border);
        border-bottom: 1px solid var(--brand-border);
        box-shadow: var(--brand-shadow-listing-bar);
        backdrop-filter: blur(6px);
    }

    .pl-mobilebar__btns { display: flex; gap: 9px; padding: 10px 0 8px; }

    .pl-mobilebar__btn {
        flex: 1;
        height: 44px;
        border-radius: var(--radius-brand-md);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        font: inherit;
        font-size: 12.5px;
        font-weight: 700;
        cursor: pointer;
        background: var(--brand-card-face);
        border: 1px solid var(--brand-border);
        color: var(--brand-text);
    }

    .pl-mobilebar__btn svg { width: 16px; height: 16px; }
    .pl-mobilebar__btn--filter { background: var(--brand-primary-band); border-color: var(--brand-primary-edge); color: var(--brand-primary-deep); }
    .pl-mobilebar__btn[disabled] { color: var(--brand-text-soft); cursor: not-allowed; }

    .pl-mobilebar__pill {
        min-width: 19px;
        height: 19px;
        padding: 0 5px;
        border-radius: 10px;
        background: var(--brand-primary);
        color: var(--brand-primary-ink);
        font-size: 10.5px;
        font-weight: 700;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .pl-mobilebar__meta { display: flex; align-items: center; justify-content: space-between; padding: 0 1px 9px; }
    .pl-mobilebar__n { font-size: 12px; font-weight: 700; }
    .pl-mobilebar__n--zero { color: var(--brand-danger); }
    .pl-mobilebar__sort { font-size: 11px; font-weight: 500; color: var(--brand-text-soft); }
}

/* Scrim shared by both sheets. */
.pl-scrim {
    position: fixed;
    inset: 0;
    background: var(--brand-scrim-strong);
    z-index: 1200;
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
}

.pl-scrim.is-open { opacity: 1; pointer-events: auto; }

/* Filter sheet — full screen, staged, committed by «اعمال». */
.pl-sheet {
    position: fixed;
    z-index: 1210;
    background: var(--brand-surface-2);
    display: flex;
    flex-direction: column;
    transition: transform .28s cubic-bezier(.4, 0, .2, 1);
}

.pl-sheet--filter { inset: 0; transform: translateX(100%); }
.pl-sheet--filter.is-open { transform: translateX(0); }

.pl-sheet__head {
    flex: none;
    height: 56px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--brand-border);
    background: var(--brand-primary-band);
}

.pl-sheet__title { font-size: 15px; font-weight: 800; }

.pl-sheet__x {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    border: 1px solid var(--brand-border);
    background: var(--brand-surface-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--brand-text);
}

.pl-sheet__x svg { width: 16px; height: 16px; }
.pl-sheet__body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 96px; }

.pl-sheet__foot {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    display: flex;
    gap: 10px;
    padding: 12px 14px calc(16px + env(safe-area-inset-bottom, 0px));
    background: color-mix(in oklab, var(--brand-card-face) 98%, transparent);
    border-top: 1px solid var(--brand-border);
    box-shadow: var(--brand-shadow-listing-foot);
}

.pl-sheet__foot .pl-btn { height: 50px; }
.pl-sheet__foot .pl-btn--ghost { flex: none; padding: 0 18px; border-color: var(--brand-border); }
.pl-sheet__foot .pl-btn--gold { flex: 1; }

/* Inside the sheet the same partials render, only roomier — touch targets grow,
   nothing is duplicated. */
.pl-sheet .pl-filters { border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.pl-sheet .pl-filters__head { display: none; }
.pl-sheet .pl-chips { padding: 13px 14px; border-bottom: 1px solid var(--brand-border); }
.pl-sheet .pl-filters__body { padding: 14px; gap: 15px; border-bottom: 1px solid var(--brand-border); }
.pl-sheet .pl-filters__group { padding: 14px; gap: 10px; }
.pl-sheet .pl-field { height: 44px; border-radius: 11px; }
.pl-sheet .pl-switch { width: 46px; height: 26px; border-radius: 13px; }
.pl-sheet .pl-switch__knob { width: 20px; height: 20px; }
.pl-sheet .pl-price__input { height: 40px; }
.pl-sheet .pl-price__slider .noUi-connects { height: 6px; }
.pl-sheet .pl-price__slider .noUi-handle { width: 22px; height: 22px; right: -11px; top: -8px; }
.pl-sheet .pl-facet__trigger { padding: 15px 14px; }
.pl-sheet .pl-facet__panel { padding: 0 14px 12px; max-height: none; }
.pl-sheet .pl-opt { padding: 9px 4px; gap: 10px; border-radius: 9px; }
.pl-sheet .pl-opt__box { width: 20px; height: 20px; border-radius: 6px; }
.pl-sheet .pl-opt__box svg { width: 12px; height: 12px; }
.pl-sheet .pl-opt__label { font-size: 12.5px; }
.pl-sheet .pl-note { display: none; }

/* Sort sheet — a real bottom sheet, separate, applied immediately. */
.pl-sheet--sort {
    inset-inline: 0;
    bottom: 0;
    top: auto;
    border-top: 1px solid var(--brand-primary-edge);
    border-radius: 22px 22px 0 0;
    background: var(--brand-card-face);
    box-shadow: var(--brand-shadow-listing-sheet);
    padding: 10px 0 calc(14px + env(safe-area-inset-bottom, 0px));
    transform: translateY(100%);
    max-height: 80vh;
}

.pl-sheet--sort.is-open { transform: translateY(0); }
.pl-sheet__grab { align-self: center; width: 42px; height: 4px; border-radius: 2px; background: var(--brand-border); margin-bottom: 8px; }
.pl-sheet--sort .pl-sheet__head { height: auto; padding: 0 16px 10px; background: transparent; }
.pl-sheet--sort .pl-sheet__body { padding: 4px 8px 0; }

.pl-sortopt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    padding: 0 12px;
    border-radius: var(--radius-brand-md);
    text-decoration: none;
    color: var(--brand-text);
    font-size: 13px;
    font-weight: 500;
}

.pl-sortopt__mark { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--brand-border); background: var(--brand-surface-recess); display: inline-flex; align-items: center; justify-content: center; color: transparent; }
.pl-sortopt__mark svg { width: 13px; height: 13px; }
.pl-sortopt--on { background: var(--brand-primary-band); color: var(--brand-primary-deep); font-weight: 700; }
.pl-sortopt--on .pl-sortopt__mark { background: var(--brand-check-face); border-color: var(--brand-check-edge); color: var(--brand-primary-ink); }

/* The sheets exist only below 992; above it the sidebar and the pill rail are
   the controls, and leaving the sheets mounted would let a stale one open. */
@media (min-width: 992px) {
    /* No !important needed: these two selectors carry the same specificity as the
       declarations above and simply come later in source order. */
    .pl-scrim { display: none; }
    .pl-sheet { display: none; }
}

/* A page that has scrolled behind an open sheet must not scroll. */
body.pl-locked { overflow: hidden; }
