/* Bodega Adela: el sitio es el ticket de tu pedido. */

@font-face { font-family: "Nunito"; font-weight: 800; font-display: swap; src: url("fonts/nunito-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 900; font-display: swap; src: url("fonts/nunito-latin-900-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 400; font-display: swap; src: url("fonts/figtree-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 600; font-display: swap; src: url("fonts/figtree-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 700; font-display: swap; src: url("fonts/figtree-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-display: swap; src: url("fonts/barlow-condensed-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }

:root {
  --rojo: #e62600;
  --rojo-hondo: #b51e00;
  --rojo-noche: #7a1400;
  --tinta: #1a1a1a;
  --tinta-suave: #474747;
  --papel: #ffffff;
  --papel-sombra: #efefef;
  --linea: #dcdcdc;
  --sobre-rojo: #ffffff;

  --display: "Nunito", "Arial Rounded MT Bold", system-ui, sans-serif;
  --texto: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ticket: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;

  --ancho: 1160px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --diente: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--texto);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--tinta);
  background: var(--papel);
  font-variant-numeric: tabular-nums;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

::selection { background: var(--rojo); color: #fff; }
a { color: var(--rojo-hondo); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--rojo); }
:focus-visible { outline: 3px solid var(--tinta); outline-offset: 3px; border-radius: 6px; }
.rojo :focus-visible, .cierre :focus-visible { outline-color: #fff; }
html { scrollbar-color: var(--rojo) var(--papel-sombra); }

.saltar {
  position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--tinta); color: #fff;
  padding: 10px 16px; border-radius: 10px; font-weight: 700; text-decoration: none;
}
.saltar:focus, .saltar:hover { top: 12px; color: #fff; }

.contenedor { width: min(var(--ancho), 100% - 32px); margin-inline: auto; }

/* ---------- Cabecera ---------- */
.cabecera { background: var(--papel); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--linea); }
.cabecera .contenedor { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 70px; }
.cabecera .marca img { width: 128px; }
.cabecera nav { display: flex; align-items: center; gap: 6px; }
.cabecera nav a {
  color: var(--tinta); text-decoration: none; font-weight: 600; font-size: .98rem;
  padding: 10px 14px; border-radius: 999px; transition: background-color .2s var(--ease), color .2s var(--ease);
}
.cabecera nav a:hover { background: var(--papel-sombra); color: var(--rojo-hondo); }
.cabecera nav a.accion { background: var(--rojo); color: #fff; }
.cabecera nav a.accion:hover { background: var(--rojo-hondo); color: #fff; }

/* ---------- Bordes de ticket: dientes y perforaciones ---------- */
.dientes-abajo {
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(var(--diente) * 2) 100%;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(var(--diente) * 2) 100%;
}
.perforado { border: 0; height: 2px; margin: 0; background: radial-gradient(circle, var(--linea) 1.5px, transparent 2px) 0 50% / 10px 2px repeat-x; }

/* ---------- Portada ---------- */
.rojo { background: var(--rojo); color: #fff; }
.portada { position: relative; overflow: hidden; padding: clamp(48px, 8vw, 104px) 0 clamp(72px, 9vw, 120px); }
.portada::before {
  /* sello de fondo: la A con carrito, enorme y casi invisible */
  content: ""; position: absolute; right: -8vw; bottom: -14vw; width: 52vw; aspect-ratio: 1;
  background: url("img/adela-simbolo-blanco.png") center / contain no-repeat; opacity: .07; pointer-events: none;
}
.portada .contenedor { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.portada h1 {
  font-family: var(--display); font-weight: 900; font-size: clamp(2.6rem, 6.4vw, 5.4rem);
  line-height: 1.16; letter-spacing: -.035em; margin: 0 0 26px;
}
.portada h1 em { font-style: normal; color: var(--tinta); background: #fff; padding: 0 .12em .02em; margin-left: -.06em; border-radius: .16em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.portada .bajada { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--sobre-rojo); max-width: 36ch; margin: 0 0 34px; }

.tiendas { display: flex; flex-wrap: wrap; gap: 12px; }
.insignia { display: inline-block; border-radius: 9px; transition: transform .25s var(--ease), filter .25s var(--ease); }
.insignia:hover { transform: translateY(-2px); filter: drop-shadow(0 10px 14px rgba(60, 8, 0, .35)); }
.insignia img { height: 52px; width: auto; }

/* ---------- El ticket ---------- */
.ticket-escena { position: relative; justify-self: center; width: min(360px, 100%); padding-bottom: 12px; }
.ticket {
  position: relative; color: var(--tinta);
  font-family: var(--ticket); font-weight: 500; font-size: 1.08rem; line-height: 1.3; letter-spacing: .01em;
  transform: rotate(2.2deg);
  filter: drop-shadow(0 24px 30px rgba(70, 10, 0, .45)) drop-shadow(0 3px 4px rgba(70, 10, 0, .25));
}
.ticket-papel { background: var(--papel); padding: 26px 26px calc(30px + var(--diente)); animation: imprimir 1.25s var(--ease) .15s both; }
.ticket-cabeza { text-align: center; padding-bottom: 14px; }
.ticket-cabeza img { width: 46px; margin: 0 auto 8px; }
.ticket-cabeza strong { display: block; font-weight: 700; font-size: 1.35rem; letter-spacing: .08em; text-transform: uppercase; }
.ticket-cabeza span { display: block; color: var(--tinta-suave); font-size: .98rem; }
.ticket .perforado { margin: 12px -26px; }
.renglon { display: flex; align-items: baseline; gap: 8px; }
.renglon .lider { flex: 1; border-bottom: 2px dotted #b8b8b8; transform: translateY(-4px); min-width: 12px; }
.renglon b { font-weight: 700; }
.ticket ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ticket .cant { color: var(--tinta-suave); min-width: 2.1em; }
.ticket .total { font-size: 1.5rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.ticket .pago { color: var(--tinta-suave); }
.codigo {
  margin: 16px 0 14px; text-align: center; border: 2px dashed var(--rojo); border-radius: 12px; padding: 10px 8px 12px;
}
.codigo small { display: block; text-transform: uppercase; letter-spacing: .14em; font-size: .9rem; color: var(--rojo-hondo); font-weight: 700; }
.codigo strong { display: block; font-family: var(--display); font-weight: 900; font-size: 3.4rem; line-height: 1; letter-spacing: .02em; color: var(--rojo); }
.estados { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; text-align: center; font-size: .92rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.estados li { display: grid; justify-items: center; gap: 6px; color: #9a9a9a; }
.estados li::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; background: transparent;
}
.estados li { animation: encender .5s var(--ease) both; }
.estados li:nth-child(1) { animation-delay: 1.3s; }
.estados li:nth-child(2) { animation-delay: 1.9s; }
.estados li:nth-child(3) { animation-delay: 2.5s; }
.estados li.listo { --luz: var(--rojo-hondo); }
.ejemplo {
  position: absolute; top: -12px; left: -10px; z-index: 2; transform: rotate(-4deg);
  background: var(--tinta); color: #fff; font-family: var(--ticket); font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  font-size: .82rem; padding: 5px 12px; border-radius: 6px;
}

@keyframes imprimir {
  from { clip-path: inset(0 0 100% 0); transform: translateY(-18px); }
  to   { clip-path: inset(0 0 0 0); transform: none; }
}
@keyframes encender {
  from { color: #9a9a9a; }
  to   { color: var(--luz, var(--tinta)); }
}
.estados li { --luz: var(--tinta); }
.estados li.listo { --luz: var(--rojo-hondo); }
@keyframes rellenar { to { background: currentColor; } }
.estados li::before { animation: rellenar .4s var(--ease) both; animation-delay: inherit; }

/* ---------- Secciones ---------- */
.seccion { padding: clamp(72px, 10vw, 128px) 0; }
.titulo {
  font-family: var(--display); font-weight: 900; font-size: clamp(2rem, 4.2vw, 3.3rem);
  letter-spacing: -.03em; line-height: 1.02; margin: 0 0 16px; max-width: 18ch;
}
.entrada { font-size: 1.15rem; color: var(--tinta-suave); max-width: 52ch; margin: 0 0 clamp(40px, 6vw, 64px); }

/* Cómo funciona: la línea de estados del pedido, en grande */
.recorrido { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 56px); position: relative; }
.recorrido li { position: relative; }
.recorrido li:not(:last-child)::after {
  content: ""; position: absolute; top: 27px; left: 64px; right: calc(-1 * clamp(24px, 4vw, 56px) + 8px); height: 3px;
  background: repeating-linear-gradient(90deg, var(--rojo) 0 14px, transparent 14px 24px);
}
.recorrido .nodo {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--papel); border: 3px solid var(--rojo); color: var(--rojo); margin-bottom: 22px; position: relative;
}
.recorrido li:last-child .nodo { background: var(--rojo); color: #fff; }
.recorrido .nodo svg { width: 26px; height: 26px; }
.recorrido h3 { font-family: var(--display); font-weight: 800; font-size: 1.55rem; letter-spacing: -.015em; line-height: 1.15; margin: 4px 0 8px; }
.recorrido p { margin: 0; color: var(--tinta-suave); max-width: 32ch; }

/* Qué puedes hacer: una nota de venta grande */
.papel { background: var(--papel-sombra); }
.nota {
  background: var(--papel); padding: clamp(32px, 5vw, 64px) clamp(22px, 5vw, 64px) calc(clamp(40px, 5vw, 64px) + var(--diente));
}
.sombra { max-width: 860px; margin-inline: auto; filter: drop-shadow(0 22px 26px rgba(0, 0, 0, .13)) drop-shadow(0 2px 3px rgba(0, 0, 0, .08)); }
.nota .titulo, .nota .entrada { margin-inline: auto; text-align: center; }
.nota .entrada { margin-bottom: 36px; }
.lineas { list-style: none; margin: 0; padding: 0; }
.lineas li { padding: 22px 0; border-top: 2px dotted var(--linea); }
.lineas li:last-child { border-bottom: 2px dotted var(--linea); }
.lineas .renglon { font-family: var(--display); font-weight: 800; font-size: clamp(1.25rem, 2.4vw, 1.6rem); letter-spacing: -.01em; }
.lineas .renglon .lider { border-bottom-width: 3px; border-color: #d0d0d0; transform: translateY(-6px); }
.lineas .renglon b { font-family: var(--ticket); font-weight: 700; font-size: clamp(1.05rem, 1.8vw, 1.25rem); color: var(--rojo-hondo); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.lineas p { margin: 6px 0 0; color: var(--tinta-suave); max-width: 60ch; }
.nota-pie { text-align: center; font-family: var(--ticket); text-transform: uppercase; letter-spacing: .12em; color: var(--tinta-suave); margin: 32px 0 0; font-weight: 500; }

/* Cierre: gracias por su preferencia */
.cierre { padding: clamp(72px, 10vw, 120px) 0; text-align: center; }
.cierre .titulo { margin-inline: auto; max-width: 16ch; }
.cierre .entrada { color: var(--sobre-rojo); margin-inline: auto; margin-bottom: 32px; }
.cierre .tiendas { justify-content: center; }

/* Dato pendiente de completar: resaltado para no publicar sin rellenar */
.dato { background: #fff3a8; color: var(--tinta); padding: 0 5px; border-radius: 4px; font-weight: 700; font-family: var(--texto); letter-spacing: 0; text-transform: none; }

/* ---------- Pie ---------- */
.pie { background: var(--tinta); color: #cfcfcf; padding: 44px 0 52px; font-size: .95rem; }
.pie .contenedor {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "marca libro" "legal libro";
  column-gap: 40px; row-gap: 22px; align-items: center;
}
.pie p { margin: 0 0 6px; }
.pie a { color: #fff; }
.pie a:hover { color: #ffb8a3; }
.pie nav { grid-area: legal; display: flex; gap: 8px 24px; flex-wrap: wrap; padding-top: 20px; border-top: 1px solid #3a3a3a; }
.pie .marca-pie { grid-area: marca; display: flex; align-items: center; gap: 14px; }
.pie .marca-pie img { width: 40px; flex: none; }

/* ---------- Páginas legales ---------- */
.legal-cabeza { padding: clamp(48px, 7vw, 84px) 0 calc(clamp(56px, 8vw, 96px)); }
.legal-cabeza h1 { font-family: var(--display); font-weight: 900; font-size: clamp(2.3rem, 5.4vw, 4rem); letter-spacing: -.03em; line-height: 1; margin: 0 0 12px; }
.legal-cabeza p { margin: 0; color: var(--sobre-rojo); font-family: var(--ticket); text-transform: uppercase; letter-spacing: .1em; font-weight: 500; }
.legal-cuerpo { background: var(--papel-sombra); padding: 0 0 clamp(64px, 9vw, 112px); }
.hoja {
  position: relative; background: var(--papel);
  padding: clamp(28px, 5vw, 60px) clamp(20px, 5vw, 64px) calc(clamp(36px, 5vw, 60px) + var(--diente));
}
.sombra.de-hoja { max-width: 820px; margin-top: calc(-1 * clamp(36px, 5vw, 56px)); }
.indice { margin: 0 0 32px; padding: 18px 20px; background: var(--papel-sombra); border-radius: 14px; }
.indice strong { display: block; font-family: var(--ticket); text-transform: uppercase; letter-spacing: .12em; font-size: .9rem; margin-bottom: 6px; color: var(--tinta-suave); }
.indice ol { margin: 0; padding-left: 1.3em; columns: 2 240px; column-gap: 28px; }
.indice li { margin-bottom: 4px; break-inside: avoid; }
.hoja > p, .hoja li { max-width: 68ch; }
.hoja h2 {
  font-family: var(--display); font-weight: 800; font-size: clamp(1.35rem, 2.4vw, 1.65rem); letter-spacing: -.015em; line-height: 1.2;
  margin: 52px 0 12px; padding-top: 28px; scroll-margin-top: 96px;
  background: radial-gradient(circle, var(--linea) 1.5px, transparent 2px) 0 0 / 10px 3px repeat-x;
}
.hoja ul { padding-left: 1.2em; }
.hoja li { margin-bottom: 8px; }
.hoja li::marker { color: var(--rojo); }
.hoja table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: .98rem; }
.hoja th, .hoja td { text-align: left; padding: 12px 14px; vertical-align: top; border-bottom: 2px dotted var(--linea); }
.hoja th { font-family: var(--ticket); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--tinta-suave); border-bottom: 2px solid var(--tinta); }
.hoja td:first-child { font-weight: 700; white-space: nowrap; }
.tabla { overflow-x: auto; }
.recuadro { border: 2px dashed var(--rojo); border-radius: 16px; padding: 18px 22px; margin: 18px 0; }
.recuadro p { margin: 0 0 10px; }
.recuadro p:last-child { margin: 0; }
.hoja :target { animation: marcar 1.6s var(--ease); }
@keyframes marcar { from { background-color: #ffe1d6; } }

/* ---------- Adaptación ---------- */
@media (max-width: 860px) {
  .portada .contenedor { grid-template-columns: 1fr; }
  .ticket-escena { width: min(330px, 92%); margin-top: 8px; }
  .recorrido { grid-template-columns: 1fr; gap: 34px; }
  .recorrido li:not(:last-child)::after { top: 64px; bottom: -26px; left: 26px; right: auto; width: 3px; height: auto;
    background: repeating-linear-gradient(180deg, var(--rojo) 0 14px, transparent 14px 24px); }
  .recorrido li { display: grid; grid-template-columns: 56px 1fr; column-gap: 20px; }
  .recorrido .nodo { margin: 0; grid-row: span 2; }
}
@media (max-width: 560px) {
  .pie .contenedor { grid-template-columns: 1fr; grid-template-areas: "marca" "legal" "libro"; }
  .cabecera .marca img { width: 108px; }
  .cabecera nav a:not(.accion) { display: none; }
  .insignia img { height: 46px; }
  .lineas .renglon { flex-wrap: wrap; }
  .lineas .renglon .lider { display: none; }
  .lineas .renglon b { flex-basis: 100%; }
  .hoja td:first-child { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before { animation: none !important; transition: none !important; }
  .estados li { color: var(--luz); }
  .estados li::before { background: currentColor; }
}
.ticket p.renglon { margin: 0; }
.ticket p.pago { margin-top: 2px; }

/* Libro de Reclamaciones: aviso virtual oficial de INDECOPI, sin alterar, sobre blanco */
.pie .libro { grid-area: libro; justify-self: end; display: inline-block; background: #fff; padding: 8px 10px; border-radius: 10px; transition: transform .25s var(--ease); }
.pie .libro:hover { transform: translateY(-2px); }
.pie .libro img { width: 120px; height: auto; }
@media (max-width: 560px) { .pie .libro { justify-self: start; } }

/* ---------- Formulario del Libro de Reclamaciones ---------- */
.formulario { margin: 28px 0 8px; }
.formulario fieldset { border: 0; border-top: 2px dotted var(--linea); margin: 0; padding: 22px 0 6px; min-width: 0; }
.formulario legend { font-family: var(--display); font-weight: 800; font-size: clamp(1.2rem, 2.2vw, 1.45rem); letter-spacing: -.015em; line-height: 1.2; padding: 0 12px 0 0; }
.campo { margin: 0 0 16px; }
.fila { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.formulario label { display: block; font-weight: 600; font-size: .98rem; margin-bottom: 6px; }
.formulario input[type=text], .formulario input[type=tel], .formulario input[type=email], .formulario select, .formulario textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--tinta); background: var(--papel);
  border: 2px solid var(--linea); border-radius: 10px; padding: 11px 12px; min-height: 48px;
}
.formulario textarea { resize: vertical; }
.formulario input:focus-visible, .formulario select:focus-visible, .formulario textarea:focus-visible { outline: 3px solid var(--rojo); outline-offset: 1px; border-color: var(--rojo); }
.formulario [aria-invalid=true] { border-color: var(--rojo-hondo); }
.formulario .marca-opcion label, .formulario .opciones label { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; cursor: pointer; margin-bottom: 8px; }
.formulario input[type=checkbox], .formulario input[type=radio] { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--rojo); }
.formulario .opciones:not(.opciones-largas) { display: flex; gap: 8px 28px; }
.error, .error-general { color: var(--rojo-hondo); font-weight: 600; font-size: .95rem; margin: 6px 0 0; }
.error-general { border: 2px dashed var(--rojo-hondo); border-radius: 12px; padding: 12px 16px; margin: 0 0 16px; }
.trampa { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.enviar { font: inherit; font-weight: 700; font-size: 1.05rem; color: #fff; background: var(--rojo); border: 0; border-radius: 999px; padding: 14px 32px; min-height: 48px; cursor: pointer; transition: background-color .2s var(--ease); margin-bottom: 24px; }
.enviar:hover { background: var(--rojo-hondo); }
.enviar:disabled { background: var(--tinta-suave); cursor: wait; }
.recibo { text-align: center; margin: 28px 0; }
.recibo:focus-visible { outline-offset: 4px; }
.recibo small { display: block; text-transform: uppercase; letter-spacing: .14em; font-size: .9rem; color: var(--rojo-hondo); font-weight: 700; font-family: var(--ticket); }
.recibo strong { display: block; font-family: var(--display); font-weight: 900; font-size: clamp(2rem, 6vw, 3rem); line-height: 1.1; color: var(--rojo); word-break: break-all; }
@media (max-width: 560px) { .fila { grid-template-columns: 1fr; } }
