/* 
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 2.0.0
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* Add your custom styles here */


/*
* LDCORP - Sistema de Cotización Mayorista
* Archivo CSS separado y profesional
* Versión: 3.0 Professional
* Compatible con: WooCommerce, Hello Elementor, WordPress 6.8+
*/

/* =================================================================
   VARIABLES DE CONFIGURACIÓN - CAMBIAR AQUÍ LOS COLORES
================================================================= */
:root {
    /* 🎨 COLORES PRINCIPALES - CAMBIAR AQUÍ */
    --ldcorp-primary: #9B59B6;
    --ldcorp-primary-dark: #8E44AD;
    --ldcorp-primary-light: #E8D5F2;
    --ldcorp-button-color: #51A8B8;
    --ldcorp-button-hover: #459CAE;
    
    /* 📊 COLORES DE FONDO - CAMBIAR EL HEADER AQUÍ */
    --ldcorp-header-bg: linear-gradient(135deg, var(--ldcorp-primary), var(--ldcorp-primary-dark));
    --ldcorp-header-color: #FFFFFF;
    
    /* 🎯 OTROS COLORES */
    --ldcorp-secondary: #2C3E50;
    --ldcorp-gray: #34495E;
    --ldcorp-light-gray: #F8F9FA;
    --ldcorp-white: #FFFFFF;
    --ldcorp-text: #333333;
    --ldcorp-text-light: #666666;
    --ldcorp-border: #E0E0E0;
    --ldcorp-success: #27AE60;
    --ldcorp-warning: #F39C12;
    --ldcorp-error: #8173b3;
}

/* =================================================================
   SECCIÓN MAYORISTA EN PRODUCTOS
================================================================= */
.ldcorp-mayorista-section {
    margin: 20px 0;
    padding: 20px;
    background: var(--ldcorp-light-gray);
    border-radius: 10px;
    border-left: 4px solid var(--ldcorp-button-color);
    box-shadow: 0 3px 10px rgba(81, 168, 184, 0.1);
    transition: all 0.3s ease;
}

.ldcorp-mayorista-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(81, 168, 184, 0.15);
}

.ldcorp-mayorista-section h3 {
    color: var(--ldcorp-text);
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

.ldcorp-mayorista-section p {
    color: var(--ldcorp-text-light);
    margin-bottom: 15px;
    line-height: 1.5;
}

/* Controles de cantidad en productos */
.ldcorp-mayorista-section input[type="number"] {
    width: 100px;
    padding: 8px;
    border: 2px solid var(--ldcorp-border);
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.ldcorp-mayorista-section input[type="number"]:focus {
    outline: none;
    border-color: var(--ldcorp-button-color);
    box-shadow: 0 0 0 3px rgba(81, 168, 184, 0.1);
}

/* =================================================================
   BOTONES DE COTIZACIÓN MAYORISTA
================================================================= */
.ldcorp-add-to-quote {
    background: var(--ldcorp-button-color);
    color: var(--ldcorp-white);
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(81, 168, 184, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.ldcorp-add-to-quote:hover {
    background: var(--ldcorp-button-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(81, 168, 184, 0.3);
}

.ldcorp-add-to-quote:active {
    transform: translateY(0);
}

/* Botón rápido en listados */
.ldcorp-quick-add {
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-top: 10px;
    width: 100%;
}

/* =================================================================
   CONTADOR FLOTANTE
================================================================= */
#ldcorp-floating-counter {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--ldcorp-button-color);
    color: var(--ldcorp-white);
    padding: 15px 20px;
    border-radius: 50px;
    box-shadow: 0 5px 20px rgba(81, 168, 184, 0.4);
    cursor: pointer;
    z-index: 9999;
    display: none;
    transition: all 0.3s ease;
    font-weight: 600;
    max-width: 200px;
    text-align: center;
}

#ldcorp-floating-counter:hover {
    background: var(--ldcorp-button-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(81, 168, 184, 0.5);
}

#ldcorp-floating-counter div {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-top: 2px;
}

/* =================================================================
   FORMULARIO MAYORISTA
================================================================= */
.ldcorp-mayorista-form {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--ldcorp-text);
    margin: 0 auto;
    padding: 20px;
    max-width: 1000px;
}

/* Anchos personalizables */
.ldcorp-mayorista-form.width-full { max-width: 100%; }
.ldcorp-mayorista-form.width-large { max-width: 1200px; }
.ldcorp-mayorista-form.width-medium { max-width: 900px; }
.ldcorp-mayorista-form.width-small { max-width: 600px; }

.ldcorp-mayorista-form * {
    box-sizing: border-box;
}

/* =================================================================
   TARJETA PRINCIPAL DEL FORMULARIO
================================================================= */
.ldcorp-quote-card {
    background: var(--ldcorp-white);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(155, 89, 182, 0.1);
    overflow: hidden;
    margin-bottom: 3rem;
    border: 1px solid var(--ldcorp-border);
}

/* 🎨 HEADER - CAMBIAR COLOR DE FONDO AQUÍ */
.ldcorp-card-header {
    background: var(--ldcorp-header-bg);
    color: var(--ldcorp-header-color);
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
}

/* Patrón de fondo sutil */
.ldcorp-card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

.ldcorp-card-header h2 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    margin-bottom: 0.5rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.ldcorp-card-header p {
    opacity: 0.95;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    margin: 0;
    position: relative;
    z-index: 1;
}

.ldcorp-card-body {
    padding: clamp(2rem, 5vw, 3.5rem);
}

/* =================================================================
   SECCIÓN DE PRODUCTOS SELECCIONADOS
================================================================= */
.ldcorp-selected-products h3 {
    color: var(--ldcorp-secondary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
    border-bottom: 3px solid var(--ldcorp-button-color);
    padding-bottom: 0.5rem;
}

#ldcorp-products-display {
    background: var(--ldcorp-light-gray);
    padding: 1.5rem;
    border-radius: 12px;
    min-height: 120px;
    border: 1px solid var(--ldcorp-border);
}

#ldcorp-products-display p {
    color: var(--ldcorp-text-light);
    text-align: center;
    font-style: italic;
    margin: 0;
}

#ldcorp-products-display a {
    color: var(--ldcorp-button-color);
    text-decoration: none;
    font-weight: 600;
}

#ldcorp-products-display a:hover {
    color: var(--ldcorp-button-hover);
    text-decoration: underline;
}

/* Productos individuales en la lista */
.ldcorp-product-display-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--ldcorp-white);
    border-radius: 10px;
    margin-bottom: 0.5rem;
    border: 1px solid var(--ldcorp-border);
    transition: all 0.3s ease;
}

.ldcorp-product-display-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.ldcorp-product-display-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--ldcorp-border);
}

.ldcorp-product-display-item h4 {
    margin: 0;
    color: var(--ldcorp-text);
    font-size: 1rem;
    font-weight: 600;
}

.ldcorp-product-display-item p {
    margin: 0.25rem 0 0 0;
    color: var(--ldcorp-text-light);
    font-size: 0.9rem;
}

/* Botón eliminar producto */
.ldcorp-remove-product {
    background: var(--ldcorp-error);
    color: var(--ldcorp-white);
    border: none;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-weight: bold;
}

.ldcorp-remove-product:hover {
    background: #c53030;
    transform: scale(1.1);
}

/* =================================================================
   RESUMEN DE PRODUCTOS
================================================================= */
#ldcorp-products-summary {
    margin-top: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--ldcorp-primary-light), #F8F4FC);
    border-radius: 12px;
    border: 1px solid var(--ldcorp-border);
}

#ldcorp-products-summary div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

#ldcorp-products-summary div:last-child {
    margin-bottom: 0;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--ldcorp-button-color);
    font-weight: bold;
    color: var(--ldcorp-button-color);
}

/* =================================================================
   FORMULARIO DE DATOS DEL CLIENTE
================================================================= */
.ldcorp-customer-form h3 {
    color: var(--ldcorp-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    font-weight: 600;
    border-bottom: 3px solid var(--ldcorp-button-color);
    padding-bottom: 0.5rem;
}

.ldcorp-customer-form label {
    font-weight: 600;
    color: var(--ldcorp-secondary);
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.ldcorp-customer-form input,
.ldcorp-customer-form textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--ldcorp-border);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.ldcorp-customer-form input:focus,
.ldcorp-customer-form textarea:focus {
    outline: none;
    border-color: var(--ldcorp-button-color);
    box-shadow: 0 0 0 4px rgba(81, 168, 184, 0.1);
    transform: translateY(-1px);
}

.ldcorp-customer-form textarea {
    resize: vertical;
    min-height: 120px;
}

/* Campo obligatorio */
.ldcorp-required {
    color: var(--ldcorp-error);
    font-weight: 700;
}

/* Grid de formulario */
.ldcorp-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .ldcorp-form-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* =================================================================
   BOTONES PRINCIPALES
================================================================= */
#ldcorp-submit-btn {
    background: var(--ldcorp-button-color);
    color: var(--ldcorp-white);
    border: none;
    padding: 1.2rem 3rem;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 700;
    min-width: 280px;
    box-shadow: 0 8px 25px rgba(81, 168, 184, 0.3);
    position: relative;
    overflow: hidden;
}

#ldcorp-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

#ldcorp-submit-btn:hover::before {
    left: 100%;
}

#ldcorp-submit-btn:hover:not(:disabled) {
    background: var(--ldcorp-button-hover);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(81, 168, 184, 0.4);
}

#ldcorp-submit-btn:disabled {
    background: var(--ldcorp-text-light);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* =================================================================
   MENSAJES DE ESTADO
================================================================= */
#ldcorp-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    border: 2px solid var(--ldcorp-warning);
    display: none;
    text-align: center;
    font-weight: 600;
}

#ldcorp-success {
    background: linear-gradient(135deg, #d4edda, #a8e6cf);
    color: #155724;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    border: 2px solid var(--ldcorp-success);
    display: none;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.2);
}

/* =================================================================
   FEEDBACK DE PRODUCTOS AGREGADOS
================================================================= */
.ldcorp-feedback {
    margin-top: 10px;
    display: none;
    color: var(--ldcorp-success);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 12px;
    background: linear-gradient(135deg, #d4edda, #c8e6c9);
    border-radius: 6px;
    border-left: 4px solid var(--ldcorp-success);
}

/* =================================================================
   ANIMACIONES
================================================================= */
.ldcorp-fade-in {
    animation: ldcorpFadeIn 0.6s ease-out;
}

@keyframes ldcorpFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animación de pulsación para el contador */
.ldcorp-pulse {
    animation: ldcorpPulse 0.6s ease;
}

@keyframes ldcorpPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* =================================================================
   RESPONSIVE DESIGN
================================================================= */
@media (max-width: 768px) {
    .ldcorp-mayorista-form {
        padding: 10px;
    }
    
    .ldcorp-card-body {
        padding: 2rem 1.5rem;
    }
    
    .ldcorp-mayorista-section {
        padding: 15px;
        margin: 15px 0;
    }
    
    .ldcorp-mayorista-section div {
        flex-direction: column;
        gap: 10px;
    }
    
    .ldcorp-mayorista-section input[type="number"] {
        width: 120px;
    }
    
    .ldcorp-add-to-quote {
        width: 100%;
        justify-content: center;
    }
    
    #ldcorp-floating-counter {
        bottom: 15px;
        right: 15px;
        padding: 12px 16px;
    }
    
    .ldcorp-product-display-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
        padding: 1rem;
    }
    
    #ldcorp-submit-btn {
        width: 100%;
        min-width: auto;
        padding: 1rem 2rem;
    }
}

@media (max-width: 480px) {
    .ldcorp-card-header {
        padding: 2rem 1.5rem;
    }
    
    .ldcorp-card-body {
        padding: 1.5rem 1rem;
    }
    
    .ldcorp-mayorista-section {
        padding: 12px;
        margin: 12px 0;
    }
    
    #ldcorp-floating-counter {
        bottom: 10px;
        right: 10px;
        padding: 10px 14px;
        font-size: 0.9rem;
    }
}

/* =================================================================
   ESTADOS DE CARGA
================================================================= */
.ldcorp-loading {
    opacity: 0.7;
    cursor: wait !important;
    pointer-events: none;
}

.ldcorp-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid var(--ldcorp-white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =================================================================
   ACCESIBILIDAD
================================================================= */
.ldcorp-add-to-quote:focus,
.ldcorp-remove-product:focus,
#ldcorp-submit-btn:focus {
    outline: 3px solid var(--ldcorp-button-color);
    outline-offset: 2px;
}

/* =================================================================
   INTEGRACIÓN CON WOOCOMMERCE
================================================================= */
.woocommerce .ldcorp-mayorista-section {
    margin-top: 1.5rem;
}

.woocommerce-product-gallery + .ldcorp-mayorista-section {
    margin-top: 2rem;
}

/* En páginas de productos */
.single-product .ldcorp-mayorista-section {
    border: 2px solid var(--ldcorp-border);
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
}

/* En páginas de tienda */
.woocommerce ul.products li.product .ldcorp-quick-add {
    margin-top: 0.5rem;
}

/* =================================================================
   PRINT STYLES
================================================================= */
@media print {
    .ldcorp-mayorista-form {
        box-shadow: none;
        max-width: 100%;
    }
    
    .ldcorp-add-to-quote,
    .ldcorp-remove-product,
    #ldcorp-submit-btn,
    #ldcorp-floating-counter {
        display: none;
    }
    
    .ldcorp-card-header {
        background: var(--ldcorp-button-color) !important;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }
}

/* =================================================================
   INTEGRACIÓN CON ELEMENTOR
================================================================= */
.elementor-widget-shortcode .ldcorp-mayorista-form {
    margin: 0;
}

.elementor-section .ldcorp-mayorista-form {
    padding: 0;
}

/* Clases de ancho para Elementor */
.ldcorp-width-full { width: 100% !important; max-width: none !important; }
.ldcorp-width-boxed { max-width: 1200px !important; }
.ldcorp-width-content { max-width: 900px !important; }
.ldcorp-width-narrow { max-width: 600px !important; }