/* Sticky left filters + sticky search (AP / wheels / oils / boards) */
/*
 * Sticky ломается, если html/body или обёртки — scrollport с overflow ≠ visible.
 * Bitrix часто ставит overflow-x:hidden на html/body.
 */
/* html — единственный scrollport; body без overflow, иначе sticky «уезжает» вместе со страницей */
html.mp-sf-html {
    overflow-x: clip;
    overflow-y: auto;
}
body.mp-sf-active {
    overflow: visible !important;
}
body.mp-sf-active .form-size-container,
body.mp-sf-active .container-page,
body.mp-sf-active .new-container.td-wizard-shell,
body.mp-sf-active .wrap.td-wizard-wrap,
body.mp-sf-active .ap-home-wrap,
body.mp-sf-active .workarea,
body.mp-sf-active #workarea,
body.mp-sf-active .page-wrapper,
body.mp-sf-active .content-wrapper,
body.mp-sf-active .bx-wrapper,
body.mp-sf-active main,
body.mp-sf-active .main {
    overflow: visible !important;
    transform: none !important;
    filter: none !important;
    contain: none !important;
    perspective: none !important;
}
.mp-sf {
    --mp-sf-sidebar-w: 280px;
    --mp-sf-gap: 16px;
    --mp-sf-sticky-top: 120px;
    display: grid;
    grid-template-columns: var(--mp-sf-sidebar-w) minmax(0, 1fr);
    gap: var(--mp-sf-gap);
    align-items: start;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 24px;
}
.mp-sf__backdrop {
    display: none;
}
/* Колонка сайдбара в grid — место не схлопывается при position:fixed */
.mp-sf__sidebar-col {
    min-width: 0;
    align-self: start;
}
@media (min-width: 901px) {
    .mp-sf__sidebar {
        position: sticky;
        top: var(--mp-sf-sticky-top);
        /* JS переводит в fixed у футера; fallback sticky */
        max-height: calc(100vh - var(--mp-sf-sticky-top) - 14px);
        max-height: calc(100dvh - var(--mp-sf-sticky-top) - 14px);
        display: flex;
        flex-direction: column;
        overflow: hidden; /* скролл только в .mp-sf__sidebar-scroll */
        overscroll-behavior: contain;
        background: #fff;
        border: 1px solid #dde3ea;
        border-radius: 12px;
        padding: 10px 10px 0;
        box-sizing: border-box;
        /* Выше карточек/корзин (z-index до ~30), ниже модалок */
        z-index: 40;
        align-self: start;
        transition: border-radius 0.7s ease;
    }
    .mp-sf__sidebar.is-fixed {
        position: fixed !important;
        margin: 0;
    }
    /* С загрузки: выше контента, не скроллится со страницей (JS pin). */
    .mp-sf__sidebar.is-detached {
        z-index: 54;
    }
    .mp-sf__sticky-search {
        position: sticky;
        top: var(--mp-sf-sticky-top);
        z-index: 50;
        background: #fff;
        border: 1px solid #dde3ea;
        border-radius: 12px;
        padding: 8px 10px;
        box-shadow: 0 1px 2px rgba(53, 52, 51, 0.06);
        transition: border-radius 0.7s ease, box-shadow 0.12s ease;
    }
    .mp-sf__sticky-search.is-detached {
        position: fixed !important;
        z-index: 55;
        margin: 0;
        max-width: none;
        box-sizing: border-box;
        will-change: left, width, top;
    }
    /* В полосе хедера: top/left/width только inline (JS/jQuery.animate).
       Не ставить top:!important — иначе вертикаль не анимируется. */
    .mp-sf__sticky-search.is-header-dock {
        position: fixed !important;
        z-index: 9999 !important;
        border-radius: 10px;
        box-shadow: 0 2px 12px rgba(15, 23, 42, 0.12);
        margin: 0;
        max-width: none;
        box-sizing: border-box;
        will-change: left, width, top;
    }
    .mp-sf__sticky-search-ph.is-active {
        display: block;
        width: 100%;
        flex: 0 0 auto;
        visibility: hidden;
        pointer-events: none;
    }
}
.mp-sf__sticky-search-ph {
    display: none;
}
/* Base (non-sticky) sidebar look for mobile before MQ drawer rules */
.mp-sf__sidebar {
    background: #fff;
    border: 1px solid #dde3ea;
    border-radius: 12px;
    padding: 10px 10px 12px;
    box-sizing: border-box;
    z-index: 40;
    align-self: start;
    font-weight: 400;
}
/* Chrome «мажет» вес — весь сайдбар строго 400, без bold/semibold. */
.mp-sf__sidebar,
.mp-sf__sidebar *,
.mp-sf__sidebar .mp-sf-chip,
.mp-sf__sidebar .mp-sf-chip.is-active,
.mp-sf__sidebar .mp-sf-chip.is-open,
.mp-sf__sidebar .ap-home-field label,
.mp-sf__sidebar .btn,
.mp-sf__sidebar button,
.mp-sf__sidebar a,
.mp-sf__sidebar select,
.mp-sf__sidebar input,
.mp-sf__sidebar .select2-selection__rendered,
.mp-sf__sidebar .select2-selection__choice {
    font-weight: 400 !important;
}
/* Заголовки секций — bar #f3f3f3, вес строго 400. */
.mp-sf__sidebar .mp-sf-switches__title,
.mp-sf__sidebar .mp-sf-boards-panel__title,
.mp-sf__sidebar .sf2-title,
.mp-sf__sidebar .ap-home-cat-plates__title {
    font-weight: 400 !important;
}
.mp-sf__sidebar-head {
    display: none;
}
.mp-sf__sidebar-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    gap: 0;
    overflow: hidden; /* скролл в .mp-sf__sidebar-scroll; футер pinned */
}
/* Legacy: контент прямо в body без scroll-обёртки */
.mp-sf__sidebar-body:not(:has(> .mp-sf__sidebar-scroll)) {
    overflow: auto;
    overscroll-behavior: contain;
}
.mp-sf__sidebar-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding-bottom: 8px;
}
.mp-sf__sidebar-footer,
.mp-sf__sidebar .mp-sf__sidebar-footer {
    flex: 0 0 auto;
    margin-top: 0;
    margin-left: -10px;
    margin-right: -10px;
    margin-bottom: 0;
    padding: 10px 10px 12px;
    border-top: 1px solid #eef1f4;
    background: #fff;
    border-radius: 0 0 12px 12px;
}
.mp-sf__main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.mp-sf__sticky-search {
    background: #fff;
    border: 1px solid #dde3ea;
    border-radius: 12px;
    padding: 8px 10px;
    box-shadow: 0 1px 2px rgba(53, 52, 51, 0.06);
    z-index: 50;
}
/* Пока прилипли к хедеру — без верхнего скругления.
 * Без .is-stuck / после возврата на место — снова 12px (см. базовый .mp-sf__sidebar). */
@media (min-width: 901px) {
    .mp-sf__sidebar.is-stuck {
        border-top-left-radius: 0 !important;
        border-top-right-radius: 0 !important;
    }
    .mp-sf__sidebar:not(.is-stuck) {
        border-radius: 12px;
    }
    .mp-sf__sticky-search.is-stuck:not(.is-header-dock) {
        border-top-left-radius: 0 !important;
        border-top-right-radius: 0 !important;
    }
    .mp-sf__sticky-search:not(.is-stuck):not(.is-header-dock) {
        border-radius: 12px;
    }
}
.mp-sf__sticky-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}
.mp-sf__sticky-q {
    flex: 1 1 auto;
    min-width: 0;
    height: 40px;
    border: 1px solid #d5dadc;
    border-radius: 8px;
    padding: 0 12px;
    font: inherit;
    font-size: 14px;
    box-sizing: border-box;
}
.mp-sf__sticky-q::-webkit-search-decoration {
    -webkit-appearance: none;
}
.mp-sf__sticky-q::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    background: center / 14px 14px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 4l8 8M12 4L4 12' stroke='%23E23737' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}
.mp-sf__sticky-search--suggest {
    position: relative;
}
.mp-sf-suggest {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 40;
    max-height: min(320px, 50vh);
    overflow: auto;
    margin: 0;
    padding: 6px 0;
    background: #fff;
    border: 1px solid #dde3ea;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(35, 32, 30, 0.12);
}
.mp-sf-suggest__item {
    display: block;
    width: 100%;
    margin: 0;
    padding: 10px 14px;
    border: 0;
    background: transparent;
    text-align: left;
    font: inherit;
    font-size: 14px;
    color: #353433;
    cursor: pointer;
}
.mp-sf-suggest__item:hover,
.mp-sf-suggest__item.is-active {
    background: #f3f6f9;
}
.mp-sf-suggest__item b {
    font-weight: 600;
    color: #1f1c1a;
}
.mp-sf__sticky-summary {
    flex: 1 1 auto;
    min-width: 0;
    font-family: Inter-Medium, sans-serif;
    font-size: 15px;
    line-height: 1.35;
    color: #353433;
}
/* WM: невидимый якорь для dock-анимации сайдбара (без поля поиска) */
.mp-sf__sticky-search.mp-sf__sticky-search--ghost {
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    overflow: hidden !important;
    visibility: hidden;
    pointer-events: none;
}
.mp-sf__sticky-search.mp-sf__sticky-search--ghost.is-header-dock,
.mp-sf__sticky-search.mp-sf__sticky-search--ghost.is-detached {
    /* в доке тоже без визуала — анимируется только сайдбар через pullSidebarWithSearch */
    opacity: 0;
    visibility: hidden;
}
/* WM: доп. чипы типоразмера без sticky-полосы поиска */
.mp-sf__sticky-extra {
    margin: 0 0 12px;
}
/* WM: открытие фильтров только на мобилке (на desktop сайдбар всегда виден) */
.mp-sf__mobile-filters {
    display: none;
}
.mp-sf__sticky-submit.btn {
    flex: 0 0 auto;
    min-height: 40px;
    height: 40px;
    padding: 0 16px;
    margin: 0;
    white-space: nowrap;
}
.mp-sf__filter-icon {
    display: none;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    background: #fff;
    color: #353433;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}
.mp-sf__filter-icon:hover {
    border-color: #E23737;
    color: #E23737;
}
.mp-sf__content {
    min-width: 0;
}

/* Switches */
.mp-sf-switches {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 8px;
    padding: 0 0 8px;
    border-bottom: 1px solid #eef1f4;
}
.mp-sf-switches__title,
.mp-sf-boards-panel__title,
.mp-sf__sidebar .sf2-title,
.mp-sf__sidebar .ap-home-cat-plates__title,
body.td-parts-page .mp-sf__sidebar .ap-home-cat-plates__title,
.ap-home-cat-plates-flyout__title {
    display: block;
    box-sizing: border-box;
    padding: 3px 8px;
    margin: 5px 0 10px;
    background: #f3f3f3;
    font-family: Inter-Medium, sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.2;
    color: #43464d;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    text-align: left;
}
.mp-sf-switches__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.mp-sf-chip {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    margin: 4px 0 0 3px;
    padding: 2px 8px;
    border: 1px solid #d0d5dd;
    border-radius: 999px;
    background: #fff;
    color: #353433;
    text-decoration: none;
    font-size: 12px;
    line-height: 1.2;
    box-sizing: border-box;
}
.mp-sf-chip:hover {
    border-color: #E23737;
    color: #E23737;
}
.mp-sf-chip.is-active {
    border-color: #E23737;
    background: #fff5f5;
    color: #E23737;
    font-weight: 600;
}
button.mp-sf-chip {
    appearance: none;
    -webkit-appearance: none;
    margin: 4px 0 0 3px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.2;
    color: #353433;
    cursor: pointer;
}
.mp-sf-chip.is-open {
    border-color: #E23737;
    color: #E23737;
}
.mp-sf-switches__block--sections {
    position: relative;
}
.mp-sf-boards-panel {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eef1f4;
}
.mp-sf-boards-panel[hidden] {
    display: none !important;
}
/* Flyout «Прочее» — доп. список справа от чипа (desktop); на мобиле — под чипами */
.mp-sf-boards-panel--flyout {
    box-sizing: border-box;
}
@media (min-width: 901px) {
    .mp-sf-boards-panel--flyout {
        position: fixed;
        z-index: 10050;
        margin: 0;
        padding: 12px 14px;
        min-width: 240px;
        max-width: min(320px, calc(100vw - 24px));
        border: 1px solid #e9e3e3;
        border-radius: 12px;
        border-top: 1px solid #e9e3e3;
        background: #fff;
        box-shadow: 0 8px 28px rgba(26, 26, 26, 0.14);
    }
}
.mp-sf-boards-panel__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.mp-sf-flyout__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 4px;
}
.mp-sf-flyout__head .mp-sf-boards-panel__title,
.mp-sf-flyout__head .ap-home-cat-plates-flyout__title {
    flex: 1 1 auto;
    margin: 5px 0 10px;
    min-width: 0;
}
.mp-sf-flyout__close {
    flex: 0 0 auto;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0;
    border: 1px solid #e2dedb;
    border-radius: 8px;
    background: #fff;
    color: #43464d;
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
}
.mp-sf-flyout__close:hover {
    border-color: #E23737;
    color: #E23737;
}

/* Группировка полей формы: Автомобиль / Местоположение / Параметры */
.mp-sf__sidebar .sf2-section {
    margin: 0 0 12px;
    padding: 0 0 12px;
    border-bottom: 1px solid #eef1f4;
}
.mp-sf__sidebar .sf2-section--last {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}
.mp-sf__sidebar .sf2-fields {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.mp-sf__sidebar .sf2-section .ap-home-tool-chips,
.mp-sf__sidebar .sf2-section .ap-home-filter-actions--tools {
    margin: 0;
    padding: 0;
    border-bottom: 0;
}

/*
 * Селекты/select2 берут высоту из --ap-ctrl-* на .ap-home-search-panel (home_vitrine.css).
 * В сайдбаре только снимаем «карточку» панели и оставляем те же токены — без дублирования правил select.
 */
.mp-sf__sidebar .ap-home-search-panel {
    --ap-ctrl-h: 32px;
    --ap-ctrl-radius: 8px;
    --ap-ctrl-border: #d5dadc;
    --ap-ctrl-fs: 14px;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    width: 100%;
}
.mp-sf__sidebar .ap-home-search-panel,
.mp-sf__sidebar .ap-home-search-panel__form,
.mp-sf__sidebar .ap-home-search-grid,
.mp-sf__sidebar .ap-home-search-box,
.mp-sf__sidebar .ap-home-search-box__row,
.mp-sf__sidebar .ap-home-more-filters,
.mp-sf__sidebar .ap-home-more-filters__grid {
    flex: 0 0 auto !important;
    min-height: 0 !important;
    height: auto !important;
}
.mp-sf__sidebar .ap-home-search-panel__form {
    gap: 6px;
}
.mp-sf__sidebar .ap-home-search-grid,
.mp-sf__sidebar .ap-home-search-box__row,
.mp-sf__sidebar .wm-mode-toggle-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: stretch;
}
.mp-sf__sidebar .wm-mode-toggle {
    width: 100%;
}
.mp-sf__sidebar .ap-home-search-box {
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
}
.mp-sf__sidebar .ap-home-search-box__row .ap-home-field {
    flex: 0 0 auto !important;
    max-width: none !important;
    min-width: 0 !important;
}
.mp-sf__sidebar .ap-home-search-panel__title {
    display: none;
}
.mp-sf__sidebar .ap-home-search-panel__row--query {
    display: none; /* query lives in sticky bar */
}
.mp-sf__sidebar .ap-home-search-panel__row--vehicle {
    display: flex;
    flex-direction: column;
    gap: 6px;
    grid-template-columns: none;
}
.mp-sf__sidebar .ap-home-more-filters-btn {
    display: none !important;
}
.mp-sf__sidebar .ap-home-more-filters {
    display: flex !important;
    flex-direction: column;
    gap: 6px;
    padding: 0;
    border: none;
    background: transparent;
}
.mp-sf__sidebar .ap-home-more-filters__grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    grid-template-columns: none;
}
.mp-sf__sidebar .ap-home-more-filters__grid > .ap-home-field--city-compact,
.mp-sf__sidebar .ap-home-more-filters__grid > .ap-home-field--compact,
.mp-sf__sidebar .ap-home-more-filters__grid > .ap-home-field--seller {
    max-width: none;
    min-width: 0;
    width: 100%;
}
.mp-sf__sidebar .ap-home-field {
    width: 100%;
    flex: 0 0 auto !important;
    min-width: 0 !important;
    gap: 2px;
    margin: 10px 0 0;
}
.mp-sf__sidebar .ap-home-field label {
    display: block;
    margin: 0;
    font-size: 12px !important;
    line-height: 1.2;
    color: #667085;
}
/* Чипы сезона/шипов — <label>, не ломать inline-flex правилом выше */
.mp-sf__sidebar .ap-home-field label.wm-filter-chip:not([hidden]) {
    display: inline-flex;
    align-items: center;
    font-size: 14px !important;
    line-height: 1.2;
    color: #353433;
}
.mp-sf__sidebar .ap-home-field label.wm-filter-chip[hidden] {
    display: none !important;
}
.mp-sf__sidebar .ap-home-field select,
.mp-sf__sidebar .ap-home-field input[type="text"],
.mp-sf__sidebar .ap-home-oe-input {
    width: 100%;
    box-sizing: border-box;
}
.mp-sf__sidebar .ap-home-field--searchable .select2-container,
.mp-sf__sidebar .ap-home-field .select2-container {
    margin: 0 !important;
}
.mp-sf__sidebar .ap-home-oe-inline {
    margin-top: 4px;
    padding-top: 8px;
    gap: 6px;
}
.mp-sf__sidebar .ap-home-oe-inline__label {
    font-family: Inter-Medium, sans-serif;
    font-size: 14px !important;
    color: #353433;
}
.mp-sf__sidebar .ap-home-filter-actions--tools,
.mp-sf__sidebar .ap-home-tool-chips {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 4px;
    margin: 0 0 8px;
    padding: 0 0 8px;
    border-bottom: 1px solid #eef1f4;
}
.mp-sf__sidebar .ap-home-tool-chip {
    flex: 1 1 0;
    min-height: 26px;
    height: 26px;
    padding: 0 6px;
    font-size: 11px;
}
.mp-sf__sidebar .ap-home-filter-actions--footer {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 8px;
    justify-content: stretch;
}
.mp-sf__sidebar .ap-home-filter-actions--footer .btn,
.mp-sf__sidebar .ap-home-filter-actions--footer .ap-home-search-reset {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    text-align: center;
    justify-content: center;
    align-items: center;
    display: inline-flex;
    box-sizing: border-box;
    min-height: 42px !important;
    height: 42px !important;
    font-size: 15px;
    line-height: 1.2;
    white-space: normal;
}
/* Разделы/тип — над скроллом, не уезжают с футером */
.mp-sf__sidebar > .mp-sf-switches {
    flex: 0 0 auto;
    margin-bottom: 8px;
}

/* Category plates inside sidebar (AP) */
.mp-sf__sidebar .ap-home-cat-plates {
    margin: 0 0 8px;
    padding: 0 0 8px;
    border-bottom: 1px solid #eef1f4;
}
.mp-sf__sidebar .ap-home-cat-plates-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.mp-sf__sidebar .ap-home-cat-plate {
    max-width: 138px;
    min-height: 18px;
    padding: 3px 3px;
    font-size: 12px;
    border-radius: 8px;
}
/* L2 («Салон» / корни раздела): на всю ширину блока.
 * L2 лежит внутри --pills → нужна выше специфичность, чем у max-width: 165px. */
.mp-sf__sidebar .ap-home-cat-plates-l2 {
    box-sizing: border-box;
    width: 100%;
}
.mp-sf__sidebar .ap-home-cat-plates--pills .ap-home-cat-plates-grid--l2 {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 4px;
    width: 100%;
}
.mp-sf__sidebar .ap-home-cat-plates--pills .ap-home-cat-plates-grid--l2 > li {
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}
.mp-sf__sidebar .ap-home-cat-plates--pills .ap-home-cat-plates-grid--l2 .ap-home-cat-plate,
.mp-sf__sidebar .ap-home-cat-plates--pills .ap-home-cat-plates-grid--l2 .ap-home-cat-plate--section-all,
.mp-sf__sidebar .ap-home-cat-plates--pills .ap-home-cat-plates-grid--l2 .ap-home-cat-plate--all {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    width: 100% !important;
    max-width: none !important;
    min-height: 28px;
    height: auto !important;
    padding: 6px 10px;
    border-radius: 8px;
}
.mp-sf__sidebar .ap-home-cat-plates--pills .ap-home-cat-plates-grid--l2 .ap-home-cat-plate__label {
    flex: 1 1 auto;
    min-width: 0;
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
}
.mp-sf__sidebar .ap-home-cat-plates--pills .ap-home-cat-plate {
    display: flex;
    align-items: center;
    gap: 3px;
    box-sizing: border-box;
    height: 26px;
    min-height: 26px;
    max-width: 165px;
    padding: 3px 3px;
    border-radius: 999px;
    background: #f0f1f3;
    color: #353433;
    text-decoration: none;
    font-weight: 400;
    line-height: 1.2;
    font-size: 12px;
    border: 1px solid transparent;
    box-shadow: none;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.mp-sf__sidebar .ap-home-cat-plates--pills .ap-home-cat-plate.is-active {
    background: #fff;
    border: 1px solid rgb(226, 55, 55);
    color: #E23737;
}
.mp-sf__sidebar .ap-home-cat-plate__icon {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
}
.mp-sf__sidebar .ap-home-cat-plate__icon svg {
    width: 14px;
    height: 14px;
}
.mp-sf__sidebar .ap-home-cat-plate__label {
    margin: 0 2px 0 1px;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mp-sf__sidebar .ap-home-cat-plates__toggle {
    margin-top: 6px;
    width: 100%;
    justify-content: center;
}
.mp-sf__sidebar .ap-home-cat-plates[data-expanded="0"] .ap-home-cat-plates__toggle-less,
.mp-sf__sidebar .ap-home-cat-plates[data-expanded="1"] .ap-home-cat-plates__toggle-more {
    display: none;
}
.mp-sf__sidebar .ap-home-cat-plates[data-expanded="1"] .ap-home-cat-plates__toggle-less,
.mp-sf__sidebar .ap-home-cat-plates[data-expanded="0"] .ap-home-cat-plates__toggle-more {
    display: inline;
}
.ap-home-cat-plates-flyout[hidden] {
    display: none !important;
}
.ap-home-cat-plates-flyout {
    box-sizing: border-box;
    margin-top: 8px;
    padding: 12px 14px;
    border: 1px solid #e9e3e3;
    border-radius: 12px;
    background: #fff;
}
.ap-home-cat-plates-flyout__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.ap-home-cat-plates-flyout__grid .ap-home-cat-plate {
    max-width: none;
}
@media (min-width: 901px) {
    .ap-home-cat-plates-flyout {
        position: fixed;
        z-index: 10050;
        margin: 0;
        min-width: 260px;
        max-width: min(360px, calc(100vw - 24px));
        box-shadow: 0 8px 28px rgba(26, 26, 26, 0.14);
    }
}
.mp-sf__content .ap-home-feed-title:first-child {
    margin-top: 0;
}

/* Oils / boards toolbar in sidebar — колонка как ap-home-field (не горизонтальный ряд) */
.mp-sf__sidebar .om-feed-filters-panel,
.mp-sf__sidebar .om-feed-toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    width: 100%;
    min-width: 0;
}
.mp-sf__sidebar .om-feed-toolbar__filters {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap; /* иначе geo с flex-basis:100% уезжает во 2-ю колонку */
    align-items: stretch;
    gap: 10px;
    width: 100%;
    min-width: 0;
    flex: none;
}
.mp-sf__sidebar .om-feed-toolbar__brand,
.mp-sf__sidebar .om-feed-toolbar__seller,
.mp-sf__sidebar .om-feed-toolbar__geo,
.mp-sf__sidebar .om-feed-toolbar__availability {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    width: 100%;
    min-width: 0;
    margin: 0;
    flex: 0 0 auto; /* сбить home.css flex:1 1 100% у __geo */
}
.mp-sf__sidebar .om-feed-toolbar__brand > label,
.mp-sf__sidebar .om-feed-toolbar__seller > label,
.mp-sf__sidebar .om-feed-toolbar__availability > label {
    display: block;
    margin: 0;
    font-size: 12px !important;
    line-height: 1.2;
    color: #667085;
}
.mp-sf__sidebar .om-feed-toolbar__geo-fields {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    min-width: 0;
}
.mp-sf__sidebar .om-feed-toolbar__geo-field,
.mp-sf__sidebar .om-feed-toolbar__geo-field--availability,
.mp-sf__sidebar .om-feed-toolbar__geo-field--radius {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 2px;
    width: 100%;
    max-width: none;
    min-width: 0;
    flex: none;
    min-height: 0;
    font-size: 12px;
    color: #667085;
}
.mp-sf__sidebar .om-feed-toolbar__brand select,
.mp-sf__sidebar .om-feed-toolbar__brand .select2-container,
.mp-sf__sidebar .om-feed-toolbar__seller .select2-container,
.mp-sf__sidebar .om-feed-toolbar__seller select,
.mp-sf__sidebar .om-feed-toolbar__geo-field select,
.mp-sf__sidebar .om-feed-toolbar__geo-field .select2-container,
.mp-sf__sidebar .om-feed-toolbar__geo-field--availability select,
.mp-sf__sidebar .om-feed-toolbar__geo-field--radius select,
.mp-sf__sidebar .om-feed-toolbar__geo-field--radius .select2-container {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: none;
    box-sizing: border-box;
}
.mp-sf__sidebar .om-feed-toolbar__brand .select2-container,
.mp-sf__sidebar .om-feed-toolbar__seller .select2-container,
.mp-sf__sidebar .om-feed-toolbar__geo-field .select2-container {
    margin: 0 !important;
    display: block;
}
.mp-sf__sidebar .om-sort-bar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: 4px;
    width: 100%;
}
.mp-sf__sidebar .om-sort-bar__label {
    display: block;
    font-size: 12px;
    line-height: 1.2;
    color: #667085;
}
.mp-sf__sidebar .om-sort-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.om-search--sf-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.om-hero--sf {
    margin-bottom: 12px;
}
.om-hero--sf .om-search {
    display: none;
}

/* Hide legacy SERP filter bar when sticky layout is present */
.mp-sf ~ .ap-home-search-panel--serp-filter-bar,
.mp-sf .ap-home-search-panel--serp-filter-bar,
body.mp-sf-active .ap-home-search-panel--serp-filter-bar {
    display: none !important;
}

@media (max-width: 900px) {
    /* Без десктопных 0.7s на sticky (адаптив — только позиция) */
    .mp-sf__sidebar,
    .mp-sf__sticky-search {
        transition: none !important;
    }
    .mp-sf {
        --mp-sf-sticky-top: 50px;
        display: block;
        margin: 0 0 16px;
    }
    /* Сайдбар в оверлее — колонка fixed, из потока вынута */
    .mp-sf__sidebar-col {
        position: fixed;
        inset: 0;
        z-index: 10050;
        width: auto !important;
        min-height: 0 !important;
        height: auto;
        margin: 0;
        padding: 0;
        pointer-events: none;
    }
    .mp-sf.is-drawer-open .mp-sf__sidebar-col {
        pointer-events: auto;
    }
    .mp-sf__backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 10040;
        background: rgba(15, 23, 42, 0.45);
    }
    .mp-sf__backdrop[hidden] {
        display: none !important;
    }
    .mp-sf__sidebar {
        position: fixed !important;
        inset: 0 !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        max-width: none !important;
        max-height: none !important;
        height: 100% !important;
        height: 100dvh !important;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        z-index: 10050;
        border-radius: 0;
        border: 0;
        box-shadow: none;
        transform: translateY(105%);
        transition: transform 0.22s ease;
        padding: 0 12px;
        background: #fff;
        box-sizing: border-box;
    }
    .mp-sf.is-drawer-open .mp-sf__sidebar {
        transform: translateY(0);
    }
    .mp-sf__sidebar-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        flex: 0 0 auto;
        position: sticky;
        top: 0;
        z-index: 2;
        margin: 0 -12px 12px;
        padding: 12px 14px;
        padding-top: max(12px, env(safe-area-inset-top, 0px));
        background: #fff;
        border-bottom: 1px solid #eef1f4;
    }
    .mp-sf__sidebar-title {
        margin: 0;
        font-size: 2rem;
        font-weight: 700;
        line-height: 1.2;
        color: #1a1a1a;
    }
    /* Дубль «Запчасти / Шины/диски / …» — сверху уже есть Разделы */
    .mp-sf__sidebar .ks-mp-mobile-chips {
        display: none !important;
    }
    .mp-sf__sidebar-close {
        width: 36px;
        height: 36px;
        border: 0;
        border-radius: 8px;
        background: #f3f4f6;
        color: #353433;
        font-size: 24px;
        line-height: 1;
        cursor: pointer;
    }
    /*
     * Всегда fixed под хедером — до/после скролла одинаково (sticky в потоке
     * давал щель, а при stick «подтягивался» вверх).
     */
    .mp-sf__sticky-search:not(.mp-sf__sticky-search--ghost),
    .mp-sf__sticky-search:not(.mp-sf__sticky-search--ghost).is-stuck,
    .mp-sf__sticky-search:not(.mp-sf__sticky-search--ghost).is-detached,
    .mp-sf__sticky-search:not(.mp-sf__sticky-search--ghost).is-header-dock {
        position: fixed !important;
        top: 50px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: none !important;
        z-index: 1190; /* ниже .header (1200), выше контента */
        margin: 0 !important;
        /* Без правого «кармана» на весь блок — чипы типоразмеров на всю ширину.
         * Отступ под FAB только у строки поиска (.mp-sf__sticky-row). */
        padding: 8px !important;
        background: #fff;
        border: 1px solid #dde3ea;
        border-top: 0;
        border-radius: 0 0 12px 12px;
        box-shadow: 0 1px 2px rgba(53, 52, 51, 0.06);
        box-sizing: border-box;
        will-change: auto !important;
    }
    .mp-sf__sticky-search:not(.mp-sf__sticky-search--ghost) > .mp-sf__sticky-row {
        padding-right: 92px;
        box-sizing: border-box;
    }
    /* Место в потоке под fixed-бар (+ чипы); высоту пишет mp_sticky_filters.js */
    .mp-sf__main {
        padding-top: var(--mp-sf-sticky-h, 56px);
    }
    .mp-sf__sticky-search-ph {
        display: none !important;
    }
    .mp-sf__filter-icon {
        display: inline-flex;
    }
    .mp-sf__mobile-filters {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        margin: 0 0 10px;
        position: sticky;
        top: var(--mp-sf-sticky-top);
        z-index: 20;
    }
    .mp-sf__mobile-filters .mp-sf__filter-icon {
        display: inline-flex;
    }
    /* FAB cart/fav must not cover filter drawer close */
    body.mp-sf-drawer-open .wm-cart-fab,
    body.mp-sf-drawer-open .ap-fav-fab,
    body.mp-sf-drawer-open .ks-cart-fab,
    body.mp-sf-drawer-open [class*="cart-fab"],
    body.mp-sf-drawer-open [class*="fav-fab"] {
        visibility: hidden !important;
        pointer-events: none !important;
    }

    /*
     * Select2 (Регион / Наличие / марка…): dropdown на body с z-index ~1200
     * оказывался ПОД drawer (10050) — «тап ничего не делает».
     */
    body.mp-sf-drawer-open .select2-container--open,
    body.mp-sf-drawer-open .select2-dropdown {
        z-index: 11100 !important;
    }

    /*
     * Местоположение / Параметры: на мобилке adaptive прячет .ap-home-more-filters —
     * в drawer снова показываем (см. mp_supplies_adaptive.css).
     * Заголовки/лейблы 12px на телефоне слишком мелкие → 14px.
     */
    body.breakpoint-mobile .mp-sf__sidebar .ap-home-more-filters,
    body.breakpoint-mobile .mp-sf__sidebar .ap-home-more-filters__grid,
    .mp-sf__sidebar .ap-home-more-filters,
    .mp-sf__sidebar .ap-home-more-filters__grid {
        display: flex !important;
        flex-direction: column;
    }
    .mp-sf__sidebar .mp-sf-switches__title,
    .mp-sf__sidebar .mp-sf-boards-panel__title,
    .mp-sf__sidebar .sf2-title,
    .mp-sf__sidebar .ap-home-cat-plates__title {
        font-size: 14px !important;
        padding: 6px 10px;
    }
    .mp-sf__sidebar .ap-home-field label {
        font-size: 14px !important;
    }
    .mp-sf__sidebar .mp-sf-chip,
    .mp-sf__sidebar .ap-home-tool-chip {
        font-size: 14px;
        min-height: 32px;
    }
    .mp-sf__sidebar .ap-home-cat-plates--pills .ap-home-cat-plates-grid--l2 .ap-home-cat-plate__label,
    .mp-sf__sidebar .ap-home-cat-plate__label {
        font-size: 14px !important;
    }
}

/*
 * Карточка объявления: sticky+drawer только ≤900px.
 * Desktop — как раньше (крошки), без сетки сайдбара и без сдвига layout.
 */
@media (min-width: 901px) {
    .mp-sf.mp-sf--offer-mobile-only {
        display: block;
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        margin: 0;
    }
    .mp-sf.mp-sf--offer-mobile-only .mp-sf__sticky-search,
    .mp-sf.mp-sf--offer-mobile-only .mp-sf__sticky-search-ph,
    .mp-sf.mp-sf--offer-mobile-only .mp-sf__backdrop,
    .mp-sf.mp-sf--offer-mobile-only .mp-sf__sidebar,
    .mp-sf.mp-sf--offer-mobile-only .mp-sf__sidebar-col,
    .mp-sf.mp-sf--offer-mobile-only .mp-sf__mobile-filters {
        display: none !important;
    }
    .mp-sf.mp-sf--offer-mobile-only .mp-sf__main,
    .mp-sf.mp-sf--offer-mobile-only .mp-sf__content {
        margin: 0;
        padding: 0;
        width: 100%;
        max-width: none;
    }
}
@media (max-width: 900px) {
    .mp-sf.mp-sf--offer-mobile-only .mp-sf__content {
        padding-top: 4px;
    }
}
