/* ============ Shop layout / filters ============ */
/* No sidebar (round 7): the catalog is one full-width column and the filters
   live in a single compact toolbar above the grid — dropdown buttons on
   desktop, a scrollable chip strip on mobile. The panel holding the filter
   groups is a floating dropdown under its button on desktop and the bottom
   sheet on mobile. Flat and light: small pill buttons, no heavy boxes. */
.catalog-main{min-width:0;margin-top:1rem}
.fbar{display:flex;align-items:center;gap:.45rem;flex-wrap:wrap}
.fbtn{position:relative;display:inline-flex;align-items:center;gap:.4rem;font-size:.83rem;font-weight:600;color:var(--ink-2);background:var(--surface);border:1px solid var(--line-strong);border-radius:999px;padding:.5rem .95rem;min-height:2.6rem;cursor:pointer;transition:border-color .15s,background .15s,color .15s;white-space:nowrap}
.fbtn>svg{width:.85rem;height:.85rem;color:var(--faint);transition:transform .2s var(--ease)}
.fbtn:hover{border-color:var(--line-strong)}
.fbtn.on{border-color:var(--brand);color:var(--brand-ink);background:var(--brand-soft)}
.fbtn.on>svg{color:var(--brand)}
.fbtn[aria-expanded="true"]>svg{transform:rotate(180deg)}
.cnt-n{display:inline-grid;place-items:center;min-width:1.15rem;height:1.15rem;padding:0 .28rem;border-radius:999px;background:var(--brand);color:#fff;font-size:.66rem;font-weight:800}
.cnt-n[hidden]{display:none}
.deal-chip{display:inline-flex;align-items:center;gap:.35rem;font-size:.83rem;font-weight:600;color:var(--ink-2);background:var(--surface);border:1px solid var(--line-strong);border-radius:999px;padding:.5rem .95rem;min-height:2.6rem;cursor:pointer;transition:.15s;white-space:nowrap}
.deal-chip svg{width:.9rem;height:.9rem}
.deal-chip:hover{border-color:var(--line-strong)}
.deal-chip.on{background:var(--brand);border-color:var(--brand);color:#fff}
.fpanel{position:absolute;top:calc(100% + .5rem);left:0;width:17rem;max-width:calc(100vw - 2rem);background:var(--surface);border:1px solid var(--line);border-radius:1rem;box-shadow:var(--sh);padding:.95rem 1.05rem;z-index:55;text-align:left}
.fpanel[hidden]{display:none}
@media(min-width:900px){
  .fpanel .fhead{display:none}
  .fpanel .f-group{display:none}
  .fpanel .f-group.show{display:block;border-top:0;margin-top:0;padding-top:.1rem;padding-bottom:.15rem}
}
.fhead{display:flex;justify-content:space-between;align-items:center;gap:.5rem;margin-bottom:.35rem}
.fhead>b{font-family:var(--fb);font-size:.95rem;font-weight:600;color:var(--ink)}
.fhead .fclear{font-size:.78rem;font-weight:600;color:var(--brand);padding:.45rem .5rem;border-radius:.4rem;min-height:2.4rem}
.fhead .fclear:hover{background:var(--brand-soft);text-decoration:none}
#filters-close{display:none}
/* Filter groups: plain title-case heading, hairline divider edge to edge */
.f-group{border-top:1px solid var(--line);margin:.55rem -1.05rem 0;padding:.85rem 1.05rem .95rem}
.f-gtitle{display:block;font-family:var(--fb);font-size:.875rem;font-weight:400;letter-spacing:0;text-transform:none;color:var(--ink);margin:0 0 .45rem}
.f-gbody{padding:0}
/* Compact checkbox rows: small square outline boxes, grey labels */
.check{display:flex;align-items:center;gap:.5rem;padding:.24rem 0;font-size:.8rem;font-weight:400;color:var(--ink-2);cursor:pointer;min-height:1.65rem}
.check:hover{color:var(--ink)}
.check input{appearance:none;-webkit-appearance:none;width:1rem;height:1rem;border:1.5px solid var(--line-strong);border-radius:3px;background:#fff;flex:none;margin:0;position:relative;cursor:pointer;transition:background .12s,border-color .12s}
.check input:checked{background:var(--brand);border-color:var(--brand)}
.check input:checked::after{content:"";position:absolute;inset:0;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/72% no-repeat}
.check input:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
.check .cnt{margin-left:auto;font-size:.72rem;color:var(--faint);font-weight:500}
/* Long option lists collapse behind a VIEW MORE / VIEW LESS toggle */
.f-extra{display:none}
.f-group.expanded .f-extra{display:flex}
.f-more{display:inline-flex;align-items:center;font-size:.7rem;font-weight:800;letter-spacing:.06em;color:var(--brand);padding:.35rem 0 0;min-height:2rem}
.f-more:hover{text-decoration:underline}
/* Price: two small Min / Max inputs, dash between, square brand apply button */
.range-row{display:flex;gap:.25rem;align-items:center}
.range-row .rdash{color:var(--faint);flex:none}
.range-row .input{min-height:2.3rem;padding:.4rem .25rem;font-size:.8rem;border-radius:4px;min-width:0;-moz-appearance:textfield;appearance:textfield}
.range-row .input::-webkit-outer-spin-button,.range-row .input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.price-go{width:2.3rem;height:2.3rem;flex:none;background:var(--brand);color:#fff;border-radius:4px;display:grid;place-items:center;transition:background .15s}
.price-go:hover{background:var(--brand-deep)}
.price-go svg{width:1rem;height:1rem}
/* Rating: single-select star rows (5 / 4 / 3 / 2 stars "And Up") */
.rate-row{position:relative;display:flex;align-items:center;gap:.45rem;padding:.26rem .3rem;min-height:1.9rem;border-radius:.4rem;cursor:pointer}
.rate-row input{position:absolute;opacity:0;width:1px;height:1px;margin:0}
.rate-row:focus-within{outline:2px solid var(--brand);outline-offset:1px}
.rate-row .stars svg{width:.95rem;height:.95rem}
.rate-row .andup{font-size:.78rem;color:var(--ink-2)}
.rate-row.sel{background:var(--brand-soft)}
.rate-row.sel .andup{color:var(--brand-ink);font-weight:700}
/* Action footer — mobile sheet only; on desktop every control applies live */
.f-actions{position:sticky;bottom:-.95rem;display:flex;gap:.55rem;background:var(--surface);border-top:1px solid var(--line);padding:.75rem 0 .35rem;margin-top:.7rem}
.f-actions .btn{flex:1}
@media(min-width:900px){.f-actions{display:none}}
.ovl{position:fixed;inset:0;background:rgba(var(--ink-rgb),.5);opacity:0;pointer-events:none;transition:.25s;z-index:90}
.ovl.show{opacity:1;pointer-events:auto}
/* Mobile: the filter panel becomes a flat bottom sheet with a grab handle,
   and the toolbar's dropdown buttons give way to a scrollable chip strip */
@media(max-width:899px){
  .fbar{display:none}
  .fpanel{position:fixed;left:0;right:0;bottom:0;top:auto;width:auto;max-width:none;height:auto;max-height:88dvh;z-index:95;border:0;border-radius:20px 20px 0 0;transform:translateY(106%);transition:transform .34s var(--ease);overflow-y:auto;overscroll-behavior:contain;box-shadow:var(--sh-lg);padding-top:.55rem}
  .fpanel.open{transform:none}
  .fpanel::before{content:"";display:block;width:2.6rem;height:.3rem;border-radius:999px;background:var(--line-strong);margin:0 auto .55rem}
  #filters-close{display:inline-grid}
  .f-actions{margin-inline:-1.05rem;padding:.75rem 1.05rem calc(.75rem + env(safe-area-inset-bottom))}
}
.toolbar{position:relative;display:flex;gap:.6rem;align-items:center;margin-bottom:.9rem;flex-wrap:wrap}
.toolbar .spacer{flex:1}
.results{font-size:.85rem;color:var(--muted);white-space:nowrap}
.results b{color:var(--ink)}
/* Mobile filter chips: one thumb-scroll row under the toolbar. On desktop
   the wrapper is display:contents so the Sort control inside it still
   takes part in the toolbar row while the chips themselves hide. */
.fchips{display:contents}
.fchip{display:none}
@media(max-width:899px){
  .fchips{display:flex;gap:.45rem;flex:1 1 100%;order:3;overflow-x:auto;scrollbar-width:none;margin-inline:-.9rem;padding:.15rem .9rem .3rem}
  .fchips::-webkit-scrollbar{display:none}
  .fchip{flex:none;display:inline-flex;align-items:center;gap:.35rem;font-size:.8rem;font-weight:600;color:var(--ink-2);background:var(--surface);border:1px solid var(--line-strong);border-radius:999px;padding:.45rem .85rem;min-height:2.6rem;cursor:pointer;white-space:nowrap}
  .fchip>svg{width:.8rem;height:.8rem;color:var(--faint)}
  .fchip.on{border-color:var(--brand);color:var(--brand-ink);background:var(--brand-soft)}
  .fchip.on>svg{color:var(--brand)}
  .fchips .sortwrap{margin-left:0;flex:none}
  .fchips .sortwrap select{min-height:2.6rem;padding:.45rem .8rem}
}
/* Active filter pills above the grid */
.fpills{display:flex;gap:.45rem;flex-wrap:wrap;align-items:center;margin:-.25rem 0 .9rem}
.fpills:empty{display:none}
.fpill{display:inline-flex;align-items:center;gap:.35rem;background:var(--brand-soft);color:var(--brand-ink);font-size:.78rem;font-weight:700;padding:.34rem .45rem .34rem .8rem;border-radius:999px;border:1px solid var(--accent-line)}
.fpill button{width:1.4rem;height:1.4rem;border-radius:50%;display:grid;place-items:center;background:var(--surface);color:var(--brand);flex:none}
.fpill button:hover{background:var(--brand);color:#fff}
.fpill button svg{width:.8rem;height:.8rem}
.fpill-clear{font-size:.8rem;font-weight:700;color:var(--brand);padding:.45rem .55rem;border-radius:.6rem;min-height:2.4rem}
.fpill-clear:hover{background:var(--brand-soft);text-decoration:underline}
.sortwrap{display:flex;align-items:center;gap:.5rem;font-size:.84rem;color:var(--muted);margin-left:auto}
.sortwrap select{border:1px solid var(--line-strong);border-radius:999px;padding:.55rem .9rem;background:var(--surface);font-size:.83rem;font-weight:600;outline:0;min-height:2.75rem;max-width:11.5rem;cursor:pointer}
.sortwrap select:focus{border-color:var(--brand)}
.empty-state,.empty{background:var(--surface);border:1px dashed var(--line-strong);border-radius:var(--r-lg);padding:2.6rem 1.2rem;text-align:center}
.empty-state h3{font-size:1.08rem;margin-bottom:.4rem}
.empty-state p{color:var(--muted);margin:0 0 1rem}
