// Early initialization script to prevent flash of wrong background
// Loads before woodPaneling.js to apply paneling immediately

const WOOD_INIT_STORAGE_KEY = "wood-paneling";

// Apply wood paneling immediately (before DOM ready if possible)
(function () {
  const woodPaneling = localStorage.getItem(WOOD_INIT_STORAGE_KEY) || "none";
  if (woodPaneling !== "none") {
    const container = document.getElementById("collections-container");
    if (container) {
      container.classList.add(`bg-${woodPaneling}`);
      container.setAttribute("data-wood", woodPaneling);
      document.body.classList.add(`bg-${woodPaneling}`);
    }
  }
})();
