/* ==========================================================================
   AQUA FRESH · app de pedidos
   Paleta tomada del logo (turquesa #00C5C0 → azul #0057E6) y de los artes
   (azul profundo de las olas, celeste claro de fondo).
   ========================================================================== */
:root {
  --teal: #00c5c0;
  --blue: #0a5fe0;
  --blue-600: #0057e6;
  --blue-700: #0b4db3;
  --navy: #0b2e66;
  --ink: #0f2747;
  --muted: #5a6b84;
  --line: #dbe8f5;
  --bg: #eef7fc;
  --sky: #dff3fc;
  --sky-2: #c4ebfb;
  --card: #fff;
  --accent: #ff5b22;
  --wa: #0e8743;
  --wa-2: #13a653;
  --ok: #0e8a55;
  --ok-bg: #e2f6ec;
  --warn: #9a5a00;
  --warn-bg: #fff1dc;
  --danger: #c8382b;
  --danger-bg: #fde9e6;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 12px 28px -14px rgba(11, 77, 179, .35);
  --shadow-sm: 0 4px 14px -8px rgba(11, 77, 179, .3);
  --grad-logo: linear-gradient(170deg, #00c5c0 0%, #0a8fdd 48%, #0057e6 100%);
  --grad-hero: radial-gradient(120% 80% at 100% 0%, rgba(0, 197, 192, .6), transparent 62%),
               linear-gradient(165deg, #0a8fe0 0%, #0a5fe0 52%, #0b47a8 100%);
  --tabbar-h: 66px;
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-tech: "Orbitron", "Montserrat", sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
svg { width: 1em; height: 1em; flex: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue); }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.01em; }
p { margin: 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid rgba(10, 95, 224, .45); outline-offset: 2px; border-radius: 10px; }

/* ---------- Estructura ---------- */
.stage { min-height: 100%; }
.brand-panel { display: none; }
.app {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  background: var(--bg);
  overflow: hidden;
}
.main {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  outline: none;
}
.app.has-cart .main { padding-bottom: 86px; }
.view { animation: viewIn .35s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.pad { padding: 4px 16px 28px; }

/* ---------- Hero (inicio) ---------- */
.hero {
  position: relative;
  color: #fff;
  background: var(--grad-hero);
  padding: calc(14px + env(safe-area-inset-top)) 18px 64px;
  overflow: hidden;
  isolation: isolate;
}
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hero-brand { display: flex; align-items: center; gap: 10px; }
.logo-ring {
  width: 50px; height: 50px; border-radius: 50%;
  background: #fff; padding: 3px;
  box-shadow: 0 6px 18px -6px rgba(0, 30, 90, .5);
}
.logo-ring img { width: 100%; height: 100%; border-radius: 50%; }
.hero-brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.hero-brand-text b { font-weight: 600; letter-spacing: .08em; font-size: 15px; }
.hero-brand-text small { font-family: var(--font-tech); font-size: 9.5px; letter-spacing: .22em; opacity: .9; margin-top: 3px; text-transform: uppercase; }
.hero-actions { display: flex; gap: 8px; }
.hero-hello { margin-top: 26px; font-weight: 600; opacity: .92; }
.hero-title { font-size: clamp(27px, 7.6vw, 33px); font-weight: 800; margin-top: 4px; letter-spacing: -.02em; text-shadow: 0 2px 18px rgba(0, 40, 120, .25); }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 14px; padding: 7px 12px 7px 10px;
  border-radius: 999px; font-size: 13px; font-weight: 600;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28);
  backdrop-filter: blur(6px);
}
.status-pill .dot { width: 9px; height: 9px; border-radius: 50%; background: #9fb3c8; box-shadow: 0 0 0 3px rgba(255, 255, 255, .2); }
.status-pill.open .dot { background: #4ef08f; animation: pulse 2s infinite; }
.status-pill.pause .dot { background: #ffc34d; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(78, 240, 143, .25); } 50% { box-shadow: 0 0 0 7px rgba(78, 240, 143, 0); } }
.wave { position: absolute; left: 0; bottom: -1px; width: 100%; height: 42px; fill: var(--bg); z-index: 1; }
.hero-bubbles i {
  position: absolute; z-index: -1; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, .95), rgba(255, 255, 255, .25) 38%, rgba(255, 255, 255, .06) 70%);
  border: 1px solid rgba(255, 255, 255, .35);
  animation: float 9s ease-in-out infinite;
}
.hero-bubbles i:nth-child(1) { width: 110px; height: 110px; right: -28px; top: 64px; opacity: .45; }
.hero-bubbles i:nth-child(2) { width: 30px; height: 30px; right: 16px; top: 184px; animation-delay: -2s; }
.hero-bubbles i:nth-child(3) { width: 16px; height: 16px; right: 64px; top: 92px; animation-delay: -4s; }
.hero-bubbles i:nth-child(4) { width: 18px; height: 18px; right: 58px; top: 232px; animation-delay: -6s; opacity: .8; }
.hero-bubbles i:nth-child(5) { width: 10px; height: 10px; right: 140px; top: 60px; animation-delay: -3s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ---------- Encabezados de secciones ---------- */
.page-head {
  position: relative; color: #fff; background: var(--grad-hero);
  padding: calc(22px + env(safe-area-inset-top)) 20px 50px;
}
.page-head h1 { font-size: 27px; font-weight: 800; }
.page-head p { opacity: .9; margin-top: 4px; font-weight: 500; }
.bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 10px 10px;
  background: rgba(238, 247, 252, .88); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.bar h1 { flex: 1; text-align: center; font-size: 17px; font-weight: 700; }
.bar-spacer { width: 42px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 20px 2px 12px; }
.section-head h2 { font-size: 19px; font-weight: 800; color: var(--navy); }
.chip-note { font-size: 12.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.chip-note b { color: var(--blue); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 999px; border: 0;
  font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 19px; height: 19px; }
.btn-primary { color: #fff; background: linear-gradient(135deg, #0a8fe0, var(--blue-600)); box-shadow: 0 8px 18px -8px rgba(0, 87, 230, .7); }
.btn-wa { color: #fff; background: linear-gradient(135deg, var(--wa-2), var(--wa)); box-shadow: 0 8px 18px -8px rgba(14, 135, 67, .75); }
.btn-soft { color: var(--blue-700); background: #e3f1fd; }
.btn-outline { color: var(--blue-700); background: #fff; border: 1.5px solid var(--line); }
.btn-danger { color: var(--danger); background: var(--danger-bg); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13.5px; }
.btn-lg { min-height: 54px; padding: 0 24px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 42px; height: 42px; border-radius: 50%; border: 0; padding: 0;
  color: inherit; background: transparent; text-decoration: none;
  transition: transform .12s, background .2s;
}
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 21px; height: 21px; }
.icon-btn.glass { color: #fff; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .3); }
.icon-btn.ghost { color: var(--navy); }
.icon-btn.ghost:hover { background: rgba(10, 95, 224, .08); }
.icon-btn.sm { width: 34px; height: 34px; }
.icon-btn.sm svg { width: 17px; height: 17px; }
.link-btn {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px;
  border: 0; background: none; padding: 6px 2px;
  color: var(--blue); font-weight: 700; font-size: 14px;
}
.link-btn svg { width: 16px; height: 16px; }

/* ---------- Aviso instalar ---------- */
.install-banner {
  display: flex; align-items: center; gap: 10px;
  margin-top: 4px; padding: 10px 8px 10px 12px;
  background: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}
.install-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--grad-logo); color: #fff; flex: none; }
.install-ic svg { width: 20px; height: 20px; }
.install-banner div { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.install-banner b { font-size: 14px; }
.install-banner small { color: var(--muted); font-size: 12px; }

/* ---------- Tarjeta "pedido de siempre" ---------- */
.repeat {
  position: relative; overflow: hidden;
  margin-top: 12px; padding: 16px;
  border-radius: var(--radius); color: #fff;
  background: linear-gradient(135deg, var(--navy), var(--blue-700));
  box-shadow: var(--shadow);
}
.repeat::after {
  content: ""; position: absolute; right: -30px; top: -40px; width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 197, 192, .5), transparent 70%);
}
.repeat small { font-family: var(--font-tech); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; opacity: .8; }
.repeat p { font-weight: 700; margin: 6px 0 12px; font-size: 15.5px; position: relative; z-index: 1; }
.repeat p span { opacity: .75; font-weight: 500; }
.repeat .btn { position: relative; z-index: 1; background: #fff; color: var(--blue-700); }

/* ---------- Productos ---------- */
.products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.prod {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); border: 2px solid transparent;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.prod.on { border-color: var(--blue); box-shadow: 0 14px 30px -16px rgba(10, 95, 224, .6); }
.prod-art {
  position: relative; height: 152px; margin: 6px 6px 0; border-radius: 17px; padding-bottom: 6px;
  display: grid; place-items: end center; overflow: hidden;
  background: radial-gradient(90% 80% at 50% 110%, var(--sky-2), transparent 70%), linear-gradient(180deg, #f5fbff, var(--sky));
}
.prod-art::before, .prod-art::after {
  content: ""; position: absolute; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, rgba(255, 255, 255, .3) 45%, rgba(160, 220, 250, .35));
}
.prod-art::before { width: 14px; height: 14px; left: 14px; top: 22px; }
.prod-art::after { width: 8px; height: 8px; right: 18px; top: 40px; }
.prod-art svg { width: auto; height: 116px; filter: drop-shadow(0 8px 10px rgba(10, 70, 160, .18)); transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.prod.bump .prod-art svg { transform: translateY(-6px) rotate(-4deg); }
.prod-badge {
  position: absolute; left: 10px; top: 10px; z-index: 1;
  font-size: 10.5px; font-weight: 800; letter-spacing: .02em;
  padding: 4px 8px; border-radius: 999px; color: #fff; background: var(--grad-logo);
}
.prod-qty {
  position: absolute; right: 10px; top: 10px; z-index: 1;
  min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px;
  display: grid; place-items: center; font-weight: 800; font-size: 13px;
  color: #fff; background: var(--blue); box-shadow: 0 4px 10px -3px rgba(10, 95, 224, .7);
  animation: pop .3s ease;
}
@keyframes pop { from { transform: scale(.4); } 70% { transform: scale(1.15); } to { transform: scale(1); } }
.prod-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.prod h3 { font-size: 15.5px; font-weight: 800; color: var(--navy); }
.prod-sub { font-size: 12px; color: var(--muted); font-weight: 500; }
.prod-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 10px; }
.price { font-weight: 800; font-style: italic; color: var(--blue); font-size: 19px; letter-spacing: -.02em; }
.add-btn {
  display: inline-flex; align-items: center; gap: 4px;
  height: 36px; padding: 0 12px 0 10px; border-radius: 999px; border: 0;
  font-weight: 700; font-size: 13px; color: #fff;
  background: linear-gradient(135deg, #0a8fe0, var(--blue-600));
  box-shadow: 0 6px 14px -6px rgba(0, 87, 230, .8);
  transition: transform .12s;
}
.add-btn:active { transform: scale(.94); }
.add-btn svg { width: 15px; height: 15px; }
.stepper { display: inline-flex; align-items: center; background: #eaf4fe; border-radius: 999px; padding: 3px; }
.stepper button {
  width: 30px; height: 30px; border-radius: 50%; border: 0;
  display: grid; place-items: center; color: var(--blue-700); background: #fff;
  box-shadow: 0 2px 6px -2px rgba(11, 77, 179, .35);
  transition: transform .1s;
}
.stepper button:active { transform: scale(.88); }
.stepper button svg { width: 14px; height: 14px; }
.stepper output { min-width: 28px; text-align: center; font-weight: 800; font-size: 15px; color: var(--navy); }
.stepper.lg button { width: 34px; height: 34px; }

/* ---------- Cómo funciona / equipo ---------- */
.how { margin-top: 22px; padding: 16px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.how-title { font-size: 16px; font-weight: 800; color: var(--navy); margin-bottom: 10px; }
.how ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.how li { display: flex; gap: 12px; align-items: center; }
.how li > span {
  width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-family: var(--font-tech); font-weight: 800; color: #fff; background: var(--grad-logo); font-size: 14px;
}
.how li div { display: flex; flex-direction: column; line-height: 1.3; }
.how li small { color: var(--muted); font-size: 13px; }
.team { position: relative; margin: 16px 0 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.team img { width: 100%; aspect-ratio: 1024 / 660; object-fit: cover; }
.team figcaption {
  position: absolute; inset: auto 0 0 0; padding: 50px 16px 14px; color: #fff;
  background: linear-gradient(180deg, transparent, rgba(8, 40, 100, .88) 55%);
  display: flex; flex-direction: column; gap: 4px;
}
.team figcaption b { font-size: 17px; }
.team figcaption span { font-size: 12.5px; opacity: .92; line-height: 1.4; }
.promise { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.promise div {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 12px 6px; border-radius: var(--radius-sm); background: #fff; font-size: 11.5px; font-weight: 600; color: var(--navy); line-height: 1.25;
}
.promise svg { width: 22px; height: 22px; color: var(--blue); }
.legal { margin-top: 16px; text-align: center; font-size: 11.5px; color: var(--muted); }

/* ---------- Tarjetas y formularios ---------- */
.card { background: #fff; border-radius: var(--radius); padding: 16px; margin-top: 12px; box-shadow: var(--shadow-sm); }
.card-title {
  display: flex; align-items: center; gap: 8px; padding: 0; margin-bottom: 12px;
  font-weight: 800; font-size: 15.5px; color: var(--navy); width: 100%;
}
.card-title svg { width: 19px; height: 19px; color: var(--blue); }
.opt { font-weight: 500; color: var(--muted); font-size: 12.5px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.card-title + .field, .field.slim:first-child { margin-top: 0; }
.field label, .field-label { font-size: 13px; font-weight: 700; color: var(--navy); }
input:not([type=checkbox]):not([type=radio]), textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  border-radius: 14px; border: 1.5px solid var(--line); background: #f8fbfe;
  font-size: 16px; font-weight: 500; transition: border-color .2s, box-shadow .2s, background .2s;
}
textarea { resize: vertical; min-height: 64px; }
input:focus, textarea:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(10, 95, 224, .12); }
input::placeholder, textarea::placeholder { color: #9aa9bd; }
.input-prefix { display: flex; align-items: stretch; border: 1.5px solid var(--line); border-radius: 14px; background: #f8fbfe; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.input-prefix:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(10, 95, 224, .12); background: #fff; }
.input-prefix span { display: grid; place-items: center; padding: 0 12px; font-weight: 700; color: var(--muted); background: #eef5fc; border-right: 1.5px solid var(--line); }
.input-prefix input { border: 0 !important; box-shadow: none !important; border-radius: 0 !important; background: transparent !important; }
.err { display: none; color: var(--danger); font-size: 12.5px; font-weight: 600; }
.invalid .err, .err.show { display: block; }
.invalid input, .invalid .input-prefix { border-color: var(--danger); }
.hint { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.check { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 13.5px; font-weight: 600; color: var(--navy); cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--blue); }
.date-input { margin-top: 10px; }

/* Renglones de productos en checkout */
.co-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px dashed var(--line); }
.co-item:first-child { border-top: 0; padding-top: 0; }
.co-item-art { width: 44px; height: 44px; border-radius: 12px; background: var(--sky); display: grid; place-items: center; flex: none; }
.co-item-art svg { width: auto; height: 38px; }
.co-item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.co-item-info b { font-size: 14.5px; color: var(--navy); }
.co-item-info small { color: var(--muted); font-size: 12.5px; }
.co-empty { color: var(--muted); font-size: 14px; }

/* Opciones tipo tarjeta (radio) */
.choice-list { display: grid; gap: 8px; }
.choice {
  position: relative; display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px; border-radius: 16px; border: 1.5px solid var(--line); background: #fbfdff;
  cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s;
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: #e7f2fd; color: var(--blue); flex: none; }
.choice-ic svg { width: 20px; height: 20px; }
.choice-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.choice-txt b { font-size: 14.5px; color: var(--navy); }
.choice-txt small { color: var(--muted); font-size: 12.5px; }
.choice-radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #b7c8dc; flex: none; margin-top: 8px; display: grid; place-items: center; transition: .2s; }
.choice:has(input:checked) { border-color: var(--blue); background: #f1f8ff; box-shadow: 0 0 0 3px rgba(10, 95, 224, .1); }
.choice:has(input:checked) .choice-radio { border-color: var(--blue); background: var(--blue); box-shadow: inset 0 0 0 4px #fff; }
.choice:has(input:focus-visible) { outline: 3px solid rgba(10, 95, 224, .45); outline-offset: 2px; }
.choice-extra { margin-top: 10px; }
.choice-extra .field { margin-top: 8px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips + .chips { margin-top: 10px; }
.chip {
  position: relative; display: inline-flex; flex-direction: column; justify-content: center;
  min-height: 44px; padding: 7px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: #fbfdff;
  font-weight: 700; font-size: 14px; color: var(--navy); cursor: pointer; line-height: 1.2; transition: .2s;
}
.chip small { font-weight: 500; color: var(--muted); font-size: 11.5px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:checked) { border-color: var(--blue); background: var(--blue); color: #fff; }
.chip:has(input:checked) small { color: rgba(255, 255, 255, .85); }
.chip:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.chip:has(input:focus-visible) { outline: 3px solid rgba(10, 95, 224, .45); outline-offset: 2px; }

.newdir { display: grid; gap: 0; }
.newdir .field:first-child { margin-top: 12px; }
.newdir.solo .field:first-child { margin-top: 0; }
.gps-btn { margin-top: 12px; }
.gps-ok { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--ok); }
.gps-ok svg { width: 16px; height: 16px; }

/* Pie del checkout */
.checkout-foot {
  position: sticky; bottom: 0; z-index: 4;
  display: flex; align-items: center; gap: 14px;
  margin: 16px -16px -28px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); box-shadow: 0 -10px 24px -18px rgba(11, 77, 179, .5);
}
.total-box { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.total-box small { color: var(--muted); font-weight: 600; font-size: 12px; }
.total-box b { font-size: 24px; font-weight: 800; font-style: italic; color: var(--blue); letter-spacing: -.02em; }
.total-box span { font-size: 12px; color: var(--muted); font-weight: 600; }
.checkout-foot .btn { flex: 1; }

/* ---------- Barra carrito ---------- */
.cartbar {
  position: absolute; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 10px); z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 9px 10px 9px 10px; border: 0; border-radius: 20px; text-align: left;
  color: #fff; background: linear-gradient(135deg, var(--navy), var(--blue-700) 60%, var(--blue));
  box-shadow: 0 16px 30px -12px rgba(8, 40, 110, .65);
  animation: slideUp .35s cubic-bezier(.2, 1.2, .4, 1);
}
@keyframes slideUp { from { transform: translateY(120%); opacity: 0; } to { transform: none; opacity: 1; } }
.cart-ic { position: relative; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .15); flex: none; }
.cart-ic svg { width: 22px; height: 22px; }
.cart-ic b {
  position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  display: grid; place-items: center; font-size: 12px; background: var(--accent); border: 2px solid #fff;
}
.cart-ic b.tick { animation: pop .3s ease; }
.cart-txt { flex: 1; display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.cart-txt b { font-size: 18px; font-weight: 800; font-style: italic; }
.cart-txt small { font-size: 12px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-go { display: inline-flex; align-items: center; gap: 4px; padding: 10px 12px 10px 16px; border-radius: 14px; background: #fff; color: var(--blue-700); font-weight: 800; font-size: 14px; }
.cart-go svg { width: 16px; height: 16px; }
.app.no-tabs .cartbar { display: none; }

/* ---------- Barra de pestañas ---------- */
.tabbar {
  position: relative; z-index: 10; flex: none;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.app.no-tabs .tabbar { display: none; }
.tabbar a {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: #7c8ca3; text-decoration: none; font-size: 11.5px; font-weight: 700;
}
.tabbar a svg { width: 24px; height: 24px; transition: transform .2s; }
.tabbar a[aria-current="page"] { color: var(--blue); }
.tabbar a[aria-current="page"] svg { transform: translateY(-1px); }
.tabbar a[aria-current="page"]::before {
  content: ""; position: absolute; top: 0; width: 34px; height: 3px; border-radius: 0 0 4px 4px; background: var(--grad-logo);
}
.tab-badge {
  position: absolute; top: 9px; left: calc(50% + 7px); min-width: 17px; height: 17px; padding: 0 5px;
  border-radius: 999px; background: var(--accent); color: #fff; font-style: normal; font-size: 10.5px; font-weight: 800;
  display: grid; place-items: center; border: 2px solid #fff;
}

/* ---------- Pedidos ---------- */
.segmented { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; background: #fff; border-radius: 16px; box-shadow: var(--shadow-sm); margin-top: -4px; position: relative; z-index: 2; }
.segmented button { border: 0; background: none; min-height: 40px; border-radius: 12px; font-weight: 700; color: var(--muted); font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.segmented button[aria-selected="true"] { background: var(--blue); color: #fff; box-shadow: 0 6px 14px -8px rgba(10, 95, 224, .9); }
.count { font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: rgba(10, 95, 224, .12); }
.segmented button[aria-selected="true"] .count { background: rgba(255, 255, 255, .25); }
.count:empty { display: none; }
.order { background: #fff; border-radius: var(--radius); padding: 14px 16px; margin-top: 12px; box-shadow: var(--shadow-sm); }
.order-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.order-id { font-weight: 800; font-size: 14px; letter-spacing: .03em; color: var(--navy); }
.order-date { color: var(--muted); font-size: 12.5px; font-weight: 500; margin-top: 2px; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.info { color: var(--blue-700); background: #e3f0fd; }
.pill.ok { color: var(--ok); background: var(--ok-bg); }
.pill.warn { color: var(--warn); background: var(--warn-bg); }
.pill.off { color: #6b7a8f; background: #edf1f6; }
.order-items { margin: 12px 0; padding: 10px 12px; border-radius: 14px; background: #f5f9fe; display: grid; gap: 4px; font-size: 13.5px; }
.order-items div { display: flex; justify-content: space-between; gap: 10px; }
.order-items span { color: var(--muted); }
.order-items .tot { border-top: 1px dashed var(--line); padding-top: 6px; margin-top: 2px; font-weight: 800; color: var(--navy); }
.order-items .tot b { color: var(--blue); font-style: italic; }
.order-meta { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.order-meta div { display: flex; align-items: flex-start; gap: 8px; }
.order-meta svg { width: 16px; height: 16px; margin-top: 1px; color: var(--blue); }
.order-meta b { color: var(--navy); font-weight: 700; }
.order-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.order-actions .btn { padding: 0 10px; }

.empty { text-align: center; padding: 34px 16px 10px; }
.empty-art { width: 120px; height: 120px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 50% 70%, var(--sky-2), var(--sky) 70%); }
.empty-art svg { width: auto; height: 90px; }
.empty h3 { font-size: 17px; color: var(--navy); }
.empty p { color: var(--muted); margin: 6px auto 16px; max-width: 280px; font-size: 14px; }

/* ---------- Pagos ---------- */
.balance {
  position: relative; overflow: hidden; margin-top: -4px; padding: 18px; border-radius: var(--radius); color: #fff;
  background: linear-gradient(135deg, var(--navy), var(--blue-700)); box-shadow: var(--shadow); z-index: 2;
}
.balance::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(0, 197, 192, .45), transparent 70%); }
.balance small { font-family: var(--font-tech); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; opacity: .85; }
.balance b { display: block; font-size: 34px; font-weight: 800; font-style: italic; margin: 4px 0 2px; letter-spacing: -.02em; }
.balance p { opacity: .85; font-size: 13px; position: relative; z-index: 1; }
.pending { margin-top: 12px; display: grid; gap: 8px; }
.pending-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: #fff; box-shadow: var(--shadow-sm); }
.pending-row div { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.pending-row b { font-size: 14px; color: var(--navy); }
.pending-row small { font-size: 12px; color: var(--muted); }
.pending-row .amt { font-weight: 800; font-style: italic; color: var(--blue); font-size: 16px; }
.h-sub { font-size: 16px; font-weight: 800; color: var(--navy); margin: 22px 2px 4px; }
.method { display: flex; gap: 12px; align-items: flex-start; }
.method .choice-ic { width: 44px; height: 44px; border-radius: 14px; }
.method-txt { flex: 1; min-width: 0; }
.method-txt b { display: block; font-size: 15px; color: var(--navy); }
.method-txt p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.bank {
  margin-top: 12px; padding: 14px; border-radius: 16px; color: #fff;
  background: radial-gradient(120% 120% at 100% 0%, rgba(0, 197, 192, .55), transparent 55%), linear-gradient(135deg, #0a8fe0, var(--blue-700));
}
.bank + .bank { margin-top: 8px; }
.bank-top { display: flex; justify-content: space-between; align-items: center; font-weight: 800; }
.bank-top small { font-weight: 600; opacity: .85; font-size: 12px; }
.bank-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding: 8px 8px 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, .14); }
.bank-row div { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.bank-row small { font-size: 11px; opacity: .8; }
.bank-row b { font-size: 15px; letter-spacing: .02em; overflow-wrap: anywhere; }
.copy-btn { display: inline-flex; align-items: center; gap: 5px; border: 0; border-radius: 10px; padding: 7px 10px; font-weight: 700; font-size: 12.5px; color: var(--blue-700); background: #fff; flex: none; }
.copy-btn svg { width: 14px; height: 14px; }
.notice { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding: 12px 14px; border-radius: 14px; font-size: 13px; background: #eaf5ff; color: var(--navy); }
.notice svg { width: 18px; height: 18px; color: var(--blue); margin-top: 1px; }
.notice.warn { background: var(--warn-bg); color: #5b3900; }
.notice.warn svg { color: var(--warn); }
.steps-mini { margin: 10px 0 0; padding-left: 20px; color: var(--muted); font-size: 13px; display: grid; gap: 4px; }

/* ---------- Cuenta ---------- */
.profile { display: flex; align-items: center; gap: 14px; margin-top: -4px; position: relative; z-index: 2; }
.avatar {
  width: 58px; height: 58px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-weight: 800; font-size: 21px; color: #fff; background: var(--grad-logo); box-shadow: 0 0 0 4px #fff;
}
.profile-txt { flex: 1; min-width: 0; line-height: 1.25; }
.profile-txt b { display: block; font-size: 17px; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-txt small { color: var(--muted); font-size: 13px; }
.list { display: grid; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.list-row:first-child { border-top: 0; padding-top: 0; }
.list-row:last-child { padding-bottom: 0; }
.list-row .choice-ic { width: 40px; height: 40px; }
.list-row div { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.list-row b { font-size: 14.5px; color: var(--navy); }
.list-row small { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.list-row > svg { width: 18px; height: 18px; color: #9fb0c6; }
.hours { display: grid; gap: 8px; }
.hours div { display: flex; justify-content: space-between; padding: 10px 12px; border-radius: 12px; background: #f5f9fe; font-weight: 600; font-size: 14px; }
.hours span { color: var(--muted); font-weight: 500; }
.danger-link { display: inline-flex; align-items: center; gap: 6px; margin: 18px auto 0; border: 0; background: none; color: var(--danger); font-weight: 700; font-size: 13.5px; }
.danger-link svg { width: 16px; height: 16px; }
.center { text-align: center; }

/* ---------- Pedido enviado ---------- */
.done { padding-top: calc(28px + env(safe-area-inset-top)); text-align: center; }
.done-badge { position: relative; width: 112px; height: 112px; margin: 6px auto 16px; }
.done-badge::before, .done-badge::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--grad-logo); opacity: .18; animation: ripple 2.2s ease-out infinite; }
.done-badge::after { animation-delay: 1.1s; }
@keyframes ripple { from { transform: scale(.7); opacity: .35; } to { transform: scale(1.35); opacity: 0; } }
.done-badge span { position: absolute; inset: 14px; border-radius: 50%; display: grid; place-items: center; background: var(--grad-logo); color: #fff; box-shadow: 0 14px 30px -12px rgba(0, 87, 230, .8); animation: pop .5s ease; }
.done-badge svg { width: 40px; height: 40px; }
.done h1 { font-size: 26px; font-weight: 800; color: var(--navy); }
.done > p { color: var(--muted); margin: 8px auto 0; max-width: 320px; }
.done .order-id { display: inline-block; margin-top: 12px; padding: 6px 12px; border-radius: 999px; background: #e3f0fd; }
.done .card { text-align: left; }
.done-actions { display: grid; gap: 10px; margin-top: 16px; }

/* ---------- Hoja inferior (dialog) ---------- */
.sheet {
  width: 100%; max-width: 480px; max-height: 88dvh; margin: auto auto 0; padding: 8px 18px calc(20px + env(safe-area-inset-bottom));
  border: 0; border-radius: 26px 26px 0 0; background: #fff; color: var(--ink); overflow-y: auto;
  box-shadow: 0 -20px 50px -20px rgba(8, 40, 110, .5);
}
.sheet[open] { animation: sheetIn .32s cubic-bezier(.2, 1, .3, 1); }
@keyframes sheetIn { from { transform: translateY(100%); } to { transform: none; } }
.sheet::backdrop { background: rgba(8, 30, 70, .45); backdrop-filter: blur(2px); }
.sheet-grip { width: 42px; height: 5px; border-radius: 999px; background: #d3deea; margin: 4px auto 12px; }
.sheet h2 { font-size: 19px; font-weight: 800; color: var(--navy); }
.sheet .sheet-sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.sheet-actions { display: grid; gap: 10px; margin-top: 18px; }
.ios-steps { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.ios-steps li { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: #f5f9fe; font-size: 14px; font-weight: 600; }
.ios-steps li span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; font-weight: 800; flex: none; }
.ios-steps svg { width: 18px; height: 18px; vertical-align: -3px; color: var(--blue); }

/* ---------- Toast ---------- */
.toast {
  position: absolute; left: 50%; bottom: calc(var(--tabbar-h) + 96px + env(safe-area-inset-bottom)); z-index: 100;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 10px 16px; border-radius: 999px; background: var(--navy); color: #fff; font-weight: 700; font-size: 14px;
  box-shadow: 0 12px 24px -10px rgba(8, 30, 70, .6); transition: .25s ease; width: max-content; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.app.no-tabs .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }

/* ---------- Pantallas medianas y grandes ---------- */
@media (min-width: 560px) {
  body { background: radial-gradient(60% 50% at 20% 0%, #fff, transparent 70%), linear-gradient(180deg, #c9eefc, #e9f7fd 55%, #cfeffb); }
  .app { max-width: 480px; margin: 0 auto; box-shadow: 0 0 60px -20px rgba(8, 50, 120, .35); }
}
@media (min-width: 980px) {
  body::after {
    content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: 17vh; z-index: -1;
    background: linear-gradient(180deg, #0a7fe0, #0b47a8);
    clip-path: path("M0 60 C 300 0, 520 120, 900 50 S 1500 0, 2600 70 L 2600 900 L 0 900 Z");
  }
  .stage {
    display: grid; grid-template-columns: minmax(0, 440px) 440px; gap: clamp(40px, 6vw, 96px);
    justify-content: center; align-items: center; min-height: 100vh; padding: 24px;
  }
  .brand-panel { display: flex; flex-direction: column; align-items: flex-start; }
  .brand-logo { width: 150px; height: 150px; margin: 0 0 14px -6px; filter: drop-shadow(0 18px 26px rgba(0, 60, 150, .28)); }
  .kicker { font-family: var(--font-tech); font-weight: 800; letter-spacing: .24em; color: var(--blue-700); font-size: 14px; text-transform: uppercase; }
  .brand-title { font-size: clamp(30px, 2.8vw, 40px); max-width: 480px; font-weight: 800; color: var(--navy); margin-top: 8px; letter-spacing: -.02em; }
  .brand-phones { display: grid; gap: 4px; margin-top: 18px; }
  .brand-phones a { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--blue-700); font-size: 30px; font-weight: 800; font-style: italic; letter-spacing: -.02em; }
  .brand-phones svg { width: 34px; height: 34px; padding: 7px; border-radius: 50%; background: #fff; color: var(--blue); box-shadow: var(--shadow-sm); }
  .brand-note { margin-top: 16px; max-width: 400px; color: var(--muted); font-size: 14px; }
  .brand-photo { margin-top: 22px; width: 100%; max-width: 400px; border-radius: 22px; box-shadow: var(--shadow); border: 5px solid #fff; }
  .app {
    width: 440px; height: min(880px, calc(100vh - 48px)); margin: 0;
    border-radius: 36px; box-shadow: 0 40px 80px -30px rgba(8, 50, 120, .55), 0 0 0 10px rgba(255, 255, 255, .6);
  }
  .sheet { margin: auto; border-radius: 26px; max-width: 440px; }
  .sheet[open] { animation: fadeIn .2s ease; }
  @keyframes fadeIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
}
@media (min-width: 980px) and (max-height: 900px) {
  .brand-photo { display: none; }
}

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