/* Estilos para el frontend de MetaWoox Pro */

/* Tabla de características principal */
.mwpro-characteristics-summary {
    margin: 20px 0;
    padding: 15px;
    border: none;
    border-radius: 8px;
    background: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mwpro-characteristics-title {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3em;
    font-weight: bold;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 8px;
}

.mwpro-characteristic-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 12px 0;
    font-size: 16px;
    border-bottom: 1px solid #e0e0e0;
    min-height: 40px;
}

.mwpro-characteristics-summary .mwpro-characteristic-item:last-child {
    border-bottom: none;
}

.mwpro-characteristic-label {
    font-weight: 600;
    color: #333;
    text-align: left;
    padding-right: 15px;
}

.mwpro-characteristic-value {
    text-align: right;
    font-weight: normal;
}

/* Pestañas dinámicas */
.mwpro-frontend-tab {
    font-family: inherit;
}

.mwpro-metabox-frontend {
    margin-bottom: 30px;
}

.mwpro-metabox-title {
    color: #333;
    font-size: 1.2em;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #0073aa;
}

/* Texto Rico */
.mwpro-text-rich {
    line-height: 1.6;
}

.mwpro-text-rich p {
    margin-bottom: 1em;
}

/* Tabla de Atributos */
.mwpro-attributes-table-frontend {
    margin: 20px 0;
}

.mwpro-attributes-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #ddd;
    background: #F8F9FA;
    border-radius: 6px;
    overflow: hidden;
}

.mwpro-attributes-table tr {
    border-bottom: 1px solid #eee;
}

.mwpro-attributes-table tr:nth-child(even) {
    background: #f9f9f9;
}

.mwpro-attributes-table td {
    padding: 12px 15px;
    vertical-align: top;
}

.mwpro-attribute-label {
    font-weight: bold;
    width: 35%;
    color: #555;
    border-right: 1px solid #eee;
}

.mwpro-attribute-value {
    color: #333;
}

/* Botones */
.mwpro-button-container {
    margin: 20px 0;
    text-align: left;
}

.mwpro-button-simple {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
    background: #0073aa;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 115, 170, 0.2);
}

.mwpro-button-simple:hover {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
    text-decoration: none;
    color: white;
}

.mwpro-button-simple:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 115, 170, 0.2);
}

.mwpro-button-simple .dashicons {
    font-size: 18px;
    line-height: 1;
    margin-right: 5px;
}

/* Imágenes */
.mwpro-image-container {
    margin: 20px 0;
    text-align: center;
}

.mwpro-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Videos */
.mwpro-video-container {
    margin: 20px 0;
    text-align: center;
}

.mwpro-video-container iframe {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.mwpro-video-link {
    display: inline-block;
    padding: 12px 24px;
    background: #ff0000;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
}

.mwpro-video-link:hover {
    background: #cc0000;
    color: white;
    text-decoration: none;
}

/* Iconos en pestañas */
.woocommerce-tabs .tabs li a .dashicons {
    margin-right: 5px;
    font-size: 16px;
    line-height: 1;
    vertical-align: middle;
}

/* Pestañas WooCommerce - Selectores específicos */
.woocommerce div.product .woocommerce-tabs ul.tabs li {
    background: #F8F9FA !important;
    border-color: #ddd !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active {
    background: #ffffff !important;
    border-bottom-color: #ffffff !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
    color: #333333 !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
    color: #333333 !important;
}

/* Selectores adicionales para compatibilidad con temas */
.wc-tabs li,
ul.wc-tabs li {
    background: #F8F9FA !important;
}

.wc-tabs li.active,
ul.wc-tabs li.active {
    background: #ffffff !important;
}

.wc-tabs li a,
ul.wc-tabs li a {
    color: #333333 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .mwpro-attributes-table {
        font-size: 14px;
    }
    
    .mwpro-attribute-label,
    .mwpro-attribute-value {
        padding: 8px 10px;
    }
    
    .mwpro-button-simple {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .mwpro-characteristic-item {
        flex-direction: column;
        gap: 5px;
    }
    
    .mwpro-characteristic-value {
        text-align: left;
        font-weight: normal;
    }
}

/* Estados especiales */
.mwpro-loading {
    opacity: 0.6;
    pointer-events: none;
}

.mwpro-error {
    border-left: 4px solid #d63638;
    background: #fef7f7;
    padding: 10px;
    margin: 10px 0;
}

.mwpro-success {
    border-left: 4px solid #00a32a;
    background: #f7fff7;
    padding: 10px;
    margin: 10px 0;
}

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

.mwpro-fade-in {
    animation: mwpro-fade-in 0.3s ease-out;
}

/* Mejoras de accesibilidad */
.mwpro-button-simple:focus {
    outline: 2px solid #005a87;
    outline-offset: 2px;
}

.mwpro-characteristic-label {
    font-weight: 600;
}

/* Print styles */
@media print {
    .mwpro-button-container {
        display: none;
    }
    
    .mwpro-video-container {
        display: none;
    }
    
    .mwpro-characteristics-summary {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}