/* ==========================================================================
   ESTILOS EXCLUSIVOS: PASO 2 (What door style do you like?)
   ========================================================================== */

.cg-step[data-step="2"] h2 {
    font-size: 36px;
    font-weight: 700;
    color: #0c1a30;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.cg-step[data-step="2"] .cg-subtitle {
    font-size: 15px;
    color: #64748b;
    margin-bottom: 25px;
}

/* Rejilla de 4 columnas para que se acomoden de forma equilibrada */
.cg-grid-options-step2 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

/* Tarjetas */
.cg-step[data-step="2"] .cg-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 12px;
    cursor: pointer;
    position: relative;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

/* Manejo de imágenes internas */
.cg-step[data-step="2"] .cg-card-image-wrapper {
    width: 100%;
    height: 250px;           /* ◄--- Aumentamos a 250px para que quepa el rectángulo vertical */
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 12px;
    background: #ffffff;     /* ◄--- Cambiado a blanco para que los lados de la puerta se integren limpio con la tarjeta */
    display: flex;           /* ◄--- Centra la puerta vertical y horizontalmente */
    align-items: center;
    justify-content: center;
    padding: 8px;            /* ◄--- Le da un pequeño margen interno para que la puerta respire y no toque los bordes */
    box-sizing: border-box;  /* ◄--- Evita que el padding rompa el tamaño de la tarjeta */
}

.cg-step[data-step="2"] .cg-card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;     /* ◄--- ¡LA CLAVE! Cambiado de 'cover' a 'contain' para mostrar la puerta entera sin cortes */
    transition: transform 0.4s ease-in-out;
    display: block;
}

/* Efecto de Zoom tipo WooCommerce al pasar el mouse sobre la tarjeta */
.cg-step[data-step="2"] .cg-card:hover .cg-card-image-wrapper img {
    transform: scale(1.12); /* Agranda la imagen sutilmente de forma elegante */
}

.cg-step[data-step="2"] .cg-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    display: block;
    text-align: center;
    padding: 4px 0;
}

/* Estado Seleccionado */
.cg-step[data-step="2"] .cg-card.selected {
    border: 2px solid #0054a6;
    box-shadow: 0 0 0 1px #0054a6;
}

.cg-step[data-step="2"] .cg-check-badge {
    position: absolute;
    bottom: 14px;
    right: 14px;
    background: #0054a6;
    color: #ffffff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 5;
}

/* Tarjeta especial: Not Sure */
.cg-card-not-sure {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%; 
    min-height: 250px;
    border-style: dashed !important; /* Estilo de borde discontinuo igual a la imagen */
    background: #f8fafc !important;
}

.cg-not-sure-content {
    text-align: center;
    padding: 20px 10px;
}

.cg-headset-icon {
    margin-bottom: 8px;
    color: #64748b;
}

.cg-not-sure-sub {
    font-size: 12px;
    color: #64748b;
    margin: 2px 0 0 0;
}

/* Botonera inferior alineada a los extremos */
.cg-navigation-step2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 20px;
}


/* ============================================================
   REDISEÑO MÓVIL: PASO 4 - CUADRÍCULA DOBLE DE ESTILOS DE PUERTA
   ============================================================ */
@media (max-width: 768px) {
    /* Forzamos la cuadrícula de 2 columnas en teléfonos */
    .cg-grid-options-step2 {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        margin-bottom: 25px !important;
        width: 100% !important;
    }

    /* Ajuste fino de la tarjeta para encajar a la par */
    .cg-step[data-step="2"] .cg-card {
        padding: 10px !important;
        border-radius: 12px !important;
        height: auto !important; /* Deja que la altura se calcule de forma natural */
        box-shadow: 0 2px 6px rgba(0,0,0,0.03) !important;
    }

    /* Corrección del contenedor de la imagen en móvil */
    .cg-step[data-step="2"] .cg-card-image-wrapper {
        height: 140px !important; /* Forzamos una altura vertical ideal para móvil */
        padding: 6px !important;
        margin-bottom: 8px !important;
        background: #f8fafc !important; /* Le da un fondo gris sutil de fondo al preview */
    }

    /* Aseguramos que la puerta se renderice grande y completa dentro del espacio */
    .cg-step[data-step="2"] .cg-card-image-wrapper img {
        width: auto !important;
        height: 100% !important;
        max-width: 100% !important;
        object-fit: contain !important;
    }

    /* Desactivamos el zoom exagerado en móviles al presionar con el dedo */
    .cg-step[data-step="2"] .cg-card:hover .cg-card-image-wrapper img {
        transform: none !important;
    }

    /* Títulos legibles y centrados */
    .cg-step[data-step="2"] .cg-card-title {
        font-size: 13px !important;
        font-weight: 700 !important;
        line-height: 1.3 !important;
        padding: 2px 0 !important;
    }

    /* Reubicación y escala del check badge en móvil */
    .cg-step[data-step="2"] .cg-check-badge {
        bottom: 8px !important;
        right: 8px !important;
        width: 18px !important;
        height: 18px !important;
        font-size: 10px !important;
    }

    /* Adaptación de la tarjeta "Not Sure" para que mida lo mismo */
    .cg-card-not-sure {
        min-height: 195px !important; /* Mismo tamaño promedio de las de arriba */
    }
}