/** Shopify CDN: Minification failed

Line 9:0 Unexpected "("
Line 23:6 Comments in CSS use "/* ... */" instead of "//"

**/
/* Move the existing availability panel into the product-page shipping card.
   This changes layout only; it does not change rate calculations or the cart. */
(() => {
  if (window.pcCombinedShippingInstalled) return;
  window.pcCombinedShippingInstalled = true;
  let frame;

  function combine() {
    document.querySelectorAll('.product-block-list__item--shipping').forEach(block => {
      if (block.closest('.modal, [role="dialog"]')) return;
      const section = block.closest('[data-section-type="product"]') || block.closest('.shopify-section');
      if (!section || !section.querySelector('h1.product-meta__title')) return;
      const card = block.querySelector('.card');
      const panel = section.querySelector('pc-pickup-panel');
      if (!card || !panel || panel.closest('.modal, [role="dialog"]')) return;
      const status = (panel.dataset.status || '').toLowerCase();
      // Virtual licences have no physical shipping to estimate.
      if (panel.dataset.virtual === 'true' || status.includes('virtual delivery')) return;
      if (!card.contains(panel)) card.prepend(panel);
      card.classList.add('pc-combined-shipping');
    });
  }

  function schedule() {
    cancelAnimationFrame(frame);
    frame = requestAnimationFrame(combine);
  }
  function start() {
    combine();
    new MutationObserver(schedule).observe(document.body, {childList: true, subtree: true});
    document.addEventListener('shopify:section:load', schedule);
  }
  if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', start, {once:true});
  else start();
})();
