.filter-box__control {
    position: relative;

}
.filter-box__body::-webkit-scrollbar {
    width: 8px; /* Ширина скроллбара */
}

.filter-box__body::-webkit-scrollbar-thumb {
    background-color: #888; /* Цвет ползунка */
    border-radius: 10px; /* Скругленные углы */
}

.filter-box__body::-webkit-scrollbar-track {
    background: #f1f1f1; /* Цвет фона скроллбара */
}

/* Для Firefox */
.filter-box__body {
    scrollbar-width: thin; /* Тонкий скроллбар */
    scrollbar-color: #888 #f1f1f1; /* Цвет ползунка и фона */
}

.main__pplr_btn.filter-box__control {
    position: relative;
    overflow: hidden;
    max-width: 95%;
}
.main__pplr_btn {
    padding: 0!important;
    margin-right: 5px!important;
    margin-left: 5px!important;
    max-width: 100%; /* Ограничивает ширину блока */

}



.main__pplr_btn_block.sort .js_mpplr_btn label {
    padding: 6px 12px;
}

.main__pplr_btn_block.sort .js_mpplr_btn {
    padding: 0;
}

.main__pplr_btn.sort {
    padding: 1px 12px;
}

#view-all-button.transform::after {
    transform: scaleX(-1) !important;
}

.filter__head.js-filter__head {
    border-radius: 4px;
    font-family: Open Sans;
    font-size: 15px;
    font-weight: 600;
    line-height: 22px;
    text-align: left;
}

.popup-modal__content.filter-box_hidden-1x{
    column-count: 2;
}
.popup-modal__content.filter-box_hidden-2x{
    column-count: 3;
}
.popup-modal__content.filter-box_hidden-3x{
    column-count: 4;
}
/* Стиль для попапа */
.popup-modal {
    position: absolute;
    top: 0;
    left: 100%;
    width: 200%;
    margin-left: 0;
    padding: 15px 15px 10px;
    background-color: #fff;
    border: 1px solid var(--color-border-gray);
    box-shadow: 0 0 10px 0 rgba(17, 17, 17, .2);
    font-size: 0;
    z-index: 99;
}


.popup-modal__close {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
}

.sidebar__item {
    border-radius: 4px;
    background: var(--color-bg-gray);
}

.toggle__caption {
    margin: 0;
    cursor: pointer!important;
    display: block; /* Обеспечивает корректное поведение */
    white-space: nowrap; /* Запрещает перенос текста */
    overflow: hidden; /* Скрывает текст, выходящий за пределы блока */
    text-overflow: ellipsis; /* Добавляет многоточие */
    max-width: 100%; /* Ограничивает ширину внутри родителя */
    box-sizing: border-box; /* Включает padding и border в ширину */
}
.filter-box .toggle__caption {
    max-width: 100%;
}
.main__pplr_btn.option-checked {
    background-color: rgb(var(--color-greenRGB) / 15%);
    border-color: var(--color-green);
    cursor: default;
}

.main__pplr_btn_sort {

    background-color: rgb(var(--color-greenRGB) / 15%);

    cursor: pointer;
    max-width: 100%;
    display: inline-block;
    padding: 6px 0;
    background-color: #fff;
    border-radius: 30px;
    font-size: 12px;
    line-height: 20px;
    transition: all .3s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.item__shoping{
    min-height: 120px;
}

#myLink {
    margin-bottom: 0px!important;
    margin-right: 0px!important;
    margin-top: 0px!important;
}

.button:disabled{
    box-shadow: none!important;
}

.main__pplr_btn_block {
    display: inline-block;
    margin-bottom: 10px;
    margin-right: 10px;
    padding: 4px 4px;
    border: 1px solid var(--color-border-gray);
    background-color: #fff;
    border-radius: 555px;
    font-size: 14px;
    line-height: 20px;
    transition: all .3s ease;
    cursor: pointer;
}


.main__pplr_btn_sort.filter-box__control {
    position: relative;
    overflow: hidden;
}

.tool__label_sort{
    margin: 0;
    font-family: Open Sans;
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    text-align: left;
}

#filter-button{
    background: white;
}

.icon_check::before {
    font-size: small;
}

.toggle__input{
    opacity: 0;
    visibility: visible;
    z-index: 1000;
}
.filter__footer{
    box-shadow: 0px 0px 12px 0px #0000002E;
    border: 8px solid white;
    border-radius: 2px;
    margin: 0px 4px 4px;
}
/* Стиль для изначального фиксированного расположения внизу слева */
.block-filter {
    position: sticky;
    height: 55px;
    /* Фиксированное положение */
    bottom: 23px; /* Задайте нужное расстояние от верхнего края */
    z-index: 99; /* Увеличьте z-index, чтобы блок был над другими элементами */
    max-width:268px ;
    padding-bottom: 5px;
    width: 100%; /* Укажите нужную ширину */
    transition: position 0.3s; /* Плавный переход при смене позиции */
}

.block-filter.sticky {
    position: static;

}

.block-filter .filter__footer{
    position: sticky;
    bottom: 30px; /* Задайте нужное расстояние от верхнего края */
    z-index: 200; /* Увеличьте z-index, чтобы блок был над другими элементами */
    max-width:268px ;
    width: 100%; /* Укажите нужную ширину */
    transition: position 0.3s; /* Плавный переход при смене позиции */
}
.filter__footer.sticky {
    position: sticky;
    transition: all 0.3s ease;/* Установить позицию обратно в static */
}
.filter-button-clean{
    display: flex;
    align-items: center;
    background-color: white;
    padding: 0 16px;
    color: #030303;
    font-family: Open Sans;
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
}
.filter-button-clean::before {
    content: "";
    display: inline-block;
    width: 15px; /* Настройте размер иконки */
    height: 17px; /* Настройте размер иконки */
    background: url('/bitrix/templates/multinew/img/other/filter-button-clean.svg') no-repeat center center;
    background-size: contain; /* Подгоните размер иконки */
    margin-right: 8px; /* Расстояние между иконкой и текстом */
}
.mob_n.main__pplr_btn_sort.js_mpplr_btn {

    padding-left: 0;
}
.main__pplr_btn_sort.js_mpplr_btn .toggle__caption{
    margin: 0!important;
}

.button-group__primary-item {
    border-radius: 2px;
}


.js_mpplr_btn {
    cursor: pointer;
}

.js_mpplr_btn label {
    padding: 5px 24px;
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    cursor: pointer; /* Курсор будет меняться при наведении на весь блок */
}

.js_mpplr_btn label input {
    position: absolute;
    opacity: 0;
    pointer-events: none; /* Скрываем чекбокс, но он остается функциональным */
}

.popup-modal__filter-input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    box-sizing: border-box; /* Чтобы padding не увеличивал ширину */
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
}


.popup-modal__content {
    background: #fff;
    /*padding: 20px;*/
    border-radius: 5px;
    width: 100%;
    max-width: 600px;
    position: relative;
    overflow-y: auto;  /* Вертикальный скролл */
    overflow-x: hidden; /* Отключение горизонтального скролла */

    padding: 10px; /* Отступы внутри контента */
    box-sizing: border-box;
}
.filter-box {
    width: 100%;
    /*padding-right: 10px;*/

}

.filter-box__head.filter-box__tglr{
    border-bottom: 1px solid #DDE4E7!important;
    margin-bottom: 0!important;
}

.main_scrol {
    max-height: 395px;
    overflow-y: auto;
}



.filter-box__head.filter-box__tglr:not(.rolledUp) {
    margin-bottom: 0 !important;
}
.filter-box__head.filter-box__tglr:not(.rolledUp) {
    /* Ваши стили здесь */
    border-bottom: 1px solid #DDE4E7;
    z-index: 1;
    border-radius: 4px 4px 0 0px;
}
.filter-box__head.filter-box__tglr{
    border-radius: 4px;
    border: none;
}

.filter__content .filter-box:not(:first-child) .filter-box__head.filter-box__tglr{
    margin-top: 10px;
}

.filter-box__body{
    position: relative;
    overflow: auto;

    max-height: 400px;
    border-radius: 4px;
    background: #FFFFFF!important;
    margin: -4px 10px 10px!important;
    padding: 0!important;
    padding-right: 8px!important;
    padding-top: 16px !important;
}

/* Стили для hover дочерних элементов */
.main__pplr_btn_sort:hover {
    border-color: var(--color-green);
    border: 1px solid var(--color-green);
}

.filter-checked{
    background-color: rgb(var(--color-greenRGB) / 15%);
    border-color: var(--color-green);
    cursor: default;
}

.filter__content:first-of-type {
    border-bottom: none;
    padding-bottom: 20px;
}

.filter__content{
    border-radius: 44px;

    border: none!important;
}

.filter__head {
    border: none!important;
}

.filter__head_main{
    display: none;
    background-color: #fff;
    border: 1px solid var(--color-green);
    color: #000;
    cursor: pointer;
    font-size: 13px;
    padding-bottom: 5px;
    padding-top: 5px;
    text-align: center;
    transition: background-color .3s ease, border-color .3s ease, color .3s ease;
}
.filter__head_main::before {
    content: "";
    display: inline-block;
    position: relative;
    top: 1px;
    vertical-align: middle;
    width: 15px;
    height: 16px;
    margin-right: 5px;

    background: url(/bitrix/templates/multinew/img/icon_faset_bl.svg) 0 0 no-repeat;

    -webkit-background-size: 100% auto;
    background-size: 100% auto;
}

.main__pplr_btn_sort.filter-checked{
    border-color: transparent;

}
@media (min-width: 991px) and (max-width: 1180px){
    .block-filter .filter__footer{
        max-width: 220px;
    }


}
@media (max-width: 991px){
    .popup-modal__content{
        border-radius:0;
    }
    .filter__head.js-filter__head {
        border-radius: 0;
    }
    .static {

        position: static;

    }

    #js-filter__body {

        background: var(--color-bg-gray);


    }
    .sidebar {
        margin-bottom: 15px!important;
    }
    .col-md-9  .tools{
        margin-bottom: 10px!important;
    }
    .block-filter {
        bottom: 0;
    }
    .filter__footer {
        margin-top: 0px!important;
    }


    .filter__content {
        border-bottom: 16px!important;
    }
    .filter__head_main {
        display: block;
    }
    .filter__body {
        padding-top :0;
    }
    .block-filter .filter__footer{
        max-width: 470px;
    }
    #js-filter__body  .filter__head.js-filter__head:first-child{
        padding-top: 24px;
    }
    .filter__head:first-child{
        text-transform: capitalize!important;
    }
    .filter__head:first-child::before{
        content: none;
    }
    .filter__head{
        border: none;
        background-color: var(--color-bg-gray);
        font-family: Open Sans;
        font-size: 15px;
        font-weight: 600;
        line-height: 22px;
        text-align: left;

    }
    .popup-modal {
        left: 0;
        top: 50px;
        width: 100%;
        background-color: var(--color-bg-gray);
        border: 0;
        border-top: 1px solid var(--color-border-gray);
        padding: 15px 10px 5px;

        width: 100%;

    }
    /*.filter__content{*/
    /*    padding-bottom: 90px;*/
    /*}*/

    .block-filter {
        max-width: 480px;
    }
    .filter__button {
        width: 100% !important;
        position: sticky!important;
    }


}

@media (max-width: 500px){
    .tools {
        margin-bottom: 15px!important;
    }
    span.toggle__caption{
        display: block!important;
    }
    .main__pplr_btn_block.sort .main__pplr_btn_sort.js_mpplr_btn{

        border: 1px solid #DDE4E7;
    }
    .main__pplr_btn_block.sort .main__pplr_btn_sort.js_mpplr_btn.filter-checked {

        border: none;
    }
    .main__pplr_btn_block.sort .main__pplr_btn_sort.js_mpplr_btn {

        margin-right: 8px;
        margin-bottom: 8px;
    }

    .mob_n{
        padding-left: 0;
        padding-bottom: 0;
        display: block;

    }
    .main__pplr_btn_block.sort {
        padding-left: 0;
        border: none;
        display: flex!important;
    }

    .block-filter .filter__footer{
        max-width: 315px;
    }
}