/* --- 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);
}

/* FORZAR FUENTE MODERNA (Ignorar Tema) */
.wcb2b-modal, .wcb2b-modal *, 
.wcb2b-floating-cart, .wcb2b-toast, .wcb2b-toast * {
    font-family: var(--wcb2b-font) !important;
    box-sizing: border-box;
    line-height: 1.5;
}

/* --- 1. NOTIFICACIÓN TOAST (Burbuja de "Agregado") --- */
.wcb2b-toast {
    position: fixed;
    bottom: 100px; /* Encima del carrito */
    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); }
}

/* --- 2. BOTÓN FLOTANTE (CARRITO) --- */
.wcb2b-floating-cart {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--wcb2b-green) !important;
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 99990;
    transition: transform 0.2s ease;
}

.wcb2b-floating-cart:hover { transform: scale(1.1); }

.wcb2b-cart-icon svg { width: 28px; height: 28px; fill: white; }

.wcb2b-cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444 !important;
    color: white !important;
    font-size: 11px !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;
}

/* --- 3. MODAL (POPUP) --- */
.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: 99999; 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); } }

/* BOTÓN CERRAR (CORREGIDO - LIMPIO) */
.wcb2b-modal-close {
    position: absolute; 
    top: 15px; 
    right: 15px;
    background: transparent !important; /* Sin fondo */
    border: none !important;            /* Sin borde */
    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 { 
    background: transparent !important;
    color: var(--wcb2b-dark) !important; 
}

/* HEADER */
.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; }

/* LISTA DE PRODUCTOS */
.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; }

/* FORMULARIO */
.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 {
    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 {
    border-color: var(--wcb2b-green) !important; outline: none;
}

/* BOTONES */
.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; }