@font-face { font-family: "Abril Fatface"; src: url("fuentes/abril-fatface.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Libre Caslon Text"; src: url("fuentes/caslon-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Libre Caslon Text"; src: url("fuentes/caslon-400-it.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Libre Caslon Text"; src: url("fuentes/caslon-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("fuentes/atkinson-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("fuentes/atkinson-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* Colores de la tarjeta: rojo principal (rótulo y acciones), azul y blanco secundarios (franjas, ola, tinta azul noche).
   El rojo tiene cuatro pasos: puro, hondo (texto sobre blanco), suave y claro (lo de hoy). */
:root {
  --rojo: #d8262f;
  --rojo-hondo: #a8161e;
  --rojo-oscuro: #8f1219;
  --rojo-suave: #f5c6c9;
  --rojo-claro: #fdeeee;
  --tinta: #14205c;
  --tinta-2: #444d7a;
  --azul: #1f5fb0;
  --azul-vivo: #2f7fd9;
  --hielo: #cfe8fa;
  --azul-claro: #eaf4fc;
  --papel: #f8f6f2;
  --blanco: #fff;
  --linea: #c9ced9;
  --whatsapp: #15753a;
  --whatsapp-h: #0f5e2d;
  --rotulo: "Abril Fatface", Georgia, serif;
  --titular: "Libre Caslon Text", Georgia, serif;
  --texto: "Atkinson Hyperlegible", system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --lado: clamp(1.25rem, 4vw, 2.5rem);
  color-scheme: light;
  scrollbar-color: var(--rojo) var(--papel);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; background: var(--papel); }
body { margin: 0; font: 400 1.1875rem/1.6 var(--texto); color: var(--tinta); background: transparent; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; background: linear-gradient(rgb(248 246 242 / 0.72), rgb(248 246 242 / 0.8)), url("fotos/mercado/mercado-4.webp") center / cover no-repeat; pointer-events: none; }
.diapo figure, .foto .tarjeta { background: var(--blanco); }
::selection { background: var(--rojo); color: var(--blanco); }
:focus-visible { outline: 3px solid var(--tinta); outline-offset: 3px; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 2px; }
h1, h2, h3, p, ul, address, figure { margin: 0; padding: 0; }
ul { list-style: none; }
address { font-style: normal; }
img { display: block; max-width: 100%; height: auto; }
svg.i { width: 1.4em; height: 1.4em; flex: none; }
.solo-lector { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.saltar { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--tinta); color: var(--blanco); padding: 0.75rem 1rem; border-radius: 0.5rem; }
.saltar:focus { top: 1rem; }

.papel { max-width: 74rem; margin: 0 auto; padding-inline: var(--lado); }

/* Tira de fecha */
.tira { display: flex; justify-content: space-between; gap: 0.25rem 1.5rem; flex-wrap: wrap; padding: 1rem 0 0.6rem; font-size: 0.95rem; font-weight: 700; border-bottom: 2px solid var(--tinta); }
.tira time:empty { display: none; }
.tira time::first-letter { text-transform: uppercase; }

/* Cabecera de periódico */
.cabecera { text-align: center; padding: 1.5rem 0 1.25rem; border-bottom: 6px double var(--tinta); }
.rotulo { font: 400 clamp(2.9rem, 9.4vw, 7rem)/0.98 var(--rotulo); color: var(--rojo); letter-spacing: -0.005em; text-wrap: balance; }
.rotulo a { text-decoration: none; }
.subrotulo { margin-top: 0.75rem; font-weight: 700; font-size: clamp(0.95rem, 2.4vw, 1.2rem); letter-spacing: 0.1em; text-transform: uppercase; color: var(--tinta); }

/* Menú pegajoso: siempre a mano el botón de llamar */
.menu { position: sticky; top: 0; z-index: 60; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.5rem 1.5rem; padding: 0.35rem 0; background: var(--papel); border-bottom: 3px solid var(--rojo); }
.marca-mini { font: 700 1.15rem/1 var(--titular); text-decoration: none; max-width: 0; opacity: 0; overflow: hidden; white-space: nowrap; transition: max-width 0.4s var(--ease), opacity 0.25s var(--ease); }
.menu.fijo .marca-mini { max-width: 20rem; opacity: 1; }
.enlaces { display: flex; gap: 0.25rem 1.75rem; margin-inline: auto; }
.enlaces a { position: relative; padding: 0.7rem 0; font-weight: 700; font-size: 1.1rem; text-decoration: none; transition: color 0.25s var(--ease); }
.enlaces a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0.2rem; height: 3px; background: var(--rojo); transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease); }
.enlaces a:hover { color: var(--rojo-hondo); }
.enlaces a:hover::after, .enlaces a:focus-visible::after { transform: scaleX(1); }

/* Botones: al pasar el ratón sube una ola (como las de la tarjeta) y cambia de color */
.boton {
  --base: var(--rojo); --ola1: #ee6a71; --ola2: var(--rojo-oscuro); --texto-b: var(--blanco); --texto-h: var(--blanco);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 3.5rem; padding: 0.5rem 1.4rem; border: 2px solid var(--base); border-radius: 0.6rem;
  font: 700 1.2rem/1 var(--texto); text-decoration: none; color: var(--texto-b); background: var(--base);
  transition: color 0.35s var(--ease), transform 0.25s var(--ease), box-shadow 0.35s var(--ease);
}
.boton::before, .boton::after {
  content: ""; position: absolute; z-index: -1; left: -20%; width: 140%; height: 260%; top: 105%;
  border-radius: 46% 54% 0 0 / 16% 14% 0 0; transition: top 0.7s var(--ease), border-radius 0.7s var(--ease);
}
.boton::before { background: var(--ola1); }
.boton::after { background: var(--ola2); transition-delay: 0.07s; }
.boton:hover, .boton:focus-visible { color: var(--texto-h); border-color: var(--ola2); transform: translateY(-2px); box-shadow: 0 0.65rem 1.1rem -0.55rem rgb(20 32 92 / 0.5); }
.boton:hover::before, .boton:focus-visible::before { top: -45%; border-radius: 50%; }
.boton:hover::after, .boton:focus-visible::after { top: -55%; border-radius: 50%; }
.boton:active { transform: translateY(0) scale(0.98); box-shadow: none; }
.boton svg.i { transition: transform 0.35s var(--ease); }
.boton.llamar:hover svg.i { animation: timbre 0.7s ease-in-out; }
.boton.wa:hover svg.i { transform: scale(1.18) rotate(-8deg); }
@keyframes timbre { 0%, 100% { transform: rotate(0); } 15%, 45% { transform: rotate(-16deg); } 30%, 60% { transform: rotate(16deg); } 75% { transform: rotate(-8deg); } }
/* WhatsApp: blanco con borde verde, y se llena de verde al pasar el ratón */
.boton.wa { --base: var(--blanco); --ola1: #2f9a58; --ola2: var(--whatsapp); --texto-b: var(--whatsapp); --texto-h: var(--blanco); border-color: var(--whatsapp); }
/* Cómo llegar: azul de la tarjeta, ola azul noche */
.boton.azul { --base: var(--azul); --ola1: var(--azul-vivo); --ola2: var(--tinta); }
.boton.chico { min-height: 3rem; padding-inline: 1.25rem; font-size: 1.1rem; }
.boton.grande { min-height: 3.75rem; padding-inline: 2rem; font-size: 1.3rem; }

/* Portada */
.portada { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 2.5rem 3rem; padding-top: 2.25rem; align-items: start; }
.titular { font: 700 clamp(2.4rem, 5.6vw, 4.4rem)/1.06 var(--titular); letter-spacing: -0.01em; text-wrap: balance; }
.entradilla { margin-top: 1.1rem; font: italic 400 clamp(1.3rem, 2.6vw, 1.7rem)/1.4 var(--titular); color: var(--tinta-2); max-width: 36rem; }
.vendemos { margin-top: 2.5rem; padding-top: 2rem; border-top: 2px solid var(--tinta); }
.grupos { display: grid; grid-template-columns: repeat(3, 1fr); }
.grupos li { padding: 0 1.5rem; text-align: center; }
.grupos li + li { border-left: 1px solid var(--linea); }
.grupos li:first-child { padding-left: 0; } .grupos li:last-child { padding-right: 0; }
.grupos img { height: 7.25rem; width: auto; margin: 0 auto 1rem; }
.grupos h3 { font: 700 clamp(1.3rem, 2.3vw, 1.75rem)/1.15 var(--titular); }

/* Cajas del lateral */
.lateral { display: grid; gap: 1.75rem; position: sticky; top: 5.25rem; align-self: start; }
.principal { display: grid; gap: 0; }
.parte { margin-top: 2.5rem; }
.parte .cuerpo { display: grid; grid-template-columns: 1fr 1.1fr; gap: 1.5rem 2.5rem; align-items: start; }
.parte .reglas li:first-child { padding-top: 0; }
.parte .dias { margin-top: 0; }
.parte .dias caption { border-top: 0; padding-top: 0; }
.caja { border: 2px solid var(--tinta); background: var(--blanco); }
.parte > h2 { background: var(--azul) !important; }
.caja > h2 { background: var(--rojo); color: var(--blanco); font: 700 1.3rem/1.2 var(--texto); padding: 0.7rem 1.1rem; }
.caja .cuerpo { padding: 1.25rem 1.1rem 1.4rem; }
.estado { font-weight: 700; font-size: 1.05rem; line-height: 1.4; display: flex; gap: 0.65rem; align-items: baseline; }
.estado:empty { display: none; }
.estado::before { content: ""; flex: none; width: 0.8rem; height: 0.8rem; border-radius: 50%; background: var(--rojo); transform: translateY(0.05rem); }
.estado[data-abierto="si"]::before { background: #1a9a48; box-shadow: 0 0 0 4px rgb(26 154 72 / 0.22); }
.estado[data-abierto="no"]::before { box-shadow: 0 0 0 4px rgb(216 38 47 / 0.2); }
.linea { margin-top: 1.4rem; padding-top: 1.25rem; border-top: 1px solid var(--linea); }
.estado + .linea { margin-top: 1.1rem; }
.numero { font: 700 clamp(1.9rem, 3.4vw, 2.2rem)/1.05 var(--texto); font-variant-numeric: tabular-nums; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.6rem; margin-bottom: 0.85rem; }
.nombre { font-size: 1em; font-weight: 700; color: var(--rojo-hondo); }
.acciones { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.acciones .boton { padding-inline: 0.5rem; }
.guardar { background: linear-gradient(var(--rojo), var(--rojo)) 0 100% / 0 2px no-repeat; text-decoration: none; padding-bottom: 0.1rem; transition: background-size 0.4s var(--ease), color 0.25s var(--ease); display: inline-block; margin-top: 0.8rem; font-size: 1.02rem; color: var(--azul); font-weight: 700; }
.guardar:hover { color: var(--rojo-hondo); background-size: 100% 2px; }

.reglas li { padding: 0.8rem 0; border-top: 1px solid var(--linea); line-height: 1.4; }
.reglas li:first-child { padding-top: 0; border-top: 0; }
.reglas b { display: block; font-size: 1.05rem; color: var(--azul); }
.dias { width: 100%; margin-top: 1rem; border-collapse: collapse; font-size: 1.08rem; font-variant-numeric: tabular-nums; }
.dias caption { text-align: left; font-weight: 700; padding: 0 0 0.5rem; border-top: 2px solid var(--tinta); padding-top: 1rem; }
.dias thead th { font-size: 0.95rem; color: var(--tinta); font-weight: 700; text-align: left; padding: 0.4rem; background: var(--azul-claro); }
.dias th, .dias td { text-align: left; padding: 0.55rem 0.4rem; border-bottom: 1px solid var(--linea); white-space: nowrap; }
.dias tbody th { font-weight: 700; }
.dias td.no { color: var(--tinta-2); }
/* Hoy: fila en rojo macizo, letra blanca más grande y etiqueta HOY, para verla de lejos */
.dias tr.hoy th, .dias tr.hoy td { background: var(--rojo); color: var(--blanco); font-weight: 700; font-size: 1.2rem; padding-block: 0.85rem; border-bottom-color: var(--rojo); }
.dias tr.hoy th { border-radius: 0.5rem 0 0 0.5rem; padding-left: 0.6rem; }
.dias tr.hoy td:last-child { border-radius: 0 0.5rem 0.5rem 0; }
.dias tr.hoy td.no { color: var(--blanco); }
.dias tr.hoy th::after { content: "HOY"; display: inline-block; margin-left: 0.55rem; padding: 0.15rem 0.5rem; border-radius: 0.3rem; background: var(--blanco); color: var(--rojo-hondo); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; vertical-align: 0.12em; }

/* Dónde */
.donde { display: grid; grid-template-columns: 1fr 1.15fr; gap: 2.5rem 3.5rem; align-items: center; margin-top: 3.5rem; padding: 2.5rem 0 4rem; border-top: 6px double var(--tinta); }
.donde h2 { font: 700 clamp(2.1rem, 4.4vw, 3.2rem)/1.08 var(--titular); letter-spacing: -0.01em; }
.donde address { margin: 1.25rem 0 1.75rem; font: 400 1.35rem/1.45 var(--titular); }
.donde address a { text-decoration: none; }
.donde address a:hover b { color: var(--rojo-hondo); text-decoration: underline; text-decoration-thickness: 2px; }
.donde address b { display: block; font-size: 1.6rem; margin-bottom: 0.15rem; }
.foto .tarjeta { width: 100%; border: 1px solid var(--tinta); padding: 0.4rem; background: var(--blanco); aspect-ratio: 11 / 7; object-fit: cover; }
.foto figcaption { margin-top: 0.5rem; font-size: 0.95rem; color: var(--tinta-2); }

/* Ola de la tarjeta y pie a todo el ancho */
.olas { display: block; width: 100%; height: clamp(3.5rem, 8vw, 6.5rem); margin-bottom: -1px; }
.pie { background: var(--tinta); color: var(--blanco); border-top: 0; padding: 0.5rem var(--lado) 3rem; }
.pie-in { max-width: 74rem; margin: 0 auto; display: flex; justify-content: space-between; gap: 1.75rem 3rem; flex-wrap: wrap; }
.pie p { max-width: 34rem; color: #e1e6f5; font-size: 1.05rem; }
.pie-nombre { font: 400 1.7rem/1.1 var(--rotulo); color: var(--blanco) !important; margin-bottom: 0.5rem; }
.pie .telefonos { display: grid; gap: 0.15rem; font-weight: 700; font-size: 1.2rem; align-content: start; }
.pie .telefonos a { padding: 0.5rem 0; }
.pie a:hover { color: var(--hielo); }

/* Móvil y tableta: primero el titular, luego llamar, luego lo demás */
@media (max-width: 62rem) {
  .portada { display: flex; flex-direction: column; gap: 1.75rem; padding-top: 1.75rem; }
  .principal, .lateral { display: contents; }
  .lateral { position: static; }
  .parte { margin-top: 0; }
  .parte .cuerpo { grid-template-columns: minmax(0, 1fr); }
  .entrada { order: 1; }
  .contacto { order: 2; }
  .vendemos { order: 3; margin-top: 0; }
  .parte { order: 4; }
  .donde { grid-template-columns: 1fr; }
}
@media (max-width: 40rem) {
  body { font-size: 1.125rem; }
  .tira { font-size: 0.85rem; }
  .menu { grid-template-columns: 1fr; padding: 0; }
  .marca-mini { display: none; }
  .enlaces { width: 100%; justify-content: space-between; gap: 0.5rem; }
  .enlaces a { padding: 0.85rem 0.15rem; font-size: 1.02rem; }
  .grupos li { padding-inline: 0.5rem; }
  .grupos img { height: 4.75rem; }
  .grupos h3 { font-size: 1.05rem; }
  .donde { padding-bottom: 2.5rem; }
}

/* Un único momento al cargar: el rótulo y el titular suben un poco */
@media (prefers-reduced-motion: no-preference) {
  @keyframes sube { from { opacity: 0; transform: translateY(0.75rem); } to { opacity: 1; transform: none; } }
  .rotulo { animation: sube 0.8s var(--ease) both; }
  .entrada { animation: sube 0.8s var(--ease) 0.12s both; }
  .contacto { animation: sube 0.8s var(--ease) 0.22s both; }
}

/* Aviso legal */
.legal { max-width: 46rem; margin: 0 auto; padding: 2.5rem 0 4rem; }
.legal h1 { font: 700 clamp(2.2rem, 6vw, 3.4rem)/1.08 var(--titular); margin-bottom: 1.5rem; }
.legal h2 { font: 700 1.5rem/1.2 var(--titular); margin: 2.25rem 0 0.5rem; }
.legal p { margin-top: 0.75rem; }
.legal .datos { margin: 0; border-top: 2px solid var(--tinta); }
.legal .datos div { display: grid; grid-template-columns: 11rem 1fr; gap: 0.25rem 1rem; padding: 0.8rem 0; border-bottom: 1px solid var(--linea); }
.legal dt { font-weight: 700; }
.legal dd { margin: 0; overflow-wrap: anywhere; }
.legal .fecha { margin-top: 2.5rem; font-size: 0.95rem; color: var(--tinta-2); }
@media (max-width: 40rem) { .legal .datos div { grid-template-columns: 1fr; } }

/* Pantallas muy estrechas (320–360 px): que nada se salga */
@media (max-width: 26rem) {
  :root { --lado: 1rem; }
  .enlaces a { font-size: 0.95rem; }
  .rotulo { font-size: clamp(2.5rem, 13vw, 3rem); }
  .titular { font-size: 2.15rem; }
  .caja .cuerpo { padding-inline: 0.85rem; }
  .numero { font-size: 1.75rem; }
  .acciones .boton { font-size: 1.05rem; gap: 0.4rem; padding-inline: 0.25rem; }
  .dias { font-size: 0.92rem; }
  .dias th, .dias td { padding-inline: 0.25rem; }
  .pie .telefonos { font-size: 1.1rem; }
}
.portada > *, .principal > *, .lateral > *, .caja, .caja .cuerpo { min-width: 0; }
@media (max-width: 26rem) {
  .enlaces a { white-space: nowrap; font-size: 0.88rem; padding-inline: 0; }
  .enlaces { gap: 0.25rem; }
  .dias { font-size: 0.85rem; }
  .dias thead th { font-size: 0.82rem; }
  .dias tr.hoy th, .dias tr.hoy td { font-size: 1.02rem; }
  .dias tr.hoy th::after { margin-left: 0.3rem; padding-inline: 0.35rem; }
  .reglas li { font-size: 1.02rem; }
}
@media (max-width: 22rem) {
  .dias { font-size: 0.77rem; }
  .dias thead th { font-size: 0.77rem; }
  .dias tr.hoy th, .dias tr.hoy td { font-size: 0.95rem; }
  .caja .cuerpo { padding-inline: 0.7rem; }
}

/* Carrusel de fotos del mercado */
.mercado { padding: 2.5rem 0 4.5rem; border-top: 6px double var(--tinta); }
.mercado-cab { display: flex; justify-content: space-between; align-items: center; gap: 1rem 2rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.mercado h2 { font: 700 clamp(2.1rem, 4.4vw, 3.2rem)/1.08 var(--titular); letter-spacing: -0.01em; }
.control { display: flex; align-items: center; gap: 0.9rem; }
.cuenta { font-weight: 700; font-size: 1.1rem; min-width: 4.5rem; text-align: center; font-variant-numeric: tabular-nums; }
.flecha { position: relative; isolation: isolate; overflow: hidden; width: 3.5rem; height: 3.5rem; display: grid; place-items: center; border: 2px solid var(--rojo); border-radius: 50%; background: var(--rojo); color: var(--blanco); cursor: pointer; transition: color 0.3s var(--ease), transform 0.25s var(--ease), opacity 0.25s var(--ease); }
.flecha::before { content: ""; position: absolute; z-index: -1; left: -20%; width: 140%; height: 260%; top: 105%; background: var(--rojo-oscuro); border-radius: 46% 54% 0 0 / 16% 14% 0 0; transition: top 0.6s var(--ease), border-radius 0.6s var(--ease); }
.flecha:hover::before, .flecha:focus-visible::before { top: -45%; border-radius: 50%; }
.flecha:hover { transform: translateY(-2px); }
.flecha:active { transform: scale(0.95); }
.flecha:disabled { opacity: 0.35; cursor: default; transform: none; }
.flecha:disabled::before { display: none; }
.flecha svg.i { width: 1.6rem; height: 1.6rem; }
.pista { display: flex; gap: 1.25rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 0.25rem 0 0.75rem; scrollbar-width: none; overscroll-behavior-x: contain; }
.pista::-webkit-scrollbar { display: none; }
.pista { touch-action: pan-x pan-y pinch-zoom; -webkit-overflow-scrolling: touch; cursor: grab; }
.pista.arrastra { scroll-snap-type: none; scroll-behavior: auto; cursor: grabbing; user-select: none; }
.pista img { -webkit-user-drag: none; user-select: none; }
.diapo { --alto: clamp(15rem, 38vw, 28rem); flex: 0 0 100%; display: flex; justify-content: center; scroll-snap-align: start; }
.diapo figure { border: 1px solid var(--tinta); background: var(--blanco); padding: 0.4rem 0.4rem 0.9rem; width: min(100%, calc(var(--alto) * var(--ar) + 1.2rem)); }
.diapo img { display: block; width: 100%; height: auto; aspect-ratio: var(--ar); object-fit: contain; background: var(--azul-claro); }
.diapo figcaption { margin: 0.75rem 0.4rem 0; font: 700 1.1rem/1.4 var(--texto); }
.credito { display: block; margin-top: 0.3rem; font-weight: 400; font-size: 0.85rem; color: var(--tinta-2); }
.credito a { color: var(--azul); }
@media (max-width: 40rem) { .diapo { --alto: clamp(14rem, 62vw, 20rem); } .mercado { padding-bottom: 3rem; } .flecha { width: 3.25rem; height: 3.25rem; } }
@media (prefers-reduced-motion: reduce) { .pista { scroll-behavior: auto; } }
