/* Customer-facing pages: mobile-locked layout. The content column is capped
   at phone width and centered, so the page looks like a mobile app whether
   it is opened on a phone or a desktop browser. */
* { box-sizing: border-box; }
html { background: #e8e9ec; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  margin: 0 auto; max-width: 480px; min-height: 100vh;
  background: #fafafa; color: #1a1a1a; padding-bottom: 100px;
  box-shadow: 0 0 24px rgba(0,0,0,.08);
}

img.banner { width: 100%; max-height: 220px; object-fit: cover; display: block; }

header.resto { background: #1f2430; color: #fff; padding: 14px 16px; }
header.resto .name { font-weight: 700; font-size: 16px; }
header.resto .table { font-size: 13px; color: #cfd3dc; margin-top: 2px; }

.searchwrap { padding: 10px 14px 0; background: #fff; }
.searchwrap input { width: 100%; padding: 10px 14px; border-radius: 20px; border: 1px solid #ddd; background: #f4f5f7; font-size: 14px; }
.searchwrap input:focus { outline: none; border-color: #4da3ff; background: #fff; }

.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 12px; background: #fff; position: sticky; top: 0; z-index: 5; border-bottom: 1px solid #eee; white-space: nowrap; }
.tabs a { padding: 7px 14px; border-radius: 16px; background: #f0f0f0; color: #333; text-decoration: none; font-size: 13px; }
.tabs a.active { background: #1f2430; color: #fff; }

section.cat { padding: 6px 14px; }
section.cat h2 { font-size: 15px; margin: 16px 0 8px; }

.item { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 10px; padding: 10px; margin-bottom: 8px; box-shadow: 0 1px 2px rgba(0,0,0,.05); cursor: pointer; }
.item-img { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: #eee; }
.item-body { flex: 1; min-width: 0; }
.item .name { font-weight: 600; font-size: 14px; }
.item .desc { font-size: 12px; color: #888; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .price { font-size: 13px; color: #444; margin-top: 4px; }
.item .add-btn { width: 32px; height: 32px; border-radius: 50%; border: none; background: #1f2430; color: #fff; font-size: 18px; flex-shrink: 0; cursor: pointer; }

.stepper { display: flex; align-items: center; gap: 8px; }
.stepper button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid #ccc; background: #fff; font-size: 16px; cursor: pointer; }
.stepper .qty { min-width: 22px; text-align: center; font-size: 15px; font-weight: 600; }

/* floating checkout bar */
.cartbar {
  position: fixed; left: 50%; transform: translateX(-50%) translateY(0); bottom: 14px; width: calc(100% - 28px); max-width: 452px;
  background: #1f2430; color: #fff; padding: 10px 10px 10px 18px; border-radius: 16px;
  display: none; align-items: center; gap: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.25); z-index: 15;
}
.cartbar.show { display: flex; }
.cartbar .cart-icon { position: relative; flex-shrink: 0; }
.cartbar .cart-icon svg { width: 22px; height: 22px; display: block; }
.cartbar .cart-badge { position: absolute; top: -8px; right: -8px; background: #ff5a7a; color: #fff; font-size: 10px; font-weight: 700; border-radius: 50%; min-width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; padding: 0 3px; }
.cartbar .cartbar-total { flex: 1; font-weight: 700; font-size: 14px; }
.cartbar .cartbar-total small { display: block; font-weight: 400; font-size: 11px; color: #cfd3dc; }
.cartbar button.checkout-btn { background: #4da3ff; color: #fff; border: none; padding: 12px 20px; border-radius: 12px; font-size: 14px; font-weight: 600; cursor: pointer; }

.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: none; align-items: flex-end; justify-content: center; z-index: 30; }
.overlay.show { display: flex; }
.sheet { background: #fff; width: 100%; max-width: 480px; max-height: 88vh; overflow-y: auto; border-radius: 14px 14px 0 0; padding: 18px; }
.sheet h3 { margin-top: 0; }
.sheet .line { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f0f0f0; font-size: 14px; gap: 8px; }
.sheet .line .line-info { flex: 1; min-width: 0; }
.sheet .line .line-mods, .sheet .line .line-note { font-size: 12px; color: #888; margin-top: 2px; }
.sheet .line .line-remove { background: none; border: none; color: #c0392b; font-size: 12px; cursor: pointer; padding: 0; height: fit-content; }
.sheet label { display: block; font-size: 13px; color: #555; margin-top: 10px; }
.sheet input[type=text], .sheet input[type=tel], .sheet textarea { width: 100%; padding: 9px 10px; font-size: 15px; border: 1px solid #ccc; border-radius: 6px; margin-top: 4px; font-family: inherit; }
.paychoice { display: flex; gap: 8px; margin-top: 6px; }
.paychoice label { flex: 1; border: 1px solid #ccc; border-radius: 8px; padding: 10px; text-align: center; font-size: 14px; color: #333; cursor: pointer; margin-top: 0; }
.paychoice input { display: none; }
.paychoice label.picked { border-color: #1f2430; background: #1f2430; color: #fff; }
.sheet .totals { margin-top: 10px; font-size: 13px; }
.sheet .totals .trow { display: flex; justify-content: space-between; padding: 3px 0; color: #666; }
.sheet .totals .trow.grand { font-weight: 700; color: #1a1a1a; font-size: 15px; border-top: 1px solid #eee; padding-top: 6px; margin-top: 4px; }
.sheet .actions { display: flex; gap: 8px; margin-top: 14px; }
.sheet .actions button { flex: 1; padding: 12px; border-radius: 6px; border: none; font-size: 14px; cursor: pointer; }
.sheet .close { background: #eee; }
.sheet .confirm { background: #1f2430; color: #fff; }

/* product detail overlay */
.detail-img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 10px; margin-bottom: 12px; background: #eee; }
.detail-price { font-size: 18px; font-weight: 700; color: #1f2430; }
.detail-desc { font-size: 13px; color: #666; margin: 6px 0 0; line-height: 1.5; }
.modgroup { margin-top: 16px; }
.modgroup-title { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.modgroup-title .req { color: #c0392b; font-size: 11px; font-weight: 400; }
.modgroup-title .hint { color: #888; font-size: 11px; font-weight: 400; }
.modopt { display: flex; align-items: center; gap: 8px; padding: 8px 0; font-size: 14px; border-bottom: 1px solid #f5f5f5; cursor: pointer; margin-top: 0 !important; }
.modopt input { width: auto !important; margin: 0; }
.modopt .delta { color: #888; font-size: 12px; margin-left: auto; }
.notelabel textarea { margin-top: 4px; }

.empty { padding: 40px 16px; text-align: center; color: #888; }

/* payment page */
.paywrap { padding: 24px 16px; text-align: center; }
.paywrap .card { background: #fff; border-radius: 12px; padding: 20px 16px; box-shadow: 0 1px 3px rgba(0,0,0,.08); margin-bottom: 14px; }
.paycode { font-family: "Courier New", monospace; font-size: 36px; font-weight: 700; letter-spacing: 6px; margin: 10px 0; }
.paywrap img.qris { width: 100%; max-width: 300px; height: auto; }
.badge-paid { display: inline-block; background: #1e7a34; color: #fff; border-radius: 20px; padding: 8px 20px; font-size: 15px; }
.badge-wait { display: inline-block; background: #ffe6b3; color: #7a5b00; border-radius: 20px; padding: 8px 20px; font-size: 14px; }
.hint { font-size: 13px; color: #777; margin-top: 8px; }
.paywrap .totals { text-align: left; font-size: 13px; margin-top: 10px; }
.paywrap .totals .trow { display: flex; justify-content: space-between; padding: 3px 0; color: #666; }
.paywrap .totals .trow.grand { font-weight: 700; color: #1a1a1a; font-size: 15px; border-top: 1px solid #eee; padding-top: 6px; margin-top: 4px; }
