/* Мега-меню «Все категории» и дерево категорий с «+/−» (пакет alstyle-catalog).
   Разметка: partials/bostan-navigation.php (.ct-mega), partials/catalog-tree.php (.ct-tree) —
   мобильное меню (.ct-drawer, drawers.php) и боковая панель каталога (.ct-side, catalog.php).
   mastbro.css — прожатый Tailwind, поэтому здесь только смысловые классы. */

.ct-mega small,.ct-tree small{font-size:.85em;font-weight:400;color:var(--bt-muted,#828296);white-space:nowrap}

/* ─── Мега-меню ─── */
.bt-header .bt-mega{width:min(1200px,100%)}
.ct-mega{display:grid;grid-template-columns:270px minmax(0,1fr);height:min(620px,calc(100vh - 190px));min-height:320px;background:#fff;border-radius:9px 9px 0 0;overflow:hidden;color:var(--bt-ink,#252530)}
.ct-mega-roots{min-height:0;overflow-y:auto;overscroll-behavior:contain;background:var(--bt-canvas,#f6f6fb);padding:10px 8px}
.ct-mega-roots>a{display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding:7px 10px;border-radius:5px;font-size:13px;font-weight:550;line-height:1.3}
.ct-mega-roots>a:hover,.ct-mega-roots>a.active{background:#fff;color:var(--bt-accent,#5032ff)}
.ct-mega-roots>a.active small{color:var(--bt-accent,#5032ff)}
.ct-mega-roots>.ct-mega-all{margin-top:8px;padding-top:12px;border-top:1px solid var(--bt-line,#e9e8f4);border-radius:0;color:var(--bt-accent,#5032ff);font-weight:650}
.ct-mega-panels{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:20px 26px 24px}
.ct-mega-head{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin-bottom:18px}
.ct-mega-head h2{font-size:20px;font-weight:650;line-height:1.25}
.ct-mega-head a{flex-shrink:0;font-size:13px;font-weight:600;color:var(--bt-accent,#5032ff)}
.ct-mega-head a:hover,.ct-mega-l2:hover,.ct-mega-group li a:hover{color:var(--bt-accent,#5032ff)}
.ct-mega-cols{column-count:3;column-gap:32px}
.ct-mega-group{break-inside:avoid;padding-bottom:18px}
.ct-mega-l2{display:block;margin-bottom:5px;font-size:14px;font-weight:650;line-height:1.3}
.ct-mega-group ul{list-style:none;margin:0;padding:0}
.ct-mega-group li a{display:block;padding:3px 0;font-size:13px;line-height:1.35;color:#4a4a58}
.ct-mega-group li a.ct-mega-more{font-size:12px;font-weight:600;color:var(--bt-accent,#5032ff)}
.ct-mega a:focus-visible,.ct-tree a:focus-visible,.ct-toggle:focus-visible,.ct-side-title:focus-visible{outline:2px solid var(--bt-accent,#5032ff);outline-offset:1px}
@media(max-width:1200px){.ct-mega{grid-template-columns:230px minmax(0,1fr)}.ct-mega-cols{column-count:2}}
@media(max-width:900px){.ct-mega{grid-template-columns:200px minmax(0,1fr)}.ct-mega-panels{padding:16px 18px}.ct-mega-cols{column-count:1}}

/* ─── Дерево с «+/−» ─── */
.ct-tree{list-style:none;margin:0;padding:0}
.ct-tree[hidden]{display:none!important}
.ct-tree .ct-tree{margin-left:11px;padding-left:10px;border-left:1px solid var(--bt-line,#e9e8f4)}
.ct-row{display:flex;align-items:flex-start;gap:4px}
.ct-row>a{flex:1;min-width:0;padding:5px 6px;border-radius:5px;font-size:14px;line-height:1.35;color:var(--bt-ink,#252530);overflow-wrap:anywhere}
.ct-row>a:first-child{margin-left:26px}  /* узел без «+/−» — выравнивание по тексту соседей */
.ct-row>a:hover{background:var(--bt-canvas,#f6f6fb);color:var(--bt-accent,#5032ff)}
.ct-node.is-current>.ct-row>a{background:#eeebff;color:var(--bt-accent,#5032ff);font-weight:650}
.ct-toggle{flex:0 0 22px;width:22px;height:22px;margin-top:4px;display:flex;align-items:center;justify-content:center;border:1px solid var(--bt-line,#e9e8f4);border-radius:4px;background:#fff;color:var(--bt-ink,#252530);font-size:15px;font-weight:600;line-height:1;cursor:pointer}
.ct-toggle::before{content:"+"}
.ct-toggle[aria-expanded="true"]::before{content:"\2212"}
.ct-toggle:hover{border-color:var(--bt-accent,#5032ff);color:var(--bt-accent,#5032ff)}

/* Мобильное меню: крупнее цели касания */
.ct-drawer{padding:8px 12px 24px}
.ct-drawer .ct-row{gap:6px}
.ct-drawer .ct-row>a{padding:9px 6px;font-size:15px}
.ct-drawer .ct-row>a:first-child{margin-left:40px}
.ct-drawer .ct-toggle{flex-basis:34px;width:34px;height:34px;margin-top:3px;font-size:18px}
.ct-drawer .ct-tree-nav>.ct-tree>.ct-node>.ct-row>a{font-weight:600}
.ct-drawer a.ct-mega-more{font-size:13px;font-weight:600;color:var(--bt-accent,#5032ff)}

/* Боковая панель каталога (только lg+: на мобильном — меню и подкатегории над товарами) */
.ct-side{margin-bottom:16px;padding:12px 6px;border-radius:8px;background:#fff}
.ct-side-title{display:block;margin-bottom:6px;padding:2px 6px 10px;border-bottom:1px solid var(--bt-line,#e9e8f4);font-size:14px;font-weight:700}
.ct-side-title:hover{color:var(--bt-accent,#5032ff)}
.ct-side .ct-tree-nav{position:relative;max-height:min(560px,62vh);overflow-y:auto;overscroll-behavior:contain}
.ct-side .ct-row{gap:3px}
.ct-side .ct-row>a{padding:4px 5px;font-size:13px}
.ct-side .ct-row>a:first-child{margin-left:21px}
.ct-side .ct-toggle{flex-basis:18px;width:18px;height:18px;margin-top:4px;font-size:13px}
.ct-side .ct-tree .ct-tree{margin-left:8px;padding-left:5px}  /* узкая колонка, до 6 уровней: 14px на уровень */
@media(max-width:1023px){.ct-side{display:none}}
