:root {
  --bg: #faf7f2;
  --card: #ffffff;
  --text: #2b2118;
  --muted: #7a6e63;
  --accent: #8a5a2b;
  --accent-ink: #ffffff;
  --line: #e8e0d5;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1612;
    --card: #25201a;
    --text: #f1e9df;
    --muted: #a99c8e;
    --accent: #d39a5c;
    --accent-ink: #1a1612;
    --line: #3a3229;
  }
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Prompt", system-ui, sans-serif; background: var(--bg); color: var(--text); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); font-size: .9rem; }

.top { position: sticky; top: 0; background: var(--bg); border-bottom: 1px solid var(--line); z-index: 5; }
.top-inner { display: flex; justify-content: space-between; align-items: center; height: 60px; }
.brand { font-weight: 600; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.cart-btn { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 999px; padding: 8px 16px; font: inherit; cursor: pointer; }
.cart-btn span { background: var(--accent-ink); color: var(--accent); border-radius: 999px; padding: 0 8px; margin-left: 4px; }

.hero { padding: 48px 0 32px; }
.hero h1 { margin: 0 0 8px; font-size: clamp(1.6rem, 4vw, 2.4rem); }
.hero p { margin: 0; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; padding-bottom: 48px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.card .pic { aspect-ratio: 4/3; display: grid; place-items: center; font-size: 3.5rem; background: var(--line); }
.card .body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 { margin: 0; font-size: 1.05rem; }
.card .price { font-weight: 600; color: var(--accent); }
.card button { margin-top: auto; }

.primary, .ghost { width: 100%; padding: 12px; border-radius: 10px; font: inherit; cursor: pointer; }
.primary { background: var(--accent); color: var(--accent-ink); border: 0; }
.primary:disabled { opacity: .45; cursor: not-allowed; }
.ghost { background: transparent; color: var(--muted); border: 0; margin-top: 6px; }

.foot { border-top: 1px solid var(--line); padding: 24px 0; }
.foot p { margin: 4px 0; }

.overlay { position: fixed; inset: 0; background: rgb(0 0 0 / .4); z-index: 9; }
.drawer { position: fixed; top: 0; right: 0; height: 100%; width: min(400px, 100%); background: var(--card); z-index: 10; padding: 16px; overflow-y: auto; transform: translateX(100%); transition: transform .25s ease; }
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; }
.drawer-head h2 { margin: 0; font-size: 1.2rem; }
.icon { background: none; border: 0; font-size: 1.2rem; color: var(--text); cursor: pointer; }

.lines { list-style: none; padding: 0; margin: 16px 0; }
.lines li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.qty { display: flex; align-items: center; gap: 6px; }
.qty button { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); cursor: pointer; }
.sum { display: flex; justify-content: space-between; margin: 6px 0; }
.total { font-weight: 600; font-size: 1.1rem; margin-bottom: 16px; }

form label { display: block; margin: 12px 0; font-size: .95rem; }
form input, form textarea { display: block; width: 100%; margin-top: 4px; padding: 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; }

#stepPay { text-align: center; }
#qr { display: block; margin: 12px auto; background: #fff; padding: 8px; border-radius: 12px; }
