/* ============================================= */
/* ==           VARIABLES Y ADN VISUAL        == */
/* ============================================= */
:root {
    --brand-color: #6C5CE7;
    --dark-bg: #050505;
    --light-text: #f5f5f5;
    --pastel-blue: #A2D2FF;
    --pastel-pink: #FFC8DD;
    --pastel-yellow: #FFF4BD;
    --pastel-green: #CDEAC0;
    --vibrant-action: #FF5A5F;
    --dark-text: #2D3436;
    --border-soft: rgba(0,0,0,0.08);
    --shadow-premium: 0 20px 50px rgba(0,0,0,0.1);
}

/* ============================================= */
/* ==             RESET Y BASE                == */
/* ============================================= */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

:root {
    --brand-color: #00CCFF; /* Azul Eléctrico */
    --punk-red: #FF003C;
    --metal-dark: #0A192F; /* Azul Profundo Industrial */
    --chrome: linear-gradient(180deg, #B4B4B4 0%, #E2E2E2 50%, #7A7A7A 100%);
    --neon-shadow: 0 0 20px rgba(0, 204, 255, 0.4);
}

body {
    background: #020617 !important; /* El color del vacío */
    color: #00f2ff !important;
    overflow-x: hidden;
    position: relative;
}

/* --- FONDO ANIMADO DE GUERRA DIGITAL --- */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: 
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
        linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 4px, 3px 100%;
    z-index: -1;
    pointer-events: none;
}

body::after {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: 
        linear-gradient(90deg, #020617 21px, transparent 1%) center,
        linear-gradient(#020617 21px, transparent 1%) center, #00f2ff;
    background-size: 22px 22px;
    opacity: 0.05;
    z-index: -2;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    from { background-position: 0 0; }
    to { background-position: 0 1000px; }
}

/* --- HEADER METÁLICO --- */
.top-bar {
    background: rgba(10, 25, 47, 0.9) !important;
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--brand-color) !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

.promo-banner {
    background: repeating-linear-gradient(45deg, #000, #000 10px, var(--punk-red) 10px, var(--punk-red) 20px) !important;
    border-bottom: 1px solid var(--brand-color);
}

/* ============================================= */
/* ==         TRANSICIÓN EXPLOSIVA            == */
/* ============================================= */
#explosion-overlay {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh;
    background: #000; 
    z-index: 10000; 
    display: flex;
    justify-content: center; 
    align-items: center;
    pointer-events: none; 
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.boom-text {
    color: white; 
    font-size: clamp(3rem, 15vw, 7rem); 
    font-weight: 800;
    font-family: 'Bangers', cursive;
    text-transform: uppercase; 
    animation: shake 0.5s infinite;
}

@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}

/* ============================================= */
/* ==           HEADER Y NAVEGACIÓN           == */
/* ============================================= */
.top-bar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid var(--border-soft);
}

.promo-banner {
    background: repeating-linear-gradient(45deg, var(--vibrant-action), var(--vibrant-action) 10px, #FF8E92 10px, #FF8E92 20px);
    color: white; 
    text-align: center; 
    padding: 12px; 
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    animation: bannerPulse 2s infinite;
}

@keyframes bannerPulse {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.1); }
    100% { filter: brightness(1); }
}

.main-header {
    background: #ffffff;
    padding: 15px 5%;
}

.main-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

.nav-link {
    text-decoration: none;
    color: var(--dark-text);
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s;
    position: relative;
}

.nav-link:hover {
    color: var(--brand-color);
}

.nav-link.active {
    color: var(--brand-color);
    font-weight: 800;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--brand-color);
    border-radius: 2px;
}

/* --- BOTÓN DE ESCAPE ESTILO HUD --- */
.btn-escape-hud {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    text-decoration: none;
    color: #00f2ff !important;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 2px;
    padding: 5px 12px;
    border-left: 3px solid #ff003c;
    background: rgba(0, 242, 255, 0.05);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1001;
}

.btn-escape-hud:hover {
    background: rgba(255, 0, 60, 0.1);
    border-left: 3px solid #00f2ff;
    padding-left: 18px;
    color: #fff !important;
    text-shadow: 0 0 10px #00f2ff;
}

.hud-arrow {
    font-size: 0.9rem;
    animation: pulseArrow 1.5s infinite;
}

@keyframes pulseArrow {
    0%, 100% { opacity: 1; transform: translateX(0); }
    50% { opacity: 0.3; transform: translateX(-3px); }
}

/* Responsividad para no chocar con el menú en móviles */
@media (max-width: 768px) {
    .btn-escape-hud {
        position: static;
        transform: none;
        margin: 10px auto;
        width: fit-content;
        justify-content: center;
    }
}

/* ============================================= */
/* ==             INTRO SECTION               == */
/* ============================================= */
.intro-section {
    text-align: center; 
    padding: 80px 20px; 
    max-width: 900px;
    margin: 0 auto;
}

.intro-section h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    color: var(--brand-color);
    margin-bottom: 25px;
    font-weight: 800;
    line-height: 1.1;
}

.intro-section p {
    font-size: 1.2rem;
    color: #636e72;
    font-weight: 300;
}

/* ============================================= */
/* ==           GALLERY GRID & CARDS          == */
/* ============================================= */
.pricing-container {
    padding: 60px 5%;
    background: #FDFBF7;
    min-height: 800px;
    display: block !important;
}

.gallery-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
    width: 95% !important;
    max-width: 1100px !important;
    margin: 0 auto !important;
}

@media (max-width: 1024px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 600px) {
    .gallery-grid { grid-template-columns: 1fr !important; }
}

grid-template-columns: repeat(4, 1fr) !important; /* FORZAMOS 4 COLUMNAS EN LAPTOP */
    gap: 30px;
    width: 95% !important;
    max-width: 1600px !important; /* Permitimos que la galería se expanda mucho más */
    margin: 50px auto;
}

.template-card {
    width: 100% !important; /* La tarjeta ocupa todo el ancho de su columna */
    max-width: none !important; /* ELIMINAMOS EL LÍMITE QUE CAUSABA EL DESCUADRE */
    background: linear-gradient(135deg, #1a1f2c 0%, #121620 100%) !important;
    border: 1px solid rgba(0, 242, 255, 0.2) !important;
    border-radius: 4px !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.template-preview {
    width: 100% !important;
    aspect-ratio: 16 / 9 !important; /* PROPORCIÓN CINEMATOGRÁFICA */
    height: auto !important;
    background: #000;
    position: relative;
    overflow: hidden;
}

.template-card:hover {
    transform: scale(1.02) translateY(-10px);
    box-shadow: 0 0 40px rgba(0, 242, 255, 0.5);
    border-color: #ff003c !important;
}

.template-actions {
    background: #000 !important;
    color: #fff !important;
    border-top: 1px solid #00f2ff !important;
}

.template-actions h3 { color: #00f2ff !important; font-family: 'Roboto Mono', monospace; font-size: 1rem; }

.template-card {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(0, 204, 255, 0.2) !important;
    border-radius: 0px !important; /* Estilo Punk: Ángulos rectos */
    position: relative;
    clip-path: polygon(10% 0, 100% 0, 100% 90%, 90% 100%, 0 100%, 0 10%); /* Corte industrial */
    transition: all 0.4s cubic-bezier(0.8, 0, 0.2, 1);
}

.gallery-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Miniaturas más pequeñas y elegantes */
    gap: 25px;
    max-width: 1600px;
    margin: 0 auto;
}

/* --- BLOQUE DE CONTROL PARA ESCRITORIO --- */
@media (min-width: 1025px) {
    .gallery-grid {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important; /* 4 columnas iguales */
        gap: 20px !important;
        width: 95% !important;
        max-width: 1100px !important; /* FRENO TOTAL: No deja que la galería crezca más */
        margin: 40px auto !important;
        justify-content: center !important;
    }

    .template-card {
        background: #0a0e14 !important;
        border: 1px solid #1e293b !important;
        max-width: 260px !important; /* TAMAÑO DE TARJETA MINIATURA */
        margin: 0 auto !important; /* Centra la tarjeta en su columna */
        height: fit-content !important;
    }

    .template-preview {
        height: 150px !important; /* ALTURA COMPACTA */
        width: 100% !important;
        overflow: hidden !important;
        border-bottom: 1px solid #1e293b !important;
    }

    .template-preview img {
        width: 100% !important;
        height: 100% !important;
}

.template-card {
    background: #050a14 !important;
    border: 1px solid rgba(0, 242, 255, 0.3) !important;
    border-radius: 4px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: all 0.4s ease;
    margin: 0 auto;
}

.template-card::before {
    content: "READY FOR DEPLOY";
    position: absolute;
    top: 5px; right: 10px;
    font-family: 'Roboto Mono', monospace;
    font-size: 10px;
    color: #ff003c;
    letter-spacing: 2px;
}

.template-card:hover {
    border-color: #00f2ff !important;
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.4);
    transform: scale(1.03) rotate(1deg);
}

.template-preview {
    border: 1px solid rgba(0, 242, 255, 0.3);
    filter: grayscale(0.5) contrast(1.2);
    transition: all 0.3s;
}

.template-card:hover .template-preview {
    filter: grayscale(0) contrast(1);
}

.template-actions {
    background: rgba(0, 0, 0, 0.8) !important;
    padding: 30px !important;
}

.template-actions h3 {
    color: var(--brand-color) !important;
    font-family: 'Bangers', cursive;
    font-size: 1.8rem !important;
    letter-spacing: 2px;
}

.gallery-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); /* Más columnas por fila */
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-grid {
    display: grid !important;
    /* SISTEMA DE 4 COLUMNAS POR DEFECTO (DESKTOP/LAPTOP) */
    grid-template-columns: repeat(4, 1fr) !important; 
    gap: 20px;
    width: 95%;
    max-width: 1400px;
    margin: 40px auto;
}

/* --- ESTILOS DE FORMULARIO DE ALTA LEGIBILIDAD --- */
#editor-panel {
    background: #0a0f1d !important;
    border: 2px solid #00f2ff !important;
    color: #ffffff !important;
}

.edit-group label {
    color: #00f2ff !important; /* Cian brillante para lectura rápida */
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
}

.edit-group input, 
.edit-group textarea {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(0, 242, 255, 0.4) !important;
    color: #ffffff !important; /* Letras blancas para contraste total */
    padding: 12px !important;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
}

.edit-group input::placeholder, 
.edit-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}
    border: 1px solid rgba(0, 242, 255, 0.2) !important;
    border-radius: 4px !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.4s ease;
}

/* RESPONSIVIDAD DINÁMICA */
@media (max-width: 1200px) {
    .gallery-grid { grid-template-columns: repeat(3, 1fr) !important; } /* Laptops pequeñas */
}

@media (max-width: 1100px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr) !important; } /* Tablets: 2 columnas */
}

@media (max-width: 700px) {
    .gallery-grid { grid-template-columns: 1fr !important; } /* Celulares: 1 columna */
}
    border: 1px solid rgba(0, 242, 255, 0.2) !important;
    border-radius: 4px !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.template-preview {
    width: 100% !important;
    aspect-ratio: 16 / 9 !important; /* Estándar moderno */
    position: relative;
    background: #000;
    overflow: hidden;
    border-bottom: 1px solid rgba(0, 242, 255, 0.3);
    display: block;
    height: 0;
    padding-bottom: 56.25%; /* HACK MATEMÁTICO PARA 16:9 PERFECTO */
}

.template-preview img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover !important; /* Garantiza que la imagen llene el 16:9 */
    object-position: top;
    display: block;
}

.template-card:hover .template-preview img {
    filter: brightness(1.1);
    transform: scale(1.1);
}

/* --- NOTA TÉCNICA APOTEÓSICA --- */
.tech-note {
    text-align: center;
    color: #ffff00 !important; /* AMARILLO PURO */
    font-family: 'Bangers', cursive;
    margin: 40px auto;
    font-size: 1.4rem !important; /* Tamaño más equilibrado y profesional */
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 3px;
    text-shadow: none;
    border-top: 1px solid rgba(255, 215, 0, 0.3);
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    padding: 20px 0;
}
   
.template-card:hover .template-preview img {
    transform: scale(1.08); /* Efecto zoom premium */
}

.template-actions {
    padding: 25px;
    text-align: center;
    background: #fff;
    border-top: 1px solid var(--border-soft);
}

.template-actions h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #00f2ff !important;
    background: #020617 !important;
    overflow-x: hidden;
    line-height: 1.6;
    position: relative;
}

/* --- ATMÓSFERA DE GUERRA: SCANLINES Y GRID --- */
body::before {
    content: ""; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.2) 50%), 
                linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 3px, 2px 100%; z-index: 1000; pointer-events: none; opacity: 0.3;
}

body::after {
    content: ""; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(0, 242, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 242, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px; z-index: -1; animation: gridMove 30s linear infinite;
}

@keyframes gridMove { from { background-position: 0 0; } to { background-position: 0 1000px; } }

/* --- HEADER METÁLICO PESADO --- */
.top-bar {
    background: #050505 !important;
    border-bottom: 2px solid #00f2ff !important;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.3);
}

.main-header { background: transparent !important; }

.nav-link { color: #00f2ff !important; text-shadow: 0 0 5px rgba(0, 242, 255, 0.5); }
.nav-link.active { border-bottom: 3px solid #ff003c !important; color: #fff !important; }

/* ============================================= */
/* ==           PANEL DEL EDITOR              == */
/* ============================================= */
#editor-panel {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 90vw !important;
    max-width: 1000px !important;
    height: 90vh !important;
    z-index: 999999 !important;
    background: #ffffff !important; /* FONDO BLANCO QUIRÚRGICO */
    color: #1e293b !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
    display: none; 
    overflow-y: auto !important;
    padding: 50px !important;
    border-radius: 16px !important;
}

#editor-panel.active { display: block !important; }

/* Ajuste de textos para fondo blanco */
#form-error-msg {
    position: sticky !important;
    top: 0;
    z-index: 1000;
    background: #fff1f2 !important;
    border: 1px solid #fda4af !important;
    color: #991b1b !important;
    padding: 10px !important;
    margin-bottom: 20px !important;
    font-size: 0.8rem !important;
    box-shadow: 0 4px 12px rgba(153, 27, 27, 0.1);
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
#editor-panel label { color: #475569 !important; font-weight: 700; }
#editor-panel input, #editor-panel textarea { 
    background: #f8fafc !important; 
    border: 1px solid #cbd5e1 !important; 
    color: #0f172a !important; 
}

#editor-panel.active {
    display: block !important;
}

/* Bloqueamos el scroll del cuerpo cuando el editor está abierto para que no se mezclen */
body.editor-open {
    overflow: hidden !important;
}

#editor-panel > div {
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 50px; /* Espacio extra al final del formulario */
}

.edit-group label {
    color: #00f2ff !important; /* Texto Cian para máxima legibilidad */
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    text-shadow: none !important;
}

.edit-group label {
    color: #ff003c !important;
    font-family: 'Roboto Mono', monospace;
    text-shadow: 0 0 10px rgba(255, 0, 60, 0.5);
}

.edit-group input, 
.edit-group textarea {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid #334155 !important;
    color: #00f2ff !important;
    border-radius: 0 !important;
    font-family: 'Roboto Mono', monospace;
}

.edit-group input:focus {
    border-color: #00f2ff !important;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.3);
}

/* ============================================= */
/* ==                 BOTONES                 == */
/* ============================================= */
.template-actions {
    background: #020617 !important;
    padding: 15px !important; /* Padding reducido para tarjetas compactas */
    text-align: center;
}

.template-actions h3 { 
    color: #00f2ff !important; 
    font-family: 'Orbitron', sans-serif; 
    font-size: 0.65rem !important; 
    letter-spacing: 1px;
    margin-bottom: 10px;
    height: 25px; 
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}

.btn-choose {
    background: #000 !important;
    color: #FFD700 !important; 
    border: 1px solid #FFD700 !important;
    padding: 10px 15px;
    width: 100%;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 0.75rem; /* Botón más estilizado y pequeño */
    letter-spacing: 2px;
    border-radius: 2px !important;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.1);
}

.btn-choose:hover {
    background: #FFD700 !important;
    color: #000 !important;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.btn-choose:hover {
    transform: translateY(-3px);
    filter: brightness(1.1);
    box-shadow: 0 9px 0 #c0392b;
}

.btn-choose:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 #c0392b;
}

.btn-secondary {
    background: #2D3436;
    color: white;
    padding: 16px 32px;
    border-radius: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
}

/* ============================================= */
/* ==           INCLUSIONES SECTION           == */
/* ============================================= */
.includes-section {
    padding: 100px 5%;
    background: #020617 !important;
    text-align: center;
    border-top: 1px solid rgba(0, 242, 255, 0.2);
    width: 100% !important; /* Blindaje: Ocupa todo el ancho */
    display: block !important; /* Blindaje: No se comporta como item de grid */
    clear: both; /* Limpia cualquier flotación */
}

.killer-close {
    width: 100% !important;
    display: block !important;
    clear: both;
}

.includes-content {
    max-width: 700px;
    margin: 40px auto;
    background: rgba(10, 25, 47, 0.5) !important;
    padding: 40px;
    border: 1px solid #00f2ff !important;
    border-radius: 0 !important;
    text-align: left;
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.1);
    font-family: 'Rajdhani', sans-serif;
    color: #fff !important;
}

.includes-content ul {
    list-style: none;
}

.includes-content li {
    padding: 15px 0;
    border-bottom: 1px solid #f1f1f1;
    font-size: 1.1rem;
}

/* ============================================= */
/* ==           FOOTER KILLER CLOSE           == */
/* ============================================= */
.killer-close {
    background: #050505 !important;
    color: white !important;
    padding: 120px 20px !important;
    text-align: center;
    position: relative;
    overflow: hidden;
    display: block !important;
}

.glitch-text {
    font-family: 'Bangers', cursive;
    font-size: clamp(4rem, 20vw, 10rem);
    color: var(--brand-color);
    text-shadow: 4px 4px 0px var(--vibrant-action);
    margin-bottom: 20px;
    line-height: 1;
}

.convincing-text {
    font-size: 1.4rem;
    font-weight: 300;
    max-width: 700px;
    margin: 0 auto 50px;
    opacity: 0.8;
}

/* ELIMINADO: .big-paypal-btn por redundancia técnica */

/* ============================================= */
/* ==             MODALES DE PAGO             == */
/* ============================================= */
/* ============================================= */
/* ==       BÚNKER DE PAGO ANTI-PARPADEO      == */
/* ============================================= */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.98);
    display: none; /* Se activa con .visible */
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: none !important; /* PROHIBIDO ANIMAR */
    backdrop-filter: none !important; /* A veces el blur retrasa el renderizado */
}

.modal-overlay.visible {
    display: flex !important;
}

.modal-content {
    background: #020617 !important;
    border: 1px solid rgba(0, 242, 255, 0.3) !important;
    color: #ffffff !important;
    padding: 40px 30px !important;
    width: 90% !important;
    max-width: 400px !important; 
    min-height: auto !important;
    text-align: center;
    position: relative;
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.9);
}

.modal-overlay {
    display: none;
    justify-content: center;
    align-items: center;
}

#paypal-actual-button {
    width: 100% !important;
    min-height: 350px !important; /* Espacio reservado para el formulario de tarjeta */
}

/* ESTABILIZADOR ÚNICO DE PAYPAL */
#paypal-actual-button {
    width: 100% !important;
    min-height: 150px !important;
    margin-top: 20px;
    display: block !important;
    overflow: visible !important;
}

/* Blindaje contra el error de escala */
#modal-paypal-container *, .modal-overlay * {
    transition: none !important;
}
/* ============================================= */
/* ==              RESPONSIVIDAD              == */
/* ============================================= */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
}

@media (max-width: 768px) {
    .main-nav { gap: 20px; }
    .nav-link { font-size: 0.85rem; }
    .template-preview { 
        height: auto !important; 
        aspect-ratio: 16 / 9 !important; 
    }
    .intro-section { padding: 40px 20px; }
    .modal-content { padding: 30px; }
}

@media (max-width: 480px) {
    .main-nav { flex-wrap: wrap; }
    .glitch-text { font-size: 3rem; }
    .btn-choose { width: 100%; }
}

#form-error-msg {
    animation: loopitFadeIn 0.3s ease-out;
    box-shadow: 0 4px 10px rgba(153, 27, 27, 0.05);
}

@keyframes loopitFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

#success-notif {
    animation: fadeInScale 0.5s ease-out;
}

#success-notif button:hover {
    background: #27ae60 !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.4);
}
/* SISTEMA DE NOTIFICACIONES TÁCTICAS ROBOTIAX */
#toast-container {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 9999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast-msg {
    background: rgba(10, 25, 47, 0.95);
    color: #ffffff;
    border-left: 4px solid #ff003c; /* Rojo Punk por defecto */
    padding: 15px 25px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    min-width: 300px;
    border-radius: 2px;
    animation: toastSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.toast-msg.success { border-left-color: #2ecc71; }

@keyframes toastSlideIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toastFadeOut {
    to { transform: translateX(120%); opacity: 0; }
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* Ajuste móvil para que no se corte */
@media (max-width: 480px) {
    #success-notif > div {
        padding: 25px !important;
        max-width: 90% !important;
    }
}