/* ============================================================
   САЙДБАР «ФИНТЕХ» — страницы производителей
   Колонка слева (после page-top-outer), sticky, 400px,
   светлая тема (фон = фон страницы), на мобильных — панель слева
   ============================================================ */
:root {
    --sb-w: 400px;
    --sb-w-collapsed: 64px;
    --sb-bg: #f3f7f9;
    --sb-bg2: #f3f7f9;
    --sb-sub-bg: #e9f1f6;
    --sb-text: #475569;
    --sb-text2: #0c2556;
    --sb-border: #dbe7ee;
}

/* --- ряд: сайдбар слева + контент --- */
.sb-row {
    display: flex;
    flex-direction: row-reverse;
    align-items: stretch;
    gap: 40px;
}
.sb-row-main {
    flex: 1;
    min-width: 0;
}
.sb-col {
    align-self: stretch;
    width: var(--sb-w);
    flex-shrink: 0;
    display: flex;
    z-index: 60;
}
body.sb-collapsed .sb-col {
    width: var(--sb-w-collapsed);
}

/* --- сайдбар (колонка) --- */
.sb {
    position: sticky;
    top: 96px;
    align-self: flex-start;
    width: 100%;
    display: flex;
    flex-direction: column;
    color: var(--sb-text);
    background: var(--sb-bg);
    border-radius: 0;
    box-shadow: none;
}
.sb-layout {
    height: 100%;
    display: flex;
    flex-direction: column;
}
.sb-header {
    min-height: 88px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--sb-border);
}
.sb-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.sb-logo-mark {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.sb-logo-img {
    height: 46px;
    width: auto;
    display: block;
}
body.sb-collapsed .sb-logo-img { height: 20px; }
.sb-logo-text { min-width: 0; }
.sb-logo-text span {
    display: block;
    font-size: 11px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

/* --- контент меню --- */
.sb-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 0;
    min-height: 0;
}
.sb-content::-webkit-scrollbar { width: 5px; }
.sb-content::-webkit-scrollbar-thumb { background: #cbdbe6; border-radius: 4px; }
.sb-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sb-menu .sb-menu-header {
    font-weight: 600;
    padding: 10px 25px;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--sb-text);
    opacity: .55;
    white-space: nowrap;
}
.sb-item { position: relative; }
.sb-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 20px;
    color: var(--sb-text);
    text-decoration: none;
    white-space: nowrap;
    transition: color .25s, background .25s;
}
.sb-link:hover { color: var(--sb-text2); background: rgba(12, 37, 86, .06); }
.sb-link.active { color: var(--sb-text2); font-weight: 600; }
.sb-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: #ff8100;
}
.sb-menu-icon {
    flex-shrink: 0;
    width: 35px;
    min-width: 35px;
    height: 35px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    transition: transform .3s;
}
.sb-link:hover .sb-menu-icon { transform: rotate(-8deg); }
.sb-ic { width: 19px; height: 19px; }
.sb-menu-title {
    flex-grow: 1;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sb-badge {
    font-size: 11px;
    font-weight: 700;
    color: #0c2556;
    background: rgba(12, 37, 86, .09);
    border-radius: 12px;
    padding: 1px 9px;
    min-width: 20px;
    text-align: center;
    flex-shrink: 0;
}
.sb-badge.primary { background: #0c2556; color: #fff; }

/* --- подменю (категории -> бренды) --- */
.sb-sub > .sb-link::after {
    content: '';
    width: 6px;
    height: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform .25s;
    margin-left: 6px;
    flex-shrink: 0;
}
.sb-sub.open > .sb-link { color: var(--sb-text2); }
.sb-sub.open > .sb-link::after { transform: rotate(45deg); }
.sb-sub-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
    background: var(--sb-sub-bg);
}
.sb-sub.open > .sb-sub-list { max-height: 1800px; }
.sb-sub-list .sb-link { min-height: 38px; padding-left: 65px; }
.sb-sub-list .sb-link.active { color: var(--sb-text2); font-weight: 600; }

/* --- футер --- */
.sb-footer {
    padding: 14px 16px 18px;
    border-top: 1px solid var(--sb-border);
}
.sb-footer-box {
    background: #e2eff5;
    border-radius: 10px;
    padding: 12px;
    font-size: 11.5px;
    line-height: 1.55;
    color: #475569;
}
.sb-footer-box .sb-lorry {
    width: 26px;
    height: 26px;
    color: #ff9a3d;
    margin-bottom: 6px;
    display: block;
}

/* --- кнопка сворачивания (десктоп) --- */
.sb-collapser {
    position: absolute;
    right: -11px;
    top: 150px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #0c2556;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    box-shadow: 0 1px 6px rgba(12, 37, 86, .35);
    cursor: pointer;
    transition: background .2s;
}
.sb-collapser:hover { background: #2e4a8f; }
.sb-collapser svg { width: 12px; height: 12px; }
body.sb-collapsed .sb-collapser svg { transform: rotate(180deg); }

/* --- мобильный тогглер --- */
.sb-toggler {
    position: fixed;
    right: 16px;
    top: 16px;
    z-index: 1150;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #0c2556;
    color: #fff;
    border: 1px solid #dbe7ee;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(12, 37, 86, .35);
}
.sb-toggler svg { width: 22px; height: 22px; }

/* --- overlay --- */
.sb-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 10, 20, .55);
    z-index: 1090;
    display: none;
}
body.sb-toggled .sb-overlay { display: block; }

/* --- collapsed: иконки + флайут --- */
body.sb-collapsed .sb-logo-text,
body.sb-collapsed .sb-menu-title,
body.sb-collapsed .sb-badge,
body.sb-collapsed .sb-menu-header span,
body.sb-collapsed .sb-footer-box { display: none; }
body.sb-collapsed .sb-header { padding: 0 12px; justify-content: center; }
body.sb-collapsed .sb-link { padding: 0 13px; justify-content: center; }
body.sb-collapsed .sb-sub > .sb-link::after { display: none; }
body.sb-collapsed .sb-menu-header { visibility: hidden; }
body.sb-collapsed .sb-sub-list {
    position: absolute;
    left: calc(var(--sb-w-collapsed) + 8px);
    top: -8px;
    width: 236px;
    max-height: none;
    height: auto;
    display: none;
    background: #ffffff;
    border: 1px solid #dbe7ee;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(12, 37, 86, .18);
    z-index: 70;
}
body.sb-collapsed .sb-sub.open > .sb-sub-list { display: block; }
body.sb-collapsed .sb-sub-list .sb-link { padding-left: 18px; }

/* --- адаптивность: выдвижная панель (слева) --- */
@media (max-width: 900px) {
    .sb-row { display: block; }
    .sb-col {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        width: var(--sb-w);
        max-width: 88vw;
        transform: translateX(-105%);
        transition: transform .3s ease;
    }
    body.sb-toggled .sb-col { transform: translateX(0); }
    .sb-collapser { display: none; }
    .sb-toggler { display: flex; }
}