.filter {
    font-size: 14px;
    margin-top: 40px;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.filter-title {
    font-size: 18px;
    font-weight: 600;
}

.filter-reset {
    font-size: 13px;
    color: #2563eb;
    text-decoration: none;
}

.filter-group {
    margin-bottom: 28px;
}

.filter-group-title {
    font-weight: 700;
    margin-bottom: 8px;
}


/* ==== CHECKBOX (CUSTOM 3D) ==== */
.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    user-select: none;
    width: max-content;
}

/* скрываем нативный input */
.filter-checkbox input {
    display: none;
}

/* визуальный чекбокс */
.checkbox-ui {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    flex-shrink: 0;
    /* background: linear-gradient(180deg, #fafafa, #d9d9d9); */
    border: 1px solid #aaa;
    box-shadow:
        inset 0 1px 1px rgba(0, 0, 0, .1),
        0 2px 4px rgba(0, 0, 0, .1);


    position: relative;
    transition: box-shadow .15s ease, transform .1s ease;
}

.filter-checkbox input:checked+.checkbox-ui {
    background-color: #174cc0;
    border-color: #0c3197;
}


/* галочка */
.filter-checkbox input:checked+.checkbox-ui::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 9px;
    border: solid rgb(255, 255, 255);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* текст */
.checkbox-label {
    color: #282c33;
    font-weight: 500;
    transition: color .15s ease;
}

.filter-checkbox:hover .checkbox-label {
    color: var(--secondary-card-color);
}

/* нажатие */
.filter-checkbox:active .checkbox-ui {
    transform: translateY(1px);
    box-shadow:
        inset 0 2px 3px rgba(0, 0, 0, .35),
        0 1px 2px rgba(0, 0, 0, .25);
}


/* ==== PRICE SLIDER ==== */
.price-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 12px 0;
}

.price-slider {
    position: relative;
    height: 36px;
    margin: 12px 0;
}

.price-slider input[type="range"] {
    position: absolute;
    width: 100%;
    height: 36px;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
}

.price-slider input::-webkit-slider-thumb {
    pointer-events: all;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    box-shadow:
        inset 0 2px 3px rgba(0, 0, 0, .35),
        0 1px 2px rgba(0, 0, 0, .25);
    background: #174cc0;
    cursor: pointer;
    -webkit-appearance: none;
}

.price-slider input::-moz-range-thumb {
    pointer-events: all;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    box-shadow:
        inset 0 2px 3px rgba(0, 0, 0, .35),
        0 1px 2px rgba(0, 0, 0, .25);
    background: #174cc0;
    cursor: pointer;
}

.price-track {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 4px;
    width: 100%;
    background: #e5e7eb;
    border-radius: 2px;
}

.price-range-fill {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 4px;
    background: #174cc0;
    border-radius: 2px;
}

.price-values {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #374151;
}


/* список опций фильтра (скрытый режим) */
.filter-options {
    max-height: 174px;
    overflow: hidden;
}

/* раскрытый режим */
.filter-options.open {
    max-height: none;
}

/* кнопка показать еще */
.filter-more {
    margin-top: 10px;
    background: none;
    border: none;
    color: #2053c3;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.filter-more::after {
    content: "";
    width: 22px;
    height: 22px;
    background-image: url("/assets/images/arrow-down-black.svg");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform .3s ease;
}

.filter-options.open+.filter-more::after {
    transform: rotate(180deg);
}

/* КНОПКИ ПРИМЕНИТЬ / ОЧИСТИТЬ */
.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.filter-apply {
    flex: 1;
    background-color: #174cc0;
    color: #fff;
    padding: 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.filter-clear {
    flex: 1;
    text-align: center;
    background: #f1f5f9;
    color: #111;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

/* СЧЕТЧИК ЭЛЕМЕНТОВ */
.filter-count {
    margin-left: 2px;
    color: #727272;
    font-size: 13px;
}
