document.addEventListener("DOMContentLoaded", () => {
  if (!archiveImagesData || !archiveImagesData.products) return;

  const products = document.querySelectorAll(".product[data-sku]");

  products.forEach(product => {
    const sku = product.dataset.sku;
    const productInfo = archiveImagesData.products[sku];

    if (productInfo && productInfo.img) {
      const img = product.querySelector("img")
      img.src = productInfo.img;
      img.srcset = productInfo.img;
      img.alt = sku;
    }
  });
});
