/* =============================================================================
   ACTIVIDADES · PÁGINA PÚBLICA «ESCAPARATE» (prefijo ape_)
   actividades_escaparate.php. Móvil primero, sin librerías. El color de acento
   (--ape-acento) lo pone la página con el elegido por el club o la federación.
   Formatos: .ape--tienda, .ape--rejilla, .ape--escaparate, .ape--lista.
   ========================================================================== */

@font-face { font-family: 'ApeSyne'; src: url('../styles/fonts/Syne/Syne-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'ApeSyne'; src: url('../styles/fonts/Syne/Syne-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'ApeSyne'; src: url('../styles/fonts/Syne/Syne-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'ApeSyne'; src: url('../styles/fonts/Syne/Syne-ExtraBold.ttf') format('truetype'); font-weight: 800; font-display: swap; }

:root {
    --ape-acento: #2563eb;
    --ape-acento-suave: #2563eb1f;
    --ape-acento-suave: color-mix(in srgb, var(--ape-acento) 12%, transparent);
    --ape-acento-oscuro: color-mix(in srgb, var(--ape-acento) 72%, #000);
    --ape-fondo: #f5f6fa;
    --ape-tarjeta: #ffffff;
    --ape-texto: #0f172a;
    --ape-suave: #64748b;
    --ape-borde: rgba(15, 23, 42, .08);
    --ape-sombra: 0 1px 2px rgba(15, 23, 42, .05), 0 6px 20px rgba(15, 23, 42, .07);
    --ape-sombra-alta: 0 2px 6px rgba(15, 23, 42, .08), 0 18px 44px rgba(15, 23, 42, .16);
    --ape-radio: 18px;
    --ape-abierta: #12b76a;
    --ape-pronto: #f59e0b;
    --ape-cerrada: #94a3b8;
    --ape-fuente: 'ApeSyne', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --ape-fuente-texto: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --ape-ancho: 1240px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --ape-fondo: #0b1020;
        --ape-tarjeta: #141a2e;
        --ape-texto: #e8ecf5;
        --ape-suave: #94a3b8;
        --ape-borde: rgba(255, 255, 255, .08);
        --ape-sombra: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
        --ape-sombra-alta: 0 2px 6px rgba(0, 0, 0, .35), 0 20px 48px rgba(0, 0, 0, .5);
    }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.ape {
    margin: 0;
    min-height: 100vh;
    background: var(--ape-fondo);
    color: var(--ape-texto);
    font-family: var(--ape-fuente-texto);
    font-size: 15px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    font-variant-numeric: lining-nums;
}

:where(.ape) a { color: inherit; text-decoration: none; }
:where(.ape) :where(button, input, select) { font: inherit; color: inherit; }

/* ---------- Cabecera ---------------------------------------------------- */

.ape-cab {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: var(--ape-acento);
    padding: 28px 16px 34px;
}
.ape-cab__fondo {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(255, 255, 255, .28) 0%, rgba(255, 255, 255, 0) 55%),
        radial-gradient(90% 120% at 0% 100%, rgba(0, 0, 0, .28) 0%, rgba(0, 0, 0, 0) 60%),
        linear-gradient(135deg, var(--ape-acento) 0%, var(--ape-acento-oscuro) 100%);
}
.ape-cab__fondo::after {
    content: '';
    position: absolute;
    right: -60px;
    top: -60px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    border: 38px solid rgba(255, 255, 255, .08);
}
.ape-cab__dentro { position: relative; max-width: var(--ape-ancho); margin: 0 auto; }
.ape-cab__club { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.ape-cab__escudo {
    position: relative;
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
    display: grid;
    place-items: center;
    overflow: hidden;
}
.ape-cab__escudo img { position: absolute; inset: 5px; width: calc(100% - 10px); height: calc(100% - 10px); object-fit: contain; background: #fff; z-index: 1; }
.ape-cab__ini { font-family: var(--ape-fuente); font-weight: 800; font-size: 17px; color: var(--ape-acento); }
.ape-cab__nombre { font-family: var(--ape-fuente); font-weight: 600; font-size: 15px; opacity: .95; }
.ape-cab__titulo {
    margin: 0;
    font-family: var(--ape-fuente);
    font-weight: 800;
    font-size: clamp(30px, 8vw, 56px);
    line-height: 1.02;
    letter-spacing: -.01em;
}
.ape-cab__sub { margin: 10px 0 0; max-width: 640px; font-size: clamp(15px, 3.6vw, 18px); opacity: .9; }

/* ---------- Barra de filtros -------------------------------------------- */

.ape-barra {
    position: sticky;
    top: 0;
    z-index: 20;
    background: color-mix(in srgb, var(--ape-fondo) 86%, transparent);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--ape-borde);
    padding: 12px 16px 8px;
}
.ape-barra__dentro { max-width: var(--ape-ancho); margin: 0 auto; display: flex; gap: 10px; align-items: center; }
.ape-barra__chips { flex-direction: column; align-items: stretch; gap: 6px; margin-top: 10px; }

.ape-buscar {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--ape-tarjeta);
    box-shadow: inset 0 0 0 1px var(--ape-borde), 0 1px 2px rgba(15, 23, 42, .04);
    transition: box-shadow .2s;
}
.ape-buscar:focus-within { box-shadow: inset 0 0 0 2px var(--ape-acento), 0 0 0 4px var(--ape-acento-suave); }
.ape-buscar svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: var(--ape-suave); stroke-width: 2; stroke-linecap: round; }
.ape-buscar input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 15px; }
.ape-buscar input::placeholder { color: var(--ape-suave); }

.ape-orden { position: relative; flex: 0 0 auto; display: flex; align-items: center; }
.ape-orden span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ape-orden select {
    appearance: none;
    -webkit-appearance: none;
    height: 44px;
    max-width: 44px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--ape-tarjeta) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M7 4v16M7 20l-3-3M7 20l3-3M17 20V4M17 4l-3 3M17 4l3 3'/%3E%3C/svg%3E") center / 20px no-repeat;
    box-shadow: inset 0 0 0 1px var(--ape-borde);
    color: transparent;
    cursor: pointer;
}
.ape-orden select option { color: #0f172a; }

.ape-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 2px 0 4px;
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
    scroll-padding: 16px;
}
.ape-chips::-webkit-scrollbar { display: none; }
.ape-chips:empty { display: none; }
.ape-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: var(--ape-tarjeta);
    box-shadow: inset 0 0 0 1px var(--ape-borde);
    font-family: var(--ape-fuente);
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
    transition: background .2s, color .2s, box-shadow .2s, transform .15s;
}
.ape-chip:hover { box-shadow: inset 0 0 0 1px var(--ape-acento); }
.ape-chip:active { transform: scale(.97); }
.ape-chip.is-on { background: var(--ape-acento); color: #fff; box-shadow: none; }
.ape-chip small { font-weight: 600; opacity: .6; }
.ape-chips--grupos .ape-chip.is-on { background: var(--ape-texto); color: var(--ape-tarjeta); }

.ape-punto { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.ape-punto--abierta { background: var(--ape-abierta); }
.ape-punto--pronto { background: var(--ape-pronto); }
.ape-punto--cerrada { background: var(--ape-cerrada); }
.ape-chip.is-on .ape-punto { box-shadow: 0 0 0 2px #fff; }

/* ---------- Contenido ---------------------------------------------------- */

.ape-main { max-width: var(--ape-ancho); margin: 0 auto; padding: 14px 16px 40px; }
.ape-cuenta { margin: 0 0 12px; min-height: 20px; font-size: 13px; color: var(--ape-suave); }
.ape-cuenta button { border: 0; background: none; padding: 0; margin-left: 6px; color: var(--ape-acento); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

.ape-pie { display: flex; justify-content: center; gap: 8px; padding: 24px 16px 36px; font-size: 13px; color: var(--ape-suave); }
.ape-pie__sep { opacity: .5; }

/* Imagen o marcador (para que la maqueta nunca se rompa) */
.ape-media { position: relative; overflow: hidden; background: var(--ape-acento-suave); }
.ape-media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.ape-ph {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 12px;
    text-align: center;
    color: #fff;
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, 0) 60%),
        linear-gradient(150deg, hsl(var(--h, 220) 78% 58%) 0%, hsl(calc(var(--h, 220) + 38) 70% 38%) 100%);
}
.ape-ph::before {
    content: '';
    position: absolute;
    width: 70%;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 18px solid rgba(255, 255, 255, .09);
    right: -20%;
    bottom: -12%;
}
.ape-ph__ini { position: relative; font-family: var(--ape-fuente); font-weight: 800; font-size: 42px; line-height: 1; letter-spacing: -.02em; opacity: .95; }
.ape-ph__grupo { position: relative; font-family: var(--ape-fuente); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; opacity: .8; max-width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Etiquetas */
.ape-etq {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-family: var(--ape-fuente);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: .02em;
    white-space: nowrap;
    background: rgba(255, 255, 255, .94);
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .12);
}
.ape-etq::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ape-cerrada); }
.ape-etq--abierta::before { background: var(--ape-abierta); box-shadow: 0 0 0 3px rgba(18, 183, 106, .2); }
.ape-etq--pronto::before { background: var(--ape-pronto); }
.ape-precio {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--ape-texto);
    color: var(--ape-tarjeta);
    font-family: var(--ape-fuente);
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
}
.ape-precio--gratis { background: var(--ape-abierta); color: #fff; }
.ape-plazas { font-size: 12px; color: var(--ape-suave); white-space: nowrap; }
.ape-plazas--pocas { color: #dc6803; font-weight: 600; }
.ape-plazas--espera { color: var(--ape-acento); font-weight: 600; }

.ape-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--ape-acento);
    color: #fff !important;
    font-family: var(--ape-fuente);
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    transition: filter .2s, transform .15s, box-shadow .2s;
    box-shadow: 0 6px 16px var(--ape-acento-suave);
}
.ape-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.ape-btn--claro { background: #fff; color: #0f172a !important; }
a:hover .ape-btn svg, .ape-btn:hover svg { transform: translateX(3px); }
.ape-btn:hover { filter: brightness(1.06); }

.ape-meta { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--ape-suave); }
.ape-meta li { display: flex; align-items: flex-start; gap: 7px; min-width: 0; }
.ape-meta svg { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ape-meta span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ape-grupo { font-family: var(--ape-fuente); font-weight: 700; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ape-acento); }

/* Tarjeta base */
.ape-card { position: relative; display: block; border-radius: var(--ape-radio); background: var(--ape-tarjeta); box-shadow: var(--ape-sombra); overflow: hidden; transition: transform .3s cubic-bezier(.2, .7, .2, 1), box-shadow .3s; -webkit-tap-highlight-color: transparent; outline: none; }
.ape-card:hover, .ape-card:focus-visible { transform: translateY(-4px); box-shadow: var(--ape-sombra-alta); }
.ape-card:hover .ape-media img, .ape-card:focus-visible .ape-media img { transform: scale(1.05); }
.ape-card:focus-visible { box-shadow: 0 0 0 3px var(--ape-acento), var(--ape-sombra-alta); }
.ape-card.is-cerrada .ape-media { filter: grayscale(.55); }

/* Esqueletos de carga */
.ape-esq { position: relative; border-radius: var(--ape-radio); background: var(--ape-tarjeta); box-shadow: var(--ape-sombra); overflow: hidden; min-height: 300px; padding: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; }
.ape-esq span { display: block; height: 12px; margin: 0 16px; border-radius: 6px; background: var(--ape-borde); }
.ape-esq span:first-child { height: auto; flex: 1; margin: 0 0 6px; border-radius: 0; }
.ape-esq span:last-child { width: 45%; margin-bottom: 18px; }
.ape-esq::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); animation: ape-brillo 1.3s infinite; }
@media (prefers-color-scheme: dark) { .ape-esq::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .06), transparent); } }
@keyframes ape-brillo { to { transform: translateX(100%); } }

/* Vacío y error */
.ape-vacio { grid-column: 1 / -1; padding: 56px 20px; text-align: center; color: var(--ape-suave); }
.ape-vacio__ic { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 20px; display: grid; place-items: center; background: var(--ape-acento-suave); color: var(--ape-acento); }
.ape-vacio__ic svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ape-vacio strong { display: block; margin-bottom: 4px; font-family: var(--ape-fuente); font-size: 18px; color: var(--ape-texto); }
.ape-vacio button { margin-top: 16px; border: 0; cursor: pointer; }

/* Aparición */
.ape-entra { animation: ape-entra .45s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes ape-entra { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* =========================================================================
   FORMATO «TIENDA»: mosaico con piezas alta (1:2), cuadrada y apaisada
   ========================================================================= */

.ape-lista--tienda { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 150px; grid-auto-flow: dense; gap: 10px; }
.ape-lista--tienda .ape-esq { min-height: 0; }
.ape-lista--tienda .ape-esq--0 { grid-row: span 2; }
.ape-lista--tienda .ape-esq--3 { grid-column: span 2; }
.ape-pieza { height: 100%; }
.ape-pieza--alta { grid-row: span 2; }
.ape-pieza--apaisada { grid-column: span 2; }
.ape-pieza .ape-media { position: absolute; inset: 0; }
.ape-pieza .ape-media img { object-position: center 35%; }
.ape-pieza__velo { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .25) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .78) 100%); pointer-events: none; }
.ape-pieza__arriba { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 6px; }
.ape-pieza__arriba .ape-precio { background: rgba(255, 255, 255, .94); color: #0f172a; box-shadow: 0 2px 8px rgba(15, 23, 42, .12); }
.ape-pieza__arriba .ape-precio--gratis { background: var(--ape-abierta); color: #fff; }
.ape-pieza__abajo { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px; color: #fff; }
.ape-pieza__grupo { font-family: var(--ape-fuente); font-weight: 700; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.ape-pieza__nombre { margin: 2px 0 0; font-family: var(--ape-fuente); font-weight: 700; font-size: 15px; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 1px 8px rgba(0, 0, 0, .3); }
.ape-pieza--alta .ape-pieza__nombre { font-size: 17px; }
.ape-pieza__fecha { margin-top: 4px; font-size: 12px; opacity: .88; }
.ape-pieza__ir { display: flex; align-items: center; gap: 6px; max-height: 0; opacity: 0; overflow: hidden; margin-top: 0; font-family: var(--ape-fuente); font-weight: 700; font-size: 13px; transition: max-height .3s, opacity .3s, margin .3s; }
.ape-pieza__ir svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ape-pieza:hover .ape-pieza__ir, .ape-pieza:focus-visible .ape-pieza__ir { max-height: 24px; opacity: 1; margin-top: 8px; }
.ape-pieza .ape-etq { height: 22px; font-size: 10px; padding: 0 8px; }
.ape-pieza--cuadrada .ape-pieza__fecha { display: none; }

@media (min-width: 640px) {
    .ape-lista--tienda { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 180px; gap: 14px; }
    .ape-pieza--cuadrada .ape-pieza__fecha { display: block; }
}
@media (min-width: 960px) { .ape-lista--tienda { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 200px; gap: 16px; } }
@media (min-width: 1200px) { .ape-lista--tienda { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (hover: none) { .ape-pieza--alta .ape-pieza__ir, .ape-pieza--apaisada .ape-pieza__ir { max-height: 24px; opacity: 1; margin-top: 8px; } }

/* =========================================================================
   FORMATO «REJILLA»: tarjetas iguales con la imagen apaisada arriba
   ========================================================================= */

.ape-lista--rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.ape-tarjeta { display: flex; flex-direction: column; }
.ape-tarjeta .ape-media { aspect-ratio: 16 / 10; }
.ape-tarjeta__arriba { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; gap: 6px; }
.ape-tarjeta__cuerpo { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 16px 16px 18px; }
.ape-tarjeta__nombre { margin: 0; font-family: var(--ape-fuente); font-weight: 700; font-size: 18px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ape-tarjeta__desc { margin: 0; font-size: 13.5px; color: var(--ape-suave); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Pie: precio y plazas a la izquierda, botón a la derecha; si no caben en
   una línea, el botón baja a la siguiente a todo el ancho (nunca se montan) */
.ape-tarjeta__pie { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--ape-borde); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.ape-tarjeta__precio { flex: 999 1 auto; display: flex; flex-direction: column; gap: 2px; }
.ape-tarjeta__pie .ape-btn { flex: 1 0 auto; }
.ape-tarjeta__precio strong { font-family: var(--ape-fuente); font-weight: 800; font-size: 20px; line-height: 1; }
.ape-tarjeta__precio strong.is-gratis { color: var(--ape-abierta); }
.ape-tarjeta .ape-btn { height: 40px; padding: 0 16px; font-size: 13px; }
.ape-lista--rejilla .ape-esq { min-height: 360px; }

/* =========================================================================
   FORMATO «ESCAPARATE»: la próxima abierta en grande y filas por grupo
   ========================================================================= */

.ape-lista--escaparate { display: flex; flex-direction: column; gap: 30px; }
.ape-lista--escaparate .ape-esq { min-height: 240px; }
.ape-lista--escaparate .ape-esq:nth-child(n+3) { display: none; }

.ape-hero { position: relative; display: block; border-radius: 26px; overflow: hidden; color: #fff; background: #0f172a; box-shadow: var(--ape-sombra-alta); isolation: isolate; }
.ape-hero__fondo { position: absolute; inset: -30px; z-index: -2; background-size: cover; background-position: center; filter: blur(28px) saturate(1.3); transform: scale(1.1); opacity: .85; }
.ape-hero__fondo--ph { filter: none; inset: 0; transform: none; opacity: 1; background: linear-gradient(135deg, var(--ape-acento) 0%, var(--ape-acento-oscuro) 100%); }
.ape-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(5, 10, 25, .82) 0%, rgba(5, 10, 25, .55) 60%, rgba(5, 10, 25, .3) 100%); }
.ape-hero__dentro { display: flex; gap: 18px; align-items: center; padding: 18px; }
.ape-hero__poster { flex: 0 0 auto; width: 112px; aspect-ratio: 1 / 2; border-radius: 16px; box-shadow: 0 16px 40px rgba(0, 0, 0, .45); transform: rotate(-2deg); transition: transform .4s cubic-bezier(.2, .7, .2, 1); }
.ape-hero:hover .ape-hero__poster { transform: rotate(0) scale(1.03); }
.ape-hero__txt { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.ape-hero__sobre { font-family: var(--ape-fuente); font-weight: 700; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.ape-hero__nombre { margin: 0; font-family: var(--ape-fuente); font-weight: 800; font-size: clamp(22px, 6vw, 44px); line-height: 1.05; }
.ape-hero__desc { margin: 0; max-width: 560px; font-size: 14px; opacity: .85; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ape-hero .ape-meta { color: rgba(255, 255, 255, .85); }
.ape-hero__acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 6px; }
.ape-hero .ape-precio { background: rgba(255, 255, 255, .16); color: #fff; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ape-hero .ape-precio--gratis { background: var(--ape-abierta); }
@media (max-width: 479px) { .ape-hero__desc { display: none; } .ape-hero .ape-btn { height: 38px; padding: 0 14px; font-size: 13px; } }
@media (min-width: 720px) {
    .ape-hero__dentro { padding: 30px 36px; gap: 36px; }
    .ape-hero__poster { width: 190px; }
}

.ape-carril__cab { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ape-carril__tit { margin: 0; font-family: var(--ape-fuente); font-weight: 800; font-size: 21px; line-height: 1.1; }
.ape-carril__tit small { display: block; margin-top: 3px; font-family: var(--ape-fuente-texto); font-weight: 400; font-size: 13px; color: var(--ape-suave); }
.ape-carril__flechas { display: none; gap: 8px; }
.ape-carril__flechas button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--ape-tarjeta); box-shadow: var(--ape-sombra); display: grid; place-items: center; cursor: pointer; transition: transform .15s, opacity .2s; }
.ape-carril__flechas button:hover { transform: scale(1.06); }
.ape-carril__flechas button:disabled { opacity: .35; cursor: default; transform: none; }
.ape-carril__flechas svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) and (min-width: 720px) { .ape-carril__flechas { display: flex; } }
.ape-carril__pista { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; margin: 0 -16px; padding: 4px 16px 16px; scroll-padding: 16px; }
.ape-carril__pista::-webkit-scrollbar { display: none; }
.ape-poster { flex: 0 0 auto; width: 150px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 8px; outline: none; -webkit-tap-highlight-color: transparent; }
.ape-poster .ape-media { aspect-ratio: 1 / 2; border-radius: 16px; box-shadow: var(--ape-sombra); transition: transform .3s cubic-bezier(.2, .7, .2, 1), box-shadow .3s; }
.ape-poster:hover .ape-media, .ape-poster:focus-visible .ape-media { transform: translateY(-4px); box-shadow: var(--ape-sombra-alta); }
.ape-poster:hover .ape-media img { transform: scale(1.05); }
.ape-poster:focus-visible .ape-media { box-shadow: 0 0 0 3px var(--ape-acento), var(--ape-sombra-alta); }
.ape-poster .ape-etq { position: absolute; top: 8px; left: 8px; height: 22px; font-size: 10px; padding: 0 8px; }
.ape-poster.is-cerrada .ape-media { filter: grayscale(.55); }
.ape-poster__nombre { margin: 0; font-family: var(--ape-fuente); font-weight: 700; font-size: 14px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ape-poster__linea { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 6px; font-size: 12px; color: var(--ape-suave); }
.ape-poster__linea b { font-family: var(--ape-fuente); font-weight: 700; color: var(--ape-texto); white-space: nowrap; }
.ape-poster__linea b.is-gratis { color: var(--ape-abierta); }
@media (min-width: 720px) { .ape-poster { width: 178px; } }

/* =========================================================================
   FORMATO «LISTA»: filas miniatura · título · subtítulo · flecha
   ========================================================================= */

.ape-lista--lista { background: var(--ape-tarjeta); border-radius: var(--ape-radio); box-shadow: var(--ape-sombra); overflow: hidden; }
.ape-lista--lista .ape-esq { min-height: 76px; border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--ape-borde); }
.ape-lista--lista .ape-esq span:first-child { display: none; }
.ape-lista--lista .ape-esq span { margin-left: 88px; }
.ape-lista--lista .ape-esq span:nth-child(2) { margin-top: 20px; width: 50%; }
.ape-lista--lista .ape-esq span:last-child { margin-bottom: 20px; width: 30%; }
.ape-fila { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-bottom: 1px solid var(--ape-borde); transition: background .2s; outline: none; -webkit-tap-highlight-color: transparent; }
.ape-fila:last-child { border-bottom: 0; }
.ape-fila:hover, .ape-fila:focus-visible { background: var(--ape-acento-suave); }
.ape-fila .ape-media { flex: 0 0 auto; width: 60px; height: 60px; border-radius: 14px; }
.ape-fila .ape-ph__ini { font-size: 20px; }
.ape-fila .ape-ph__grupo, .ape-fila .ape-ph::before { display: none; }
.ape-fila.is-cerrada .ape-media { filter: grayscale(.55); }
.ape-fila__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ape-fila__nombre { margin: 0; font-family: var(--ape-fuente); font-weight: 700; font-size: 15.5px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ape-fila__sub { font-size: 13px; color: var(--ape-suave); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ape-fila__lado { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; white-space: nowrap; }
.ape-fila__lado .ape-etq { box-shadow: none; background: var(--ape-fondo); height: 22px; font-size: 10.5px; }
.ape-fila__precio { font-family: var(--ape-fuente); font-weight: 800; font-size: 15px; }
.ape-fila__precio.is-gratis { color: var(--ape-abierta); }
.ape-fila__flecha { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ape-acento-suave); color: var(--ape-acento); transition: transform .2s, background .2s, color .2s; }
.ape-fila__flecha svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ape-fila:hover .ape-fila__flecha { transform: translateX(3px); background: var(--ape-acento); color: #fff; }
@media (max-width: 479px) {
    .ape-fila { gap: 12px; padding: 12px; }
    .ape-fila .ape-media { width: 52px; height: 52px; border-radius: 12px; }
    .ape-fila__lado .ape-etq { display: none; }
    .ape-fila__flecha { display: none; }
}
@media (min-width: 720px) { .ape-fila { padding: 14px 20px; } .ape-fila .ape-media { width: 64px; height: 64px; } }

/* Pantallas anchas */
@media (min-width: 720px) {
    .ape-cab { padding: 40px 24px 52px; }
    .ape-barra { padding: 14px 24px 8px; }
    .ape-barra__chips { flex-direction: row; align-items: center; gap: 14px; }
    .ape-chips { margin: 0; padding-left: 0; padding-right: 0; }
    .ape-chips--grupos { flex: 1; min-width: 0; }
    .ape-main { padding: 20px 24px 56px; }
    .ape-orden select { max-width: none; padding: 0 40px 0 16px; color: var(--ape-texto); font-size: 14px; font-weight: 500; background-position: right 14px center; background-size: 18px; }
    .ape-carril__pista { margin: 0 -24px; padding-left: 24px; padding-right: 24px; scroll-padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    .ape *, .ape *::before, .ape *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
