body{font-family:system-ui,Arial,Helvetica,sans-serif;margin:0;padding:0;background:#0e141b;color:#e6edf3}
header{padding:16px 16px 8px;border-bottom:1px solid #1f2630}
h1{margin:0;font-size:20px}

main{padding:12px;display:grid;gap:12px}

#categories{display:flex;gap:8px;overflow-x:auto;padding-bottom:6px;scroll-snap-type:x mandatory}
#categories::-webkit-scrollbar{display:none}
.cat{flex:0 0 auto;scroll-snap-align:center;padding:8px 12px;border:1px solid #2b3340;border-radius:999px;cursor:pointer;white-space:nowrap;background:#111722}
.cat.active{background:#1a2533;border-color:#344459}

#products{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}

.card{border:1px solid #2b3340;border-radius:12px;overflow:hidden;background:#0f1622;display:flex;flex-direction:column}
.card img{width:100%;height:120px;object-fit:cover}
.card .body{padding:10px;display:grid;gap:6px}
.card .name{font-weight:700;line-height:1.2;min-height:34px}
.card .meta{font-size:12px;opacity:.8}
.card .row{display:flex;justify-content:space-between;align-items:center}
.card button{padding:8px 10px;border-radius:10px;border:1px solid #2b3340;background:#141b23;color:#e6edf3;cursor:pointer;font-weight:600}

#cart{border-top:1px solid #1f2630;padding-top:8px}
#cart-list{display:grid;gap:6px;margin-bottom:8px}
.cart-row{display:flex;justify-content:space-between;align-items:center;border:1px dashed #2b3340;border-radius:8px;padding:6px}
.qty{display:flex;gap:6px;align-items:center}
.qty button{width:26px;height:26px;border-radius:6px}
textarea{width:100%;min-height:70px;background:#0b1117;color:#e6edf3;border:1px solid #2b3340;border-radius:8px;padding:8px}
.total{font-size:18px;font-weight:700;margin:8px 0}
#submit{padding:10px 14px;border-radius:10px;border:1px solid #2b3340;background:#1a2533;color:#e6edf3;cursor:pointer;font-weight:600}

/* мини-диалог выбора варианта */
.modal{position:fixed;inset:0;background:rgba(0,0,0,.5);display:none;align-items:flex-end}
.modal.show{display:flex}
.sheet{background:#0f1622;border-top-left-radius:14px;border-top-right-radius:14px;width:100%;padding:12px;border-top:1px solid #2b3340}
.sheet h3{margin:0 0 8px 0}
.variant{padding:10px;border:1px solid #2b3340;border-radius:10px;margin-bottom:8px;cursor:pointer}
.variant.active{background:#1a2533;border-color:#3a4a60}
.sheet .actions{display:flex;gap:8px;justify-content:flex-end}
.sheet .actions button{padding:10px 14px;border-radius:10px;border:1px solid #2b3340;background:#141b23;color:#e6edf3;cursor:pointer}

.modal{position:fixed;inset:0;background:rgba(0,0,0,.5);display:none;align-items:flex-end;z-index:1000}
.modal.show{display:flex}
.sheet{background:#0f1622;border-top-left-radius:14px;border-top-right-radius:14px;width:100%;padding:12px;border-top:1px solid #2b3340;max-height:85vh;overflow:auto}
.sheet .cover{width:100%;height:180px;border-radius:10px;overflow:hidden;margin-bottom:10px;border:1px solid #2b3340}
.sheet .cover img{width:100%;height:100%;object-fit:cover}
.sheet h3{margin:0 0 6px 0}
.sheet p.desc{margin:0 0 8px 0;opacity:.85}

.variant-row{display:flex;align-items:center;justify-content:space-between;border:1px solid #2b3340;border-radius:10px;padding:10px;margin-bottom:8px;gap:10px}
.variant-info{display:grid;gap:4px}
.variant-title{font-weight:600}
.variant-sub{font-size:12px;opacity:.8}
.variant-price{white-space:nowrap;font-weight:700}
.variant-ctrl{display:flex;align-items:center;gap:8px}
.variant-ctrl input[type="number"]{width:52px;background:#0b1117;color:#e6edf3;border:1px solid #2b3340;border-radius:8px;padding:6px;text-align:center}

.sheet .actions{display:flex;gap:8px;justify-content:flex-end;margin-top:8px}
.sheet .actions button{padding:10px 14px;border-radius:10px;border:1px solid #2b3340;background:#141b23;color:#e6edf3;cursor:pointer}