/* ========================
   ESTILOS GENERALES
   ======================== */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f6f9;
    color: #333;
    -webkit-font-smoothing: antialiased;
}

/* Header */
header {
    background: #000;
    padding: 15px 50px;
    display: flex;
    align-items: center;
    gap: 25px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    position: relative;
    z-index: 100;
}
.logo { height: 60px; }

/* Breadcrumb */
.breadcrumb {
    display: flex; align-items: center; gap: 10px;
    font-family: 'Share Tech Mono', monospace;
    color: #fff; font-size: 18px; text-transform: uppercase;
    flex-wrap: wrap;
}

/* --- CORRECCIÓN DE ÍCONO CASA (Estilo Planes) --- */
.home-link { display: inline-block; transition: none; }

.home-icon {
    width: 34px;
    height: 34px;
    /* Quitamos el invert. Dejamos solo el brillo morado */
    filter: drop-shadow(0 0 10px rgba(160, 32, 240, 0.8)); 
    transition: all 0.35s ease;
}

.home-link:hover .home-icon {
    /* Animación de giro y escala (Igual que en Planes) */
    transform: scale(1.3) rotate(-12deg);
    filter: drop-shadow(0 0 22px #a020f0);
}
/* ------------------------------------------------ */

.link-nav { color: #fff; text-decoration: none; transition: 0.3s; }
.link-nav:hover { color: #a020f0; text-shadow: 0 0 10px #a020f0; }
.current-page { color: #a020f0; font-weight: bold; border-bottom: 2px solid #a020f0; }
.separator { color: #666; }

/* ========================
   LAYOUT PRINCIPAL
   ======================== */
.checkout-container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 2fr; /* Columna Izq (Resumen) - Der (Formulario) */
    gap: 40px;
    align-items: start;
}

h2, h3, h4 {
    font-family: 'Share Tech Mono', monospace;
    text-transform: uppercase;
    color: #222;
}

/* ========================
   SECCIÓN RESUMEN (IZQUIERDA)
   ======================== */
.resumen-compra h2 { margin-bottom: 20px; font-size: 1.5rem; color: #a020f0; }

/* Por defecto (Móvil) es estático */
.resumen-compra { position: static; }

.tarjeta-resumen {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border-top: 5px solid #a020f0;
}
.tarjeta-resumen h3 { font-size: 1.8rem; margin-bottom: 10px; }
.precio-resumen { font-size: 2.2rem; color: #a020f0; font-weight: bold; margin-bottom: 20px; font-family: 'Share Tech Mono', monospace; }

.lista-items { list-style: none; margin-bottom: 20px; border-bottom: 1px solid #eee; padding-bottom: 20px; }
.lista-items li { margin-bottom: 8px; font-size: 0.95rem; color: #555; line-height: 1.4; }
.lista-items li::before { content: "• "; color: #a020f0; font-weight: bold; }

.total-row { display: flex; justify-content: space-between; font-weight: bold; font-size: 1.2rem; color: #000; }

/* --- STICKY SOLO EN PC --- */
@media (min-width: 901px) {
    .resumen-compra {
        position: sticky;
        top: 30px;
        height: fit-content;
    }
}

/* ========================
   SECCIÓN FORMULARIO (DERECHA)
   ======================== */
.datos-cliente h2 { margin-bottom: 5px; font-size: 2rem; }
.subtitulo-form { margin-bottom: 30px; color: #666; }

.seccion-form {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    margin-bottom: 25px;
    border: 1px solid #eee;
}
.seccion-form h4 { margin-bottom: 20px; color: #a020f0; border-bottom: 1px solid #eee; padding-bottom: 10px; font-size: 1.2rem; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.input-group { margin-bottom: 15px; display: flex; flex-direction: column; }

label { font-size: 0.9rem; font-weight: bold; margin-bottom: 8px; color: #444; }

input, select {
    padding: 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px; 
    transition: all 0.3s;
    outline: none;
    background: #fafafa;
    width: 100%;
}
input:focus, select:focus {
    border-color: #a020f0;
    background: #fff;
    box-shadow: 0 0 8px rgba(160, 32, 240, 0.2);
}

.bancaria { border: 1px solid #a020f0; background: #fdfaff; }
.nota-seguridad { font-size: 0.85rem; color: #27ae60; margin-bottom: 15px; font-weight: bold; }

.btn-contratar {
    width: 100%;
    padding: 20px;
    background: #000;
    color: #fff;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    text-transform: uppercase;
    letter-spacing: 2px;
}
.btn-contratar:hover {
    background: #a020f0;
    box-shadow: 0 8px 20px rgba(160, 32, 240, 0.4);
    transform: translateY(-2px);
}

/* ========================
   ESTILOS PAQUETE PERSONALIZADO
   ======================== */
.grid-opciones {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}
.opcion-card {
    background: #fff; border: 2px solid #ddd; border-radius: 8px;
    padding: 15px; cursor: pointer; transition: all 0.3s;
    display: flex; align-items: center; gap: 10px;
    font-size: 0.95rem; color: #555; user-select: none;
    min-height: 80px;
}
.opcion-card > div { display: flex; flex-direction: column; } /* PC: Texto arriba, precio abajo */

.opcion-card:hover { border-color: #a020f0; box-shadow: 0 4px 10px rgba(160, 32, 240, 0.15); }
.opcion-card input[type="checkbox"] { accent-color: #a020f0; transform: scale(1.3); min-width: 20px; }
.opcion-card.seleccionada {
    border-color: #a020f0; background-color: #fdfaff; font-weight: bold; color: #a020f0;
}
.precio-item { display: block; font-size: 0.8em; color: #888; margin-top: 4px; }

/* ========================
   MODAL
   ======================== */
.hidden { display: none !important; }
.overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
    display: flex; justify-content: center; align-items: center;
    padding: 20px;
}
.modal-content {
    background: #fff; padding: 40px 20px; border-radius: 15px;
    text-align: center; max-width: 500px; width: 100%;
    box-shadow: 0 0 30px rgba(160, 32, 240, 0.5);
    animation: slideUp 0.4s ease;
}
@keyframes slideUp { from { transform: translateY(50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.spinner {
    border: 5px solid #f3f3f3; border-top: 5px solid #a020f0;
    border-radius: 50%; width: 50px; height: 50px;
    animation: spin 1s linear infinite; margin: 0 auto 20px;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.icono-exito {
    font-size: 3.5rem; color: #fff; background: #27ae60;
    width: 80px; height: 80px; line-height: 80px;
    border-radius: 50%; margin: 0 auto 20px;
}
.mensaje-final { color: #555; line-height: 1.6; margin: 20px 0; font-size: 1.1rem; }
.btn-volver {
    display: inline-block; padding: 12px 30px;
    background: #a020f0; color: #fff; text-decoration: none;
    border-radius: 5px; font-weight: bold; margin-top: 15px;
}

/* =======================================================
   RESPONSIVE DESIGN (MÓVIL Y TABLET)
   ======================================================= */

@media (max-width: 900px) {
    .checkout-container {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 10px;
    }
    .resumen-compra {
        order: -1; 
        position: static !important; /* Desactiva el sticky */
        margin-bottom: 10px;
    }
    header { padding: 15px 20px; flex-direction: column; gap: 15px; }
    .breadcrumb { font-size: 14px; justify-content: center; }
    .datos-cliente h2 { font-size: 1.8rem; text-align: center; }
    .subtitulo-form { text-align: center; font-size: 0.9rem; }
}

@media (max-width: 600px) {
    /* CELULARES (Portrait) */
    .grid-2 { grid-template-columns: 1fr; gap: 15px; }
    .seccion-form, .tarjeta-resumen { padding: 20px; }
    .logo { height: 50px; }
    
    /* Lista de opciones más limpia */
    .grid-opciones {
        grid-template-columns: 1fr; 
        gap: 10px;
    }
    .opcion-card {
        min-height: auto;
        padding: 12px 15px;
        flex-direction: row; 
        justify-content: flex-start;
    }
    .opcion-card > div {
        display: flex; 
        flex-direction: row; 
        justify-content: space-between; 
        width: 100%;
        align-items: center;
        margin-left: 10px;
    }
    .precio-item {
        margin-top: 0;
        font-weight: bold;
        color: #a020f0;
    }
    
    .btn-contratar { font-size: 1.3rem; padding: 15px; }
}