/* ============================================================================
   APPLE CATALOG: фильтр подбора и блоки левой колонки
   Вынесено из user.css 11.08.2026: грузилось на каждой странице, а нужно только тут:
   страницы категорий — category.html (и search.html на всякий случай).
   Подключается из head.html по глобалу, который выставляет соответствующий шаблон.
   Порядок важен: файл идёт ПОСЛЕ user.css — как эта секция шла в исходном файле.
   ============================================================================ */

/* ==================== APPLE FILTERS (ПК-фильтр подбора, 05.08.2026) ==================== */
/* Липкая карточка-фильтр в левом сайдбаре: шапка со счётчиком и чипами активных значений,
   компактные секции (плитки вместо столбиков чекбоксов), сегменты для «да/нет»,
   блок «Ваш автомобиль», быстрые пресеты и липкая кнопка «Показать N».
   Класс html.ahf ставит скрипт APPLE FILTERS в header.html — т.е. только ПК-шаблон. */

/* --- колонка шире: 285 → 330 --- */
@media (min-width: 1200px) {
    html.ahf .content-columns__sidebar { max-width: 330px; }
    html.ahf .content-columns__content { max-width: calc(100% - 330px); flex-basis: calc(100% - 330px); }
}

/* --- карточка фильтра: липнет, скроллится внутри --- */
/* липнет сам блок-обёртка: у карточки высота = высоте обёртки, ей самой прилипать некуда,
   а .blocks — flex-колонка, поэтому нужен ещё align-self, иначе элемент растянут на всю колонку */
html.ahf .blocks__item_filters { margin-bottom: 20px; width: 100%; }
html.ahf .sidebar-block.sidebar-filters {
    background: #fff;
    border: 0 !important;
    border-radius: 24px;
    box-shadow: 0 10px 34px rgba(0, 0, 0, .08);
    padding: 0;
    /* без overflow: внутри липкие шапка и футер */
    isolation: isolate;
}
html.ahf .sidebar-filters .sidebar-block__content { margin: 0; padding: 0; }
html.ahf .sidebar-filters .filters__filters { padding: 4px 18px 8px; }
/* никаких внутренних скроллов — фильтр листается вместе со страницей */
html.ahf .sidebar-filters,
html.ahf .sidebar-filters .sidebar-block__content,
html.ahf .sidebar-filters .filters,
html.ahf .sidebar-filters .filters__form,
html.ahf .sidebar-filters .filters__filters,
html.ahf .sidebar-filters .filter__content,
html.ahf .sidebar-filters .filter__values {
    overflow: visible !important;
    max-height: none !important;
}

/* --- шапка «Фильтр подбора» --- */
html.ahf .sidebar-filters .sidebar-filters__header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 16px 18px 12px;
    background: #fff;
    border: 0 !important;
    font-size: 16.5px;
    font-weight: 700;
    color: #1d1d1f;
    letter-spacing: -.01em;
}
html.ahf .sidebar-filters .sidebar-filters__header > .icon-box:first-child {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
}
html.ahf .sidebar-filters .sidebar-filters__header .icon-box__content {
    display: flex !important;
    align-items: center;
    gap: 7px;
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
}
html.ahf .sidebar-filters .sidebar-filters__header .icon-box__icon { display: none; }
html.ahf .ahf-title { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* второй icon-box шапки — вендорный шеврон «свернуть», он тут не нужен */
html.ahf .sidebar-filters .sidebar-filters__header > .icon-box + .icon-box { display: none; }
/* счётчик выбранных значений */
html.ahf .ahf-count {
    display: none;
    flex: 0 0 auto;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 11px;
    background: #1d1d1f;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
}
html.ahf .ahf-on .ahf-count { display: inline-block; }
/* «Сбросить» в шапке */
html.ahf .ahf-clear {
    display: none;
    align-items: center;
    flex: 0 0 auto;
    border: 0;
    background: none;
    padding: 5px 4px 5px 6px;
    font-size: 12px;
    font-weight: 500;
    color: #6E6E73;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color .2s ease;
}
html.ahf .ahf-clear:hover { background: none; color: #1d1d1f; }
html.ahf .ahf-on .ahf-clear { display: inline-flex; }
/* узкая колонка (1024–1199px) — остаётся только крестик */


/* --- чипы активных значений (под шапкой, не скроллятся) --- */
html.ahf .ahf-chips {
    display: none;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 18px 12px;
    background: #fff;
}
html.ahf .ahf-on .ahf-chips { display: flex; }
html.ahf .ahf-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 5px 9px 5px 11px;
    border: 0;
    border-radius: 999px;
    background: #f0f0f3;
    color: #1d1d1f;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background .18s ease;
}
html.ahf .ahf-chip:hover { background: #e2e2e7; }
html.ahf .ahf-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.ahf .ahf-chip::after {
    content: "×";
    font-size: 15px;
    line-height: 1;
    color: #6E6E73;
    font-weight: 500;
}
html.ahf .ahf-chip:hover::after { color: #1d1d1f; }

/* --- блок «Ваш автомобиль» --- */
html.ahf .ahf-car {
    background: #f5f5f7;
    border-radius: 16px;
    padding: 12px;
    margin: 6px 0 14px;
}
html.ahf .ahf-car__title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 9px;
}
html.ahf .ahf-car__title svg { flex: 0 0 auto; }
html.ahf .ahf-car select {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 36px;
    margin-bottom: 6px;
    padding: 0 30px 0 11px;
    border: 0;
    border-radius: 10px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2386868b' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 11px center;
    font-size: 13.5px;
    font-weight: 500;
    color: #1d1d1f;
    cursor: pointer;
    text-overflow: ellipsis;
}
html.ahf .ahf-car select:disabled { color: #b0b0b6; cursor: default; background-color: #fafafa; }
html.ahf .ahf-car__go {
    width: 100%;
    height: 36px;
    margin-top: 2px;
    border: 0;
    border-radius: 10px;
    background: #1d1d1f;
    color: #fff;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s ease;
}
html.ahf .ahf-car__go:disabled { opacity: .35; cursor: default; }
html.ahf .ahf-car__go:not(:disabled):hover { opacity: .85; }

/* --- быстрые пресеты --- */
html.ahf .ahf-presets { margin: 0 0 14px; }
html.ahf .ahf-presets__title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #6E6E73;
    margin-bottom: 8px;
}
html.ahf .ahf-presets__list { display: flex; flex-wrap: wrap; gap: 6px; }
html.ahf .ahf-preset {
    padding: 6px 11px;
    border: 1px solid #e6e6eb;
    border-radius: 999px;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    color: #1d1d1f;
    cursor: pointer;
    transition: all .18s ease;
}
html.ahf .ahf-preset:hover { border-color: #1d1d1f; }
html.ahf .ahf-preset_on { background: #1d1d1f; border-color: #1d1d1f; color: #fff; }

/* --- секции фильтра --- */
html.ahf .filters__filter { border: 0 !important; }
html.ahf .filters__filter + .filters__filter { border-top: 1px solid #f0f0f2 !important; }
html.ahf .filters__filter .filter { border: 0 !important; padding: 0; margin: 0; }
html.ahf .filter__header {
    display: flex;
    align-items: center;
    padding: 13px 0 11px;
    margin: 0;
    cursor: pointer;
}
html.ahf .filter__header .icon-box { width: 100%; display: flex; align-items: center; gap: 6px; }
html.ahf .filter__name {
    font-size: 13.5px !important;
    font-weight: 600 !important;
    color: #1d1d1f !important;
    letter-spacing: -.005em;
}
html.ahf .filter__count {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #1d1d1f;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}
html.ahf .filter__count:empty { display: none; }
html.ahf .filter__header .icon-box__icon { margin-left: auto; transition: transform .2s ease; opacity: .5; }
html.ahf .filter__header .icon-box__icon svg { transform: none !important; }
html.ahf .filter.accordion-block_open > .filter__header .icon-box__icon { transform: rotate(180deg); }
html.ahf .filter__content { padding: 0 0 12px; }

/* --- поиск значения внутри секции --- */
html.ahf .filter__search { margin: 0 0 8px; position: relative; }
html.ahf .filter__search-field {
    height: 34px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: #f5f5f7 !important;
    padding: 0 32px 0 11px !important;
    font-size: 13px !important;
    color: #1d1d1f;
}
html.ahf .filter__search-field::placeholder { color: #6E6E73; }
html.ahf .filter__search-icon, html.ahf .filter__clear-search { opacity: .45; }

/* --- список значений (чекбоксы) --- */
html.ahf .filter__values { max-height: none !important; overflow: visible !important; }
html.ahf .filter__value { margin: 0 !important; padding: 0 !important; border: 0 !important; }
html.ahf .filter__value .checkbox { display: flex; align-items: center; gap: 9px; padding: 5px 0; cursor: pointer; }
html.ahf .filter__value .checkbox__mark {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border: 1.5px solid #d2d2d7;
    border-radius: 6px;
    background: #fff;
    transition: all .15s ease;
}
html.ahf .filter__value .checkbox__control:checked + .checkbox__mark {
    background: #1d1d1f url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='9' viewBox='0 0 11 9'%3E%3Cpath d='M1 4.6L4 7.5 10 1.2' stroke='%23fff' stroke-width='1.9' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
    border-color: #1d1d1f;
}
html.ahf .filter__value .checkbox__label { font-size: 13.5px; color: #1d1d1f; line-height: 1.3; }
html.ahf .filter__value_selected .checkbox__label { font-weight: 600; }
html.ahf .filter__value:hover .checkbox__mark { border-color: #6E6E73; }
html.ahf .filter__value_disabled { opacity: 1; }
html.ahf .filter__value_disabled .checkbox { background: #fbfbfc; }
html.ahf .filter__value_disabled .checkbox__label,
html.ahf .filter__value_disabled .sf-label-disabled { color: #9a9aa1 !important; }
html.ahf .filter__value_disabled .checkbox__mark { border-color: #e6e6eb; }
html.ahf .filter.ahf-grid .filter__value_disabled .checkbox { background: #fbfbfc; box-shadow: inset 0 0 0 1px #f0f0f3; }
html.ahf .filter.ahf-grid .filter__value_disabled .checkbox:hover { background: #fbfbfc; }

/* --- плиточные значения (короткие: память, диагональ, год, разрешение, Android) --- */
html.ahf .filter.ahf-grid .filter__values {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 6px;
}
/* совсем короткие подписи (годы, «9\"», «8Gb») — 4 колонки */
html.ahf .filter.ahf-grid_tight .filter__values { grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); }
html.ahf .filter.ahf-grid_wide .filter__values { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
/* длинные подписи (например «Android 13 (Teyes OS)») — плитка во всю ширину, текст слева */
html.ahf .filter.ahf-grid_full .filter__values { grid-template-columns: 1fr; }
html.ahf .filter.ahf-grid_full .filter__value .checkbox { justify-content: flex-start; padding: 0 12px; }
html.ahf .filter.ahf-grid_full .filter__value .checkbox__label { text-align: left; }
html.ahf .filter.ahf-grid .filter__value .checkbox {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    height: 34px;
    padding: 0 6px;
    border-radius: 10px;
    background: #f5f5f7;
    transition: all .16s ease;
}
html.ahf .filter.ahf-grid .filter__value .checkbox:hover { background: #e8e8ed; }
html.ahf .filter.ahf-grid .filter__value .checkbox__mark { display: none; }
html.ahf .filter.ahf-grid .filter__value .checkbox__label {
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
html.ahf .filter.ahf-grid .filter__value_selected .checkbox { background: #1d1d1f; }
html.ahf .filter.ahf-grid .filter__value_selected .checkbox__label { color: #fff; }
html.ahf .filter.ahf-grid .filter__value_hidden { display: none; }

/* --- «да/нет» одной плиткой: показываем только «Да», повторный клик снимает --- */
html.ahf .filter.ahf-seg .filter__values {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 6px;
    padding: 0;
    background: none;
}
html.ahf .filter.ahf-seg .filter__value { display: none; }
html.ahf .filter.ahf-seg .filter__value.ahf-bool-yes { display: block; }
html.ahf .filter.ahf-seg .radio {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 0 6px;
    border-radius: 10px;
    background: #f5f5f7;
    cursor: pointer;
    transition: all .16s ease;
}
html.ahf .filter.ahf-seg .radio:hover { background: #e8e8ed; }
html.ahf .filter.ahf-seg .radio__mark { display: none; }
html.ahf .filter.ahf-seg .radio__label {
    font-size: 13px;
    font-weight: 600;
    color: #1d1d1f;
    white-space: nowrap;
}
html.ahf .filter.ahf-seg .filter__value:has(.radio__control:checked) .radio { background: #1d1d1f; }
html.ahf .filter.ahf-seg .filter__value:has(.radio__control:checked) .radio__label { color: #fff; }

/* --- цена / диапазоны --- */
html.ahf .filter_type_price .range-slider__bounds,
html.ahf .filter_type_range .range-slider__bounds { display: flex; align-items: center; gap: 8px; }
html.ahf .range-slider__bound { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 8px; }
html.ahf .range-slider__label { font-size: 12.5px; color: #6E6E73; }
html.ahf .range-slider__input {
    width: 100% !important;
    height: 36px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: #f5f5f7 !important;
    text-align: center;
    font-size: 13.5px !important;
    font-weight: 600;
    color: #1d1d1f !important;
}
html.ahf .range-slider__input::placeholder { color: #6E6E73; font-weight: 500; }
/* ползунок убран — им неудобно попадать в нужную цену; вместо него поля и диапазоны */
html.ahf .filter_type_price .range-slider__slider-wrapper { display: none; }
html.ahf .range-slider__slider-wrapper { padding: 14px 6px 4px; }
html.ahf .ahf-price { display: grid; gap: 6px; margin-top: 10px; }
html.ahf .ahf-price__item {
    display: flex;
    align-items: center;
    height: 34px;
    padding: 0 12px;
    border: 0;
    border-radius: 10px;
    background: #f5f5f7;
    font-size: 13px;
    font-weight: 600;
    color: #1d1d1f;
    cursor: pointer;
    text-align: left;
    transition: background .16s ease, color .16s ease;
}
html.ahf .ahf-price__item:hover { background: #e8e8ed; }
html.ahf .ahf-price__item_on { background: #1d1d1f; color: #fff; }
html.ahf .range-slider__slider { height: 3px !important; background: #e6e6eb !important; border: 0 !important; }
html.ahf .range-slider__slider-range { background: #1d1d1f !important; }
html.ahf .range-slider__slider-handle {
    width: 16px !important;
    height: 16px !important;
    top: -7px !important;
    margin-left: -8px !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: #fff !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .28) !important;
    cursor: grab;
}
html.ahf .range-slider__slider-handle:active { cursor: grabbing; }

/* --- липкий футер с кнопкой --- */
html.ahf .sidebar-filters .filters__footer {
    padding: 12px 18px 14px;
    border-top: 1px solid #f0f0f2;
    border-radius: 0 0 24px 24px;
    background: #fff;
}
html.ahf .filters__footer .filters__submit-button {
    width: 100%;
    height: 46px;
    margin: 0 0 6px;
    border: 0;
    border-radius: 999px;
    background: #1d1d1f;
    color: #fff;
    font-size: 14.5px;
    font-weight: 600;
    transition: opacity .2s ease;
}
html.ahf .filters__footer .filters__submit-button:hover { opacity: .85; background: #1d1d1f; }
html.ahf .filters__footer .filters__submit-button_counted::after { content: " " attr(data-products-count); }
html.ahf .filters__footer .filters__reset-button {
    width: 100%;
    height: 34px;
    margin: 0;
    border: 0;
    border-radius: 999px;
    background: none;
    color: #6E6E73;
    font-size: 13px;
    font-weight: 500;
    transition: color .2s ease;
}
html.ahf .filters__footer .filters__reset-button:hover { background: #f5f5f7; color: #1d1d1f; }

/* --- индикатор пересчёта: пока идёт запрос, список товаров ещё старый --- */
html.ahf .sidebar-filters_loading .filters__footer .filters__submit-button { opacity: .55; }
html.ahf .products.ahf-busy .products-thumbs,
html.ahf .products.ahf-busy .products__bar,
html.ahf .products.ahf-busy .paging {
    opacity: .4;
    pointer-events: none;
    transition: opacity .15s ease;
}
html.ahf .products.ahf-busy::before {
    content: "Подбираем товары…";
    position: fixed;
    top: 118px;
    left: 58%;
    transform: translateX(-50%);
    z-index: 30;
    padding: 10px 18px;
    border-radius: 999px;
    background: #1d1d1f;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .22);
    pointer-events: none;
}

/* --- подсказка «найдено N»: дублирует число в кнопке, а карточка обрезает по overflow --- */
html.ahf .filters__hint { display: none !important; }
html.ahf .filters__hint_unused {
    border: 0 !important;
    border-radius: 12px !important;
    background: #1d1d1f !important;
    color: #fff !important;
    font-size: 12.5px !important;
    font-weight: 600;
    padding: 9px 13px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
    z-index: 5;
}

/* --- чипы активных значений над товарами (штатный блок темы) --- */
html.ahf .products__filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin: 0 0 14px;
    padding: 0;
    border: 0;
}
html.ahf .products__filters-label { font-size: 13px; color: #6E6E73; margin: 0 2px 0 0; }
html.ahf .products__filters-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px 6px 12px;
    border: 0;
    border-radius: 999px;
    background: #f0f0f3;
    font-size: 13px;
    font-weight: 600;
    color: #1d1d1f;
    cursor: pointer;
    transition: background .18s ease;
}
html.ahf .products__filters-button:hover { background: #e2e2e7; }
html.ahf .products__filters-reset {
    font-size: 13px;
    font-weight: 500;
    color: #6E6E73;
    cursor: pointer;
    padding: 6px 4px;
    background: none;
    text-decoration: underline;
    text-underline-offset: 3px;
}
html.ahf .products__filters-reset:hover { color: #1d1d1f; }
/* «Сбросить фильтры» — ссылка, а не чип: крестик у неё лишний */
html.ahf .products__filters-reset .icon-box__icon { display: none; }
html.ahf .products__filters-button .icon-box { display: flex; align-items: center; gap: 6px; }

/* --- прочие блоки сайдбара под фильтром: тот же язык карточек --- */
html.ahf .content-columns__sidebar .blocks__item:not(.blocks__item_filters) > .sidebar-block {
    border: 0 !important;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 6px 22px rgba(0, 0, 0, .06);
    padding: 14px 16px;
}
/* Ничего в сайдбаре не липнет: закреплённый первый блок перекрывался соседними
   (на страницах без фильтра «Просмотренные товары» наезжали на «Каталог»). */
/* ==================== /APPLE FILTERS ==================== */

/* --- APPLE FILTERS: сетка товаров рядом с фильтром --- */
/* вендор меняет число колонок в зависимости от классов, которые после AJAX приходят
   не те же самые — фиксируем явно, чтобы сетка не прыгала с 3 на 4 */
@media (min-width: 1200px) {
    html.ahf .content-columns__content .products-thumbs { --cols-count: 3 !important; }
}
@media (min-width: 1600px) {
    html.ahf .content-columns__content .products-thumbs { --cols-count: 4 !important; }
}

/* --- APPLE FILTERS: панель сортировки над товарами --- */
html.ahf .products-bar {
    background: #fff !important;
    border: 1px solid #ececf0 !important;
    border-radius: 16px !important;
    padding: 8px 14px;
}
html.ahf .products-bar__content { display: flex; align-items: center; gap: 14px; }
html.ahf .products-bar__found { font-size: 13.5px; color: #6E6E73; }
html.ahf .products-bar__found b { color: #1d1d1f; font-weight: 700; }
html.ahf .products-bar .inline-field__label { font-size: 13px; color: #6E6E73; }

/* селект сортировки — капсула, не растянутая на пол-экрана */
/* ВАЖНО: у .select внутри лежит выпадающий список .select__dropdown —
   никакого overflow:hidden на обёртке, иначе список не видно. Сам
   .select__control — невидимый нативный select (opacity 0, z-index -1),
   его геометрию не трогаем: клик по label должен попадать в него. */
html.ahf .products-bar .select {
    width: auto !important;
    min-width: 190px;
    border: 0 !important;
    background: #f5f5f7 !important;
    border-radius: 12px !important;
}
html.ahf .products-bar .select__box {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 12px;
    border: 0 !important;
    background: none !important;
    font-size: 13.5px;
    font-weight: 600;
    color: #1d1d1f;
}
html.ahf .products-bar .select__dropdown {
    border: 0 !important;
    border-radius: 14px !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .16);
    overflow: hidden;
    z-index: 20;
}
html.ahf .products-bar .select__dropdown-item,
html.ahf .products-bar .select__dropdown li { font-size: 13.5px; }
/* переключатели вида списка */
html.ahf .products-view-types { display: flex; gap: 4px; }
html.ahf .products-view-types__item { margin: 0 !important; }
html.ahf .products-view-type {
    width: 34px;
    height: 34px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: background .16s ease;
}
html.ahf .products-view-type:hover { background: #f0f0f3; }
html.ahf .products-view-type:hover svg { fill: #1d1d1f !important; }
html.ahf .products-view-type_active { background: #1d1d1f; }
html.ahf .products-view-type_active svg { fill: #fff !important; }

/* ==================== APPLE SIDEBAR (блоки левой колонки, 06.08.2026) ====================
   Каталог, просмотренные товары, новости и отзывы — в одном языке с карточкой фильтра. */

/* общая карточка */
html.ahf .content-columns__sidebar .blocks__item > .block,
html.ahf .content-columns__sidebar .blocks__item:not(.blocks__item_filters) > .sidebar-block {
    background: #fff;
    border: 0 !important;
    border-radius: 20px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, .06);
    padding: 6px 0 10px;
    margin: 0;
    overflow: hidden;
}
html.ahf .content-columns__sidebar .blocks__item { margin-bottom: 16px; }
/* пустой баннер не должен занимать место */
html.ahf .content-columns__sidebar .blocks__item_banner_1:not(:has(img)) { display: none; }

/* заголовки блоков */
html.ahf .content-columns__sidebar .block__header,
html.ahf .content-columns__sidebar .blocks__item:not(.blocks__item_filters) .sidebar-block__header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 0;
    padding: 12px 16px 10px;
    background: none !important;
    border: 0 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    color: #1d1d1f !important;
    letter-spacing: -.01em;
}
html.ahf .content-columns__sidebar .block__header .title,
html.ahf .content-columns__sidebar .block__header .title_h2 {
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    margin: 0 !important;
}
html.ahf .content-columns__sidebar .block__header .link { font-size: 12.5px; font-weight: 500; color: #6E6E73; }
html.ahf .content-columns__sidebar .block__header .link:hover { color: #1d1d1f; }
html.ahf .content-columns__sidebar .blog-sidebar-news__header-container {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
}
html.ahf .content-columns__sidebar .block__content { padding: 0 16px 6px; }

/* --- каталог разделов --- */
html.ahf .content-container_sidebar .catalog-list { box-shadow: none; padding: 0 10px 6px; border-radius: 0; }
html.ahf .sidebar-catalog .sidebar-block__content { padding: 0 10px 6px; }
html.ahf .catalog-list__link { padding: 9px 12px !important; font-size: 13.5px !important; }
html.ahf .catalog-list__item_selected > .catalog-list__link,
html.ahf .catalog-list__link_selected { background: #1d1d1f; color: #fff !important; border-radius: 12px; }

/* --- просмотренные товары --- */
html.ahf .products-mini__wrapper { display: flex; flex-direction: column; gap: 4px; }
html.ahf .products-mini__item { margin: 0 !important; padding: 0 !important; border: 0 !important; }
html.ahf .product-mini {
    display: grid !important;
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 14px;
    transition: background .16s ease;
}
html.ahf .product-mini:hover { background: #f5f5f7; }
html.ahf .product-mini__image-box {
    width: 54px;
    height: 54px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: #f5f5f7;
    border-radius: 10px;
    overflow: hidden;
    margin: 0 !important;
}
html.ahf .product-mini__image { max-width: 100%; max-height: 100%; object-fit: contain; }
html.ahf .product-mini__content, html.ahf .product-mini__info { min-width: 0; padding: 0 !important; }
/* вендор ставит name display:flow-root — с ним обрезка по строкам не работает */
html.ahf .product-mini__name {
    display: -webkit-box !important;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: auto !important;
    font-size: 12.5px !important;
    line-height: 1.35 !important;
    color: #1d1d1f !important;
    margin-bottom: 3px;
}
html.ahf .product-mini__price { font-size: 13.5px !important; font-weight: 700 !important; color: #1d1d1f !important; }
html.ahf .product-mini__compare-price { font-size: 11.5px; color: #6E6E73; }

/* --- баннер в колонке --- */
html.ahf .content-columns__sidebar .blocks__item > .sidebar-banner {
    display: block;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 6px 22px rgba(0, 0, 0, .06);
}
html.ahf .sidebar-banner .image-box { display: block; }
html.ahf .sidebar-banner img { display: block; width: 100%; height: auto; }

/* --- новости --- */
html.ahf .blog-posts-mini__item { padding: 10px 0; }
html.ahf .blog-posts-mini__item + .blog-posts-mini__item { border-top: 1px solid #f0f0f2; }
html.ahf .blog-post-mini__date-container { font-size: 11.5px; color: #6E6E73; margin-bottom: 4px; }
html.ahf .blog-post-mini__title-container a {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.35;
    color: #1d1d1f;
}
html.ahf .blog-post-mini__title-container a:hover { color: #6e6e73; }

/* --- отзывы о товарах --- */
html.ahf .reviews-mini__item { padding: 12px 0; }
html.ahf .reviews-mini__item + .reviews-mini__item { border-top: 1px solid #f0f0f2; }
html.ahf .review-mini__product {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    margin-bottom: 8px;
}
html.ahf .review-mini__product-image-box {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f7;
    border-radius: 10px;
    overflow: hidden;
}
html.ahf .review-mini__product-image { max-width: 100%; max-height: 100%; object-fit: contain; }
html.ahf .review-mini__product { min-width: 0; }
html.ahf .review-mini__product-name { min-width: 0; }
html.ahf .review-mini__product-name,
html.ahf .review-mini__product-name a {
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden !important;
    white-space: normal !important;
    text-overflow: ellipsis;
    max-width: 100%;
    font-size: 12.5px !important;
    line-height: 1.3 !important;
    color: #1d1d1f !important;
}
html.ahf .review-mini__author, html.ahf .review-mini__name { font-size: 12.5px; font-weight: 600; color: #1d1d1f; }
html.ahf .review-mini__text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 12.5px;
    line-height: 1.45;
    color: #6e6e73;
    margin-top: 3px;
}
html.ahf .review-mini__date, html.ahf .review-mini__datetime { font-size: 11.5px; color: #6E6E73; margin-top: 5px; }
html.ahf .review-mini__rating, html.ahf .review-mini__rate { margin: 0 0 4px; }
/* ==================== /APPLE SIDEBAR ==================== */
