// Shop loader for shop.html and product.html (async () => { const DATA = 'assets/products.json'; async function fetchProducts(){ try { const res = await fetch(DATA, {cache: "no-store"}); if(!res.ok) throw new Error('Failed to load products'); return await res.json(); } catch (err) { console.error(err); return []; } } const products = await fetchProducts(); const grid = document.getElementById('product-grid'); const productPage = document.getElementById('product-page'); // SHOP GRID if (grid) { grid.innerHTML = ''; if(products.length === 0){ grid.innerHTML = '
${p.short}
Product not found. Back to shop
${product.long}