/* Estilos para el frontend de WooCommerce Product Specs */

/* Grid de especificaciones */
.wps-specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 10px;
    padding: 0;
    margin: 0 !important; /* Sin márgenes */
    max-width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.wps-specs-grid > div {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
    transition: transform 0.2s ease;
}

.wps-specs-grid > div:hover {
    transform: translateX(3px);
}

.wps-specs-grid svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    fill: #252AA5;
}

/* Sección de materiales */
.wps-materials-section {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 0;
}

.wps-materials-section h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
    margin-top: 0;
}

.wps-materials-section > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wps-materials-section span {
    display: inline-block;
    padding: 4px 12px;
    background-color: transparent;
    border: 1px solid #252AA5;
    border-radius: 15px;
    font-size: 13px;
    color: #333;
    white-space: nowrap;
    font-weight: 400;
    transition: all 0.3s ease;
    cursor: default;
}

.wps-materials-section span:hover {
    background-color: #252AA5;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

/* Responsive para tablets */
@media screen and (max-width: 768px) {
    .wps-specs-container h2 {
        font-size: 24px !important;
    }
    
    .wps-specs-list > div {
        font-size: 15px !important;
    }
    
    .wps-specs-container {
        padding: 15px 20px !important;
    }
}

/* Responsive para móviles */
@media screen and (max-width: 480px) {
    .wps-specs-container h2 {
        font-size: 20px !important;
        margin-bottom: 12px !important;
    }
    
    .wps-specs-list > div {
        font-size: 14px !important;
        gap: 8px !important;
    }
    
    .wps-specs-container {
        padding: 12px 15px !important;
        border-width: 2px !important;
        border-radius: 10px !important;
    }
    
    .wps-materials-section h3 {
        font-size: 16px;
    }
    
    .wps-materials-section span {
        font-size: 12px;
        padding: 3px 10px;
    }
}

/* Integración con temas de WooCommerce */
.woocommerce div.product .wps-specs-container,
.woocommerce div.product .wps-materials-section {
    clear: both;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wps-specs-container,
.wps-materials-section {
    animation: fadeIn 0.5s ease;
}

/* Compatibilidad con Elementor */
.elementor-widget-container .wps-specs-container,
.elementor-widget-container .wps-materials-section {
    width: 100%;
    box-sizing: border-box;
}

/* Eliminar márgenes no deseados en Elementor */
.elementor-widget-container .wps-specs-container .wps-specs-list {
    margin: 0 !important;
}

/* Modo oscuro (si el tema lo soporta) */
@media (prefers-color-scheme: dark) {
    body.dark-mode .wps-specs-list > div,
    body.dark-mode .wps-materials-section span {
        color: #e0e0e0;
    }
    
    body.dark-mode .wps-materials-section h3,
    body.dark-mode .wps-specs-container h2 {
        color: #f5f5f5;
    }
    
    body.dark-mode .wps-materials-section span {
        border-color: #64b5f6;
    }
    
    body.dark-mode .wps-materials-section span:hover {
        background-color: #64b5f6;
        color: #1a1a1a;
    }
}