    #chat-toggle {
    position: fixed; bottom: 20px; right: 20px;
    width: 60px; height: 60px; background: var(--primary);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 30px; cursor: pointer; z-index: 3000; box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

#chat-container {
    position: fixed; bottom: 90px; right: 20px;
    width: 350px; height: 450px; background: var(--bg);
    border: 1px solid #334155; border-radius: 15px;
    display: none; flex-direction: column; z-index: 3000; overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

#chat-header { background: var(--primary); padding: 15px; display: flex; justify-content: space-between; font-weight: bold; }

#chat-messages { flex-grow: 1; padding: 15px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }

.msg { padding: 10px 15px; border-radius: 15px; max-width: 80%; font-size: 0.9rem; white-space: pre-wrap; /* Esto mantiene los espacios y saltos de línea */
    word-wrap: break-word;}
.msg.user { background: #334155; color: var(--user-msg-text);align-self: flex-end; }
.msg.bot { background: var(--bot-msg-bg);color: var(--bot-msg-text); align-self: flex-start; }

#chat-input-area { padding: 10px; display: flex; gap: 5px; background: var(--card-bg); }
#chat-input { flex-grow: 1; background: transparent; border: 1px solid #334155; color: #000; padding: 8px; border-radius: 5px; outline: none; }
.chat-btn-modern {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
}

.chat-btn-modern:hover {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 15px 30px rgba(37, 99, 235, 0.5);
}

.chat-btn-modern:active {
    transform: scale(0.9);
}

.notification-dot {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 12px;
    height: 12px;
    background: #10b981; /* Verde esmeralda */
    border: 1px solid white;
    border-radius: 50%;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.glass-chat {
    position: fixed;
    bottom: 90px;
    right: 25px;
    width: 380px;
    height: 550px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 24px;
    display: none; 
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    overflow: hidden;
    z-index: 10000;
}
#chat-header {
    padding: 18px 22px;
    background: #1d4ed8;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-status-pulse {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: pulse 2s infinite;
}

.brand-name {
    font-size: 1rem;
    letter-spacing: 0.5px;
}

.brand-name b { color: #3b82f6; }

.brand-name small {
    display: block;
    font-size: 0.65rem;
    opacity: 0.6;
    margin-top: -2px;
}
#chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: linear-gradient(to bottom, #f8fafc, #ffffff);
}
#chat-input-area {
    padding: 15px;
    background: white;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 10px;
}

#chat-input {
    flex: 1;
    border: 1px solid #e2e8f0;
    padding: 12px 16px;
    border-radius: 14px;
    outline: none;
    font-size: 0.95rem;
    transition: border 0.3s;
}

#chat-input:focus {
    border-color: #3b82f6;
}

.attach-btn {
    color: #64748b;
    transition: color 0.3s;
}

.attach-btn:hover { color: #3b82f6; }

.send-btn {
    background: #3b82f6;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.send-btn:hover {
    background: #2563eb;
    transform: scale(1.05);
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    70% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}
.btn-premium-chat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
    padding: 12px 20px;
    width: 100%;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(22, 163, 74, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Efecto de brillo que pasa sobre el botón */
.btn-premium-chat::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
    transition: 0.5s;
    pointer-events: none;
}

.btn-premium-chat:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.4);
    filter: brightness(1.1);
}

.btn-premium-chat:hover::after {
    left: 120%;
}

.btn-premium-chat:active {
    transform: translateY(1px);
}

.btn-premium-chat .price {
    background: rgba(0, 0, 0, 0.15);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    margin-left: 10px;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.btn-premium-chat {
    animation: fadeInUp 0.4s ease-out forwards;
}
.chat-bubble-alert {
    position: absolute;
    bottom: 75px; 
    right: 0;
    background: #3b82f6; 
    color: white;
    padding: 10px 15px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: bold;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: none; 
    animation: floating 2s infinite ease-in-out;
    z-index: 10000;
}
.arrow-down {
    position: absolute;
    bottom: -8px;
    right: 20px;
    width: 0; 
    height: 0; 
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #3b82f6;
}
@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0px); }
}
.chat-btn-modern {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
    z-index: 9999;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-btn-modern:hover { transform: scale(1.1); }
.smart-alert {
    position: absolute;
    bottom: 80px;
    right: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
    color: #1e293b;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s ease;
    pointer-events: none;
}
.pulse-icon {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    position: relative;
}

.pulse-icon::after {
    content: '';
    position: absolute;
    width: 100%; height: 100%;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-ring 1.5s infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(3); opacity: 0; }
}
.smart-alert.show {
    opacity: 1;
    transform: translateY(0);
}
.chat-counter {
    position: absolute;
    top: -5px;
    left: -5px;
    width: 20px;
    height: 20px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    border: 2px solid white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transform: scale(0);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 11;
}
.chat-counter.showx {
    transform: scale(1);
    opacity: 1;
}