/* Каталог: фильтр и активные теги — визуал по Figma */

.l-section--catalog-filter .c-catalog-filter,
.l-section--catalog-filter .c-catalog-filter * {
    box-sizing: border-box;
}

.l-section--catalog-filter .c-catalog-products-area,
.l-section--catalog-filter .c-catalog-filter-sidebar,
.l-section--catalog-filter .js-catalog-pagination {
    transition: opacity 0.18s ease;
}

.l-section--catalog-filter.is-catalog-loading .c-catalog-products-area,
.l-section--catalog-filter.is-catalog-loading .c-catalog-filter-sidebar,
.l-section--catalog-filter.is-catalog-loading .js-catalog-pagination {
    opacity: 0.48;
    pointer-events: none;
}

.l-section--catalog-filter .c-catalog-filter input[type="range"] {
    display: none !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

:root {
    /* Тёмный сине-бирюзовый (чипсы + «Сбросить») */
    --cf-primary: #52bbb1;
    --cf-primary-hover: #43a69d;

    /* Бирюза слайдера из макета */
    --cf-slider: #52bbb1;

    /* Серый трек и бордеры из макета */
    --cf-track: #cacaca;

    --cf-bg: #f0f0f0;
    --cf-card: #ffffff;
    --cf-text: #121212;
    --cf-muted: #8a8a8a;
    --cf-line: #e6e6e6;
    --cf-handle-border: #cacaca;
}

/* ——— Активные фильтры ——— */
.c-catalog-active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    margin: 0;
    padding: 0;
    border-bottom: none;
}

.c-catalog-active-filters-slot {
    /* “полка” под сортировку: товары стартуют на уровне белой карточки фильтра */
    height: 42px;
    min-height: 42px;
    margin: 0;
    padding: 0;
    overflow: visible;
    transform: translateY(-6px);
}

/* Когда фильтры есть — теги занимают ту же верхнюю строку, не сдвигая товары вниз */
.c-catalog-active-filters-slot:has(.c-catalog-active-filters--has-filters) {
    height: 42px;
    min-height: 42px;
}

/* 2 строки как в макете:
   1) сортировка (слева) + выбранные параметры (справа)
   2) фильтры (слева) + товары (справа) */
@media (min-width: 1190px) {
    .l-section--catalog-filter .c-catalog-products-area {
        display: flex;
        flex-direction: column;
        gap: 0;
    }
}

/* Добавляем нужный зазор до товаров только когда теги реально есть */
@media (min-width: 1190px) {
    .c-catalog-active-filters-slot:has(.c-catalog-active-filters--has-filters) {
        margin-bottom: 0;
    }
}

/* Внутри “полки” теги не должны переноситься на 2 строки */
.c-catalog-active-filters-slot .c-catalog-active-filters {
    /* убираем margin/padding/border которые иначе меняют высоту и двигают товары вниз */
    height: 42px;
    margin: 0;
    padding: 0;
    border: none;
    align-items: center;
}

.c-catalog-active-filters-slot .c-catalog-active-filters__tags {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    align-items: center;
    height: 42px;
}

.c-catalog-active-filters-slot .c-catalog-active-filters__tag {
    flex: 0 0 auto;
}

/* Скрола почти не видно, но место под него остаётся */
.c-catalog-active-filters-slot .c-catalog-active-filters__tags::-webkit-scrollbar {
    height: 6px;
}
.c-catalog-active-filters-slot .c-catalog-active-filters__tags::-webkit-scrollbar-thumb {
    background: rgba(18, 18, 18, 0.15);
    border-radius: 999px;
}

/* Сетка товаров не должна “проседать” из-за внешних отступов */
.l-section--catalog-filter .l-section__content--with-sidebar > .container,
.l-section--catalog-filter .cus-catalog-grid {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.l-section--catalog-filter .cus-catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
    align-items: start;
    padding: 0 !important;
    text-align: left;
    font-size: initial;
}

.l-section--catalog-filter .cus-catalog-grid:after {
    content: none;
    display: none;
}

.l-section--catalog-filter .cus-catalog-grid .cus-card-item,
.l-section--catalog-filter .cus-catalog-grid .mix {
    width: 100% !important;
    margin-bottom: 0;
    box-sizing: border-box;
}

.l-section--catalog-filter .cus-catalog-grid .cus-categories-page-not-products {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Верхняя строка больше не нужна (сортировка в сайдбаре) */
.c-catalog-topbar,
.c-catalog-topbar__sort,
.c-catalog-topbar__sort-title,
.c-catalog-topbar__sort-select,
.c-catalog-topbar__filters {
    display: none;
}

.c-catalog-topbar__mobile-filter {
    display: none;
}

.c-catalog-mobile-controls {
    display: none;
}

.c-catalog-active-filters__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1 1 auto;
}

/* "Сбросить" должен быть справа от тегов */
.c-catalog-active-filters__reset-all {
    margin-left: auto;
    align-self: center;
}

.c-catalog-active-filters__tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 34px;
    padding: 8px 14px;
    background: var(--cf-primary);
    color: #121212;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    border-radius: 0;
}

.c-catalog-active-filters__tag:hover {
    background: var(--cf-primary-hover);
    color: #121212;
}

.c-catalog-active-filters__tag-remove {
    font-size: 17px;
    line-height: 1;
    font-weight: 300;
}

.c-catalog-active-filters__reset-all {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #4a8f94;
    text-decoration: none;
    white-space: nowrap;
}

.c-catalog-active-filters__reset-all:hover {
    color: var(--cf-primary-hover);
    text-decoration: underline;
}

/* ——— Сайдбар ——— */
.c-catalog-filter {
    /* Figma: Liberation Sans */
    font-family: 'Liberation Sans', Arial, sans-serif;
    color: var(--cf-text);
}

/* Сортировка — аккордеон */
.c-catalog-filter__sort {
    position: relative;
    margin: 0;
    border: none;
}

.c-catalog-filter__sort-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2px 0 0;
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.l-section--catalog-filter .c-catalog-filter > .c-catalog-filter__sort .c-catalog-filter__sort-select {
    position: absolute;
    inset: 0 auto auto 0;
    z-index: 2;
    width: 260px !important;
    height: 24px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    opacity: 0;
    cursor: pointer;
}

.c-catalog-filter__sort-head::-webkit-details-marker,
.c-catalog-filter__group-head::-webkit-details-marker {
    display: none;
}

.c-catalog-filter__sort-head::marker,
.c-catalog-filter__group-head::marker {
    content: '';
}

.c-catalog-filter__sort-title {
    font-weight: 700;
    font-size: 16px;
    line-height: 18px;
    letter-spacing: 0.78px;
    text-transform: uppercase;
}

.c-catalog-filter__sort-body {
    padding-top: 12px;
}

.l-section--catalog-filter .c-catalog-filter__sort-select {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 28px 0 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    letter-spacing: 0.78px !important;
    text-transform: uppercase !important;
    color: var(--cf-text) !important;
    line-height: 1.4 !important;
    height: auto !important;
    min-height: 0 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    cursor: pointer;
}

.c-catalog-filter__chevron {
    display: block;
    width: 7px;
    height: 7px;
    margin-top: -3px;
    border-right: 1.5px solid var(--cf-text);
    border-bottom: 1.5px solid var(--cf-text);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.c-catalog-filter__sort[open] > .c-catalog-filter__sort-head .c-catalog-filter__chevron,
.c-catalog-filter__group[open] > .c-catalog-filter__group-head .c-catalog-filter__chevron {
    transform: rotate(-135deg);
    margin-top: 2px;
}

/* Белая карточка «Фильтр» */
.c-catalog-filter__card {
    background: var(--cf-card);
    margin: 0;
    padding: 0;
}

.c-catalog-filter__card-title {
    margin: 0;
    padding: 0;
    font-weight: 700;
    font-size: 16px;
    line-height: 18px;
    letter-spacing: 0.78px;
    text-transform: uppercase;
}

.l-section--catalog-filter .c-catalog-filter__card-title {
    position: sticky;
    top: 0;
    z-index: 2;
    width: 100%;
    background: #ffffff;
}

.c-catalog-filter__group {
    border: none;
}

.c-catalog-filter__group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0;
    list-style: none;
    cursor: pointer;
    font-weight: 400;
    font-size: 13px;
    line-height: 18px;
    letter-spacing: 0.78px;
    text-transform: uppercase;
    user-select: none;
}

.c-catalog-filter__group-head--static {
    cursor: default;
}

.c-catalog-filter__group-body {
    padding: 0;
}

.c-catalog-filter__group-body--price {
    /* по макету: небольшой отступ до трека */
    padding: 2px 0 0;
}

/* по макету: расстояние от заголовка "ЦЕНА" до трека меньше */
.c-catalog-filter__group-body--price {
    padding-top: 6px;
}

/* ——— Слайдер цены (кастомные ручки) ——— */
.c-price-range__rail {
    position: relative;
    /* Figma group 266: 176×20 */
    height: 20px;
    margin: 0;
    touch-action: none;
    cursor: pointer;
}

.c-price-range__track {
    position: absolute;
    left: 0;
    right: 0;
    top: 80%;
    height: 2px;
    margin-top: -1px;
    background: var(--cf-track);
    border-radius: 10px;
    z-index: 1;
}

.c-price-range__fill {
    position: absolute;
    top: 80%;
    left: 0;
    width: 0;
    height: 2px;
    margin-top: -1px;
    background: var(--cf-slider);
    border-radius: 10px;
    z-index: 2;
    pointer-events: none;
}

.c-price-range__handle {
    position: absolute;
    top: 80%;
    z-index: 3;
    transform: translate(-50%, -50%);
    /* В реальности цены большие: даём плашке расширяться по содержимому */
    width: auto;
    height: 20px;
    min-width: 33px;
    padding: 4px 8px;
    margin: 0;
    border: 1px solid var(--cf-track);
    border-radius: 5px;
    background: #f3f3f3;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
    font-family: inherit;
    font-size: 10px;
    font-weight: 400;
    line-height: 12px;
    color: var(--cf-text);
    white-space: nowrap;
    cursor: grab;
    touch-action: none;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
    box-sizing: border-box;
}

.c-price-range__handle:hover {
    border-color: #b8b8b8;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.c-price-range__handle:active {
    cursor: grabbing;
    border-color: var(--cf-slider);
    box-shadow: 0 2px 8px rgba(82, 187, 177, 0.35);
}

/* ——— Чекбоксы ——— */
.c-catalog-filter__options {
    list-style: none;
    margin: 0;
    padding: 0;
}

.c-catalog-filter__option + .c-catalog-filter__option {
    margin-top: 6px;
}

.c-catalog-filter__option.is-hidden {
    display: none;
}

.c-catalog-filter__check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    line-height: 20px;
    color: #121212;
    letter-spacing: 0.78px;
    font-weight: 400;
    margin: 0;
    padding: 0 !important;
    justify-content: flex-start;
    text-align: left;
    position: relative;
}

.c-catalog-filter__check-label {
    font-weight: 400 !important;
    letter-spacing: 0.78px;
    color: #121212;
}

/* Подпункты: убираем лишний визуальный левый отступ, чтобы было как в макете */
.c-catalog-filter__check-box {
    margin-left: 0;
}

.c-catalog-filter__options {
    padding-left: 0 !important;
}

/* жёстко убираем любые отступы слева у подпунктов (тема может добавлять) */
.l-section--catalog-filter .c-catalog-filter__group-body,
.l-section--catalog-filter .c-catalog-filter__options,
.l-section--catalog-filter .c-catalog-filter__option,
.l-section--catalog-filter .c-catalog-filter__check {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.c-catalog-filter__check-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

/* глушим дефолтные ::after у темы для checkbox */
.l-section--catalog-filter .c-catalog-filter__check-input[type="checkbox"] {
    /* Тема глобально стилизует input[type=checkbox] (position:relative !important и т.д.)
       — здесь жёстко нейтрализуем, иначе текст “уезжает” */
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 1px !important;
    height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    display: block !important;
    align-items: unset !important;
    justify-content: unset !important;
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
    color: inherit !important;
    background: transparent !important;
    box-shadow: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    outline: none !important;
    cursor: pointer;
}

.l-section--catalog-filter .c-catalog-filter__check-input[type="checkbox"]:after {
    display: none !important;
    content: none !important;
}

.c-catalog-filter__check-box {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    border: 1px solid #bdbdbd;
    border-radius: 1px;
    background: #fff;
}

/* Чтобы подпункты не “уезжали”: чекбокс фиксируем у левого края, текст — после него */
.l-section--catalog-filter .c-catalog-filter__check {
    padding-left: 0 !important;
}

.l-section--catalog-filter .c-catalog-filter__check-box {
    position: absolute;
    left: 0;
    top: 0;
}

.l-section--catalog-filter .c-catalog-filter__check-label {
    display: block;
    /* Текст сразу после квадрата (как в макете) */
    padding-left: 24px;
    text-align: left;
    width: 100%;
}

.c-catalog-filter__check-input:checked + .c-catalog-filter__check-box {
    background: #fff;
    border-color: #bdbdbd;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath fill='none' stroke='%2352bbb1' stroke-width='1.7' d='M1 5l3 3 7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px 8px;
}

.c-catalog-filter__more {
    display: inline-block;
    margin-top: 12px;
    padding: 0;
    border: none;
    background: none;
    font-size: 13px;
    color: var(--cf-slider);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.c-catalog-filter__more.is-expanded {
    display: none;
}

/* Сброс стилей темы внутри сайдбара */
.l-section--catalog-filter .c-shop-sidebar__content--desktop-filter .widget,
.l-section--catalog-filter .c-catalog-filter .widget {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.l-section--catalog-filter .c-catalog-filter__group,
.l-section--catalog-filter .c-catalog-filter__group-head,
.l-section--catalog-filter .c-catalog-filter__card .block {
    border-top: none !important;
    border-bottom: none !important;
}

/* Layout */
@media (min-width: 1190px) {
    .l-section--catalog-filter .l-section__sidebar {
        /* Шире и ближе к каталогу */
        flex: 0 0 260px;
        width: 260px;
        margin-right: 18px;
        margin-top: 0;
    }

    /* Тема задаёт .l-section__sidebar--left { order:3; margin-top:70px; } — ломает макет.
       Для каталога фиксируем порядок и убираем верхний отступ, чтобы фильтр начинался вровень с товарами. */
    .l-section--catalog-filter .l-section__sidebar--left {
        order: 0;
        margin-top: 0;
    }

    .l-section--catalog-filter .l-section__content--with-sidebar {
        order: 1;
        margin-top: 0;
    }
    
    .l-section--catalog-filter .l-section__content--with-sidebar {
        margin-top: 0;
    }

    .l-section--catalog-filter .c-shop-sidebar--desktop-filter .c-shop-sidebar__wrap,
    .l-section--catalog-filter .c-shop-sidebar--desktop-filter.c-shop-sidebar--active .c-shop-sidebar__wrap,
    .l-section--catalog-filter .c-shop-sidebar--desktop-filter .c-shop-sidebar__wrap--active {
        background: transparent !important;
        padding: 0 !important;
    }
}

@media (max-width: 1189px) {
    .l-section--catalog-filter .cus-catalog-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }

    .c-catalog-topbar {
        flex-direction: column;
        gap: 12px;
    }

    .c-catalog-topbar__sort {
        width: 100%;
        flex: 0 0 auto;
    }

    .c-catalog-topbar__mobile-filter {
        display: inline-flex;
        align-self: flex-end;
    }
}

@media (max-width: 1189px) {
    .l-section--catalog-filter .c-shop-sidebar--desktop-filter .c-shop-sidebar__wrap {
        background: var(--cf-bg) !important;
        padding: 28px 20px 36px !important;
    }

    .c-price-range__rail {
        margin-left: 20px;
        margin-right: 20px;
    }
}

@media (max-width: 767px) {
    .l-section--catalog-filter {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .l-section--catalog-filter .l-section__content--with-sidebar {
        width: 100%;
    }

    .c-catalog-mobile-controls {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 24px;
        margin: 28px 30px 28px;
        font-family: 'Liberation Sans', Arial, sans-serif;
    }

    .c-catalog-mobile-sort {
        position: relative;
        flex: 1 1 auto;
    }

    .c-catalog-mobile-controls__button {
        display: inline-flex;
        align-items: center;
        gap: 12px;
        padding: 0;
        border: none;
        background: transparent;
        color: #121212;
        font-size: 18px;
        font-weight: 700;
        line-height: 22px;
        letter-spacing: 0.78px;
        text-transform: uppercase;
        list-style: none;
        cursor: pointer;
    }

    .c-catalog-mobile-sort .c-catalog-filter__sort-select {
        position: absolute;
        inset: 0 auto auto 0;
        z-index: 2;
        width: 230px !important;
        height: 32px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        background: transparent !important;
        opacity: 0;
        cursor: pointer;
    }

    .c-catalog-mobile-filter-button .c-catalog-filter__chevron {
        transform: rotate(-45deg);
        margin-top: 0;
    }

    .c-catalog-mobile-sort__body {
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        z-index: 20;
        width: 220px;
        padding: 12px;
        background: #ffffff;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    }

    .c-catalog-mobile-sort__body .c-catalog-filter__sort-select {
        width: 100% !important;
        border: none !important;
        background: transparent !important;
        font-size: 13px !important;
        text-transform: uppercase;
    }

    .l-section--catalog-filter .c-shop-sidebar--desktop-filter {
        position: fixed !important;
        inset: 0 !important;
        z-index: 10000 !important;
        width: 100vw !important;
        height: 100dvh !important;
        max-height: none !important;
        margin: 0 !important;
        padding: 0 !important;
        background: rgba(242, 242, 242, 0.96) !important;
        transform: none !important;
        overflow: hidden !important;
    }

    .l-section--catalog-filter .c-shop-sidebar--desktop-filter:not(.c-shop-sidebar--active) {
        visibility: hidden;
        pointer-events: none;
    }

    .l-section--catalog-filter .c-shop-sidebar--desktop-filter.c-shop-sidebar--active {
        visibility: visible;
        pointer-events: auto;
    }

    .l-section--catalog-filter .c-shop-sidebar--desktop-filter .c-shop-sidebar__wrap,
    .l-section--catalog-filter .c-shop-sidebar--desktop-filter .c-shop-sidebar__wrap--active,
    .l-section--catalog-filter .c-shop-sidebar--desktop-filter.c-shop-sidebar--active .c-shop-sidebar__wrap {
        width: 100vw !important;
        height: 100dvh !important;
        max-width: none !important;
        max-height: none !important;
        padding: 64px 22px 28px !important;
        background: transparent !important;
        transform: none !important;
        overflow: hidden !important;
    }

    .l-section--catalog-filter .c-shop-sidebar__buttons {
        display: block !important;
        position: absolute !important;
        top: 20px !important;
        right: 24px !important;
        z-index: 4 !important;
    }

    .l-section--catalog-filter .c-shop-sidebar__close {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        color: #121212;
        font-size: 26px;
    }

    .l-section--catalog-filter .c-shop-sidebar__content--desktop-filter {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        overflow: visible !important;
    }

    .l-section--catalog-filter .c-catalog-filter {
        width: 100%;
        height: 100%;
        gap: 0;
    }

    .l-section--catalog-filter .c-catalog-filter > .c-catalog-filter__sort {
        display: none;
    }

    .l-section--catalog-filter .cus-catalog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .l-section--catalog-filter .c-catalog-filter__card {
        width: 100%;
        height: 100%;
        padding: 24px 22px 40px;
    }

    .l-section--catalog-filter .c-catalog-filter__groups,
    .l-section--catalog-filter .c-catalog-filter__group-body,
    .l-section--catalog-filter .c-catalog-filter__group-body--price .c-price-range,
    .l-section--catalog-filter .c-price-range__rail {
        width: 100%;
    }

    .l-section--catalog-filter .c-catalog-filter__groups {
        height: calc(100% - 48px);
        padding-right: 12px;
    }

    .l-section--catalog-filter .c-catalog-filter__scrollbar {
        right: 8px;
    }

    .c-catalog-active-filters-slot {
        margin: 0 30px;
    }
}

@media (max-width: 575px) {
    .l-section--catalog-filter .cus-catalog-grid {
        grid-template-columns: 1fr;
        width: auto !important;
        margin-left: 34px !important;
        margin-right: 34px !important;
    }

    .l-section--catalog-filter .c-catalog-active-filters-slot {
        margin-left: 34px !important;
        margin-right: 34px !important;
    }
}

/* ======= Figma Frame 70 container ======= */
.l-section--catalog-filter .c-shop-sidebar__content--desktop-filter {
    /* чтобы не мешали absolute из темы */
    position: static !important;
}

.l-section--catalog-filter .c-catalog-filter {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 260px;
    gap: 24px;
    background: transparent;
}

.l-section--catalog-filter .c-catalog-filter__sort {
    width: 260px;
    margin: 0;
}

.l-section--catalog-filter .c-catalog-filter__sort-body {
    padding-top: 0;
}

.l-section--catalog-filter .c-catalog-filter__sort-select {
    width: 228px !important;
}

.l-section--catalog-filter .c-catalog-filter > .c-catalog-filter__sort .c-catalog-filter__sort-select {
    width: 170px !important;
}

.l-section--catalog-filter .c-catalog-filter__card {
    /* Frame 70: белый квадрат */
    width: 260px;
    height: 620px;
    padding: 16px 16px 64px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    overflow: hidden;
    position: relative;
}

.l-section--catalog-filter .c-catalog-filter__scrollbar {
    display: none;
    position: absolute;
    top: 0;
    right: 6px;
    width: 2px;
    min-height: 40px;
    background: var(--cf-slider);
    border-radius: 999px;
    pointer-events: none;
    z-index: 3;
}

.l-section--catalog-filter .c-catalog-filter__card.is-scrollable .c-catalog-filter__scrollbar {
    display: block;
}

.l-section--catalog-filter .c-catalog-filter__sort-head {
    justify-content: flex-start;
    gap: 14px;
}


.l-section--catalog-filter .c-catalog-filter__groups {
    width: 228px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: calc(100% - 42px);
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.l-section--catalog-filter .c-catalog-filter__groups::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
}

.l-section--catalog-filter .c-catalog-filter__groups::-webkit-scrollbar-track {
    background: transparent;
}

.l-section--catalog-filter .c-catalog-filter__groups::-webkit-scrollbar-thumb {
    background: transparent;
}

.l-section--catalog-filter .c-catalog-filter__groups::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

/* Текстовые блоки макета */
.l-section--catalog-filter .c-catalog-filter__card-title,
.l-section--catalog-filter .c-catalog-filter__sort-title,
.l-section--catalog-filter .c-catalog-filter__group-head {
    height: 18px;
    display: flex;
    align-items: center;
}

.l-section--catalog-filter .c-catalog-filter__group-body--price .c-price-range {
    width: 228px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.l-section--catalog-filter .c-price-range__rail {
    width: 228px;
}

/* Синие/бирюзовые полосы прокрутки как в макете */
.l-section--catalog-filter .c-catalog-filter__group-body {
    width: 228px;
}

.l-section--catalog-filter .c-catalog-filter__options {
    max-height: none;
    overflow: visible;
}

/* Фикс отступов у вложенных списков (тема добавляет padding-left) */
.l-section--catalog-filter .c-catalog-filter__options {
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.l-section--catalog-filter .c-catalog-filter__option {
    margin: 0 !important;
    padding: 0 !important;
}

.l-section--catalog-filter .c-catalog-filter__option + .c-catalog-filter__option {
    margin-top: 6px !important;
}

/* Чтобы содержимое раскрытия не “прыгало” */
.l-section--catalog-filter .c-catalog-filter__group-body {
    margin-top: 6px;
}

/* Ползунок: выделяем вертикальный размер как в макете (50px блок) */
.l-section--catalog-filter .c-price-range {
    min-height: 50px;
}

@media (max-width: 767px) {
    .l-section--catalog-filter .c-shop-sidebar--desktop-filter {
        position: fixed !important;
        inset: 0 !important;
        z-index: 10000 !important;
        width: 100vw !important;
        height: 100dvh !important;
        max-height: none !important;
        margin: 0 !important;
        padding: 0 !important;
        background: rgba(242, 242, 242, 0.96) !important;
        transform: none !important;
        overflow: hidden !important;
    }

    .l-section--catalog-filter .c-shop-sidebar--desktop-filter .c-shop-sidebar__wrap,
    .l-section--catalog-filter .c-shop-sidebar--desktop-filter .c-shop-sidebar__wrap--active,
    .l-section--catalog-filter .c-shop-sidebar--desktop-filter.c-shop-sidebar--active .c-shop-sidebar__wrap {
        width: 100vw !important;
        height: 100dvh !important;
        max-width: none !important;
        max-height: none !important;
        padding: 64px 22px 28px !important;
        background: transparent !important;
        transform: none !important;
        overflow: hidden !important;
    }

    .l-section--catalog-filter .c-catalog-filter {
        width: 100% !important;
        height: 100% !important;
        gap: 0 !important;
    }

    .l-section--catalog-filter .c-catalog-filter > .c-catalog-filter__sort {
        display: none !important;
    }

    .l-section--catalog-filter .c-catalog-filter__card {
        width: 100% !important;
        height: 100% !important;
        padding: 24px 22px 40px !important;
    }

    .l-section--catalog-filter .c-catalog-filter__groups,
    .l-section--catalog-filter .c-catalog-filter__group-body,
    .l-section--catalog-filter .c-catalog-filter__group-body--price .c-price-range,
    .l-section--catalog-filter .c-price-range__rail {
        width: 100% !important;
    }

    .l-section--catalog-filter .c-price-range__rail {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .l-section--catalog-filter .c-catalog-filter__groups {
        height: calc(100% - 48px) !important;
        padding-right: 12px !important;
    }
}

