
.filter-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

/* ===== FILTER CARD ===== */
.filter-card {
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: 16px;
    margin-bottom: 14px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.filter-card:hover {
    border-color: var(--slate-300);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.filter-card.active-filter {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}

/* ===== HEADER (clickable) ===== */
.filter-header {
    padding: 14px 18px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border-bottom: 1px solid var(--slate-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}
.filter-header:hover { background: var(--slate-50); }
.filter-header-title {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}
.filter-header-title i {
    color: var(--primary);
    font-size: 1rem;
    width: 20px;
    text-align: center;
}
.filter-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--slate-400);
    font-size: 1rem;
    transition: transform 0.3s, color 0.15s;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.filter-toggle:hover { color: var(--primary); }
.filter-card.collapsed .filter-toggle { transform: rotate(-90deg); }
.filter-card.collapsed .filter-body { display: none; }
.filter-card.collapsed .filter-header { border-bottom: none; }

/* ===== BODY ===== */
.filter-body {
    padding: 8px 18px 14px;
    max-height: 320px;
    overflow-y: auto;
}
.filter-body::-webkit-scrollbar { width: 4px; }
.filter-body::-webkit-scrollbar-thumb { background: var(--slate-200); border-radius: 2px; }

/* ===== CHECKBOX ITEM ===== */
.filter-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 8px;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--slate-700);
    border-radius: 8px;
    transition: all 0.15s;
    margin: 2px 0;
}
.filter-check:hover {
    background: var(--primary-bg);
    color: var(--primary);
    padding-left: 12px;
}
.filter-check input {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}
.filter-check input:checked + span {
    color: var(--primary);
    font-weight: 600;
}
.filter-check span { flex: 1; }
.filter-check .count {
    font-size: 0.7rem;
    color: var(--slate-400);
    background: var(--slate-100);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

/* ===== PRICE INPUTS ===== */
.price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.price-inputs input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border: 1.5px solid var(--slate-200);
    border-radius: 8px;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-weight: 500;
    color: var(--dark);
}
.price-inputs input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}
.price-inputs .dash {
    color: var(--slate-400);
    font-weight: 600;
}
.price-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.price-presets button {
    padding: 7px 12px;
    background: var(--slate-100);
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--slate-600);
    transition: all 0.15s;
}
.price-presets button:hover {
    background: var(--primary-bg);
    color: var(--primary);
    border-color: var(--primary);
}
.price-presets button.active {
    background: var(--primary);
    color: #fff;
}

/* ===== ACTIONS ===== */
.filter-actions {
    padding: 4px 0 8px;
}
.btn-filter-apply {
    width: 100%;
    padding: 12px 16px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn-filter-apply:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}
.btn-filter-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    color: var(--slate-500);
    font-size: 0.825rem;
    font-weight: 600;
    margin-top: 6px;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.15s;
}
.btn-filter-clear:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.05);
}

/* ===== MOBILE FILTER BUTTON ===== */
.mobile-filter-btn {
    display: none;
    width: 100%;
    padding: 14px 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 16px;
}

/* ===== EMPTY FILTER STATE ===== */
.filter-empty {
    padding: 12px;
    color: var(--slate-400);
    font-size: 0.85rem;
    text-align: center;
}

/* ===== MOBILE OVERLAY ===== */
@media (max-width: 768px) {
    .filter-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 320px;
        max-width: 85vw;
        height: 100vh;
        background: var(--white);
        z-index: 300;
        padding: 20px;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    .filter-sidebar.open { transform: translateX(0); }
    .mobile-filter-btn { display: flex; align-items: center; justify-content: center; gap: 8px; }
    .filter-card { margin-bottom: 12px; }
    .filter-body { max-height: 280px; }
}
