/**
 * Menu Item Card Styles
 * Dedicated CSS for menu item cards with modern design
 */

.menu-item {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border, #D1D5DB);
    border-radius: 12px;
    padding: 0;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.menu-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-color: var(--accent, #C1272D);
}

/* Menu Item Image */
.menu-item-image {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.menu-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: none;
    transform: none;
}

.menu-item:hover .menu-item-image img {
    transform: none;
}

/* Badges */
.menu-item-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 10;
}

.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.badge.popular {
    background: rgba(255, 193, 7, 0.9);
    color: #000;
    border-color: rgba(255, 193, 7, 0.5);
}

.badge.new {
    background: rgba(34, 197, 94, 0.9);
    color: #fff;
    border-color: rgba(34, 197, 94, 0.5);
}

.badge.chef-special {
    background: rgba(168, 85, 247, 0.9);
    color: #fff;
    border-color: rgba(168, 85, 247, 0.5);
}

/* Menu Item Content */
.menu-item-content {
    padding: 20px;
}

.menu-item-content.compact {
    padding: 20px;
}

.menu-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0;
    gap: 12px;
}

.menu-item-title {
    margin: 0;
    color: #1F2937;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.3;
    flex: 1;
}

.menu-item-price {
    color: var(--accent, #C1272D);
    font-size: 1.2rem;
    font-weight: 800;
    flex-shrink: 0;
    background: rgba(193, 39, 45, 0.1);
    padding: 6px 12px;
    border-radius: 8px;
    display: inline-block;
}

.menu-item-description {
    color: #4B5563;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 12px 0 0 0;
}

/* Menu Item Meta Information */
.menu-item-meta {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 15px;
    margin-top: 15px;
}

.ingredients {
    color: #1F2937;
    font-size: 0.875rem;
    margin-bottom: 6px;
    line-height: 1.4;
}

.ingredients .meta-label {
    font-weight: 600;
    color: #1F2937;
}

.ingredients .meta-value {
    color: #1F2937;
}

.ingredients strong {
    color: #1F2937;
}

.allergens {
    color: #92400E;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #FEF3C7;
    border-radius: 8px;
    border-left: 4px solid #F59E0B;
}

.allergens strong {
    color: #92400E;
    font-weight: 700;
}

/* Menu Item Details Row */
.menu-item-details {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.cooking-time,
.spice-level {
    display: flex;
    align-items: center;
    gap: 3px;
    color: #6B7280;
    font-size: 0.875rem;
    background: #F3F4F6;
    padding: 4px 8px;
    border-radius: 4px;
}

.spice-level {
    color: #DC2626;
    background: #FEE2E2;
}

/* Keep consistent borders for all menu items (no special case for data-source) */

/* Responsive Design */
@media (max-width: 768px) {
    .menu-item-image {
        height: 160px;
    }
    
    .menu-item-content {
        padding: 15px;
    }
    
    .menu-item-header {
        flex-direction: column;
        gap: 8px;
    }
    
    .menu-item-title {
        font-size: 1.1rem;
    }
    
    .menu-item-price {
        align-self: flex-start;
    }
    
    .menu-item-details {
        gap: 10px;
    }
}

/* Loading animation for images */
.menu-item-image img {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Special hover effects */
.menu-item:hover .menu-item-title {
    color: var(--text, #1F2937);
    transition: color 0.3s ease;
}

.menu-item:hover .badge {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}
