:root {
  --verde: #1ba11a;
  --amarillo: #fff54f;
  --amarillo-oscuro: #ffe107;
  --rojo: #b3171c;
  --naranja: #ef6a00;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background-color: var(--verde);
  background-image: url("fotos/fondo.png");
  background-position: center center;
  background-repeat: repeat;
  font-family: "Comic Sans MS", "Comic Sans", "Comic Neue", cursive;
  color: #000;
}

a { color: #00e; }

.contenedor {
  max-width: 965px;
  margin: 0 auto;
  padding-block: 20px 40px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  text-align: center;
}

h1 {
  color: #fff;
  font-family: Times, "Times New Roman", serif;
  font-size: clamp(38px, 9vw, 84px);
  line-height: 1;
  margin: 0;
  padding-top: 12px;
}

.cartel { display: block; width: min(320px, 85%); height: auto; margin: 22px auto 0; border: 3px solid #000; }

.banner {
  max-width: 928px;
  margin: 26px auto;
  padding: 12px 20px 18px;
  background: linear-gradient(#ffa21c, var(--naranja) 65%, #e65800);
  border: 2px solid #c44f00;
}
.banner .titulo {
  font: italic bold clamp(30px, 7.5vw, 66px)/1.1 Arial, Helvetica, sans-serif;
  color: #ffee2e;
  -webkit-text-stroke: 1.5px #5c3b00;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .2);
}
.banner .raya { height: 6px; margin: 10px 4% 12px; background: var(--amarillo-oscuro); border-bottom: 2px solid #8a5600; }
.banner .bajada { font: bold clamp(15px, 2.7vw, 25px) Arial, Helvetica, sans-serif; }

.carta { font-weight: bold; text-align: left; line-height: 1.35; margin: 1em clamp(0px, 5vw, 50px); font-size: 17px; }

.aviso { background: var(--amarillo); border: 3px dashed #000; padding: 8px 12px; font-weight: bold; margin: 16px auto; max-width: 700px; }

.contador { background: #000; max-width: 840px; margin: 34px auto; padding: 14px 8px 24px; }
.contador p { margin: 8px 0; }
.blanco { color: #fff; }
.amarillo { color: var(--amarillo); }
.amarillo-oscuro { color: var(--amarillo-oscuro); }
.chico { font-size: 21px; }
.mediano { font-size: 25px; }
.grande { font-size: clamp(30px, 6vw, 42px); }
.digitos { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.digitos span { background: #fff; min-width: 34px; padding: 12px 6px; font: bold 26px "Courier New", monospace; }
.digitos span.signo { background: transparent; color: #fff; }

.boton {
  display: inline-block;
  padding: 14px 28px;
  background: linear-gradient(#d8392f, var(--rojo));
  color: #fff;
  font: bold 24px/1.15 Times, "Times New Roman", serif;
  text-decoration: none;
  border: 3px outset #c9302a;
  box-shadow: 3px 4px 0 #4d0000;
  cursor: pointer;
}
.boton:active { border-style: inset; transform: translate(2px, 2px); box-shadow: 1px 2px 0 #4d0000; }
.boton[aria-disabled="true"] { background: #777; border-color: #888; box-shadow: 3px 4px 0 #333; pointer-events: none; }

.seccion { margin: 40px 0 10px; }
.filtros { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 12px 0 22px; }
.filtros button {
  font: bold 15px "Comic Sans MS", "Comic Neue", cursive;
  background: #fff; border: 2px outset #ddd; padding: 5px 12px; cursor: pointer;
}
.filtros button.activo { background: var(--amarillo); border-style: inset; }

.grilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 26px 22px; }

.tarjeta {
  position: relative;
  display: block;
  background: #fff;
  color: #000;
  text-decoration: none;
  padding: 10px 10px 14px;
  box-shadow: 4px 5px 0 rgba(0, 0, 0, .35);
  transform: rotate(-1.2deg);
  transition: transform .15s;
}
.tarjeta:nth-child(even) { transform: rotate(1.1deg); }
.tarjeta:hover { transform: rotate(0) scale(1.03); }
.tarjeta .foto { aspect-ratio: 4 / 3; background: #eee; overflow: hidden; }
.tarjeta .foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tarjeta h3 { font-size: 17px; margin: 10px 0 4px; }
.tarjeta .precio { color: var(--rojo); font-weight: bold; font-size: 18px; }
.tarjeta.combo { background: var(--amarillo); }
.tarjeta .detalle { font-size: 14px; margin-top: 4px; }

.sello {
  position: absolute; top: 34%; left: 50%;
  transform: translate(-50%, -50%) rotate(-14deg);
  padding: 4px 14px;
  font: bold 26px Impact, "Arial Black", sans-serif; letter-spacing: 2px;
  border: 4px solid; background: rgba(255, 255, 255, .85);
}
.sello.reservado { color: var(--naranja); }
.sello.vendido { color: var(--rojo); }
.tarjeta.vendido .foto, .tarjeta.reservado .foto { filter: grayscale(.7); }

.volver { display: inline-block; margin: 6px 0 18px; font-weight: bold; color: #fff; font-size: 18px; }

.ficha { background: #fff; padding: clamp(14px, 3vw, 26px); text-align: left; box-shadow: 5px 6px 0 rgba(0, 0, 0, .35); position: relative; }
.ficha h2 { font-family: Times, "Times New Roman", serif; font-size: clamp(30px, 6vw, 46px); margin: 0 0 6px; line-height: 1.05; }
.ficha .precio { color: var(--rojo); font-size: 30px; font-weight: bold; margin: 8px 0 14px; }
.ficha .descripcion { font-size: 17px; line-height: 1.45; white-space: pre-line; }
.galeria .principal { aspect-ratio: 4 / 3; background: #eee; margin-bottom: 8px; }
.galeria .principal img { width: 100%; height: 100%; object-fit: contain; display: block; background: #111; }
.miniaturas { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.miniaturas button { padding: 0; border: 3px solid #ccc; width: 72px; height: 54px; cursor: pointer; background: #eee; }
.miniaturas button.activa { border-color: var(--rojo); }
.miniaturas img { width: 100%; height: 100%; object-fit: cover; display: block; }
.columnas { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: start; }
.acciones { margin-top: 22px; text-align: center; }
.estado-texto { font-weight: bold; margin-top: 10px; }
.tambien { margin-top: 18px; font-size: 15px; }

.escena {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 30%, #fff 0%, #f4f4f4 55%, #dcdcdc 100%);
  container-type: inline-size;
}
.ficha .escena { margin: 18px auto 0; max-width: 760px; border: 8px solid #fff; outline: 2px solid #000; box-shadow: 5px 6px 0 rgba(0, 0, 0, .35); }
.tarjeta .foto .escena { width: 100%; height: 100%; }
.pieza { position: absolute; padding: 0; margin: 0; border: 0; background: none; pointer-events: none; }
.pieza img { width: 100%; height: 100%; display: block; filter: drop-shadow(0 5px 5px rgba(0, 0, 0, .35)); transition: filter .25s, opacity .25s, transform .2s; }
.pieza.fuera img, .pieza.reservado img, .pieza.vendido img { filter: grayscale(1) contrast(.55) brightness(1.35) drop-shadow(0 5px 5px rgba(0, 0, 0, .15)); opacity: .6; }
.escena.interactiva.sobre-pieza { cursor: pointer; }
.pieza.encima img { transform: translateY(-2%) scale(1.02); }
.pieza.encima:not(.fuera) img { filter: drop-shadow(0 0 5px var(--amarillo-oscuro)) drop-shadow(0 7px 7px rgba(0, 0, 0, .35)); }
.pieza:focus-visible { outline: 3px dashed var(--rojo); outline-offset: 3px; }
.etiqueta {
  position: absolute; left: 50%; top: 45%;
  transform: translate(-50%, -50%) rotate(-12deg);
  padding: 1px 8px; white-space: nowrap;
  font: bold clamp(7px, 2.6cqw, 20px) Impact, "Arial Black", sans-serif; letter-spacing: 1px;
  border: clamp(1px, .4cqw, 3px) solid; background: rgba(255, 255, 255, .85);
}
.etiqueta.reservado { color: var(--naranja); }
.etiqueta.vendido { color: var(--rojo); }
.ayuda-escena { text-align: center; font-weight: bold; margin: 10px 0 0; min-height: 1.4em; }

.items { list-style: none; padding: 0; margin: 16px 0; }
.items li { display: flex; align-items: center; gap: 12px; padding: 10px; border-bottom: 2px dashed #bbb; transition: opacity .2s; }
.items li img, .items li .sin-foto { width: 64px; height: 48px; object-fit: contain; background: #f2f2f2; flex: none; }
.items .fila { display: flex; align-items: center; gap: 12px; flex: 1; padding: 0; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.items .fila:disabled { cursor: default; }
.items .nombre { font-weight: bold; }
.items .nota { font-size: 13px; color: #555; }
.items .valor { font-weight: bold; color: var(--rojo); white-space: nowrap; }
.items li.fuera { opacity: .45; }
.items li.fuera img { filter: grayscale(1); }
.items li.fuera .nombre { text-decoration: line-through; }
.items li.no-disponible { opacity: .5; }
.total { font-size: 26px; font-weight: bold; text-align: right; margin-top: 8px; }
.total .ahorro { display: block; font-size: 16px; color: var(--verde); }

.pie { margin-top: 50px; font-size: 14px; color: #fff; }

@media (max-width: 640px) {
  .columnas { grid-template-columns: 1fr; }
  .grilla { grid-template-columns: repeat(2, 1fr); gap: 18px 12px; }
  .tarjeta h3 { font-size: 15px; }
  .sello { font-size: 18px; }
  .boton { font-size: 20px; padding: 12px 18px; }
}
