@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

@font-face {
    font-family: 'Garnett';
    src: url('https://esim.aeromexico.com/wp-content/themes/aeromexico-esim/fonts/Garnett-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Garnett';
    src: url('https://esim.aeromexico.com/wp-content/themes/aeromexico-esim/fonts/Garnett-Semibold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
}

/* =========================================
   1. RESETEO Y ESTILOS BASE (TRAVEL CONNECTED)
   ========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #e2e8f0;
    font-family: 'Poppins', Arial, Helvetica, sans-serif;
    color: #2b3c5a;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Contenedor principal estilo tarjeta */
.container {
    background-color: #ffffff;
    max-width: 800px;
    width: 100%;
    border-radius: 12px;
    border: 1px solid #d1d9e6;
    box-shadow: 0 10px 25px rgba(26, 42, 68, 0.05);
    overflow: hidden;
}

/* Header */
.header {
    padding: 40px 40px 20px 40px;
    text-align: left;
}
.header img {
    max-width: 260px;
}

/* Hero Section */
.hero {
    display: flex;
    padding: 10px 40px 30px 40px;
    align-items: center;
    justify-content: space-between;
}
.hero-text {
    width: 65%;
}
.hero-text h1 {
    font-size: 26px;
    color: #1a2a44;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 10px;
}
.hero-text p {
    color: #5b6b84;
    font-size: 15px;
    line-height: 1.5;
}
.hero-img {
    width: 30%;
    text-align: right;
}
.hero-img img {
    max-width: 150px;
    border-radius: 12px;
}

/* Sección del Formulario */
.form-section {
    padding: 0 40px 40px 40px;
}
.form-box {
    background-color: #f8fafd;
    border: 1px solid #e1e7ec;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
}
.form-box h2 {
    font-size: 20px;
    color: #1a2a44;
    font-weight: 800;
    margin-bottom: 10px;
}
.form-box p {
    font-size: 14px;
    color: #798fae;
    margin-bottom: 25px;
}

/* Inputs y Botones */
.input-token {
    width: 100%;
    max-width: 400px;
    padding: 15px;
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #1a2a44;
    text-align: center;
    text-transform: none;
    letter-spacing: 0px;
    border: 2px solid #d1d9e6;
    border-radius: 8px;
    margin-bottom: 20px;
    outline: none;
    transition: border-color 0.3s;
}
.input-token:focus {
    border-color: #2a3c5a;
}
.btn-submit {
    background-color: #1a2a44;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 700;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    max-width: 400px;
    transition: background-color 0.3s;
}
.btn-submit:hover {
    background-color: #2b3c5a;
}

/* Footer Legal */
.footer {
    background-color: #2a3c5a;
    padding: 30px 40px;
    text-align: center;
}
.footer p {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 10px;
}
.footer a {
    color: #cbd5e1;
    text-decoration: underline;
}


/* =========================================
   2. ESTRUCTURA DEL SIMULADOR (MOCKUP)
   ========================================= */
.mockup-wrapper { display: flex; min-height: 100vh; width: 100%; flex-wrap: wrap; background-color: #e2e8f0; }
.mockup-main { flex: 1; padding: 20px; display: flex; justify-content: center; align-items: center; }
.mockup-sidebar { width: 320px; background-color: #111827; color: #f3f4f6; padding: 40px 25px; display: flex; flex-direction: column; border-left: 4px solid #374151; }
.mockup-sidebar h3 { font-size: 14px; color: #9ca3af; text-transform: uppercase; margin-bottom: 15px; letter-spacing: 1.5px; font-weight: 700; }
.mockup-sidebar p { font-size: 14px; line-height: 1.6; margin-bottom: 25px; color: #d1d5db; }
.btn-theatrical { background-color: #3b82f6; color: white; border: none; padding: 15px; border-radius: 8px; font-weight: bold; cursor: pointer; text-align: center; text-decoration: none; display: block; transition: background-color 0.3s; }
.btn-theatrical:hover { background-color: #2563eb; }


/* =========================================
   3. ESTILOS PARA LA TIENDA DE RECARGAS
   ========================================= */
.store-header { text-align: center; margin-bottom: 30px; }
.store-header h2 { color: #1a2a44; font-size: 28px; font-weight: 800; }
.store-header p { color: #5b6b84; font-size: 15px; }

.grid-paquetes { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; width: 100%; max-width: 900px; margin: 0 auto; }

.tarjeta-plan { background: white; border: 1px solid #d1d9e6; border-radius: 12px; padding: 20px; text-align: center; display: flex; flex-direction: column; justify-content: center; height: 220px; transition: transform 0.2s, box-shadow 0.2s; position: relative; overflow: hidden;}
.tarjeta-activa { cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.tarjeta-activa:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(26,42,68,0.1); border-color: #1a2a44; }
.icono-region { font-size: 45px; margin-bottom: 10px; }
.plan-nombre { font-size: 18px; font-weight: 800; color: #1a2a44; margin: 0 0 5px 0; text-transform: uppercase; }
.plan-datos { font-size: 14px; font-weight: 600; color: #5b6b84; margin-bottom: 5px; }
.plan-precio { font-size: 20px; font-weight: 800; color: #10b981; margin-top: auto; }

.tarjeta-inactiva { background: #f8fafd; opacity: 0.6; cursor: not-allowed; filter: grayscale(50%); }
.tarjeta-inactiva .plan-nombre { color: #9ca3af; }


/* =========================================
   4. MODALES, ANIMACIONES Y CORREO
   ========================================= */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(17, 24, 39, 0.85); display: none; z-index: 1000; }

.modal-content { 
    background: white; 
    padding: 35px; 
    border-radius: 12px; 
    width: 90%; 
    max-width: 450px; 
    text-align: center; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.3); 
    position: absolute; 
    max-height: 90vh; 
    overflow-y: auto; 
}
.close-modal { position: absolute; top: 15px; right: 20px; font-size: 24px; cursor: pointer; color: #9ca3af; border: none; background: none;}
.close-modal:hover { color: #1a2a44; }

.pos-top-left { position: absolute; top: 10%; left: 10%; }
.pos-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); max-width: 600px !important; width: 90%; }

.fade-in { animation: fadeIn 0.6s forwards ease-out; }
.fade-out { animation: fadeOut 0.5s forwards ease-in; }
.fade-in-center { animation: fadeInCenter 0.5s forwards ease-out; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(15px); }
}
@keyframes fadeInCenter {
    from { opacity: 0; transform: translate(-50%, -45%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

.email-recorte { background-color: #f8fafd; border: 1px solid #e1e7ec; border-radius: 8px; padding: 20px; margin: 20px 0; position: relative; overflow: hidden; box-shadow: inset 0 2px 10px rgba(0,0,0,0.02);}
.qr-mitad { width: 180px; height: 60px; background-position: bottom; background-size: 180px; margin: 0 auto 15px auto; border-left: 2px solid #ccc; border-right: 2px solid #ccc; border-bottom: 2px solid #ccc; opacity: 0.8;}
.numero-destacado { background-color: #e2e8f0; color: #1a2a44; font-family: 'Poppins', sans-serif; font-size: 18px; font-weight: 800; padding: 10px 15px; border-radius: 6px; letter-spacing: 1px; display: inline-block; word-break: break-all; margin-bottom: 5px;}

/* Detalles de Plan en Modal */
.amx-detalles-plan { text-align: left; background: #f8fafd; border: 1px solid #e1e7ec; border-radius: 8px; padding: 20px; margin-bottom: 20px; }
.amx-tit-pais { font-size: 13px; font-weight: 700; color: #1a2a44; margin: 0 0 10px 0; }
.amx-lista-pais { list-style: none; padding: 0; margin: 0 0 15px 0; display: flex; flex-wrap: wrap; gap: 10px; }
.amx-lista-pais li { font-size: 13px; color: #5b6b84; background: white; padding: 5px 10px; border-radius: 4px; border: 1px solid #d1d9e6; }
.amx-linea { border: 0; border-top: 1px solid #d1d9e6; margin: 15px 0; }
.amx-txt-regla { font-size: 12px; color: #798fae; line-height: 1.5; margin: 0 0 10px 0; }


/* =========================================
   5. ESTILOS PARA EL CHECKOUT (PAGO.PHP)
   ========================================= */
.checkout-container { display: flex; flex-wrap: wrap; gap: 30px; max-width: 900px; margin: 0 auto; background: #fff; padding: 40px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); border: 1px solid #d1d9e6; }
.order-summary { flex: 1; min-width: 250px; background: #f8fafd; padding: 25px; border-radius: 8px; border: 1px solid #e1e7ec; }
.payment-form { flex: 1.5; min-width: 250px; }
.summary-item { display: flex; justify-content: space-between; margin-bottom: 15px; font-size: 14px; color: #5b6b84; }
.summary-total { display: flex; justify-content: space-between; font-size: 18px; font-weight: 800; color: #1a2a44; border-top: 1px solid #d1d9e6; padding-top: 15px; margin-top: 15px; }
.input-group { margin-bottom: 20px; text-align: left; }
.input-group label { display: block; font-size: 13px; color: #1a2a44; font-weight: 700; margin-bottom: 8px; }
.input-group input { width: 100%; padding: 12px; border: 1px solid #d1d9e6; border-radius: 6px; font-family: 'Poppins', sans-serif; font-size: 15px; }
.flex-row { display: flex; gap: 15px; }


/* =========================================
   6. AJUSTES RESPONSIVOS Y PLACEHOLDER FIX
   ========================================= */
@media screen and (max-width: 900px) {
    .mockup-wrapper { flex-direction: column; }
    .mockup-sidebar { width: 100%; border-left: none; border-top: 4px solid #374151; order: 2; }
    .mockup-main { order: 1; padding-bottom: 40px; }
    .pos-top-left { top: 50%; left: 50%; transform: translate(-50%, -50%); }
}

@media screen and (max-width: 768px) {
    .checkout-container { flex-direction: column; padding: 20px; gap: 20px; }
    .flex-row { flex-direction: column; gap: 0; } 
}

@media screen and (max-width: 600px) {
    .hero { flex-direction: column; text-align: center; }
    .hero-text { width: 100%; margin-bottom: 20px; }
    .hero-img { width: 100%; text-align: center; }
    .header { text-align: center; }
    
    /* FIX DE LOS PLACEHOLDERS PARA QUE NO SE SALGAN EN MÓVIL */
    .input-token {
        font-size: 14px !important;
        letter-spacing: 0.5px !important;
        padding: 12px 10px !important;
    }
    .input-token::placeholder {
        font-size: 13px !important;
        letter-spacing: 0 !important;
    }
}


/* =========================================
   7. TEMA AEROMÉXICO (OVERRIDES)
   ========================================= */
/* Aplicamos la familia tipográfica requerida y fondo claro */
body.theme-amx { 
    background-color: #f4f5f7; 
    font-family: 'Garnett', Arial, Helvetica, sans-serif !important; 
}
body.theme-amx .container,
body.theme-amx .email-client { border-color: #d1d9e6; }

/* Fondo oscuro para el encabezado y texto BLANCO para el contraste */
body.theme-amx .header, 
body.theme-amx .store-header { 
    background-color: #0b2343 !important; 
    border-radius: 12px; 
}
body.theme-amx .header h1,
body.theme-amx .store-header h2,
body.theme-amx .header p,
body.theme-amx .store-header p {
    color: #ffffff !important;
}

/* Uso de #fa0073 para botones y resaltes (Sin mayúsculas) */
body.theme-amx .btn-submit,
body.theme-amx .btn-theatrical { 
    background-color: #fa0073 !important; 
    color: #FFFFFF !important; 
    border-radius: 6px !important; 
    font-family: 'Garnett', Arial, Helvetica, sans-serif !important;
    text-transform: none !important;
    font-weight: 400 !important;
}
body.theme-amx .btn-submit:hover,
body.theme-amx .btn-theatrical:hover { 
    background-color: #d1005f !important; /* Rojo un poco más oscuro al pasar el mouse */
}

/* Tipografía e Inputs Theme AMX */
body.theme-amx .input-token { 
    font-family: 'Garnett', Arial, Helvetica, sans-serif !important; 
    border-radius: 6px !important; 
}
body.theme-amx .form-box h2,
body.theme-amx h2, 
body.theme-amx h3 { 
    color: #0b2343 !important; 
    font-family: 'Garnett', Arial, Helvetica, sans-serif !important;
}
body.theme-amx .hero-text p { color: #4a5568; }

/* Tarjetas y Tienda: Acentos en #fa0073 y sin uppercase */
body.theme-amx .tarjeta-activa:hover { 
    border-color: #fa0073 !important; 
    box-shadow: 0 10px 20px rgba(250, 0, 115, 0.1) !important;
}
body.theme-amx .plan-precio { 
    color: #fa0073 !important; 
}
body.theme-amx .plan-nombre { 
    color: #0b2343 !important;
    text-transform: none !important; /* Adiós a las mayúsculas */
    font-size: 20px !important;
}
body.theme-amx .badge-proximamente { 
    background: #fa0073 !important; 
    text-transform: none !important;
}

/* Panel Lateral y Footer AMX */
body.theme-amx .mockup-sidebar { background-color: #0b2343; border-left-color: #fa0073; }
body.theme-amx .footer { background-color: transparent; border-top: none; }
body.theme-amx .footer p { color: #808080; }
body.theme-amx .footer a { color: #fa0073; }

/* =========================================
   8. SIMULADOR DE CLIENTE DE CORREO
   ========================================= */
.email-client { background: #fff; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); width: 100%; max-width: 800px; overflow: hidden; border: 1px solid #d1d9e6; }
.email-header { background: #f8fafd; border-bottom: 1px solid #e1e7ec; padding: 20px; text-align: left; }
.email-header h4 { margin: 0 0 5px 0; color: #1a2a44; font-size: 18px; }
.email-meta { font-size: 13px; color: #5b6b84; }
.email-meta span { display: inline-block; margin-bottom: 5px; }
.email-content { padding: 0; background-color: #e2e8f0; }
.email-content table { border-collapse: collapse !important; }
.email-content img { -ms-interpolation-mode: bicubic; border: 0; height: auto; line-height: 100%; outline: none; text-decoration: none; }

@media screen and (max-width: 600px) {
    .mobile-full { width: 100% !important; display: block !important; box-sizing: border-box !important; }
    .mobile-center { text-align: center !important; }
    .mobile-hide { display: none !important; }
    .mobile-pad { padding: 20px !important; box-sizing: border-box !important; }
    .step-box { width: 100% !important; margin-bottom: 20px !important; display: block !important; box-sizing: border-box !important; }
    .card-spacer { height: 15px !important; display: block !important; }
}


/* =========================================
   ESTILOS EXCLUSIVOS DEL INDEX
   ========================================= */
.intro-box { background: #fff; padding: 40px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); border: 1px solid #d1d9e6; max-width: 700px; margin: 0 auto; text-align: left; }
.intro-box h1 { color: #1a2a44; font-size: 26px; font-weight: 600; margin-bottom: 15px; text-align: center; }
.intro-box p { color: #5b6b84; font-size: 15px; line-height: 1.6; margin-bottom: 20px; }
.intro-list { list-style: none; padding: 0; margin: 0 0 30px 0; }
.intro-list li { margin-bottom: 15px; padding-left: 30px; position: relative; font-size: 14px; color: #1a2a44; }
.intro-list li::before { content: '✈️'; position: absolute; left: 0; top: -2px; font-size: 16px; }

/* Estilos del Switcher de Tema */
.theme-switcher { background: rgba(255,255,255,0.1); padding: 15px; border-radius: 8px; margin-bottom: 25px; border: 1px solid rgba(255,255,255,0.2); }
.theme-switcher label { display: block; font-size: 12px; color: #9ca3af; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }
.theme-switcher select { width: 100%; padding: 10px; border-radius: 6px; border: none; font-family: 'Poppins', sans-serif; font-size: 14px; color: #1a2a44; font-weight: 600; cursor: pointer; outline: none; }

/* =========================================
   ESTILOS PARA LOGIN Y AUTENTICACIÓN (SSO)
   ========================================= */
.btn-sso { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    width: 100%; 
    max-width: 400px; 
    margin: 0 auto 15px auto;
    padding: 12px 20px; 
    border-radius: 8px; 
    font-family: 'Poppins', Arial, sans-serif; 
    font-size: 15px; 
    font-weight: 600; 
    cursor: pointer; 
    transition: opacity 0.3s, box-shadow 0.3s; 
    text-decoration: none; 
    border: 1px solid #d1d9e6; 
}
.btn-sso:hover { box-shadow: 0 4px 10px rgba(0,0,0,0.08); }
.btn-sso img { width: 20px; height: 20px; margin-right: 12px; }

.btn-google { background-color: #ffffff; color: #3c4043; }
.btn-apple { background-color: #000000; color: #ffffff; border-color: #000000; }

.spinner { 
    border: 4px solid rgba(0,0,0,0.1); 
    width: 60px; 
    height: 60px; 
    border-radius: 50%; 
    border-left-color: #1a2a44; 
    animation: spin 1s linear infinite; 
    margin: 30px auto; 
}
@keyframes spin { 
    0% { transform: rotate(0deg); } 
    100% { transform: rotate(360deg); } 
}

/* Compatibilidad con Tema Aeroméxico */
body.theme-amx .btn-sso { font-family: 'Garnett', Arial, Helvetica, sans-serif !important; border-radius: 6px; }
body.theme-amx .spinner { border-left-color: #fa0073 !important; }