/* === BREADCRUMB === */
.breadcrumb-bar{background:var(--g0);border-bottom:1px solid var(--g100);padding:11px 0;font-size:13px}
.breadcrumb-bar .inner{max-width:var(--max-w);margin:0 auto;padding:0 24px;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.breadcrumb-bar a{color:var(--g500);transition:color var(--t)}
.breadcrumb-bar a:hover{color:var(--red)}
.breadcrumb-bar .sep{color:var(--g300);font-size:10px}
.breadcrumb-bar .cur{color:var(--g800);font-weight:500}

/* === MAIN === */
.main-layout{max-width:var(--max-w);margin:0 auto;padding:24px;display:grid;grid-template-columns:300px 1fr;gap:24px;min-height:70vh}
.content-area{min-width:0;overflow:hidden}

/* === SIDEBAR === */
.sidebar-card{background:var(--g0);border-radius:var(--r-lg);box-shadow:var(--shadow-sm);overflow:hidden;position:sticky;top:80px;max-height:calc(100vh - 96px);overflow-y:auto}
.sidebar-title{padding:16px 18px;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--g500);border-bottom:1px solid var(--g100)}
.sidebar-search{padding:12px 14px;border-bottom:1px solid var(--g100);position:relative}
.sidebar-search input{width:100%;padding:9px 12px 9px 36px;border:1.5px solid var(--g200);border-radius:8px;font-size:13px;outline:none;background:var(--g50);transition:all var(--t)}
.sidebar-search input:focus{border-color:var(--red);box-shadow:0 0 0 3px var(--red-glow);background:var(--g0)}
.sidebar-search i{position:absolute;left:26px;top:50%;transform:translateY(-50%);color:var(--g400);font-size:13px}
.cat-list{max-height:60vh;overflow-y:auto;padding:6px 0}
.cat-list::-webkit-scrollbar{width:4px}
.cat-list::-webkit-scrollbar-thumb{background:var(--g300);border-radius:4px}
.cat-item{display:flex;align-items:center;gap:8px;padding:9px 18px;font-size:13px;color:var(--g600);cursor:pointer;transition:all var(--t);border-left:3px solid transparent}
.cat-item:hover{background:var(--g50);color:var(--g900)}
.cat-item.active{background:var(--red-light);color:var(--red);font-weight:600;border-left-color:var(--red)}
.cat-item .cnt{display:none}
.cat-item.active .cnt{display:none}
.cat-sub{border-left:2px solid var(--g150,#e5e7eb);margin-left:29px}
.cat-sub .cat-item{padding-left:16px;font-size:12.5px;border-left:none}
.cat-sub .cat-item.active{border-left:none;background:var(--red-light);color:var(--red)}
/* Level-1 (nested) subcategory in sidebar */
.cat-sub .cat-item.cat-child{padding-left:46px;font-size:12px;color:var(--g500)}
.cat-sub .cat-item.cat-child::before{content:'↳';margin-right:5px;color:var(--g300);font-size:10px}
.cat-sub .cat-item.cat-child.active::before{color:var(--red);opacity:.6}
/* Typ Produktu tree */
.typ-tree-toggle{display:flex;border-bottom:1px solid var(--g100);background:var(--g50)}
.typ-tree-toggle button{flex:1;padding:7px 4px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;border:none;background:transparent;cursor:pointer;color:var(--g400);transition:all var(--t)}
.typ-tree-toggle button.active{background:var(--g0);color:var(--red);box-shadow:inset 0 -2px 0 var(--red)}
/* Level 0 — top nodes */
.typ-node{display:flex;align-items:center;gap:5px;padding:6px 10px 6px 12px;font-size:12px;font-weight:500;color:var(--g700);cursor:pointer;transition:background var(--t),color var(--t);border-left:2px solid transparent;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.typ-node-icon{width:20px;height:20px;display:flex;align-items:center;justify-content:center;flex-shrink:0;opacity:.7;transition:opacity var(--t)}
.typ-node-icon img{width:18px;height:18px;object-fit:contain;filter:grayscale(40%) opacity(.7);transition:filter var(--t)}
.typ-node-top{padding-left:10px;font-size:12.5px;font-weight:600}
.typ-node-top:hover .typ-node-icon,.typ-node-top.active .typ-node-icon{opacity:1}
.typ-node-top:hover .typ-node-icon img{filter:none}
.typ-node-top.active .typ-node-icon img{filter:brightness(0) saturate(100%) invert(14%) sepia(97%) saturate(7471%) hue-rotate(349deg) brightness(94%) contrast(117%)}
.typ-node:hover{background:var(--g50);color:var(--g900)}
.typ-node.active{background:var(--red-light);color:var(--red);font-weight:600;border-left-color:var(--red)}
.typ-node .typ-lbl{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}
.typ-node .typ-arrow{font-size:8px;color:var(--g300);flex-shrink:0;transition:transform .18s;margin-left:2px}
.typ-node.open>.typ-arrow{transform:rotate(90deg)}
/* Children container — indented line */
.typ-children{display:none}
.typ-children.open{display:block}
/* Level 1 */
.typ-children>.typ-node{font-size:11.5px;font-weight:400;color:var(--g600);padding-left:20px;border-left:none;padding-top:5px;padding-bottom:5px}
.typ-children>.typ-node::before{content:'';display:inline-block;width:10px;height:1px;background:var(--g200);margin-right:5px;flex-shrink:0;vertical-align:middle}
/* Level 2 */
.typ-children>.typ-children>.typ-node{font-size:11px;color:var(--g500);padding-left:28px;padding-top:4px;padding-bottom:4px}
.typ-children>.typ-children>.typ-node::before{width:8px;background:var(--g150)}
/* Level 3+ */
.typ-children>.typ-children>.typ-children>.typ-node{font-size:10.5px;color:var(--g400);padding-left:36px;padding-top:3px;padding-bottom:3px}
.typ-children>.typ-children>.typ-children>.typ-node::before{width:6px}
