/* =========================================================================
   Catalogue storefront — refonte UX (toolbar + popover filtres HORS-FLUX).
   Loaded AFTER catalog-advanced.css to override the legacy sidebar layout.
   Critical rule: the filter panel & backdrop are OUT OF FLOW (position:
   absolute) so opening them NEVER moves the product grid vertically.
   White-label: uses generic tokens only (--paper/--ink/--rule/--rc-gold…).
   ========================================================================= */

.cat-adv { position: relative; display: block; }
.cat-adv__filter-overlay { display: none !important; } /* legacy mobile overlay off */

/* ---------- Toolbar ---------- */
.cat-tb {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin: 4px 0 16px;
    position: relative;
    z-index: 6;
}
.cat-tb__left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.cat-tb__right { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

/* Filtres button — thin gold outline, icon, chevron */
.cat-fbtn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 14px;
    border: 1px solid var(--rc-gold, #b1863b);
    border-radius: 12px;
    background: var(--paper, #fff);
    color: var(--ink, #17120f);
    font-size: 14px; font-weight: 600;
    cursor: pointer;
    transition: background .15s, box-shadow .15s;
}
.cat-fbtn:hover { background: rgba(177,134,59,.06); }
.cat-fbtn__chev { transition: transform .2s; color: var(--ink-soft, #6b625b); }
.cat-fbtn[aria-expanded="true"] .cat-fbtn__chev { transform: rotate(180deg); }

/* Sort */
.cat-tb__right .cat-adv__sort { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.cat-tb__right label { font-size: 13px; color: var(--ink-soft, #6b625b); white-space: nowrap; }
.cat-tb__right select {
    border: 1px solid var(--rule, #e7e0d3); border-radius: 10px;
    padding: 8px 30px 8px 12px; font-size: 14px; background: var(--paper,#fff); color: var(--ink,#17120f);
    cursor: pointer;
}

/* Chips (inline in toolbar) */
.cat-tb .cat-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 10px; border-radius: 999px;
    background: #f3efe7; border: 1px solid var(--rule, #e7e0d3);
    color: var(--ink, #17120f); font-size: 13px; text-decoration: none;
}
.cat-tb .cat-chip:hover { background: #ece6da; }
.cat-tb .cat-chip__x { color: var(--ink-soft, #6b625b); font-size: 15px; line-height: 1; }
.cat-tb .cat-chips__reset {
    font-size: 13px; color: var(--ink-soft, #6b625b); text-decoration: underline;
    background: none; border: 0; cursor: pointer; padding: 4px 6px;
}

/* ---------- Popover panel — viewport-fixed: never contributes to document scroll ---------- */
.cat-pop {
    position: fixed; top: 60px; left: 0; z-index: 120;
    width: min(720px, 100%);
    background: var(--paper, #fff);
    border: 1px solid var(--rule, #e7e0d3);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(23,18,15,.18);
    padding: 22px 24px 18px;
    display: none;
    max-height: min(72vh, 720px);
    overflow-y: auto;
    overscroll-behavior: contain;
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    pointer-events: none;
}
.cat-pop.is-open {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
}
.cat-pop__close {
    position: absolute; top: 14px; right: 14px;
    width: 30px; height: 30px; border: 0; background: none; cursor: pointer;
    font-size: 22px; line-height: 1; color: var(--ink-soft, #6b625b); border-radius: 8px;
}
.cat-pop__close:hover { background: #f3efe7; color: var(--ink,#17120f); }

.cat-pop__cols { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 0; }
.cat-pop__col { padding: 0 22px; border-left: 1px solid var(--rule, #e7e0d3); }
.cat-pop__col:first-child { padding-left: 0; border-left: 0; }
.cat-pop__title { font-size: 14px; font-weight: 700; color: var(--ink,#17120f); margin: 0 0 12px; }

.cat-pop__check { display: flex; align-items: center; gap: 9px; padding: 6px 0; font-size: 14px; color: var(--ink,#17120f); cursor: pointer; }
.cat-pop__check input { width: 16px; height: 16px; accent-color: var(--rc-gold,#b1863b); flex: 0 0 auto; }
.cat-pop__check .cat-pop__count { margin-left: auto; color: var(--ink-soft,#6b625b); font-size: 13px; }
.cat-pop__more { margin-top: 8px; background: none; border: 0; color: var(--rc-gold,#b1863b); font-weight: 600; font-size: 13px; cursor: pointer; padding: 4px 0; }
.cat-pop__row { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.cat-pop__row input[type="number"] {
    width: 100%; border: 1px solid var(--rule,#e7e0d3); border-radius: 10px; padding: 9px 12px; font-size: 14px;
}
.cat-pop__range { width: 100%; accent-color: var(--rc-gold,#b1863b); }

.cat-pop__foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--rule,#e7e0d3); margin-top: 18px; padding-top: 16px; }
.cat-pop__clear { background: none; border: 0; color: var(--ink-soft,#6b625b); text-decoration: underline; font-size: 14px; cursor: pointer; }
.cat-pop__apply {
    background: var(--ink, #17120f); color: #fff; border: 0; border-radius: 12px;
    padding: 11px 22px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.cat-pop__apply:hover { background: #000; }

/* ---------- Product grid — 4 per row desktop, larger cards ---------- */
.cat-adv .pc-grid,
.cat-adv__products .pc-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
@media (min-width: 640px)  { .cat-adv .pc-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; } }
@media (min-width: 1024px) { .cat-adv .pc-grid { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 24px; } }
@media (min-width: 1440px) { .cat-adv .pc-grid { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 28px; } }

/* ---------- Pagination — minimal centered ---------- */
.cat-adv__paging { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 36px; }
.cat-pg { min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; border-radius: 9px; border: 0; background: none; color: var(--ink,#17120f); font-size: 14px; text-decoration: none; cursor: pointer; }
.cat-pg:hover { background: #f3efe7; }
.cat-pg.is-active { background: var(--ink,#17120f); color: #fff; font-weight: 600; }
.cat-pg.is-disabled { color: #cfc6b8; pointer-events: none; }
.cat-pg--dots { pointer-events: none; }

/* ---------- Responsive: mobile popover full width ---------- */
@media (max-width: 760px) {
    .cat-pop { position: absolute; left: 0; right: 0; width: auto; top: 58px; padding: 18px; }
    .cat-pop__cols { grid-template-columns: 1fr; gap: 18px; }
    .cat-pop__col { padding: 0; border-left: 0; border-top: 1px solid var(--rule,#e7e0d3); padding-top: 16px; }
    .cat-pop__col:first-child { border-top: 0; padding-top: 0; }
    .cat-tb { margin-bottom: 12px; }
}


/* =========================================================================
   Zero-friction listing controls — shared by /products and /categories/:slug
   ========================================================================= */
.cat-tb--zf {
    padding: 8px;
    border: 1px solid color-mix(in srgb, var(--rule,#e7e0d3) 82%, transparent);
    border-radius: 18px;
    background: color-mix(in srgb, var(--paper,#fff) 90%, transparent);
    box-shadow: 0 10px 30px -26px rgba(23,18,15,.45);
    transition: opacity .16s ease, box-shadow .16s ease;
}
.cat-tb--zf.is-loading {
    opacity: .72;
    box-shadow: 0 10px 30px -22px rgba(23,18,15,.34);
}
.cat-tb--zf .cat-tb__left,
.cat-tb--zf .cat-tb__right { gap: 8px; }

.cat-fbtn--zf {
    min-height: 42px;
    border: 0;
    border-radius: 13px;
    padding: 0 14px;
    background: var(--ink,#17120f);
    color: #fff;
    box-shadow: none;
    gap: 9px;
}
.cat-fbtn--zf:hover {
    background: #000;
    color: #fff;
    box-shadow: 0 7px 18px -13px rgba(23,18,15,.65);
}
.cat-fbtn--zf[aria-expanded="true"] {
    background: color-mix(in srgb, var(--ink,#17120f) 88%, var(--rc-gold,#b1863b));
}
.cat-fbtn--zf .cat-fbtn__chev { color: currentColor; opacity: .7; }

.cat-tb__count {
    margin: 0 0 0 4px;
    font-size: 12px;
    line-height: 1;
    color: var(--ink-soft,#6b625b);
    white-space: nowrap;
}

.cat-sort--zf {
    min-height: 42px;
    padding: 4px 5px 4px 12px;
    border: 1px solid var(--rule,#e7e0d3);
    border-radius: 13px;
    background: #fff;
}
.cat-sort--zf label {
    font-size: 11px !important;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink-soft,#6b625b) !important;
}
.cat-tb__right .cat-sort--zf select {
    min-width: 148px;
    height: 32px;
    border: 0;
    border-radius: 9px;
    background-color: #f5f1ea;
    font-weight: 650;
    padding: 0 34px 0 11px;
    outline: none;
}
.cat-tb__right .cat-sort--zf select:focus-visible {
    box-shadow: 0 0 0 2px var(--paper,#fff), 0 0 0 4px color-mix(in srgb, var(--rc-gold,#b1863b) 70%, transparent);
}

.cat-pop__cols--compact {
    grid-template-columns: 1.25fr .75fr;
    max-width: 520px;
}
.cat-adv--category .cat-pop { width: min(560px,100%); }

[data-load-target] {
    transition: opacity .16s ease;
}
[data-load-target].is-catalog-refreshing {
    opacity: .48;
    pointer-events: none;
}

@media (max-width: 760px) {
    .cat-tb--zf {
        gap: 8px;
        padding: 7px;
        border-radius: 15px;
        flex-wrap: nowrap;
    }
    .cat-tb--zf .cat-tb__left,
    .cat-tb--zf .cat-tb__right {
        flex: 1 1 50%;
        min-width: 0;
    }
    .cat-tb--zf .cat-tb__right { justify-content: stretch; }
    .cat-fbtn--zf {
        width: 100%;
        justify-content: center;
        min-height: 44px;
    }
    .cat-tb__count { display: none; }
    .cat-sort--zf {
        width: 100%;
        min-width: 0;
        padding-left: 8px;
    }
    .cat-sort--zf label { display: none; }
    .cat-tb__right .cat-sort--zf select {
        width: 100%;
        min-width: 0;
        height: 34px;
    }
    .cat-pop__cols--compact { grid-template-columns: 1fr; }
}


/* =========================================================================
   Catalog utility bar v2 — flat, quiet, same width as the Masonry wall
   ========================================================================= */
.cat-tb--zf {
    width: 96vw;
    position: relative;
    left: 50%;
    margin-left: -48vw;
    box-sizing: border-box;
    min-height: 58px;
    margin-bottom: 18px;
    padding: 7px 0;
    border: 0;
    border-top: 1px solid var(--rule,#e7e0d3);
    border-bottom: 1px solid var(--rule,#e7e0d3);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}
.cat-tb--zf.is-loading {
    opacity: .7;
    box-shadow: none;
}
.cat-tb--zf .cat-tb__left,
.cat-tb--zf .cat-tb__right {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.cat-tb--zf .cat-tb__left { flex: 1 1 auto; overflow: hidden; }
.cat-tb--zf .cat-tb__right { flex: 0 0 auto; }

.cat-fbtn--zf {
    min-height: 40px;
    border: 1px solid var(--rule,#e7e0d3);
    border-radius: 999px;
    padding: 0 14px;
    background: #fff;
    color: var(--ink,#17120f);
    box-shadow: none;
    gap: 8px;
    font-weight: 650;
}
.cat-fbtn--zf:hover,
.cat-fbtn--zf[aria-expanded="true"] {
    background: #f6f1e9;
    color: var(--ink,#17120f);
    border-color: color-mix(in srgb,var(--ink,#17120f) 20%,var(--rule,#e7e0d3));
    box-shadow: none;
}
.cat-control-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    opacity: .8;
}

.cat-tb__count {
    margin: 0;
    font-size: 12px;
    line-height: 1;
    color: var(--ink-soft,#7a7168);
    white-space: nowrap;
}

.cat-sort--zf {
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.cat-sort--zf label {
    font-size: 11px !important;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--ink-soft,#7a7168) !important;
    white-space: nowrap;
}
.cat-tb__right .cat-sort--zf select {
    appearance: none;
    -webkit-appearance: none;
    min-width: 164px;
    height: 40px;
    border: 1px solid var(--rule,#e7e0d3);
    border-radius: 999px;
    background:
      #fff
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317120f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E")
      no-repeat right 12px center / 15px 15px;
    font-weight: 650;
    padding: 0 38px 0 14px;
    outline: none;
    color: var(--ink,#17120f);
}
.cat-tb__right .cat-sort--zf select:hover {
    border-color: color-mix(in srgb,var(--ink,#17120f) 20%,var(--rule,#e7e0d3));
    background-color: #fdfbf7;
}
.cat-tb__right .cat-sort--zf select:focus-visible {
    box-shadow: 0 0 0 2px var(--paper,#fff), 0 0 0 4px color-mix(in srgb,var(--rc-gold,#b1863b) 55%, transparent);
}

.cat-tb--zf .cat-chip {
    flex: 0 0 auto;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cat-tb--zf .cat-chips__reset { flex: 0 0 auto; }

@media (max-width: 900px) {
    .cat-tb--zf {
        width: 98vw;
        margin-left: -49vw;
        min-height: 56px;
        gap: 10px;
    }
}
@media (max-width: 760px) {
    .cat-tb--zf {
        padding: 6px 0;
        gap: 8px;
        flex-wrap: nowrap;
    }
    .cat-tb--zf .cat-tb__left,
    .cat-tb--zf .cat-tb__right {
        flex: 1 1 50%;
        min-width: 0;
    }
    .cat-tb--zf .cat-tb__left { overflow: visible; }
    .cat-fbtn--zf {
        width: 100%;
        min-height: 44px;
        justify-content: center;
        padding: 0 12px;
    }
    .cat-tb__count,
    .cat-tb--zf .cat-chip,
    .cat-tb--zf .cat-chips__reset {
        display: none;
    }
    .cat-sort--zf {
        width: 100%;
        min-width: 0;
    }
    .cat-sort--zf label { display: none; }
    .cat-tb__right .cat-sort--zf select {
        width: 100%;
        min-width: 0;
        height: 44px;
        border-radius: 999px;
    }
}


/* Mobile filters behave like a bottom sheet: thumb-friendly, no layout shift. */
@media (max-width:760px) {
    .cat-pop {
        position: fixed !important;
        z-index: 120 !important;
        left: 10px !important;
        right: 10px !important;
        top: auto !important;
        bottom: 10px !important;
        width: auto !important;
        max-height: min(78vh, 680px);
        overflow-y: auto;
        padding: 20px 18px 16px;
        border-radius: 22px;
        transform: translateY(18px);
        box-shadow: 0 24px 70px rgba(23,18,15,.28);
    }
    .cat-pop.is-open { transform: translateY(0); }
    .cat-pop__close {
        top: 12px;
        right: 12px;
        width: 34px;
        height: 34px;
        border-radius: 999px;
        background: #f5f1ea;
    }
    .cat-pop__foot {
        position: sticky;
        bottom: -16px;
        background: var(--paper,#fff);
        margin-inline: -18px;
        padding: 14px 18px 16px;
        z-index: 2;
    }
    .cat-pop__apply {
        min-height: 44px;
        border-radius: 999px;
        padding-inline: 18px;
    }
}


/* =========================================================================
   Marketplace controls v3 — ROYALECLAT
   Same visual width as the actual Masonry card area (not the full breakout).
   ========================================================================= */
.cat-market-controls {
    --catalog-wall-pad: clamp(12px, 2vw, 32px);
    width: calc(96vw - (2 * var(--catalog-wall-pad)));
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    box-sizing: border-box;
    margin: 0 0 18px;
    padding: 14px 14px 12px;
    border: 1px solid color-mix(in srgb, var(--rule,#e7e0d3) 88%, transparent);
    border-radius: 22px;
    background:
      linear-gradient(180deg, rgba(255,253,249,.94), rgba(250,246,239,.9));
    box-shadow: 0 12px 34px -30px rgba(23,18,15,.45);
}
.cat-market-controls .cat-tb--zf {
    width: auto;
    left: auto;
    margin: 0;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    position: static;
}
.cat-market-controls .cat-tb--zf .cat-tb__left,
.cat-market-controls .cat-tb--zf .cat-tb__right {
    gap: 10px;
}
.cat-market-controls .cat-fbtn--zf {
    min-height: 42px;
    padding-inline: 15px;
    border-radius: 999px;
    background: rgba(255,255,255,.9);
    border-color: color-mix(in srgb, var(--rule,#e7e0d3) 88%, #c5aa78);
}
.cat-market-controls .cat-fbtn--zf:hover,
.cat-market-controls .cat-fbtn--zf[aria-expanded="true"] {
    background: #fbf7ef;
    border-color: color-mix(in srgb, var(--rc-gold,#b1863b) 48%, var(--rule,#e7e0d3));
}
.cat-market-controls .cat-sort--zf {
    min-height: 42px;
}
.cat-market-controls .cat-tb__right .cat-sort--zf select {
    min-width: 210px;
    height: 42px;
    background-color: rgba(255,255,255,.9);
    border-color: color-mix(in srgb, var(--rule,#e7e0d3) 88%, #c5aa78);
}
.cat-market-controls .cat-tb__count {
    font-size: 12px;
    color: var(--ink-soft,#7a7168);
}

.cat-quick-filters {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 11px;
    padding-top: 11px;
    border-top: 1px solid color-mix(in srgb, var(--rule,#e7e0d3) 78%, transparent);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.cat-quick-filters::-webkit-scrollbar { display:none; }

.cat-quick-chip,
.cat-quick-filters .cat-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid var(--rule,#e7e0d3);
    border-radius: 999px;
    background: rgba(255,255,255,.8);
    color: var(--ink,#17120f);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background-color .15s ease, border-color .15s ease, transform .15s ease, color .15s ease;
}
.cat-quick-chip:hover,
.cat-quick-filters .cat-chip:hover {
    transform: translateY(-1px);
    background: #fff;
    border-color: color-mix(in srgb, var(--rc-gold,#b1863b) 40%, var(--rule,#e7e0d3));
}
.cat-quick-chip.is-active {
    color: #2a2117;
    border-color: color-mix(in srgb, var(--rc-gold,#b1863b) 74%, #7e5f2f);
    background:
      linear-gradient(180deg,
        color-mix(in srgb, var(--rc-gold,#b1863b) 26%, #fff),
        color-mix(in srgb, var(--rc-gold,#b1863b) 38%, #f7f1e7));
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.38);
}
.cat-quick-filters .cat-chip {
    background: #f6f1e8;
    border-color: color-mix(in srgb, var(--rc-gold,#b1863b) 22%, var(--rule,#e7e0d3));
}
.cat-quick-filters .cat-chip__x { margin-left: 6px; opacity: .62; }
.cat-quick-filters .cat-chips__reset {
    flex: 0 0 auto;
    color: var(--ink-soft,#7a7168);
    font-size: 11.5px;
    font-weight: 650;
    text-decoration: underline;
    text-underline-offset: 3px;
    white-space: nowrap;
}

/* Keep controls perfectly aligned with the visible Masonry columns. */
@media (max-width: 900px) {
    .cat-market-controls {
        --catalog-wall-pad: 12px;
        width: calc(98vw - (2 * var(--catalog-wall-pad)));
    }
}
@media (max-width: 760px) {
    .cat-market-controls {
        padding: 10px;
        border-radius: 17px;
        margin-bottom: 14px;
    }
    .cat-market-controls .cat-tb--zf {
        gap: 8px;
    }
    .cat-market-controls .cat-tb--zf .cat-tb__left,
    .cat-market-controls .cat-tb--zf .cat-tb__right {
        flex: 1 1 50%;
    }
    .cat-market-controls .cat-fbtn--zf,
    .cat-market-controls .cat-tb__right .cat-sort--zf select {
        min-height: 44px;
        height: 44px;
    }
    .cat-market-controls .cat-tb__right .cat-sort--zf select {
        min-width: 0;
    }
    .cat-quick-filters {
        margin-inline: -2px;
        padding-inline: 2px;
        gap: 7px;
    }
    .cat-quick-chip,
    .cat-quick-filters .cat-chip {
        min-height: 32px;
        padding-inline: 12px;
        font-size: 11.5px;
    }
}


/* =========================================================================
   Category children — fill the same storefront wall as the catalog below.
   Desktop: all children share the row evenly (2 => 50%, 3 => 33%, etc.).
   Mobile: labels only; 1/2/3 stay on one row, 4+ becomes a compact 2-col grid.
   ========================================================================= */
.cat-subcats-accordion {
    --catalog-wall-pad: clamp(12px, 2vw, 32px);
    width: calc(96vw - (2 * var(--catalog-wall-pad)));
    max-width: none;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    margin: 1.5rem 0 0;
}
.cat-subcats-summary { display: none; }

.pc-grid.pc-grid--cats.cat-subcats {
    width: 100%;
    max-width: none;
    position: static;
    transform: none;
    margin: 0;
    padding: 0;
    grid-template-columns: repeat(var(--subcat-count, 1), minmax(0, 1fr));
    gap: clamp(10px, 1vw, 16px);
    align-items: stretch;
}
.cat-subcats .pc-cat {
    width: 100%;
    min-width: 0;
    height: clamp(126px, 10vw, 168px);
    aspect-ratio: auto;
}
.cat-subcats .pc-cat__title {
    font-size: clamp(15px, 1.15vw, 20px);
    line-height: 1.16;
    -webkit-line-clamp: 3;
}
.cat-subcats .pc-cat__overlay {
    padding: 14px 14px 13px;
}
@media (min-width: 761px) {
    .cat-subcats .pc-cat__gradient {
        background: linear-gradient(180deg, rgba(18,14,11,.01) 20%, rgba(18,14,11,.04) 72%, rgba(18,14,11,.08) 100%);
    }
    .cat-subcats .pc-cat__cloud {
        max-width: 100%;
    }
    .cat-subcats .pc-cat__title {
        color: var(--ink, #17120f);
        text-shadow: none;
    }
    .cat-subcats .pc-cat__cta {
        color: var(--ink-soft, #5a4f47);
    }
}

@media (max-width: 760px) {
    .cat-subcats-accordion {
        width: 100%;
        left: auto;
        transform: none;
        margin-top: 14px;
        border: 0;
        border-radius: 16px;
        background: transparent;
        overflow: visible;
    }

    /* Closed selector: editorial section control, not a utility box. */
    .cat-subcats-summary {
        width: 100%;
        min-height: 50px;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 0 4px 0 2px;
        border: 0;
        border-top: 1px solid color-mix(in srgb, var(--rc-gold,#b1863b) 22%, var(--rule,#e7e0d3));
        border-bottom: 1px solid color-mix(in srgb, var(--rc-gold,#b1863b) 28%, var(--rule,#e7e0d3));
        border-radius: 0;
        background: transparent;
        color: var(--ink, #17120f);
        cursor: pointer;
        user-select: none;
        text-align: left;
        font-family: var(--serif, Georgia, serif);
        font-size: 17px;
        font-weight: 600;
        letter-spacing: -.01em;
    }
    .cat-subcats-summary__count {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 25px;
        height: 25px;
        padding: 0 7px;
        margin-left: auto;
        border: 1px solid color-mix(in srgb, var(--rc-gold,#b1863b) 34%, var(--rule,#e7e0d3));
        border-radius: 999px;
        background: color-mix(in srgb, var(--rc-gold,#b1863b) 8%, var(--paper,#fff));
        color: color-mix(in srgb, var(--ink,#17120f) 82%, var(--rc-gold,#b1863b));
        font-family: var(--sans, Arial, sans-serif);
        font-size: 11px;
        font-weight: 700;
        box-sizing: border-box;
    }
    .cat-subcats-summary__chevron {
        width: 27px;
        height: 27px;
        display: grid;
        place-items: center;
        flex: 0 0 27px;
        border-radius: 999px;
        background: color-mix(in srgb, var(--rc-gold,#b1863b) 10%, transparent);
        color: var(--ink, #17120f);
        font-family: var(--sans, Arial, sans-serif);
        font-size: 16px;
        line-height: 1;
        transition: transform .18s ease, background-color .18s ease;
    }
    .cat-subcats-accordion.is-open .cat-subcats-summary__chevron {
        transform: rotate(180deg);
        background: color-mix(in srgb, var(--rc-gold,#b1863b) 18%, transparent);
    }
    .cat-subcats-accordion:not(.is-open) > .cat-subcats {
        display: none;
    }

    .pc-grid.pc-grid--cats.cat-subcats {
        width: 100%;
        left: auto;
        transform: none;
        margin: 10px 0 0;
        padding: 0;
        border: 0;
        gap: 8px;
        box-sizing: border-box;
    }
    .pc-grid.pc-grid--cats.cat-subcats--1 { grid-template-columns: 1fr; }
    .pc-grid.pc-grid--cats.cat-subcats--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pc-grid.pc-grid--cats.cat-subcats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pc-grid.pc-grid--cats.cat-subcats--many { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    /* Mobile mini editorial cards: imagery is back, but compact enough that
       products remain the dominant visual content of the page. */
    .cat-subcats .pc-cat {
        position: relative;
        width: 100%;
        min-width: 0;
        height: 96px;
        min-height: 0;
        aspect-ratio: auto;
        border: 1px solid color-mix(in srgb, var(--rule,#e7e0d3) 82%, var(--rc-gold,#b1863b));
        border-radius: 13px;
        overflow: hidden;
        background: var(--pc-accent, #1F1B16);
        color: #fff;
        box-shadow: 0 8px 22px -18px rgba(23,18,15,.56);
    }
    .cat-subcats--1 .pc-cat { height: 112px; }
    .cat-subcats--2 .pc-cat { height: 104px; }
    .cat-subcats--3 .pc-cat { height: 88px; }
    .cat-subcats--many .pc-cat { height: 104px; }

    .cat-subcats .pc-cat:hover {
        transform: none;
        border-color: color-mix(in srgb, var(--rc-gold,#b1863b) 55%, var(--rule,#e7e0d3));
        box-shadow: 0 9px 24px -18px rgba(23,18,15,.64);
    }
    .cat-subcats .pc-cat__media {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        min-height: 0;
        display: block;
        overflow: hidden;
    }
    .cat-subcats .pc-cat__media > img {
        display: block !important;
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    .cat-subcats .pc-cat__ph {
        display: block !important;
        position: absolute;
        inset: 0;
    }
    .cat-subcats .pc-cat__gradient {
        display: block !important;
        position: absolute;
        inset: 0;
        background:
          linear-gradient(180deg,
            rgba(18,14,11,.04) 14%,
            rgba(18,14,11,.22) 56%,
            rgba(18,14,11,.78) 100%);
    }
    .cat-subcats .pc-cat__overlay {
        position: absolute;
        inset: auto 0 0;
        width: auto;
        padding: 22px 10px 9px;
        color: #fff !important;
        text-align: left;
        box-sizing: border-box;
        z-index: 2;
    }
    /* Mobile sub-category cards are frozen/validated: the cloud wrapper has
       no rendered box here, preserving the exact existing gradient treatment. */
    .cat-subcats .pc-cat__cloud {
        display: contents;
    }
    .cat-subcats .pc-cat__title,
    .cat-subcats .pc-cat--flat .pc-cat__title {
        margin: 0;
        color: #fff !important;
        font-family: var(--sans, Arial, sans-serif);
        font-size: 13px;
        font-weight: 700;
        line-height: 1.16;
        letter-spacing: 0;
        text-shadow: 0 1px 8px rgba(0,0,0,.45);
        -webkit-line-clamp: 2;
    }
    .cat-subcats--3 .pc-cat__title {
        font-size: 11.5px;
        line-height: 1.14;
    }
    .cat-subcats .pc-cat__cta {
        display: none;
    }
}


/* Catalog family controls — one responsive rail: filter · quick filters · sort. */
:is(.cat-adv--category, .cat-adv--catalog) .cat-market-controls {
    padding: 9px 11px;
}
:is(.cat-adv--category, .cat-adv--catalog) .cat-tb--zf {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    min-height: 36px;
}
:is(.cat-adv--category, .cat-adv--catalog) .cat-tb__left,
:is(.cat-adv--category, .cat-adv--catalog) .cat-tb__right {
    min-width: 0;
    flex: none;
}
:is(.cat-adv--category, .cat-adv--catalog) .cat-tb__left {
    display: flex;
    align-items: center;
    gap: 8px;
}
:is(.cat-adv--category, .cat-adv--catalog) .cat-fbtn--zf {
    min-height: 36px;
    height: 36px;
    padding: 0 11px;
    gap: 7px;
}
:is(.cat-adv--category, .cat-adv--catalog) .cat-control-icon,
:is(.cat-adv--category, .cat-adv--catalog) .cat-sort-icon svg {
    display: block;
    width: 17px;
    height: 17px;
}
:is(.cat-adv--category, .cat-adv--catalog) .cat-quick-filters {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    border-top: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
:is(.cat-adv--category, .cat-adv--catalog) .cat-quick-filters::-webkit-scrollbar {
    display: none;
}
:is(.cat-adv--category, .cat-adv--catalog) .cat-quick-chip {
    flex: 0 0 auto;
    width: auto;
    max-width: 190px;
    min-width: 0;
    min-height: 30px;
    padding: 0 11px;
    justify-content: center;
    font-size: 11.5px;
}
:is(.cat-adv--category, .cat-adv--catalog) .cat-sort--zf {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 36px;
    height: 36px;
    margin: 0;
    border: 1px solid color-mix(in srgb, var(--rule,#e7e0d3) 88%, #c5aa78);
    border-radius: 999px;
    background: rgba(255,255,255,.9);
    overflow: hidden;
}
:is(.cat-adv--category, .cat-adv--catalog) .cat-sort-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    z-index: 1;
    transform: translateY(-50%);
    color: var(--ink,#17120f);
    pointer-events: none;
}
:is(.cat-adv--category, .cat-adv--catalog) .cat-sort-label {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
:is(.cat-adv--category, .cat-adv--catalog) .cat-tb__right .cat-sort--zf select {
    min-width: 162px;
    height: 34px;
    padding: 0 28px 0 34px;
    border: 0;
    border-radius: 999px;
    background-color: transparent;
    font-size: 12px;
    font-weight: 650;
    box-shadow: none;
}
:is(.cat-adv--category, .cat-adv--catalog) .cat-tb__right .cat-sort--zf select:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--rc-gold,#b1863b) 45%, transparent);
}
:is(.cat-adv--category, .cat-adv--catalog) .cat-tb__count {
    white-space: nowrap;
}

@media (max-width: 760px) {
    :is(.cat-adv--category, .cat-adv--catalog) .cat-market-controls {
        padding: 7px 8px;
    }
    :is(.cat-adv--category, .cat-adv--catalog) .cat-tb--zf {
        grid-template-columns: 34px minmax(0, 1fr) 128px;
        gap: 6px;
        min-height: 34px;
        flex-wrap: nowrap;
    }
    :is(.cat-adv--category, .cat-adv--catalog) .cat-tb--zf .cat-tb__left,
    :is(.cat-adv--category, .cat-adv--catalog) .cat-tb--zf .cat-tb__right {
        flex: none;
        min-width: 0;
    }
    :is(.cat-adv--category, .cat-adv--catalog) .cat-fbtn--zf {
        width: 34px;
        min-width: 34px;
        height: 34px;
        min-height: 34px;
        padding: 0;
        justify-content: center;
    }
    :is(.cat-adv--category, .cat-adv--catalog) .cat-fbtn--zf .cat-control-label,
    :is(.cat-adv--category, .cat-adv--catalog) .cat-tb__count {
        display: none;
    }
    :is(.cat-adv--category, .cat-adv--catalog) .cat-quick-filters {
        gap: 5px;
    }
    :is(.cat-adv--category, .cat-adv--catalog) .cat-quick-chip {
        min-height: 28px;
        padding-inline: 9px;
        font-size: 10.5px;
        max-width: 150px;
    }
    :is(.cat-adv--category, .cat-adv--catalog) .cat-sort--zf {
        width: 128px;
        min-width: 128px;
        height: 34px;
        min-height: 34px;
    }
    :is(.cat-adv--category, .cat-adv--catalog) .cat-sort-icon {
        left: 8px;
    }
    :is(.cat-adv--category, .cat-adv--catalog) .cat-sort-icon svg {
        width: 16px;
        height: 16px;
    }
    :is(.cat-adv--category, .cat-adv--catalog) .cat-tb__right .cat-sort--zf select {
        width: 100%;
        min-width: 0;
        height: 32px;
        padding: 0 21px 0 28px;
        font-size: 10.5px;
    }
}


/* Catalog family — premium quick filters + grouped attribute panel. */
:is(.cat-adv--category, .cat-adv--catalog) .cat-quick-filters {
    justify-content: center;
    justify-content: safe center;
    align-items: stretch;
    padding-block: 2px;
}
:is(.cat-adv--category, .cat-adv--catalog) .cat-quick-chip {
    position: relative;
    isolation: isolate;
    min-height: 40px;
    max-width: 176px;
    padding: 6px 14px;
    overflow: hidden;
    white-space: normal;
    border-color: color-mix(in srgb, var(--rule,#e7e0d3) 86%, #c6af8b);
    background:
      linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,244,237,.92));
    box-shadow:
      0 5px 16px -13px rgba(23,18,15,.48),
      inset 0 1px 0 rgba(255,255,255,.95);
    transition:
      transform .18s cubic-bezier(.2,.75,.25,1),
      box-shadow .18s ease,
      border-color .18s ease,
      background-color .18s ease,
      color .18s ease;
}
:is(.cat-adv--category, .cat-adv--catalog) .cat-quick-chip::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0;
    background:
      radial-gradient(circle at 50% 0,
        color-mix(in srgb, var(--rc-gold,#b1863b) 18%, transparent),
        transparent 68%);
    transition: opacity .18s ease;
}
:is(.cat-adv--category, .cat-adv--catalog) .cat-quick-chip__label {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-align: center;
    line-height: 1.12;
    text-wrap: balance;
}
:is(.cat-adv--category, .cat-adv--catalog) .cat-quick-chip:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--rc-gold,#b1863b) 58%, var(--rule,#e7e0d3));
    box-shadow:
      0 10px 24px -16px rgba(23,18,15,.55),
      inset 0 1px 0 rgba(255,255,255,1);
}
:is(.cat-adv--category, .cat-adv--catalog) .cat-quick-chip:hover::before,
:is(.cat-adv--category, .cat-adv--catalog) .cat-quick-chip.is-active::before {
    opacity: 1;
}
:is(.cat-adv--category, .cat-adv--catalog) .cat-quick-chip.is-active {
    color: #241c14;
    border-color: color-mix(in srgb, var(--rc-gold,#b1863b) 78%, #7e5f2f);
    background:
      linear-gradient(180deg,
        color-mix(in srgb, var(--rc-gold,#b1863b) 18%, #fff),
        color-mix(in srgb, var(--rc-gold,#b1863b) 30%, #f7f1e7));
    box-shadow:
      0 8px 22px -16px color-mix(in srgb, var(--rc-gold,#b1863b) 74%, #1e1710),
      inset 0 1px 0 rgba(255,255,255,.72),
      inset 0 0 0 1px rgba(255,255,255,.25);
    transform: translateY(-1px);
}
:is(.cat-adv--category, .cat-adv--catalog) .cat-quick-chip.is-activating {
    animation: catQuickSelect .26s cubic-bezier(.2,.8,.3,1);
}
@keyframes catQuickSelect {
    0% { transform: scale(1); }
    48% { transform: scale(.96); }
    100% { transform: translateY(-1px) scale(1); }
}

:is(.cat-adv--category, .cat-adv--catalog) .cat-pop {
    width: min(820px, calc(100vw - 32px));
}
:is(.cat-adv--category, .cat-adv--catalog) .cat-pop__cols--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
    row-gap: 20px;
}
:is(.cat-adv--category, .cat-adv--catalog) .cat-pop__cols--compact > .cat-pop__col,
:is(.cat-adv--category, .cat-adv--catalog) .cat-pop__cols--compact > .cat-filter-type {
    min-width: 0;
    padding: 0 22px;
    border-left: 1px solid var(--rule,#e7e0d3);
}
:is(.cat-adv--category, .cat-adv--catalog) .cat-pop__cols--compact > :nth-child(odd) {
    padding-left: 0;
    border-left: 0;
}
:is(.cat-adv--category, .cat-adv--catalog) .cat-pop__cols--compact > :nth-child(even) {
    padding-right: 0;
}
.cat-filter-type__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.cat-filter-type__title::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: color-mix(in srgb, var(--rule,#e7e0d3) 78%, transparent);
}
.cat-filter-type__body {
    display: grid;
    gap: 12px;
}
.cat-filter-facet {
    min-width: 0;
}
.cat-filter-facet__title {
    margin: 0 0 7px;
    color: var(--ink-soft,#6b625b);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: .035em;
    text-transform: uppercase;
}
.cat-filter-values {
    display: grid;
    gap: 6px;
}
.cat-filter-values--color {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.cat-filter-values--size {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.cat-filter-option {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 7px;
    padding: 7px 9px;
    border: 1px solid color-mix(in srgb, var(--rule,#e7e0d3) 88%, transparent);
    border-radius: 11px;
    background: rgba(255,255,255,.68);
    color: var(--ink,#17120f);
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.cat-filter-option:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--rc-gold,#b1863b) 40%, var(--rule,#e7e0d3));
    background: rgba(255,255,255,.96);
}
.cat-filter-option > input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.cat-filter-option__visual {
    position: relative;
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    border: 1px solid color-mix(in srgb, var(--ink-soft,#6b625b) 48%, transparent);
    border-radius: 4px;
    background: #fff;
    box-shadow: inset 0 1px 1px rgba(23,18,15,.04);
}
.cat-filter-option > input:checked + .cat-filter-option__visual {
    border-color: color-mix(in srgb, var(--rc-gold,#b1863b) 82%, #6f5229);
    background: color-mix(in srgb, var(--rc-gold,#b1863b) 76%, #fff);
}
.cat-filter-option > input:checked + .cat-filter-option__visual::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 7px;
    border: solid #2a2117;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}
.cat-filter-option:has(input:checked) {
    border-color: color-mix(in srgb, var(--rc-gold,#b1863b) 60%, var(--rule,#e7e0d3));
    background: color-mix(in srgb, var(--rc-gold,#b1863b) 9%, #fff);
    box-shadow: 0 5px 14px -12px rgba(23,18,15,.55);
}
.cat-filter-option__label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    line-height: 1.2;
}
.cat-filter-option__count {
    margin-left: auto;
    color: var(--ink-soft,#7a7168);
    font-size: 10.5px;
    font-variant-numeric: tabular-nums;
}
.cat-filter-option--size {
    flex: 0 0 auto;
    min-width: 44px;
    justify-content: center;
    padding-inline: 10px;
    border-radius: 999px;
}
.cat-filter-option--size .cat-filter-option__visual {
    display: none;
}
.cat-filter-option--size .cat-filter-option__count {
    margin-left: 2px;
}
.cat-filter-option--size:has(input:checked) {
    color: #241c14;
    border-color: color-mix(in srgb, var(--rc-gold,#b1863b) 76%, #7e5f2f);
    background: color-mix(in srgb, var(--rc-gold,#b1863b) 20%, #fff);
}

@media (max-width: 760px) {
    :is(.cat-adv--category, .cat-adv--catalog) .cat-quick-filters {
        justify-content: flex-start;
    }
    :is(.cat-adv--category, .cat-adv--catalog) .cat-quick-chip {
        min-height: 34px;
        max-width: 138px;
        padding: 5px 10px;
    }
    :is(.cat-adv--category, .cat-adv--catalog) .cat-quick-chip__label {
        font-size: 10px;
        line-height: 1.08;
    }
    :is(.cat-adv--category, .cat-adv--catalog) .cat-pop {
        width: auto;
    }
    :is(.cat-adv--category, .cat-adv--catalog) .cat-pop__cols--compact {
        grid-template-columns: 1fr;
        row-gap: 0;
    }
    :is(.cat-adv--category, .cat-adv--catalog) .cat-pop__cols--compact > .cat-pop__col,
    :is(.cat-adv--category, .cat-adv--catalog) .cat-pop__cols--compact > .cat-filter-type,
    :is(.cat-adv--category, .cat-adv--catalog) .cat-pop__cols--compact > :nth-child(odd),
    :is(.cat-adv--category, .cat-adv--catalog) .cat-pop__cols--compact > :nth-child(even) {
        padding: 14px 0 0;
        border-left: 0;
        border-top: 1px solid var(--rule,#e7e0d3);
    }
    :is(.cat-adv--category, .cat-adv--catalog) .cat-pop__cols--compact > :first-child {
        padding-top: 0;
        border-top: 0;
    }
    .cat-filter-values--color {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    :is(.cat-adv--category, .cat-adv--catalog) .cat-quick-chip,
    .cat-filter-option {
        transition: none;
    }
    :is(.cat-adv--category, .cat-adv--catalog) .cat-quick-chip.is-activating {
        animation: none;
    }
}


/* Storefront listing bands — outer structural bars align exactly with Masonry. */
:is(.cat-adv--category, .cat-adv--catalog) .cat-market-controls {
    width: 96vw;
    border-radius: 0;
}
@media (max-width: 900px) {
    :is(.cat-adv--category, .cat-adv--catalog) .cat-market-controls {
        width: 98vw;
    }
}
@media (max-width: 760px) {
    :is(.cat-adv--category, .cat-adv--catalog) .cat-market-controls {
        border-radius: 0;
    }
}
