// HOME PAGE — lighter palette + mobile function HomePage({ setPage, lang }) { const t = lang === 'pt' ? { hero1: 'Iguarias', hero2: 'com Alma', heroSub: 'Pastelaria variada & salgados portugueses em Torres Vedras', cta1: 'Ver Loja', cta2: 'Encomendar via WhatsApp', featTitle: 'Os Nossos Favoritos', featSub: 'Feitos artesanalmente com os melhores ingredientes', delivTitle: 'Entregamos em Torres Vedras', delivSub: 'Encomende online e receba em casa', whyTitle: 'Porquê a Dom Papança?', feat1: 'Receitas Tradicionais', feat1d: 'Sabores autênticos da pastelaria portuguesa, feitos com ingredientes selecionados.', feat2: 'Entrega ao Domicílio', feat2d: 'Receba as suas iguarias frescas diretamente em casa, em Torres Vedras.', feat3: 'Encomendas Personalizadas', feat3d: 'Bolos de aniversário e encomendas especiais feitas a pedido.', viewAll: 'Ver todos os produtos', } : { hero1: 'Portuguese', hero2: 'Pastries', heroSub: 'Traditional pastries & savoury bites in Torres Vedras', cta1: 'Shop Now', cta2: 'Order via WhatsApp', featTitle: 'Our Favourites', featSub: 'Handcrafted with the finest ingredients', delivTitle: 'Delivering in Torres Vedras', delivSub: 'Order online and receive at home', whyTitle: 'Why Dom Papança?', feat1: 'Traditional Recipes', feat1d: 'Authentic flavours from Portuguese pastry tradition.', feat2: 'Home Delivery', feat2d: 'Receive your fresh treats delivered to your door in Torres Vedras.', feat3: 'Custom Orders', feat3d: 'Birthday cakes and special orders made to request.', viewAll: 'View all products', }; const products = Store.getProducts().filter(p => p.featured); return (
{/* HERO */}
{Array.from({length: 18}).map((_, i) => ( ))}
Torres Vedras · Portugal

{t.hero1}
{t.hero2}

{t.heroSub}

setPage('shop')}>{t.cta1} 📱 {t.cta2}
{/* Stats strip */}
{[['100%', lang==='pt'?'Artesanal':'Handmade'], ['🚚', lang==='pt'?'Entrega Local':'Local Delivery'], ['🎂', lang==='pt'?'Encomendas':'Custom Orders']].map(([v,l])=>(
{v}
{l}
))}
{lang==='pt'?'Rolar':'Scroll'}
{/* FEATURED */}
{t.featTitle}
{products.map(p => ( {}} /> ))}
setPage('shop')}>{t.viewAll}
{/* WHY US */}
{t.whyTitle}
{[ { icon: '🍮', title: t.feat1, desc: t.feat1d }, { icon: '🚚', title: t.feat2, desc: t.feat2d }, { icon: '🎂', title: t.feat3, desc: t.feat3d }, ].map(f => (
{f.icon}

{f.title}

{f.desc}

))}
{/* BANNER */}

{t.delivTitle}

{t.delivSub}

); } // PRODUCT CARD function ProductCard({ product, lang, showToast, addToCart }) { const [hov, setHov] = React.useState(false); const [added, setAdded] = React.useState(false); const handleAdd = () => { if (!addToCart) return; addToCart(product); setAdded(true); setTimeout(() => setAdded(false), 1500); }; const catLabels = { doces: 'Doces', bolos: 'Bolos', salgados: 'Salgados', encomendas: 'Encomenda' }; return (
setHov(true)} onMouseLeave={() => setHov(false)} style={{ background: hov ? 'var(--card-hov)' : 'var(--card)', border: `1px solid ${hov ? 'var(--border-hov)' : 'var(--border)'}`, borderRadius: 10, overflow: 'hidden', transition: 'all 0.25s', transform: hov ? 'translateY(-3px)' : 'none', boxShadow: hov ? '0 12px 40px rgba(0,0,0,0.4)' : '0 2px 10px rgba(0,0,0,0.25)' }}>
{catLabels[product.category] || product.category}
{!product.available && (
{lang === 'pt' ? 'Esgotado' : 'Sold Out'}
)}

{product.name}

{product.description}

{product.price.toFixed(2)}€ {addToCart && product.available && ( )}
); } // FOOTER — mobile ready function Footer({ lang, setPage }) { const t = lang === 'pt' ? { tagline: 'Pastelaria variada & salgados portugueses', loc: 'Torres Vedras, Portugal', links: 'Ligações', shop: 'Loja', about: 'Sobre Nós', contact: 'Contacto', hours: 'Horário', h1: 'Seg–Sex: 8h–19h', h2: 'Sáb: 8h–14h', h3: 'Dom: Fechado', rights: 'Todos os direitos reservados' } : { tagline: 'Traditional pastries & savoury bites', loc: 'Torres Vedras, Portugal', links: 'Links', shop: 'Shop', about: 'About', contact: 'Contact', hours: 'Opening Hours', h1: 'Mon–Fri: 8am–7pm', h2: 'Sat: 8am–2pm', h3: 'Sun: Closed', rights: 'All rights reserved' }; return ( ); } Object.assign(window, { HomePage, ProductCard, Footer });