/* ---------------------------------------------------------------------------
   D'Open Kitchen brand styling
   Palette + type pulled from dopenkitchen.com.sg
--------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Montserrat:wght@400;500;600;700&display=swap');

:root {
  --bg: #f6f2e9;        /* cream */
  --card: #fffdf8;      /* paper */
  --ink: #1f2b27;
  --muted: #6e7c77;
  --line: rgba(29, 75, 70, 0.14);
  --accent: #428073;    /* primary teal */
  --accent-dark: #1d4b46;
  --accent-ink: #ffffff;
  --mint: #80b9a9;
  --mint-soft: #d7e8e1;
  --mint-tint: #eaf3ef;
  --green: #2f6a5c;
  --amber: #b07a2b;
  --shadow: 0 1px 3px rgba(29, 75, 70, 0.06), 0 14px 40px -24px rgba(29, 75, 70, 0.45);
  --radius: 18px;
  --head: "Fraunces", Georgia, serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 680px; margin: 0 auto; padding: 0 16px 140px; }

header.bar {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 16px;
}
.bar-inner { max-width: 680px; margin: 0 auto; }

.brand-row { display: flex; align-items: center; gap: 13px; }
.brand-logo {
  width: 54px; height: 54px; flex: none;
  border-radius: 50%; object-fit: cover;
  background: #fff; border: 1px solid var(--line);
  box-shadow: 0 4px 14px -6px rgba(29, 75, 70, 0.4);
}
.brand-text { min-width: 0; }
.studio-name {
  font-family: var(--head);
  font-size: 25px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--accent-dark); line-height: 1.05;
}
.tagline { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.table-pill {
  display: inline-block; margin-top: 12px;
  background: var(--accent-dark); color: #fff;
  font-size: 13px; font-weight: 600;
  padding: 6px 13px; border-radius: 999px;
}

.cat { margin-top: 28px; }
.cat-title {
  font-family: var(--head);
  font-size: 18px; letter-spacing: 0; color: var(--accent-dark);
  font-weight: 600; margin-bottom: 12px;
}

.item {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 13px 14px;
  display: flex; gap: 13px; align-items: center;
  margin-bottom: 11px; box-shadow: var(--shadow);
}
.item-img {
  width: 76px; height: 76px; flex: none;
  border-radius: 13px; object-fit: cover;
  background: var(--mint-tint); border: 1px solid var(--line);
}
.item-main { flex: 1; min-width: 0; }
.item-name { font-weight: 600; font-size: 16px; }
.item-desc { color: var(--muted); font-size: 13.5px; margin-top: 3px; line-height: 1.45; }
.item-price { font-weight: 600; font-size: 15px; margin-top: 7px; color: var(--accent); }
.item-unavailable { opacity: 0.5; }
.sold-out { font-size: 12px; color: var(--amber); font-weight: 700; }

.qty {
  display: flex; align-items: center; gap: 10px;
  background: var(--mint-tint); border-radius: 999px; padding: 4px;
}
.qty button {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff;
  font-size: 18px; line-height: 1; cursor: pointer; color: var(--accent-dark);
}
.qty button:active { transform: scale(0.94); }
.qty .count { min-width: 18px; text-align: center; font-weight: 600; }
.add-btn {
  border: none; background: var(--accent); color: var(--accent-ink);
  font-weight: 600; font-size: 14px; padding: 9px 16px;
  border-radius: 999px; cursor: pointer;
}
.add-btn:active { transform: scale(0.97); }

/* cart bar */
.cart-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--card); border-top: 1px solid var(--line);
  box-shadow: 0 -4px 24px rgba(29, 75, 70, 0.1);
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  transform: translateY(110%); transition: transform 0.25s ease;
}
.cart-bar.show { transform: translateY(0); }
.cart-inner { max-width: 680px; margin: 0 auto; display: flex; gap: 12px; align-items: center; }
.cart-summary { flex: 1; }
.cart-count { font-size: 13px; color: var(--muted); }
.cart-total { font-size: 18px; font-weight: 700; font-family: var(--head); color: var(--accent-dark); }
.review-btn {
  border: none; background: var(--accent-dark); color: #fff;
  font-weight: 600; font-size: 15px; padding: 14px 22px;
  border-radius: 999px; cursor: pointer;
}

/* modal */
.modal-back {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(29, 75, 70, 0.5); display: none;
  align-items: flex-end; justify-content: center;
}
.modal-back.show { display: flex; }
.modal {
  background: var(--bg); width: 100%; max-width: 680px;
  border-radius: 22px 22px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  max-height: 88vh; overflow-y: auto;
}
.modal h2 { font-family: var(--head); font-weight: 600; color: var(--accent-dark); margin: 4px 0 16px; font-size: 22px; }
.line {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.line-main { flex: 1; }
.line-name { font-weight: 600; }
.line-note-input {
  width: 100%; margin-top: 8px; border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 10px; font-size: 14px;
  font-family: inherit; background: #fff;
}
.line-price { font-weight: 600; white-space: nowrap; color: var(--accent); }
.remove { background: none; border: none; color: var(--amber); font-size: 13px; cursor: pointer; padding: 4px 0; }
.order-note {
  width: 100%; margin-top: 16px; border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; font-size: 14px;
  font-family: inherit; min-height: 60px; background: #fff;
}
.modal-total { display: flex; justify-content: space-between; align-items: center; margin: 18px 2px 16px; font-size: 18px; font-weight: 700; font-family: var(--head); color: var(--accent-dark); }
.place-btn {
  width: 100%; border: none; background: var(--accent); color: #fff;
  font-weight: 700; font-size: 16px; padding: 16px; border-radius: 14px; cursor: pointer;
}
.place-btn:disabled { opacity: 0.5; }
.pay-options { display: flex; flex-direction: column; gap: 10px; }
.place-btn.pay-event { background: var(--accent-dark); }
.place-btn.pay-card { background: var(--accent); }
.notice {
  margin-top: 12px; background: #fff4e2; color: #8a5a00;
  border: 1px solid #f0d9a8; padding: 10px 13px; border-radius: 12px;
  font-size: 13.5px; line-height: 1.4;
}
.close-x { background: none; border: none; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; float: right; }

.empty-note { color: var(--muted); text-align: center; padding: 30px 0; }

/* success screen */
.success { text-align: center; padding: 60px 20px; }
.success .tick {
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 40px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.success h2 { font-family: var(--head); font-weight: 600; color: var(--accent-dark); font-size: 25px; margin: 0 0 8px; }
.success p { color: var(--muted); font-size: 15px; }
.again-btn {
  margin-top: 24px; border: 1px solid var(--line); background: #fff;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; cursor: pointer; font-size: 15px; color: var(--accent-dark);
}
