/* qrGO · formulario de alta (prototipo) */

@font-face { font-family: 'Fraunces'; src: url(fuentes/fraunces-latin.woff2) format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url(fuentes/manrope-latin.woff2) format('woff2'); font-weight: 400 800; font-display: swap; }

:root {
  --crema: #fbf7f1;
  --blanco: #fff;
  --tinta: #191613;
  --gris: #6f655a;
  --suave: #a2978a;
  --linea: #e6ded2;
  --acento: #a8462a;
  --acento-claro: #f6e7e1;
  --ok: #2f7d4f;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0; background: var(--crema); color: var(--tinta);
  font-family: var(--sans); font-size: 16px; line-height: 1.55;
  padding-bottom: 8.5rem;
  -webkit-font-smoothing: antialiased;
}

/* ---------- barra superior ---------- */
.barra {
  position: sticky; top: 0; z-index: 30;
  background: rgba(251, 247, 241, .94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--linea);
}
.barra-caja {
  max-width: 44rem; margin: 0 auto; padding: .85rem 1.2rem;
  display: flex; align-items: center; gap: 1rem;
}
.marca { font-family: var(--serif); font-size: 1.16rem; letter-spacing: -.02em; }
.marca strong { color: var(--acento); font-weight: 700; }
.progreso { display: flex; gap: .3rem; margin-left: auto; }
.punto {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--linea); transition: background .25s, transform .25s;
}
.punto.activo { background: var(--acento); transform: scale(1.25); }
.punto.hecho { background: #d9b8ac; }
.paso-txt {
  font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--suave); font-weight: 700; min-width: 5.6rem; text-align: right;
}

/* ---------- pasos ---------- */
main { max-width: 44rem; margin: 0 auto; padding: 0 1.2rem 1.5rem; }

.paso { display: none; padding-top: 2rem; animation: entra .35s ease both; }
.paso.activo { display: block; }
@keyframes entra { from { opacity: 0; transform: translateY(10px); } }

.ojo {
  font-size: .7rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--acento); font-weight: 800; margin: 0 0 .5rem;
}
.paso h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.6rem, 4.6vw, 2.1rem); line-height: 1.12;
  margin: 0 0 .5rem; letter-spacing: -.015em;
}
.sub { color: var(--gris); margin: 0 0 1.8rem; font-size: .96rem; }

/* ---------- campos ---------- */
.campo { margin-bottom: 1.1rem; }
.campo label {
  display: block; font-size: .78rem; font-weight: 700;
  letter-spacing: .04em; margin-bottom: .35rem;
}
.req, .op {
  font-size: .62rem; letter-spacing: .08em; text-transform: uppercase;
  padding: .1rem .4rem; border-radius: 100px; margin-left: .4rem;
  font-weight: 800; vertical-align: 1px;
}
.req { background: var(--acento-claro); color: var(--acento); }
.op { background: #efeae2; color: var(--suave); }

input[type=text], input[type=tel], textarea {
  width: 100%; padding: .85rem .95rem;
  border: 1px solid var(--linea); border-radius: 11px;
  background: var(--blanco); font-family: var(--sans); font-size: .97rem;
  color: var(--tinta); transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus {
  outline: none; border-color: var(--acento);
  box-shadow: 0 0 0 3px rgba(168, 70, 42, .1);
}
input::placeholder, textarea::placeholder { color: #b6ab9d; }
textarea { resize: vertical; line-height: 1.5; }
.dos { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }

/* ---------- logo ---------- */
.logo-fila {
  display: flex; gap: 1rem; align-items: center;
  padding: 1rem; background: var(--blanco);
  border: 1px solid var(--linea); border-radius: 14px; margin-bottom: 1.6rem;
}
.logo-zona {
  flex: 0 0 84px; width: 84px; height: 84px; border-radius: 50%;
  border: 1.6px dashed #cfc3b4; display: grid; place-items: center;
  cursor: pointer; overflow: hidden; background: var(--crema);
  transition: border-color .2s, background .2s;
}
.logo-zona:hover { border-color: var(--acento); background: var(--acento-claro); }
.logo-vacio { display: grid; place-items: center; gap: .1rem; text-align: center; color: var(--suave); }
.logo-vacio svg { width: 20px; height: 20px; }
.logo-vacio b { font-size: .6rem; letter-spacing: .04em; text-transform: uppercase; }
.logo-vacio small { font-size: .55rem; }
.logo-zona img { width: 100%; height: 100%; object-fit: cover; }
.logo-info b { font-size: .92rem; }
.logo-info p { margin: .2rem 0 0; font-size: .84rem; color: var(--gris); }
.enlace {
  background: none; border: 0; padding: 0; margin-top: .35rem;
  color: var(--acento); font-family: var(--sans); font-size: .8rem;
  font-weight: 700; cursor: pointer; text-decoration: underline;
}

/* ---------- opciones de subida ---------- */
.dos-opciones { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.opcion {
  display: grid; gap: .3rem; padding: 1.2rem 1rem;
  background: var(--blanco); border: 1px solid var(--linea); border-radius: 14px;
  cursor: pointer; text-align: center; transition: border-color .2s, transform .2s, box-shadow .2s;
}
.opcion:hover { border-color: var(--acento); transform: translateY(-1px); box-shadow: 0 8px 20px -16px rgba(25,22,19,.5); }
.opcion .icono { color: var(--acento); }
.opcion svg { width: 26px; height: 26px; margin: 0 auto; display: block; }
.opcion b { font-size: .92rem; }
.opcion small { color: var(--gris); font-size: .76rem; line-height: 1.35; }

/* ---------- miniaturas ---------- */
.miniaturas { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.miniaturas figure {
  margin: 0; width: 76px; height: 76px; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--linea); position: relative; background: #fff;
}
.miniaturas img { width: 100%; height: 100%; object-fit: cover; }
.miniaturas figcaption {
  position: absolute; inset: auto 0 0 0; background: rgba(25,22,19,.72); color: #fff;
  font-size: .5rem; padding: .1rem .2rem; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- leyendo ---------- */
.leyendo {
  display: flex; align-items: center; gap: .9rem;
  margin-top: 1rem; padding: .9rem 1rem;
  background: var(--acento-claro); border-radius: 12px; color: var(--acento);
}
.leyendo p { margin: 0; font-size: .88rem; }
.leyendo small { color: #a5705d; }
.spinner {
  width: 20px; height: 20px; border-radius: 50%; flex: 0 0 20px;
  border: 2.4px solid rgba(168,70,42,.25); border-top-color: var(--acento);
  animation: gira .8s linear infinite;
}
@keyframes gira { to { transform: rotate(360deg); } }

.o { display: flex; align-items: center; gap: .8rem; margin: 1.8rem 0 1rem; color: var(--suave); }
.o::before, .o::after { content: ''; flex: 1; height: 1px; background: var(--linea); }
.o span { font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; }

/* ---------- botones ---------- */
.principal, .secundario, .pagar {
  font-family: var(--sans); font-weight: 700; font-size: .95rem;
  border-radius: 12px; cursor: pointer; transition: background .2s, transform .15s, opacity .2s;
}
.principal { background: var(--tinta); color: #fff; border: 0; padding: .9rem 1.8rem; }
.principal:hover { background: #000; }
.secundario {
  background: var(--blanco); color: var(--tinta);
  border: 1px solid var(--linea); padding: .85rem 1.4rem;
}
.secundario:hover { border-color: var(--suave); }
.secundario.ancho { width: 100%; }
.principal:active, .secundario:active, .pagar:active { transform: scale(.985); }

/* ---------- platos con foto ---------- */
.subir-bloque {
  display: grid; place-items: center; gap: .2rem; text-align: center;
  padding: 1.5rem 1rem; border: 1.6px dashed #cfc3b4; border-radius: 14px;
  cursor: pointer; background: var(--blanco); transition: border-color .2s, background .2s;
}
.subir-bloque:hover { border-color: var(--acento); background: var(--acento-claro); }
.subir-bloque svg { width: 26px; height: 26px; color: var(--acento); }
.subir-bloque b { font-size: .93rem; }
.subir-bloque small { color: var(--gris); font-size: .78rem; }

.cuenta {
  font-size: .78rem; color: var(--gris); font-weight: 700;
  letter-spacing: .04em; margin: 1.4rem 0 .7rem;
}

.platos { list-style: none; margin: 0; padding: 0; }
.platos li {
  display: flex; align-items: center; gap: .8rem;
  padding: .6rem .7rem; background: var(--blanco);
  border: 1px solid var(--linea); border-radius: 12px; margin-bottom: .5rem;
}
.platos .hueco {
  flex: 0 0 56px; width: 56px; height: 56px; border-radius: 9px;
  border: 1.4px dashed #d5c9ba; display: grid; place-items: center;
  color: var(--suave); font-size: 1.1rem; cursor: pointer; overflow: hidden;
  background: var(--crema);
}
.platos .hueco img { width: 100%; height: 100%; object-fit: cover; }
.platos .hueco.lleno { border-style: solid; border-color: var(--linea); }
.platos .datos { min-width: 0; flex: 1; }
.platos .datos b { display: block; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.platos .datos small { color: var(--gris); font-size: .76rem; }
.platos .estado {
  font-size: .6rem; letter-spacing: .08em; text-transform: uppercase;
  font-weight: 800; padding: .18rem .5rem; border-radius: 100px; white-space: nowrap;
}
.estado.si { background: #e7f2ea; color: var(--ok); }
.estado.no { background: #efeae2; color: var(--suave); }
.estado.duda { background: #fdf0d8; color: #a06800; }

/* ---------- revisión ---------- */
.revision { list-style: none; margin: 0 0 1.4rem; padding: 0; }
.revision .seccion {
  font-family: var(--serif); font-weight: 600; font-size: 1.02rem;
  color: var(--acento); margin: 1.4rem 0 .6rem; letter-spacing: .04em;
}
.revision li.plato-rev {
  background: var(--blanco); border: 1px solid var(--linea);
  border-radius: 12px; padding: .8rem; margin-bottom: .6rem;
}
.revision .fila { display: flex; gap: .6rem; align-items: center; }
.revision input { border-radius: 9px; padding: .55rem .7rem; font-size: .9rem; }
.revision .nom { flex: 1; font-weight: 700; }
.revision .pre { width: 6.2rem; text-align: right; }
.revision .des { margin-top: .45rem; }
.revision .alerg { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .5rem; }
.revision .alerg button {
  font-family: var(--sans); font-size: .62rem; letter-spacing: .08em;
  text-transform: uppercase; font-weight: 800; cursor: pointer;
  border: 1px solid var(--linea); background: var(--crema); color: var(--suave);
  border-radius: 100px; padding: .18rem .55rem;
}
.revision .alerg button.on { background: var(--acento-claro); border-color: #dfb6a8; color: var(--acento); }

.casilla {
  display: flex; gap: .7rem; align-items: flex-start;
  padding: .95rem 1rem; background: var(--blanco);
  border: 1px solid var(--linea); border-radius: 12px; font-size: .84rem; color: var(--gris);
}
.casilla input { margin-top: .15rem; accent-color: var(--acento); width: 18px; height: 18px; flex: 0 0 18px; }

/* ---------- estilo ---------- */
.colores { display: flex; gap: .55rem; flex-wrap: wrap; }
.colores button {
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; box-shadow: inset 0 0 0 2px #fff;
  transition: transform .15s;
}
.colores button.on { border-color: var(--tinta); transform: scale(1.06); }

.rejilla-opciones { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.rejilla-opciones button {
  font-family: var(--sans); font-size: .84rem; font-weight: 700;
  padding: .8rem .6rem; border-radius: 11px; cursor: pointer;
  border: 1px solid var(--linea); background: var(--blanco); color: var(--tinta);
}
.rejilla-opciones button.on { border-color: var(--acento); background: var(--acento-claro); color: var(--acento); }

.vista-previa {
  border: 1px solid var(--linea); border-radius: 14px; overflow: hidden;
  background: #fff; padding: 1.1rem;
}
.vista-previa .vp-cab { text-align: center; border-bottom: 1px solid var(--linea); padding-bottom: .8rem; margin-bottom: .9rem; }
.vista-previa .vp-cab b { font-family: var(--serif); font-size: 1.15rem; display: block; }
.vista-previa .vp-cab small { font-size: .7rem; color: var(--suave); letter-spacing: .08em; text-transform: uppercase; }
.vista-previa .vp-plato { display: flex; gap: .7rem; align-items: center; margin-bottom: .7rem; }
.vista-previa .vp-foto { width: 54px; height: 54px; border-radius: 8px; flex: 0 0 54px; background: #eee; overflow: hidden; }
.vista-previa .vp-foto img { width: 100%; height: 100%; object-fit: cover; }
.vista-previa .vp-txt { flex: 1; min-width: 0; }
.vista-previa .vp-txt b { display: block; font-family: var(--serif); font-size: .9rem; }
.vista-previa .vp-txt small { display: block; color: var(--gris); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vista-previa .vp-precio { font-family: var(--serif); font-weight: 700; font-size: .92rem; }
.vista-previa.ancha .vp-plato { display: block; }
.vista-previa.ancha .vp-foto { width: 100%; height: 110px; border-radius: 10px; margin-bottom: .45rem; }

/* ---------- resumen y pago ---------- */
.resumen {
  background: var(--blanco); border: 1px solid var(--linea);
  border-radius: 14px; padding: .4rem 1rem; margin-bottom: 1.2rem;
}
.resumen dl { margin: 0; }
.resumen .fila {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .65rem 0; border-bottom: 1px solid var(--linea); font-size: .88rem;
}
.resumen .fila:last-child { border-bottom: 0; }
.resumen dt { color: var(--gris); }
.resumen dd { margin: 0; font-weight: 700; text-align: right; }

.precio-caja {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1rem 1.1rem; background: var(--acento-claro);
  border-radius: 14px; margin-bottom: 1rem;
}
.precio-caja b { display: block; font-size: .95rem; }
.precio-caja small { color: #a5705d; font-size: .78rem; }
.precio-final { font-family: var(--serif); font-size: 1.7rem; font-weight: 700; color: var(--acento); }

.pagar {
  width: 100%; border: 0; padding: 1rem;
  background: #ffc439; color: #111; font-size: 1rem;
  border-radius: 12px; font-weight: 800;
}
.pagar:hover { background: #f2b52e; }
.nota-proto { text-align: center; font-size: .76rem; color: var(--suave); margin-top: .7rem; }

/* ---------- barra inferior ---------- */
.pie-nav {
  position: fixed; inset: auto 0 0 0; z-index: 40;
  background: rgba(251, 247, 241, .96); backdrop-filter: blur(12px);
  border-top: 1px solid var(--linea);
  padding: .8rem 1.2rem calc(.8rem + env(safe-area-inset-bottom));
  display: flex; gap: .7rem; justify-content: flex-end;
}
.pie-nav .principal { flex: 1; max-width: 16rem; }
.pie-nav .secundario { padding: .85rem 1.2rem; }

/* ---------- móvil ---------- */
@media (max-width: 560px) {
  .dos { grid-template-columns: 1fr; }
  .dos-opciones { grid-template-columns: 1fr; }
  .logo-fila { align-items: flex-start; }
  .logo-zona { flex-basis: 68px; width: 68px; height: 68px; }
  .revision .fila { flex-wrap: wrap; }
  .revision .pre { width: 100%; text-align: left; }
  .pie-nav .secundario { flex: 0 0 auto; }
}

[hidden] { display: none !important; }
