/* ===== VAYGO Comida — panel de comercios (rojo, negro y blanco, como la app y la página de inicio) ===== */

:root {
  --red: #E3122B;
  --red-dark: #B50D22;
  --red-soft: #FDE6E9;
  --black: #0B0B0F;
  --ink: #15161B;
  --paper: #F7F5F2;
  --line: #E6E1DA;
  --text: #2A2B31;
  --muted: #6B6E78;
  --ok: #1E8E4E;
  --ok-soft: #E3F4EA;
  --shadow: 0 2px 6px rgba(11, 11, 15, .06), 0 18px 40px rgba(11, 11, 15, .10);
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); color: var(--text); background: var(--paper); line-height: 1.5; -webkit-font-smoothing: antialiased; min-height: 100vh; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 7vw, 2.8rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; margin-top: 1.2em; }
p { margin: 0 0 .8em; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.red { color: var(--red); }
.wrap { width: min(720px, 100% - 32px); margin-inline: auto; }
main { padding: 22px 0 80px; }
.kicker { display: inline-block; font-weight: 700; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--red); margin-bottom: 10px; }

/* ---------- Barra de arriba ---------- */
.top { position: sticky; top: 0; z-index: 1000; background: var(--black); }
.top-row { height: 62px; display: flex; align-items: center; justify-content: space-between; }
.logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font: 800 1.35rem/1 var(--display); color: var(--red); letter-spacing: -.02em; }
.logo img { width: 34px; height: 34px; border-radius: 9px; }
.logo em { font-style: normal; color: #fff; font-weight: 600; }
.top .b-line { color: #fff; border-color: rgba(255, 255, 255, .45); }

/* ---------- Botones (también los usa la ventana de confirmar de common.js) ---------- */
.b, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  padding: .8em 1.3em; border-radius: 14px; border: 2px solid transparent; font: 700 1rem/1.1 var(--body);
  text-decoration: none; cursor: pointer; transition: filter .15s, transform .1s, opacity .15s; color: var(--ink); background: #fff;
}
.b:hover:not(:disabled), .btn:hover:not(:disabled) { filter: brightness(1.06); }
.b:active, .btn:active { transform: translateY(1px); }
.b:disabled, .btn:disabled { opacity: .5; cursor: not-allowed; }
.b-sm { padding: .5em .95em; font-size: .88rem; border-radius: 12px; }
.b-block, .btn-block { width: 100%; }
.b-red, .btn-primary { background: var(--red); color: #fff; box-shadow: 0 10px 24px rgba(227, 18, 43, .3); }
.b-black { background: var(--black); color: #fff; }
.b-line, .btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.b-line.danger { color: var(--red); border-color: var(--red); }

/* ---------- Tarjetas y formularios ---------- */
.intro { padding: 10px 0 18px; }
.free-note { display: inline-block; background: var(--red-soft); color: var(--red-dark); border-radius: 12px; padding: 10px 14px; font-weight: 600; }
.card { background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--red); border-radius: 22px; padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.card-head .right { margin-left: auto; }
.tabs { display: flex; gap: 6px; background: var(--paper); border-radius: 14px; padding: 5px; margin-bottom: 18px; }
.tabs button { flex: 1; border: 0; background: transparent; padding: .7em .5em; border-radius: 10px; font: 700 .95rem var(--body); color: var(--muted); cursor: pointer; }
.tabs button.active { background: var(--black); color: #fff; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-weight: 600; font-size: .92rem; color: var(--ink); }
input, select, textarea { width: 100%; font: inherit; color: var(--text); background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: .75em .9em; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
input[type=file] { padding: .55em; background: var(--paper); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-bottom: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--red); }
.hint { color: var(--muted); font-size: .9rem; }
.form-error { color: var(--red); font-weight: 600; min-height: 1px; margin: 0 0 10px; }
.form-error:empty { display: none; }
.map { height: 230px; border-radius: 14px; border: 1px solid var(--line); overflow: hidden; margin-bottom: 8px; z-index: 0; }
.local-dot { display: block; width: 22px; height: 22px; margin: 4px; border-radius: 50%; background: var(--red); border: 4px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.pin { font-size: 28px; line-height: 30px; text-align: center; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }

/* ---------- Encabezado del comercio ---------- */
.shop-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.shop-logo { width: 74px; height: 74px; border-radius: 18px; object-fit: cover; border: 1px solid var(--line); background: var(--paper); flex: none; }
.shop-info { flex: 1; min-width: 180px; }
.shop-info h1 { font-size: 1.6rem; margin: 0 0 4px; }
.tag { display: inline-block; font-size: .76rem; font-weight: 800; padding: .3em .8em; border-radius: 99px; margin: 2px 4px 2px 0; }
.tag-wait { background: var(--red-soft); color: var(--red-dark); }
.tag-ok { background: var(--ok-soft); color: var(--ok); }
.tag-bad { background: var(--black); color: #fff; }
.open-box { display: flex; align-items: center; gap: 10px; }
.toggle { position: relative; width: 58px; height: 32px; border-radius: 99px; border: 0; background: #CFCAC2; cursor: pointer; flex: none; transition: background .2s; }
.toggle::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.toggle.on { background: var(--red); }
.toggle.on::after { transform: translateX(26px); }
.open-box b { font-size: .95rem; }

/* ---------- Avisos ---------- */
.banner { border-radius: 16px; padding: 14px 16px; margin-bottom: 14px; font-weight: 500; }
.banner b { font-weight: 800; }
.banner.info { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--black); }
.banner.warn { background: var(--red-soft); color: var(--red-dark); border-left: 5px solid var(--red); }
.banner.bad { background: var(--black); color: #fff; }
.banner ul { margin: 6px 0 0; padding-left: 20px; }
.soon { background: var(--paper); border-radius: 12px; padding: 12px 14px; font-weight: 600; margin: 0; }

/* ---------- Menú ---------- */
.menu-section { margin: 4px 0 10px; font-family: var(--display); font-size: 1.05rem; color: var(--ink); border-bottom: 2px solid var(--red); display: inline-block; padding-bottom: 2px; }
.item { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item img, .item .no-photo { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; flex: none; background: var(--paper); }
.item .no-photo { display: grid; place-items: center; font-size: .7rem; color: var(--muted); text-align: center; border: 1px dashed var(--line); }
.item .txt { flex: 1; min-width: 0; }
.item .txt b { display: block; color: var(--ink); }
.item .txt p { margin: 2px 0 0; color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }
.item .price { font: 800 1.05rem var(--display); color: var(--red); }
.item.off { opacity: .55; }
.item .acts { display: flex; flex-direction: column; gap: 6px; flex: none; }
.empty { color: var(--muted); text-align: center; padding: 18px 0; margin: 0; }

/* ---------- Ventanas ---------- */
dialog.modal { border: 0; border-radius: 24px; padding: 0; width: min(480px, 100% - 24px); box-shadow: 0 30px 80px rgba(0, 0, 0, .4); }
dialog.modal::backdrop { background: rgba(11, 11, 15, .6); }
.modal-body { padding: 24px; display: grid; gap: 10px; }
.modal-body .field { margin-bottom: 4px; }
.modal-body h2 { margin: 0; }
.item-photo { height: 160px; border-radius: 16px; background: var(--paper) center / cover no-repeat; border: 1px dashed var(--line); display: grid; place-items: center; color: var(--muted); font-weight: 600; }
.item-photo.has span { display: none; }

/* ---------- Página pública /comida ---------- */
.wrap.wide { width: min(1080px, 100% - 32px); }
.soon-band { background: var(--black); color: #fff; border-radius: 16px; padding: 14px 18px; margin-bottom: 16px; }
.soon-band b { color: #fff; }
body.themed .soon-band { border: 1px solid rgba(255, 255, 255, .18); }
.search { margin-bottom: 12px; padding: .9em 1.1em; border-radius: 14px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip { border: 1.5px solid var(--line); background: #fff; color: var(--ink); border-radius: 99px; padding: .45em 1em; font: 700 .9rem var(--body); cursor: pointer; }
.chip.on { background: var(--red); border-color: var(--red); color: #fff; }
.shops { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-bottom: 30px; }
.shop-card { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--red); border-radius: 20px; padding: 14px; text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: transform .12s; }
.shop-card:hover { transform: translateY(-2px); }
.shop-card img { width: 76px; height: 76px; border-radius: 16px; object-fit: cover; flex: none; background: var(--paper); }
.shop-card.closed img { filter: grayscale(1); opacity: .7; }
.sc-txt { display: grid; gap: 3px; min-width: 0; }
.sc-txt b { font-family: var(--display); font-size: 1.12rem; color: var(--ink); overflow-wrap: anywhere; }
.empty-big { grid-column: 1 / -1; text-align: center; background: #fff; border: 1px dashed var(--line); border-radius: 20px; padding: 34px 20px; }
.empty-big b { display: block; font-family: var(--display); font-size: 1.25rem; color: var(--ink); margin-bottom: 6px; }
.back { display: inline-block; font-weight: 700; color: var(--red); text-decoration: none; margin-bottom: 14px; }
.join-band { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; background: linear-gradient(160deg, var(--red), var(--red-dark)); color: #fff; border-radius: 24px; padding: 26px; margin-top: 10px; }
.join-band h2 { color: #fff; margin: 0 0 6px; }
.join-band p { margin: 0; color: rgba(255, 255, 255, .92); }
.b-white { background: #fff; color: var(--black); }
.top .b-red { box-shadow: none; }

/* ---------- Cámara de selfies (camera.js) ---------- */
.selfie-stage { position: relative; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: #111; width: min(280px, 100%); margin: 6px auto; }
.selfie-stage video, .selfie-stage img { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.selfie-stage img { transform: none; }
.selfie-guide { position: absolute; inset: 8%; border: 3px dashed rgba(227, 18, 43, .9); border-radius: 50%; pointer-events: none; }
.selfie-wait { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; color: #fff; margin: 0; }

/* ---------- Fondo de cada servicio: dibujos de línea transparentes (fondos.js) ---------- */
body.themed { background-color: var(--black); background-repeat: repeat; background-size: 260px 260px; }
body.themed .intro h1, body.themed .intro .lead-w { color: #fff; }
body.themed .intro .muted { color: rgba(255, 255, 255, .78); }
body.themed .free-note { background: rgba(227, 18, 43, .16); color: #fff; border: 1px solid rgba(227, 18, 43, .5); }
body.themed .back { color: #fff; }
.hero-photo { border-radius: 22px; overflow: hidden; margin: 6px 0 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); max-width: 520px; }
.hero-photo img { width: 100%; }
.req-list { margin: 0 0 4px; padding-left: 20px; color: rgba(255, 255, 255, .85); }
.req-list li { margin-bottom: 4px; }

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.kv b { text-align: right; color: var(--ink); overflow-wrap: anywhere; }
.doc-link { display: inline-block; margin: 0 8px 8px 0; padding: .45em .9em; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); color: var(--ink); font-weight: 700; text-decoration: none; }
.doc-link:hover { border-color: var(--red); color: var(--red); }
body.themed .shops > .empty { color: rgba(255, 255, 255, .75); }

/* /comida: tipos de comida, restaurantes de ejemplo y cómo funciona */
.on-dark { color: #fff; margin: 22px 0 12px; }
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.cat { display: grid; justify-items: center; gap: 8px; padding: 16px 8px; border-radius: 18px; border: 1.5px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .06); color: #fff; font: 700 .9rem var(--body); cursor: pointer; transition: background .15s, border-color .15s; }
.cat:hover { border-color: var(--red); }
.cat.on { background: var(--red); border-color: var(--red); }
.ic-line { width: 34px; height: 34px; fill: none; stroke: var(--red); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cat.on .ic-line { stroke: #fff; }
.demo-logo { width: 76px; height: 76px; border-radius: 16px; background: var(--red-soft); display: grid; place-items: center; flex: none; }
.demo-logo.big { width: 74px; height: 74px; }
.item .no-photo .ic-line { width: 30px; height: 30px; }
.demo-note { background: rgba(227, 18, 43, .16); border: 1px solid rgba(227, 18, 43, .5); color: #fff; border-radius: 14px; padding: 10px 14px; margin: 0 0 12px; }
#shop .demo-note { margin-bottom: 14px; }
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 26px; }
.how div { background: #fff; border-radius: 20px; border-top: 5px solid var(--red); padding: 18px; }
.how span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--black); color: #fff; font-weight: 800; margin-bottom: 10px; }
.how b { display: block; font-family: var(--display); font-size: 1.08rem; color: var(--ink); }
.how p { margin: 4px 0 0; color: var(--muted); font-size: .92rem; }
@media (max-width: 700px) { .how { grid-template-columns: 1fr; } .cats { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Aviso flotante ---------- */
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 3000; background: var(--black); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.toast.error { background: var(--red); }

@media (max-width: 560px) {
  .grid-2 { grid-template-columns: 1fr; }
  .card { padding: 18px 16px; }
  .item .acts { flex-direction: row; }
  .item { flex-wrap: wrap; }
  .item .acts { width: 100%; justify-content: flex-end; }
}

/* Cuadrito para aceptar los términos antes de registrarse. */
.terms-check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; font-size: .92rem; line-height: 1.4; cursor: pointer; }
.terms-check input { width: 20px; height: 20px; margin-top: 1px; flex: none; accent-color: #E3122B; }
.terms-check a { color: #E3122B; font-weight: 700; }

/* Pasos que siguen después de registrarse (motorizados y repartidores). */
.next-steps ol { margin: 8px 0 0; padding-left: 20px; line-height: 1.6; }
