/**
 * Estilos base para visualización de productos - WooCommerce Venezuela Pro
 * Prefijos específicos para evitar conflictos con temas
 * 
 * @package WooCommerce_Venezuela_Pro
 * @since 1.0.0
 */

/* ========================================
   VARIABLES CSS ESPECÍFICAS DEL PLUGIN
   ======================================== */
:root {
    --wvp-primary-color: #007cba;
    --wvp-secondary-color: #005a87;
    --wvp-success-color: #28a745;
    --wvp-warning-color: #ffc107;
    --wvp-danger-color: #dc3545;
    --wvp-light-color: #f8f9fa;
    --wvp-dark-color: #343a40 !important;
    --wvp-border-color: #e9ecef;
    --wvp-shadow: 0 2px 4px rgba(0,0,0,0.1);
    --wvp-shadow-lg: 0 4px 15px rgba(0,0,0,0.15);
    --wvp-border-radius: 6px;
    --wvp-border-radius-lg: 12px;
    --wvp-transition: all 0.3s ease;
    --wvp-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ========================================
   CONTENEDOR PRINCIPAL
   ======================================== */
.wvp-product-price-container {
    position: relative;
    display: block;
    margin: 0;
    padding: 0;
    font-family: var(--wvp-font-family);
    line-height: 1.4;
    box-sizing: border-box;
}

/* ========================================
   SWITCHER DE MONEDA BASE
   ======================================== */
.wvp-currency-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
    font-size: 14px;
    line-height: 1.2;
}

.wvp-currency-switcher button,
.wvp-currency-switcher .wvp-currency-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border: 1px solid var(--wvp-border-color);
    background: #ffffff;
    color: var(--wvp-dark-color);
    text-decoration: none;
    border-radius: var(--wvp-border-radius);
    cursor: pointer;
    transition: var(--wvp-transition);
    font-size: inherit;
    font-family: inherit;
    line-height: inherit;
    min-height: 32px;
    min-width: 60px;
}

.wvp-currency-switcher button:hover,
.wvp-currency-switcher .wvp-currency-option:hover {
    border-color: var(--wvp-primary-color);
    background: #f8f9fa;
    color: var(--wvp-primary-color);
    transform: translateY(-1px);
    box-shadow: var(--wvp-shadow);
}

.wvp-currency-switcher button.active,
.wvp-currency-switcher .wvp-currency-option.active {
    background: var(--wvp-primary-color);
    border-color: var(--wvp-primary-color);
    color: #ffffff;
    font-weight: 600;
    box-shadow: var(--wvp-shadow);
}

.wvp-currency-switcher button:focus,
.wvp-currency-switcher .wvp-currency-option:focus {
    outline: 2px solid var(--wvp-primary-color);
    outline-offset: 2px;
}

/* ========================================
   PRECIOS Y CONVERSIONES
   ======================================== */
.wvp-price-display {
    display: block;
    margin: 5px 0;
}

.wvp-price-usd,
.wvp-price-ves {
    font-weight: 600;
    color: var(--wvp-dark-color);
    font-size: 16px;
}

.wvp-price-ves {
    color: var(--wvp-secondary-color);
}

.wvp-price-conversion {
    display: block;
    margin: 8px 0;
    padding: 8px 12px;
    background: var(--wvp-light-color);
    border: 1px solid var(--wvp-border-color);
    border-radius: var(--wvp-border-radius);
    font-size: 13px;
    color: #666;
}

.wvp-price-conversion .wvp-ves-reference {
    display: block;
    margin: 0;
    font-style: italic;
    color: #666;
}

.wvp-price-conversion .wvp-ves-reference::before {
    content: "💱 ";
    margin-right: 4px;
}

/* ========================================
   BADGES Y INDICADORES
   ======================================== */
.wvp-currency-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    background: var(--wvp-primary-color);
    color: #ffffff;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
}

.wvp-currency-badge.wvp-ves {
    background: var(--wvp-secondary-color);
}

.wvp-rate-info {
    display: block;
    font-size: 11px;
    color: #999;
    font-style: italic;
    margin-top: 4px;
}

.wvp-rate-info::before {
    content: "📊 ";
    margin-right: 2px;
}

/* ========================================
   ESTADOS DE CARGA
   ======================================== */
.wvp-loading {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

.wvp-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid var(--wvp-border-color);
    border-top: 2px solid var(--wvp-primary-color);
    border-radius: 50%;
    animation: wvp-spin 1s linear infinite;
}

@keyframes wvp-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   RESPONSIVE BASE
   ======================================== */
@media (max-width: 768px) {
    .wvp-currency-switcher {
        flex-direction: column;
        gap: 6px;
        align-items: stretch;
    }
    
    .wvp-currency-switcher button,
    .wvp-currency-switcher .wvp-currency-option {
        width: 100%;
        justify-content: center;
        padding: 8px 12px;
    }
    
    .wvp-price-usd,
    .wvp-price-ves {
        font-size: 14px;
    }
    
    .wvp-price-conversion {
        font-size: 12px;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    .wvp-currency-switcher {
        gap: 4px;
    }
    
    .wvp-currency-switcher button,
    .wvp-currency-switcher .wvp-currency-option {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .wvp-price-usd,
    .wvp-price-ves {
        font-size: 13px;
    }
}

/* ========================================
   INTEGRACIÓN CON WOOCOMMERCE
   ======================================== */
.woocommerce .wvp-product-price-container {
    margin: 15px 0;
}

.woocommerce .product .wvp-product-price-container {
    margin: 20px 0;
}

.woocommerce ul.products li.product .wvp-product-price-container {
    margin: 10px 0;
}

.woocommerce-cart .wvp-product-price-container {
    margin: 8px 0;
}

.woocommerce-checkout .wvp-product-price-container {
    margin: 8px 0;
}

/* ========================================
   ACCESIBILIDAD
   ======================================== */
.wvp-currency-switcher button:focus-visible,
.wvp-currency-switcher .wvp-currency-option:focus-visible {
    outline: 2px solid var(--wvp-primary-color);
    outline-offset: 2px;
}

.wvp-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========================================
   MODO OSCURO
   ======================================== */
@media (prefers-color-scheme: dark) {
    :root {
        --wvp-light-color: #2c2c2c;
        --wvp-dark-color: #ffffff;
        --wvp-border-color: #444;
    }
    
    .wvp-currency-switcher button,
    .wvp-currency-switcher .wvp-currency-option {
        background: #3c3c3c;
        border-color: #555;
        color: #ffffff;
    }
    
    .wvp-currency-switcher button:hover,
    .wvp-currency-switcher .wvp-currency-option:hover {
        background: #4c4c4c;
        border-color: var(--wvp-primary-color);
    }
    
    .wvp-price-conversion {
        background: #3c3c3c;
        border-color: #555;
        color: #ccc;
    }
    
    .wvp-rate-info {
        color: #aaa;
    }
}

/* ========================================
   UTILIDADES
   ======================================== */
.wvp-text-center { text-align: center; }
.wvp-text-left { text-align: left; }
.wvp-text-right { text-align: right; }
.wvp-mb-0 { margin-bottom: 0; }
.wvp-mb-1 { margin-bottom: 8px; }
.wvp-mb-2 { margin-bottom: 16px; }
.wvp-mt-0 { margin-top: 0; }
.wvp-mt-1 { margin-top: 8px; }
.wvp-mt-2 { margin-top: 16px; }
.wvp-hidden { display: none; }
.wvp-visible { display: block; }
.wvp-inline { display: inline; }
.wvp-inline-block { display: inline-block; }
.wvp-flex { display: flex; }
.wvp-flex-column { flex-direction: column; }
.wvp-flex-center { align-items: center; justify-content: center; }
.wvp-gap-1 { gap: 8px; }
.wvp-gap-2 { gap: 16px; }
