/**
 * Advanced Search Filters Styles
 */

/* Filter Sidebar */
.filter-sidebar {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.filter-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #dee2e6;
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-section h6 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
    font-size: 0.95rem;
}

/* Price Range Slider */
.price-slider-container {
    padding: 1rem 0;
}

.price-slider {
    margin: 1rem 0;
}

.price-inputs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.price-inputs input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.price-display {
    text-align: center;
    font-weight: 600;
    color: #146eb4;
    margin-top: 0.5rem;
}

/* noUiSlider Styles */
.noUi-target {
    background: #dee2e6;
    border: none;
    border-radius: 4px;
    height: 6px;
}

.noUi-connect {
    background: #146eb4;
}

.noUi-handle {
    width: 18px;
    height: 18px;
    border: 2px solid #146eb4;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.noUi-handle:before,
.noUi-handle:after {
    display: none;
}

/* Filter Checkboxes/Radio */
.filter-option {
    margin-bottom: 0.5rem;
}

.filter-option label {
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.filter-option label:hover {
    background: #f8f9fa;
}

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
    margin-right: 0.5rem;
    cursor: pointer;
}

/* Active Filters */
.active-filters {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.active-filters h6 {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.active-filters .badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

.active-filters .btn-close {
    margin-left: 0.5rem;
    opacity: 0.8;
}

.active-filters .btn-close:hover {
    opacity: 1;
}

/* Filter Collapse */
.filter-collapse {
    margin-bottom: 1rem;
}

.filter-collapse .card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.filter-collapse .card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
    cursor: pointer;
    user-select: none;
}

.filter-collapse .card-header:hover {
    background: #e9ecef;
}

.filter-collapse .card-header h6 {
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-collapse .card-header i {
    transition: transform 0.3s;
}

.filter-collapse .card-header[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.filter-collapse .card-body {
    padding: 1rem;
}

/* Reset Filters Button */
.reset-filters-btn {
    width: 100%;
    margin-top: 1rem;
}

/* Mobile Filter Toggle */
.mobile-filter-toggle {
    display: none;
}

@media (max-width: 991px) {
    .mobile-filter-toggle {
        display: block;
        margin-bottom: 1rem;
    }
    
    .filter-sidebar {
        position: relative;
        top: 0;
        max-height: none;
    }
    
    .filter-sidebar.collapse:not(.show) {
        display: none;
    }
}

/* Filter Loading State */
.filter-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Brand Filter */
.brand-list {
    max-height: 200px;
    overflow-y: auto;
}

.brand-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.brand-item:hover {
    background: #f8f9fa;
}

.brand-item input {
    margin-right: 0.5rem;
}

.brand-item label {
    flex: 1;
    margin: 0;
    cursor: pointer;
}

/* Availability Filter */
.availability-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.availability-option {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.availability-option:hover {
    background: #f8f9fa;
}

.availability-option input {
    margin-right: 0.5rem;
}

.availability-option label {
    flex: 1;
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.availability-option .badge {
    font-size: 0.75rem;
}

