/* --- VARIABLES & RESET GLOBAL --- */
:root {
    --wcb2b-green: #25D366;
    --wcb2b-dark: #1f2937;
    --wcb2b-gray: #9ca3af;
    --wcb2b-light: #f3f4f6;
    --wcb2b-white: #ffffff;
    --wcb2b-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --wcb2b-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.wcb2b-modal, .wcb2b-modal *, 
.wcb2b-floating-wrapper, .wcb2b-floating-wrapper *, .wcb2b-toast, .wcb2b-toast * {
    font-family: var(--wcb2b-font) !important;
    box-sizing: border-box;
    line-height: 1.5;
}

/* --- SISTEMA DE MENÚ FLOTANTE --- */
.wcb2b-floating-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99990;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
}

.wcb2b-floating-menu {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none; /* Evita que se haga clic cuando está invisible */
}

.wcb2b-floating-menu.wcb2b-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto; /* Permite clic cuando está visible */
}

/* Sub-Botones */
.wcb2b-sub-btn {
    align-items: center;
    gap: 12px;
    padding: 10px 22px;
    border-radius: 40px;
    text-decoration: none !important;
    color: white !important;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    max-width: 250px;
    cursor: pointer;
}

.wcb2b-sub-btn:hover {
    transform: scale(1.05);
    color: white !important;
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

.wcb2b-sub-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}
.wcb2b-sub-icon svg { width: 26px; height: 26px; fill: white; }

.wcb2b-sub-text {
    line-height: 1.2;
    text-align: left;
}

/* Botón Principal (WhatsApp) */
.wcb2b-floating-main {
    width: 65px;
    height: 65px;
    background-color: var(--wcb2b-green);
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s;
}

.wcb2b-floating-main:hover { transform: scale(1.05); }

.wcb2b-wa-icon, .wcb2b-close-icon {
    position: absolute;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.wcb2b-close-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}
.wcb2b-floating-main.wcb2b-menu-open .wcb2b-wa-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}
.wcb2b-floating-main.wcb2b-menu-open .wcb2b-close-icon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

/* Burbujas Notificación Carrito */
.wcb2b-cart-count, .wcb2b-global-cart-badge {
    position: absolute;
    background: #ef4444 !important;
    color: white !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    min-width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    z-index: 2;
}
.wcb2b-global-cart-badge { top: -4px; right: -4px; }
.wcb2b-sub-btn .wcb2b-cart-count { top: -8px; right: -8px; }


/* --- ESTILOS ORIGINALES INTACTOS --- */
.wcb2b-toast {
    position: fixed; bottom: 120px; right: 30px;
    background: var(--wcb2b-white); padding: 16px 20px;
    border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    display: flex; align-items: center; gap: 12px;
    z-index: 999999; border-left: 5px solid var(--wcb2b-green);
    animation: wcb2bSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 320px;
}

.wcb2b-toast-icon { font-size: 20px; line-height: 1; }
.wcb2b-toast-text { 
    font-size: 14px !important; font-weight: 600 !important; 
    color: var(--wcb2b-dark) !important; margin: 0 !important;
}

@keyframes wcb2bSlideIn {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

.wcb2b-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px);
    z-index: 999999; display: flex; align-items: center; justify-content: center;
}

.wcb2b-modal-content {
    background: #fff; width: 95%; max-width: 480px;
    border-radius: 16px; box-shadow: var(--wcb2b-shadow);
    position: relative; overflow: hidden;
    animation: wcb2bZoom 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex; flex-direction: column; max-height: 90vh;
}

@keyframes wcb2bZoom { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

.wcb2b-modal-close {
    position: absolute; top: 15px; right: 15px;
    background: transparent !important; border: none !important;
    width: auto; height: auto; font-size: 28px !important;
    line-height: 1; color: var(--wcb2b-gray) !important; 
    cursor: pointer; display: flex; align-items: center; 
    justify-content: center; transition: color 0.2s ease; 
    z-index: 20; padding: 0 !important; margin: 0 !important;
    box-shadow: none !important;
}

.wcb2b-modal-close:hover { color: var(--wcb2b-dark) !important; }

.wcb2b-modal-header {
    padding: 24px 24px 16px; border-bottom: 1px solid var(--wcb2b-light);
    background: #fff;
}
.wcb2b-modal-header h3 { margin: 0 !important; font-size: 20px !important; font-weight: 700 !important; color: var(--wcb2b-dark) !important; }
.wcb2b-modal-header p { margin: 4px 0 0 !important; font-size: 14px !important; color: var(--wcb2b-gray) !important; }

.wcb2b-modal-body { padding: 24px; overflow-y: auto; background: #fff; }

.wcb2b-cart-list { border: 1px solid var(--wcb2b-light); border-radius: 12px; overflow: hidden; }

.wcb2b-cart-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; border-bottom: 1px solid var(--wcb2b-light);
    background: #fff;
}
.wcb2b-cart-item:last-child { border-bottom: none; }

.wcb2b-item-name { font-weight: 600 !important; font-size: 14px !important; color: var(--wcb2b-dark) !important; display: block; }
.wcb2b-item-sku { font-size: 12px !important; color: var(--wcb2b-gray) !important; background: var(--wcb2b-light); padding: 2px 6px; border-radius: 4px; }
.wcb2b-remove-item {
    color: #ef4444; background: #fee2e2; padding: 6px;
    border-radius: 6px; cursor: pointer; display: flex;
}
.wcb2b-remove-item svg { width: 16px; height: 16px; fill: currentColor; }

.wcb2b-form-group { margin-bottom: 16px; }
.wcb2b-form-group label {
    display: block !important; font-size: 13px !important; font-weight: 600 !important;
    color: var(--wcb2b-dark) !important; margin-bottom: 6px !important;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.wcb2b-form-group input, .wcb2b-form-group textarea {
    width: 100%; padding: 12px;
    border: 2px solid var(--wcb2b-light) !important; 
    border-radius: 8px !important;
    font-size: 15px !important; color: var(--wcb2b-dark) !important;
    background: #fff !important; box-shadow: none !important;
}
.wcb2b-form-group input:focus, .wcb2b-form-group textarea:focus { border-color: var(--wcb2b-green) !important; outline: none; }

.wcb2b-submit-btn {
    background: var(--wcb2b-green) !important; color: white !important;
    border: none; padding: 14px; border-radius: 10px;
    font-size: 16px !important; font-weight: 700 !important;
    cursor: pointer; width: 100%; margin-top: 10px;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
}
.wcb2b-submit-btn:hover { background: #1da851 !important; transform: translateY(-2px); }

.wcb2b-btn-secondary {
    background: transparent !important; border: 1px solid #e5e7eb !important;
    color: var(--wcb2b-gray) !important; padding: 10px;
    border-radius: 8px; width: 100%; margin-top: 10px;
    cursor: pointer; font-size: 14px !important; font-weight: 600 !important;
}
.wcb2b-btn-secondary:hover { border-color: var(--wcb2b-gray) !important; color: var(--wcb2b-dark) !important; }