/* Purpose: Product category / shop archive page. Banner, toolbar, faceted filter sidebar, product grid, pagination, recently viewed. Mobile-first. Reuses .pcard + .trust from components.css. */

/* ===== Banner ===== (Figma node 1:2342 — exact type) */
.category-hero {
  position: relative; overflow: hidden;
  background-color: var(--color-primary);
  background-image: var(--cat-banner, none);
  background-size: cover; background-position: center var(--cat-banner-pos, center); background-repeat: no-repeat;
  color: var(--color-on-navy);
  min-height: 360px; display: flex; align-items: center;
}
@media (min-width: 1024px) { .category-hero { min-height: 480px; } }
/* Figma 50:2753 gradient: #0b1e38 → rgba(11,30,56,0.4) @62% */
.category-hero__overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, #0b1e38 0%, rgba(11,30,56,0.4) 62%);
}
.category-hero--plain .category-hero__overlay {
  background: linear-gradient(90deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
}
.category-hero__inner {
  position: relative; z-index: 2; padding-block: var(--space-12);
  display: flex; flex-direction: column; align-items: flex-start; gap: 16px;
}

/* Breadcrumb — Jost 12px; Home rgba(.45), › 11px rgba(.25), current #e2c97e medium; tracking 1.1px */
.category-hero__crumbs {
  font-family: var(--font-body); font-weight: var(--weight-light); font-size: 12px; line-height: 20px;
  text-transform: uppercase; letter-spacing: 1.1px; color: var(--color-gold-light);
}
.category-hero__crumbs a { color: rgba(255,255,255,0.45); }
.category-hero__crumbs a:hover { color: var(--color-gold-light); }
.category-hero__crumb-sep { margin-inline: 8px; font-size: 11px; color: rgba(255,255,255,0.25); }

/* Eyebrow — gold dash 44px + Cinzel 14px #c9a84c, uppercase */
.category-hero__eyebrow {
  display: flex; align-items: center; gap: 8px; padding-left: 8px;
  font-family: var(--font-eyebrow); font-weight: var(--weight-regular); font-size: 14px; line-height: 22px;
  text-transform: uppercase; color: var(--color-gold); margin: 0;
}
.category-hero__eyebrow-dash { width: 44px; height: 1px; background: var(--color-gold); flex-shrink: 0; }

/* Title — Cormorant Garamond Regular 84px, white, upright */
.category-hero__title {
  font-family: var(--font-display); font-weight: var(--weight-regular); color: var(--color-on-navy);
  font-size: clamp(2.75rem, 5.85vw, 84px); line-height: 1.095; letter-spacing: 0; margin: 0;
}
/* Shop landing hero (Figma 50:3523): title constrained so it wraps to two lines like the design. */
@media (min-width: 1024px) { .category-hero--shop .category-hero__title { max-width: 747px; } }

/* Intro — Jost Regular 18px white, line-height 26px, capitalize */
.category-hero__text {
  max-width: 448px;
  font-family: var(--font-body); font-weight: var(--weight-regular); text-transform: capitalize;
  font-size: 18px; line-height: 26px; color: var(--color-on-navy);
}
.category-hero__text p { margin: 0; }
/* Toilets intro (Figma 276:35) — 16px/24 so the longer line breaks after the em-dash. */
.category-hero__text--compact { font-size: 16px; line-height: 24px; }
/* Bathtubs intro (Figma 466:5589) — two lines with a hard break after the em-dash; wider box. */
.category-hero__text--wide { max-width: 900px; }

/* ===== Shop wrapper / toolbar ===== (Figma 50:3424) */
.shop { padding-block: var(--space-8) var(--space-16); }
.shop__toolbar {
  display: flex; flex-direction: column; gap: var(--space-4);
  padding-bottom: 24px; border-bottom: 1px solid #dedfe2;
}
@media (min-width: 768px) {
  .shop__toolbar { flex-direction: row; align-items: flex-start; justify-content: space-between; }
}
.shop__toolbar-left { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 32px; }
.shop__toolbar-right { display: flex; align-items: center; gap: 16px; }
.shop .woocommerce-result-count {
  margin: 0; font-family: var(--font-body); font-weight: var(--weight-light);
  font-size: 14px; line-height: 22px; color: #7a7870;
}

/* Active filter chips — cream pill, #f5edd4 / #e8d8ab */
.shop__chips { display: flex; flex-wrap: wrap; gap: 14px; list-style: none; margin: 0; padding: 0; }
.shop__chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: #f5edd4; border: 1px solid #e8d8ab;
  font-family: var(--font-body); font-weight: var(--weight-light); font-size: 12px; line-height: 20px;
  text-transform: capitalize; color: var(--color-primary); padding: 4px 8px; border-radius: 0;
}
.shop__chip-x { color: #7a7870; font-size: 13px; line-height: 1; text-decoration: none; }
.shop__chip-x:hover { color: var(--color-red); }

/* Native WooCommerce ordering select — white box, #e7e8eb */
.shop .woocommerce-ordering { margin: 0; }
.shop .woocommerce-ordering select {
  font-family: var(--font-body); font-weight: var(--weight-light); font-size: 12px; color: var(--color-primary);
  height: 32px; padding: 0 32px 0 8px; border: 1px solid #e7e8eb; background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none' stroke='%230b1e38' stroke-width='1.4'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
  -webkit-appearance: none; appearance: none; cursor: pointer; border-radius: 0;
}

/* Grid / list view toggle — 32px squares, gap 2 */
.shop__view { display: none; gap: 2px; }
@media (min-width: 768px) { .shop__view { display: inline-flex; } }
.shop__view-btn {
  width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: var(--color-primary); cursor: pointer; border: 1px solid rgba(11,30,56,0.1);
}
.shop__view-btn svg { width: 14px; height: 14px; }
.shop__view-btn.is-active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* ===== Mobile sticky Filter/Sort bar ===== (desktop uses the always-visible sidebar) */
.shop__filter-count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px;
  background: var(--color-gold); color: var(--color-primary); font-size: var(--text-xs); border-radius: var(--radius-full);
}
.shop__bar { display: none; }
@media (max-width: 1023px) {
  /* Fixed full-width bar; slides up (.is-visible) only while the product list is in view. */
  .shop__bar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-sticky);
    background: #fff; border-top: 1px solid var(--color-border); box-shadow: var(--shadow-lg);
    transform: translateY(100%); transition: transform var(--duration-base) var(--ease-out);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .shop__bar.is-visible { transform: translateY(0); }
  .shop__bar-btn, .shop__bar-sort {
    flex: 1 1 0; min-width: 0; height: 54px;
    display: flex; align-items: center; justify-content: center; gap: var(--space-2);
    font-family: var(--font-body); font-weight: var(--weight-medium); font-size: var(--text-sm);
    text-transform: uppercase; letter-spacing: 0; color: var(--color-primary);
  }
  .shop__bar-btn { background: #fff; border: none; cursor: pointer; }
  .shop__bar-btn .icon { width: 18px; height: 18px; }
  .shop__bar-sort { border-left: 1px solid var(--color-border); padding-inline: var(--space-3); position: relative; }
  /* Sort icon before the relocated ordering select */
  .shop__bar-sort::before {
    content: ""; width: 16px; height: 16px; flex-shrink: 0;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3 6h12M3 12h9M3 18h6M17 8V19M17 19l3-3M17 19l-3-3'/%3E%3C/svg%3E") center/contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3 6h12M3 12h9M3 18h6M17 8V19M17 19l3-3M17 19l-3-3'/%3E%3C/svg%3E") center/contain no-repeat;
  }
  /* The relocated WooCommerce ordering select fills the Sort half, borderless. */
  .shop__bar-sort .woocommerce-ordering { margin: 0; flex: 1 1 auto; min-width: 0; }
  .shop__bar-sort .woocommerce-ordering select {
    width: 100%; height: 54px; border: none; background-color: transparent; padding: 0 20px 0 0;
    font-family: var(--font-body); font-weight: var(--weight-medium); font-size: var(--text-sm);
    text-transform: uppercase; letter-spacing: 0; color: var(--color-primary);
    background-position: right 0 center; cursor: pointer;
  }
  /* Keep last row / pagination clear of the fixed bar. */
  .shop { padding-bottom: calc(var(--space-12) + 54px); }
}

/* ===== Layout: sidebar (262px) + grid ===== */
.shop__layout { margin-top: var(--space-6); display: grid; grid-template-columns: 1fr; gap: var(--space-8); }
@media (min-width: 1024px) { .shop__layout { grid-template-columns: 262px 1fr; gap: 64px; } }

/* ===== Filters sidebar ===== (Figma 50:2901) */
.filters__form { display: flex; flex-direction: column; }
.filters__head {
  display: flex; align-items: center; gap: var(--space-3);
  border-bottom: 1px solid #e2e4e3; padding-bottom: 16px;
}
/* .filters__head prefix raises specificity above the global h2[class] mobile rule (28px),
   which would otherwise enlarge this drawer heading on mobile. */
.filters__head .filters__title {
  font-family: var(--font-body); font-weight: var(--weight-semibold); font-size: 14px; line-height: 22px;
  text-transform: uppercase; color: var(--color-primary); margin: 0;
}
.filters__clear {
  margin-left: auto; font-family: var(--font-body); font-weight: var(--weight-light); font-size: 12px; line-height: 20px;
  text-transform: uppercase; letter-spacing: 1.2px; color: #7a7870;
}
.filters__clear:hover { color: var(--color-red); }
.filters__close { display: none; margin-left: auto; background: none; border: none; font-size: 26px; line-height: 1; color: var(--color-text); cursor: pointer; }

/* Keyword search box — top of the sidebar, filters the category's products live. */
.filters__search {
  position: relative; display: flex; align-items: center; gap: 8px;
  margin-top: 20px; padding: 0 12px;
  border: 1px solid #d7d9d6; border-radius: var(--radius-full); background: #fff;
  transition: border-color var(--duration-base) var(--ease-out);
}
.filters__search:focus-within { border-color: var(--color-primary); }
.filters__search-icon { display: inline-flex; flex-shrink: 0; color: #7a7870; }
.filters__search-icon .icon { width: 16px; height: 16px; }
.filters__search-input {
  flex: 1 1 auto; min-width: 0; border: none; background: none; outline: none;
  font-family: var(--font-body); font-size: 14px; line-height: 1; color: var(--color-text);
  padding: 11px 0;
}
.filters__search-input::placeholder { color: #9b998f; }
.filters__search-input::-webkit-search-cancel-button,
.filters__search-input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.filters__search-input::-ms-clear { display: none; }
.filters__search-clear {
  display: none; flex-shrink: 0; background: none; border: none; cursor: pointer;
  font-size: 20px; line-height: 1; color: #9b998f; padding: 0 2px;
}
.filters__search-clear.is-visible { display: inline-flex; }
.filters__search-clear:hover { color: var(--color-red); }

.filters__group { border-bottom: 1px solid #e2e4e3; padding-block: 28px; }
.filters__group-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  background: none; border: none; cursor: pointer; padding: 0;
  font-family: var(--font-body); font-weight: var(--weight-semibold); font-size: 14px; line-height: 22px;
  text-transform: uppercase; color: #2c2c2a;
}
.filters__chevron {
  width: 9px; height: 9px; border-right: 1.5px solid #2c2c2a; border-bottom: 1.5px solid #2c2c2a;
  transform: rotate(45deg); transition: transform var(--duration-base) var(--ease-out); margin-top: -3px;
}
.filters__group-head[aria-expanded="false"] .filters__chevron { transform: rotate(-135deg); margin-top: 3px; }
/* Every open group: gap below its label + options indented in from the label. */
.filters__group-body { margin-top: 16px; padding-top: 8px; padding-left: 12px; }
.filters__group-head[aria-expanded="false"] + .filters__group-body { display: none; }

/* Price — white inputs, navy slider */
.filters__price-inputs { display: flex; align-items: center; gap: 8px; }
.filters__price-field { flex: 1; min-width: 0; }
.filters__price-field input {
  width: 100%; height: 34px; padding: 0 10px; border: 1px solid rgba(11,30,56,0.1); background: #fff;
  font-family: var(--font-body); font-size: 12px; color: var(--color-text); border-radius: 0;
}
.filters__price-field input::placeholder { color: #757575; }
.filters__price-dash { display: none; }
.filters__slider { position: relative; height: 14px; margin: 18px 0 10px; }
.filters__slider-track { position: absolute; top: 50%; left: 0; right: 0; transform: translateY(-50%); height: 2px; background: rgba(11,30,56,0.1); border-radius: var(--radius-full); }
.filters__slider-range { position: absolute; top: 50%; transform: translateY(-50%); height: 2px; background: var(--color-primary); border-radius: var(--radius-full); }
/* Two overlaid native range inputs: track transparent, only the thumbs are interactive. */
.filters__slider-input {
  position: absolute; top: 0; left: 0; width: 100%; height: 14px; margin: 0;
  background: none; -webkit-appearance: none; appearance: none; pointer-events: none;
}
.filters__slider-input::-webkit-slider-runnable-track { background: transparent; border: none; }
.filters__slider-input::-moz-range-track { background: transparent; border: none; }
.filters__slider-input::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; pointer-events: auto; cursor: pointer;
  width: 14px; height: 14px; border-radius: 50%; background: var(--color-primary); border: 2px solid #fff; box-shadow: var(--shadow-sm); margin-top: 0;
}
.filters__slider-input::-moz-range-thumb {
  pointer-events: auto; cursor: pointer;
  width: 14px; height: 14px; border-radius: 50%; background: var(--color-primary); border: 2px solid #fff; box-shadow: var(--shadow-sm);
}
.filters__slider-input:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--color-gold); outline-offset: 1px; }
.filters__price-bounds { display: flex; justify-content: space-between; margin: 0; font-family: var(--font-body); font-weight: var(--weight-light); font-size: 12px; line-height: 20px; color: #7a7870; }
.filters__price-bounds .woocommerce-Price-amount { font-family: var(--font-body); }

/* Checkbox options — 14px box, #767676, label Jost Light 14, count #7a7870 */
/* ul reset zeroes the group-body spacing — restore it so the label→first-item gap matches other groups. */
.filters__options { list-style: none; display: flex; flex-direction: column; gap: 16px; margin-top: 16px; padding-top: 8px; padding-left: 12px; }
.filters__check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-family: var(--font-body); font-weight: var(--weight-light); font-size: 14px; line-height: 22px; color: #2c2c2a; }
.filters__check input { position: absolute; opacity: 0; width: 0; height: 0; }
.filters__check-box {
  width: 14px; height: 14px; flex-shrink: 0; border: 1px solid #767676; background: #fff; border-radius: 2.5px;
  display: inline-flex; align-items: center; justify-content: center; transition: all var(--duration-fast) var(--ease-out);
}
.filters__check-box::after {
  content: ""; width: 8px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(0); transition: transform var(--duration-fast) var(--ease-out); margin-top: -2px;
}
.filters__check input:checked + .filters__check-box { background: var(--color-primary); border-color: var(--color-primary); }
.filters__check input:checked + .filters__check-box::after { transform: rotate(-45deg) scale(1); }
.filters__check input:focus-visible + .filters__check-box { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.filters__check-label { text-transform: capitalize; }
.filters__count { margin-left: auto; font-weight: var(--weight-light); font-size: 14px; color: #7a7870; }
.filters__more { list-style: none; }
.filters__more-btn {
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: var(--font-body); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0;
  color: var(--color-red);
}
.filters__more-btn:hover { text-decoration: underline; }

/* Finish swatches — 24px circles, gap 7, active = gold ring */
.filters__swatches { display: flex; flex-wrap: wrap; gap: 7px; }
.filters__swatch { display: inline-flex; cursor: pointer; }
.filters__swatch input { position: absolute; opacity: 0; width: 0; height: 0; }
.filters__swatch-dot {
  width: 24px; height: 24px; border-radius: 12px; background: var(--swatch, #ccc);
  border: 1px solid #ddd; box-sizing: border-box; transition: box-shadow var(--duration-fast) var(--ease-out);
}
.filters__swatch.is-active .filters__swatch-dot { border: 2px solid var(--color-gold); }
.filters__swatch input:focus-visible + .filters__swatch-dot { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* Categories nav — links navigate; chevron expands children */
.filters__cats, .filters__subcats { list-style: none; margin: 0; padding: 0; }
/* Re-apply group-body spacing here: the ul reset above zeroes padding/margin, so restore it. */
.filters__cats { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; padding-top: 8px; padding-left: 12px; }
.filters__cat-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.filters__cat-link {
  font-family: var(--font-body); font-weight: var(--weight-light); font-size: 14px; line-height: 22px;
  color: #2c2c2a; text-decoration: none; flex: 1;
}
.filters__cat-link:hover { color: var(--color-gold); }
.filters__cat-link.is-current { font-weight: var(--weight-semibold); color: var(--color-primary); }
.filters__cat-count { color: #7a7870; }
.filters__cat-toggle {
  display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px;
  background: none; border: none; cursor: pointer; flex-shrink: 0;
}
.filters__cat-toggle .filters__chevron { margin-top: -3px; border-color: #7a7870; }
.filters__cat-toggle[aria-expanded="true"] .filters__chevron { transform: rotate(45deg); margin-top: -3px; }
.filters__cat-toggle[aria-expanded="false"] .filters__chevron { transform: rotate(-135deg); margin-top: 3px; }
/* Children indented further with a connector line so parent vs child is obvious. */
.filters__subcats { margin-top: 12px; margin-left: 6px; padding-left: 20px; display: flex; flex-direction: column; gap: 12px; border-left: 2px solid #e2e4e3; }
.filters__subcats[hidden] { display: none; }
.filters__subcats .filters__cat-link { font-size: 13px; color: #6b6b67; }

/* AJAX loading state */
.shop.is-loading .shop__main { opacity: 0.45; pointer-events: none; transition: opacity var(--duration-fast) var(--ease-out); }

/* Apply — navy bar, h46, semibold uppercase */
.filters__apply {
  margin-top: 28px; width: 100%; height: 46px; display: flex; align-items: center; justify-content: center;
  background: var(--color-primary); color: #fff; border: none; cursor: pointer; border-radius: 0;
  font-family: var(--font-body); font-weight: var(--weight-semibold); font-size: 14px; line-height: 22px;
  text-transform: uppercase;
}
.filters__apply:hover { background: var(--color-primary-dark); }

/* ===== Product grid ===== */
.shop__results { margin-top: var(--space-6); }   /* search results grid (no filter sidebar) */
.pgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
@media (min-width: 600px)  { .pgrid { gap: var(--space-5); } }
/* 1024–1199: sidebar is present but the viewport is narrow → 2 columns so cards aren't cramped. */
@media (min-width: 1024px) { .pgrid { grid-template-columns: repeat(2, 1fr); gap: var(--space-6); } }
@media (min-width: 1200px) { .pgrid { grid-template-columns: repeat(3, 1fr); } }

/* Compact 2-col cards on phones — tighter padding/type + small auto-width CTA below the price
   (a full-width button made the cards tall and button-heavy). Scoped to .pgrid so home carousels are untouched. */
@media (max-width: 599px) {
  .pgrid .pcard__body { padding: var(--space-3); gap: var(--space-2); }
  .pgrid .pcard__cat { font-size: var(--text-xs); }
  .pgrid .pcard__title { font-size: 0.9375rem; line-height: 1.4; min-height: 2.8em; }
  .pgrid .pcard__price-now { font-size: var(--text-base); }
  .pgrid .pcard__row { flex-direction: column; align-items: flex-start; gap: var(--space-3); }
  .pgrid .pcard__cta { padding: 8px 16px; font-size: var(--text-xs); letter-spacing: 0; white-space: nowrap; }
}

/* List view (toggle) */
.pgrid.is-list { grid-template-columns: 1fr; }
.pgrid.is-list .pcard { flex-direction: row; }
.pgrid.is-list .pcard__media { width: 38%; flex-shrink: 0; aspect-ratio: 4 / 3; }
.pgrid.is-list .pcard__body { flex: 1; justify-content: center; }
@media (max-width: 599px) { .pgrid.is-list .pcard { flex-direction: column; } .pgrid.is-list .pcard__media { width: 100%; aspect-ratio: 1; } }

.shop__empty { text-align: center; padding: var(--space-16) 0; color: var(--color-text-muted); display: flex; flex-direction: column; align-items: center; gap: var(--space-5); }

/* ===== Pagination (WooCommerce) ===== */
.shop .woocommerce-pagination { margin-top: var(--space-10); }
.shop .woocommerce-pagination ul { display: flex; justify-content: center; gap: var(--space-2); list-style: none; margin: 0; padding: 0; border: none; }
.shop .woocommerce-pagination ul li { margin: 0; border: none; }
.shop .woocommerce-pagination a.page-numbers,
.shop .woocommerce-pagination span.page-numbers {
  display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 6px;
  border: 1px solid var(--color-border); background: #fff; color: var(--color-primary);
  font-family: var(--font-body); font-size: var(--text-sm); line-height: 1; border-radius: 0;
}
.shop .woocommerce-pagination span.page-numbers.current { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.shop .woocommerce-pagination a.page-numbers:hover { border-color: var(--color-primary); }

/* ===== Recently viewed ===== */
/* Section padding follows the global .section scale (40 → 48 → 64 → 80) so the page rhythm matches home. */
.recently { background: var(--color-bg-alt); padding-block: var(--space-10); }
@media (min-width: 600px)  { .recently { padding-block: var(--space-12); } }
@media (min-width: 1024px) { .recently { padding-block: var(--space-16); } }
@media (min-width: 1440px) { .recently { padding-block: var(--space-20); } }
.recently__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-8); }
.recently__title { font-family: var(--font-display); font-weight: var(--weight-light); font-size: clamp(2rem, 4vw, 54px); line-height: 1.18; margin: 0; color: var(--color-primary); }
.recently__title-accent { color: var(--color-gold); }
.recently__grid .pcard__body { background: #fff; }
/* Recently Viewed is a drag/swipe carousel (.pcarousel__track) matching the home best-seller row. */

/* ===== Mobile filter drawer ===== */
@media (max-width: 1023px) {
  /* Drawer slides in from the right; its closed (off-screen) box would extend the
     scroll width and cause horizontal overflow — clip it at the root. Use `clip`
     (not `hidden`) so the root doesn't become a scroll container, which would break
     position:sticky on the filter toggle below. */
  html, body { overflow-x: clip; }
  .filters {
    position: fixed; inset: 0 0 0 auto; z-index: var(--z-modal); width: min(360px, 88vw);
    background: #fff; box-shadow: var(--shadow-lg); padding: var(--space-6);
    transform: translateX(100%);
    transition: transform var(--duration-base) var(--ease-out), visibility var(--duration-base);
    overflow-y: auto; visibility: hidden;
  }
  .filters.is-open { transform: translateX(0); visibility: visible; }
  .filters__close { display: block; }
  body.filters-open { overflow: hidden; }
  .filters-backdrop {
    position: fixed; inset: 0; z-index: calc(var(--z-modal) - 1); background: rgba(8,20,45,0.45);
    opacity: 0; visibility: hidden; transition: opacity var(--duration-base) var(--ease-out);
  }
  .filters-backdrop.is-open { opacity: 1; visibility: visible; }
}
