/** Shopify CDN: Minification failed

Line 16:0 Comments in CSS use "/* ... */" instead of "//"
Line 18:2 Comments in CSS use "/* ... */" instead of "//"
Line 18:37 Unterminated string token
Line 20:4 Comments in CSS use "/* ... */" instead of "//"
Line 22:6 Comments in CSS use "/* ... */" instead of "//"
Line 25:6 Comments in CSS use "/* ... */" instead of "//"
Line 31:4 Comments in CSS use "/* ... */" instead of "//"
Line 33:6 Comments in CSS use "/* ... */" instead of "//"
Line 47:6 Comments in CSS use "/* ... */" instead of "//"
Line 55:6 Comments in CSS use "/* ... */" instead of "//"
... and 2 more hidden warnings

**/
// Hide prices for Film Collection products
document.addEventListener('DOMContentLoaded', function() {
  // Check if we're on a product page
  if (window.location.pathname.includes('/products/')) {
    // Function to check if this product is in the Film Collection
    function checkIfInFilmCollection() {
      // Look for collection links that contain "film-collection"
      const collectionLinks = document.querySelectorAll('a[href*="film-collection"]');
      
      // If we found any links to the film collection, this product is part of it
      if (collectionLinks.length > 0) {
        hideProductPrices();
      }
    }
    
    // Function to hide all price elements and add-to-cart buttons
    function hideProductPrices() {
      // Hide price elements - targeting common class names and selectors
      const priceSelectors = [
        '.price', 
        '.product-price', 
        '.price__regular',
        '.price__sale',
        '.price-item',
        '[data-product-price]',
        '.product__price',
        '.product-single__price',
        '.product-form__price',
        '.price-wrapper'
      ];
      
      // Hide all price elements
      priceSelectors.forEach(selector => {
        const elements = document.querySelectorAll(selector);
        elements.forEach(el => {
          el.style.display = 'none';
        });
      });
      
      // Hide add to cart buttons and quantity selectors
      const cartSelectors = [
        '.product-form__cart-submit',
        '.add-to-cart',
        'button[name="add"]',
        '.product-form__submit',
        'form[action="/cart/add"]',
        '.product-form__quantity-selector',
        '.quantity-selector',
        'input[name="quantity"]'
      ];
      
      cartSelectors.forEach(selector => {
        const elements = document.querySelectorAll(selector);
        elements.forEach(el => {
          el.style.display = 'none';
        });
      });
      
      // Add a "Watch Film" button
      const productDescription = document.querySelector('.product-single__description, .product__description');
      if (productDescription) {
        const watchButton = document.createElement('div');
        watchButton.className = 'watch-film-button';
        watchButton.innerHTML = '<button type="button" class="btn">Watch Film</button>';
        watchButton.style.marginTop = '20px';
        productDescription.appendChild(watchButton);
      }
    }
    
    // Run the check
    checkIfInFilmCollection();
  }
});
