/* Products Modal Styles */
.ai-products-modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ai-products-modal .modal-content {
    background: white;
    border-radius: 12px;
    max-width: 90%;
    max-height: 90vh;
    width: 1200px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.ai-products-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.ai-products-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.ai-products-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.ai-products-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.ai-products-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.ai-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

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

.ai-product-card-modal:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.ai-product-card-modal img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid #e0e0e0;
}

.ai-product-info {
    padding: 15px;
}

.ai-product-info h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

.ai-product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    font-size: 14px;
}

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

.ai-product-rating span:last-child {
    color: #666;
    font-size: 12px;
}

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

.ai-product-price {
    font-size: 18px;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 12px;
}

.ai-product-btn {
    display: inline-block;
    padding: 8px 16px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.ai-product-btn:hover {
    background: #2980b9;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .ai-products-modal .modal-content {
        max-width: 95%;
        max-height: 95vh;
        margin: 10px;
    }
    
    .ai-products-grid {
        grid-template-columns: 1fr;
    }
    
    .ai-products-modal-header {
        padding: 15px;
    }
    
    .ai-products-modal-body {
        padding: 15px;
    }
}