/* =============================================
   FILTER SIDEBAR — filters.css
   ============================================= */

.filter-sidebar {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 1rem;
}

.filter-sidebar-inner {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 120px);
    overflow: hidden;
}

.filter-sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #555;
    flex-shrink: 0;
}

.filter-sidebar-header svg {
    width: 14px;
    height: 14px;
    color: #1f5f46;
}

.filter-sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}

.filter-sidebar-scroll::-webkit-scrollbar {
    width: 4px;
}

.filter-sidebar-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.filter-sidebar-scroll::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 4px;
}

.filter-sidebar-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid #f0f0f0;
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    background: #fff;
    z-index: 5;
}

.filter-clear-btn {
    width: 100%;
    background: none;
    border: 1.5px solid #1f5f46;
    color: #1f5f46;
    border-radius: 8px;
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.filter-clear-btn:hover {
    background: #1f5f46;
    color: #fff;
}

.filter-group {
    border-bottom: 1px solid #f0f0f0;
}

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

.filter-group-title {
    padding: 0.875rem 1rem 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #999;
}

.filter-group-items {
    padding: 0.25rem 0.875rem 0.875rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.25rem;
}

.filter-checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.5rem;
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.filter-checkbox-row:hover {
    background: #f0f7f4;
}

.filter-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 1.5px solid #ccc;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.filter-checkbox:checked {
    background: #1f5f46;
    border-color: #1f5f46;
}

.filter-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(40deg);
}

.filter-checkbox-label {
    font-size: 0.9rem;
    color: #333;
    cursor: pointer;
}

.filter-group-items--full {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 0.5rem 1rem 1rem;
}

.range-filter {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.range-filter-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: #444;
    font-weight: 500;
}

.range-filter-label span:last-child {
    font-weight: 600;
    color: #1f5f46;
    font-size: 0.78rem;
}

.range-track-wrapper {
    position: relative;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    margin: 10px 0;
}

.range-track-fill {
    position: absolute;
    height: 100%;
    background: #1f5f46;
    border-radius: 3px;
    pointer-events: none;
}

.range-input {
    position: absolute;
    width: 100%;
    height: 6px;
    top: 0;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    pointer-events: none;
    outline: none;
    margin: 0;
}

.range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1f5f46;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
    cursor: pointer;
    pointer-events: all;
    position: relative;
    z-index: 2;
}

.range-input::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1f5f46;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
    cursor: pointer;
    pointer-events: all;
}

.range-input--max {
    z-index: 3;
}

.range-input--min {
    z-index: 4;
}

/* Mobile */
@media (max-width: 768px) {
    .filter-sidebar {
        width: 100%;
        position: static;
    }

    .filter-sidebar-inner {
        max-height: none;
    }
}