/* ==========================================================================
   ESTILOS EXCLUSIVOS: PASO 4 REVISADO (15 Colores del Filtro de Tienda)
   ========================================================================== */

.cg-step[data-step="4"] h2 {
    font-size: 36px;
    font-weight: 700;
    color: #0c1a30;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.cg-step[data-step="4"] .cg-subtitle {
    font-size: 15px;
    color: #64748b;
    margin-bottom: 25px;
}

/* Rejilla cuadriculada compacta de 4 columnas */
.cg-grid-options-step4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 30px;
}

/* Tarjeta de opción */
.cg-step[data-step="4"] .cg-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 8px;
    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%;
}

/* Contenedor optimizado para muestras de acabado de color */
.cg-step[data-step="4"] .cg-card-image-wrapper {
    width: 100%;
    height: 95px;
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 8px;
    background: #f1f5f9;
}

.cg-step[data-step="4"] .cg-card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Efecto hover sutil para sobremesa */
.cg-step[data-step="4"] .cg-card:hover .cg-card-image-wrapper img {
    transform: scale(1.05);
}

.cg-step[data-step="4"] .cg-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    display: block;
    text-align: center;
    padding: 2px 0;
}

/* Estado de Selección */
.cg-step[data-step="4"] .cg-card.selected {
    border: 2px solid #0054a6;
    box-shadow: 0 0 0 1px #0054a6;
}

.cg-step[data-step="4"] .cg-check-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: #0054a6;
    color: #ffffff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 5;
}

/* Tarjeta Comodín: Not Sure */
.cg-card-not-sure-step4 {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 139px; /* Alineación base por defecto */
    border-style: dashed !important;
    background: #f8fafc !important;
    border-radius: 6px;
}

.cg-not-sure-step4-content {
    text-align: center;
    padding: 10px 5px;
}

.cg-not-sure-step4-sub {
    font-size: 11px;
    color: #64748b;
    margin: 2px 0 0 0;
}

/* Botonera de navegación */
.cg-navigation-step4 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 15px;
}


/* ============================================================
   REDISEÑO MÓVIL: PASO 5 - CUADRÍCULA DOBLE PARA COLORES
   ============================================================ */
@media (max-width: 768px) {
    /* Cuadrícula de 2 columnas perfectas en móviles */
    .cg-grid-options-step4 {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        margin-bottom: 25px !important;
        width: 100% !important;
    }

    /* Rediseño estilizado de la tarjeta en móvil */
    .cg-step[data-step="4"] .cg-card {
        padding: 8px !important;
        border-radius: 12px !important;
        height: auto !important;
    }

    /* Ajuste de los recuadros de muestras de color */
    .cg-step[data-step="4"] .cg-card-image-wrapper {
        height: 105px !important; /* Altura ideal en pantalla móvil */
        border-radius: 8px !important;
        margin-bottom: 6px !important;
    }

    /* Desactivar escala al pulsar en pantallas táctiles */
    .cg-step[data-step="4"] .cg-card:hover .cg-card-image-wrapper img {
        transform: none !important;
    }

    /* Tipografía compacta y limpia */
    .cg-step[data-step="4"] .cg-card-title {
        font-size: 13px !important;
        font-weight: 700 !important;
        padding: 4px 0 !important;
    }

    /* Reposicionamiento del badge de verificación */
    .cg-step[data-step="4"] .cg-check-badge {
        bottom: 8px !important;
        right: 8px !important;
        width: 16px !important;
        height: 16px !important;
        font-size: 9px !important;
    }

    /* Ajuste exacto para que la tarjeta "Not Sure" mida lo mismo que las de color */
    .cg-card-not-sure-step4 {
        min-height: 145px !important;
        border-radius: 12px !important;
    }
    
    .cg-not-sure-step4-content {
        padding: 15px 5px !important;
    }
}