/* ---------- Base común (se usa igual en todas las páginas) ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body { margin: 0; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
.ico { width: 1.2em; height: 1.2em; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.saltar { position: absolute; left: -9999px; top: 0; padding: 10px 14px; z-index: 100; background: #000; color: #fff; }
.saltar:focus { left: 8px; top: 8px; }
.form__error:empty { display: none; }

/* Botón flotante de WhatsApp con menú */
.wa { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60; display: grid; justify-items: end; gap: 10px; transition: transform .3s ease, opacity .3s ease; }
.wa.oculto { transform: translateY(110px); opacity: 0; pointer-events: none; }
.wa__boton { width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; background: #1F8A4C; color: #fff; box-shadow: 0 8px 22px rgba(0,0,0,.28); transition: transform .2s ease; }
.wa__boton:hover { transform: scale(1.06); }
.wa__boton:active { transform: scale(.95); }
.wa__boton .ico { width: 30px; height: 30px; }
.wa__menu { display: grid; gap: 6px; min-width: 230px; padding: 8px; border-radius: 16px; background: #fff; color: #1d1d1f; box-shadow: 0 14px 40px rgba(0,0,0,.25);
  transform-origin: bottom right; transform: scale(.85) translateY(10px); opacity: 0; visibility: hidden; transition: transform .22s ease, opacity .22s ease, visibility 0s .22s; }
.wa.abierto .wa__menu { transform: none; opacity: 1; visibility: visible; transition: transform .22s ease, opacity .22s ease; }
.wa__menu p { font-size: .8125rem; color: #555; padding: 6px 10px 2px; }
.wa__menu a { display: flex; align-items: center; min-height: 46px; padding: 10px 14px; border-radius: 10px; text-decoration: none; font-weight: 600; background: #F1F4F2; }
.wa__menu a:hover, .wa__menu a:focus-visible { background: #DCF1E3; }

/* Movimiento al hacer scroll: solo si la persona no pidió reducirlo */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
  .js [data-reveal].visto { opacity: 1; transform: none; }
  .js [data-cascada] > * { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * 90ms); }
  .js [data-cascada].visto > * { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- El Galpón ---------- */
:root {
  --rojo: #D7261E;
  --rojo-osc: #A9170F;
  --amarillo: #FFC20E;
  --negro: #171414;
  --hormigon: #F1EEE8;
  --blanco: #FFFFFF;
  --gris: #57514C;
  --cartel: "Lilita One", "Arial Black", sans-serif;
  --texto: "Figtree", system-ui, sans-serif;
  --max: 1180px;
  --g: 18px;
}
body { background: var(--blanco); color: var(--negro); font: 400 1.0625rem/1.55 var(--texto); }
h1, h2, h3 { font-family: var(--cartel); font-weight: 400; line-height: 1; letter-spacing: .005em; }
:focus-visible { outline: 3px solid var(--negro); outline-offset: 3px; border-radius: 4px; }

.cabecera { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px var(--g); border-bottom: 4px solid var(--negro); background: #fff; position: sticky; top: 0; z-index: 40; }
.marca img { height: 40px; width: auto; }
.cabecera__tel { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px; border-radius: 10px; background: var(--negro); color: #fff; font-weight: 800; text-decoration: none; }
.cabecera__tel:hover { background: var(--rojo); }

.boton { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 12px 22px; border-radius: 12px; border: 3px solid var(--negro);
  font: 800 1.0625rem/1.15 var(--texto); text-decoration: none; cursor: pointer; box-shadow: 0 4px 0 var(--negro); transition: transform .12s ease, box-shadow .12s ease, background-color .15s ease; }
.boton:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--negro); }
.boton:active { transform: translateY(4px); box-shadow: 0 0 0 var(--negro); }
.boton--rojo { background: var(--rojo); color: #fff; }
.boton--rojo:hover { background: var(--rojo-osc); }
.boton--amarillo { background: var(--amarillo); color: var(--negro); }
.boton--negro { background: var(--negro); color: #fff; box-shadow: 0 4px 0 var(--rojo); }
.boton--linea { background: #fff; color: var(--negro); }
.boton--ancho { width: 100%; }
.titulo { font-size: clamp(2.4rem, 10vw, 4rem); color: var(--negro); }

/* Hero */
.hero { display: grid; background: var(--amarillo); border-bottom: 4px solid var(--negro); overflow: hidden; }
.hero__texto { padding: 26px var(--g) 30px; display: grid; gap: 14px; justify-items: start; }
.hero__rubro { font-weight: 800; color: var(--rojo-osc); background: #fff; border: 2px solid var(--negro); border-radius: 999px; padding: 4px 12px; font-size: .9rem; }
.hero__titulo { font-size: clamp(2.5rem, 11vw, 5rem); line-height: .98; color: var(--negro); }
.hero__sub { font-size: 1.1rem; max-width: 34em; }
.hero__accion { display: grid; gap: 12px; width: 100%; margin-top: 4px; }
.hero__nota { font-weight: 600; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.hero__num { font: 400 1.8rem/1 var(--cartel); }
.estrellas { color: var(--rojo); letter-spacing: 1px; }
.hero__foto { position: relative; margin: 0; border-top: 4px solid var(--negro); }
.hero__foto img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.sello { position: absolute; left: 14px; bottom: 16px; transform: rotate(-4deg); display: flex; align-items: center; gap: 10px;
  background: var(--rojo); color: #fff; font: 400 1.35rem/1 var(--cartel); padding: 12px 18px; border: 3px solid var(--negro); border-radius: 12px; box-shadow: 0 4px 0 var(--negro); }
.sello svg { width: 34px; height: 26px; }
.hero { padding-bottom: 0; }
.rubros { padding-top: 56px; }

@media (prefers-reduced-motion: no-preference) {
  .hero__rubro { animation: caer .5s cubic-bezier(.3,1.4,.5,1) both; }
  .hero__titulo { animation: subir .6s .1s cubic-bezier(.2,.8,.2,1) both; }
  .hero__sub, .hero__nota { animation: subir .6s .25s ease both; }
  .hero__accion { animation: subir .6s .4s cubic-bezier(.2,.8,.2,1) both; }
  .hero__foto img { animation: revelar .8s .2s cubic-bezier(.6,0,.2,1) both; }
  .sello { animation: estampar .45s .85s cubic-bezier(.3,1.6,.5,1) both; }
  @keyframes caer { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
  @keyframes subir { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
  @keyframes revelar { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
  @keyframes estampar { from { opacity: 0; transform: rotate(-4deg) scale(1.6); } to { opacity: 1; transform: rotate(-4deg); } }
}

/* Rubros */
.rubros { max-width: var(--max); margin: 0 auto; padding-left: var(--g); padding-right: var(--g); padding-bottom: 56px; }
.rubros__cab { display: grid; gap: 8px; margin-bottom: 18px; }
.rubros__cab p { color: var(--gris); }
.rubros__grilla { display: grid; gap: 16px; }
.rubro { border: 3px solid var(--negro); border-radius: 16px; overflow: hidden; background: #fff; }
.rubro__titulo { font-size: 2.2rem; padding: 14px 18px; background: var(--rojo); color: #fff; border-bottom: 3px solid var(--negro); display: flex; align-items: center; gap: 10px; }
.rubro.granja .rubro__titulo { background: var(--negro); color: var(--amarillo); }
.rubro__titulo::before { content: ""; width: 26px; height: 26px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12.5c-2.6 0-5.5 3.2-5.5 5.6 0 1.6 1.2 2.4 2.6 2.4 1.2 0 1.9-.6 2.9-.6s1.7.6 2.9.6c1.4 0 2.6-.8 2.6-2.4 0-2.4-2.9-5.6-5.5-5.6z'/%3E%3Cellipse cx='5' cy='10' rx='2' ry='2.5'/%3E%3Cellipse cx='9' cy='5.5' rx='2' ry='2.6'/%3E%3Cellipse cx='15' cy='5.5' rx='2' ry='2.6'/%3E%3Cellipse cx='19' cy='10' rx='2' ry='2.5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12.5c-2.6 0-5.5 3.2-5.5 5.6 0 1.6 1.2 2.4 2.6 2.4 1.2 0 1.9-.6 2.9-.6s1.7.6 2.9.6c1.4 0 2.6-.8 2.6-2.4 0-2.4-2.9-5.6-5.5-5.6z'/%3E%3Cellipse cx='5' cy='10' rx='2' ry='2.5'/%3E%3Cellipse cx='9' cy='5.5' rx='2' ry='2.6'/%3E%3Cellipse cx='15' cy='5.5' rx='2' ry='2.6'/%3E%3Cellipse cx='19' cy='10' rx='2' ry='2.5'/%3E%3C/svg%3E") center / contain no-repeat; }
.rubro__lista { list-style: none; margin: 0; padding: 4px 18px 10px; }
.animal { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 2px dashed #D9D3CB; font-weight: 600; font-size: 1.1rem; }
.animal:last-child { border-bottom: 0; }
.consultar { font-weight: 800; font-size: .95rem; color: var(--negro); text-decoration: none; background: var(--amarillo); border: 2px solid var(--negro); border-radius: 999px; padding: 7px 14px; white-space: nowrap; transition: transform .12s ease, background-color .15s ease; }
.consultar:hover { background: #fff; transform: rotate(-2deg) scale(1.04); }

/* Pedido */
.pedido { background: var(--hormigon); border-top: 4px solid var(--negro); border-bottom: 4px solid var(--negro); padding: 48px var(--g) 56px; }
.pedido__cab, .form { max-width: 640px; margin: 0 auto; }
.pedido__cab { display: grid; gap: 8px; margin-bottom: 20px; }
.pedido__cab p { color: var(--gris); }
.form { display: grid; gap: 18px; background: #fff; border: 3px solid var(--negro); border-radius: 18px; padding: 22px 18px; box-shadow: 0 6px 0 var(--negro); }
.campo { display: grid; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.campo > span, .campo legend { font-weight: 800; padding: 0; margin-bottom: 8px; }
.campo input:not([type]), .campo input[name="marca"], .campo input[name="direccion"], .campo input[name="nombre"], .campo select {
  font: inherit; width: 100%; min-height: 52px; padding: 10px 14px; border: 2px solid var(--negro); border-radius: 10px; background: #fff; color: var(--negro); }
.campo input:focus, .campo select:focus { outline: 3px solid var(--amarillo); outline-offset: 1px; }
.campo [aria-invalid="true"] { border-color: var(--rojo); background: #FFF0EE; }
.opciones { display: grid; gap: 10px; }
.opciones--locales, .opciones--dos { grid-template-columns: 1fr 1fr; }
.opciones--chips { display: flex; flex-wrap: wrap; gap: 8px; }
.opcion, .chip { position: relative; cursor: pointer; }
.opcion input, .chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opcion span { display: grid; gap: 2px; min-height: 64px; align-content: center; padding: 10px 14px; border: 2px solid var(--negro); border-radius: 12px; background: #fff; transition: background-color .15s ease, transform .12s ease; }
.opcion--chica span { min-height: 54px; font-weight: 700; text-align: center; justify-content: center; }
.opcion small { color: var(--gris); font-size: .85rem; }
.chip span { display: inline-flex; align-items: center; min-height: 46px; padding: 8px 16px; border: 2px solid var(--negro); border-radius: 999px; font-weight: 700; background: #fff; transition: background-color .15s ease, transform .12s ease; }
.opcion input:checked + span, .chip input:checked + span { background: var(--amarillo); transform: translateY(-2px); box-shadow: 0 3px 0 var(--negro); }
.opcion input:focus-visible + span, .chip input:focus-visible + span { outline: 3px solid var(--rojo); outline-offset: 2px; }
.opcion input[aria-invalid="true"] + span, .chip input[aria-invalid="true"] + span { border-color: var(--rojo); }
.form__error { color: var(--rojo-osc); font-weight: 800; }
.nota { font-size: .875rem; color: var(--gris); }

/* Envíos */
.envios { max-width: var(--max); margin: 0 auto; padding: 56px var(--g); display: grid; gap: 22px; }
.envios__foto { margin: 0; border: 3px solid var(--negro); border-radius: 16px; overflow: hidden; transform: rotate(-1.5deg); }
.envios__foto img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.envios__texto { display: grid; gap: 14px; justify-items: start; }
.envios__texto p { font-size: 1.1rem; }

.adentro { padding: 0 var(--g) 56px; max-width: var(--max); margin: 0 auto; }
.adentro__fotos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.adentro__fotos img { width: 100%; height: 100%; object-fit: cover; border: 3px solid var(--negro); border-radius: 12px; }
.adentro__fotos img:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
.adentro__fotos img:not(:first-child) { aspect-ratio: 3 / 4; }

/* Sorteos: ticket */
.sorteos { background: var(--rojo); padding: 48px var(--g); border-top: 4px solid var(--negro); border-bottom: 4px solid var(--negro);
  background-image: radial-gradient(rgba(255,255,255,.12) 2px, transparent 2.5px); background-size: 22px 22px; }
.ticket { max-width: 640px; margin: 0 auto; background: var(--amarillo); border: 3px solid var(--negro); padding: 26px 22px; display: grid; gap: 12px; justify-items: start; position: relative;
  border-radius: 14px; -webkit-mask: radial-gradient(circle 14px at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 14px at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
  mask: radial-gradient(circle 14px at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 14px at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat; }
.ticket__titulo { font-size: clamp(1.9rem, 8vw, 2.8rem); }
@media (prefers-reduced-motion: no-preference) {
  .ticket.visto { animation: sacudir .6s .2s ease; }
  @keyframes sacudir { 0%, 100% { rotate: 0deg; } 25% { rotate: -2deg; } 60% { rotate: 1.5deg; } }
}

/* Locales */
.locales { max-width: var(--max); margin: 0 auto; padding: 56px var(--g); }
.locales .titulo { margin-bottom: 18px; }
.locales__grilla { display: grid; gap: 18px; }
.local { border: 3px solid var(--negro); border-radius: 18px; padding: 20px 18px; display: grid; gap: 12px; background: #fff; }
.local__zona { font-weight: 800; color: var(--rojo-osc); }
.local__nombre { font-size: 2rem; }
address { font-style: normal; font-weight: 600; font-size: 1.05rem; }
.local__tels a { font-weight: 800; color: var(--rojo-osc); }
.horarios { width: 100%; border-collapse: collapse; }
.horarios th, .horarios td { text-align: left; padding: 9px 0; border-bottom: 2px dashed #D9D3CB; font-weight: 600; vertical-align: top; }
.horarios td { text-align: right; }
.horarios .hoy th, .horarios .hoy td { color: var(--rojo-osc); }
.hoy__marca { font-size: .72rem; background: var(--rojo); color: #fff; border-radius: 999px; padding: 1px 8px; margin-left: 4px; vertical-align: 2px; }
.abierto { font-size: .95rem; color: var(--gris); }
.abierto--si { color: #1C6B3A; font-weight: 800; }
.local__acciones { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.local__acciones .boton { padding: 10px 8px; font-size: 1rem; white-space: nowrap; }
#pedido, #contenido section { scroll-margin-top: 76px; }
.local__mapa { border: 3px solid var(--negro); border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 10; background: var(--hormigon); }
.local__mapa iframe { width: 100%; height: 100%; border: 0; display: block; }

.pie { background: var(--negro); color: #E9E4DD; text-align: center; padding: 36px var(--g) 110px; display: grid; gap: 6px; justify-items: center; }
.pie img { width: 220px; height: auto; margin-bottom: 6px; border-radius: 6px; }
.pie a { color: var(--amarillo); }
.pie__brito { margin-top: 10px; font-size: .85rem; opacity: .8; }

.wa__boton { border: 3px solid var(--negro); }

@media (min-width: 820px) {
  :root { --g: 36px; }
  .marca img { height: 48px; }
  .hero { grid-template-columns: 1.05fr 1fr; }
  .hero__texto { padding: 56px var(--g) 64px max(var(--g), calc((100vw - var(--max)) / 2 + var(--g))); align-content: center; }
  .hero__accion { grid-auto-flow: column; justify-content: start; }
  .hero__foto { border-top: 0; border-left: 4px solid var(--negro); }
  .hero__foto img { height: 100%; aspect-ratio: auto; }
  .sello { bottom: 40px; left: -30px; transform: rotate(-4deg); }
  @media (prefers-reduced-motion: no-preference) {
    @keyframes estampar { from { opacity: 0; transform: rotate(-4deg) scale(1.6); } to { opacity: 1; transform: rotate(-4deg); } }
  }
  .rubros { padding-top: 72px; }
  .rubros__grilla { grid-template-columns: 1fr 1fr; }
  .envios { grid-template-columns: 1fr 1.1fr; align-items: center; gap: 48px; }
  .adentro__fotos { grid-template-columns: 2fr 1fr 1fr; }
  .adentro__fotos img:first-child { grid-column: auto; aspect-ratio: auto; }
  .locales__grilla { grid-template-columns: 1fr 1fr; }
  .pie { padding-bottom: 44px; }
}
