/* Ventana de Black Friday (assets/js/black-friday.js) */

html.bf-bloqueo { overflow: hidden; }

.bf-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    overflow-y: auto;
    background: radial-gradient(circle at 50% 35%, rgba(0, 55, 65, 0.55), rgba(0, 0, 0, 0.9) 72%);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.bf-overlay.activo { opacity: 1; }

.bf-modal {
    position: relative;
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    width: min(900px, 100%);
    border-radius: 20px;
    overflow: hidden;
    background: #040a10;
    border: 1px solid rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 70px rgba(0, 255, 255, 0.16), 0 40px 90px rgba(0, 0, 0, 0.75);
    transform: translateY(18px) scale(0.97);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.bf-overlay.activo .bf-modal { transform: none; }

/* Esquinas tipo HUD */
.bf-esq {
    position: absolute;
    z-index: 2;
    width: 18px;
    height: 18px;
    border: 2px solid #00ffff;
    filter: drop-shadow(0 0 6px rgba(0, 255, 255, 0.7));
    pointer-events: none;
}
.bf-esq.tl { top: 12px; left: 12px; border-right: 0; border-bottom: 0; }
.bf-esq.tr { top: 12px; right: 12px; border-left: 0; border-bottom: 0; }
.bf-esq.bl { bottom: 12px; left: 12px; border-right: 0; border-top: 0; }
.bf-esq.br { bottom: 12px; right: 12px; border-left: 0; border-top: 0; }

.bf-x {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
}
.bf-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.bf-x:hover { color: #fff; border-color: rgba(0, 255, 255, 0.6); background: rgba(0, 255, 255, 0.08); }

/* ---------- Columna visual ---------- */
.bf-lado {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.6rem 1.5rem 2.4rem;
    text-align: center;
    background:
        linear-gradient(rgba(0, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 24px 24px,
        linear-gradient(90deg, rgba(0, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 24px 24px,
        radial-gradient(circle at 50% 32%, rgba(0, 255, 255, 0.2), transparent 62%),
        #03080d;
    border-right: 1px solid rgba(0, 255, 255, 0.14);
}

.bf-orbe {
    --o: 160px;
    position: relative;
    width: var(--o);
    height: var(--o);
    margin-bottom: 1.6rem;
}

.bf-hud { position: absolute; inset: -24px; width: calc(100% + 48px); height: calc(100% + 48px); overflow: visible; }
.bf-hud circle { fill: none; transform-origin: 100px 100px; }
.bf-hud-a { stroke: rgba(0, 255, 255, 0.5); stroke-width: 1.3; stroke-dasharray: 2 6; animation: bfGiro 30s linear infinite; }
.bf-hud-b { stroke: rgba(0, 255, 255, 0.8); stroke-width: 2.4; stroke-dasharray: 60 30 12 30; stroke-linecap: round; animation: bfGiro 14s linear infinite reverse; }
.bf-hud-c { stroke: rgba(0, 255, 255, 0.22); stroke-width: 1; }

.bf-anillo {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: calc(var(--o) * 0.13) solid rgba(0, 240, 232, 0.85);
    filter: blur(1.5px);
    box-shadow: 0 0 34px rgba(0, 240, 232, 0.75), inset 0 0 22px rgba(0, 255, 245, 0.8);
    animation: bfLatido 3.2s ease-in-out infinite;
}

.bf-nucleo {
    position: absolute;
    inset: 15%;
    overflow: hidden;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 45%, #0b1517 0%, #030707 75%);
    box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.9);
}

.bf-particulas { display: block; width: 100%; height: 100%; }

@keyframes bfGiro { to { transform: rotate(360deg); } }
@keyframes bfLatido {
    0%, 100% { box-shadow: 0 0 28px rgba(0, 240, 232, 0.6), inset 0 0 18px rgba(0, 255, 245, 0.7); }
    50% { box-shadow: 0 0 46px rgba(0, 240, 232, 0.95), inset 0 0 26px rgba(0, 255, 245, 0.95); }
}

.bf-marca {
    font-family: 'Orbitron', monospace;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 5px;
    background: linear-gradient(180deg, #ffffff, #9fb3bd);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.bf-titulo {
    display: flex;
    flex-direction: column;
    margin: 0.2rem 0 0;
    font-family: 'Orbitron', monospace;
    font-weight: 900;
    line-height: 0.95;
    text-transform: uppercase;
}

.bf-black,
.bf-friday {
    font-size: clamp(2.3rem, 5.4vw, 3.4rem);
    letter-spacing: 3px;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.bf-black {
    background-image: linear-gradient(180deg, #ffffff 0%, #d7e3ea 45%, #7d8f99 55%, #e9f2f6 100%);
    filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.6));
}

.bf-friday {
    background-image: linear-gradient(180deg, #b8ffff 0%, #00e5ff 55%, #0095c8 100%);
    filter: drop-shadow(0 0 14px rgba(0, 229, 255, 0.55));
}

.bf-chip {
    margin-top: 1rem;
    padding: 0.45rem 1.4rem;
    clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 10px 100%, 0 50%);
    background: linear-gradient(90deg, rgba(0, 255, 255, 0.22), rgba(0, 255, 255, 0.08));
    font-family: 'Orbitron', monospace;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #e9ffff;
}

/* ---------- Columna de la oferta ---------- */
.bf-oferta {
    display: flex;
    flex-direction: column;
    padding: 2.4rem 2.2rem 2rem;
    text-align: left;
    background: linear-gradient(160deg, rgba(0, 255, 255, 0.05), transparent 40%), #050c13;
}

.bf-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Orbitron', monospace;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #ff5c7a;
}
.bf-kicker i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ff3d63;
    box-shadow: 0 0 10px #ff3d63;
    animation: bfPulso 1.6s ease-in-out infinite;
}
@keyframes bfPulso { 50% { opacity: 0.35; } }

.bf-headline {
    margin: 0.7rem 0 1.3rem;
    padding-right: 2.2rem;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.88);
}
.bf-headline b { color: #00ffff; font-weight: 700; }

/* Lista de planes */
.bf-planes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }

.bf-plan {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(0, 255, 255, 0.16);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.bf-plan.destacado {
    background: linear-gradient(90deg, rgba(0, 255, 255, 0.1), rgba(0, 255, 255, 0.03));
    border-color: rgba(0, 255, 255, 0.6);
    box-shadow: 0 0 22px rgba(0, 255, 255, 0.14);
}

.bf-plan-info { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }

.bf-plan-nombre {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Orbitron', monospace;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #fff;
}
.bf-n { white-space: nowrap; }
.bf-plan-nombre em {
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
    background: rgba(0, 255, 255, 0.15);
    font-family: 'Rajdhani', sans-serif;
    font-style: normal;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #00ffff;
}

.bf-plan-detalle { font-family: 'Rajdhani', sans-serif; font-size: 0.88rem; color: rgba(255, 255, 255, 0.55); }
.bf-plan-detalle b { color: rgba(255, 255, 255, 0.9); font-weight: 700; }
.bf-plan-detalle s { margin-left: 0.15rem; text-decoration-color: #ff4d6d; }

.bf-plan-precio { display: flex; align-items: baseline; gap: 0.35rem; white-space: nowrap; }
.bf-plan-precio s {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-decoration-color: #ff4d6d;
    text-decoration-thickness: 2px;
}
.bf-plan-precio strong {
    font-family: 'Orbitron', monospace;
    font-size: 1.6rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 14px rgba(0, 255, 255, 0.35);
}
.bf-plan-precio small { font-family: 'Rajdhani', sans-serif; font-size: 0.78rem; font-weight: 600; color: rgba(255, 255, 255, 0.55); }

/* Cuenta regresiva */
.bf-reloj {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.2rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(255, 40, 80, 0.14), rgba(255, 40, 80, 0.04));
    border: 1px solid rgba(255, 77, 109, 0.35);
}

.bf-reloj-label {
    font-family: 'Orbitron', monospace;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

.bf-dig { display: flex; gap: 0.4rem; }
.bf-dig span {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 54px;
    padding: 0.35rem 0.4rem 0.3rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 77, 109, 0.4);
}
.bf-dig b {
    font-family: 'Orbitron', monospace;
    font-size: 1.25rem;
    font-weight: 800;
    color: #ff5c7a;
    text-shadow: 0 0 10px rgba(255, 77, 109, 0.5);
    font-variant-numeric: tabular-nums;
}
.bf-dig i {
    font-style: normal;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.66rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

/* Botón */
.bf-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 1.2rem;
    padding: 0.95rem 1.5rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #00ffff, #00a3c4);
    color: #021015;
    font-family: 'Orbitron', monospace;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 0 26px rgba(0, 255, 255, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.bf-cta svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s ease; }
.bf-cta:hover { transform: translateY(-2px); box-shadow: 0 0 38px rgba(0, 255, 255, 0.65); }
.bf-cta:hover svg { transform: translateX(3px); }
.bf-cta:focus-visible, .bf-x:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.bf-legal {
    margin: 0.75rem 0 0;
    text-align: center;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

/* ---------- Responsive ---------- */
.bf-modal { max-height: calc(100dvh - 2.5rem); }

/* Pantallas bajas (portátiles pequeños) */
@media (max-height: 720px) and (min-width: 761px) {
    .bf-orbe { --o: 120px; margin-bottom: 1.1rem; }
    .bf-oferta { padding: 1.8rem 2rem 1.5rem; }
    .bf-headline { margin: 0.5rem 0 1rem; font-size: 1.3rem; }
    .bf-plan { padding: 0.6rem 0.9rem; }
    .bf-reloj, .bf-cta { margin-top: 0.9rem; }
}

/* Teléfono: cabecera compacta (orbe pequeño al lado del título) */
@media (max-width: 760px) {
    .bf-overlay { padding: 0.75rem; place-items: center; }
    .bf-modal {
        grid-template-columns: 1fr;
        max-height: calc(100dvh - 1.5rem);
        overflow-y: auto;
        border-radius: 16px;
    }
    .bf-esq { width: 12px; height: 12px; }
    .bf-esq.tl, .bf-esq.tr { top: 8px; }
    .bf-esq.bl, .bf-esq.br { bottom: 8px; }
    .bf-esq.tl, .bf-esq.bl { left: 8px; }
    .bf-esq.tr, .bf-esq.br { right: 8px; }
    .bf-x { top: 12px; right: 12px; width: 32px; height: 32px; }

    .bf-lado {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        column-gap: 0.9rem;
        align-items: center;
        justify-items: start;
        padding: 1.1rem 3.2rem 0.9rem 1.1rem;
        text-align: left;
        border-right: 0;
        border-bottom: 1px solid rgba(0, 255, 255, 0.14);
    }
    .bf-orbe { --o: 64px; grid-row: 1 / span 2; margin: 0; }
    .bf-hud { inset: -9px; width: calc(100% + 18px); height: calc(100% + 18px); }
    .bf-hud-a, .bf-hud-c { display: none; }
    .bf-anillo { box-shadow: 0 0 16px rgba(0, 240, 232, 0.7), inset 0 0 10px rgba(0, 255, 245, 0.8); animation: none; filter: blur(1px); }
    .bf-marca { font-size: 0.62rem; letter-spacing: 3px; }
    .bf-titulo { flex-direction: row; gap: 0.45rem; margin: 0.1rem 0 0; }
    .bf-black, .bf-friday { font-size: 1.55rem; letter-spacing: 1px; }
    .bf-chip { display: none; }

    .bf-oferta { padding: 0.9rem 1rem 1rem; }
    .bf-kicker { font-size: 0.55rem; letter-spacing: 2px; }
    .bf-headline { margin: 0.35rem 0 0.75rem; padding-right: 0; font-size: 1.08rem; }
    .bf-planes { gap: 0.4rem; }
    .bf-plan { padding: 0.55rem 0.75rem; gap: 0.6rem; border-radius: 10px; }
    .bf-plan-nombre { font-size: 0.68rem; gap: 0.35rem; }
    .bf-plan-nombre em { font-size: 0.58rem; padding: 0.05rem 0.35rem; }
    .bf-plan-detalle { font-size: 0.78rem; }
    .bf-plan-precio { gap: 0.25rem; }
    .bf-plan-precio s { font-size: 0.82rem; }
    .bf-plan-precio strong { font-size: 1.2rem; }
    .bf-plan-precio small { font-size: 0.65rem; }

    .bf-reloj { margin-top: 0.75rem; padding: 0.5rem 0.7rem; gap: 0.5rem; border-radius: 10px; }
    .bf-reloj-label { font-size: 0.5rem; letter-spacing: 1.5px; max-width: 6.5rem; line-height: 1.4; }
    .bf-dig { gap: 0.3rem; }
    .bf-dig span { min-width: 42px; padding: 0.25rem 0.3rem 0.2rem; border-radius: 6px; }
    .bf-dig b { font-size: 1rem; }
    .bf-dig i { font-size: 0.55rem; }

    .bf-cta { margin-top: 0.75rem; padding: 0.8rem 1rem; font-size: 0.74rem; border-radius: 10px; }
    .bf-legal { margin-top: 0.5rem; font-size: 0.7rem; line-height: 1.3; }
}

@media (max-width: 360px) {
    .bf-plan-precio s { display: none; }
    .bf-black, .bf-friday { font-size: 1.35rem; }
}

@media (prefers-reduced-motion: reduce) {
    .bf-hud circle, .bf-anillo, .bf-kicker i { animation: none; }
    .bf-overlay, .bf-modal { transition: none; }
}
