/* Sidebar collapsible + C4 dropdown + sort/stock styles */
:root { --bg:#0b0c0f; --card:#11131a; --text:#e8ebf0; --muted:#a9afbc; --accent:#4ea1ff; }
*{box-sizing:border-box}
body{margin:0; background:var(--bg); color:var(--text); font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,Arial,sans-serif; line-height:1.5;}

.layout{display:grid; grid-template-columns: 300px 1fr; min-height:100vh;}
.sidebar{border-right:1px solid #222532; padding:16px; position:sticky; top:0; height:100vh; overflow:auto; background:linear-gradient(180deg, rgba(11,12,15,.95), rgba(11,12,15,.90));}
.content{padding:16px 24px 40px;}

.sb-header{display:flex; align-items:center; gap:8px; justify-content:space-between; margin-bottom:10px;}
.sb-header h2{margin:0; font-size:16px;}
.sb-header .all{font-size:13px; color:var(--muted); text-decoration:none; border:1px solid #2a2f3e; border-radius:999px; padding:4px 8px;}
.sb-actions{display:flex; gap:6px;}
.sb-actions button{padding:6px 10px; border-radius:10px; border:1px solid #2a2f3e; background:#11131a; color:#d7dcec; cursor:pointer;}
.sb-actions button:hover{background:#121521; border-color:#22283a;}

.cat-tree{display:block; margin-top:8px;}
.c1{margin-bottom:10px; border:1px solid transparent; border-radius:10px;}
.c1-head{display:flex; align-items:center; gap:8px; padding:6px 6px 6px 6px;}
.c1-head .toggle{width:22px; height:22px; border-radius:6px; border:1px solid #2a2f3e; background:#0f1220; cursor:pointer; position:relative;}
.c1-head .toggle::before{content:'+'; position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-weight:700; color:#a9afbc;}
.c1:not(.collapsed) .c1-head .toggle::before{content:'–';}
.c1 > .c1-head > a{display:flex; flex:1; align-items:center; justify-content:space-between; text-decoration:none; color:#d7dcec; padding:6px 8px; border-radius:8px;}
.c1 > .c1-head > a:hover{background:#121521; border-color:#22283a;}
.c1 > .c1-head > a.active{background:#14182a; border:1px solid #2a324a;}

.c2-list{margin-left:8px; display:block; padding:6px 0 4px 10px; border-left:1px dashed #2a2f3e;}
.c2{margin-bottom:6px;}
.c2 > a{display:flex; align-items:center; justify-content:space-between; text-decoration:none; color:#bec6db; padding:6px 8px; border-radius:8px;}
.c2 > a:hover{background:#121521; border:1px solid #22283a;}
.c2 > a.active{background:#14182a; border:1px solid #2a324a; color:#e8ebf0;}

.c3-list{margin-left:12px; display:flex; flex-direction:column; gap:3px; padding:4px 0 4px 10px; border-left:1px dashed #2a2f3e;}
.c3-list > a{display:flex; align-items:center; justify-content:space-between; text-decoration:none; color:#aeb6cf; padding:5px 8px; border-radius:8px;}
.c3-list > a:hover{background:#121521; border:1px solid #22283a;}
.c3-list > a.active{background:#14182a; border:1px solid #2a324a; color:#e8ebf0;}

.c1.collapsed .c2-list{display:none;}

.count{color:#8f97ab; font-size:12px; border:1px solid #2a2f3e; padding:1px 6px; border-radius:999px; margin-left:8px;}

.top{display:flex; align-items:center; gap:8px; flex-wrap:wrap; border-bottom:1px solid #222532; padding-bottom:12px; margin-bottom:10px;}
.top h1{margin:0; font-size:20px;}
.search{display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-left:auto;}
.search input{padding:10px 12px; border-radius:12px; border:1px solid #2a2f3e; background:#11131a; color:var(--text); font-size:14px;}
.search select{padding:10px 12px; border-radius:12px; border:1px solid #2a2f3e; background:#11131a; color:var(--text); font-size:14px;}
.search button{padding:10px 14px; border-radius:12px; background:#1a2940; color:var(--text); border:1px solid #2a3a5e; cursor:pointer;}
.search .reset{color:var(--muted); text-decoration:none; font-size:13px; padding:8px}
.check{display:flex; align-items:center; gap:6px; color:#d7dcec; font-size:14px;}

.crumbs{display:flex; gap:8px; align-items:center; color:#a9afbc; font-size:13px; margin-top:6px;}

.grid{display:grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap:16px; margin-top:12px;}
.card{background:var(--card); border:1px solid #1b1e29; border-radius:16px; overflow:hidden; display:flex; flex-direction:column; min-height:320px; box-shadow:0 0 0 1px rgba(255,255,255,.02) inset;}
.cover{width:100%; height:220px; object-fit:cover; background:#0b0c0f;}
.noimg{display:flex; align-items:center; justify-content:center; height:220px; background:#0b0c0f; color:#ffb7b7; border-bottom:1px dashed #2a2f3e; font-weight:600;}
.body{padding:14px 14px 16px;}
.name{font-weight:700; font-size:16px; margin:0 0 6px 0;}
.row{display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin:6px 0;}
.sku{font-size:12px; color:var(--muted);}
.badge{font-size:12px; color:var(--muted); border:1px solid #2a2f3e; padding:4px 8px; border-radius:999px;}
.price{margin-left:auto; font-weight:700; color:var(--text);}
.stock{font-size:12px; font-weight:700; padding:2px 8px; border-radius:999px; border:1px solid #2a2f3e; color:#b7ffc8; background:rgba(50,120,70,.15);}
.stock.zero{color:#ffb7b7; background:rgba(120,50,50,.12);}

.list-head{display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:10px; margin-bottom:8px;}
.summary{color:#a9afbc; font-size:13px;}
.pagination{display:flex; gap:6px; align-items:center; flex-wrap:wrap;}
.pagination a, .pagination span{padding:6px 10px; border:1px solid #2a2f3e; border-radius:10px; text-decoration:none; color:#d7dcec; font-size:13px;}
.pagination a:hover{background:#121521; border-color:#22283a;}
.pagination .current{background:#1a2940; border-color:#2a3a5e; font-weight:700;}
.pagination .disabled{opacity:.5; pointer-events:none;}
.pagination .dots{border:0; padding:0 4px; color:#8f97ab;}

.pager-top{margin-left:auto;}
.pager-bottom{display:flex; justify-content:center; margin-top:16px;}
.footer{color:#ffb7b7; text-align:center; padding:24px; font-size:12px;}
