/* ========== ФИЛЬТР - ПОЛНАЯ ШИРИНА ========== */
.filter-bar {
    background: white;
    padding: 20px 40px;
    border-bottom: 1px solid #E8EDF2;
    position: sticky;
    top: 120px;
    z-index: 99;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.filter-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
    width: 100%;
}

.filter-group {
    flex: 1;
    min-width: 180px;
}

.filter-group label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #2C7DA0;
    margin-bottom: 8px;
    font-weight: 600;
}

.filter-select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #E8EDF2;
    border-radius: 12px;
    font-size: 0.85rem;
    background: #F5F7FB;
    cursor: pointer;
    font-family: inherit;
    height: 44px;
    transition: all 0.2s ease;
}

.filter-select:hover {
    border-color: #2C7DA0;
    background: white;
}

/* ===== КОНТЕЙНЕР ДЛЯ ЦЕНЫ И ДЛИНЫ - НА ВСЮ ШИРИНУ ===== */
.price-range {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #F5F7FB;
    border: 1px solid #E8EDF2;
    border-radius: 12px;
    padding: 0 16px;
    height: 44px;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.price-range:hover {
    border-color: #2C7DA0;
}

.price-range:focus-within {
    border-color: #2C7DA0;
    box-shadow: 0 0 0 3px rgba(44, 125, 160, 0.1);
    background: white;
}

/* ПОЛЯ ВВОДА - РАВНОМЕРНО РАСПРЕДЕЛЕНЫ */
.filter-input {
    flex: 1;
    width: 100%;
    min-width: 0;
    padding: 8px 0;
    border: none;
    font-size: 0.85rem;
    text-align: center;
    background: transparent;
    font-family: inherit;
    font-weight: 500;
    color: #1A2C3E;
}

.filter-input:focus {
    outline: none;
}

.filter-input::placeholder {
    color: #B0C4DE;
    font-weight: 400;
    font-size: 0.75rem;
}

/* РАЗДЕЛИТЕЛЬ */
.price-range span {
    color: #2C7DA0;
    font-size: 1rem;
    font-weight: 600;
    flex-shrink: 0;
}

/* Убираем стандартные стрелки */
.filter-input::-webkit-inner-spin-button,
.filter-input::-webkit-outer-spin-button {
    opacity: 0.3;
    cursor: pointer;
}

.filter-input::-webkit-inner-spin-button:hover,
.filter-input::-webkit-outer-spin-button:hover {
    opacity: 1;
}

.filter-input[type=number] {
    -moz-appearance: textfield;
}

/* КНОПКА СБРОСА */
.reset-btn {
    background: transparent;
    border: 1px solid #E8EDF2;
    padding: 10px 28px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    font-family: inherit;
    height: 44px;
    white-space: nowrap;
    transition: all 0.2s ease;
    color: #6C86A3;
}

.reset-btn:hover {
    border-color: #2C7DA0;
    background: #2C7DA0;
    color: white;
    transform: translateY(-1px);
}

/* РЕЗУЛЬТАТЫ */
.results-count {
    font-size: 0.85rem;
    color: #6C86A3;
    background: white;
    padding: 6px 18px;
    border-radius: 30px;
    font-weight: 500;
}

/* ===== АДАПТАЦИЯ ===== */
@media (max-width: 1000px) {
    .filter-bar {
        padding: 15px 20px;
    }
    .filter-grid {
        flex-direction: column;
        gap: 15px;
    }
    .filter-group {
        width: 100%;
        min-width: auto;
    }
    .price-range {
        padding: 0 12px;
    }
    .filter-input {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .price-range {
        gap: 8px;
        padding: 0 10px;
    }
    .filter-input {
        font-size: 0.8rem;
    }
    .reset-btn {
        width: 100%;
        text-align: center;
    }
}


/* ========== ПОЛЗУНКИ ФИЛЬТРА ========== */
.filter-bar {
    background: white;
    padding: 15px 40px;
    border-bottom: 1px solid #E8EDF2;
    position: sticky;
    top: 120px;
    z-index: 99;
    width: 100%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.filter-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
    width: 100%;
}

.filter-group {
    flex: 1;
    min-width: 160px;
}

.filter-group label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #2C7DA0;
    margin-bottom: 6px;
    font-weight: 600;
}

.filter-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #E8EDF2;
    border-radius: 40px;
    font-size: 0.8rem;
    background: #F5F7FB;
    cursor: pointer;
    height: 38px;
}

/* ОСНОВНОЙ КОНТЕЙНЕР ПОЛЗУНКА */
.range-wrapper {
    background: #F5F7FB;
    border: 1px solid #E8EDF2;
    border-radius: 40px;
    padding: 6px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    height: 38px;
    box-sizing: border-box;
}

/* КОНТЕЙНЕР ДЛЯ noUiSlider */
.slider-wrapper {
    flex: 1;
    min-width: 120px;
    height: 4px;
    position: relative;
}

/* САМ ПОЛЗУНОК - ВАЖНО: position: relative, width: 100% */
#priceSlider, 
#lengthSlider {
    width: 100%;
    height: 4px;
    position: relative;
}

/* СТИЛИ noUiSlider - без transform конфликтов */
.noUi-target {
    background: #E8EDF2;
    border: none;
    box-shadow: none;
    height: 4px;
    border-radius: 4px;
    margin: 0;
    padding: 0;
}

.noUi-base {
    width: 100%;
    height: 100%;
    position: relative;
}

.noUi-connects {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.noUi-connect {
    background: #2C7DA0;
    height: 100%;
    will-change: transform;
}

.noUi-handle {
    width: 14px !important;
    height: 14px !important;
    border-radius: 50%;
    background: #2C7DA0;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    cursor: pointer;
    position: absolute;
    top: -5px !important;
    right: -7px !important;
}

.noUi-handle::before, 
.noUi-handle::after {
    display: none;
}

/* ЗНАЧЕНИЯ ЦЕНЫ/ДЛИНЫ */
.range-values {
    display: flex;
    gap: 4px;
    font-size: 0.65rem;
    color: #1A2C3E;
    white-space: nowrap;
    background: white;
    padding: 3px 10px;
    border-radius: 30px;
    flex-shrink: 0;
}

.range-values span {
    font-size: 0.65rem;
}

/* КНОПКА СБРОСА */
.reset-btn {
    background: transparent;
    border: 1px solid #E8EDF2;
    padding: 8px 20px;
    border-radius: 40px;
    font-size: 0.7rem;
    cursor: pointer;
    height: 38px;
    white-space: nowrap;
}

.reset-btn:hover {
    border-color: #2C7DA0;
    color: #2C7DA0;
}

/* АДАПТАЦИЯ */
@media (max-width: 1000px) {
    .filter-grid {
        flex-direction: column;
    }
    .filter-group {
        width: 100%;
    }
    .range-wrapper {
        flex-wrap: wrap;
        height: auto;
    }
    .slider-wrapper {
        min-width: 100%;
        width: 100%;
    }
    #priceSlider, 
    #lengthSlider {
        width: 100%;
    }
}


/* Ползунки фильтра */
.range-wrapper {
    background: #F5F7FB;
    border: 1px solid #E8EDF2;
    border-radius: 40px;
    padding: 6px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    height: 38px;
}

.slider-wrapper {
    flex: 1;
    min-width: 120px;
}

#priceSlider, #lengthSlider {
    width: 100%;
    height: 4px;
}

.noUi-target {
    background: #E8EDF2;
    border: none;
    height: 4px;
    border-radius: 4px;
}

.noUi-connect {
    background: #2C7DA0;
}

.noUi-handle {
    width: 14px !important;
    height: 14px !important;
    border-radius: 50%;
    background: #2C7DA0;
    border: 2px solid white;
    top: -5px !important;
    right: -7px !important;
}

.noUi-handle::before, .noUi-handle::after {
    display: none;
}

.range-values {
    background: white;
    padding: 3px 12px;
    border-radius: 30px;
    font-size: 0.7rem;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ========== ПОЛЗУНКИ - ИСПРАВЛЕННЫЕ ========== */
.range-wrapper {
    background: #F5F7FB;
    border: 1px solid #E8EDF2;
    border-radius: 40px;
    padding: 6px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    height: 38px;
    width: 100%;
    box-sizing: border-box;
}

.slider-wrapper {
    flex: 1;
    min-width: 120px;
    height: 4px;
    position: relative;
}

#priceSlider, 
#lengthSlider {
    width: 100%;
    height: 4px;
    position: relative;
}

/* ОСНОВНЫЕ СТИЛИ noUiSlider */
.noUi-target {
    background: #E8EDF2;
    border: none;
    box-shadow: none;
    height: 4px;
    border-radius: 4px;
    margin: 0;
    padding: 0;
}

.noUi-base {
    width: 100%;
    height: 100%;
    position: relative;
}

.noUi-connects {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    background: #E8EDF2;
}

.noUi-connect {
    background: #2C7DA0;
    height: 100%;
    position: absolute;
}

.noUi-origin {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
}

.noUi-handle {
    width: 14px !important;
    height: 14px !important;
    border-radius: 50%;
    background: #2C7DA0;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    cursor: pointer;
    position: absolute;
    top: -5px !important;
    right: -7px !important;
}

.noUi-handle::before, 
.noUi-handle::after {
    display: none;
}

.noUi-touch-area {
    width: 100%;
    height: 100%;
}

/* ЗНАЧЕНИЯ */
.range-values {
    display: flex;
    gap: 4px;
    font-size: 0.7rem;
    color: #1A2C3E;
    white-space: nowrap;
    background: white;
    padding: 3px 12px;
    border-radius: 30px;
    flex-shrink: 0;
}

/* НАВЕДЕНИЕ */
.noUi-handle:hover {
    background: #1e5f7a;
    transform: scale(1.2);
}

/* АДАПТАЦИЯ */
@media (max-width: 1000px) {
    .range-wrapper {
        flex-wrap: wrap;
        height: auto;
        gap: 10px;
    }
    .slider-wrapper {
        min-width: 100%;
        width: 100%;
    }
    #priceSlider, 
    #lengthSlider {
        width: 100%;
    }
}

/* Поля ввода для фильтра */
.price-range {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #F5F7FB;
    border: 1px solid #E8EDF2;
    border-radius: 40px;
    padding: 4px 12px;
    height: 38px;
}

.filter-input {
    width: 100px;
    padding: 6px 8px;
    border: 1px solid #E8EDF2;
    border-radius: 30px;
    font-size: 0.8rem;
    text-align: center;
    background: white;
    font-family: inherit;
}

.filter-input:focus {
    outline: none;
    border-color: #2C7DA0;
}

.price-range span {
    color: #6C86A3;
    font-size: 0.9rem;
}

/* Убираем стрелки у number input */
.filter-input::-webkit-inner-spin-button,
.filter-input::-webkit-outer-spin-button {
    opacity: 0.5;
}

@media (max-width: 1000px) {
    .price-range {
        flex-wrap: wrap;
        height: auto;
        justify-content: center;
    }
    .filter-input {
        width: 100%;
    }
}

/* Добавление иконок в поля */
.price-range {
    position: relative;
}

/* Эффект при вводе */
.filter-input:focus {
    transform: scale(1.02);
}

/* Плавное появление границы */
.price-range,
.filter-select,
.reset-btn {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Тень при фокусе */
.price-range:focus-within,
.filter-select:focus {
    box-shadow: 0 0 0 3px rgba(44, 125, 160, 0.15);
}

/* Стиль для активного состояния */
.filter-input:active {
    background: rgba(44, 125, 160, 0.05);
}