/* Mobile-first minimal UI */
:root {
  --bg: #ffffff;
  --fg: #111827;
  --muted: #6b7280;
  --primary: #2563eb;
  --danger: #ef4444;
  --surface: #f3f4f6;
  --card: #ffffff;
  --border: #e5e7eb;
}

* { box-sizing: border-box; }
html, body { margin:0; padding:0; background:var(--bg); color:var(--fg); font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Inter,Helvetica,Arial,sans-serif; }
a { color: var(--primary); text-decoration: none; }
.container { max-width: 980px; margin: 0 auto; padding: 16px; }

.topbar { position: sticky; top:0; background: var(--bg); border-bottom: 1px solid var(--border); z-index: 10; }
.topbar .container { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.brand a { font-weight:700; font-size: 18px; color: var(--fg); }

.btn { display:inline-flex; align-items:center; justify-content:center; padding:10px 14px; background: var(--primary); color:#fff; border-radius: 12px; border:1px solid var(--primary); cursor:pointer; font-weight:600; }
.btn:hover { filter: brightness(0.95); }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--border); }
.btn.danger { background: var(--danger); border-color: var(--danger); }

.badge { background:#111827; color:#fff; padding:2px 8px; border-radius: 999px; font-size: 12px; margin-left: 6px; }

.searchbar { display:flex; gap:8px; margin: 16px 0; }
.searchbar input, .searchbar select, input, textarea { width:100%; padding:12px; border:1px solid var(--border); border-radius:12px; background:#fff; }
.searchbar button { white-space:nowrap; }

.grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:12px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }

.card { background: var(--card); border:1px solid var(--border); border-radius: 16px; overflow:hidden; }
.card img { width:100%; height:180px; object-fit:cover; }
.card-body { padding: 12px; }
.card h3 { margin: 0 0 6px 0; font-size:16px; }
.card .price { font-weight:700; margin: 0 0 6px 0; }
.card .desc { color: var(--muted); font-size: 14px; min-height: 40px; }
.qty-row { display:flex; gap:8px; }
.qty-row input { max-width: 90px; }

.footer { background: var(--surface); border-top:1px solid var(--border); margin-top:24px; }
.footer .container { padding: 16px; font-size:14px; color:var(--muted); }

.alert { padding:12px; border-radius:12px; margin: 12px 0; }
.alert.success { background: #ecfdf5; border:1px solid #10b981; color:#065f46; }
.alert.danger { background: #fef2f2; border:1px solid #ef4444; color:#7f1d1d; }

.table { width:100%; border-collapse: collapse; background:#fff; border-radius: 12px; overflow:hidden; border:1px solid var(--border); }
.table th, .table td { padding: 10px; border-bottom:1px solid var(--border); vertical-align: top; }
.table thead th { background: var(--surface); text-align:left; }
.t-right { text-align:right; }
.t-center { text-align:center; }
.thumb { width:56px; height:56px; object-fit:cover; border-radius:10px; margin-right:10px; }
.row { display:flex; align-items:center; gap:10px; }
.split { display:grid; grid-template-columns: 1fr; gap:16px; }
@media (min-width: 900px) { .split { grid-template-columns: 2fr 1fr; } }
.cards { display:grid; grid-template-columns: 1fr; gap:12px; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(3,1fr); } }
.pad { padding: 12px; }

.qty-input { width:80px; text-align:center; }

.actions { display:flex; gap:8px; margin:12px 0; }
.checkout-form { display:grid; gap:8px; max-width: 640px; }
.muted { color: var(--muted); font-size: 12px; }
