/* AI Recommendations Section Styles */
.recommendations-section {
    margin: 25px 0;
    padding: 20px;
    background: linear-gradient(135deg, rgba(0, 166, 81, 0.05) 0%, rgba(0, 143, 69, 0.08) 100%);
    border-radius: 20px;
    border: 1px solid rgba(0, 166, 81, 0.15);
    backdrop-filter: blur(10px);
    animation: recommendationsSlideIn 0.6s ease-out;
}

@keyframes recommendationsSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.recommendations-header {
    text-align: center;
    margin-bottom: 25px;
}

.recommendations-title {
    font-size: 22px;
    font-weight: 700;
    color: #00A651;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.recommendations-title i {
    font-size: 24px;
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        text-shadow: 0 0 5px rgba(0, 166, 81, 0.3);
    }
    50% {
        text-shadow: 0 0 15px rgba(0, 166, 81, 0.6);
    }
}

.recommendations-subtitle {
    font-size: 15px;
    color: #666;
    margin: 0;
    font-weight: 500;
}

/* Recommendations Grid */
.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.recommendation-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    cursor: pointer;
}

.recommendation-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 166, 81, 0.2);
}

/* Recommendation Image */
.recommendation-image-container {
    position: relative;
    height: 120px;
    overflow: hidden;
}

.recommendation-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recommendation-card:hover .recommendation-image {
    transform: scale(1.05);
}

/* Recommendation Badges */
.recommendation-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(45deg, #00A651, #008f45);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 10px rgba(0, 166, 81, 0.3);
    z-index: 2;
}

.recommendation-badge i {
    font-size: 10px;
    animation: badgePulse 1.5s infinite;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.recommendation-score {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #00A651;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

/* Recommendation Content */
.recommendation-content {
    padding: 15px;
}

.recommendation-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
    line-height: 1.3;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    line-clamp:2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.recommendation-price {
    font-size: 16px;
    font-weight: 700;
    color: #00A651;
    margin: 0 0 10px 0;
}

.recommendation-reason {
    font-size: 12px;
    color: #666;
    margin: 0 0 12px 0;
    line-height: 1.4;
    height: 34px;
    overflow: hidden;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Add to Cart Button */
.recommendation-add-btn {
    width: 100%;
    background: linear-gradient(45deg, #00A651, #008f45);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 10px 15px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.recommendation-add-btn:hover {
    background: linear-gradient(45deg, #008f45, #007a3a);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 166, 81, 0.3);
}

.recommendation-add-btn:active {
    transform: translateY(0);
}

.recommendation-add-btn i {
    font-size: 12px;
}

/* Dark Mode Support */
body.dark-mode .recommendations-section {
    background: linear-gradient(135deg, rgba(0, 166, 81, 0.1) 0%, rgba(0, 143, 69, 0.15) 100%);
    border-color: rgba(0, 166, 81, 0.3);
}

body.dark-mode .recommendation-card {
    background: #111827;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

body.dark-mode .recommendation-card:hover {
    box-shadow: 0 12px 30px rgba(0, 166, 81, 0.3);
}

body.dark-mode .recommendation-name {
    color: #e5e7eb;
}

body.dark-mode .recommendation-price {
    color: #10b981;
}

body.dark-mode .recommendation-reason {
    color: #9ca3af;
}

body.dark-mode .recommendation-score {
    background: rgba(30, 41, 59, 0.9);
    color: #10b981;
}

/* Responsive Design */
@media (max-width: 768px) {
    .recommendations-section {
        padding: 15px;
        margin: 20px 0;
    }
    
    .recommendations-title {
        font-size: 20px;
    }
    
    .recommendations-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 12px;
    }
    
    .recommendation-image-container {
        height: 100px;
    }
    
    .recommendation-content {
        padding: 12px;
    }
    
    .recommendation-name {
        font-size: 14px;
        height: 36px;
    }
    
    .recommendation-price {
        font-size: 15px;
    }
    
    .recommendation-reason {
        font-size: 11px;
        height: 30px;
    }
    
    .recommendation-add-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .recommendations-section {
        padding: 12px;
        margin: 15px 0;
    }
    
    .recommendations-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .recommendation-image-container {
        height: 90px;
    }
    
    .recommendation-content {
        padding: 10px;
    }
    
    .recommendation-name {
        font-size: 13px;
        height: 32px;
    }
    
    .recommendation-price {
        font-size: 14px;
    }
    
    .recommendation-reason {
        font-size: 10px;
        height: 26px;
    }
}

/* Loading State */
.recommendations-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #666;
}

.recommendations-loading i {
    font-size: 24px;
    margin-right: 10px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Empty State */
.recommendations-empty {
    text-align: center;
    padding: 30px 20px;
    color: #666;
}

.recommendations-empty i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.recommendations-empty p {
    margin: 0;
    font-size: 16px;
}

/* Animation for newly added items */
.recommendation-card.added {
    animation: itemAdded 0.6s ease;
}

@keyframes itemAdded {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(0, 166, 81, 0.5);
    }
    100% {
        transform: scale(1);
    }
}