/**
 * Frontend CSS Fixes for ConvertyBot Chatbot
 */

/* Products inside message bubble */
.products-in-message {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.products-in-message .products-carousel {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
}

.products-in-message .product-card {
    flex: 0 0 250px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    background: #f9f9f9;
}

.products-in-message .product-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 8px;
}

.products-in-message .product-card h5 {
    margin: 0 0 6px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* Product rating */
.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 5px 0;
    font-size: 13px;
}

.product-rating .stars {
    color: #ffc107;
    letter-spacing: 2px;
}

.product-rating .reviews {
    color: #666;
    font-size: 12px;
}

/* Product description */
.product-description {
    margin: 8px 0;
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Price styling */
.product-card .price {
    font-size: 16px;
    font-weight: bold;
    color: #e74c3c;
    margin: 8px 0;
}

/* View Product button */
.btn-view-product {
    width: 100%;
    padding: 8px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-view-product:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.btn-view-product.clicked {
    background: #95a5a6;
    cursor: not-allowed;
}

/* See More Products button */
.see-more-products-custom {
    display: block;
    width: 100%;
    margin: 15px 0;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.see-more-products-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Hide separate products div when products are in message */
.products-in-message + #convertybot-products {
    display: none !important;
}

/* Responsive design */
@media (max-width: 480px) {
    .products-in-message .products-carousel {
        flex-direction: column;
    }
    
    .products-in-message .product-card {
        flex: 1 1 auto;
        max-width: 100%;
    }
}