/**
 * Estilos de Frontend para WooCommerce Cotizador
 */

/* Ocultar botones de añadir al carrito por defecto (PHP/CSS híbrido para mayor seguridad) */
.wc-cotizador-enabled .single-product .entry-summary form.cart button.single_add_to_cart_button:not(.wc-cotizador-btn) {
    display: none !important;
}
.wc-cotizador-enabled .woocommerce-variation-add-to-cart button.single_add_to_cart_button:not(.wc-cotizador-btn) {
    display: none !important;
}

/* Ocultar precios si está habilitado */
.wc-cotizador-hide-prices .price,
.wc-cotizador-hide-prices .amount,
.wc-cotizador-hide-prices .woodmart-price,
.wc-cotizador-hide-prices .price-wrapper {
    display: none !important;
}

/* Estilos para el Botón de Cotización */
.wc-cotizador-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    vertical-align: middle;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer;
    font-weight: 600 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Forzar visualización de botón y su contenedor bajo cualquier modo catálogo de Woodmart */
.wc-cotizador-enabled .wc-cotizador-btn,
body.woodmart-catalog-mode .wc-cotizador-btn,
body.catalog-mode-on .wc-cotizador-btn,
.wc-cotizador-fallback-wrapper .wc-cotizador-btn,
form.cart .wc-cotizador-btn {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Asegurar que el formulario no sea ocultado por el modo catálogo de Woodmart */
body.wc-cotizador-enabled.woodmart-catalog-mode form.cart,
body.wc-cotizador-enabled.catalog-mode-on form.cart,
body.wc-cotizador-enabled .entry-summary form.cart {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    visibility: visible !important;
/* Ocultar el selector nativo duplicado de WooCommerce para usar nuestro stepper integrado */
.wc-cotizador-enabled .single-product .entry-summary form.cart > .quantity {
    display: none !important;
}

/* ==========================================================================
   Selector de Cantidad en Ficha de Producto - ELEGANTE & COMPACTO
   ========================================================================== */
.wc-cotizador-buttons-wrapper {
    display: inline-flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin: 12px 0 !important;
}

.wc-cotizador-single-qty-wrapper {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    width: 78px !important;
    min-width: 78px !important;
    max-width: 78px !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.wc-cot-single-qty-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f8fafc !important;
    border: none !important;
    border-radius: 0 !important;
    width: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    height: 34px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #475569 !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    user-select: none;
    transition: background 0.15s ease, color 0.15s ease !important;
}

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

.wc-cot-single-qty-input {
    display: inline-block !important;
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    height: 34px !important;
    border: none !important;
    border-left: 1px solid #e2e8f0 !important;
    border-right: 1px solid #e2e8f0 !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    text-align: center !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    padding: 0 !important;
    margin: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    -moz-appearance: textfield !important;
}

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

/* ==========================================================================
   MINI-CART STEPPER (Woodmart Cart Slider) - ULTRA COMPACTO & HORIZONTAL
   ========================================================================== */
.cart-widget-side .wc-cot-mini-cart-qty-wrapper,
.dropdown-cart .wc-cot-mini-cart-qty-wrapper,
.widget_shopping_cart .wc-cot-mini-cart-qty-wrapper,
.woocommerce-mini-cart-item .wc-cot-mini-cart-qty-wrapper,
.wc-cot-mini-cart-qty-wrapper {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    margin: 4px 0 0 0 !important;
    padding: 0 !important;
    width: auto !important;
    max-width: 80px !important;
    clear: both !important;
    float: none !important;
}

.cart-widget-side .wc-cot-mini-qty-stepper,
.dropdown-cart .wc-cot-mini-qty-stepper,
.widget_shopping_cart .wc-cot-mini-qty-stepper,
.woocommerce-mini-cart-item .wc-cot-mini-qty-stepper,
.wc-cot-mini-qty-stepper {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    border: 1px solid #d1d5db !important;
    border-radius: 4px !important;
    background: #ffffff !important;
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    vertical-align: middle !important;
}

/* Forzar que los botones '-' y '+' en Woodmart NUNCA se rompan en bloques */
.cart-widget-side .wc-cot-mini-qty-stepper button.wc-cot-mini-qty-btn,
.dropdown-cart .wc-cot-mini-qty-stepper button.wc-cot-mini-qty-btn,
.widget_shopping_cart .wc-cot-mini-qty-stepper button.wc-cot-mini-qty-btn,
.woocommerce-mini-cart-item .wc-cot-mini-qty-stepper button.wc-cot-mini-qty-btn,
.wc-cot-mini-qty-stepper button.wc-cot-mini-qty-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f1f5f9 !important;
    border: none !important;
    border-radius: 0 !important;
    width: 22px !important;
    min-width: 22px !important;
    max-width: 22px !important;
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    color: #475569 !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    transition: background 0.15s ease !important;
    float: none !important;
}

.wc-cot-mini-qty-stepper button.wc-cot-mini-qty-btn:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

/* Forzar que el input en Woodmart NUNCA tenga forma de píldora ni 100% width */
.cart-widget-side .wc-cot-mini-qty-stepper input.wc-cot-mini-qty-input,
.dropdown-cart .wc-cot-mini-qty-stepper input.wc-cot-mini-qty-input,
.widget_shopping_cart .wc-cot-mini-qty-stepper input.wc-cot-mini-qty-input,
.woocommerce-mini-cart-item .wc-cot-mini-qty-stepper input.wc-cot-mini-qty-input,
.wc-cot-mini-qty-stepper input.wc-cot-mini-qty-input {
    display: inline-block !important;
    width: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    border: none !important;
    border-left: 1px solid #e2e8f0 !important;
    border-right: 1px solid #e2e8f0 !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    text-align: center !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 24px !important;
    color: #0f172a !important;
    padding: 0 !important;
    margin: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    -moz-appearance: textfield !important;
    float: none !important;
}

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

/* Modal Overlay (Fondo) */
.wc-cotizador-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6); /* Slate 900 con opacidad */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Body lock */
body.wc-cotizador-modal-open {
    overflow: hidden !important;
    height: 100vh;
}

/* Contenedor del Modal */
.wc-cotizador-modal-container {
    background: #ffffff;
    width: 100%;
    max-width: 550px;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 35px;
    position: relative;
    box-sizing: border-box;
    max-height: 90vh;
    overflow-y: auto;
    animation: wcModalScaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes wcModalScaleUp {
    from {
        transform: scale(0.92);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Botón Cerrar (X) */
.wc-cotizador-modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f1f5f9;
    border: none;
    font-size: 24px;
    color: #64748b;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}
.wc-cotizador-modal-close-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: rotate(90deg);
}

/* Encabezado */
.wc-cotizador-modal-header {
    margin-bottom: 25px;
    text-align: center;
}
.wc-cotizador-modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px 0;
}
.wc-cotizador-modal-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* Previsualización del Producto */
.wc-cotizador-product-preview {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 25px;
}
.wc-cotizador-product-tag {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #16a085;
    display: block;
    margin-bottom: 4px;
}
.wc-cotizador-product-details h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 8px 0;
    line-height: 1.4;
}
.wc-cotizador-preview-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #64748b;
}
.wc-cotizador-preview-meta strong {
    color: #334155;
}
.wc-cotizador-preview-variations {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #cbd5e1;
    font-size: 12px;
    color: #64748b;
}
.wc-cotizador-preview-variations span {
    background: #e2e8f0;
    color: #334155;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
    font-weight: 500;
}

/* Formulario Campos */
.wc-cotizador-form-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 25px;
}
.wc-cotizador-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.wc-cotizador-field-group label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}
.wc-cotizador-field-group input,
.wc-cotizador-field-group textarea {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.2s ease;
    font-family: inherit;
}
.wc-cotizador-field-group input:focus,
.wc-cotizador-field-group textarea:focus {
    border-color: #16a085;
    outline: none;
    box-shadow: 0 0 0 3px rgba(22, 160, 133, 0.15);
}

/* Error */
.wc-cotizador-error-msg {
    background-color: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 20px;
    line-height: 1.4;
}

/* Footer / Botones */
.wc-cotizador-modal-footer {
    display: flex;
    justify-content: flex-end;
}
.wc-cotizador-submit-btn {
    width: 100%;
    padding: 12px 24px;
    background-color: #16a085;
    border: 1px solid #16a085;
    color: #ffffff;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(22, 160, 133, 0.2);
}
.wc-cotizador-submit-btn:hover {
    background-color: #1abc9c;
    border-color: #1abc9c;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px -1px rgba(22, 160, 133, 0.3);
}

/* Pantalla de Estado (Carga / Éxito) */
.wc-cotizador-status-view {
    text-align: center;
    padding: 30px 10px;
}
.wc-cotizador-spinner-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}
.wc-cotizador-loader {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #16a085;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    animation: wcSpin 1s linear infinite;
}
@keyframes wcSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.wc-cotizador-status-text {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

/* Éxito Checkmark Animado */
.wc-cotizador-success-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}
.wc-cotizador-success-wrapper h3 {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}
.wc-cotizador-success-wrapper p {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 15px 0;
    line-height: 1.5;
    max-width: 320px;
}
.wc-cotizador-success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto;
}
.check-icon {
    width: 80px;
    height: 80px;
    position: relative;
    border-radius: 50%;
    box-sizing: content-box;
    border: 4px solid #4caf50;
}
.check-icon::before, .check-icon::after {
    content: '';
    height: 100px;
    position: absolute;
    background: #ffffff;
    transform: rotate(-45deg);
}
.check-icon::before {
    border-radius: 100px 0 0 100px;
    top: -7px;
    left: -30px;
    transform-origin: 100px 40px;
    transform: rotate(-45deg);
    width: 30px;
}
.check-icon::after {
    border-radius: 0 100px 100px 0;
    top: -11px;
    left: 30px;
    transform-origin: 0px 60px;
    transform: rotate(-45deg);
    width: 60px;
}
.icon-circle {
    top: -4px;
    left: -4px;
    z-index: 10;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    position: absolute;
    box-sizing: content-box;
    border: 4px solid rgba(76, 175, 80, .5);
}
.icon-fix {
    top: 8px;
    width: 5px;
    left: 28px;
    z-index: 1;
    height: 70px;
    position: absolute;
    transform: rotate(-45deg);
    background-color: #ffffff;
}
.icon-line {
    height: 5px;
    background-color: #4caf50;
    display: block;
    border-radius: 2px;
    position: absolute;
    z-index: 10;
}
.icon-line.line-tip {
    top: 46px;
    left: 19px;
    width: 25px;
    transform: rotate(45deg);
    animation: icon-line-tip 0.75s;
}
.icon-line.line-long {
    top: 38px;
    right: 15px;
    width: 47px;
    transform: rotate(-45deg);
    animation: icon-line-long 0.75s;
}

@keyframes icon-line-tip {
    0% { width: 0; left: 1px; top: 19px; }
    54% { width: 0; left: 1px; top: 19px; }
    70% { width: 50px; left: -8px; top: 37px; }
    84% { width: 17px; left: 21px; top: 48px; }
    100% { width: 25px; left: 19px; top: 46px; }
}
@keyframes icon-line-long {
    0% { width: 0; right: 46px; top: 54px; }
    65% { width: 0; right: 46px; top: 54px; }
    84% { width: 55px; right: 0px; top: 35px; }
    100% { width: 47px; right: 15px; top: 38px; }
}

#wc-cotizador-success-close-btn {
    width: auto;
    padding: 10px 20px;
    font-size: 14px;
    background: #1e293b;
    border-color: #1e293b;
}
#wc-cotizador-success-close-btn:hover {
    background: #334155;
    border-color: #334155;
}

/* Contenedor de botones (Cotizar + Ficha) */
.wc-cotizador-buttons-wrapper {
    display: flex !important;
    flex-direction: row;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin: 15px 0;
    width: 100%;
}

/* Asegurar que se muestre en bloque en caso de tema con flex */
.wc-cotizador-fallback-wrapper .wc-cotizador-buttons-wrapper {
    margin: 0;
}

/* Botón Descargar Ficha */
.wc-cotizador-btn-ficha {
    background-color: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
    padding: 12px 24px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
    text-decoration: none !important;
}

.wc-cotizador-btn-ficha:hover {
    background-color: #f1f5f9 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
    transform: translateY(-1px);
}

.wc-cotizador-btn-ficha svg.pdf-icon {
    stroke: #ef4444; /* Ícono PDF color rojo para reconocimiento instantáneo */
    transition: transform 0.25s ease;
}

.wc-cotizador-btn-ficha:hover svg.pdf-icon {
    transform: translateY(1px);
}

@media (max-width: 576px) {
    .wc-cotizador-buttons-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    .wc-cotizador-btn,
    .wc-cotizador-btn-ficha {
        width: 100% !important;
        text-align: center;
    }
}

/* Ocultar botón tradicional de proceder al checkout cuando el cotizador está activo */
.wc-cotizador-enabled .woocommerce-mini-cart__buttons .checkout,
.wc-cotizador-enabled .woocommerce-mini-cart__buttons a.checkout,
.wc-cotizador-enabled .cart-widget-side .checkout,
.wc-cotizador-enabled .dropdown-cart .checkout,
.wc-cotizador-enabled .widget_shopping_cart .checkout,
.wc-cotizador-enabled .woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
.wc-cotizador-enabled .woocommerce-cart .wc-proceed-to-checkout button.checkout-button {
    display: none !important;
}

/* ==========================================================================
   Caja de Cotización en el Carrito Desplegable (ULTRA COMPACTA & ESPACIOSA)
   ========================================================================== */
.wc-cotizador-woodmart-cart-box {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 8px 10px !important;
    margin-top: 8px !important;
    margin-bottom: 6px !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
    box-sizing: border-box !important;
}

.wc-cot-wm-form-header {
    margin-bottom: 6px !important;
    padding-bottom: 3px !important;
    border-bottom: 1px dashed #cbd5e1 !important;
}

.wc-cot-wm-form-title {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #334155 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    display: block !important;
}

/* Cuadrícula compacta de 2 columnas para reducir drásticamente la altura */
.wc-cot-wm-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
    margin-bottom: 6px !important;
}

.wc-cot-wm-field {
    margin: 0 !important;
    padding: 0 !important;
}

.wc-cot-wm-input {
    width: 100% !important;
    height: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 4px !important;
    padding: 2px 8px !important;
    font-size: 11px !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
    color: #0f172a !important;
    line-height: 24px !important;
    margin: 0 !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.wc-cot-wm-input:focus {
    border-color: #25D366 !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.18) !important;
    background: #ffffff !important;
}

.wc-cot-wm-actions {
    margin-top: 4px !important;
}

/* Botón Cotizar por WhatsApp estilizado y compacto */
.wc-cot-wm-whatsapp-btn {
    width: 100% !important;
    background: #25D366 !important;
    border: 1px solid #25D366 !important;
    color: #ffffff !important;
    padding: 6px 12px !important;
    height: 34px !important;
    min-height: 34px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    cursor: pointer !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.28) !important;
    box-sizing: border-box !important;
}

.wc-cot-wm-whatsapp-btn:hover {
    background: #1ebc57 !important;
    border-color: #1ebc57 !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.38) !important;
}

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

.wc-cot-wm-whatsapp-btn svg.whatsapp-icon {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.wc-cot-wm-whatsapp-btn:hover svg.whatsapp-icon {
    transform: scale(1.1);
}

/* ==========================================================================
   Slide-out Drawer (Cajón Lateral de Cotizaciones)
   ========================================================================== */
body.wc-cotizador-drawer-open {
    overflow: hidden !important;
}

.wc-cotizador-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999988;
    transition: opacity 0.3s ease;
}

.wc-cotizador-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    max-width: 92vw;
    height: 100%;
    background: #ffffff;
    z-index: 999989;
    box-shadow: -10px 0 35px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.wc-cotizador-drawer.open {
    transform: translateX(0);
}

/* Drawer Header */
.wc-cotizador-drawer-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
}

.wc-cotizador-drawer-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.wc-cotizador-drawer-title .drawer-header-icon {
    color: #16a085;
}

.wc-cotizador-drawer-count {
    background: #16a085;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
}

.wc-cotizador-drawer-close-btn {
    background: #e2e8f0;
    border: none;
    font-size: 22px;
    color: #475569;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.wc-cotizador-drawer-close-btn:hover {
    background: #cbd5e1;
    color: #0f172a;
    transform: rotate(90deg);
}

/* Drawer Body */
.wc-cotizador-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.wc-cotizador-drawer-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wc-cotizador-drawer-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
    transition: opacity 0.2s ease;
}

.wc-cotizador-drawer-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.wc-cotizador-drawer-item .item-thumbnail {
    width: 65px;
    height: 65px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.wc-cotizador-drawer-item .item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wc-cotizador-drawer-item .item-details {
    flex: 1;
    min-width: 0;
}

.wc-cotizador-drawer-item .item-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    text-decoration: none;
    display: block;
    line-height: 1.35;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wc-cotizador-drawer-item .item-title:hover {
    color: #16a085;
}

.wc-cotizador-drawer-item .item-sku {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}

.wc-cotizador-drawer-item .item-variations {
    font-size: 11px;
    color: #0f172a;
    background: #f1f5f9;
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.wc-cotizador-drawer-item .item-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
}

.wc-cot-qty-wrapper {
    display: inline-flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
    background: #ffffff;
}

.wc-cot-qty-btn {
    background: #f8fafc;
    border: none;
    width: 28px;
    height: 28px;
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
    padding: 0;
}

.wc-cot-qty-btn:hover {
    background: #e2e8f0;
}

.wc-cot-qty-input {
    width: 34px !important;
    height: 28px !important;
    text-align: center;
    border: none !important;
    border-left: 1px solid #cbd5e1 !important;
    border-right: 1px solid #cbd5e1 !important;
    padding: 0 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    -moz-appearance: textfield;
}
.wc-cot-qty-input::-webkit-outer-spin-button,
.wc-cot-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.wc-cot-remove-item-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.wc-cot-remove-item-btn:hover {
    color: #ef4444;
    background: #fee2e2;
}

/* Empty Drawer State */
.wc-cotizador-drawer-empty {
    text-align: center;
    padding: 60px 20px;
}

.wc-cotizador-drawer-empty .empty-icon-wrap {
    margin-bottom: 16px;
}

.wc-cotizador-drawer-empty h4 {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.wc-cotizador-drawer-empty p {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 24px 0;
    line-height: 1.5;
}

.wc-cotizador-drawer-shop-btn {
    padding: 10px 20px !important;
    background: #16a085 !important;
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 6px !important;
    font-size: 14px !important;
}

/* Drawer Footer */
.wc-cotizador-drawer-footer {
    padding: 20px 24px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.wc-cotizador-drawer-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    margin-bottom: 16px;
}

.wc-cotizador-drawer-summary .summary-label {
    color: #64748b;
    font-weight: 500;
}

.wc-cotizador-drawer-summary .summary-value {
    color: #0f172a;
    font-size: 18px;
    font-weight: 700;
}

.wc-cotizador-drawer-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wc-cotizador-drawer-action-btn {
    width: 100% !important;
    padding: 14px 20px !important;
    background: #16a085 !important;
    border: 1px solid #16a085 !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 6px -1px rgba(22, 160, 133, 0.25) !important;
}

.wc-cotizador-drawer-action-btn:hover {
    background: #1abc9c !important;
    border-color: #1abc9c !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px -1px rgba(22, 160, 133, 0.35) !important;
}

.wc-cotizador-drawer-clear-link {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 13px;
    cursor: pointer;
    text-align: center;
    transition: color 0.2s ease;
    padding: 4px;
}

.wc-cotizador-drawer-clear-link:hover {
    color: #ef4444;
    text-decoration: underline;
}

/* ==========================================================================
   Botón Flotante de Cotización (Floating Button)
   ========================================================================== */
.wc-cotizador-floating-cart {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999980;
}

.wc-cotizador-floating-btn {
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
    border: none;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: 0 8px 24px rgba(22, 160, 133, 0.4), 0 2px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.wc-cotizador-floating-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 12px 30px rgba(22, 160, 133, 0.5), 0 4px 10px rgba(0, 0, 0, 0.15);
}

.wc-cotizador-floating-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.wc-cotizador-floating-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.wc-cotizador-floating-text {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.wc-cotizador-floating-badge {
    background: #ffffff;
    color: #16a085;
    font-size: 12px;
    font-weight: 800;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   Toast Notification (Notificación Flotante)
   ========================================================================== */
.wc-cotizador-toast {
    position: fixed;
    bottom: 95px;
    right: 30px;
    background: #0f172a;
    color: #ffffff;
    padding: 14px 20px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    z-index: 999985;
    display: flex;
    align-items: center;
    gap: 15px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.wc-cotizador-toast.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.wc-cotizador-toast .toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
}

.wc-cotizador-toast .toast-check-icon {
    width: 18px;
    height: 18px;
    color: #10b981;
    flex-shrink: 0;
}

.wc-cotizador-toast .toast-action-btn {
    background: #16a085;
    color: #ffffff;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.wc-cotizador-toast .toast-action-btn:hover {
    background: #1abc9c;
}

/* ==========================================================================
   Multi-producto Preview en el Modal de Cotización
   ========================================================================== */
.wc-cotizador-multi-preview {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 22px;
}

.wc-cotizador-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.wc-cotizador-preview-total-badge {
    background: #16a085;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}

.wc-cotizador-modal-items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 190px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Scrollbar estilizada */
.wc-cotizador-modal-items-list::-webkit-scrollbar,
.wc-cotizador-drawer-body::-webkit-scrollbar {
    width: 5px;
}
.wc-cotizador-modal-items-list::-webkit-scrollbar-thumb,
.wc-cotizador-drawer-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.wc-cot-modal-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.modal-item-thumb {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.modal-item-info {
    flex: 1;
    min-width: 0;
}

.modal-item-name {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal-item-sku {
    font-size: 11px;
    color: #64748b;
}

.modal-item-vars {
    font-size: 11px;
    color: #16a085;
}

.modal-item-qty {
    background: #f1f5f9;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    flex-shrink: 0;
}

@media (max-width: 576px) {
    .wc-cotizador-floating-cart {
        bottom: 20px;
        right: 20px;
    }
    .wc-cotizador-floating-text {
        display: none;
    }
    .wc-cotizador-floating-btn {
        padding: 14px;
        border-radius: 50%;
    }
    .wc-cotizador-floating-badge {
        position: absolute;
        top: -4px;
        right: -4px;
    }
    .wc-cotizador-toast {
        right: 15px;
        left: 15px;
        bottom: 85px;
    }
}

