/**
 * Estilos para el Sistema de Cotización por WhatsApp & Bolsa B2B
 * Servipromo.com.co
 */

/* ==========================================================================
   1. BOTONES EN CATÁLOGO / GRILLA DE PRODUCTOS (Screenshot 1)
   ========================================================================== */
.wc-quote-loop-actions {
    display: flex !important;
    gap: 8px !important;
    margin-top: 12px !important;
    margin-bottom: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.wc-quote-btn {
    box-sizing: border-box !important;
    font-family: inherit !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    padding: 10px 12px !important;
    border-radius: 8px !important;
    text-align: center !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease-in-out !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    outline: none !important;
}

/* Botón 1: Ver Producto */
.wc-quote-btn-view {
    flex: 1 1 50% !important;
    background: #f8fafc !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #1e293b !important;
}

.wc-quote-btn-view:hover {
    background: #e2e8f0 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
    text-decoration: none !important;
}

/* Botón 2: Cotizar */
.wc-quote-btn-catalog-quote {
    flex: 1 1 50% !important;
    background: #1e3a8a !important;
    border: 1.5px solid #1e3a8a !important;
    color: #ffffff !important;
}

.wc-quote-btn-catalog-quote:hover {
    background: #172554 !important;
    border-color: #172554 !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 10px rgba(30, 58, 138, 0.25) !important;
}

/* Ocultar botones antiguos de añadir al carrito si existieran en el loop */
.woocommerce ul.products li.product .button.add_to_cart_button:not(.wc-quote-btn),
.elementor-product .button.add_to_cart_button:not(.wc-quote-btn) {
    display: none !important;
}


/* ==========================================================================
   2. FICHA INDIVIDUAL DE PRODUCTO (Screenshot 2)
   ========================================================================== */
/* Ocultar botón nativo de añadir al carrito en WooCommerce */
form.cart .single_add_to_cart_button {
    display: none !important;
}

/* Contenedor de Botones de Acción en Ficha */
.wc-quote-single-actions {
    display: flex !important;
    gap: 12px !important;
    margin-top: 18px !important;
    margin-bottom: 18px !important;
    width: 100% !important;
    flex-wrap: wrap !important;
}

/* Botón 1: Cotizar por WhatsApp (Verde WhatsApp) */
.wc-quote-btn-whatsapp {
    flex: 1 1 220px !important;
    min-height: 48px !important;
    background: #25D366 !important;
    border: none !important;
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3) !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease-in-out !important;
}

.wc-quote-btn-whatsapp:hover {
    background: #1ebc57 !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4) !important;
}

/* Botón 2: + Añadir a Bolsa (Azul Corporativo) */
.wc-quote-btn-add-bag {
    flex: 1 1 200px !important;
    min-height: 48px !important;
    background: #1e3a8a !important;
    border: none !important;
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.25) !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease-in-out !important;
}

.wc-quote-btn-add-bag:hover {
    background: #172554 !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(30, 58, 138, 0.35) !important;
}

/* Selector de Cantidad Estilizado */
.wc-quote-qty-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin: 16px 0 !important;
}

.wc-quote-qty-label {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
}

.wc-quote-qty-stepper {
    display: inline-flex !important;
    align-items: center !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    overflow: hidden !important;
    height: 42px !important;
}

.wc-quote-qty-btn {
    width: 38px !important;
    height: 100% !important;
    background: #f8fafc !important;
    border: none !important;
    color: #334155 !important;
    font-size: 18px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.15s !important;
    user-select: none !important;
}

.wc-quote-qty-btn:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

.wc-quote-qty-input {
    width: 65px !important;
    height: 100% !important;
    border: none !important;
    text-align: center !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    -moz-appearance: textfield !important;
}

.wc-quote-qty-input::-webkit-outer-spin-button,
.wc-quote-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* Pastillas de Color / Variaciones */
.wc-quote-variations-box {
    margin: 18px 0 !important;
}

.wc-quote-variations-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 8px !important;
}

.wc-quote-variations-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
}

.wc-quote-selected-variant-label {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #2563eb !important;
}

.wc-quote-color-pills {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}

.wc-quote-color-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 7px 14px !important;
    border-radius: 9999px !important;
    border: 1.5px solid #e2e8f0 !important;
    background: #ffffff !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #334155 !important;
    cursor: pointer !important;
    transition: all 0.2s ease-in-out !important;
    user-select: none !important;
}

.wc-quote-color-pill:hover {
    border-color: #94a3b8 !important;
    background: #f8fafc !important;
}

.wc-quote-color-pill.is-selected {
    border-color: #2563eb !important;
    background: #eff6ff !important;
    color: #1e3a8a !important;
    font-weight: 700 !important;
    box-shadow: 0 0 0 1px #2563eb !important;
}

.wc-quote-color-dot {
    width: 10px !important;
    height: 10px !important;
    border-radius: 50% !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
}

.wc-quote-pill-stock {
    font-size: 11px !important;
    opacity: 0.8 !important;
}


/* ==========================================================================
   3. BOTÓN FLOTANTE DE LA BOLSA (Píldora Flotante)
   ========================================================================== */
.wc-quote-floating-wrap {
    position: fixed !important;
    z-index: 99995 !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Posición: Inferior Izquierda (Evita JoinChat que está a la derecha) */
.wc-quote-pos-bottom-left {
    bottom: 24px !important;
    left: 24px !important;
}

/* Posición: Inferior Derecha (Por encima del botón de JoinChat) */
.wc-quote-pos-bottom-right {
    bottom: 95px !important;
    right: 24px !important;
}

.wc-quote-floating-pill {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: #1e3a8a !important;
    color: #ffffff !important;
    padding: 10px 18px !important;
    border-radius: 50px !important;
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.35) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    user-select: none !important;
    transition: all 0.2s ease-in-out !important;
}

.wc-quote-floating-wrap:hover .wc-quote-floating-pill {
    background: #172554 !important;
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 8px 25px rgba(30, 58, 138, 0.45) !important;
}

.wc-quote-floating-badge {
    background: #25D366 !important;
    color: #ffffff !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    min-width: 22px !important;
    height: 22px !important;
    line-height: 22px !important;
    border-radius: 11px !important;
    text-align: center !important;
    padding: 0 5px !important;
    box-sizing: border-box !important;
    display: inline-block !important;
}


/* ==========================================================================
   4. DRAWER LATERAL: TU BOLSA DE COTIZACIÓN (Screenshots 3 y 4)
   ========================================================================== */
.wc-quote-drawer-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(15, 23, 42, 0.6) !important;
    z-index: 999998 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease-in-out !important;
    backdrop-filter: blur(2px) !important;
}

.wc-quote-drawer-overlay.is-active {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.wc-quote-drawer {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 440px !important;
    max-width: 94vw !important;
    background: #ffffff !important;
    z-index: 999999 !important;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.25) !important;
    transform: translateX(100%) !important;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
}

.wc-quote-drawer.is-open {
    transform: translateX(0) !important;
}

/* Header del Drawer */
.wc-quote-drawer-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 18px 22px !important;
    border-bottom: 1.5px solid #f1f5f9 !important;
    background: #ffffff !important;
    flex-shrink: 0 !important;
}

.wc-quote-drawer-title {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.wc-quote-drawer-title h3 {
    margin: 0 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
}

.wc-quote-title-emoji {
    font-size: 20px !important;
}

.wc-quote-drawer-close {
    background: transparent !important;
    border: none !important;
    font-size: 22px !important;
    font-weight: bold !important;
    color: #94a3b8 !important;
    cursor: pointer !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    line-height: 1 !important;
    transition: color 0.15s !important;
}

.wc-quote-drawer-close:hover {
    color: #0f172a !important;
}

/* Cuerpo con Scroll */
.wc-quote-drawer-body {
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    padding: 18px 20px !important;
    background: #f8fafc !important;
}

/* Lista de Productos */
.wc-quote-items-list {
    margin-bottom: 16px !important;
}

/* Ficha de cada producto dentro del drawer */
.wc-quote-item-card {
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 14px !important;
    margin-bottom: 12px !important;
    display: flex !important;
    gap: 12px !important;
    align-items: flex-start !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.2s ease !important;
}

.wc-quote-item-card:hover {
    border-color: #cbd5e1 !important;
}

.wc-quote-item-img {
    width: 60px !important;
    height: 60px !important;
    border-radius: 8px !important;
    object-fit: cover !important;
    border: 1px solid #f1f5f9 !important;
    flex-shrink: 0 !important;
}

.wc-quote-item-content {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.wc-quote-item-name {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 0 4px !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.wc-quote-item-meta {
    font-size: 12px !important;
    color: #64748b !important;
    margin-bottom: 8px !important;
}

.wc-quote-item-meta span {
    color: #0f172a !important;
    font-weight: 600 !important;
}

.wc-quote-item-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

/* Mini stepper en el drawer */
.wc-quote-item-stepper {
    display: inline-flex !important;
    align-items: center !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    background: #ffffff !important;
    height: 30px !important;
}

.wc-quote-item-stepper button {
    width: 28px !important;
    height: 100% !important;
    background: #f8fafc !important;
    border: none !important;
    color: #334155 !important;
    font-weight: bold !important;
    cursor: pointer !important;
    font-size: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.wc-quote-item-stepper button:hover {
    background: #e2e8f0 !important;
}

.wc-quote-item-stepper input {
    width: 48px !important;
    height: 100% !important;
    border: none !important;
    text-align: center !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

.wc-quote-item-remove {
    color: #ef4444 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: opacity 0.15s !important;
}

.wc-quote-item-remove:hover {
    text-decoration: underline !important;
    opacity: 0.8 !important;
}

/* Estado Vacío */
.wc-quote-empty-state {
    text-align: center !important;
    padding: 40px 20px !important;
    background: #ffffff !important;
    border: 1.5px dashed #cbd5e1 !important;
    border-radius: 12px !important;
    margin-bottom: 16px !important;
}

.wc-quote-empty-icon {
    font-size: 42px !important;
    margin-bottom: 10px !important;
}

.wc-quote-empty-state h4 {
    margin: 0 0 6px !important;
    font-size: 16px !important;
    color: #1e293b !important;
}

.wc-quote-empty-state p {
    margin: 0 !important;
    font-size: 13px !important;
    color: #64748b !important;
    line-height: 1.4 !important;
}

/* Tarjeta de Resumen Mayorista */
.wc-quote-summary-card {
    background: #eff6ff !important;
    border: 1.5px solid #bfdbfe !important;
    border-radius: 10px !important;
    padding: 12px 14px !important;
    margin-bottom: 18px !important;
}

.wc-quote-summary-row {
    display: flex !important;
    justify-content: space-between !important;
    font-size: 13.5px !important;
    margin-bottom: 6px !important;
}

.wc-quote-summary-label {
    color: #1e40af !important;
    font-weight: 600 !important;
}

.wc-quote-summary-val {
    color: #1e3a8a !important;
    font-weight: 800 !important;
}

.wc-quote-b2b-notice p {
    margin: 0 !important;
    font-size: 11.5px !important;
    color: #3b82f6 !important;
    line-height: 1.35 !important;
}

/* Sección de Formulario de Contacto */
.wc-quote-contact-section {
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 16px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

.wc-quote-contact-heading {
    font-size: 12px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    letter-spacing: 0.6px !important;
    text-transform: uppercase !important;
    margin: 0 0 12px !important;
}

.wc-quote-form-row {
    display: flex !important;
    gap: 10px !important;
    margin-bottom: 10px !important;
}

.wc-quote-form-group {
    flex: 1 1 50% !important;
    margin-bottom: 10px !important;
}

.wc-quote-form-row .wc-quote-form-group {
    margin-bottom: 0 !important;
}

.wc-quote-input,
.wc-quote-select,
.wc-quote-textarea {
    width: 100% !important;
    box-sizing: border-box !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 9px 12px !important;
    font-size: 13px !important;
    color: #0f172a !important;
    background: #ffffff !important;
    font-family: inherit !important;
    transition: all 0.2s ease !important;
    outline: none !important;
}

.wc-quote-input:focus,
.wc-quote-select:focus,
.wc-quote-textarea:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

.wc-quote-input.has-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.wc-quote-textarea {
    resize: vertical !important;
    min-height: 55px !important;
}

/* Footer del Drawer */
.wc-quote-drawer-footer {
    padding: 16px 20px !important;
    background: #ffffff !important;
    border-top: 1.5px solid #f1f5f9 !important;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.03) !important;
    flex-shrink: 0 !important;
}

.wc-quote-submit-btn {
    width: 100% !important;
    height: 50px !important;
    background: #25D366 !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease-in-out !important;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35) !important;
}

.wc-quote-submit-btn:hover {
    background: #1ebc57 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45) !important;
}

.wc-quote-submit-btn:disabled {
    background: #94a3b8 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}

.wc-quote-footer-hint {
    text-align: center !important;
    margin-top: 8px !important;
}

.wc-quote-footer-hint span {
    font-size: 11px !important;
    color: #94a3b8 !important;
    font-style: italic !important;
}


/* ==========================================================================
   5. TOAST NOTIFICACIÓN FLOTANTE
   ========================================================================== */
.wc-quote-toast {
    position: fixed !important;
    bottom: 30px !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(100px) !important;
    background: #0f172a !important;
    color: #ffffff !important;
    padding: 12px 24px !important;
    border-radius: 50px !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
    z-index: 1000000 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.wc-quote-toast.is-visible {
    transform: translateX(-50%) translateY(0) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}


/* ==========================================================================
   6. RESPONSIVE / MÓVILES
   ========================================================================== */
@media (max-width: 640px) {
    .wc-quote-loop-actions {
        flex-direction: column !important;
        gap: 6px !important;
    }

    .wc-quote-btn-view,
    .wc-quote-btn-catalog-quote {
        flex: 1 1 100% !important;
        width: 100% !important;
    }

    .wc-quote-single-actions {
        flex-direction: column !important;
    }

    .wc-quote-btn-whatsapp,
    .wc-quote-btn-add-bag {
        flex: 1 1 100% !important;
        width: 100% !important;
    }

    .wc-quote-drawer {
        width: 100% !important;
        max-width: 100vw !important;
    }

    .wc-quote-form-row {
        flex-direction: column !important;
        gap: 0 !important;
    }

    .wc-quote-form-row .wc-quote-form-group {
        margin-bottom: 10px !important;
    }

    .wc-quote-pos-bottom-left {
        bottom: 16px !important;
        left: 16px !important;
    }

    .wc-quote-pos-bottom-right {
        bottom: 85px !important;
        right: 16px !important;
    }
}
