:root {
  --green: #1f8a34;
  --green-dark: #0f5e20;
  --black: #171717;
  --yellow: #f4c300;
  --bg: #f4f3ee;
  --card: #ffffff;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --danger: #c0392b;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  padding-bottom: 84px; /* room for sticky cart bar */
}

a { color: inherit; }

.hidden { display: none !important; }

header.top {
  background: var(--black);
  color: white;
  padding: 14px 16px calc(14px + env(safe-area-inset-top, 0px));
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 20;
}

header.top img.logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: white;
}

header.top .brand {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

header.top .brand strong { font-size: 17px; }
header.top .brand span { font-size: 12px; color: #cfcfcf; }

header.top .call-btn {
  margin-left: auto;
  background: var(--green);
  color: white;
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 12px 14px 24px;
}

.info-strip {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  margin: 12px 0;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.info-strip b { color: var(--text); }

.day-banner {
  background: var(--yellow);
  color: var(--black);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 13px;
  border-radius: 10px;
  padding: 8px 12px;
  margin: 10px 0 4px;
  display: inline-block;
}

.category h2 {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green-dark);
  margin: 22px 0 10px;
  border-bottom: 2px solid var(--yellow);
  padding-bottom: 6px;
}

.item-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.item-card .item-info { flex: 1; min-width: 0; }
.item-card .item-name { font-weight: 700; font-size: 15px; }
.item-card .item-desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.item-card .item-price { font-size: 13.5px; color: var(--green-dark); font-weight: 700; margin-top: 4px; }
.item-card .item-price.market { color: var(--danger); }
.item-card .item-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f2f2f2;
}
.sheet-photo {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 12px;
  display: block;
}

.add-btn {
  background: var(--green);
  color: white;
  border: none;
  border-radius: 999px;
  width: 38px;
  height: 38px;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
  cursor: pointer;
}
.add-btn:active { transform: scale(0.94); }
.add-btn:disabled { background: #bbb; }

.call-inline {
  font-size: 12.5px;
  color: var(--green-dark);
  font-weight: 700;
  text-decoration: none;
  flex-shrink: 0;
  border: 1.5px solid var(--green);
  padding: 6px 10px;
  border-radius: 999px;
}

/* Sticky cart bar */
.cart-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--green);
  color: white;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 -2px 14px rgba(0,0,0,0.18);
  z-index: 30;
  cursor: pointer;
  border: none;
  width: 100%;
  font: inherit;
}
.cart-bar strong { font-size: 15px; }
.cart-bar span.count {
  background: white;
  color: var(--green-dark);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 12.5px;
  font-weight: 800;
  margin-right: 8px;
}

/* Modal / sheet */
.sheet-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  background: var(--bg);
  width: 100%;
  max-width: 640px;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 18px 18px 0 0;
  padding: 16px 16px calc(24px + env(safe-area-inset-bottom, 0px));
}
.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.sheet-header h3 { margin: 0; font-size: 17px; }
.close-btn {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1.5px solid #ddd;
  font-size: 15px;
  font-family: inherit;
  background: white;
}
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.field .error { font-size: 12px; color: var(--danger); margin-top: 4px; display: none; }

/* Delivery address autocomplete dropdown (Google Places suggestions) */
.address-autocomplete-wrap { position: relative; }
.address-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: white;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  z-index: 40;
  max-height: 220px;
  overflow-y: auto;
}
.address-suggestions.hidden { display: none; }
.address-suggestion {
  padding: 10px 12px;
  font-size: 14px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
}
.address-suggestion:last-child { border-bottom: none; }
.address-suggestion:hover,
.address-suggestion:active { background: #f5f5f5; }

.radio-group { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-pill {
  border: 1.5px solid #ddd;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 13.5px;
  cursor: pointer;
  background: white;
  user-select: none;
}
.radio-pill.selected {
  border-color: var(--green);
  background: var(--green);
  color: white;
  font-weight: 700;
}
.radio-pill.pill-disabled {
  opacity: 0.4;
  pointer-events: none;
}
.radio-pill.payment-pill-logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.payment-logo {
  height: 16px;
  width: auto;
  display: block;
}
.digiwallet-sheet-logo {
  display: block;
  height: 40px;
  width: auto;
  margin: 0 auto 12px;
}

.side-options { display: flex; flex-wrap: wrap; gap: 8px; }

.cart-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #e7e6e0;
}
.cart-line .qty-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.qty-btn {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--green);
  background: white;
  color: var(--green-dark);
  font-weight: 800;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.cart-line .line-info { flex: 1; }
.cart-line .line-name { font-weight: 700; font-size: 14px; }
.cart-line .line-side { font-size: 12px; color: var(--muted); }
.cart-line .line-price { font-weight: 700; font-size: 14px; }
.remove-link { font-size: 12px; color: var(--danger); background: none; border: none; cursor: pointer; padding: 4px; }
.link-btn { font-size: inherit; color: var(--green-dark); background: none; border: none; cursor: pointer; padding: 0; font-weight: 700; text-decoration: underline; }

.totals-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 4px 0;
}
.totals-row.grand { font-size: 17px; font-weight: 800; border-top: 1.5px solid #ddd; margin-top: 8px; padding-top: 10px; }

.primary-btn {
  width: 100%;
  background: var(--green);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  margin-top: 6px;
}
.primary-btn:disabled { background: #bbb; cursor: not-allowed; }
.secondary-btn {
  width: 100%;
  background: white;
  color: var(--text);
  border: 1.5px solid #ddd;
  border-radius: 12px;
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
}

.banner-msg {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  margin-bottom: 12px;
}
.banner-msg.error { background: #fdecea; color: var(--danger); }
.banner-msg.success { background: #e9f7ec; color: var(--green-dark); }

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 40px 20px;
  font-size: 14px;
}

.order-status-page { max-width: 480px; margin: 40px auto; padding: 0 16px; text-align: center; }
.status-badge {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  margin: 14px 0;
}
.status-RECEIVED { background: #fff4d6; color: #8a6d00; }
.status-COOKING { background: #ffe4c4; color: #a15c00; }
.status-READY { background: #d6f5da; color: var(--green-dark); }
.status-COMPLETED { background: #e2e2e2; color: #444; }
.status-CANCELLED { background: #fdecea; color: var(--danger); }

.spinner {
  width: 22px; height: 22px;
  border: 3px solid #ddd;
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

footer.foot {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 20px 16px 12px;
}
