:root { --red: #b11c1c; --red-dark: #8c1515; --ink: #1f2937; --muted: #6b7280; --line: #e5e7eb; --bg: #fffbf5; }
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: 12px; align-items: center; min-width: 0; }
.brand-photo { width: 56px; height: 56px; object-fit: cover; border-radius: 12px; }
.brand h1 { margin: 0; font-size: 20px; color: var(--red-dark); }
.brand p { margin: 2px 0 0; font-size: 12.5px; }
.muted { color: var(--muted); font-size: 12.5px; }
.top-actions { display: flex; gap: 8px; flex-shrink: 0; }
button { cursor: pointer; border-radius: 10px; border: 1px solid var(--line); background: #fff; padding: 8px 12px; font-size: 14px; }
button.primary { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; }
button.primary:disabled { opacity: .5; cursor: default; }
button.ghost { background: transparent; }
button.small { padding: 5px 10px; font-size: 13px; }
button.big { width: 100%; padding: 14px; font-size: 16px; margin-top: 12px; }
.badge { background: #fff; color: var(--red); border-radius: 999px; padding: 0 7px; font-weight: 700; }
.install-banner, .install-how { margin: 10px 16px 0; padding: 10px 14px; background: #fef3c7; border: 1px solid #f59e0b; border-radius: 12px; display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: 14px; }
.install-how { display: block; line-height: 1.6; }
.cat-nav { position: sticky; top: 77px; z-index: 15; display: flex; gap: 8px; overflow-x: auto; padding: 8px 16px; background: var(--bg); }
.cat-nav a { white-space: nowrap; text-decoration: none; color: var(--ink); background: #fff; border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; font-size: 13.5px; }
main { padding: 4px 16px 90px; max-width: 1100px; margin: 0 auto; }
main h2 { color: var(--red-dark); margin: 22px 0 10px; font-size: 19px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.card img { width: 100%; height: 160px; object-fit: cover; }
.tile { height: 160px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #fee2e2, #fef3c7); }
.tile span { font-size: 34px; font-weight: 800; color: var(--red); letter-spacing: 1px; }
.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; }
.card h3 { margin: 0; font-size: 15.5px; line-height: 1.3; }
.fav { border: none; background: none; font-size: 19px; padding: 0 2px; color: #9ca3af; }
.fav.on { color: var(--red); }
.zh { margin: 0; color: var(--muted); font-size: 12.5px; }
.desc { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.card-foot { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; align-items: center; }
.price { font-weight: 700; font-size: 15.5px; }
.stepper { display: inline-flex; align-items: center; gap: 8px; }
.stepper button { padding: 3px 10px; font-size: 15px; }
.drawer { position: fixed; top: 0; right: 0; z-index: 30; width: min(430px, 100vw); height: 100dvh; overflow-y: auto; background: #fff; box-shadow: -6px 0 24px rgba(0,0,0,.18); padding: 16px; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; }
.drawer h2 { margin: 4px 0; }
.drawer h3 { margin: 18px 0 8px; font-size: 15px; }
.drawer label { display: block; margin: 8px 0; font-size: 13.5px; }
.drawer input[type="text"], .drawer input:not([type]) , .drawer input[type="tel"], .drawer input[type="password"] { width: 100%; padding: 9px; border: 1px solid var(--line); border-radius: 8px; margin-top: 4px; font-size: 14px; }
#addr-form input, #pay-form input { padding: 7px; border: 1px solid var(--line); border-radius: 8px; margin: 2px 0; }
.fulfil-toggle { display: flex; gap: 8px; margin: 10px 0; }
.seg { flex: 1; }
.seg.active { background: var(--red); color: #fff; border-color: var(--red); font-weight: 600; }
.line { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.totals { margin-top: 12px; border-top: 2px solid var(--line); padding-top: 10px; }
.totals div { display: flex; justify-content: space-between; padding: 3px 0; font-size: 14px; }
.totals .grand { font-weight: 800; font-size: 17px; }
.loyalty { color: #92400e; font-size: 13.5px; min-height: 18px; margin-top: 8px; }
.pay-opt { border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; }
.note { background: #eff6ff; border: 1px solid #93c5fd; border-radius: 10px; padding: 10px; font-size: 13.5px; line-height: 1.5; }
.msg { color: var(--red); font-size: 13.5px; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 50; background: #111827; color: #fff; padding: 12px 18px; border-radius: 12px; max-width: min(560px, 92vw); font-size: 14.5px; line-height: 1.45; box-shadow: 0 8px 30px rgba(0,0,0,.3); }
/* option picker */
.modal { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; }
.modal[hidden] { display: none; }
.modal-card { background: #fff; width: min(560px, 100vw); max-height: 88dvh; overflow-y: auto; border-radius: 16px 16px 0 0; padding: 16px; }
@media (min-width: 640px) { .modal { align-items: center; } .modal-card { border-radius: 16px; } }
.modal-card h2 { margin: 4px 0; font-size: 18px; }
.opt-group { margin: 14px 0; }
.opt-group h4 { margin: 0 0 4px; font-size: 14.5px; }
.opt-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; margin: 6px 0; font-size: 14px; cursor: pointer; background: #fff; }
.opt-row.off { opacity: .45; }
.picker-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; position: sticky; bottom: 0; background: #fff; padding-top: 10px; }
.line-opts { display: block; color: var(--muted); font-size: 12.5px; }
.opts { font-size: 12.5px; color: var(--muted); padding: 0 0 6px 14px; }
/* store board */
.order-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin: 12px 0; }
.order-card.done { opacity: .55; }
.order-card h3 { margin: 0 0 4px; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #fee2e2; color: var(--red-dark); }
.tag.ok { background: #dcfce7; color: #166534; }
.tag.warn { background: #fef3c7; color: #92400e; }
.order-card .actions { display: flex; gap: 8px; margin-top: 10px; }
