/* Shop + style category listing — design `isCatalog` (values copied from the prototype).
   Scoped to .pm-shop so the shared chip / toolbar rules in precast-shop.css stay untouched. */

/* Filter bar: the rule runs the full 1440 box (gutters included), as in the design. */
.pm-shop .pm-shop__bar {
    margin: 0 calc(-1 * var(--pm-gutter)) 28px;
    padding: 0 var(--pm-gutter) 16px;
    border-bottom: 1px solid var(--pm-line);
}

/* Idle chips: #f6f3f2 on #585f65; active stays red on white. */
.pm-shop .pm-chip-menu summary { background: var(--pm-band); color: var(--pm-muted); }
.pm-shop .pm-chip-menu summary:hover { background: var(--pm-hover); color: var(--pm-ink); }
.pm-shop .pm-chip-menu.is-active summary,
.pm-shop .pm-chip-menu.is-active summary:hover { background: var(--pm-red); color: var(--pm-white); }

/* Size buckets with no surround on file yet. */
.pm-chip-menu__none {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 16px; font-size: 14px; color: var(--pm-muted); opacity: 0.55; white-space: nowrap; cursor: default;
}

/* Collapsed page run in the pager (1 … 4 5 6 … 9). */
.pm-pager .pm-pager__gap { cursor: default; color: var(--pm-muted); }

/* Search the shop — design `isSearch`: 50px field. */
.pm-search-page .pm-search-field input { height: 50px; line-height: 18px; -webkit-appearance: none; appearance: none; }
.pm-search-page .pm-search-field input::-webkit-search-decoration { -webkit-appearance: none; }
.pm-search-results { padding-top: 48px; padding-bottom: 96px; }

.pm-shop__end { height: 120px; }

/* --- Phones (design mobile, ≤900px) ---------------------------------------- */
@media (max-width: 900px) {
    .pm-shop .pm-page-hero .pm-h1 { font-size: 28px; line-height: 34px; }

    /* Filter bar (design `fbar` / `fchips` / `fsort`): label row, 2 × 2 chips, sort under a rule. */
    .pm-shop .pm-shop__bar { flex-direction: column; align-items: stretch; gap: 14px; margin-bottom: 20px; }
    .pm-shop .pm-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .pm-shop .pm-filters .pm-toolbar__label, .pm-shop .pm-filters .pm-clear { grid-column: 1 / -1; justify-self: start; }
    .pm-shop .pm-chip-menu summary { justify-content: space-between; width: 100%; padding: 10px 14px; font-size: 11px; line-height: 20px; }
    .pm-shop .pm-chip-menu summary { overflow: hidden; text-overflow: ellipsis; }
    .pm-shop .pm-chip-menu:nth-of-type(even) ul { left: auto; right: 0; }
    .pm-body .pm-shop .pm-chip-menu li a, .pm-shop .pm-chip-menu__none { line-height: 22px; }
    .pm-shop .pm-sort { justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--pm-line-soft); }
    .pm-shop .pm-sort select { font-size: 14px; border: 1px solid var(--pm-line-strong); border-radius: 6px; padding: 0 10px; height: 52px; }

    .pm-shop .pm-toolbar__label { line-height: normal; margin: 0; }
    .pm-body .pm-shop .pm-sort select { font-size: 14px !important; }
    .pm-shop .pm-grid-4 { row-gap: 32px; }
    .pm-shop .pm-pager__range, .pm-shop .pm-assist h2 { line-height: normal; }

    .pm-shop__end { height: 56px; }

    /* Search results (design `isSearch`, `p1`): one card per row, 28px apart. */
    .pm-search-results { padding-bottom: 56px; }
    .pm-search-results .pm-grid-4 { row-gap: 28px; }
    .pm-search-page .pm-pager__range, .pm-search-results > .pm-label { line-height: normal; }
    .pm-search-results .pm-empty { padding: 24px 20px; }
    .pm-search-results .pm-empty > .ms { display: block; height: 48px; line-height: 48px; margin: 0 auto; }
}
