:root{
  --bg:#0b0d12; --surface:#0f141c; --card:#0f1117; --border:#1f2735;
  --accent:#62a8ff; --muted:#cfd5e1; --good:#3ddc97;
}
*{box-sizing:border-box}
html,body{height:100%;background:var(--bg);color:#ffffff;font-family:system-ui,Segoe UI,Roboto,Arial,sans-serif}
img{max-width:100%;display:block}
a{color:inherit;text-decoration:none}
.bold{font-weight:700}.small{font-size:12px}.muted{color:var(--muted)}
.only-mobile{display:none}


.topbar{position:sticky;top:0;z-index:10;display:flex;gap:10px;align-items:center;justify-content:space-between;background:linear-gradient(180deg,#0b0d12,#0b0d12e6);backdrop-filter:none;padding:8px 10px;border-bottom:1px solid var(--border)}
.brand{font-weight:800;letter-spacing:.5px;white-space:nowrap}
.search{display:flex;gap:8px;align-items:center;flex:1;max-width:920px}
.search input{flex:1;background:#0f141c;border:1px solid var(--border);color:#cfe1ff;border-radius:14px;padding:10px;min-width:120px}
.search button{white-space:nowrap}
.icon-btn,.btn{background:#141a25;border:1px solid var(--border);color:#cfe1ff;border-radius:12px;padding:.55rem .9rem;cursor:pointer}
.btn-primary{background:var(--accent);border-color:#327ecc;color:#0b0d12;font-weight:700}
.cart-btn{background:transparent;border:1px solid var(--border);border-radius:999px;padding:6px 12px;color:#cfe1ff;white-space:nowrap}


.app{display:grid;grid-template-columns:260px 1fr;gap:14px;align-items:start;padding:10px}
.sidebar{position:sticky;top:56px;height:calc(100vh - 56px);overflow:auto;background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:10px}
.main{min-width:0}

.cats .cat-item{display:flex;flex-direction:column;margin:4px 0}
.cats .cat-item>button{display:flex;gap:10px;align-items:center;background:#0f141c;border:1px solid var(--border);border-radius:12px;padding:8px 10px;text-align:left;color:#cfe1ff;width:100%}
.cats .cat-item>button .thumb{width:28px;height:28px;border-radius:8px;object-fit:cover;background:#0f1117;flex:0 0 auto}
.cats .cat-item>button .label{line-height:1.25}
.cats .cat-children{margin-left:24px;padding-left:8px;border-left:1px dashed #223049;display:flex;flex-direction:column;gap:6px}
.cats .cat-item.active>button{border-color:#2f7dd9}


.chips{display:flex;gap:8px;flex-wrap:wrap;margin:6px 0 6px}
.pill{color:#ffffff;background:#0f141c;border:1px solid var(--border);border-radius:999px;padding:6px 10px;white-space:nowrap}


.tiles{display:grid;grid-template-columns:repeat(6,1fr);gap:4px}
.tile{display:flex;flex-direction:column;gap:8px;background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:10px;cursor:pointer;transition:transform .12s ease,border-color .12s ease}
.tile:hover{transform:translateY(-2px);border-color:#2a3142}
.tile .timg{width:100%;aspect-ratio:1/1;object-fit:cover;background:#0f1117;border:1px solid var(--border);border-radius:14px}
.tile .tname{font-weight:700;line-height:1.25}


.grid{display:grid;grid-template-columns:repeat(5,1fr);gap:4px}
.card{display:flex;flex-direction:column;background:var(--card);border:1px solid var(--border);border-radius:16px;overflow:hidden;transition:transform .12s ease, box-shadow .12s ease, border-color .12s ease}
.card:hover{transform:translateY(-2px);border-color:#2a3142;box-shadow:0 8px 22px rgba(0,0,0,.32)}
.thumb{width:100%;aspect-ratio:4/3;object-fit:contain;background:#fff;border-bottom:1px solid var(--border)}
.body{display:flex;flex-direction:column;gap:10px;padding:12px 14px;flex:1;min-height:140px}
.title{font-weight:700;line-height:1.25;word-break:break-word;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.sku{font-size:12px;color:var(--muted)}
.price{font-weight:800}
.actions{margin-top:auto;display:flex;gap:8px;flex-wrap:wrap}
.qty{display:flex;gap:6px;align-items:center}
.qty input{width:60px;background:#0f141c;border:1px solid var(--border);color:#cfe1ff;border-radius:10px;padding:6px 8px}


dialog{border:none;background:transparent}
.product-dialog .sheet{max-width:980px;margin:10vh auto;background:var(--surface);border:1px solid var(--border);border-radius:18px;overflow:hidden}
.sheet-head, .sheet-foot{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;border-bottom:1px solid var(--border)}
.sheet-foot{border-top:1px solid var(--border);border-bottom:none}
.sheet-body{display:grid;grid-template-columns:1fr 1.2fr;gap:16px;padding:14px}
.pd-img{width:100%;aspect-ratio:4/3;object-fit:contain;background:#fff;border:1px solid var(--border);border-radius:12px}
.pd-title{font-size:20px;font-weight:800;line-height:1.25}
.pd-text{color:#dbe9ff}
.folder-close-fab{display:none}


@media (max-width:1200px){
  .grid{display:grid;grid-template-columns:repeat(5,1fr);gap:4px}
  .tiles{display:grid;grid-template-columns:repeat(6,1fr);gap:4px}
}
@media (max-width:980px){
  .app{grid-template-columns:1fr}
  .sidebar{display:none}
  .only-mobile{display:inline-flex}
  .grid{display:grid;grid-template-columns:repeat(5,1fr);gap:4px}
  .tiles{display:grid;grid-template-columns:repeat(6,1fr);gap:4px}
}


.filters{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 12px}
.filter-group{display:flex;gap:8px;flex-wrap:wrap}
.filter-pill{color:#ffffff;background:#0f141c;border:1px solid var(--border);border-radius:999px;padding:6px 10px;cursor:pointer;user-select:none}
.filter-pill.active{background:var(--accent);border-color:#327ecc;color:#0b0d12}



#cartDialog .sheet-body{color:#ffffff}
.cart-row{display:grid;grid-template-columns:1fr auto auto auto auto;gap:10px;align-items:center;padding:8px 0;border-bottom:1px solid var(--border)}
.cart-row .title{white-space:normal;word-break:break-word}
.cart-row .remove{background:#2a3345;border:1px solid var(--border);border-radius:10px;padding:6px 10px;cursor:pointer}
.cart-empty{color:#ffffff;opacity:.85;padding:8px 0}



.pill.active{background:var(--accent);border-color:#327ecc;color:#0b0d12;font-weight:700}


.cart-thumb{width:44px;height:44px;border-radius:8px;object-fit:contain;background:#fff;border:1px solid var(--border)}



.grid{
  gap:8px;
}
@media (max-width: 980px){
  .grid{ grid-template-columns:repeat(3,1fr) !important; }
}




.mini-cart, .mini_cart, .cart-drawer, .cart_drawer, .cart-popup, .cart_popup {
  display: none !important;
  visibility: hidden !important;
}



/* === UI soften & hover polish === */
:root{
  --bg:#1b1f27;
  --surface:#212735;
  --card:#262c3b;
  --border:#2f384a;
  --accent:#3a6ff7;
  --muted:#cfd5e1;
  --good:#3ddc97;
}

/* stronger hover highlight */
.tile,.card{transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease}
.tile:hover,.card:hover{transform:translateY(-3px);border-color:#3a4560;box-shadow:0 10px 26px rgba(0,0,0,.38);background:rgba(255,255,255,0.02)}

/* segmented control (delivery & payment) */
.segmented{display:inline-flex;gap:6px;align-items:center;background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:4px}
.segmented .seg{padding:6px 12px;border-radius:8px;cursor:pointer;user-select:none;border:1px solid transparent;color:#fff;opacity:.9}
.segmented .seg:hover{opacity:1}
.segmented .seg.active{background:var(--accent);border-color:var(--accent);color:#fff;opacity:1}

/* checkout dialog polish */
dialog#checkoutDialog{border:none;border-radius:14px;overflow:hidden;background:var(--surface);color:#fff}
.checkout-head{background:var(--surface);border-bottom:1px solid var(--border)}
.checkout-title{margin:0;font-size:18px}
.checkout-body{display:flex;gap:16px;padding:16px;background:var(--surface)}
.checkout-form{flex:1;display:grid;grid-template-columns:1fr 1fr;gap:12px}
.checkout-summary{width:320px}
.checkout-actions{display:flex;justify-content:flex-end;gap:10px;border-top:1px solid var(--border);padding:12px;background:var(--surface)}

.checkout-form .full{grid-column:1/-1}
.checkout-form input,.checkout-form textarea{
  width:100%;background:var(--card);color:#fff;border:1px solid var(--border);
  border-radius:10px;padding:10px 12px;outline:none;transition:border-color .15s ease, box-shadow .15s ease;
}
.checkout-form input:focus,.checkout-form textarea:focus{border-color:#4b86ff;box-shadow:0 0 0 3px rgba(58,111,247,.25)}
.small-hint{margin-top:6px;color:#aab3c7;font-size:12px}
.btn-ghost{background:transparent;border:1px solid var(--border);color:#fff;border-radius:10px;padding:10px 14px}
.btn-primary{background:var(--accent);border:none;color:#fff;border-radius:10px;padding:10px 14px}
.btn-primary.loading{opacity:.7;pointer-events:none}


/* vfix: uniform tile sizing */
.tiles{align-items:stretch}
.tile{height:100%}

