/* Геометрия классического каталога; цвета наследуются из палитры сайта. */
.bsh-classic {
    --bsh-classic-bg: var(--second_color);
    --bsh-classic-columns: 4;
    --bsh-classic-color: var(--main_color);
    --bsh-classic-button-height: 54px;
    --bsh-classic-button-width: 120px;
    --bsh-classic-button-padding: 18px;
    --bsh-classic-font: 16px;
    --bsh-classic-body-font: 17px;
    --bsh-classic-small-font: 14px;
    --bsh-classic-item-font: 15px;
    --bsh-classic-sidebar-width: 340px;
    --bsh-classic-sidebar-gap: 30px;
    --bsh-classic-gap: 24px;
    --bsh-classic-content-padding: 28px;
    --bsh-classic-icon-size: 20px;
    --bsh-classic-item-radius: 30px;
    --bsh-classic-item-right: 36px;
    --bsh-classic-space-3: 3px;
    --bsh-classic-space-4: 4px;
    --bsh-classic-space-6: 6px;
    --bsh-classic-space-8: 8px;
    --bsh-classic-space-10: 10px;
    --bsh-classic-space-14: 14px;
    --bsh-classic-arrow-size: 5px;
    --bsh-classic-stroke: 1.5px;
    --bsh-classic-burger-middle: 4.25px;
    --bsh-classic-burger-bottom: 8.5px;
    position: static;
}
.bsh-classic-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--bsh-classic-button-height);
    min-width: var(--bsh-classic-button-width);
    padding: 0 var(--bsh-classic-button-padding);
    background: var(--bsh-classic-bg);
    color: var(--bsh-classic-color);
    font-size: var(--bsh-classic-font);
    font-weight: 700;
    text-transform: uppercase;
    border-radius: var(--button_border_radius);
    border: 0;
    cursor: pointer;
    transition: background-color .3s, color .3s;
    user-select: none;
}
.bsh-classic-trigger:hover,
.bsh-classic.is-open .bsh-classic-trigger { background: var(--second_color_hover); color: var(--main_color); }
.bsh-classic-burger { position: relative; width: var(--bsh-classic-space-14); height: var(--bsh-classic-space-10); margin-right: var(--bsh-classic-space-8); }
.bsh-classic-burger span { position: absolute; display: block; left: 0; width: 100%; height: var(--bsh-classic-stroke); background: currentColor; transform-origin: center; transition: top .25s, transform .25s, opacity .25s; }
.bsh-classic-burger span:nth-child(1) { top: 0; }
.bsh-classic-burger span:nth-child(2) { top: var(--bsh-classic-burger-middle); }
.bsh-classic-burger span:nth-child(3) { top: var(--bsh-classic-burger-bottom); }
.bsh-classic.is-open .bsh-classic-burger span:nth-child(1) { top: var(--bsh-classic-burger-middle); transform: rotate(45deg); }
.bsh-classic.is-open .bsh-classic-burger span:nth-child(2) { opacity: 0; }
.bsh-classic.is-open .bsh-classic-burger span:nth-child(3) { top: var(--bsh-classic-burger-middle); transform: rotate(-45deg); }
.bsh-classic-dropdown {
    display: flex;
    position: absolute;
    top: 100%;
    left: var(--bsh-classic-left);
    width: var(--bsh-classic-viewport);
    height: var(--bsh-classic-height);
    padding: 0 var(--bsh-classic-inset-right) 0 var(--bsh-classic-inset-left);
    margin: 0;
    background: var(--main_color);
    color: var(--white_color);
    font-size: var(--bsh-classic-body-font);
    line-height: 1.6;
    font-weight: 400;
    z-index: 1000;
    /* Отдельный слой сохраняет сглаживание текста при раскрытии панели. */
    transform: translateZ(0);
}
.bsh-classic-dropdown[hidden], .bsh-classic-extra[hidden] { display: none; }
/* Обвязка клонирует ряд и при изменении UI: скрытый клон не перекрывает живое меню. */
.ueb-sticky-wrap:not(.is-visible) .bsh-classic-dropdown { display: none; }
.bsh-classic-sidebar { flex-shrink: 0; width: var(--bsh-classic-sidebar-width); overflow: hidden; }
.bsh-classic-menu { list-style: none; margin: 0; padding: var(--bsh-classic-gap) var(--bsh-classic-sidebar-gap) var(--bsh-classic-gap) 0; height: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.bsh-classic-item { list-style: none; margin: 0 0 var(--bsh-classic-space-8); padding: 0; }
.bsh-classic-item > a { display: flex; position: relative; align-items: center; gap: var(--bsh-classic-space-10); padding: var(--bsh-classic-space-6) var(--bsh-classic-item-right) var(--bsh-classic-space-6) var(--bsh-classic-icon-size); font-size: var(--bsh-classic-item-font); line-height: 1.6; font-weight: 600; color: var(--white_color); background: var(--main_color_hover); border-radius: var(--bsh-classic-item-radius); transition: background-color .15s, color .15s; }
.bsh-classic-item > a:hover, .bsh-classic-item.is-active > a { background: var(--second_color); color: var(--main_color_hover); }
.bsh-classic-item.has-children > a::after { content: ''; position: absolute; box-sizing: content-box; right: var(--bsh-classic-space-14); top: 50%; margin-top: calc(-1 * var(--bsh-classic-space-3)); width: var(--bsh-classic-arrow-size); height: var(--bsh-classic-arrow-size); border-right: var(--bsh-classic-stroke) solid currentColor; border-top: var(--bsh-classic-stroke) solid currentColor; transform: rotate(45deg); opacity: .4; }
.bsh-classic-item.has-children.is-active > a::after, .bsh-classic-item.has-children > a:hover::after { opacity: 1; }
.bsh-classic-icon { flex: 0 0 var(--bsh-classic-icon-size); width: var(--bsh-classic-icon-size); height: var(--bsh-classic-icon-size); display: inline-flex; align-items: center; justify-content: center; }
.bsh-classic-icon img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.bsh-classic-item.is-active .bsh-classic-icon img, .bsh-classic-item > a:hover .bsh-classic-icon img { filter: brightness(0) invert(.17); }
.bsh-classic-content { display: block; flex: 1; min-width: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: var(--bsh-classic-gap) var(--bsh-classic-content-padding) var(--bsh-classic-icon-size); }
/* Только активная панель задаёт высоту и прокрутку правой области. */
.bsh-classic-panel { display: none; }
/* Колоночный поток: группы и одиночные ссылки заполняют колонки без пустот. */
/* Ровные строки: группы/ссылки выстраиваются по сетке рядами (не masonry). */
.bsh-classic-panel.is-active { display: grid; grid-template-columns: repeat(var(--bsh-classic-columns), minmax(0, 1fr)); gap: var(--bsh-classic-gap); align-items: start; }
.bsh-classic-group { min-width: 0; }
/* Листовая подкатегория без вложенных — обычная ссылка, а не заголовок. */
.bsh-classic-leaf { display: block; min-width: 0; padding: var(--bsh-classic-space-3) 0; font-size: var(--bsh-classic-small-font); line-height: 1.4; font-weight: 400; color: var(--white_color); opacity: .9; transition: opacity .15s; }
.bsh-classic-leaf:hover { color: var(--white_color); opacity: 1; text-decoration: underline; }
.bsh-classic-group-title { display: block; font-size: var(--bsh-classic-font); font-weight: 700; line-height: 1.6; margin-bottom: var(--bsh-classic-space-6); text-transform: uppercase; color: var(--white_color); opacity: .7; transition: opacity .15s; }
.bsh-classic-group-title:hover { color: var(--white_color); opacity: 1; }
.bsh-classic-group-item { display: block; padding: var(--bsh-classic-space-3) 0; font-size: var(--bsh-classic-small-font); line-height: 1.4; font-weight: 400; color: var(--white_color); opacity: .9; transition: opacity .15s; }
.bsh-classic-group-item:hover { color: var(--white_color); opacity: 1; text-decoration: underline; }
.bsh-classic-more { display: inline-flex; align-items: center; gap: var(--bsh-classic-space-6); padding: var(--bsh-classic-space-4) 0; background: none; border: 0; font: inherit; cursor: pointer; color: var(--second_color_hover); opacity: .7; transition: opacity .15s; }
.bsh-classic-more:hover { opacity: 1; }
.bsh-classic-more svg { flex: 0 0 var(--bsh-classic-space-10); transition: transform .15s; }
.bsh-classic-more[aria-expanded='true'] svg { transform: rotate(180deg); }
.bsh-classic-empty { padding: var(--bsh-classic-gap) 0; }
@media (max-width: 1240px) {
    .bsh-classic { --bsh-classic-sidebar-width: 290px; --bsh-classic-sidebar-gap: 20px; --bsh-classic-content-padding: 20px; }
    .bsh-classic-panel.is-active { grid-template-columns: repeat(min(3, var(--bsh-classic-columns)), minmax(0, 1fr)); }
}
@media (max-width: 990px) { .bsh-classic { display: none; } }
