/* chatbot.css - Diseño premium responsive */
#chatbot-flotante {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Poppins', sans-serif;
}

#chatbot-toggle {
    width: 60px;
    height: 60px;
    background: linear-gradient(145deg, #0d6efd, #0a58ca);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
}
#chatbot-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 28px rgba(0,0,0,0.25);
}

#chatbot-panel {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 400px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: 70vh;
    background: #ffffff;
    border-radius: 28px;
    box-shadow: 0 20px 35px -10px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(0px);
    transition: all 0.2s;
}

/* Header */
.chatbot-header {
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    color: white;
    padding: 16px 20px;
    font-weight: 600;
    font-size: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.chatbot-header button {
    background: none;
    border: none;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    opacity: 0.8;
}
.chatbot-header button:hover { opacity: 1; }

/* Área de mensajes */
#chatbot-mensajes {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f7f9fc;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
/* Burbujas */
.mensaje-usuario {
    align-self: flex-end;
    background: #0d6efd;
    color: white;
    border-radius: 20px 20px 5px 20px;
    padding: 10px 16px;
    max-width: 85%;
    word-wrap: break-word;
    font-size: 0.9rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.mensaje-bot {
    align-self: flex-start;
    background: white;
    color: #1e293b;
    border-radius: 20px 20px 20px 5px;
    padding: 10px 16px;
    max-width: 85%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
    font-size: 0.9rem;
}
/* Listado de productos */
.productos-lista {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.producto-item {
    background: #f1f5f9;
    border-radius: 18px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: 0.2s;
}
.producto-img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 14px;
    background: #cbd5e1;
}
.producto-info {
    flex: 1;
}
.producto-nombre {
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 2px;
}
.producto-precio {
    font-size: 0.8rem;
    color: #198038;
    font-weight: 600;
}
.btn-comprar {
    background: #198038;
    color: white;
    border: none;
    border-radius: 40px;
    padding: 6px 14px;
    font-size: 0.7rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: 0.2s;
}
.btn-comprar:hover {
    background: #0f6a2f;
    color: white;
}
.entrada-item {
    background: #f1f5f9;
    border-radius: 18px;
    padding: 12px;
}
.entrada-titulo {
    font-weight: 700;
    font-size: 0.85rem;
}
.entrada-desc {
    font-size: 0.75rem;
    color: #475569;
}
/* Footer */
.chatbot-footer {
    padding: 12px;
    background: white;
    border-top: 1px solid #e9eef3;
}
.input-group-custom {
    display: flex;
    gap: 8px;
}
#chatbot-input {
    flex: 1;
    border-radius: 40px;
    border: 1px solid #cbd5e1;
    padding: 10px 16px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
}
#chatbot-enviar {
    background: #0d6efd;
    border: none;
    border-radius: 40px;
    padding: 0 20px;
    color: white;
    font-weight: 600;
}
/* Scroll */
#chatbot-mensajes::-webkit-scrollbar { width: 5px; }
#chatbot-mensajes::-webkit-scrollbar-track { background: #e2e8f0; border-radius: 10px; }
#chatbot-mensajes::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 10px; }

/* Responsive: pantallas pequeñas */
@media (max-width: 550px) {
    #chatbot-panel {
        width: calc(100vw - 30px);
        right: 0;
        bottom: 70px;
        max-height: 65vh;
        border-radius: 24px;
    }
    #chatbot-toggle {
        width: 52px;
        height: 52px;
        font-size: 24px;
        bottom: 15px;
        right: 15px;
    }
    .producto-item {
        flex-wrap: wrap;
    }
    .btn-comprar {
        margin-left: auto;
    }
}