// CART PAGE — mobile ready function CartPage({ lang, cart, setCart, setPage, session }) { const settings = Store.getSettings(); const t = lang === 'pt' ? { title: 'Carrinho', empty: 'O seu carrinho está vazio.', shopNow: 'Ir às Compras', subtotal: 'Subtotal', delivery: 'Entrega', free: 'Grátis', total: 'Total', checkout: 'Finalizar Encomenda', freeOver: `Portes grátis acima de ${settings.freeDeliveryOver}€`, loginRequired: 'Entrar para finalizar' } : { title: 'Cart', empty: 'Your cart is empty.', shopNow: 'Go Shopping', subtotal: 'Subtotal', delivery: 'Delivery', free: 'Free', total: 'Total', checkout: 'Checkout', freeOver: `Free delivery over €${settings.freeDeliveryOver}`, loginRequired: 'Sign in to checkout' }; const updateQty = (id, delta) => { const updated = cart.map(item => item.id === id ? { ...item, qty: Math.max(1, item.qty + delta) } : item ); setCart(updated); Store.saveCart(updated); }; const removeItem = (id) => { const updated = cart.filter(item => item.id !== id); setCart(updated); Store.saveCart(updated); }; const subtotal = cart.reduce((s, i) => s + i.price * i.qty, 0); const deliveryFee = subtotal >= settings.freeDeliveryOver ? 0 : settings.deliveryFee; const total = subtotal + deliveryFee; if (cart.length === 0) return (