
    // Ensure DOM is loaded and functions are available
    function applyRegionalPricing() {
      console.log('Applying regional pricing...');

      // Check if functions exist
      if (typeof updatePromoBanner !== 'function') {
        console.error('updatePromoBanner function not found');
        return;
      }
      if (typeof updatePlanPricing !== 'function') {
        console.error('updatePlanPricing function not found');
        return;
      }

      // Update promo banner and pricing
      updatePromoBanner('UPSTREAM-7K9M2P', 33);

      // Update pricing section with base prices
      const basePrices = { lite: 30, basic: 60 };
      Object.entries(basePrices).forEach(([plan, basePrice]) => {
        console.log('Calling updatePlanPricing for', plan, 'with base price', basePrice, 'and discount', 33);
        updatePlanPricing(plan, basePrice, 33);
      });

      // Set discount on pricing section
      const pricingSection = document.querySelector('.js-pricing-section');
      if (pricingSection) {
        pricingSection.dataset.discount = '33';
      }
    }

    // Try to apply immediately, or wait for DOM
    if (document.readyState === 'loading') {
      document.addEventListener('DOMContentLoaded', applyRegionalPricing);
    } else {
      // DOM is already loaded, but functions might not be available yet
      if (typeof updatePromoBanner === 'function') {
        applyRegionalPricing();
      } else {
        // Wait a bit for scripts to load
        setTimeout(applyRegionalPricing, 100);
      }
    }
  