/* Inline Product Cards within AI Message */
.ai-products-inline {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.ai-product-card-inline {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.3s ease;
}

.ai-product-card-inline:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-color: #3498db;
}

.product-inline-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Row 1: Image + Title (2 columns) */
.product-inline-header {
    display: flex;
    gap: 12px;
    align-items: center;
}

.product-inline-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.product-inline-title {
    flex: 1;
}

.product-inline-title h5 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

/* Row 2+: Full width content */
.product-inline-details {
    width: 100%;
}

.product-inline-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

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

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

.product-inline-description {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.product-inline-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.product-inline-price {
    font-size: 16px;
    font-weight: bold;
    color: #e74c3c;
    margin: 0;
}

.product-inline-link {
    display: inline-block;
    padding: 6px 12px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    transition: background 0.3s ease;
}

.product-inline-link:hover {
    background: #2980b9;
}

/* More Products Button */
.ai-more-products-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.ai-more-products-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

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

.ai-more-products-btn svg {
    width: 16px;
    height: 16px;
}

/* Hide the separate product carousel when inline products are shown */
.convertybot-message:has(.ai-products-inline) + .convertybot-products {
    display: none !important;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .ai-products-inline {
        padding: 10px;
        gap: 10px;
    }

    .ai-product-card-inline {
        padding: 10px;
    }

    /* Keep horizontal layout on mobile, just smaller */
    .product-inline-content {
        flex-direction: column;
        gap: 8px;
    }

    .product-inline-header {
        flex-direction: row;
        gap: 10px;
    }

    .product-inline-image {
        width: 50px;
        height: 50px;
        flex-shrink: 0;
    }

    .product-inline-title h5 {
        font-size: 13px;
        line-height: 1.3;
    }

    .product-inline-description {
        font-size: 12px;
        -webkit-line-clamp: 2;
    }

    .product-inline-price {
        font-size: 14px;
    }

    .product-inline-link {
        padding: 5px 10px;
        font-size: 12px;
    }

    .ai-more-products-btn {
        padding: 8px 16px;
        font-size: 11px;
    }
}