/* Scoped to: interior-product-showcase-template-interior-view */
(function() {
  'use strict';
  var componentRoots = document.querySelectorAll('[data-component-slug="interior-product-showcase-template-interior-view"]');
  componentRoots.forEach(function(componentRoot) {
    // Helper to query within component, with fallback to document for sibling elements
    var $ = function(sel) { 
      return componentRoot.querySelector(sel) || document.querySelector('[data-component-slug="interior-product-showcase-template-interior-view"] ~ ' + sel) || document.querySelector(sel);
    };
    var $$ = function(sel) { 
      var results = componentRoot.querySelectorAll(sel);
      return results.length ? results : document.querySelectorAll(sel);
    };
    // Original component JS runs in this scope
    (function() { const sections = document.querySelectorAll('.iv-image-wrapper'); const observer = new IntersectionObserver((entries) => { entries.forEach(entry => { if (entry.isIntersecting) { window.addEventListener('scroll', onScroll); onScroll(); } else { window.removeEventListener('scroll', onScroll); } }); }, { threshold: 0 }); sections.forEach(sec => observer.observe(sec)); function onScroll() { sections.forEach(wrapper => { const rect = wrapper.getBoundingClientRect(); const windowHeight = window.innerHeight; const visiblePart = (windowHeight - rect.top) / (windowHeight + rect.height); if (visiblePart >= 0 && visiblePart <= 1) { const moveY = -10 + (visiblePart * 20); const img = wrapper.querySelector('.parallax-img'); if(img) { img.style.transform = `translateY(${moveY}%) scale(1.1)`; } } }); } })();
  });
})();