@font-face { font-family: "Fredoka"; font-weight: 500; font-display: swap; src: url(fonts/fredoka-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Fredoka"; font-weight: 600; font-display: swap; src: url(fonts/fredoka-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Fredoka"; font-weight: 700; font-display: swap; src: url(fonts/fredoka-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Pacifico"; font-weight: 400; font-display: swap; src: url(fonts/pacifico-latin-400-normal.woff2) format("woff2"); }

:root {
  --fondo: #FDEEF2;
  --rosa: #F48FB1;
  --rosa-suave: #FDE3EC;
  --rosa-borde: #F2A7BF;
  --rosa-fuerte: #B83566;   /* 5.6:1 sobre blanco — texto de precio y acentos */
  --cafe: #6B3F3A;
  --cafe-2: #8A5A55;
  --oro: #B07415;           /* 3.9:1 sobre blanco, 3.2:1 sobre rosa — estrellas */
  --blanco: #FFFFFF;
  --papel: #FFFBF6;
  --ease-salida: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-hoja: cubic-bezier(0.77, 0, 0.175, 1);
  --verde: #0F7342;         /* 5.9:1 sobre blanco */
  --rojo: #C2413A;
  --sombra-chica: 0 2px 4px rgba(107, 63, 58, 0.06), 0 6px 16px -6px rgba(107, 63, 58, 0.18);
  --sombra-media: 0 4px 10px rgba(107, 63, 58, 0.08), 0 14px 30px -10px rgba(107, 63, 58, 0.24);
  --salida: cubic-bezier(0.16, 1, 0.3, 1);
  --redondo: "Fredoka", ui-rounded, system-ui, sans-serif;
  --script: "Pacifico", "Brush Script MT", cursive;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--rosa-borde) var(--fondo); }

body {
  margin: 0;
  background: var(--fondo);
  color: var(--cafe);
  font-family: var(--redondo);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.45;
  caret-color: var(--rosa-fuerte);
  -webkit-tap-highlight-color: transparent;
}

::selection { background: var(--rosa); color: var(--cafe); }
:focus-visible { outline: 3px solid var(--rosa-fuerte); outline-offset: 3px; border-radius: 4px; }
a { text-underline-offset: 3px; }

em { font-family: var(--script); font-style: normal; font-weight: 400; color: var(--rosa-fuerte); }

/* Hoja de iconos: fuera de pantalla sin romper <use> */
.iconos { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.relleno { fill: currentColor; stroke: none; }
.relleno-solo { fill: currentColor; stroke: none; }

/* ---------- Toldo ---------- */
.toldo {
  height: 62px;
  background:
    radial-gradient(circle at 17px 44px, var(--rosa) 16.5px, transparent 17px) 0 0 / 68px 62px repeat-x,
    radial-gradient(circle at 51px 44px, var(--blanco) 16.5px, transparent 17px) 0 0 / 68px 62px repeat-x,
    repeating-linear-gradient(90deg, var(--rosa) 0 34px, var(--blanco) 34px 68px) 0 0 / 100% 44px no-repeat;
  filter: drop-shadow(0 3px 2px rgba(107, 63, 58, 0.12));
  padding-top: env(safe-area-inset-top);
}

/* ---------- Vistas ---------- */
.vista { max-width: 480px; margin: 0 auto; padding: 0 16px; }
.vista[hidden] { display: none; }

/* El inicio cabe en una pantalla: nada de scroll para elegir */
.vista-inicio {
  min-height: calc(100svh - 62px - env(safe-area-inset-top));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(18px, 4.5vh, 34px);
  padding-top: clamp(14px, 3vh, 26px);
  padding-bottom: calc(clamp(14px, 3vh, 26px) + env(safe-area-inset-bottom));
}

.vista-corta {
  min-height: calc(100svh - 62px - env(safe-area-inset-top));
  display: flex;
  flex-direction: column;
}
.vista-corta .cuerpo { margin: auto 0; }

.cuerpo { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
#v-menu .cuerpo { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
.cuerpo-centrado { text-align: center; }

/* ---------- Hero del inicio ---------- */
.hero { text-align: center; }
.placa {
  width: clamp(132px, 38vw, 200px);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  overflow: hidden;
  background: var(--blanco);
  box-shadow: 0 0 0 6px var(--blanco), 0 0 0 8px var(--rosa-borde), var(--sombra-media);
}
.placa img { width: 100%; height: 100%; object-fit: cover; display: block; }
.antojo {
  margin: clamp(14px, 3vh, 22px) 0 0;
  font-family: var(--script);
  font-size: clamp(30px, 9vw, 40px);
  line-height: 1.2;
  color: var(--rosa-fuerte);
}
.frase { margin: 8px auto 0; max-width: 26ch; font-size: clamp(14.5px, 4vw, 16px); font-weight: 600; text-wrap: balance; color: var(--cafe-2); }

/* ---------- Las opciones ---------- */
.opciones { display: grid; gap: 10px; }

/* La principal pesa más: más alto, relleno de color, dato vivo dentro */
.opcion-principal, .opcion {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--cafe);
  background: var(--blanco);
  border: 1.5px solid var(--rosa-borde);
  box-shadow: var(--sombra-chica);
  transition: transform 0.4s var(--salida), box-shadow 0.4s var(--salida);
}
.opcion-principal {
  padding: 18px 18px 18px 16px;
  border-radius: 26px;
  background: linear-gradient(180deg, var(--blanco) 0%, var(--rosa-suave) 100%);
  border-color: var(--rosa);
  box-shadow: var(--sombra-media);
}
.opcion { padding: 12px 16px 12px 12px; border-radius: 20px; }

.op-cuerpo { display: grid; gap: 3px; min-width: 0; }
.op-titulo { font-weight: 700; font-size: 18px; line-height: 1.25; }
.opcion-principal .op-titulo { font-size: 21px; }
.op-nota, .op-categorias { font-size: 13.5px; color: var(--cafe-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.op-ico {
  width: 50px; height: 50px; flex: none; border-radius: 50%;
  background: var(--rosa-suave);
  color: var(--rosa-fuerte);
  display: grid; place-items: center;
}
.opcion-principal .op-ico { width: 58px; height: 58px; background: var(--rosa); color: var(--cafe); }
.opcion-principal .op-ico svg { width: 26px; height: 26px; }
.op-ico-oro { color: var(--oro); }
.op-ico-oro svg { width: 24px; height: 24px; fill: none; stroke: currentColor; }
.op-flecha { color: var(--rosa-fuerte); display: grid; place-items: center; }

@media (hover: hover) {
  .opcion-principal:hover, .opcion:hover { transform: translateY(-2px); box-shadow: var(--sombra-media); }
}
.opcion-principal:active, .opcion:active { transform: scale(0.985); }

/* Estado abierto/cerrado, dentro de la opción principal */
.estado {
  display: inline-flex; align-items: flex-start; gap: 7px;
  margin: 5px 0 0;
  font-size: 13.5px; font-weight: 700; line-height: 1.45;
  text-wrap: balance;
}
.punto { width: 8px; height: 8px; flex: none; margin-top: 6px; border-radius: 50%; background: var(--cafe-2); }
.estado.abierto { color: var(--verde); }
.estado.abierto .punto { background: var(--verde); }
.estado.cerrado { color: var(--rojo); }
.estado.cerrado .punto { background: var(--rojo); }

/* ---------- Barra volver ---------- */
.volver {
  display: inline-flex; align-items: center; gap: 7px;
  align-self: flex-start;
  min-height: 44px;
  margin: 12px 0 4px;
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  background: var(--blanco);
  border: 1.5px solid var(--rosa-borde);
  box-shadow: var(--sombra-chica);
  color: var(--cafe);
  font-weight: 600; font-size: 15px;
  text-decoration: none;
}
.volver:active { transform: scale(0.97); }

/* ---------- Títulos ---------- */
.titulo {
  margin: 18px 0 16px;
  font-size: clamp(26px, 7.5vw, 31px);
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  text-wrap: balance;
}
.titulo em { font-size: 1.12em; }
.parrafo { margin: 0 auto 22px; max-width: 34ch; color: var(--cafe-2); font-size: 16px; text-align: center; text-wrap: pretty; }
.cuerpo-centrado .parrafo { margin-bottom: 26px; }

/* ---------- Menú ---------- */
.pestanas { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.pestana {
  min-height: 44px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--rosa-borde);
  background: var(--blanco);
  color: var(--cafe);
  font: inherit; font-weight: 600; font-size: 15px;
  cursor: pointer;
  transition: background-color 0.3s var(--salida), color 0.3s var(--salida);
}
.pestana[aria-selected="true"] { background: var(--cafe); border-color: var(--cafe); color: var(--blanco); }

.lista { list-style: none; margin: 0; padding: 0; }
.producto {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1.5px dashed var(--rosa-suave);
}
.producto:last-child { border-bottom: 0; }
.producto-nombre { font-weight: 600; font-size: 17px; }
.producto-precio { font-weight: 700; font-size: 17px; color: var(--rosa-fuerte); white-space: nowrap; font-variant-numeric: tabular-nums; }
.producto-detalle { grid-column: 1 / -1; font-size: 14px; color: var(--cafe-2); text-wrap: pretty; }
.lista-vacia { padding: 20px 0; text-align: center; color: var(--cafe-2); }


/* ---------- El menú como libro ---------- */
.solo-lectores {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

.libro {
  position: relative;
  perspective: 1600px;
}
/* El lomo: la sombra del doblez por donde gira la hoja */
.lomo {
  position: absolute; top: 0; bottom: 0; left: 0;
  width: 18px;
  border-radius: 22px 0 0 22px;
  background: linear-gradient(90deg, rgba(107, 63, 58, 0.16), rgba(107, 63, 58, 0));
  pointer-events: none;
  z-index: 4;
}

.hoja {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform-origin: left center;
  visibility: hidden;
  backface-visibility: hidden;
}
.hoja.activa { visibility: visible; z-index: 2; }
.hoja.volteando { visibility: visible; z-index: 3; }

.cara {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  border-radius: 8px 24px 24px 8px;
  background: var(--papel);
  border: 1.5px solid var(--rosa-borde);
  box-shadow: var(--sombra-chica), inset 12px 0 16px -14px rgba(107, 63, 58, 0.45);
  overflow: hidden;
}

.cara-dorso { transform: rotateY(180deg); background: var(--papel); }

.hoja-contenido { padding: 20px 20px 56px; }

.hoja-ilustracion { display: grid; place-items: center; margin-bottom: 2px; }
.hoja-ilustracion svg {
  width: 96px; height: 96px;
  fill: none; stroke: var(--cafe); stroke-width: 2.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.il-relleno { fill: var(--rosa); stroke: none; }
.il-relleno-claro { fill: var(--rosa-suave); stroke: none; }
.il-tenue { stroke: var(--rosa-borde); stroke-width: 2; }
.il-semilla { stroke: var(--blanco); stroke-width: 3; }

.hoja-titulo {
  margin: 0 0 4px;
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(26px, 7vw, 32px);
  line-height: 1.1;
  text-align: center;
  color: var(--rosa-fuerte);
  text-wrap: balance;
}
.hoja-regla {
  height: 0; margin: 10px 24px 4px;
  border-top: 1.5px dashed var(--rosa-borde);
}
.hoja-folio {
  position: absolute;
  left: 0; right: 0; bottom: 14px;
  margin: 0;
  text-align: center;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--cafe-2);
}

/* La sombra que barre la hoja mientras gira */
.hoja-sombra {
  position: absolute; inset: 0;
  border-radius: 8px 24px 24px 8px;
  background: linear-gradient(90deg, rgba(107, 63, 58, 0.38), rgba(107, 63, 58, 0.04));
  opacity: 0;
  pointer-events: none;
}

/* ---------- Paginador ---------- */
.paginador {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}
.pag-btn {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--rosa-borde);
  background: var(--blanco);
  box-shadow: var(--sombra-chica);
  color: var(--rosa-fuerte);
  cursor: pointer;
  transition: transform 0.2s var(--ease-salida), opacity 0.2s var(--ease-salida);
}
.pag-btn:disabled { opacity: 0.35; cursor: default; box-shadow: none; }
.pag-btn:not(:disabled):active { transform: scale(0.92); }
.pag-pista {
  margin: 0; text-align: center;
  font-size: 13px; color: var(--cafe-2);
  transition: opacity 0.3s var(--ease-salida);
}
.pag-pista[data-oculta="true"] { opacity: 0; }


/* ---------- Dónde y cuándo ---------- */
.visita { margin-top: 38px; }
.visita h2 { margin: 0 0 14px; font-size: 20px; font-weight: 700; text-align: center; }
.tarjeta {
  display: flex; flex-direction: column; gap: 14px;
  padding: 20px;
  border-radius: 24px;
  background: var(--blanco);
  border: 1.5px solid var(--rosa-borde);
  box-shadow: var(--sombra-chica);
}
.direccion:empty { display: none; }
.direccion { margin: 0; font-size: 17px; font-weight: 600; text-align: center; text-wrap: pretty; }
.horario { list-style: none; margin: 0; padding: 0; }
.horario li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  font-variant-numeric: tabular-nums;
  font-size: 15px;
}
.horario li.hoy { background: var(--rosa-suave); font-weight: 700; }
.horario .cerrado-dia { color: var(--cafe-2); }

/* ---------- Botones ---------- */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700; font-size: 16px;
  text-decoration: none;
  transition: transform 0.4s var(--salida), box-shadow 0.4s var(--salida);
}
.boton:active { transform: scale(0.97); }
.boton-rosa { background: var(--rosa); color: var(--cafe); box-shadow: var(--sombra-media); }
.boton-suave { background: var(--rosa-suave); color: var(--cafe); width: 100%; }
@media (hover: hover) { .boton-rosa:hover { transform: translateY(-2px); } }

/* ---------- Reseña ---------- */
.tarjeta-resena {
  padding: 30px 24px 26px;
  border-radius: 28px;
  background: var(--blanco);
  border: 2px dashed var(--rosa-borde);
  box-shadow: var(--sombra-media);
}
.tarjeta-resena .titulo { margin-top: 4px; }
.estrellas { display: flex; justify-content: center; gap: 6px; margin: 0 0 14px; }
.estrellas svg { width: 32px; height: 32px; color: var(--oro); }
.pie-nota { margin: 16px 0 0; font-size: 13px; color: var(--cafe-2); }

/* ---------- Redes ---------- */
.redes { display: grid; gap: 10px; }
.red {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: 14px;
  min-height: 64px;
  padding: 10px 16px 10px 10px;
  border-radius: 20px;
  background: var(--blanco);
  border: 1.5px solid var(--rosa-borde);
  box-shadow: var(--sombra-chica);
  text-decoration: none;
  color: var(--cafe);
  font-weight: 600; font-size: 17px;
  transition: transform 0.4s var(--salida), box-shadow 0.4s var(--salida);
}
@media (hover: hover) { .red:hover { transform: translateY(-2px); box-shadow: var(--sombra-media); } }
.red:active { transform: scale(0.985); }
.red-ico {
  width: 44px; height: 44px; flex: none; border-radius: 50%;
  background: var(--rosa-suave); color: var(--rosa-fuerte);
  display: grid; place-items: center;
}
.red-flecha { color: var(--rosa-fuerte); display: grid; place-items: center; }

.sin-js { padding: 24px; text-align: center; }

/* ---------- WhatsApp (solo en el menú) ---------- */
.whatsapp {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 20;
  width: min(calc(100% - 32px), 448px);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px;
  border-radius: 999px;
  background: var(--cafe);
  color: var(--blanco);
  font-weight: 700; font-size: 17px;
  text-decoration: none;
  box-shadow: 0 0 0 4px var(--fondo), 0 10px 28px -8px rgba(107, 63, 58, 0.5);
}
.whatsapp svg { width: 24px; height: 24px; }
.whatsapp:active { transform: translateX(-50%) scale(0.97); }

/* ---------- El único momento de motion: el cambio de vista ---------- */
@media (prefers-reduced-motion: no-preference) {
  .vista.entrando { animation: entrar 0.52s var(--salida) both; }
  .vista-inicio.entrando .opciones > * { animation: subir 0.6s var(--salida) both; }
  .vista-inicio.entrando .opciones > :nth-child(1) { animation-delay: 0.06s; }
  .vista-inicio.entrando .opciones > :nth-child(2) { animation-delay: 0.12s; }
  .vista-inicio.entrando .opciones > :nth-child(3) { animation-delay: 0.18s; }
}
@keyframes entrar {
  from { opacity: 0; transform: translateY(10px); filter: blur(5px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes subir {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Pantallas anchas ---------- */
@media (max-height: 700px) {
  .vista-inicio { gap: clamp(14px, 3vh, 22px); }
  .opcion-principal { padding: 14px 16px 14px 14px; }
  .opcion-principal .op-ico { width: 52px; height: 52px; }
  .antojo { margin-top: clamp(10px, 2vh, 16px); }
}

@media (min-width: 560px) and (min-height: 620px) {
  .vista { max-width: 520px; }
  .whatsapp { width: min(calc(100% - 32px), 488px); }
}
