:root {
  --bg: #f7f7f4;
  --surface: #ffffff;
  --ink: #151714;
  --muted: #6e726c;
  --line: #e2e4de;
  --accent: #1e5d3a;
  --accent-soft: #e9f2ec;
  --danger: #b94938;
  --radius: 18px;
  --shadow: 0 16px 42px rgba(28, 34, 29, 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
button { color: inherit; }
.app-shell { min-height: 100svh; padding-bottom: 104px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  padding: 0 18px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border-bottom: 1px solid rgba(226, 228, 222, .8);
  backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.brand > span:last-child { min-width: 0; }
.brand-mark { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: var(--ink); color: white; }
.brand-mark svg { width: 29px; height: 29px; overflow: visible; }
.brand-mark path:first-child, .brand-mark circle { fill: #fff; }
.brand-mark path:nth-child(2) { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }
.brand strong, .brand small { display: block; }
.brand strong { max-width: 210px; overflow: hidden; font-size: 15px; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.brand small::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: #3f9d64; }
.cart-pill { display: flex; align-items: center; gap: 5px; min-width: 48px; height: 38px; justify-content: center; border: 0; border-radius: 19px; background: var(--ink); color: #fff; cursor: pointer; }
.cart-pill span { font-size: 18px; transform: rotate(-20deg); }
.cart-pill b { font-size: 12px; }

.progress { position: sticky; top: 70px; z-index: 15; padding: 11px 18px 10px; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(16px); }
.progress-line { position: absolute; top: 25px; right: 37px; left: 37px; height: 2px; background: var(--line); }
.progress-line span { display: block; width: 0; height: 100%; background: var(--accent); transition: width .45s cubic-bezier(.22,.8,.32,1); }
.progress ol { position: relative; display: flex; justify-content: space-between; margin: 0; padding: 0; list-style: none; }
.progress li { display: grid; justify-items: center; gap: 4px; color: #9b9e98; font-size: 10px; transition: color .3s; }
.progress li span { display: grid; width: 28px; height: 28px; place-items: center; border: 2px solid var(--line); border-radius: 50%; background: var(--bg); font-size: 11px; font-weight: 750; transition: all .3s; }
.progress li.active { color: var(--ink); }
.progress li.active span { border-color: var(--accent); background: var(--accent); color: #fff; }
.progress li.done span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

main { width: min(100%, 740px); margin: 0 auto; }
.step { display: none; padding: 27px 18px 36px; animation: enter .38s cubic-bezier(.22,.8,.32,1); }
.step.active { display: block; }
@keyframes enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.intro { margin-bottom: 25px; }
.intro.compact { margin-bottom: 24px; }
.eyebrow { margin: 0 0 7px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1 { max-width: 490px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(34px, 9.5vw, 52px); font-weight: 500; letter-spacing: -.045em; line-height: .98; }
.intro > p:last-child { max-width: 480px; margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.back-link { margin: -4px 0 25px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 13px; font-weight: 650; cursor: pointer; }
.bottom-back { display: block; width: 100%; margin: 30px 0 4px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 750; cursor: pointer; }
.bottom-back:hover { border-color: #b9bdb6; color: var(--ink); }

.menu-hero { position: relative; height: 225px; margin: -27px -18px 30px; overflow: hidden; background: #dfe3dc; }
.menu-hero img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.015); animation: heroSettle 1.1s cubic-bezier(.22,.8,.32,1) both; }
.menu-hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,16,11,.05) 20%, rgba(10,16,11,.78) 100%); }
.menu-hero-copy { position: absolute; right: 20px; bottom: 20px; left: 20px; color: white; }
.menu-hero-copy span { display: block; margin-bottom: 7px; font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.menu-hero-copy strong { display: block; font-family: Georgia, serif; font-size: 29px; font-weight: 500; letter-spacing: -.035em; line-height: 1.02; }
@keyframes heroSettle { from { opacity: .6; transform: scale(1.08); } to { opacity: 1; transform: scale(1.015); } }

.category-tabs { display: flex; gap: 7px; margin: 0 -18px 7px; padding: 0 18px 10px; overflow-x: auto; scrollbar-width: none; }
.category-tabs::-webkit-scrollbar { display: none; }
.category-tabs button { flex: 0 0 auto; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: transparent; font-size: 12px; font-weight: 700; cursor: pointer; }
.category-tabs button.active { border-color: var(--ink); background: var(--ink); color: #fff; }
.menu-list { display: grid; }
.menu-item { display: grid; grid-template-columns: minmax(0, 1fr) 116px; gap: 16px; align-items: center; padding: 19px 0; border-bottom: 1px solid var(--line); }
.menu-item[hidden] { display: none; }
.menu-copy { align-self: stretch; display: flex; flex-direction: column; min-width: 0; }
.menu-copy h2 { margin: 0; font-size: 17px; letter-spacing: -.025em; }
.menu-copy p { margin: 6px 0 10px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.menu-copy strong { margin-top: auto; font-size: 14px; }
.menu-photo { position: relative; width: 116px; height: 116px; overflow: hidden; border-radius: 16px; background: #eaece7; }
.menu-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.22,.8,.32,1); }
.menu-item:hover img { transform: scale(1.035); }
.add-button, .qty-control { position: absolute; right: 7px; bottom: 7px; height: 34px; border: 0; border-radius: 17px; background: #fff; box-shadow: 0 3px 13px rgba(0,0,0,.14); }
.add-button { width: 34px; font-size: 22px; cursor: pointer; }
.qty-control { display: flex; align-items: center; gap: 8px; padding: 0 5px; }
.qty-control button { width: 25px; height: 25px; padding: 0; border: 0; border-radius: 50%; background: var(--ink); color: white; line-height: 1; cursor: pointer; }
.qty-control b { min-width: 10px; font-size: 12px; text-align: center; }

.customization-list { display: grid; gap: 12px; }
.custom-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.custom-head { display: flex; gap: 12px; align-items: center; padding: 12px; }
.custom-head img { width: 58px; height: 58px; border-radius: 12px; object-fit: cover; }
.custom-head div { min-width: 0; flex: 1; }
.custom-head h2 { margin: 0; font-size: 15px; }
.custom-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.custom-body { padding: 4px 14px 16px; border-top: 1px solid var(--line); }
.option-block { margin-top: 15px; }
.option-label { display: flex; justify-content: space-between; margin-bottom: 9px; font-size: 12px; font-weight: 750; }
.option-label span { color: var(--muted); font-size: 10px; font-weight: 500; }
.segment { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.segment label { position: relative; }
.segment input { position: absolute; opacity: 0; }
.segment span { display: grid; min-height: 38px; place-items: center; padding: 5px; border: 1px solid var(--line); border-radius: 10px; font-size: 11px; font-weight: 650; text-align: center; cursor: pointer; }
.segment input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.extras { display: grid; }
.extra-row { display: flex; align-items: center; gap: 9px; min-height: 39px; border-bottom: 1px solid #eff0ec; font-size: 12px; cursor: pointer; }
.extra-row:last-child { border-bottom: 0; }
.extra-row input { accent-color: var(--accent); }
.extra-row span { margin-left: auto; color: var(--muted); }

.address-field label, .field-group label, .cash-amount label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 750; }
.input-wrap { display: flex; align-items: center; gap: 9px; height: 52px; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-wrap > span { color: var(--accent); font-size: 20px; }
.input-wrap input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 14px; }
.field-help { display: block; margin: 7px 2px 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
.location-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 17px 0 13px; }
.location-methods button { display: flex; min-width: 0; min-height: 76px; align-items: center; gap: 9px; padding: 11px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-align: left; cursor: pointer; transition: border-color .2s, background .2s, transform .15s; }
.location-methods button > span:last-child { min-width: 0; }
.location-methods button:active { transform: scale(.985); }
.location-methods button.active { border-color: var(--accent); background: var(--accent-soft); }
.location-method-icon { display: grid; flex: 0 0 auto; width: 32px; height: 32px; place-items: center; border-radius: 10px; background: var(--bg); color: var(--accent); font-size: 18px; font-weight: 800; }
.location-methods strong, .location-methods small { display: block; }
.location-methods strong { font-size: 11px; line-height: 1.25; }
.location-methods small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.3; }
.map-frame { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #e7ebe2; }
.real-map { width: 100%; height: 285px; z-index: 1; background: #e7ebe2; }
.real-map.leaflet-container { font-family: inherit; }
.real-map .leaflet-control-attribution { font-size: 8px; }
.map-legend { position: absolute; z-index: 500; top: 10px; left: 10px; display: flex; gap: 9px; padding: 7px 9px; border-radius: 9px; background: rgba(255,255,255,.92); box-shadow: 0 3px 12px rgba(0,0,0,.1); font-size: 8px; font-weight: 700; backdrop-filter: blur(8px); pointer-events: none; }
.map-legend span { display: flex; align-items: center; gap: 4px; }
.map-legend i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; }
.origin-dot { background: var(--ink); }
.coverage-dot { border: 1px solid var(--accent); background: rgba(30,93,58,.18); }
.origin-map-icon span { display: block; width: 18px; height: 18px; border: 4px solid white; border-radius: 50%; background: var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.delivery-map-icon span { display: block; position: relative; width: 30px; height: 30px; border: 5px solid white; border-radius: 50% 50% 50% 0; background: var(--accent); box-shadow: 0 4px 12px rgba(0,0,0,.28); transform: rotate(-45deg); }
.delivery-map-icon span::after { content: ""; position: absolute; width: 6px; height: 6px; top: 7px; left: 7px; border-radius: 50%; background: white; }
.location-status { min-height: 32px; margin: 9px 2px 8px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.suggestions { position: relative; z-index: 4; margin-top: 5px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: var(--shadow); }
.suggestions button { display: block; width: 100%; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); background: white; text-align: left; cursor: pointer; }
.suggestions button:last-child { border-bottom: 0; }
.suggestions strong, .suggestions small { display: block; }
.suggestions strong { font-size: 12px; }
.suggestions small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.suggestions button.custom-address { background: var(--accent-soft); }
.suggestions button.custom-address strong { color: var(--accent); }
.delivery-zones { margin: 14px 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); animation: enter .3s ease both; }
.zone-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.zone-grid button { min-height: 54px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 11px; background: transparent; cursor: pointer; }
.zone-grid button strong, .zone-grid button small { display: block; }
.zone-grid button strong { font-size: 11px; }
.zone-grid button small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.zone-grid button.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.map-sim { position: relative; height: 215px; margin-top: 14px; overflow: hidden; border-radius: var(--radius); background: #e7ebe2; }
.map-sim::before, .map-sim::after { content: ""; position: absolute; border: 14px solid #f4f2e8; border-radius: 48% 52% 40% 55%; opacity: .8; }
.map-sim::before { width: 180px; height: 100px; top: 22px; left: -30px; transform: rotate(-12deg); }
.map-sim::after { width: 220px; height: 110px; right: -45px; bottom: -25px; transform: rotate(20deg); }
.street { position: absolute; z-index: 1; background: rgba(255,255,255,.82); box-shadow: 0 0 0 1px rgba(180,187,176,.25); }
.street-a { width: 120%; height: 11px; top: 45%; left: -10%; transform: rotate(-9deg); }
.street-b { width: 11px; height: 140%; top: -20%; left: 45%; transform: rotate(15deg); }
.street-c { width: 100%; height: 7px; top: 22%; left: 12%; transform: rotate(29deg); }
.street-d { width: 7px; height: 120%; top: -5%; right: 22%; transform: rotate(-27deg); }
.map-origin, .map-pin { position: absolute; z-index: 3; display: grid; justify-items: center; gap: 3px; font-size: 9px; font-weight: 750; transition: all .6s cubic-bezier(.22,.8,.32,1); }
.map-origin { top: 48%; left: 39%; }
.map-pin { top: 18%; right: 14%; opacity: 0; transform: translateY(-10px); }
.map-pin.visible { opacity: 1; transform: none; }
.map-origin i, .map-pin i { width: 17px; height: 17px; border: 4px solid white; border-radius: 50% 50% 50% 0; background: var(--ink); box-shadow: 0 3px 8px rgba(0,0,0,.2); transform: rotate(-45deg); }
.map-pin i { background: var(--accent); }
.map-distance { position: absolute; z-index: 4; right: 10px; bottom: 10px; padding: 7px 10px; border-radius: 9px; background: rgba(255,255,255,.9); font-size: 10px; font-weight: 700; backdrop-filter: blur(8px); }
.delivery-quote { display: flex; justify-content: space-between; align-items: center; margin: 12px 0 22px; padding: 14px 16px; border: 1px solid var(--accent); border-radius: 14px; background: var(--accent-soft); }
.delivery-quote span { font-size: 12px; }
.delivery-quote strong { font-size: 15px; }
.delivery-quote.muted { border-color: var(--line); background: var(--surface); color: var(--muted); }
.delivery-quote.outside { border-color: #d8a59c; background: #f8eae7; color: var(--danger); }
.field-group label span { margin-left: 5px; color: var(--muted); font-size: 10px; font-weight: 500; }
textarea { width: 100%; resize: vertical; padding: 13px; border: 1px solid var(--line); border-radius: 14px; outline: none; background: var(--surface); font-size: 13px; }
textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.payment-options { display: grid; gap: 10px; }
.payment-option { position: relative; display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); cursor: pointer; }
.payment-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.payment-option input { position: absolute; opacity: 0; }
.payment-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; background: var(--bg); font-family: Georgia, serif; font-size: 19px; }
.payment-option > span:nth-of-type(2) { flex: 1; }
.payment-option strong, .payment-option small { display: block; }
.payment-option strong { font-size: 14px; }
.payment-option small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.payment-option i { width: 18px; height: 18px; border: 1px solid #afb2ac; border-radius: 50%; }
.payment-option input:checked ~ i { border: 5px solid var(--accent); background: white; }
.cash-amount { padding: 5px 14px 8px 66px; }
.money-input { display: flex; align-items: center; gap: 6px; max-width: 160px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.money-input input { min-width: 0; width: 100%; border: 0; outline: 0; }
.info-note, .whatsapp-note { display: flex; gap: 11px; margin-top: 22px; padding: 14px; border-radius: 14px; background: #eceeeb; }
.info-note > span, .whatsapp-note > span { display: grid; flex: 0 0 auto; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: var(--ink); color: white; font-size: 11px; font-weight: 800; }
.info-note p, .whatsapp-note p { margin: 1px 0; color: #5f635d; font-size: 11px; line-height: 1.45; }
.whatsapp-note { background: var(--accent-soft); }
.whatsapp-note > span { background: var(--accent); }

.order-review { border-top: 1px solid var(--line); }
.review-section { padding: 18px 0; border-bottom: 1px solid var(--line); }
.review-title { display: flex; justify-content: space-between; margin-bottom: 13px; }
.review-title h2 { margin: 0; font-size: 13px; }
.review-title button { padding: 0; border: 0; background: none; color: var(--accent); font-size: 11px; font-weight: 750; cursor: pointer; }
.review-item { display: grid; grid-template-columns: 24px 1fr auto; gap: 8px; align-items: start; margin: 10px 0; }
.review-item > b { font-size: 11px; }
.review-item strong { display: block; font-size: 12px; }
.review-item small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.review-item > span { font-size: 12px; font-weight: 700; }
.review-meta { display: grid; gap: 7px; }
.review-meta p { display: flex; justify-content: space-between; gap: 20px; margin: 0; font-size: 11px; line-height: 1.4; }
.review-meta p span:first-child { color: var(--muted); }
.review-meta p span:last-child { max-width: 70%; text-align: right; }
.review-total { padding-top: 14px; }
.review-total p { display: flex; justify-content: space-between; margin: 7px 0; color: var(--muted); font-size: 11px; }
.review-total p:last-child { margin-top: 12px; color: var(--ink); font-size: 16px; font-weight: 800; }

.action-bar { position: fixed; z-index: 30; right: 0; bottom: 0; left: 0; display: flex; gap: 12px; align-items: center; min-height: 82px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,255,255,.94); box-shadow: 0 -10px 30px rgba(28,34,29,.06); backdrop-filter: blur(18px); }
.action-total { flex: 0 0 auto; min-width: 74px; }
.action-total small, .action-total strong { display: block; }
.action-total small { color: var(--muted); font-size: 10px; }
.action-total strong { margin-top: 2px; font-size: 18px; }
#primaryAction { flex: 1; min-height: 52px; padding: 0 18px; border: 0; border-radius: 14px; background: var(--ink); color: white; font-size: 13px; font-weight: 780; cursor: pointer; transition: transform .15s, opacity .2s; }
#primaryAction:active { transform: scale(.985); }
#primaryAction:disabled { cursor: not-allowed; opacity: .35; }
#primaryAction.whatsapp { background: #176c45; }
.toast { position: fixed; z-index: 50; bottom: 94px; left: 50%; width: max-content; max-width: calc(100% - 32px); padding: 10px 14px; border-radius: 10px; background: var(--ink); color: white; font-size: 11px; opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: all .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 760px) {
  body { background: #eceee9; }
  .app-shell { width: min(100%, 780px); margin: 24px auto; overflow: hidden; border-radius: 26px; background: var(--bg); box-shadow: var(--shadow); }
  .topbar { top: 0; }
  .progress { top: 70px; }
  .action-bar { right: 50%; left: auto; width: 780px; transform: translateX(50%); }
  .menu-list { grid-template-columns: 1fr 1fr; column-gap: 28px; }
  .step { padding-right: 34px; padding-left: 34px; }
  .category-tabs { margin-right: -34px; margin-left: -34px; padding-right: 34px; padding-left: 34px; }
  .menu-hero { height: 270px; margin-right: -34px; margin-left: -34px; }
  .customization-list { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 370px) {
  .location-methods { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
