/** Shopify CDN: Minification failed

Line 7:0 Unexpected "("

**/
/* Robgamer v14 — cartão de entrega no carrinho (Envio Flash pré-marcado) */
(() => {
  if (window.RobgamerV14) return; window.RobgamerV14 = true;
  const BOLT = '<svg viewBox="0 0 24 24" fill="currentColor" width="16" height="16" aria-hidden="true"><path d="M13 2 4.5 13.5H11L9.5 22 19 10h-6.5L13 2z"/></svg>';
  const CLOCK = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="20" height="20" aria-hidden="true"><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 3"/></svg>';
  const OPTIONS = [
    { title: 'Envio Flash em até 60 minutos', sub: 'Entrega digital prioritária', price: 'R$ 9,99', bolt: true },
    { title: 'Receber em até 24h', sub: 'Entrega digital no prazo', price: 'Grátis', bolt: false },
  ];
  function build(current) {
    const box = document.createElement('div'); box.className = 'rg-ship';
    box.innerHTML = `<p class="rg-ship-title">${BOLT} Escolha a entrega</p><div class="rg-ship-opts"></div><p class="rg-ship-note">O Envio Flash já vem selecionado. Você pode trocar se preferir.</p>`;
    const list = box.querySelector('.rg-ship-opts');
    OPTIONS.forEach(o => {
      const l = document.createElement('label');
      l.className = 'rg-ship-opt' + (current === o.title ? ' is-active' : '');
      l.innerHTML = `<input type="radio" name="rg-ship" value="${o.title}"${current === o.title ? ' checked' : ''}><span class="rg-bolt${o.bolt ? '' : ' rg-bolt--plain'}">${o.bolt ? BOLT : CLOCK}</span><span class="rg-ship-info"><strong>${o.title}</strong><small>${o.sub}</small></span><span class="rg-ship-price">${o.price}</span>`;
      list.append(l);
    });
    return box;
  }
  async function save(value) {
    try { await fetch('/cart/update.js', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ attributes: { 'Entrega': value } }) }); } catch (e) {}
  }
  async function init() {
    if (!/\/cart(\/|\?|$)/.test(location.pathname)) return;
    const footer = document.querySelector('.cart__footer, #main-cart-footer, .cart__blocks');
    if (!footer || document.querySelector('.rg-ship')) return;
    let current = OPTIONS[0].title;
    try { const c = await (await fetch('/cart.js')).json(); if (c.attributes && c.attributes['Entrega']) current = c.attributes['Entrega']; } catch (e) {}
    const panel = build(current);
    footer.parentNode.insertBefore(panel, footer);
    panel.addEventListener('change', e => {
      if (e.target.name !== 'rg-ship') return;
      panel.querySelectorAll('.rg-ship-opt').forEach(l => l.classList.toggle('is-active', l.contains(e.target)));
      save(e.target.value);
    });
  }
  if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', init); else init();
})();