.filter-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.25); opacity:0; pointer-events:none; transition: opacity .25s ease; z-index: 2000; }
.filter-backdrop.open { opacity: 1; pointer-events: auto; }
.filter-sheet { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top-left-radius: 20px; border-top-right-radius: 20px; box-shadow: 0 -12px 24px rgba(0,0,0,.15); transform: translateY(110%); transition: transform .45s cubic-bezier(.2, .9, .35, 1.2); width: 100%; z-index: 2001; }
.sheet-handle { width: 40px; height: 4px; background: #ddd; border-radius: 2px; margin: 8px auto; }
.filter-sheet .sheet-body { padding: 16px; }
.filter-sheet h3 { font-size: 18px; margin-bottom: 12px; }
.field { margin-bottom: 16px; }
.label { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.chips { display:flex; flex-wrap: wrap; gap: 8px; position: relative; isolation: isolate; }
.chip { padding: 8px 12px; border-radius: 9999px; background: var(--chip-bg); border: 1px solid var(--chip-border); color: var(--text); position: relative; transition: color 0.3s; cursor: pointer; overflow: hidden; }
.chip span { position: relative; z-index: 20; pointer-events: none; transition: color 0.3s; }
.chip.selected { background: transparent; border-color: transparent; }
.chip.selected span { color: #fff; }

.pf-presets .chip.selected { background: var(--accent) !important; color: #fff !important; border-color: var(--accent) !important; }
.pf-presets .chip.selected span { color: #fff !important; }

.glider { position: absolute; background: var(--accent); border-radius: 9999px; transition: all 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2); z-index: 10; pointer-events: none; opacity:0; }

.price-filter { width: 100%; padding: 0 8px; box-sizing: border-box; }
.price-filter .pf-track { position:relative; height: 18px; margin: 42px 0 12px; border-radius: 999px; background: #e0e0e0; box-shadow: inset 0 1px 2px rgba(0,0,0,.1); touch-action: none; }
.price-filter .pf-arrows { display:none; }
.price-filter .pf-range { position:absolute; height: 100%; top: 0; background: linear-gradient(90deg, #800020, #b44b5c); border-radius: 999px; background-size: 20px 20px; animation: progress-stripes 1s linear infinite; background-image: linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent); pointer-events: none; }
@keyframes progress-stripes { from { background-position: 20px 0; } to { background-position: 0 0; } }
.price-filter .pf-thumb { position:absolute; top: 50%; transform: translate(-50%, -50%); width: 14px; height: 32px; background:#fff; border: 2px solid #800020; border-radius: 4px; box-shadow: 0 2px 5px rgba(0,0,0,.2); cursor: grab; transition: transform .1s; touch-action: none; z-index: 2; }
.price-filter .pf-thumb:active { transform: translate(-50%, -50%) scale(1.1); cursor: grabbing; }
.price-filter .pf-thumb:focus { outline:none; box-shadow: 0 0 0 4px rgba(128,0,32,0.2); }
.price-filter .pf-bubble { position:absolute; top: -36px; transform: translateX(-50%); background: #333; color: #fff; padding: 4px 8px; border-radius: 4px; font-size: 11px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .2s; z-index: 3; }
.price-filter .pf-bubble.show { opacity: 1; }
.price-filter .pf-bubble::after { content:""; position:absolute; left:50%; bottom: -4px; transform: translateX(-50%) rotate(45deg); width: 8px; height: 8px; background: #333; }

.pf-presets { display:flex; flex-wrap: wrap; gap:8px; margin-top:16px; justify-content: center; }

.segmented .chip { background: #fff; border-color: var(--chip-border); }
.segmented .chip.selected { background: transparent; color:#fff; }
.options-row { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap: wrap; }
.options-row .segmented .chip { flex: 1 1 auto; }

.advanced { max-height: 0; opacity: 0; transform: translateY(8px); overflow: hidden; transition: max-height .35s ease, opacity .35s ease, transform .35s ease; padding: 0 16px; }
.advanced.open { max-height: 800px; opacity: 1; transform: translateY(0); padding: 16px; }

@keyframes bounceIn {
  0% { transform: scale(0.8); opacity: 0; }
  60% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.bounce-in { animation: bounceIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
.more-btn { border:none; background: transparent; color: var(--accent); font-weight: 700; }
.more-btn.active { color: #b44b5c; }
@media (max-width: 480px) {
  .options-row { flex-direction: column; align-items: stretch; }
  .pf-presets { gap:6px; }
  .segmented .chip { padding: 10px 12px; }
}
.more-cats-btn { background: #c48a2f !important; border-color: #c48a2f !important; color: #fff !important; }
.more-cats-btn span { color: #fff !important; }

.switch { position: relative; display:flex; align-items:center; gap:8px; }
.switch input { display:none; }
.switch .slider { position: relative; width: 48px; height: 28px; background: #ddd; border-radius: 999px; box-shadow: var(--shadow); }
.switch .slider::after { content:""; position:absolute; left:4px; top:4px; width:20px; height:20px; border-radius:50%; background:#fff; box-shadow: var(--shadow); transition: transform .2s ease; }
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::after { transform: translateX(20px); }
.switch .switch-label { color: var(--text); font-size: 14px; }
