/* Ori. ordering app — mobile-first styles */
:root {
  --brown: #463022;
  --brown-2: #6b5243;
  --orange: #FF751F;
  --orange-dark: #e25f0c;
  --cream: #F4ECE2;
  --paper: #FBF7F2;
  --card: #FFFFFF;
  --line: #E8DDD0;
  --muted: #8a776a;
  --ok: #2f7d4f;
  --danger: #b3361b;
  --radius: 18px;
  --shadow: 0 8px 24px rgba(70, 48, 34, .10);
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Fraunces", Georgia, serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--brown);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--orange-dark); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#app { max-width: 560px; margin: 0 auto; min-height: 100%; position: relative; }
.screen { padding: calc(16px + var(--safe-top)) 20px calc(120px + var(--safe-bottom)); animation: enter .28s ease both; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }

h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-family: var(--display); font-weight: 600; font-size: 30px; }
h2 { font-size: 19px; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 54px; padding: 0 22px;
  border-radius: 999px; border: 0;
  background: var(--brown); color: #fff; font-weight: 600; font-size: 16px;
  transition: transform .1s ease, background .2s ease, opacity .2s;
  text-decoration: none;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--orange); }
.btn-primary:hover { background: var(--orange-dark); }
.btn-ghost { background: transparent; color: var(--brown); border: 1.5px solid var(--line); }
.btn-whatsapp { background: #1fa855; }
.btn-sm { min-height: 40px; width: auto; font-size: 14px; padding: 0 16px; }
.link-btn { background: none; border: 0; color: var(--brown); text-decoration: underline; padding: 8px; font-weight: 500; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--line);
  background: var(--card); display: inline-grid; place-items: center; font-size: 18px; color: var(--brown);
}
.stack { display: grid; gap: 12px; }

/* ---------- welcome ---------- */
.welcome {
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: calc(24px + var(--safe-top)) 28px calc(28px + var(--safe-bottom));
  background: radial-gradient(120% 70% at 50% 35%, #fff 0%, var(--cream) 70%);
}
.logo-anim { width: min(62vw, 260px); height: auto; overflow: visible; }
.logo-anim .letters path {
  fill: transparent; stroke: var(--brown); stroke-width: .6;
  stroke-dasharray: 100; stroke-dashoffset: 100;
  animation: draw 1.3s ease forwards, fillin .5s ease 1.05s forwards;
}
.logo-anim .dot { transform-box: fill-box; transform-origin: center; opacity: 0;
  animation: drop .75s cubic-bezier(.3,1.6,.5,1) 1.35s forwards; }
.logo-anim .ripple { fill: none; stroke: var(--orange); stroke-width: .5; opacity: 0;
  transform-box: fill-box; transform-origin: center; animation: ripple 1.4s ease-out 1.85s 2; }
.logo-anim .ripple.r2 { animation-delay: 2.15s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fillin { to { fill: var(--brown); stroke-width: 0; } }
@keyframes drop { 0% { opacity: 0; transform: translateY(-40px) scale(.6); } 60% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes ripple { 0% { opacity: .9; transform: scale(.4); } 100% { opacity: 0; transform: scale(3.2); } }
.welcome .tagline { font-family: var(--display); font-style: italic; font-size: 19px; margin: 22px 0 0;
  opacity: 0; animation: fade .6s ease 2.2s forwards; }
.welcome .kicker { letter-spacing: .45em; font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 6px;
  opacity: 0; animation: fade .6s ease 2s forwards; }
.welcome .actions { width: 100%; max-width: 360px; margin-top: 48px; display: grid; gap: 12px;
  opacity: 0; transform: translateY(12px); animation: rise .5s ease 2.6s forwards; }
@keyframes fade { to { opacity: 1; } }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- forms ---------- */
.auth-head { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.auth-head img { height: 28px; }
.form { display: grid; gap: 16px; margin-top: 22px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.input {
  width: 100%; min-height: 54px; padding: 0 16px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--card); font-size: 16px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 84px; padding: 14px 16px; resize: vertical; }
.input:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255,117,31,.15); }
.field.invalid .input { border-color: var(--danger); }
.field .error { color: var(--danger); font-size: 13px; margin-top: 6px; min-height: 0; }
.phone-wrap { display: flex; align-items: stretch; }
.phone-wrap .prefix { display: grid; place-items: center; padding: 0 14px; border: 1.5px solid var(--line);
  border-right: 0; border-radius: 14px 0 0 14px; background: var(--cream); font-weight: 600; }
.phone-wrap .input { border-radius: 0 14px 14px 0; }
.form-error { background: #fdecea; color: var(--danger); padding: 12px 14px; border-radius: 12px; font-size: 14px; }
.switch { text-align: center; margin-top: 18px; }

/* ---------- menu ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.topbar img { height: 30px; }
.greeting { margin-bottom: 14px; }
.greeting h1 { font-size: 26px; }
.banner { border-radius: 14px; padding: 12px 14px; font-size: 14px; margin-bottom: 14px; display: flex; gap: 10px; align-items: center; }
.banner.warn { background: #fff1e6; color: #8a3b0a; }
.banner.info { background: var(--brown); color: #fff; text-decoration: none; }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; position: sticky; top: 0; z-index: 5;
  background: linear-gradient(var(--paper) 80%, transparent); scrollbar-width: none; margin: 0 -20px; padding-left: 20px; padding-right: 20px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; border: 1.5px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 9px 18px; font-weight: 500; font-size: 14px; }
.tab[aria-selected="true"] { background: var(--brown); border-color: var(--brown); color: #fff; }
.category { margin-top: 18px; scroll-margin-top: 64px; }
.category h2 { margin-bottom: 10px; }
.product {
  display: flex; gap: 14px; align-items: center; width: 100%; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; margin-bottom: 10px; transition: box-shadow .2s, transform .1s;
}
.product:active { transform: scale(.99); }
.product:hover { box-shadow: var(--shadow); }
.product .cup { flex: none; width: 56px; height: 56px; border-radius: 16px; background: var(--cream);
  display: grid; place-items: center; font-size: 26px; }
.product .info { flex: 1; min-width: 0; }
.product .name { font-weight: 600; font-size: 16px; }
.product .desc { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product .price { font-weight: 600; margin-top: 2px; font-size: 14px; }
.product .add { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--orange); color: #fff;
  display: grid; place-items: center; font-size: 22px; font-weight: 500; }

/* ---------- bottom sheet ---------- */
.overlay { position: fixed; inset: 0; background: rgba(35, 22, 14, .45); z-index: 50; display: flex;
  align-items: flex-end; justify-content: center; animation: fade .2s ease both; opacity: 0; }
.sheet { width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; background: var(--paper);
  border-radius: 26px 26px 0 0; padding: 10px 20px calc(20px + var(--safe-bottom)); animation: up .28s cubic-bezier(.2,.9,.3,1) both; }
@keyframes up { from { transform: translateY(100%); } }
.sheet .grabber { width: 42px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 14px; }
.sheet h2 { font-family: var(--display); font-size: 26px; }
.option-group { margin-top: 20px; }
.option-group .label { font-weight: 600; font-size: 14px; margin-bottom: 8px; display: flex; justify-content: space-between; }
.option-group .req { font-size: 12px; font-weight: 500; color: var(--orange-dark); background: #fff1e6; padding: 2px 8px; border-radius: 999px; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; pointer-events: none; }
.choice span { display: flex; flex-direction: column; justify-content: center; min-height: 54px; padding: 8px 12px;
  border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); font-weight: 500; font-size: 14px; }
.choice small { color: var(--muted); font-weight: 400; font-size: 12px; }
.choice input:checked + span { border-color: var(--orange); background: #fff6ef; box-shadow: 0 0 0 1px var(--orange) inset; }
.choice input:focus-visible + span { outline: 3px solid rgba(255,117,31,.4); }
.qty { display: inline-flex; align-items: center; gap: 4px; background: var(--card); border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; }
.qty button { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--cream); font-size: 20px; }
.qty output { min-width: 30px; text-align: center; font-weight: 600; }
.sheet-footer { display: flex; gap: 12px; align-items: center; margin-top: 24px; }
.sheet-footer .btn { flex: 1; }

/* ---------- floating cart bar ---------- */
.cartbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + var(--safe-bottom));
  width: calc(100% - 32px); max-width: 528px; z-index: 20; display: flex; justify-content: space-between; align-items: center;
  background: var(--brown); color: #fff; border: 0; border-radius: 999px; padding: 0 8px 0 22px; min-height: 60px;
  box-shadow: 0 12px 30px rgba(70,48,34,.35); font-weight: 600; animation: rise .3s ease both; }
.cartbar .count { background: var(--orange); border-radius: 999px; padding: 10px 16px; }

/* ---------- cart / checkout ---------- */
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.steps { display: flex; gap: 6px; margin: 0 0 20px; }
.steps i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.steps i.on { background: var(--orange); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card + .card { margin-top: 12px; }
.line { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.line:last-child { border-bottom: 0; }
.line .info { flex: 1; }
.line .name { font-weight: 600; }
.line .meta { font-size: 13px; color: var(--muted); }
.line .amount { font-weight: 600; white-space: nowrap; }
.line .remove { background: none; border: 0; color: var(--danger); font-size: 13px; padding: 4px 0; }
.totals { display: flex; justify-content: space-between; font-size: 18px; font-weight: 700; margin-top: 6px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 15px; }
.kv span:first-child { color: var(--muted); }
.bottom-cta { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 560px;
  padding: 14px 20px calc(14px + var(--safe-bottom)); background: linear-gradient(transparent, var(--paper) 30%); z-index: 15; }
.empty { text-align: center; padding: 50px 10px; }
.empty .big { font-size: 46px; }

/* ---------- confirm dialog ---------- */
.dialog { background: var(--paper); border-radius: 26px; padding: 26px 22px; width: calc(100% - 32px); max-width: 420px;
  margin: auto; text-align: center; animation: pop .3s cubic-bezier(.2,1.4,.4,1) both; }
.overlay.center { align-items: center; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
.dialog .badge { width: 74px; height: 74px; border-radius: 50%; background: #fff1e6; color: var(--orange);
  display: grid; place-items: center; margin: 0 auto 14px; font-size: 34px; }
.dialog h2 { font-family: var(--display); font-size: 24px; margin-bottom: 8px; }
.dialog .stack { margin-top: 22px; }

/* ---------- order status ---------- */
.status-hero { text-align: center; padding: 8px 0 4px; }
.map { width: 100%; height: 190px; border: 0; border-radius: 14px; margin: 10px 0; background: var(--cream); }
.order-id { font-family: var(--display); font-size: 15px; letter-spacing: .02em; }

.toast { position: fixed; left: 0; right: 0; margin: 0 auto; width: max-content; bottom: calc(88px + var(--safe-bottom)); z-index: 100;
  background: var(--brown); color: #fff; padding: 12px 18px; border-radius: 999px; font-size: 14px; box-shadow: var(--shadow);
  animation: rise .25s ease both; max-width: calc(100% - 32px); }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--orange); border-radius: 50%;
  animation: spin .8s linear infinite; margin: 60px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 700px) {
  body { background: var(--cream); }
  #app { background: var(--paper); box-shadow: 0 0 60px rgba(70,48,34,.08); min-height: 100vh; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition: none !important; }
  .logo-anim .letters path { fill: var(--brown); stroke-dashoffset: 0; }
  .logo-anim .dot { opacity: 1; }
  .welcome .tagline, .welcome .kicker, .welcome .actions { opacity: 1; transform: none; }
}

/* verification code */
#code { text-align: center; font-size: 26px; font-weight: 600; letter-spacing: .5em; padding-left: calc(16px + .5em); font-variant-numeric: tabular-nums; }
.switch .link-btn { display: inline-block; margin: 0 6px; }
.link-btn:disabled { text-decoration: none; color: var(--muted); cursor: default; }

/* order sent */
.badge-ok { width: 76px; height: 76px; border-radius: 50%; background: #1fa855; color: #fff; display: grid; place-items: center;
  font-size: 38px; font-weight: 700; margin: 8px auto 12px; animation: pop .4s cubic-bezier(.2,1.4,.4,1) both; }

/* product sheet: close button + swipe */
.sheet { position: relative; touch-action: pan-y; will-change: transform; }
.sheet-close { position: absolute; top: 14px; right: 16px; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: var(--cream); color: var(--brown); font-size: 18px; display: grid; place-items: center; }
.sheet-close:hover { background: var(--line); }
.sheet h2#sheet-title { padding-right: 48px; }
.overlay.closing { animation: fadeout .22s ease forwards; }
@keyframes fadeout { from { opacity: 1; } to { opacity: 0; } }

/* coming soon */
.product.soon { opacity: .6; cursor: default; }
.product.soon:hover { box-shadow: none; }
.soon-label { font-style: italic; font-weight: 500 !important; color: var(--muted); }
.cat-note { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 6px; }

/* payment */
.option-group.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(179,54,27,.12); }

/* typing on mobile: keep the notes field above the keyboard */
body.typing .bottom-cta { display: none; }

/* Happy Hour */
.promo-chip { display: inline-grid; place-items: center; min-width: 46px; height: 32px; padding: 0 8px; border-radius: 10px;
  background: var(--orange); color: #fff; font-weight: 700; font-size: 15px; letter-spacing: -.02em; flex: none; }
.banner.promo { width: 100%; border: 0; text-align: left; background: linear-gradient(100deg, #fff1e6, #ffe2cc);
  color: var(--brown); font-size: 14px; cursor: pointer; }
.banner.promo > span:nth-child(2) { flex: 1; }
.promo-line span:last-child { color: var(--ok); font-weight: 600; }
.promo-nudge { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--brown);
  border: 1.5px dashed var(--orange) !important; background: #fff8f2; margin-top: 12px; }
.promo-nudge > span:nth-child(2) { flex: 1; }
.promo-nudge-inline { background: #fff8f2; border-radius: 10px; padding: 8px 10px; margin: 10px 0 0; }
.promo-dialog { position: relative; padding-top: 30px; overflow: hidden;
  background: radial-gradient(120% 60% at 50% 0%, #fff1e6 0%, var(--paper) 60%); }
.promo-kicker { font-size: 12px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; color: var(--orange-dark); }
.promo-big { font-family: var(--display); font-weight: 600; font-size: 92px; line-height: 1; color: var(--orange);
  margin: 6px 0 2px; animation: promoPop .6s cubic-bezier(.2,1.6,.4,1) .1s both; }
@keyframes promoPop { from { transform: scale(.4) rotate(-8deg); opacity: 0; } }
.promo-dialog h2 { font-size: 22px; margin-bottom: 10px; }
.promo-copy { margin: 0 0 10px; }
.promo-time { font-weight: 600; color: var(--orange-dark); margin: 0 0 18px; }
