// Product image placeholder SVGs by category function ProductImage({ type, size = 160 }) { const configs = { nata: { bg: '#3d2214', accent: '#e8c97a', label: 'Pastel de Nata' }, bolo: { bg: '#3a1828', accent: '#d4a0c0', label: 'Bolo' }, rissol: { bg: '#1e3214', accent: '#a0c870', label: 'Rissol' }, coxinha: { bg: '#332214', accent: '#e8b870', label: 'Coxinha' }, choco: { bg: '#221414', accent: '#9b5523', label: 'Bolo Choco' }, custom: { bg: '#142236', accent: '#70a8d4', label: 'Personalizado' }, chamuca: { bg: '#332e14', accent: '#d4c870', label: 'Chamuça' }, tematico:{ bg: '#261232', accent: '#c070d4', label: 'Temático' }, empada: { bg: '#2e2414', accent: '#d4b870', label: 'Empada' }, feijao: { bg: '#261e14', accent: '#c8a060', label: 'P. Feijão' }, }; const c = configs[type] || { bg: '#2a1a0c', accent: '#d4993a', label: type }; const shapeMap = { nata: 'circle', bolo: 'cake', rissol: 'half', coxinha: 'drop', choco: 'cake', custom: 'star', chamuca: 'triangle', tematico: 'cake', empada: 'circle', feijao: 'oval' }; const shape = shapeMap[type] || 'circle'; const s = size; return ( {[0,1,2,3,4,5,6,7,8,9,10,11].map(i => ( ))} {shape==='circle' && } {shape==='cake' && <>} {shape==='half' && } {shape==='drop' && } {shape==='triangle' && } {shape==='oval' && } {shape==='star' && } {c.label} ); } // Toast notification function Toast({ message, type = 'success', onClose }) { React.useEffect(() => { const t = setTimeout(onClose, 3000); return () => clearTimeout(t); }, []); const bg = type === 'success' ? '#243d16' : type === 'error' ? '#3d1616' : '#3d2b0a'; const border = type === 'success' ? 'rgba(80,180,40,0.4)' : type === 'error' ? 'rgba(200,60,60,0.4)' : 'rgba(212,153,58,0.4)'; return (
{type === 'success' ? '✓' : type === 'error' ? '✕' : 'ℹ'} {message}
); } // Cart badge function Badge({ count }) { if (!count) return null; return ( {count > 9 ? '9+' : count} ); } // Modal function Modal({ children, onClose, title, wide = false }) { return (
e.target === e.currentTarget && onClose()}>

{title}

{children}
); } // Section title function SectionTitle({ children, subtitle, center = true }) { return (

{children}

{subtitle &&

{subtitle}

}
); } // Input base style const inputStyle = { width: '100%', background: 'rgba(255,255,255,0.05)', border: '1px solid var(--border)', borderRadius: 6, color: 'var(--cream)', fontFamily: 'Lato, sans-serif', fontSize: 14, padding: '10px 14px', outline: 'none', boxSizing: 'border-box', transition: 'border-color 0.2s' }; // Primary button function BtnPrimary({ children, onClick, disabled, full, small, type = 'button' }) { const [hov, setHov] = React.useState(false); return ( ); } // Ghost button function BtnGhost({ children, onClick, small }) { const [hov, setHov] = React.useState(false); return ( ); } Object.assign(window, { ProductImage, Toast, Badge, Modal, Stars: () => null, SectionTitle, inputStyle, BtnPrimary, BtnGhost });