function addToCart(e) {
const current_card = e.target.closest('.card');
const name = current_card.querySelector('.name').innerHTML,
price = current_card.querySelector('.price').innerHTML;
const name_price = document.createElement('DIV');
name_price.classList.add('flex-name-price');
name_price.insertAdjacentHTML('beforeend', `${price} ${name}`);
const selectedItem = document.createElement('DIV'),
img = document.createElement('IMG');
selectedItem.classList.add('cart-img');
img.setAttribute('src', current_card.querySelector('img').src);
selectedItem.append(img, name_price);
const cartItems = document.querySelector('#cart');
cartItems.append(selectedItem);
}