/* Chatbot Button */
#kaveri-chatbot-button {
    position: fixed;
    bottom: 70px;
    right: 12px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background-color: #8b3a3a;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 9999;
    transition: transform 0.3s ease;
}

#kaveri-chatbot-button:hover {
    transform: scale(1.05);
}

#kaveri-chatbot-button svg {
    width: 30px;
    height: 30px;
}

/* Chatbot Container */
#kaveri-chatbot-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 400px;
    height: 600px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 5px 40px rgba(0,0,0,0.2);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header */
#kaveri-chatbot-header {
    background: #8b3a3a;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 16px;
}

#kaveri-chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0 5px;
}

/* Messages Area */
#kaveri-chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f9f7f5;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Message Bubbles */
.message {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    margin-bottom: 5px;
}

.message.user {
    background: #e2d5cf;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    color: #333;
}

.message.assistant {
    background: white;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    color: #222;
}

.message.assistant.typing {
    color: #999;
    font-style: italic;
}

/* Category and Product Buttons */
.category-btn, .subcategory-btn, .back-btn {
    display: block;
    width: 100%;
    padding: 10px 15px;
    margin: 5px 0;
    background: white;
    border: 1px solid #e0d6d0;
    border-radius: 30px;
    text-align: left;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
}

.category-btn:hover, .subcategory-btn:hover {
    background: #8b3a3a;
    color: white;
    border-color: #8b3a3a;
}

.back-btn {
    background: #f0ece8;
    text-align: center;
    font-weight: 500;
    margin-top: 10px;
}

.back-btn:hover {
    background: #ddd;
}

/* Product Cards */
.product-card {
    background: white;
    border-radius: 12px;
    padding: 12px;
    margin: 8px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    gap: 12px;
    align-items: center;
}

.product-card img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.product-info {
    flex: 1;
}

.product-info h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: #222;
}

.product-info p {
    margin: 0 0 4px 0;
    font-size: 12px;
    color: #666;
}

.product-price {
    font-weight: 600;
    color: #8b3a3a;
    font-size: 14px;
    margin: 4px 0;
}

.product-btn {
    display: inline-block;
    background: #8b3a3a;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    text-decoration: none;
    transition: background 0.2s;
}

.product-btn:hover {
    background: #6b2a2a;
    color: white;
}

/* Input Area */
#kaveri-chatbot-input-area {
    display: flex;
    padding: 12px 15px;
    border-top: 1px solid #e0d6d0;
    background: white;
    gap: 10px;
}

#kaveri-chatbot-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    outline: none;
    font-size: 14px;
}

#kaveri-chatbot-input:focus {
    border-color: #8b3a3a;
}

#kaveri-chatbot-send {
    background: #8b3a3a;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 0 20px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

#kaveri-chatbot-send:hover {
    background: #6b2a2a;
}

/* Scrollbar styling */
#kaveri-chatbot-messages::-webkit-scrollbar {
    width: 5px;
}

#kaveri-chatbot-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#kaveri-chatbot-messages::-webkit-scrollbar-thumb {
    background: #c4b5ac;
    border-radius: 10px;
}

/* Responsive Design */
@media (max-width: 500px) {
    #kaveri-chatbot-container {
        width: 90%;
        right: 5%;
        bottom: 80px;
        height: 70vh;
    }
}