/* ===============================================================
   COMPLEJO DEPORTIVO — estructura. Los colores salen de tema.css
   =============================================================== */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- encabezado ---------- */
.complejo header.top { background: var(--bg-header); border-bottom: none; }
.complejo .top .marca { color: var(--hero-texto); display: flex; align-items: center; gap: 8px; }
.nav-cx { display: none; gap: 24px; margin-left: auto; margin-right: 8px; }
.nav-cx a { color: var(--hero-suave); text-decoration: none; font-weight: 500; }
.nav-cx a:hover { color: var(--hero-texto); }
@media (min-width: 860px) { .nav-cx { display: flex; } }
.complejo .btn-carrito { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .25); color: var(--hero-texto); }
.complejo .contador { background: var(--amarillo); color: var(--sobre-amarillo); }

/* ---------- portada ---------- */
.hero-cx { background: var(--hero-bg); color: var(--hero-texto); padding: 36px 0 44px; overflow: hidden; }
.hero-cx-grilla { display: grid; gap: 24px; align-items: center; }
@media (min-width: 860px) { .hero-cx { padding: 72px 0 84px; } .hero-cx-grilla { grid-template-columns: 1.1fr 1fr; gap: 56px; } }
.hero-cx .sobre { color: var(--amarillo); font-weight: 600; margin: 0 0 10px; font-size: 1.05rem; }
.hero-cx h1 { font-size: calc(clamp(2.9rem, 11vw, 5.6rem) * var(--titulo-escala)); line-height: .9; margin: 0 0 16px; text-transform: uppercase; text-wrap: balance; }
.hero-lema { color: var(--hero-suave); font-size: 1.12rem; max-width: 44ch; margin: 0 0 24px; }
.hero-botones { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-cta { background: var(--amarillo); color: var(--sobre-amarillo); }
.btn-cta:hover { background: color-mix(in srgb, var(--amarillo) 82%, white); }
.hero-cx .btn.sec { color: var(--hero-texto); border-color: rgba(255, 255, 255, .35); }
.hero-cx .btn.sec:hover { background: rgba(255, 255, 255, .1); }
.datos-cx { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.datos-cx:empty { display: none; }
.datos-cx li { font-weight: 500; padding-left: 16px; position: relative; }
.datos-cx li::before { content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; border-radius: 50%; background: var(--pelota); }

.cancha-ilus { max-width: 460px; width: 100%; justify-self: center; }
.cancha-svg { width: 100%; height: auto; display: block; transform: rotate(-6deg); filter: drop-shadow(0 24px 28px rgba(0, 0, 0, .35)); overflow: visible; }
.c-vidrio { fill: var(--cancha-vidrio); stroke: rgba(255, 255, 255, .35); stroke-width: 2; }
.c-piso { fill: var(--cancha-piso); }
.c-lineas path { stroke: var(--cancha-linea); stroke-width: 2.5; fill: none; }
.c-red { stroke: var(--cancha-red); stroke-width: 5; stroke-dasharray: 3 2; }
.c-pelota { fill: var(--pelota); }
.c-costura { stroke: #FFFFFF; stroke-width: 1.6; fill: none; opacity: .9; }
@media (prefers-reduced-motion: no-preference) {
  .c-pelota, .c-costura { animation: saque 1.1s cubic-bezier(.2, .7, .3, 1) .2s both; }
}
@keyframes saque { from { transform: translate(-170px, 100px); opacity: 0; } 40% { opacity: 1; } }

/* ---------- secciones ---------- */
.seccion-cx { padding: 56px 0; scroll-margin-top: 64px; }
.seccion-cx.alt { background: var(--surface); border-top: 1px solid var(--borde); border-bottom: 1px solid var(--borde); }
.seccion-cx h2 { font-size: calc(2.4rem * var(--titulo-escala)); margin: 0 0 8px; text-transform: uppercase; line-height: 1; }
.reservar-intro .suave, .carta-bajada { margin: 0 0 22px; max-width: 52ch; }
.carta-bajada:empty { display: none; }

/* ---------- reservas ---------- */
.reservar-grilla { display: grid; gap: 8px 48px; }
@media (min-width: 860px) { .reservar-grilla { grid-template-columns: .8fr 1.2fr; align-items: start; } .reservar-intro { position: sticky; top: 96px; } }
.form-reserva { background: var(--surface); border: 1px solid var(--borde); border-radius: var(--radio); padding: 20px; display: flex; flex-direction: column; min-width: 0; }
.form-reserva fieldset { border: none; padding: 0; margin: 0 0 18px; min-width: 0; }
.form-reserva legend, .form-reserva label { font-size: .92rem; font-weight: 600; padding: 0; margin: 0 0 8px; display: block; }
.form-reserva input, .form-reserva select { margin-bottom: 16px; }
.opciones-cx { display: flex; gap: 8px; flex-wrap: wrap; }
.opciones-cx.dias { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.opciones-cx.dias::-webkit-scrollbar { display: none; }
.op-cx { border: 1px solid var(--borde); background: var(--bg); border-radius: var(--radio-campo); padding: 9px 14px; font-weight: 500; white-space: nowrap; }
.op-cx.activo { background: var(--acento); border-color: var(--acento); color: var(--sobre-acento); }
.opciones-cx.horas .op-cx { min-width: 74px; font-variant-numeric: tabular-nums; }
.sin-turnos { margin: 0; }
.resumen-cx { background: var(--nude); border-radius: var(--radio-campo); padding: 12px 14px; margin: 0 0 12px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; align-items: baseline; }
.resumen-precio { font-weight: 700; font-size: 1.2rem; color: var(--acento); font-variant-numeric: tabular-nums; }
.resumen-precio small { font-weight: 500; font-size: .8rem; color: var(--suave); }

/* ---------- canchas y precios ---------- */
.canchas-cx { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 22px; }
.cancha-cx { border: 1px solid var(--borde); border-top: 4px solid var(--acento); border-radius: var(--radio); padding: 22px; background: var(--bg); display: flex; flex-direction: column; gap: 6px; }
.cancha-cx h3 { font-size: calc(1.8rem * var(--titulo-escala)); margin: 0; text-transform: uppercase; line-height: 1; }
.cancha-sub { color: var(--suave); margin: 0 0 6px; }
.franjas { margin: 0; display: flex; flex-direction: column; }
.franjas div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--borde); }
.franjas dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.cancha-nota { color: var(--suave); font-size: .92rem; margin: 6px 0 0; }
.link-cx { margin-top: auto; padding-top: 12px; font-weight: 600; color: var(--acento); text-decoration: none; }
.link-cx:hover { text-decoration: underline; }

/* ---------- carta (usa el catálogo de la tienda) ---------- */
.complejo .filtros { justify-content: flex-start; margin-top: 0; }
.complejo .buscador { margin: 12px 0 24px; }
.complejo .grilla { padding-bottom: 0; }
.complejo .card .foto { aspect-ratio: 1; }
.complejo .card .info > .btn { margin-top: auto; }
.complejo .card .info { gap: 4px; }
.complejo .card h3 { margin-bottom: 2px; }
.radios-col { flex-direction: column; gap: 10px; }

/* ---------- eventos ---------- */
.eventos-cx { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 22px; }
.evento-cx { background: var(--bg); border: 1px solid var(--borde); border-radius: var(--radio); padding: 22px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.evento-cx h3 { margin: 0; font-size: calc(1.5rem * var(--titulo-escala)); text-transform: uppercase; line-height: 1.05; }
.evento-cx p { margin: 0 0 6px; color: var(--suave); flex: 1; }

/* ---------- horarios y ubicación ---------- */
.info-cx { display: grid; gap: 20px; }
@media (min-width: 760px) { .info-cx { grid-template-columns: 1fr 1fr; } }
.bloque-cx { background: var(--surface); border: 1px solid var(--borde); border-radius: var(--radio); padding: 22px; }
.bloque-cx h2 { font-size: calc(1.7rem * var(--titulo-escala)); margin-bottom: 14px; }
.horarios { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.horarios th, .horarios td { text-align: left; padding: 8px 0; border-bottom: 1px solid var(--borde); font-size: .98rem; vertical-align: top; }
.horarios th { font-weight: 600; padding-right: 12px; }
.horarios tr:last-child th, .horarios tr:last-child td { border-bottom: none; }
.direccion { margin: 0 0 14px; }
.complejo .pie { margin-top: 0; }

/* ---------- portada: otras ilustraciones ---------- */
.hero-cx-grilla.sin-ilus { grid-template-columns: 1fr; }
.hero-ilus { width: min(360px, 80%); justify-self: center; margin: 0 auto; border-radius: 50%; aspect-ratio: 1; object-fit: cover; box-shadow: 0 24px 50px rgba(0, 0, 0, .3); }
.c-borde { fill: var(--pasto-oscuro, #1E6B36); }
.c-pasto rect { fill: var(--pasto-claro, #2A8445); }
#svg-futbol .c-lineas rect, #svg-futbol .c-lineas circle, #svg-futbol .c-lineas path { fill: none; stroke: var(--cancha-linea); stroke-width: 2.5; }
.c-pelota-f { fill: #FFFFFF; stroke: #1A1A1A; stroke-width: 1.2; }
.c-costura-f { fill: #1A1A1A; stroke: none; opacity: 1; }
#svg-futbol .c-borde { fill: var(--pasto-oscuro, #1E6B36); }

/* ---------- calendario de turnos ---------- */
.leyenda-cx { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .85rem; color: var(--suave); margin: -2px 0 10px; }
.leyenda-cx span { display: inline-flex; align-items: center; gap: 6px; }
.leyenda-cx span::before { content: ""; width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--borde); background: var(--surface); }
.leyenda-cx .l-ocupado::before { background: repeating-linear-gradient(-45deg, var(--nude) 0 3px, var(--rosa) 3px 6px); }
.leyenda-cx .l-elegido::before { background: var(--amarillo); border-color: var(--amarillo); }
.grilla-turnos { display: grid; grid-template-columns: 50px repeat(var(--columnas, 1), minmax(0, 1fr)); gap: 6px; align-items: stretch; }
.grilla-turnos.una { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
.grilla-turnos .cargando-cx, .grilla-turnos .sin-turnos { grid-column: 1 / -1; margin: 6px 0; }
.g-cab { font-size: .8rem; font-weight: 600; color: var(--suave); text-align: center; padding: 2px 0; line-height: 1.2; }
.g-hora { font-weight: 600; font-variant-numeric: tabular-nums; display: flex; align-items: center; font-size: .95rem; }
.turno { border: 1px solid var(--borde); background: var(--surface); color: var(--acento); border-radius: 8px; padding: 9px 2px; font-weight: 600; font-size: .85rem; font-variant-numeric: tabular-nums; min-height: 40px; }
.turno:hover:not(:disabled) { border-color: var(--acento); }
.turno.ocupado { background: repeating-linear-gradient(-45deg, var(--nude) 0 4px, color-mix(in srgb, var(--rosa) 60%, var(--nude)) 4px 8px); color: var(--suave); cursor: not-allowed; font-weight: 500; }
.grilla-turnos.una .turno.ocupado { text-decoration: line-through; }
.turno.elegido { background: var(--amarillo); border-color: var(--amarillo); color: var(--sobre-amarillo); }
.ayuda-cx { font-size: .82rem; color: var(--suave); margin: -10px 0 14px; }
.check-cx { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; font-size: .88rem !important; margin: 0 0 14px !important; line-height: 1.4; }
.check-cx input { width: 20px; height: 20px; flex-shrink: 0; margin: 1px 0 0; accent-color: var(--acento); }
.resumen-sena { flex-basis: 100%; font-size: .9rem; color: var(--texto); }
.franja-sena dt, .franja-sena dd { color: var(--suave); font-weight: 500 !important; }

/* ---------- reserva lista ---------- */
.reserva-ok { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.ok-cab { display: flex; align-items: center; gap: 12px; }
.ok-cab h3 { margin: 0; font-size: calc(1.7rem * var(--titulo-escala)); text-transform: uppercase; line-height: 1.05; }
.ok-check { width: 40px; height: 40px; border-radius: 50%; background: var(--wa); flex-shrink: 0; position: relative; }
.ok-check::after { content: ""; position: absolute; left: 14px; top: 9px; width: 9px; height: 17px; border: solid #FFFFFF; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.ok-datos { margin: 0; width: 100%; border: 1px solid var(--borde); border-radius: var(--radio-campo); }
.ok-datos div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-bottom: 1px solid var(--borde); }
.ok-datos div:last-child { border-bottom: none; }
.ok-datos dt { color: var(--suave); }
.ok-datos dd { margin: 0; font-weight: 600; text-align: right; }
.ok-codigo { letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.sena-cx { background: color-mix(in srgb, var(--amarillo) 18%, var(--surface)); border: 1px solid color-mix(in srgb, var(--amarillo) 55%, var(--borde)); border-radius: var(--radio-campo); padding: 14px; width: 100%; }
.sena-cx p { margin: 0 0 10px; }
.alias-cx strong { font-size: 1.1rem; word-break: break-all; }
.alias-cx .btn { margin-left: 6px; vertical-align: middle; }
.ok-botones { display: flex; gap: 8px; flex-wrap: wrap; }
.ok-botones .btn-wa { width: auto; margin: 0; }

/* ---------- panel: reservas ---------- */
.panel-reservas .opciones-cx.dias { margin-bottom: 14px; }
.panel-reservas .op-cx small { font-weight: 400; opacity: .8; }
.lista-reservas { display: flex; flex-direction: column; gap: 8px; }
.res-fila { display: grid; grid-template-columns: 62px 1fr; gap: 8px 12px; background: var(--surface); border: 1px solid var(--borde); border-left: 4px solid var(--acento); border-radius: var(--radio-campo); padding: 12px; align-items: start; }
.res-fila.pendiente { border-left-color: var(--amarillo); }
.res-fila.anotada { border-left-color: var(--suave); }
.res-hora { font-weight: 700; font-size: 1.1rem; font-variant-numeric: tabular-nums; line-height: 1.1; }
.res-hora small { display: block; font-weight: 400; font-size: .78rem; color: var(--suave); }
.res-datos { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.res-datos span { color: var(--suave); font-size: .92rem; }
.estado-cx { font-size: .8rem !important; font-weight: 600; margin-top: 2px; }
.estado-cx.pendiente { color: #8A5A00 !important; }
.estado-cx.confirmada { color: #17803D !important; }
.res-acciones { grid-column: 2; display: flex; gap: 6px; flex-wrap: wrap; }
@media (min-width: 640px) { .res-fila { grid-template-columns: 70px 1fr auto; align-items: center; } .res-acciones { grid-column: 3; } }
.anotar-cx { margin-top: 14px; background: var(--surface); border: 1px solid var(--borde); border-radius: var(--radio-campo); padding: 12px 14px; }
.anotar-cx summary { cursor: pointer; font-weight: 600; }
.form-anotar { display: flex; flex-direction: column; margin-top: 10px; }
.form-anotar label { font-size: .88rem; margin: 10px 0 4px; display: block; }
.form-anotar .btn { margin-top: 14px; align-self: flex-start; }
.fila-anotar { display: grid; gap: 0 10px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.separador-cx { border: none; border-top: 1px solid var(--borde); margin: 28px 0; }
.reserva-ok { scroll-margin-top: 90px; }
.turno.ocupado { font-size: .72rem; letter-spacing: -.01em; }
