.js-form {
    font-family: 'Roboto', sans-serif;
    position: relative;
    display: flex;
    align-items: center;
    background: #eaeff7;
    padding: 5px;
}

.filter {
    display: flex;
    flex-direction: column;
}

/* Заголовок фильтра */
.filter-list__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    cursor: pointer;
    position: relative;
    margin-bottom: 0;
    padding-left: 16px;
    padding-right: 16px;
}

.filter-list__header .icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
    color: #1A2027;
}

.filter-list__header.open .icon {
    transform: rotate(90deg);
}

.filter-list__title {
    font-weight: 600;
    font-size: 14px;
    color: #1A2027;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Содержимое фильтра */
.filter-list__wrap {
    position: absolute;
    width: 100%;
    z-index: 10;
    border-top: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    left: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-gap: 10px;
    align-items: start;
    background: #eaeff7;
    padding: 20px;
}

.scroll-filter {
    scrollbar-width: thin;
    scrollbar-color: #c4c4c4 #f5f5f5;
    max-height: 300px;
    overflow-y: auto;
}

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

.scroll-filter::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.scroll-filter::-webkit-scrollbar-thumb {
    background-color: #c4c4c4;
    border-radius: 2px;
}

/* Элементы фильтра */
.filter-list__item {
    margin-bottom: 0;
    padding-right: 0;
    margin-right: 0;
    min-width: auto;
    align-self: start;
}

.filter-list {
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Стиль для активных или выбранных элементов фильтра */
.filter-list__item:has(.checkbox-custom__input:checked) .checkbox-custom__text {
    font-weight: 600;
    color: #1A2027;
}

/* Кнопки фильтра */
.catalog-filter-layer__btn {
    display: flex;
    gap: 12px;
    padding: 0 16px;
}


.catalog-filter-layer__btn .button__big {
    font-size: 14px;
    padding: 5px;
    font-weight: 600;
}

/* Кнопка "Показать" */
#set_filter {
    background-color: #1A2027;
    color: #FFFFFF;
}

#set_filter:hover {
    background-color: #2c343e;
}

/* Кнопка "Сбросить" */
.button__grey {
    background-color: #F5F5F5;
    color: #1A2027;
    border: 1px solid #EAEAEA;
}

.button__grey:hover {
    background-color: #EAEAEA;
}

/* Стили для быстрых фильтров (верхняя панель) */
.b-filter-add {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    padding: 16px 0;
}

.b-filter-add__item {
    display: flex;
    align-items: center;
    border: 1px solid #EAEAEA;
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #FFFFFF;
}

.b-filter-add__item:hover {
    border-color: #1A2027;
}

.b-filter-add__item.checked {
    background-color: #1A2027;
    color: #fff;
    border-color: #1A2027;
}

.filter-icon {
    margin-right: 8px;
    display: flex;
    align-items: center;
}

.filter-icon .icon {
    width: 16px;
    height: 16px;
    color: #1A2027;
}

.b-filter-add__item.checked .filter-icon .icon {
    color: #FFFFFF;
}

.b-filter-add__item-name {
    font-size: 14px;
    white-space: nowrap;
    color: #1A2027;
}

.b-filter-add__item.checked .b-filter-add__item-name {
    color: #FFFFFF;
}

.b-filter-add__item .hint__selected {
    width: 12px;
    height: 12px;
    margin-left: 6px;
    fill: #FFFFFF;
}

/* Стили для выбранных параметров фильтра */
.delete-param {
    display: inline-flex;
    align-items: center;
    background-color: #F5F5F5;
    padding: 6px 12px;
    border-radius: 4px;
    margin-right: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.delete-param:hover {
    background-color: #EAEAEA;
}

.delete-param .icon {
    width: 12px;
    height: 12px;
    margin-left: 6px;
    color: #1A2027;
}

/* Скрытые элементы */
.hide {
    display: none !important;
}

/* По умолчанию показываем открытые блоки и скрываем закрытые */
.filter-list__header:not(.open) + .filter-list__wrap {
    display: none;
}

.filter-list__header.open + .filter-list__wrap {
    display: grid;
}

/* Адаптивные стили для мобильных устройств */
@media (max-width: 768px) {
    .js-form {
        padding: 0;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
    }

    .filter-list__wrap {
        position: relative;
        border: none;
        box-shadow: none;
        padding: 12px;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-list__item {
        padding-left: 16px;
    }

    .b-filter-add {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 10px 0;
        -webkit-overflow-scrolling: touch;
    }

    .b-filter-add__item {
        flex-shrink: 0;
    }

    .filter-list {
        width: 100%;
    }
}
