body.no-scroll {
    overflow: hidden;
    height: 100dvh;
}

.filter-panel__header {
    display: none;
    padding: 15px 0;
}

.filter-panel__title {
    font-size: 24px;
    color: var(--Neutral-1000);
    font-weight: 400;
}

.filter-panel__close {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
}

.filter-panel__footer {
    display: none;
}

.filter-panel__action {
    text-decoration: none;
    padding: 18px 16px;
    font-size: 16px;
    color: var(--Neutral-1000);
    font-weight: 600;
    background-color: var(--Primary-100);
    margin-bottom: 40px;
}

.filter-panel__info {
    margin-bottom: 19px;
}

.filter-panel__info-item {
    font-size: 16px;
    color: var(--Neutral-1000);
    font-weight: 300;
    margin-bottom: 12px;
}

.filter-panel__info-item:last-child {
    margin-bottom: 0;
}

.filter-panel__call {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

.filter-panel__call-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-panel__call-text {
    font-size: 16px;
    color: var(--Neutral-1000);
    font-weight: 600;
}

.filter-overlay {
    display: none;
}

.filter-panel {
    position: static;
    transform: none;
    height: auto;
    background: transparent;
    display: block;
    width: 430px;
}

.catalog-filter {
    width: 335px;
    background: var(--Neutral-0);
    padding: 12px 14px;
    flex-shrink: 0;
    box-shadow: 0 4px 45px 0 rgba(62, 59, 52, 0.05);
    user-select: none;
}

.filter-head {
    margin-bottom: 12px;
}

.filter-head .filter-title {
    margin-bottom: 20px;
}

.price-controls {
    display: flex;
    justify-content: space-between;
}

.controls-item {
    display: flex;
    gap: 10px;
    align-items: center;
}

.price-controls input {
    width: 100px;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.price-range {
    position: relative;
    width: 100%;
    height: 1px;
    background-color: var(--Neutral-200);
    margin-bottom: 21px;
}

.price-range__progress {
    position: absolute;
    height: 1px;
    background-color: var(--Primary-1000);
    left: 0;
    right: 100%;
    z-index: 1;
}

/* Chrome / Edge */
.price-range input[type="range"]::-webkit-slider-runnable-track {
    height: 1px;
    background: transparent;
}

/* Firefox */
.price-range input[type="range"]::-moz-range-track {
    height: 1px;
    background: transparent;
}

.price-range input[type="range"] {
    appearance: none;
}

.price-range input[type="range"] {
    position: absolute;
    width: 100%;
    pointer-events: none;
    -webkit-appearance: none;
    bottom: 8px;
    background: transparent;
    z-index: 2;
}

@-moz-document url-prefix() {
    .price-range input[type="range"] {
        bottom: -8px;
    }
}

input[type="range"]::-webkit-slider-thumb {
    pointer-events: auto;
    width: 18px;
    height: 18px;
    border-radius: 3.6px;
    border: 4px solid var(--Primary-1000);
    box-sizing: border-box;
    background-color: var(--Neutral-0);
    cursor: pointer;
    -webkit-appearance: none;
}

input[type="range"]::-moz-range-thumb {
    pointer-events: auto;
    width: 18px;
    height: 18px;
    border-radius: 3.6px;
    border: 4px solid var(--Primary-1000);
    background-color: var(--Neutral-0);
    box-sizing: border-box;
    cursor: pointer;
}

.filter-block {
    padding: 10px 0;
}

.filter-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 18px;
}

.filter-actions {
    align-items: center;
    gap: 8px;
}

.filter-body {
    margin-top: 10px;
    display: none;
}

.filter-label input {
    display: none;
}

.filter-checkbox-label {
    padding-left: 25px;
    position: relative;
    display: flex;
    gap: 3px;
    align-items: flex-end;
    cursor: pointer;
    max-width: 255px;
}

.filter-checkbox-label .count {
    color: var(--Neutral-500);
}

.filter-checkbox-label:before {
    content: "";
    width: 18px;
    height: 18px;
    background: url("../img/icons/checkbox.svg") no-repeat center center / cover;
    position: absolute;
    left: 0;
    filter: grayscale(1) invert(.3);
    transition: .4s;
    top: 0;
}

.filter-checkbox-label:after {
    content: "";
    width: 18px;
    height: 18px;
    background: url("../img/icons/checkbox-active.svg") no-repeat center center / cover;
    position: absolute;
    left: 0;
    opacity: 0;
    top: 0;
    transition: .4s;
}

.filter-label input:checked + span:after {
    opacity: 1;
}

.checkbox-color {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    padding: 9px 5px;
    position: relative;
}

/* Прячем input */
.checkbox-color input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Текст */
.checkbox-color .color-text {
    font-weight: 400;
}

/* Внешний квадрат */
.checkbox-color .color-icon {
    width: 32px;
    height: 32px;
    border: 2px solid var(--Neutral-100);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: border-color 0.25s ease;
    flex-shrink: 0;
    position: relative;
}

/* Внутренний квадрат (заливка цвета) */
.checkbox-color .color-icon span {
    width: 24px;
    height: 24px;
    border-radius: 3px;
    transition: background 0.25s ease;
}

.checkbox-color input:checked + .color-icon {
    border-color: var(--Primary-1000);
}

.checkbox-color:hover .color-icon {
    border-color: var(--Neutral-200);
}

.radio {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 9px 5px;
}

.radio input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.radio span {
    position: relative;
    padding-left: 30px;
    line-height: 20px;
}

.radio span::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 18px;
    height: 18px;
    border: 2px solid var(--Neutral-500);
    border-radius: 50%;
    transform: translateY(-50%);
    transition: 0.25s;
}

.radio span::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 50%;
    width: 8px;
    height: 8px;
    background: var(--Primary-1000);
    border-radius: 50%;
    transform: translateY(-50%) scale(0);
    transition: 0.25s;
}

.radio input:checked + span::before {
    border-color: var(--Primary-1000);
}

.radio input:checked + span::after {
    transform: translateY(-50%) scale(1);
}

.radio-flag {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    padding: 5px;
    position: relative;
}

/* Прячем input */
.radio-flag input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Текст страны */
.radio-flag .flag-text {
    font-weight: 400; /* чтобы точно не был жирным */
}

/* КРУГ ДЛЯ ФЛАГА */
.radio-flag .flag-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--Neutral-100);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.25s ease;
    flex-shrink: 0;
}

/* Сам флаг (картинка) */
.radio-flag .flag-icon img {
    width: 24px;
    height: 24px;
}

/* Активный (выбранный) */
.radio-flag input:checked + .flag-icon {
    border-color: var(--Primary-1000);
}


.filter-body .show-more {
    color: var(--Neutral-500);
    text-decoration: underline 1px solid var(--Neutral-500) !important;
}

.filter-body .show-more:hover {
    color: var(--Primary-1000);
}

.filter-block.open .filter-body {
    display: flex;
    flex-direction: column;
}

.acc-arrow img {
    width: 24px;
    height: 24px;
    transform: rotate(0);
    transition: transform .2s;
}

.filter-block.open .filter-title .acc-arrow {
    transform: rotate(180deg);
}

.filter-list {
    scrollbar-width: thin;
    /*scrollbar-color: rgb(206, 195, 174) transparent;*/
    overflow-x: hidden;
    padding-right: 4px;
}
.filter-body {
    max-height: 365px;
    overflow-y: auto; 
}
.filter-order {
    display: flex;
    flex-direction: column;
    
}
.filter-order label.active {
    order: 1;
}
.filter-list::-webkit-scrollbar {
    width: 6px;
}


.filter-list::-webkit-scrollbar-track {
    background: var(--Neutral-100);
    border-radius: 0;
}

.filter-list::-webkit-scrollbar-thumb {
    background-color: var(--Primary-700);
    border-radius: 0;
}

.filter-list::-webkit-scrollbar-button {
    display: none;
    height: 0;
    width: 0;
}

.filter-search {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    position: relative;
}

.filter-search input {
    flex: 1;
    padding: 8px 40px 8px 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-weight: 400;
    font-size: 14px;
    color: var(--Neutral-700);
    cursor: text;
}

.filter-search-icon {
    position: absolute;
    right: 10px;
    top: 7px;
}

.filter-search input::placeholder {
    color: var(--Neutral-500);
}



.filter-item-name {
    padding: 7px 2px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    order: 2;
    color: var(--Neutral-1000);
    font-size: 16px;
    font-weight: 500;
}

.filter-item-name .acc-arrow {
    cursor: pointer;
}

.filter-item-children {
    padding-left: 20px;
    display: none;
}

.filter-item-children li {
    padding: 6px 2px;
}

.filter-item.open .filter-item-children {
    display: block;
}

.filter-item.open .filter-item-name .acc-arrow {
    transform: rotate(180deg);
}

.colors .color-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.swatch {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    display: inline-block;
    border: 1px solid #ccc;
}

.filter-switch {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.switch input {
    display: none;
}

.switch-track {
    width: 44px;
    height: 24px;
    background: var(--Neutral-200);
    border-radius: 24px;
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
}

.switch-track::after {
    content: '';
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    left: 3px;
    top: 3px;
    transition: left .18s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.switch input:checked + .switch-track {
    background: var(--Primary-1000);
}

.switch input:checked + .switch-track::after {
    left: 23px;
}

.reset-filter {
    width: 100%;
    border-radius: 4px;
    font-weight: 600;
}

@media (max-width: 1440px) {
    .filter-panel {
        position: fixed;
        padding: 16px;
        top: 0;
        left: 0;
        background: #fff;
        z-index: 1001;
        height: 100dvh;

        display: flex;
        flex-direction: column;

        transform: translateX(-100%);
        transition: transform .3s ease;
    }


    .filter-panel.is-open {
        transform: translateX(0);
        overflow-y: scroll;
        width: 405px;
        max-height: 100vh;
    }

    .filter-panel__header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-shrink: 0;
        padding: 16px 0;
    }

    .filter-panel__footer {
        display: block;
    }

    .catalog-filter {
        width: 100%;
    }

    .filter-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.45);
        z-index: 1000;

        opacity: 0;
        pointer-events: none;
        transition: opacity .3s ease;
    }

    .filter-overlay.is-visible {
        opacity: 1;
        pointer-events: auto;
    }
}

@media (max-width: 768px) {
    .filter-panel.is-open {
        width: 100%;
    }

    .price-controls .controls-item input {
        font-size: 16px;
    }

    .price-controls .controls-item input::placeholder {
        font-size: 16px;
    }

    .filter-panel .filter-checkbox-label {
        font-size: 16px;
    }

    .filter-panel .radio span {
        font-size: 16px;
    }

    .flag-text {
        font-size: 16px;
    }

    .reset-filter {
        font-size: 14px;
        padding: 16px;
    }

    .filter-search-icon img {
        bottom: 5.5px;
        position: relative;
    }
}
