/* Catalog filters as a bottom sheet on phones: the panel no longer pushes the page down, it slides up over a dimmed backdrop
   with a sticky "Show N" button. The desktop sidebar is untouched. */
.sheet-head,.sheet-foot,.filter-backdrop{display:none}
@media(max-width:700px){
 .filter-backdrop{display:block;position:fixed;inset:0;z-index:118;background:#000000a6;opacity:0;pointer-events:none;transition:opacity .22s ease}
 body.filters-open .filter-backdrop{opacity:1;pointer-events:auto}
 body.filters-open{overflow:hidden}
 html body .advanced-panel.expanded{display:grid;grid-template-columns:1fr 1fr;gap:12px 14px;position:fixed;top:auto;left:0;right:0;bottom:0;z-index:120;width:100%;max-height:86vh;max-height:86dvh;overflow-y:auto;overscroll-behavior:contain;margin:0;padding:0 18px calc(96px + env(safe-area-inset-bottom));border-radius:20px 20px 0 0;border-bottom:0;box-shadow:0 -18px 60px #0008;animation:filter-sheet-up .26s cubic-bezier(.2,.8,.2,1)}
 html body .advanced-panel.expanded>h3,html body .advanced-panel.expanded>p{display:none}
 html body .advanced-panel.expanded .sheet-head{display:flex;grid-column:1/-1;position:sticky;top:0;z-index:2;align-items:center;justify-content:space-between;padding:16px 0 12px;background:var(--panel);border-bottom:1px solid var(--line)}
 .sheet-head:before{content:'';position:absolute;top:6px;left:50%;width:38px;height:4px;margin-left:-19px;border-radius:4px;background:var(--line)}
 .sheet-head strong{font-size:16px}
 .sheet-close{width:40px;height:40px;border:1px solid var(--line);border-radius:10px;background:transparent;color:var(--text);cursor:pointer;display:grid;place-items:center}
 html body .advanced-panel.expanded #resetAdvanced{grid-column:1/-1;justify-self:start}
 html body .advanced-panel.expanded .sheet-foot{display:block;position:fixed;left:0;right:0;bottom:0;z-index:3;padding:12px 18px calc(12px + env(safe-area-inset-bottom));background:var(--panel);border-top:1px solid var(--line)}
 .sheet-foot .button{width:100%;min-height:46px;justify-content:center;font-size:15px}
 #mobileFilters[data-active]:not([data-active="0"]):after{content:attr(data-active);display:inline-grid;place-items:center;min-width:18px;height:18px;margin-left:6px;padding:0 5px;border-radius:9px;background:var(--accent);color:#16181d;font-size:11px;font-weight:700}
}
@keyframes filter-sheet-up{from{transform:translateY(40px);opacity:.4}to{transform:none;opacity:1}}
@media(prefers-reduced-motion:reduce){html body .advanced-panel.expanded{animation:none}.filter-backdrop{transition:none}}
