/* Features page — interactive ordering concept preview (sample brunch & acai cafe).
   Lives inside the shared .iphone frame from style.css; everything app-side is scoped to .md-app. */

.md-section .detail-copy .md-try { margin-top: 16px; font-weight: 600; color: var(--color-primary); }
.md-section .detail-copy .md-note { margin-top: 18px; font-size: 0.86rem; color: var(--color-text-muted); }

.md-section { overflow: hidden; } /* clip the phone glow so it can't widen the page on mobile */
.md-stage { width: min(340px, 100%); }
.md-stage .iphone,
.md-stage:hover .iphone { transform: none; }

.md-app {
  --md-green: #23644a;
  --md-green-soft: #e4eee8;
  --md-ink: #15201b;
  --md-muted: #6b7470;
  --md-line: #e7ebe8;
  --md-soft: #f5f7f5;
  font-family: var(--font-body);
  color: var(--md-ink);
  -webkit-font-smoothing: antialiased;
  text-align: left;
}
:where(.md-app button) {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: inherit;
  -webkit-tap-highlight-color: transparent;
}
.md-app img { height: auto; }
.md-app .iphone-statusbar, .md-app .iphone-island { z-index: 6; } /* undo the frame's full-bleed screenshot rule */
:where(.md-app button):focus-visible { outline: 2px solid var(--md-green); outline-offset: 2px; }
.md-app svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Header */
.md-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 86px;
  padding: 40px 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: #fff;
  z-index: 3;
}
.md-header-logo { width: 34px; height: 34px; padding: 2px; }
.md-header-logo img { width: 100%; height: 100%; display: block; }
.md-location { display: flex; align-items: center; gap: 4px; font-size: 0.72rem; font-weight: 700; }
.md-location svg { width: 13px; height: 13px; color: var(--md-green); }
.md-location .md-caret { width: 10px; height: 10px; color: var(--md-ink); }
.md-header-actions { display: flex; gap: 5px; }
.md-circle {
  position: relative;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #f0f2f0;
  display: flex; align-items: center; justify-content: center;
}
.md-circle svg { width: 16px; height: 16px; }
.md-badge {
  position: absolute;
  top: -3px; right: -3px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}
.md-badge[hidden] { display: none; }

/* Scrolling view area */
.md-view {
  position: absolute;
  top: 86px; left: 0; right: 0; bottom: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  background: #fafbfa;
  padding: 10px 14px 96px;
}
.md-view::-webkit-scrollbar { display: none; }
.md-h1 { font-family: var(--font-body); color: var(--md-ink); font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 12px; }
.md-titlebar { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.md-titlebar .md-h1 { margin: 0; }
.md-back {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-left: -6px;
}
.md-back svg { width: 16px; height: 16px; }
.md-muted { color: var(--md-muted); }

/* Home */
.md-view.is-home {
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: #5aa6e6 url("../images/menu-demo/promo-watermelon.webp") center top / cover no-repeat;
}
.md-home-card {
  margin: 0 12px 78px;
  padding: 16px 14px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.94);
}
.md-eyebrow { font-size: 0.56rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--md-green); }
.md-greeting { font-size: 1.06rem; font-weight: 800; letter-spacing: -0.02em; margin: 6px 0 8px; }
.md-points { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.md-points strong { font-size: 2.1rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--md-green); }
.md-points span { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.04em; color: var(--md-green); }
.md-pill {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1.5px solid var(--md-green);
  transition: transform 0.15s ease, background 0.15s ease;
}
.md-pill + .md-pill { margin-top: 8px; }
.md-pill svg { width: 15px; height: 15px; }
.md-pill:active { transform: scale(0.98); }
.md-pill-fill { background: var(--md-green); color: #fff; }
.md-pill-line { color: var(--md-green); background: #fff; }
.md-pill:disabled { opacity: 0.45; cursor: default; }

/* Menu categories */
.md-cat-row {
  width: 100%;
  display: grid;
  grid-template-columns: 44% 1fr 14px;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--md-line);
}
.md-cat-row img { width: 100%; aspect-ratio: 1.2; object-fit: cover; border-radius: 6px; display: block; }
.md-cat-row strong { display: block; font-size: 0.92rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.15; }
.md-cat-row span { display: block; margin-top: 4px; font-size: 0.7rem; color: var(--md-muted); }
.md-cat-row svg { width: 14px; height: 14px; }

/* Category items */
.md-item-card {
  width: 100%;
  display: block;
  padding: 9px;
  border: 1px solid var(--md-line);
  border-radius: 10px;
  background: #fff;
  margin-bottom: 10px;
}
.md-item-card img { width: 100%; aspect-ratio: 1.55; object-fit: cover; border-radius: 7px; display: block; }
.md-item-card strong { display: block; margin: 9px 0 3px; font-size: 0.86rem; font-weight: 800; letter-spacing: -0.01em; }
.md-item-card p { font-size: 0.68rem; line-height: 1.4; color: var(--md-muted); margin: 0 0 6px; }
.md-item-card b { font-size: 0.74rem; font-weight: 700; }

/* Item detail */
.md-view.is-item { padding: 0 0 96px; background: #fff; }
.md-item-hero { position: relative; }
.md-item-hero img { width: 100%; aspect-ratio: 1.25; object-fit: cover; display: block; }
.md-item-hero .md-back {
  position: absolute;
  top: 10px; left: 16px;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.md-item-body { padding: 14px 14px 0; }
.md-item-body .md-h1 { margin-bottom: 6px; }
.md-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 8px; }
.md-tag { font-size: 0.58rem; font-weight: 700; padding: 3px 8px; border-radius: 100px; background: var(--md-green-soft); color: var(--md-green); }
.md-item-body p { font-size: 0.72rem; line-height: 1.45; color: var(--md-muted); margin: 0 0 8px; }
.md-price { font-size: 0.86rem; font-weight: 800; }
.md-group-head { display: flex; justify-content: space-between; align-items: baseline; margin: 16px 0 8px; }
.md-group-head strong { font-size: 0.86rem; font-weight: 800; }
.md-group-head span { font-size: 0.62rem; color: var(--md-muted); }
.md-mods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.md-mod {
  position: relative;
  padding: 5px 5px 7px;
  border: 1.5px solid var(--md-line);
  border-radius: 9px;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.md-mod img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; display: block; margin-bottom: 5px; }
.md-mod strong { display: block; font-size: 0.6rem; font-weight: 700; line-height: 1.2; }
.md-mod span { display: block; font-size: 0.56rem; color: var(--md-muted); margin-top: 2px; }
.md-mod.is-on { border-color: var(--md-green); background: var(--md-green-soft); }
.md-mod.is-on::after {
  content: "";
  position: absolute;
  top: 8px; right: 8px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--md-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2 7 10.6l4.6-5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}

/* Bottom action bar (item + bag views) */
.md-cta {
  position: absolute;
  left: 12px; right: 12px; bottom: 14px;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 100px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(16,30,24,0.16), 0 0 0 1px rgba(16,30,24,0.05);
  z-index: 4;
}
.md-app.show-cta .md-cta { display: flex; }
.md-cta .md-pill { justify-content: center; gap: 6px; padding: 10px 14px; }
.md-qty { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.md-qty button {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--md-soft);
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1;
}
.md-qty span { min-width: 18px; text-align: center; font-size: 0.78rem; font-weight: 700; }

/* Floating tab bar */
.md-tabbar {
  position: absolute;
  left: 10px; right: 10px; bottom: 12px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 4px;
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(16,30,24,0.14), 0 0 0 1px rgba(16,30,24,0.05);
  z-index: 4;
}
.md-app.show-cta .md-tabbar { display: none; }
.md-tabbar button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 7px 0 6px;
  border-radius: 24px;
  font-size: 0.56rem;
  font-weight: 600;
  color: var(--md-muted);
  transition: background 0.15s ease, color 0.15s ease;
}
.md-tabbar button svg { width: 17px; height: 17px; }
.md-tabbar button.is-active { background: var(--md-green-soft); color: var(--md-green); }

/* Bag */
.md-line {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid var(--md-line);
}
.md-line img { width: 52px; height: 52px; object-fit: cover; border-radius: 7px; display: block; }
.md-line strong { display: block; font-size: 0.74rem; font-weight: 800; line-height: 1.25; }
.md-line small { display: block; font-size: 0.62rem; color: var(--md-muted); line-height: 1.35; margin-top: 2px; }
.md-line .md-qty { margin-top: 6px; }
.md-line .md-qty button { width: 22px; height: 22px; font-size: 0.78rem; }
.md-line-price { font-size: 0.74rem; font-weight: 700; }
.md-summary { margin-top: 12px; font-size: 0.72rem; }
.md-summary div { display: flex; justify-content: space-between; padding: 3px 0; }
.md-summary .md-total { font-weight: 800; font-size: 0.82rem; border-top: 1px solid var(--md-line); margin-top: 4px; padding-top: 8px; }
.md-earn {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--md-green-soft);
  color: var(--md-green);
  font-size: 0.68rem;
  font-weight: 600;
}
.md-empty { text-align: center; padding: 50px 10px 0; }
.md-empty p { font-size: 0.76rem; color: var(--md-muted); margin: 6px 0 16px; }
.md-empty .md-pill { justify-content: center; }

/* Order confirmation */
.md-done { text-align: center; padding-top: 34px; }
.md-done-check {
  width: 58px; height: 58px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--md-green);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  animation: md-pop 0.45s cubic-bezier(.2,1.4,.4,1);
}
.md-done-check svg { width: 28px; height: 28px; stroke-width: 2.6; }
.md-done p { font-size: 0.74rem; color: var(--md-muted); line-height: 1.45; margin: 0 0 4px; }
.md-done .md-earn { margin: 16px 0; font-size: 0.78rem; }
.md-done .md-earn strong { display: block; font-size: 1.4rem; font-weight: 800; }
@keyframes md-pop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Reorder */
.md-order {
  padding: 12px;
  border: 1px solid var(--md-line);
  border-radius: 10px;
  background: #fff;
  margin-bottom: 10px;
}
.md-order-head { display: flex; justify-content: space-between; font-size: 0.64rem; color: var(--md-muted); margin-bottom: 8px; }
.md-order-thumbs { display: flex; gap: 6px; margin-bottom: 8px; }
.md-order-thumbs img { width: 46px; height: 46px; border-radius: 7px; object-fit: cover; }
.md-order p { font-size: 0.7rem; line-height: 1.4; margin: 0 0 10px; }
.md-order .md-pill { justify-content: center; padding: 8px 14px; font-size: 0.74rem; }

/* Rewards */
.md-balance {
  padding: 14px;
  border-radius: 12px;
  background: var(--md-green);
  color: #fff;
  margin-bottom: 14px;
}
.md-balance span { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.8; }
.md-balance strong { display: block; font-size: 1.9rem; font-weight: 800; letter-spacing: -0.03em; margin: 2px 0 8px; }
.md-bar { height: 6px; border-radius: 6px; background: rgba(255,255,255,0.25); overflow: hidden; }
.md-bar i { display: block; height: 100%; background: #fff; border-radius: 6px; transition: width 0.4s ease; }
.md-balance small { display: block; margin-top: 6px; font-size: 0.64rem; opacity: 0.9; }
.md-reward {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--md-line);
}
.md-reward img { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; }
.md-reward strong { display: block; font-size: 0.74rem; font-weight: 800; }
.md-reward small { display: block; font-size: 0.62rem; color: var(--md-muted); }
.md-reward button {
  padding: 6px 11px;
  border-radius: 100px;
  font-size: 0.64rem;
  font-weight: 700;
  background: var(--md-green);
  color: #fff;
}
.md-reward button:disabled { background: var(--md-soft); color: var(--md-muted); cursor: default; }

/* Scan */
.md-scan { text-align: center; }
.md-qr {
  width: 172px;
  margin: 8px auto 12px;
  padding: 12px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(16,30,24,0.1);
}
.md-qr svg { width: 100%; height: auto; stroke: none; }
.md-scan p { font-size: 0.72rem; color: var(--md-muted); line-height: 1.45; margin: 0 0 4px; }
.md-scan strong { font-size: 0.8rem; }

/* Operator explainer at the top of each screen */
.md-explainer {
  margin: 0 0 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--md-green-soft);
  color: var(--md-green);
  font-size: 0.64rem;
  font-weight: 600;
  line-height: 1.45;
}
.md-view.is-home .md-explainer { margin: 0 12px 8px; background: rgba(228,238,232,0.94); }
.md-item-body .md-explainer { margin-bottom: 10px; }

/* "Tap around and explore" overlay */
.md-hint {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  border-radius: inherit;
  background: rgba(18,46,38,0.6);
  cursor: pointer;
  transition: opacity 0.3s ease;
}
.md-hint.is-hidden { opacity: 0; pointer-events: none; }
.md-app .md-hint-icon { width: auto; height: 42px; fill: rgba(255,255,255,0.92); stroke: none; animation: md-tap-pulse 1.4s ease-in-out infinite; }
.md-hint p { margin: 0; color: #fff; font-size: 0.94rem; font-weight: 600; line-height: 1.4; }
@keyframes md-tap-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }

/* Toast */
.md-toast {
  position: absolute;
  left: 50%; bottom: 80px;
  transform: translate(-50%, 8px);
  width: max-content;
  max-width: 84%;
  padding: 8px 14px;
  border-radius: 100px;
  background: rgba(21,32,27,0.92);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 5;
}
.md-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  .md-done-check, .md-hint-icon { animation: none; }
  .md-toast, .md-pill, .md-mod, .md-bar i { transition: none; }
}
