/**
 * Estilos para Láminas Decorativas
 * Interfaz simplificada para productos de láminas
 */

/* Información del producto */
.producto-info-lamina {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.producto-info-lamina h1 {
    color: #333;
    font-size: 2em;
    margin-bottom: 10px;
}

.producto-info-lamina .product-short-description {
    color: #666;
    font-size: 1.1em;
    line-height: 1.6;
}

/* Wrapper principal */
.lamina-decorativa-wrapper {
    margin: 20px 0;
}

/* Ocultar interfaz principal cuando es lámina */
.single-product .lamina-decorativa-wrapper ~ .editor_product {
    display: none !important;
}

/* Ajustes para usar la vista previa existente */
.lamina-decorativa-wrapper + .woocommerce-product-gallery {
    display: block !important;
}

/* Ocultar duplicados de descripción */
.woocommerce-tabs {
    display: none;
}

/* Pasos de navegación */
.pasos-lamina {
    margin-bottom: 30px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

.btn_step_lamina {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 10px;
    text-decoration: none;
    color: #666;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: white;
    cursor: pointer;
    min-height: 100px;
}

.btn_step_lamina:hover {
    border-color: #007cba;
    color: #007cba;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-decoration: none;
}

.btn_step_lamina.stepon {
    border-color: #007cba;
    background: #007cba;
    color: white;
}

.btn_step_lamina img {
    width: 30px;
    height: 30px;
    margin-bottom: 8px;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.btn_step_lamina.stepon img {
    filter: grayscale(0%) brightness(0) invert(1);
}

.btn_step_lamina p {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: #333; /* Cambiado a negro */
}

.btn_step_lamina.stepon p {
    color: white; /* Mantener blanco cuando está activo */
}

/* Contenedor de opciones */
.opciones-lamina {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 30px;
}

.paso-lamina {
    animation: fadeIn 0.5s ease;
}

.paso-lamina h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.5em;
}

.paso-lamina p {
    color: #666;
    margin-bottom: 30px;
}

/* Grid de tamaños */
.tamanos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.tamano-option {
    text-align: center;
    cursor: pointer;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: white;
}

.tamano-option:hover {
    border-color: #007cba;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.tamano-option.selected {
    border-color: #007cba;
    background: #f0f8ff;
}

.tamano-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

.tamano-box {
    background: #f0f0f0;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: #666;
}

.tamano-label {
    font-weight: 500;
    color: #333;
}

/* Grid de marcos */
.marcos-grid,
.passe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.marco-option,
.passe-option {
    cursor: pointer;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: white;
    text-align: center;
}

.marco-option:hover,
.passe-option:hover {
    border-color: #007cba;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.marco-option.selected,
.passe-option.selected {
    border-color: #007cba;
    background: #f0f8ff;
}

.marco-visual {
    margin: 0 auto 10px;
    border-style: solid;
    border-color: #333;
}

.passe-visual img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 10px;
}

.marco-label,
.passe-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 10px;
}

/* Variaciones */
.marco-variaciones,
.passe-variaciones {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.variaciones-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.var-option {
    padding: 5px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    display: inline-block;
}

.var-option:hover {
    border-color: #007cba;
    background: #f0f8ff;
}

.var-option.selected {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

/* Vista previa del paso 4 */
.preview-container {
    text-align: center;
}

.loading-lamina {
    padding: 40px;
}

.loading-lamina img {
    width: 50px;
    height: 50px;
}

/* Precio */
.precio-lamina {
    margin-top: 20px;
    padding: 20px;
    background: #e8f5e8;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

/* Alertas */
.alerta,
#alerta-dinamica-lamina {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
    font-size: 14px;
    line-height: 1.5;
}

/* Botones de navegación */
.btn-siguiente-lamina,
.btn-anterior-lamina {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
    text-decoration: none !important;
}

.btn-siguiente-lamina {
    background: #007cba;
    color: white !important;
}

.btn-siguiente-lamina:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    color: white !important;
    text-decoration: none !important;
}

.btn-anterior-lamina {
    background: #6c757d;
    color: white !important;
}

.btn-anterior-lamina:hover {
    background: #5a6268;
    color: white !important;
    text-decoration: none !important;
}

/* Estilos para el precio */
.precio-lamina .row {
    margin-bottom: 8px;
}

.precio-lamina strong {
    color: #28a745;
}

/* Responsive */
@media (max-width: 768px) {
    .tamanos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .marcos-grid,
    .passe-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .tamano-box {
        width: 40px !important;
        height: 53px !important;
        font-size: 10px;
    }
    
    .btn_step_lamina {
        min-height: 80px;
        padding: 10px 5px;
    }
    
    .btn_step_lamina img {
        width: 20px;
        height: 20px;
    }
    
    .btn_step_lamina p {
        font-size: 11px;
    }
    
    .marco-visual {
        width: 60px !important;
        height: 60px !important;
        border-width: 10px !important;
    }
    
    .lamina-preview-container {
        padding: 15px;
    }
    
    .lamina-preview-container .areaprev {
        min-height: 300px;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utilidades */
.d-none {
    display: none !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.text-center {
    text-align: center !important;
}

/* Fix para la vista previa */
.representacio {
    display: inline-block;
    background: #f0f0f0;
}

.representacio.byw img {
    filter: grayscale(100%);
}

/* Fix para que la imagen de la lámina se ajuste correctamente */
#preview-lamina {
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}