{
  "version": 3,
  "sources": ["/cdn/shop/t/52/assets/claude-3d.js?cb=0.8624104652746643"],
  "sourcesContent": ["/* ============================================================================\n   claude-3d.js \u2014 claude-3d-hero (Three.js carousel) + claude-underbill-3d\n   (GSAP flip cards). TALOS, 2026-08-16. DRAFT THEME ONLY.\n\n   Design constraints, in order:\n   1. ~90% of traffic is a phone. DPR capped, unlit quads only, render loop\n      pauses off-screen and on hidden tabs. The product photos are already lit;\n      re-lighting them in WebGL would cost frames and muddy them.\n   2. Never break shopping. Everything renders server-side first; this file only\n      ENHANCES. No WebGL / reduced-motion / CDN failure => the static hero image\n      stays, thumbs still switch products, every link still works.\n   3. Vertical scroll belongs to the page (touch-action: pan-y on the stage).\n      The carousel listens to horizontal drag only.\n\n   Libraries are VENDORED INTO THE THEME (claude-vendor-three.js, r158 UMD;\n   claude-vendor-gsap.js + claude-vendor-scrolltrigger.js, 3.12.5) and loaded\n   lazily as CLASSIC scripts. This is deliberate and load-bearing: the first\n   build imported them from jsDelivr as cross-origin ES modules, which worked\n   on the CLI dev server and was blocked in Shopify's theme-editor/preview\n   context \u2014 the 3D silently never booted for Adam (2026-08-16). Classic\n   same-CDN <script> tags have no CORS/CSP surface to trip. Do not put the\n   import() back. The sections publish the asset URLs on window.__c3dVendor\n   before this file runs.\n   The theme editor destroys/re-creates section DOM, so init is idempotent and\n   re-run on shopify:section:load.\n   ============================================================================ */\n(function () {\n  'use strict';\n\n  var reduceMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n\n  var scriptWaits = {};\n  function loadScript(src) {\n    if (!scriptWaits[src]) {\n      scriptWaits[src] = new Promise(function (resolve, reject) {\n        var s = document.createElement('script');\n        s.src = src; s.async = true;\n        s.onload = resolve;\n        s.onerror = function () { reject(new Error('failed: ' + src)); };\n        document.head.appendChild(s);\n      });\n    }\n    return scriptWaits[src];\n  }\n\n  function loadLibs(wantThree) {\n    var urls = window.__c3dVendor || {};\n    var chain = loadScript(urls.gsap).then(function () { return loadScript(urls.st); });\n    if (wantThree) chain = chain.then(function () { return loadScript(urls.three); });\n    return chain.then(function () {\n      if (!window.gsap || !window.ScrollTrigger || (wantThree && !window.THREE)) {\n        throw new Error('vendor globals missing');\n      }\n      window.gsap.registerPlugin(window.ScrollTrigger);\n      return { gsap: window.gsap, ScrollTrigger: window.ScrollTrigger, THREE: wantThree ? window.THREE : null };\n    });\n  }\n\n  /* ------------------------------------------------------------------ HERO */\n  function initHero(root) {\n    /* guard is PER-ENGINE: the collection page mounts the hero AND the\n       glass on one root, and a shared flag let whichever ran first\n       lock the other out (2026-08-17) */\n    if (root.dataset.c3dHeroInit) return;\n    root.dataset.c3dHeroInit = '1';\n\n    var dataEl = root.querySelector('[data-c3d-products]');\n    if (!dataEl) return;\n    var products;\n    try { products = JSON.parse(dataEl.textContent); } catch (e) { return; }\n    if (!products.length) return;\n\n    var stage = root.querySelector('.c3d-stage');\n    var hint = root.querySelector('.c3d-stage__hint');\n    var elTitle = root.querySelector('[data-c3d-title]');\n    /* the collection page keeps its copy STILL \u2014 no title ticker, no\n       swatch sway (Adam, 2026-08-17: \"the swatches and flatbill don't\n       need to be moving left to right with the hats\"); the homepage\n       keeps both on purpose */\n    var staticCopy = root.hasAttribute('data-c3d-static-copy');\n    var elSub = root.querySelector('[data-c3d-sub]');\n    var elPrice = root.querySelector('[data-c3d-price]');\n    var elStock = root.querySelector('[data-c3d-stock]');\n    var elCta = root.querySelector('[data-c3d-cta]');\n    /* the collection-page hero carries ADD TO CART under the swatch row\n       (Adam, 2026-08-17) \u2014 follows the focused hat like the CTA does */\n    var elAtc = root.querySelector('[data-c3d-atc]');\n    if (elAtc) elAtc.addEventListener('click', function () {\n      var vid = elAtc.getAttribute('data-variant');\n      if (!vid || elAtc.disabled) return;\n      elAtc.disabled = true;\n      elAtc.textContent = 'Adding\u2026';\n      var add = window.__c3dCartAdd || function (id) {\n        return new Promise(function (res, rej) {\n          var x = new XMLHttpRequest();\n          x.open('POST', '/cart/add.js');\n          x.setRequestHeader('Content-Type', 'application/json');\n          x.onload = function () { if (x.status >= 200 && x.status < 300) res(); else rej(new Error('cart ' + x.status)); };\n          x.onerror = function () { rej(new Error('network')); };\n          x.send(JSON.stringify({ id: Number(id), quantity: 1 }));\n        });\n      };\n      add(Number(vid)).then(function () {\n        elAtc.textContent = 'Added \u2713';\n        elAtc.disabled = false;\n      }).catch(function () {\n        elAtc.textContent = 'Try again';\n        elAtc.disabled = false;\n      });\n    });\n    var fallbackImg = root.querySelector('.c3d-stage__fallback img');\n    var thumbs = Array.prototype.slice.call(root.querySelectorAll('.c3d-thumb'));\n    var active = 0;\n\n    /* the tap hint only shows where there is an underbill story to find:\n       hidden for products with no underbill image and for the categories Adam\n       named (paddles, ropes, boonies, beanies, stickers), and hidden for good\n       once a flip has actually been performed */\n    var tapHintEl = root.querySelector('.c3d-taphint');\n    var tapHintDone = false;\n    /* the no-underbill families (Adam, 2026-08-28: ropes, beanies,\n       boonies, stickers, pickleball paddles, towels \u2014 none flip) */\n    var tapHintExcl = /BOONIE|BEANIE|ROPE|PADDLE|STICKER|TOWEL|BLANK/i;\n    function updateTapHint(p) {\n      /* label AND title: the rope labels became colors (2026-08-28), so\n         the family words only reliably live in the title now */\n      var ubOk = !!p.ub && !tapHintExcl.test((p.label || '') + ' ' + (p.title || ''));\n      /* the collection pages' stage hint reads \"Click to view underbill\"\n         (CSS copy swap) \u2014 on a product with nothing to flip (ropes,\n         beanies, paddles\u2026) that's a lie, so it hides too (Adam's rope\n         page, 2026-08-28). Hide-only: a drag already retires it. */\n      if (hint && !ubOk && root.closest('.cc-claude-collection-3d')) {\n        hint.classList.add('is-hidden');\n      }\n      if (!tapHintEl) return;\n      var show = !tapHintDone && ubOk;\n      tapHintEl.classList.toggle('is-hidden', !show);\n    }\n\n    function paintCopy(i, gsap) {\n      var p = products[i];\n      updateTapHint(p);\n      /* sub/price/stock hooks were removed from the hero markup 2026-08-16\n         (collections showcase) \u2014 every hook is optional from here on.\n         The TITLE is deliberately not in the animated set: in the WebGL path\n         the render loop drives it per-frame so it swipes WITH the hat. */\n      var swapEls = [elSub, elPrice, elStock].filter(Boolean);\n      var swap = function () {\n        if (elTitle) elTitle.textContent = p.label;\n        if (elSub) elSub.textContent = p.title;\n        if (elPrice) elPrice.textContent = p.price;\n        if (elStock) elStock.textContent = p.available ? p.stockText : p.soldOutText;\n        if (elCta) {\n          /* ctaText = fixed label (\"View Product\" on collection pages, Adam\n             2026-08-20); without it, prefix + style name (\"Shop USA\"). */\n          elCta.textContent = p.ctaText || (p.ctaPrefix + ' ' + p.label);\n          elCta.setAttribute('href', p.url);\n        }\n        if (elAtc) {\n          elAtc.setAttribute('data-variant', p.variant || '');\n          elAtc.disabled = !p.available || !p.variant;\n          elAtc.textContent = p.available && p.variant ? 'Add to cart' : p.soldOutText;\n          /* claude- (2026-08-28, Adam): the HERO was the one glass surface\n             still showing a dead Sold out button \u2014 swap it for the same\n             email \u2192 Klaviyo back-in-stock block the grid cards and overlay\n             use. Per-product: it appears only while the active hat is sold\n             out and hands the slot back the moment a swipe lands on stock.\n             __c3dNotifyControl boots with the glass engine, so late-bind. */\n          var oldNotify = elAtc.parentNode && elAtc.parentNode.querySelector('.c3d-ovl__notify');\n          if (oldNotify) oldNotify.remove();\n          var wantNotify = elAtc.disabled && p.variant &&\n            typeof window.__c3dNotifyControl === 'function';\n          var heroCtl = wantNotify ? window.__c3dNotifyControl(Number(p.variant)) : null;\n          if (heroCtl) {\n            heroCtl.classList.add('c3d-colhero__notify');\n            elAtc.style.display = 'none';\n            elAtc.parentNode.insertBefore(heroCtl, elAtc);\n          } else {\n            elAtc.style.display = '';\n            /* first paint can beat the glass engine's boot \u2014 repaint\n               shortly, but only while this hat is still the active one */\n            if (elAtc.disabled && p.variant && typeof window.__c3dNotifyControl !== 'function' &&\n                (window.__c3dHeroNotifyTries = (window.__c3dHeroNotifyTries || 0) + 1) < 15) {\n              setTimeout(function () { if (active === i) paintCopy(i); }, 700);\n            }\n          }\n        }\n        if (fallbackImg) { fallbackImg.src = p.img; fallbackImg.alt = p.alt; }\n      };\n      thumbs.forEach(function (t, n) { t.setAttribute('aria-current', n === i ? 'true' : 'false'); });\n      /* static strip: glide the active swatch into view instead of\n         sliding the whole row */\n      if (staticCopy && thumbs[i] && thumbs[i].parentNode) {\n        var strip = thumbs[i].parentNode;\n        strip.scrollTo({\n          left: thumbs[i].offsetLeft - strip.clientWidth / 2 + thumbs[i].offsetWidth / 2,\n          behavior: 'smooth'\n        });\n      }\n      if (gsap && !reduceMotion && swapEls.length) {\n        /* micro animation: copy block dips and returns as the product swaps */\n        gsap.timeline()\n          .to(swapEls, { y: 8, autoAlpha: 0, duration: .16, stagger: .02, ease: 'power1.in', onComplete: swap })\n          .to(swapEls, { y: 0, autoAlpha: 1, duration: .3, stagger: .04, ease: 'power2.out' });\n      } else {\n        swap();\n      }\n    }\n\n    /* hero navigation goes through the GLASS when the glass engine is on\n       the page (Adam, 2026-08-17: \"when i click on the swatches in the\n       hero it doesn't open glass\") \u2014 real navigation only as fallback */\n    function heroNav(url) {\n      if (window.__c3dGlassOpenCollection && window.__c3dGlassOpenCollection(url)) return;\n      window.location.href = url;\n    }\n\n    function goStatic() {\n      root.classList.remove('c3d--live');\n      root.classList.add('c3d--static');\n      if (hint) hint.classList.add('is-hidden');\n      var sw = root.querySelector('.c3d-swipe');\n      if (sw) sw.classList.add('is-hidden');   /* nothing to swipe without 3D */\n      thumbs.forEach(function (t) {\n        t.addEventListener('click', function () {\n          var k = +t.dataset.i;\n          if (k === active) { heroNav(products[k].url); return; }\n          active = k; showingUb = false; paintCopy(active, null);\n        });\n      });\n      /* static fallback mirrors the live ring's tap contract: a tap\n         enters the collection/product (Adam, 2026-08-28) \u2014 hero and\n         collection rings alike. */\n      stage.addEventListener('click', function () {\n        var p = products[active];\n        if (p) heroNav(p.url);\n      });\n    }\n\n    /* scroll choreography runs with or without WebGL \u2014 motion permitting */\n    if (!reduceMotion) loadLibs(false).then(initScrollFX).catch(function () {});\n\n    if (reduceMotion || !window.WebGLRenderingContext) { goStatic(); return; }\n\n    loadLibs(true).then(function (libs) {\n      var THREE = libs.THREE, gsap = libs.gsap;\n      var renderer;\n      try {\n        renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true, powerPreference: 'high-performance' });\n        /* the canvas turns WHITE in the frame the browser holds during\n           navigation (Adam, 2026-08-28) \u2014 preserveDrawingBuffer made it\n           worse, so instead the stage BLANKS the moment a real navigation\n           starts (delegated click below) and the dark water shows through. */\n      } catch (e) { return goStatic(); }\n      if (!renderer.getContext()) return goStatic();\n\n      root.classList.add('c3d--live');\n      renderer.setPixelRatio(Math.min(window.devicePixelRatio || 1, window.innerWidth < 769 ? 1.75 : 2));\n      renderer.setSize(stage.clientWidth, stage.clientHeight);\n      stage.appendChild(renderer.domElement);\n\n      /* OLDER-IPAD RESCUE (Adam, 2026-08-28: Parker's dad's older iPad\n         \"has many issues\"): memory-starved WebKit kills WebGL contexts\n         mid-session \u2014 without this handler the hero freezes into a dead\n         canvas. We already fall back when the context fails to START\n         (goStatic above); this demotes the same way when it dies LATER.\n         No restore attempt: on a device shedding GPU memory, the static\n         hero is the right place to stay. */\n      var contextDead = false;\n      renderer.domElement.addEventListener('webglcontextlost', function (ev) {\n        ev.preventDefault();\n        contextDead = true;              /* tick() checks this and stops */\n        try { renderer.dispose(); } catch (err) {}\n        if (renderer.domElement.parentNode) {\n          renderer.domElement.parentNode.removeChild(renderer.domElement);\n        }\n        goStatic();\n      });\n\n      var scene = new THREE.Scene();\n      var camera = new THREE.PerspectiveCamera(34, stage.clientWidth / stage.clientHeight, 0.1, 100);\n      camera.position.set(0, 0.10, 5.0);\n\n      function fitCamera() {\n        camera.aspect = stage.clientWidth / stage.clientHeight;\n        camera.updateProjectionMatrix();\n      }\n      fitCamera();\n\n      var group = new THREE.Group();\n      scene.add(group);\n\n      /* soft contact shadow, drawn once */\n      var shadowTex = (function () {\n        var c = document.createElement('canvas'); c.width = c.height = 128;\n        var ctx = c.getContext('2d');\n        var g = ctx.createRadialGradient(64, 64, 2, 64, 64, 62);\n        g.addColorStop(0, 'rgba(0,0,0,.55)'); g.addColorStop(.55, 'rgba(0,0,0,.18)'); g.addColorStop(1, 'rgba(0,0,0,0)');\n        ctx.fillStyle = g; ctx.fillRect(0, 0, 128, 128);\n        return new THREE.CanvasTexture(c);\n      })();\n\n      var loader = new THREE.TextureLoader();\n      loader.setCrossOrigin('anonymous');\n      var H = 2.5;\n      var cards = [];\n\n      /* (the focus glow lived here for one round on 2026-08-16 \u2014 Adam had it\n         removed the same day; do not re-add without a fresh ask) */\n\n      products.forEach(function (p) {\n        var holder = new THREE.Group();\n        var shadow = new THREE.Mesh(\n          new THREE.PlaneGeometry(2.6, 0.8),\n          new THREE.MeshBasicMaterial({ map: shadowTex, transparent: true, depthWrite: false, opacity: .9 })\n        );\n        shadow.position.set(0, -1.06, -0.02);\n        /* the shadow keeps its HOMEPAGE footprint no matter how far the\n           hat itself is scaled up \u2014 the collection page runs the hats at\n           1.22 and the scaled shadows widened into one smear (\"they\n           merge into each other\", 2026-08-17) */\n        var shInv = 1 / (p.scale || 1);\n        shadow.scale.set(shInv, shInv, 1);\n        holder.add(shadow);\n\n        /* DoubleSide: the back of the ring faces away \u2014 single-sided planes\n           would cull to nothing exactly where the faint circle should show */\n        var mat = new THREE.MeshBasicMaterial({ transparent: true, depthWrite: false, opacity: 0, side: THREE.DoubleSide });\n        var mesh = new THREE.Mesh(new THREE.PlaneGeometry(H, H), mat);\n        holder.add(mesh);\n\n        var card = { holder: holder, mesh: mesh, mat: mat, shadowMat: shadow.material,\n                     frontTex: null, ubTex: null, flipped: false, flipping: false,\n                     scaleMul: p.scale || 1, dy: (p.dy || 0) * H };\n        /* PERF (Adam, 2026-08-16: \"make sure we are optimizing everything\"):\n           textures load STAGGERED \u2014 the visible neighbourhood immediately,\n           the rest when the browser is idle \u2014 so the hero never front-loads\n           nine product images on a phone connection. */\n        card.loadTex = function () {\n          if (card.texRequested) return;\n          card.texRequested = true;\n          loader.load(p.img, function (tex) {\n            tex.colorSpace = THREE.SRGBColorSpace;\n            tex.anisotropy = Math.min(4, renderer.capabilities.getMaxAnisotropy());\n            var ar = tex.image.width / tex.image.height;\n            mesh.geometry.dispose();\n            mesh.geometry = new THREE.PlaneGeometry(H * ar, H);\n            mat.map = tex; mat.needsUpdate = true;\n            card.frontTex = tex;\n            card.texReady = true;   /* the fade-in starts from here \u2014 see layout() */\n          });\n        };\n\n        group.add(holder);\n        cards.push(card);\n      });\n      /* front three now; everyone else on idle */\n      [0, 1, cards.length - 1].forEach(function (i) { if (cards[i]) cards[i].loadTex(); });\n      (window.requestIdleCallback || function (f) { setTimeout(f, 2500); })(function () {\n        cards.forEach(function (c) { c.loadTex(); });\n      }, { timeout: 5000 });\n\n      /* ---- tap the focused hat -> flip to its solo underbill (Adam,\n         2026-08-16). Classic card-flip: rotate to edge-on, swap the texture,\n         jump to the mirrored edge and finish \u2014 so the underbill photo is never\n         shown mirror-imaged. Drag vs tap is decided by pointer travel. ---- */\n      function texFor(card, url, cb) {\n        if (card.ubTex) return cb(card.ubTex);\n        loader.load(url, function (tex) {\n          tex.colorSpace = THREE.SRGBColorSpace;\n          tex.anisotropy = Math.min(4, renderer.capabilities.getMaxAnisotropy());\n          card.ubTex = tex; cb(tex);\n        });\n      }\n      function unflip(i) {\n        var c = cards[i];\n        if (!c || !c.flipped || !c.frontTex) return;\n        c.mesh.rotation.y = 0; c.mat.map = c.frontTex; c.mat.needsUpdate = true;\n        c.flipped = false;\n      }\n      function flipActive() {\n        var p = products[norm(active)], c = cards[norm(active)];\n        if (!p.ub || !c || c.flipping || !c.frontTex) return;\n        if (tapHintExcl.test(p.label || '')) return;   /* no-underbill categories never flip */\n        c.flipping = true;\n        /* the tap hint's job is done the first time a flip happens; swipes\n           deliberately never dismiss it (Adam, 2026-08-16) */\n        tapHintDone = true;\n        if (tapHintEl) tapHintEl.classList.add('is-hidden');\n        var toUb = !c.flipped;\n        var apply = function (tex) {\n          gsap.to(c.mesh.rotation, {\n            y: Math.PI / 2, duration: .22, ease: 'power2.in',\n            onComplete: function () {\n              c.mat.map = tex; c.mat.needsUpdate = true;\n              c.mesh.rotation.y = -Math.PI / 2;\n              gsap.to(c.mesh.rotation, {\n                y: 0, duration: .34, ease: 'back.out(1.6)',\n                onComplete: function () { c.flipped = toUb; c.flipping = false; }\n              });\n            }\n          });\n        };\n        if (toUb) texFor(c, p.ub, apply); else apply(c.frontTex);\n      }\n\n      /* CLOSED RING (Adam, 2026-08-16): the hats occupy a full circle \u2014\n         STEP is exactly 2\u03C0/N, so the N cards close the loop and the far side\n         of the ring floats VAGUELY VISIBLE behind the focused hat (\"floating\n         in circle in space\"). Wrapping is free: `pos`/`target`/`active` run\n         unbounded, norm() maps to a product index, sdelta() gives the\n         shortest signed distance around the ring. */\n      var N = products.length;\n      /* the LOOK never changes with the hat count (Adam, 2026-08-17:\n         \"i didn't want it to work different just have all the hats\" \u2014\n         18 freedom hats first shrank the angle, then a bigger radius\n         flattened the depth). Geometry is pinned to the homepage's\n         12-slot ring for every N: since only the front three render,\n         the ring never needs to close visually \u2014 wrapping stays with\n         norm()/sdelta() over the real N. */\n      var STEP = (Math.PI * 2) / 12, R = 3.4;\n      /* per-section ring tuning (collection page, 2026-08-17): its short\n         wide stage pulls neighbours inward and stretches their turned\n         faces \u2014 spread pushes them back out, skew eases the rotation.\n         Absent attributes = 1 = the homepage exactly as it was. */\n      var spreadX = parseFloat(root.getAttribute('data-c3d-spread') || '1') || 1;\n      var skewMul = parseFloat(root.getAttribute('data-c3d-skew') || '1') || 1;\n      /* claude- (2026-08-28, Adam: \"the stretch of the bill on the left hat\n         ... is super annoying\"): the neighbours' Y-rotation is what warps a\n         flat hat photo under perspective \u2014 the near edge of the turned plane\n         balloons. A section can carry a DESKTOP-ONLY skew so the big-screen\n         ring holds its hats nearly flat while mobile keeps its look. */\n      var skewDesk = parseFloat(root.getAttribute('data-c3d-skew-desk') || '');\n      /* desktop-only side-hat opacity (Adam, 2026-08-28: \"left and right\n         show be fading out a bit\") \u2014 the immediate neighbours' opacity at\n         one card out; absent = the shared 0.95 near-solid look. */\n      var sideFadeDesk = parseFloat(root.getAttribute('data-c3d-sidefade-desk') || '');\n      /* desktop-only world-Y lift (Adam, 2026-08-28: \"the shadow is barely\n         getting cut off\") \u2014 the contact shadow hangs 1.06 under each hat\n         and the collection stage's bottom edge was shaving it. Raising the\n         hats INSIDE the canvas is the only fix that moves the shadow too. */\n      var dyDesk = parseFloat(root.getAttribute('data-c3d-dy-desk') || '') || 0;\n      /* desktop-only scale compensator (Adam, 2026-08-28): hat pixel size\n         rides the canvas HEIGHT, so shrinking the stage's dead air would\n         shrink the hats with it \u2014 this multiplier holds their size while\n         the frame tightens around them. */\n      var scaleDesk = parseFloat(root.getAttribute('data-c3d-scale-desk') || '') || 1;\n      /* desktop-only neighbour spread (Adam, 2026-08-28: \"a little too\n         spread apart ... bring them both into center just a little\") */\n      var spreadDesk = parseFloat(root.getAttribute('data-c3d-spread-desk') || '');\n      /* FIVE-UP ring, desktop only (Adam, 2026-08-28, hat ropes): when\n         set, \u00B12 neighbours render too, at this opacity \u2014 a shade fainter\n         than the pair beside the centre. */\n      var vis2Desk = parseFloat(root.getAttribute('data-c3d-vis2-desk') || '');\n      /* collection pages LAND ATTACHED (Adam, 2026-08-20): no glide-in, no\n         teaching sway \u2014 but the idle float stays (\"i still wanted them to\n         float\"). The attribute name outlived its first meaning. */\n      var noFloat = root.hasAttribute('data-c3d-nofloat');\n      function norm(i) { return ((i % N) + N) % N; }\n      function sdelta(d) { return ((((d + N / 2) % N) + N) % N) - N / 2; }\n      /* the 1.25 desktop right-shift existed for the OLD full-width hero\n         where the copy overlaid the stage's left. The 2026-08-27 two-column\n         layout gives the hats their own right column, so the ring centres\n         in it (shift retired; leave the plumbing for rollback). */\n      var xShift = 0;\n      var deskMQ = window.matchMedia('(min-width: 1024px)');\n      function updShift() { xShift = 0; }\n      updShift();\n      /* start off-mark and settle: the settle IS the drag affordance.\n         EXCEPT collection pages (Adam, 2026-08-20: \"the 3d hats i want to\n         land right there attached when opening the page\") \u2014 they open\n         already in position, no glide, no sway. */\n      /* claude- (2026-08-27, Adam: \"that section should be centered under\n         the hats\"): DESKTOP opens already centered \u2014 the off-mark settle\n         read as misalignment on a big screen. Mobile keeps its glide. */\n      var openCentered = noFloat || deskMQ.matches;\n      /* claude- (2026-08-28, Adam): \"the hat showing first on the carousel\n         should never be a sold out hat\" \u2014 land on the first IN-STOCK hat.\n         The ring order is untouched (top sellers keep their slots, sold-out\n         hats still ride the ring); we only choose where to open. If the\n         whole line is sold out, index 0 stands. */\n      for (var si0 = 0; si0 < N; si0++) {\n        if (products[si0].available) { active = si0; break; }\n      }\n      var pos = openCentered ? active : active - 0.75, target = active;\n      var spin = openCentered ? 0 : -0.28, spinTarget = 0;\n\n      /* the teaching rock (mobile, from load until the first real swipe):\n         the ring sways gently so the hats advertise their own swipe-ability\n         while the static universal-swipe glyph sits below them (Adam,\n         2026-08-16, third design \u2014 the steps and the gliding finger are\n         gone). The offset is applied at DRAW time only \u2014 pos and target\n         never see it, so taps, dots and releases stay exact. */\n      var demoOn = !reduceMotion && !deskMQ.matches && !noFloat;\n      var demoAmp = 0;\n\n      /* the title rides the drag (Adam, 2026-08-16: \"the title swipes with\n         the hat\"): every frame it slides and fades with the carousel's\n         fractional position, and its text flips the moment the nearest card\n         changes \u2014 a ticker attached to the front hat, not a caption. */\n      var lastNearest = -1;\n      function followTitle(p) {\n        if (!elTitle) return;\n        var nearest = Math.round(p);                /* unbounded \u2014 wraps via norm */\n        var frac = p - nearest;\n        if (norm(nearest) !== lastNearest) {\n          lastNearest = norm(nearest);\n          elTitle.textContent = products[lastNearest].label;\n        }\n        if (staticCopy) return;\n        elTitle.style.transform = 'translateX(' + (-frac * 130).toFixed(1) + 'px)';\n        elTitle.style.opacity = Math.max(0, 1 - Math.abs(frac) * 1.8).toFixed(3);\n      }\n\n      function layout(dt, t) {\n        pos += (target - pos) * Math.min(1, dt * 6);\n        spin += (spinTarget - spin) * Math.min(1, dt * 5);\n        /* the teaching rock: eased in on load, eased out the moment a real\n           finger lands or the demo retires \u2014 never a snap. Finger right =\n           hats right, matching real drag physics (drag right lowers pos). */\n        demoAmp += ((demoOn && !dragging ? 1 : 0) - demoAmp) * Math.min(1, dt * 2.5);\n        var demoOff = 0;\n        if (demoAmp > 0.002) {\n          /* ~8.2s per full sway at barely-there travel \u2014 slowed twice at\n             Adam's call (\"calming\", then \"slow down its distracting\").\n             This is now the ONLY swipe cue: a breath, not a demo. */\n          demoOff = -Math.sin(t / 1300) * 0.075 * demoAmp;\n        }\n        followTitle(pos + demoOff);\n        var pm = (((pos + demoOff) % N) + N) % N;\n        cards.forEach(function (c, i) {\n          var nd = sdelta(i - pm);                /* signed distance in cards */\n          var a = nd * STEP;                      /* full circle: a \u2208 (-\u03C0, \u03C0] */\n          var depth = (Math.cos(a) + 1) / 2;      /* 1 = front, 0 = back of ring */\n          var spr = (deskMQ.matches && !isNaN(spreadDesk)) ? spreadDesk : spreadX;\n          c.holder.position.x = Math.sin(a) * R * spr + xShift;\n          c.holder.position.z = Math.cos(a) * R - R;\n          c.holder.position.y = Math.sin(t / 1400 + i) * 0.045 + c.dy +\n            (deskMQ.matches ? dyDesk : 0);  /* idle float + per-hat offset \u2014 stays everywhere (Adam, 2026-08-20: \"i still wanted them to float\") */\n          var sk = (deskMQ.matches && !isNaN(skewDesk)) ? skewDesk : skewMul;\n          c.holder.rotation.y = -Math.sin(a) * 0.75 * sk + spin * 0.6;\n          var s = (0.38 + 0.62 * depth) * c.scaleMul * (deskMQ.matches ? scaleDesk : 1);\n          c.holder.scale.setScalar(s);\n          /* ONLY THE FRONT THREE show (Adam, 2026-08-16, superseding the\n             vaguely-visible full circle the same day): centre + immediate\n             left/right at strong opacity, everything past them fades to\n             nothing by 1.6 cards out \u2014 the ring still SCROLLS circularly,\n             it just doesn't render its back side. */\n          var adx = Math.abs(nd);\n          /* neighbours: MOBILE at 0.75 (Adam, 2026-08-28: \"fade out the 2\n             hats on the left and right on mobile a little bit\"); DESKTOP\n             stays near-solid 0.95 unless its attr says otherwise (Adam,\n             same day: \"don't make the hats fade out on desktop\" \u2014 the\n             first cut let the mobile default leak up). */\n          var nf = deskMQ.matches\n            ? (isNaN(sideFadeDesk) ? 0.95 : sideFadeDesk)\n            : 0.75;\n          var vis;\n          if (deskMQ.matches && !isNaN(vis2Desk)) {\n            /* five in view: centre 1, \u00B11 at nf, \u00B12 at vis2Desk, gone by 2.6 */\n            if (adx <= 1) vis = 1 - (1 - nf) * adx;\n            else if (adx <= 2) vis = vis2Desk + (nf - vis2Desk) * (2 - adx);\n            else vis = Math.max(0, vis2Desk * (2.6 - adx) / 0.6);\n          } else {\n            vis = adx <= 1 ? (1 - (1 - nf) * adx) : Math.max(0, nf * (1.6 - adx) / 0.6);\n          }\n          /* an untextured MeshBasicMaterial renders as a SOLID WHITE plane \u2014\n             the \"white boxes\" flashing on every page change (Adam,\n             2026-08-25). Nothing shows until its texture is decoded; then a\n             quick fade-in instead of a pop. */\n          if (!c.texReady) {\n            c.fadeIn = 0;\n            c.mat.opacity = 0;\n            c.shadowMat.opacity = 0;\n            c.holder.visible = false;\n          } else {\n            c.fadeIn = Math.min(1, (c.fadeIn || 0) + dt * 3.2);\n            c.mat.opacity = vis * c.fadeIn;\n            c.shadowMat.opacity = vis * 0.9 * depth * c.fadeIn;\n            c.holder.visible = vis > 0.02;\n          }\n          c.holder.renderOrder = Math.round(2 + 100 * depth);\n        });\n        group.rotation.y = spin * 0.15;\n\n        /* the swatch STRIP rides the SAME pos as the hats (Adam: \"as you\n           swipe on the hat the swatches transition with it\") \u2014 a FLAT row,\n           not orbital (Adam, 2026-08-16): dots slide linearly, fading in\n           from the left edge and out to the right, with a slight size lift\n           on whichever dot holds the centre. Still wraps via sdelta. */\n        var halfW = (rail ? rail.clientWidth : stage.clientWidth) / 2;\n        if (staticCopy) return;   /* plain scrollable row, no sway */\n        for (var j = 0; j < thumbs.length; j++) {\n          var dd = sdelta(j - pm);\n          var x = dd * 52;\n          var th = thumbs[j];\n          th.style.transform = 'translateX(' + x.toFixed(1) + 'px)'\n            + ' scale(' + (1 + 0.16 * Math.max(0, 1 - Math.abs(dd))).toFixed(3) + ')';\n          th.style.opacity = Math.max(0, Math.min(1, 1.15 - Math.abs(x) / (halfW * 0.92))).toFixed(3);\n          th.style.zIndex = String(50 - Math.round(Math.abs(dd)));\n        }\n      }\n\n      /* (the ambient-show system \u2014 fireworks over USA, and before that a\n         five-effect suite \u2014 lived here on 2026-08-16 and was removed the same\n         day at Adam's call, favouring load-time discipline. History in the\n         changelog; re-add only on a fresh ask.) */\n\n      var dragging = false, startX = 0, startPos = 0, moved = 0;\n      /* GLASS GLIDE on the hero ring (Adam, 2026-08-28: \"the hero hats\n         when i swipe in the hero hats give it the glass glide\") \u2014 the\n         flick's velocity throws `target` further before it rounds, and\n         the render loop's own lerp (dt*6) streams the hats past and eases\n         in. The ring still finishes ON a hat: title/copy/swatches follow\n         the front hat, so resting between two is not an option here. */\n      var velX = 0, lastVX = 0, lastVT = 0;\n      function velTrack(e) {\n        var vdt = e.timeStamp - lastVT;\n        if (vdt > 0) velX = Math.max(-4, Math.min(4, (e.clientX - lastVX) / vdt));\n        lastVX = e.clientX; lastVT = e.timeStamp;\n      }\n      /* THE SWATCH RULES, ON THE STAGE (Adam, 2026-08-28: \"i love the way\n         that they swipe and the hero isn't the same\") \u2014 the hero used to\n         gear its drag to the stage width (~157px of finger per hat on a\n         phone, ~540 on desktop) while the swatch ring runs a fixed 26px\n         per dot with a 1-3 dot flick bonus. Same ring, same feel now. */\n      var STAGE_PX_PER_HAT = 63;   /* walked down from 26 -> 35 -> 47 -> 63 at Adam's call (2026-08-28, \"still too fast\") */\n      function flickExtra() {\n        /* knocked down at Adam's call (2026-08-28: \"its gotta be the flick\n           bonus\") \u2014 the swatch rail keeps its 1-3 dot throw; the STAGE\n           demands a genuinely fast release (0.45 px/ms, was 0.25) and\n           tops out at 2 extra hats (was 3, and the gain halved). */\n        if (Math.abs(velX) <= 0.45) return 0;\n        return Math.min(2, Math.round(Math.abs(velX) * 0.8)) * (velX < 0 ? 1 : -1);\n      }\n      function W() { return stage.clientWidth; }\n\n      /* a second finger means PINCH, never swipe (Adam, 2026-08-27: \"if a\n         bill is flipped it flips the bill back\") \u2014 the pinch's own few px\n         of sideways travel read as a real swipe, and the commit path runs\n         setActive, which always unflips. Abandon the drag the moment a\n         second pointer lands: no commit, no unflip, the zoom is the\n         browser's. Shared across the stage and the name row (they share\n         `dragging`). */\n      var heroPtrs = 0;\n      function pinchAbort() {\n        dragging = false; spinTarget = 0; target = active;\n      }\n\n      /* PINCH TO PEEK (Adam, 2026-08-27: \"if i pinch on a slider hat that\n         hat just gets released and i can zoom on that hat ... and then i\n         let go and it snaps back\") \u2014 two fingers on the stage zoom the\n         whole scene in place, anchored between the fingers, and release\n         springs it back to 1. The swipe compass holds the browser's page\n         zoom off the stage so these pointer events keep flowing. */\n      /* The zoom is the CAMERA, not a CSS scale (Adam, 2026-08-27: \"the\n         quality of the photo is really bad when zoomed in\") \u2014 scaling the\n         canvas raster blurs at 2x no matter the texture; camera.zoom\n         re-renders every frame at native resolution. And the first pinch\n         on a card quietly upgrades its 700px texture to 1600px, so the\n         cost is paid only by hats that actually get pinched. */\n      var pinchPts = new Map(), pinchD0 = 0, pinching = false;\n      var pinchAX = 0, pinchAY = 0, pinchM0 = { x: 0, y: 0 }, CAMY = 0.10;\n      function pinchDist() {\n        var v = Array.from(pinchPts.values());\n        return Math.hypot(v[0].x - v[1].x, v[0].y - v[1].y) || 1;\n      }\n      function pinchHiRes() {\n        var card = cards[norm(active)], p = products[norm(active)];\n        if (!card || !p || card.hiDone) return;\n        card.hiDone = true;\n        var hi = (p.img || '').replace(/width=700/, 'width=1600');\n        if (hi === p.img) return;\n        loader.load(hi, function (tex) {\n          tex.colorSpace = THREE.SRGBColorSpace;\n          tex.anisotropy = Math.min(8, renderer.capabilities.getMaxAnisotropy());\n          card.frontTex = tex;\n          /* only repaint if the front is what's showing \u2014 a flipped card\n             keeps its underbill until its own flip swaps back */\n          if (!card.flipped && !card.flipping) {\n            card.mat.map = tex;\n            card.mat.needsUpdate = true;\n          }\n        });\n      }\n      /* while pinching, the canvas BLEEDS half a scene-height above and\n         below and floats over the neighbouring layers (Adam, 2026-08-27:\n         \"when zoomed in they should be floating above the other layers\n         like 3d they are getting cut off below\" / \"and above\") \u2014 the hat\n         was clipping at the canvas edge, not by CSS. The fov compensation\n         keeps the hats exactly the same size while the canvas grows. */\n      var pinchBled = false, pinchBaseY = CAMY;\n      function pinchBleed(on) {\n        if (on === pinchBled) return;\n        pinchBled = on;\n        var sceneEl = stage.parentElement;\n        if (on) {\n          /* the TOP bleed reaches the search bar (Adam, 2026-08-27: \"the\n             top still gets cut off right at the top of $60 area it needs\n             to extend at least to the search bar\") \u2014 measured live, so it\n             lands on the header's real edge at any scroll position. The\n             hero's own overflow clip yields while the peek is up. */\n          var sr = sceneEl.getBoundingClientRect();\n          var hdr = document.querySelector('.cc-header');\n          var hb = hdr ? hdr.getBoundingClientRect().bottom : 0;\n          var bTop = Math.max(Math.round(sceneEl.clientHeight * 0.5), Math.round(sr.top - hb));\n          var bBot = Math.round(sceneEl.clientHeight * 0.5);\n          stage.style.top = -bTop + 'px';\n          stage.style.bottom = -bBot + 'px';\n          stage.style.zIndex = '60';\n          /* VERTICAL clip only \u2014 blanket overflow:visible also released\n             the hero's horizontal clip, the page grew ~3x wide behind the\n             scenes, and Safari zoomed out to fit it (Adam's squeezed-page\n             screenshot, 2026-08-27). clip + visible is the legal combo\n             that frees the bleed without creating a scroll container. */\n          root.style.overflowX = 'clip';\n          root.style.overflowY = 'visible';\n          /* asymmetric bleed moves the canvas center \u2014 lift the camera so\n             the hats hold their exact screen position while the room grows */\n          pinchBaseY = CAMY + ((bTop - bBot) / 2) *\n            (2 * Math.tan(34 * Math.PI / 360) * 5.0 / sceneEl.clientHeight);\n        } else {\n          stage.style.top = '';\n          stage.style.bottom = '';\n          stage.style.zIndex = '';\n          root.style.overflowX = '';\n          root.style.overflowY = '';\n          pinchBaseY = CAMY;\n          camera.position.x = 0;\n        }\n        renderer.setSize(stage.clientWidth, stage.clientHeight);\n        camera.fov = 2 * Math.atan(\n          Math.tan(34 * Math.PI / 360) * stage.clientHeight / sceneEl.clientHeight\n        ) * 180 / Math.PI;\n        fitCamera();\n        camera.position.y = pinchBaseY;\n      }\n\n      /* px/py: how far the two-finger MIDPOINT has travelled \u2014 the hats\n         follow it (Adam, 2026-08-27: \"i also want my two fingers to be\n         able to move the hats around the screen so if i am trying to pull\n         the hats down i can\"). Divided by s so the world tracks the\n         fingers 1:1 at any zoom. */\n      function pinchApply(s, px, py) {\n        camera.zoom = s;\n        var wH = 2 * Math.tan(camera.fov * Math.PI / 360) * camera.position.z;\n        var wW = wH * camera.aspect;\n        camera.position.x = pinchAX * wW * (1 - 1 / s)\n          - (px || 0) * (wW / stage.clientWidth) / s;\n        camera.position.y = pinchBaseY - pinchAY * wH * (1 - 1 / s)\n          + (py || 0) * (wH / stage.clientHeight) / s;\n        camera.updateProjectionMatrix();\n      }\n      /* FAILSAFE (2026-08-27, the squeezed-page bug's second half): when\n         Safari takes a gesture it can swallow the pointerups, leaving\n         pinchPts stale, heroPtrs high, and the bleed stuck open \u2014 the\n         next one-finger touch then read as a pinch and the page stayed\n         wide. When the LAST finger leaves the screen, the hero's pinch\n         state always resolves: stale points cleared, drag counter zeroed,\n         and a still-open pinch springs home through the normal path. */\n      function pinchRescue(e) {\n        if (e.touches.length !== 0) return;\n        pinchPts.clear();\n        heroPtrs = 0;\n        if (pinching) pinchEnd();\n      }\n      document.addEventListener('touchend', pinchRescue, { passive: true });\n      document.addEventListener('touchcancel', pinchRescue, { passive: true });\n\n      function pinchEnd() {\n        if (!pinching) return;\n        pinching = false;\n        var z0 = camera.zoom, x0 = camera.position.x, y0 = camera.position.y;\n        var t0 = performance.now();\n        (function back(now) {\n          var k = Math.min(1, (now - t0) / 280);\n          var e = 1 - Math.pow(1 - k, 3);\n          camera.zoom = z0 + (1 - z0) * e;\n          camera.position.x = x0 * (1 - e);\n          camera.position.y = y0 + (pinchBaseY - y0) * e;\n          camera.updateProjectionMatrix();\n          if (k < 1) requestAnimationFrame(back);\n          else pinchBleed(false);   /* canvas returns to its lane after the spring */\n        })(t0);\n      }\n\n      stage.addEventListener('pointerdown', function (e) {\n        pinchPts.set(e.pointerId, { x: e.clientX, y: e.clientY });\n        heroPtrs++;\n        if (heroPtrs > 1) {\n          pinchAbort();\n          if (pinchPts.size === 2 && !pinching) {\n            pinching = true;\n            pinchD0 = pinchDist();\n            var v = Array.from(pinchPts.values());\n            var r = stage.getBoundingClientRect();\n            /* anchor between the fingers, as a fraction from stage center */\n            var mx = (v[0].x + v[1].x) / 2, my = (v[0].y + v[1].y) / 2;\n            /* grow the canvas first, then measure the anchor against the\n               grown rect \u2014 the bleed is asymmetric, so the center moves\n               and a simple ratio rescale would drift the zoom point */\n            pinchBleed(true);\n            var r2 = stage.getBoundingClientRect();\n            pinchAX = (mx - r2.left) / r2.width - 0.5;\n            pinchAY = (my - r2.top) / r2.height - 0.5;\n            pinchM0 = { x: mx, y: my };\n            pinchHiRes();\n          }\n          return;\n        }\n        dragging = true; moved = 0; startX = e.clientX; startPos = target;\n        velX = 0; lastVX = e.clientX; lastVT = e.timeStamp;\n        stage.setPointerCapture(e.pointerId);\n        if (hint) hint.classList.add('is-hidden');\n      });\n      /* The finger retires on the FIRST sign of a real swipe. Hidden from the\n         MOVE handler, not release: on a real phone the browser can steal a\n         drag mid-gesture (pointercancel \u2014 e.g. a diagonal swipe becoming a\n         page scroll) and the release path is then unreliable, which is why\n         Adam's device kept the finger after swiping while the dev browser\n         didn't. Also retired by any product change (thumbs, keys, wheel). */\n      var swipeEl = root.querySelector('.c3d-swipe');\n      function retireSwipeHint() {\n        demoOn = false;                            /* the rock retires with it */\n        if (swipeEl) { swipeEl.classList.add('is-hidden'); swipeEl = null; }\n      }\n\n      stage.addEventListener('pointermove', function (e) {\n        if (pinchPts.has(e.pointerId)) {\n          pinchPts.set(e.pointerId, { x: e.clientX, y: e.clientY });\n          if (pinching && pinchPts.size >= 2) {\n            var pv = Array.from(pinchPts.values());\n            var pmx = (pv[0].x + pv[1].x) / 2, pmy = (pv[0].y + pv[1].y) / 2;\n            pinchApply(Math.max(1, Math.min(3.5, pinchDist() / pinchD0)),\n              pmx - pinchM0.x, pmy - pinchM0.y);\n            return;\n          }\n        }\n        if (!dragging) return;\n        var dx = e.clientX - startX;\n        moved = Math.max(moved, Math.abs(dx));\n        if (moved >= 8) retireSwipeHint();\n        velTrack(e);\n        target = startPos - dx / STAGE_PX_PER_HAT;\n        spinTarget = Math.max(-0.5, Math.min(0.5, -dx / W()));\n      });\n      function release(cancelled) {\n        if (!dragging) return;\n        dragging = false; spinTarget = 0;\n        /* under 8px of travel is a TAP. On the HOMEPAGE HERO a tap goes\n           INTO THE COLLECTION (Adam, 2026-08-28: \"a tap should go into\n           the collection itself... if you tap the hats, the title or the\n           swatch\" \u2014 supersedes 2026-08-16's tap-always-flips, which made\n           sense when the front hid the underbill; the 3-hat composites\n           show it up front now). COLLECTION-page rings keep the flip \u2014\n           their stage hint still advertises it. A CANCELLED gesture is\n           never a tap. */\n        if (moved < 8) {\n          target = active;\n          /* collection rings too (Adam, same day: \"do the same for the\n             collections pages\") \u2014 a ring hat there IS a product, so the\n             tap opens it; flipActive retired from the tap path. */\n          if (!cancelled) heroNav(products[norm(active)].url);\n          return;\n        }\n        /* no clamp \u2014 the ring wraps. A flick throws 1-3 extra hats, the\n           swatch rail's own rule; a CANCELLED gesture never flings. */\n        setActive(Math.round(target) + (cancelled ? 0 : flickExtra()));\n      }\n      stage.addEventListener('pointerup', function (e) {\n        pinchPts.delete(e.pointerId);\n        if (pinchPts.size < 2) pinchEnd();\n        heroPtrs = Math.max(0, heroPtrs - 1);\n        release(false);\n      });\n      stage.addEventListener('pointercancel', function (e) {\n        pinchPts.delete(e.pointerId);\n        if (pinchPts.size < 2) pinchEnd();\n        heroPtrs = Math.max(0, heroPtrs - 1);\n        release(true);\n      });\n      /* the style-name row swipes too (Adam, 2026-08-28: \"i want to be\n         able to swipe on all of the carasols\") \u2014 same drag, minus the\n         tap-to-flip (a tap on text should not flip the hat) */\n      if (elTitle) {\n        elTitle.style.touchAction = 'pan-y pinch-zoom';   /* the swipe compass gates horizontal */\n        elTitle.addEventListener('pointerdown', function (e) {\n          heroPtrs++;\n          if (heroPtrs > 1) { pinchAbort(); return; }\n          dragging = true; moved = 0; startX = e.clientX; startPos = target;\n          velX = 0; lastVX = e.clientX; lastVT = e.timeStamp;\n          try { elTitle.setPointerCapture(e.pointerId); } catch (err) {}\n        });\n        elTitle.addEventListener('pointermove', function (e) {\n          if (!dragging) return;\n          var dx = e.clientX - startX;\n          moved = Math.max(moved, Math.abs(dx));\n          if (moved >= 8) retireSwipeHint();\n          velTrack(e);\n          target = startPos - dx / STAGE_PX_PER_HAT;\n          spinTarget = Math.max(-0.5, Math.min(0.5, -dx / W()));\n        });\n        elTitle.addEventListener('pointerup', function () {\n          heroPtrs = Math.max(0, heroPtrs - 1);\n          if (!dragging) return;\n          dragging = false; spinTarget = 0;\n          if (moved < 8) {\n            target = active;\n            /* tapping the title enters the collection/product (Adam, 2026-08-28) */\n            heroNav(products[norm(active)].url);\n            return;\n          }\n          setActive(Math.round(target) + flickExtra());   /* swatch rules, same as the stage */\n        });\n        elTitle.addEventListener('pointercancel', function () {\n          heroPtrs = Math.max(0, heroPtrs - 1);\n          release(true);\n        });\n      }\n\n      stage.addEventListener('wheel', function (e) {\n        if (Math.abs(e.deltaX) <= Math.abs(e.deltaY)) return;  /* page keeps vertical */\n        e.preventDefault();\n        target += e.deltaX * 0.01;                             /* no clamp \u2014 wraps */\n        clearTimeout(stage._c3dWheelT);\n        stage._c3dWheelT = setTimeout(function () { target = Math.round(target); setActive(target); }, 120);\n      }, { passive: false });\n\n      stage.tabIndex = 0;\n      stage.addEventListener('keydown', function (e) {\n        if (e.key === 'ArrowRight') { setActive(active + 1); e.preventDefault(); }\n        if (e.key === 'ArrowLeft') { setActive(active - 1); e.preventDefault(); }\n      });\n\n      /* a tapped dot travels the SHORT way around the ring; tapping the dot\n         that is ALREADY front goes to its collection (Adam). The target is\n         computed ABSOLUTELY from the live ring position \u2014 a duplicated or\n         stale actuation re-lands on the same dot instead of jumping twice\n         (a double-jump was observed in pane testing, 2026-08-16). */\n      thumbs.forEach(function (t) {\n        t.addEventListener('click', function () {\n          var k = +t.dataset.i;\n          var base = Math.round(pos);\n          if (k === norm(base) && k === norm(active)) { heroNav(products[k].url); return; }\n          setActive(base + sdelta(k - norm(base)));\n        });\n      });\n\n      /* the swatch ring is itself swipeable \u2014 same drag physics as the stage,\n         54px of finger per dot; a sub-8px touch falls through to the dot tap */\n      var rail = root.querySelector('.c3d-thumbs');\n      if (rail) {\n        /* Magic Mouse / trackpad horizontal scroll drives the swatches\n           too (Adam, 2026-08-28: \"i cant swipe on the swatches with my\n           magic mouse on desktop\") \u2014 same wheel scrub the stage has */\n        rail.addEventListener('wheel', function (e) {\n          if (Math.abs(e.deltaX) <= Math.abs(e.deltaY)) return;\n          e.preventDefault();\n          target += e.deltaX * 0.01;\n          clearTimeout(rail._c3dWheelT);\n          rail._c3dWheelT = setTimeout(function () { target = Math.round(target); setActive(target); }, 120);\n        }, { passive: false });\n        /* SWATCH SWIPE (Adam, 2026-08-28: \"make swiping and clicking much\n           easier on the main swatches\", then \"more sensitive\").\n           It used to divide by 52 \u2014 the same 52px the dots are SPACED at \u2014\n           so the ring tracked the finger exactly 1:1 and a full 52px of\n           travel bought exactly one dot. Decoupling the two is the whole\n           fix: the dots still SIT 52px apart, but 26px of finger now moves\n           one, and a flick carries further. */\n        var RAIL_PX_PER_DOT = 26;   /* was 52 (1:1 with dot spacing) */\n        var rDrag = false, rStartX = 0, rStartPos = 0, rMoved = 0;\n        var rLastX = 0, rLastT = 0, rVel = 0;\n        rail.addEventListener('pointerdown', function (e) {\n          rDrag = true; rMoved = 0; rStartX = e.clientX; rStartPos = target;\n          rLastX = e.clientX; rLastT = e.timeStamp || performance.now(); rVel = 0;\n        });\n        rail.addEventListener('pointermove', function (e) {\n          if (!rDrag) return;\n          var dx = e.clientX - rStartX;\n          rMoved = Math.max(rMoved, Math.abs(dx));\n          if (rMoved >= 6) retireSwipeHint();\n          var now = e.timeStamp || performance.now();\n          var dt = now - rLastT;\n          if (dt > 0) rVel = Math.max(-4, Math.min(4, (e.clientX - rLastX) / dt));  /* px/ms, clamped */\n          rLastX = e.clientX; rLastT = now;\n          target = rStartPos - dx / RAIL_PX_PER_DOT;\n        });\n        function railRelease() {\n          if (!rDrag) return;\n          rDrag = false;\n          if (rMoved >= 6) {\n            /* a flick keeps going: fast release throws 1-3 extra dots the\n               way the finger was travelling, so browsing a long colour row\n               doesn't need a drag per dot */\n            var extra = 0;\n            if (Math.abs(rVel) > 0.25) {\n              extra = Math.min(3, Math.round(Math.abs(rVel) * 1.6)) * (rVel < 0 ? 1 : -1);\n            }\n            target = Math.round(target) + extra;\n            setActive(target);\n          }\n        }\n        rail.addEventListener('pointerup', railRelease);\n        rail.addEventListener('pointercancel', railRelease);\n        rail.addEventListener('click', function (e) {\n          if (rMoved >= 6) { e.stopPropagation(); e.preventDefault(); }\n        }, true);\n      }\n\n      function setActive(i) {\n        if (norm(i) === norm(active) && Math.abs(target - i) < 0.01) return;\n        retireSwipeHint();         /* any product change proves they can browse */\n        unflip(norm(active));      /* leaving a card always restores its front */\n        active = i; target = i;    /* unbounded \u2014 the ring wraps */\n        paintCopy(norm(i), gsap);\n        /* make sure the new neighbourhood's textures are in (they may still\n           be waiting on the idle loader) */\n        [norm(i - 1), norm(i), norm(i + 1)].forEach(function (idx) {\n          if (cards[idx]) cards[idx].loadTex();\n        });\n      }\n\n      /* render loop \u2014 paused off screen and on hidden tabs */\n      var visible = true, last = performance.now(), raf = 0;\n      var io = new IntersectionObserver(function (entries) {\n        visible = entries[0].isIntersecting;\n        if (visible && !raf) tick();\n      }, { threshold: 0 });\n      io.observe(stage);\n      document.addEventListener('visibilitychange', function () {\n        if (!document.hidden && visible && !raf) tick();\n      });\n\n      function tick() {\n        if (contextDead) { raf = 0; return; }   /* GPU gone \u2014 static hero owns the stage now */\n        if (!visible || document.hidden) { raf = 0; return; }\n        var now = performance.now();\n        var dt = Math.min(0.05, (now - last) / 1000); last = now;\n        layout(dt, now);\n        renderer.render(scene, camera);\n        raf = requestAnimationFrame(tick);\n      }\n      paintCopy(norm(active), null);   /* boot: the initial product must pass\n        through updateTapHint too \u2014 setActive(0) early-returns at startup, which\n        left the server-rendered tap hint visible on no-underbill products */\n      tick();\n\n      window.addEventListener('resize', function () {\n        updShift();\n        renderer.setSize(stage.clientWidth, stage.clientHeight);\n        fitCamera();\n      });\n\n      /* no timed hide (Adam, 2026-08-27: \"that is going away before a tap\n         or click and it shouldn't\") \u2014 the hint retires only on a real\n         interaction: drag start, a flip, or the 3D going static. */\n\n      /* micro animation: ladder tiles rise in on load. NO ScrollTrigger here \u2014\n         on desktop the ladder sits at the very top of the page, so a\n         trigger-gated from() can arm already-past and leave the tiles stuck\n         at opacity 0 (bug, 2026-08-16). A plain tween always completes. */\n      var tiles = root.querySelectorAll('.c3d-tier');\n      if (tiles.length) {\n        gsap.from(tiles, { y: 18, autoAlpha: 0, duration: .5, stagger: .07, ease: 'power2.out', delay: .15 });\n      }\n\n      /* teardown for the theme editor */\n      root._c3dDestroy = function () {\n        io.disconnect();\n        cancelAnimationFrame(raf); raf = 0; visible = false;\n        renderer.dispose();\n      };\n    }).catch(goStatic);\n  }\n\n  /* ---------------------------------------------------------- SCROLL FX\n     CENTER-STAGE FADE (Adam, 2026-08-16, replacing the Editions curtain the\n     same day \u2014 \"very clunky... I want it to fade in and out at the top so\n     what is in the center of the screen is most visible while scrolling\").\n\n     No pinning, no covering. Every section carries a scrubbed opacity\n     envelope keyed to VIEWPORT POSITION: it fades up as its top rises\n     through the lower third, is fully visible while it holds the middle of\n     the screen, and fades down as its bottom exits through the upper third.\n     Tall sections stay solid for their whole middle \u2014 only the edges of the\n     viewport are ever dim. Scrub means reversing scroll reverses the fade.\n\n     Transform + opacity only; skipped under prefers-reduced-motion (guarded\n     at the call site). */\n  function initScrollFX(libs) {\n    if (window.__c3dFX) return;\n    window.__c3dFX = true;\n    var gsap = libs.gsap;\n    var secs = gsap.utils.toArray('#main-content > .shopify-section');\n\n    secs.forEach(function (sec, i) {\n      /* THE RENDERED CONTENT CHILD, not firstElementChild (bug, 2026-08-16):\n         most sections open with a <link>/<script> (stylesheet_tag etc.), so\n         firstElementChild is a NON-RENDERING element \u2014 the tweens ran, the\n         computed opacity even read back \"correctly\", and nothing on screen\n         faded. Adam caught it (\"there is no fade at all\"). Target the first\n         child that actually paints. */\n      var inner = null;\n      for (var c = 0; c < sec.children.length; c++) {\n        var tag = sec.children[c].tagName;\n        if (tag !== 'LINK' && tag !== 'SCRIPT' && tag !== 'STYLE' && tag !== 'NOSCRIPT') {\n          inner = sec.children[c];\n          break;\n        }\n      }\n      if (!inner || sec.offsetHeight < 40) return;   /* empty app shells etc. */\n      var isHero = !!sec.querySelector('[data-c3d-hero]');\n\n      /* fade IN while the section's top climbs toward the middle\n         (the hero is already on screen at load \u2014 it only fades out) */\n      if (!isHero) {\n        gsap.fromTo(inner, { autoAlpha: 0.15, y: 26 }, {\n          autoAlpha: 1, y: 0, ease: 'none',\n          scrollTrigger: { trigger: sec, start: 'top 96%', end: 'top 52%', scrub: 0.3 }\n        });\n      }\n\n      /* fade OUT at the top, while the section's bottom leaves the middle.\n         immediateRender:false keeps this from stomping the entry tween's\n         start state on load. */\n      gsap.fromTo(inner, { autoAlpha: 1, y: 0 }, {\n        autoAlpha: 0.15, y: -26, ease: 'none', immediateRender: false,\n        scrollTrigger: { trigger: sec, start: 'bottom 48%', end: 'bottom 6%', scrub: 0.3 }\n      });\n\n      /* lifestyle photos keep their slow parallax breath */\n      if (sec.className.indexOf('cc-image-banner') !== -1) {\n        var img = sec.querySelector('img');\n        if (img) {\n          var clip = img.closest('div') || inner;\n          clip.style.overflow = 'hidden';\n          gsap.fromTo(img, { scale: 1 }, {\n            scale: 1.07, ease: 'none',\n            scrollTrigger: { trigger: sec, start: 'top bottom', end: 'bottom top', scrub: true }\n          });\n        }\n      }\n    });\n  }\n\n  /* -------------------------------------------------------------- UNDERBILL */\n  function initUnderbill(root) {\n    if (root.dataset.c3dUbInit) return;\n    root.dataset.c3dUbInit = '1';\n\n    var flips = Array.prototype.slice.call(root.querySelectorAll('.c3d-flip'));\n    /* collection pages carry no story cards but still need the whole\n       glass engine \u2014 they opt in with data-c3d-glass on the same root\n       that carries data-c3d-underbill (Adam, 2026-08-17: the collection\n       page shops through the glass too) */\n    if (!flips.length && !root.hasAttribute('data-c3d-glass')) return;\n\n    /* (the tap-to-flip mechanic and the FREEDOM scroll demo were removed\n       2026-08-17 at Adam's call \u2014 the card face is the 3-hat composite\n       now, which already shows the underbill. Cards are pictures + CTA.) */\n\n    /* THE GLASS SHOP (Adam, 2026-08-17: \"lets let them shop from here\"):\n       tapping the category button blurs the page and opens a THREE-LEVEL\n       glass browser \u2014 collections \u2192 styles \u2192 hats \u2014 with a back button\n       and an X on every level. Styles always appear in Adam's order\n       (only the ones the collection actually has). A hat tile carries an\n       ADD TO CART button; tapping the tile itself goes to the product\n       page. Product data comes from the storefront's own\n       /collections/<handle>/products.json in the buyer's browser \u2014 no\n       tokens, no baked lists. (The drip-down chevron was removed the same\n       day: the shop replaced it.) */\n    /* Adam's fixed order, 2026-08-17: \"this order always: flat bill,\n       baseball hat fit, shallow fit, dad hat, trucker, sporty\". Low\n       Profile stays in the roster (13 live products still carry it)\n       slotted after its successor Shallow Fit. */\n    var STYLE_ORDER = ['Flat Bill', 'Baseball Hat Fit', 'Shallow Fit', 'Low Profile', 'Dad Hat', 'Trucker', 'Sporty'];\n    /* some collections break into SUBSECTIONS instead of styles (Adam,\n       2026-08-17). First matching rule wins; unmatched products land in\n       More \u2014 unless noMore, where Adam wants ONLY the named groups shown\n       (straw: \"only the straw hats in those categories\"). Color Vibes\n       grouping is by COLOR TYPE, Adam's brief: \"neons, pastels, however\n       you think you can group them\". */\n    var SUBSECTIONS = {\n      'flag-hats': { groups: [\n        { label: 'USA', match: /usa/i },\n        { label: 'FREEDOM', match: /freedom/i },\n        { label: 'Color Vibes Flag', match: /color vibes/i },\n        { label: 'Classic Flag', match: /flag/i }\n      ] },\n      /* claude- (2026-08-27, Adam): color vibes PDP swatches show ALL the\n         hats flat \u2014 \"just show all of the hats in the swatches not flipping\n         through them \u2026 don't break them down\" \u2014 in exactly TWO never-mixing\n         segments: \"don't have youth swatches inside the adult product\".\n         First-match-wins keeps Adult youth-free. The color-type breakdown\n         (neons/pastels/\u2026) retired here 2026-08-27. */\n      'color-vibes-hats': { noCross: true, groups: [\n        { label: 'Youth', match: /^\\s*\\**\\s*youth/i },\n        { label: 'Adult', match: /./ }\n      ] },\n      'color-vibes-flat-bill-hats-youth': { noCross: true, groups: [\n        { label: 'Youth', match: /./ }\n      ] },\n      'color-vibes-flat-bill-hats-adult': { noCross: true, groups: [\n        { label: 'Adult', match: /./ }\n      ] },\n      'straw-hats': { noMore: true, groups: [\n        { label: 'Flag', match: /flag/i },\n        { label: 'Florida', match: /florida/i },\n        { label: 'Tahoe', match: /tahoe/i },\n        { label: 'Idaho', match: /idaho/i },\n        { label: 'California', match: /california/i }\n      ] }\n    };\n    /* collections that skip grouping entirely \u2014 every hat is its own\n       tile (Adam: \"freedom will be broken up by tile\") */\n    /* collections that skip the style breakup and go straight to a\n       scrolling product grid \u2014 freedom (by tile), and hat ropes, whose\n       titles match no style so the breakup showed one useless \"More\"\n       tile (Adam, 2026-08-17: \"that should just be scrolling to\n       purchase\") */\n    var DIRECT_TILES = { 'freedom-hats': true, 'hat-ropes': true };\n    var colCache = {};\n    var lastCol = null;\n    var ovStack = [];\n\n    function fetchCollection(handle) {\n      /* one retry with a beat between \u2014 a burst of walls can trip\n         Shopify's products.json throttling, and a single 429 must NOT\n         dump the shopper out of the glass (2026-08-17: it did) */\n      handle = COL_ALIAS[handle] || handle;\n      if (colCache[handle]) {\n        lastCol = { handle: handle, prods: colCache[handle] };\n        return Promise.resolve(colCache[handle]);\n      }\n      function attempt() {\n        return fetch('/collections/' + handle + '/products.json?limit=250')\n          .then(function (r) { if (!r.ok) throw new Error('http ' + r.status); return r.json(); })\n          .then(function (d) {\n            colCache[handle] = d.products || [];\n            /* remember the collection being BROWSED \u2014 the PDP's\n               other-styles carousels are built from it */\n            lastCol = { handle: handle, prods: colCache[handle] };\n            return colCache[handle];\n          });\n      }\n      return attempt().catch(function () {\n        return new Promise(function (res) { setTimeout(res, 700); }).then(attempt);\n      });\n    }\n    /* tile PICTURES use a light, queued fetch (4 products, 3 at a time)\n       so a wall of twenty tiles doesn't burst-trip the throttle */\n    var imgCache = {};\n    var imgQueue = [], imgActive = 0;\n    /* the menu's TEAM HEROES & CAUSES link points at /collections/\n       team-heroes, which does not exist \u2014 the real collection is\n       team-heroes-hats (its tile had no photo, Adam 2026-08-17) */\n    var COL_ALIAS = { 'team-heroes': 'team-heroes-hats' };\n    function fetchCollectionLite(handle) {\n      handle = COL_ALIAS[handle] || handle;\n      if (colCache[handle]) return Promise.resolve(colCache[handle]);\n      if (imgCache[handle]) return Promise.resolve(imgCache[handle]);\n      return new Promise(function (resolve) {\n        imgQueue.push({ h: handle, res: resolve });\n        pumpImgQueue();\n      });\n    }\n    function pumpImgQueue() {\n      while (imgActive < 3 && imgQueue.length) {\n        (function (job) {\n          imgActive++;\n          fetch('/collections/' + job.h + '/products.json?limit=4')\n            .then(function (r) { if (!r.ok) throw new Error('http ' + r.status); return r.json(); })\n            .then(function (d) { imgCache[job.h] = d.products || []; job.res(imgCache[job.h]); })\n            .catch(function () { job.res([]); })\n            .then(function () { imgActive--; pumpImgQueue(); });\n        })(imgQueue.shift());\n      }\n    }\n    function imgOk(s) { s = s.toLowerCase(); return s.indexOf('underbill') < 0 && s.indexOf('featureicon') < 0; }\n    /* claude- (2026-08-24): products whose photos have baked white backgrounds\n       carry transparent cutouts as theme assets \u2014 the section stamps the map on\n       the root (data-claude-cuts, handle -> url) and every client-side pick\n       (PDP swatches, walls) prefers it. */\n    var claudeCutMap = null;\n    function cutFor(handle) {\n      if (claudeCutMap === null) {\n        try { claudeCutMap = JSON.parse(root.getAttribute('data-claude-cuts') || '{}'); }\n        catch (e) { claudeCutMap = {}; }\n      }\n      return claudeCutMap[handle] || null;\n    }\n    function prodImgSrc(p) {\n      var cut = p.handle && cutFor(p.handle);\n      if (cut) return cut;\n      var imgs = p.images || [], i, s;\n      for (i = 0; i < imgs.length; i++) { s = imgs[i].src; if (imgOk(s) && s.toLowerCase().indexOf('main') >= 0) return s; }\n      for (i = 0; i < imgs.length; i++) { s = imgs[i].src; if (imgOk(s) && s.toLowerCase().indexOf('front') >= 0) return s; }\n      return imgs.length ? imgs[0].src : '';\n    }\n    function styleOf(p) {\n      var t = p.title.toLowerCase();\n      for (var i = 0; i < STYLE_ORDER.length; i++) {\n        if (t.indexOf(STYLE_ORDER[i].toLowerCase()) >= 0) return STYLE_ORDER[i];\n      }\n      /* Adam, 2026-08-17: \"airmesh can always be low profile as well\" */\n      if (/air ?mesh/i.test(t)) return 'Low Profile';\n      return 'More';\n    }\n    function firstAvail(p) {\n      var vs = p.variants || [];\n      for (var i = 0; i < vs.length; i++) if (vs[i].available) return vs[i];\n      return vs[0] || null;\n    }\n    function cartAdd(variantId) {\n      /* The cart popout on this store is the UPCART APP, and it hooks\n         XHR as well as fetch \u2014 it opens on every add no matter the\n         transport (learned 2026-08-17). That's fine: Adam wants it\n         opening at HALF height (CSS above), with the rope dialog\n         centered on top of it. */\n      return new Promise(function (resolve, reject) {\n        var x = new XMLHttpRequest();\n        x.open('POST', '/cart/add.js');\n        x.setRequestHeader('Content-Type', 'application/json');\n        x.onload = function () {\n          if (x.status >= 200 && x.status < 300) resolve();\n          else reject(new Error('cart ' + x.status));\n        };\n        x.onerror = function () { reject(new Error('network')); };\n        x.send(JSON.stringify({ id: variantId, quantity: 1 }));\n      });\n    }\n    /* the collection-page hero's ADD TO CART lives in initHero, outside\n       this closure \u2014 same add, same UpCart popout */\n    window.__c3dCartAdd = cartAdd;\n    /* GLASS NAMES ARE NOT SEO TITLES (Adam, 2026-08-17: \"in the glass we\n       are going to make it a simpler way of life... adjust the naming of\n       each hat in the glass to be different than what we have as the\n       title for the product in seo\"). The product titles never change \u2014\n       search keeps its keywords \u2014 but inside the glass every hat wears a\n       short display name derived here: the type segment goes (the shopper\n       is already inside the category), the style goes when the list is a\n       single style, and the technical tail is dropped entirely. ALL glass\n       naming flows through this one function \u2014 simplifying life further\n       is a one-place edit. */\n    /* the name carries the colorway \u2014 and a significant FABRIC (hemp,\n       suede, corduroy, cork) stays IN the name where the title puts it,\n       e.g. \"Flat Bill \u00B7 Cork \u00B7 Black\" (Adam, 2026-08-17, revising the\n       separate fabric line). Only the MESH gets its own line underneath. */\n    function glassNameOf(p, styleName) {\n      var parts = p.title.split(' - ');\n      var out = [], mesh = null;\n      /* adult and youth versions of the same print must stay\n         distinguishable once the type segment is dropped */\n      if (/\\*\\*\\s*youth\\s*\\*\\*/i.test(parts[0])) out.push('Youth');\n      for (var i = 1; i < parts.length; i++) {\n        var seg = parts[i].trim();\n        if (!seg) continue;\n        if (/^(laser mesh|trucker mesh|air ?mesh|mesh)$/i.test(seg)) { mesh = seg; continue; }\n        if (/^(water resistant|performance|snapback|true fit)$/i.test(seg)) continue;\n        /* strip the disclaimer but KEEP the rest of the segment \u2014\n           skipping the whole segment left \"White (Hat Not Included)\"\n           nameless (fell back to the raw title) and ate \"Waves\" */\n        seg = seg.replace(/\\(\\s*hat not included\\s*\\)/i, '').trim();\n        if (!seg) continue;\n        /* the STYLE stays, always first (Adam, 2026-08-17: \"the first\n           part of all of the titles should be the style\") \u2014 it lands\n           first naturally once the type segment is gone */\n        out.push(seg);\n      }\n      return {\n        name: out.length ? out.join(' \u00B7 ') : p.title,\n        mesh: mesh\n      };\n    }\n    function colorwayOf(p, styleName) { return glassNameOf(p, styleName).name; }\n\n    function ovEl() {\n      var ov = document.querySelector('.c3d-ovl');\n      if (ov) return ov;\n      ov = document.createElement('div');\n      ov.className = 'c3d-ovl';\n      ov.innerHTML = '<button type=\"button\" class=\"c3d-ovl__back\" aria-label=\"Back\">&#8249;</button>'\n        + '<p class=\"c3d-ovl__title\" aria-hidden=\"true\"></p>'\n        + '<button type=\"button\" class=\"c3d-ovl__close\" aria-label=\"Close\">&#215;</button>'\n        + '<div class=\"c3d-ovl__grid\"></div>';\n      document.body.appendChild(ov);\n      ov.querySelector('.c3d-ovl__close').addEventListener('click', closeOverlay);\n      ov.querySelector('.c3d-ovl__back').addEventListener('click', function () {\n        if (ovStack.length > 1) {\n          /* stepping back off a glass PDP releases its URL; if the previous\n             level is itself a product, its renderProduct re-enters */\n          glassUrlExit();\n          ovStack.pop(); ovStack[ovStack.length - 1]();\n        }\n      });\n      ov.addEventListener('click', function (e) {\n        if (e.target === ov || e.target.classList.contains('c3d-ovl__grid')) closeOverlay();\n      });\n      document.addEventListener('keydown', function (e) { if (e.key === 'Escape') closeOverlay(); });\n      return ov;\n    }\n    /* claude- (2026-08-27, Adam: \"when i am selecting a product and viewing\n       in the glass \u2026 it is hitting that products page for all purposes\"):\n       a glass PDP open PUSHES the real /products/<handle> URL, so every\n       URL-keyed tool \u2014 GA/GTM history triggers, pixels, Hotjar, shares, a\n       refresh \u2014 sees the product page, alongside the Klaviyo + Shopify\n       Analytics events glassTrackProduct already fires. Swatch hops\n       REPLACE (no history spam); browser back and the overlay's close both\n       restore the page the shopper was on. */\n    var glassPrevTitle = null;\n    var glassPopClosing = false;\n    function glassUrlEnter(p) {\n      try {\n        var target = '/products/' + p.handle + window.location.search;\n        if (window.location.pathname === '/products/' + p.handle) return;\n        if (history.state && history.state.c3dGlass) {\n          history.replaceState({ c3dGlass: p.handle }, '', target);\n        } else {\n          glassPrevTitle = document.title;\n          history.pushState({ c3dGlass: p.handle }, '', target);\n        }\n        document.title = p.title + ' | The Heartbeat Brand';\n      } catch (e) {}\n    }\n    function glassUrlExit() {\n      try {\n        if (history.state && history.state.c3dGlass) {\n          glassPopClosing = true;\n          history.back();\n        }\n        if (glassPrevTitle) { document.title = glassPrevTitle; glassPrevTitle = null; }\n      } catch (e) {}\n    }\n    window.addEventListener('popstate', function (e) {\n      if (glassPopClosing) { glassPopClosing = false; return; }\n      /* browser back while a glass product URL is up: close the overlay\n         instead of leaving the page */\n      if (!(e.state && e.state.c3dGlass)) {\n        if (glassPrevTitle) { document.title = glassPrevTitle; glassPrevTitle = null; }\n        var ovp = document.querySelector('.c3d-ovl.is-open');\n        if (ovp) closeOverlay(true);\n      }\n    });\n    function closeOverlay(fromPop) {\n      var ov = document.querySelector('.c3d-ovl');\n      if (!ov) return;\n      if (fromPop !== true) glassUrlExit();\n      hideRopeSheet();\n      searchChrome(false);   /* the glass-search offset dies with the wall */\n      ovStack = [];\n      ov.classList.remove('is-in');\n      ov.querySelector('.c3d-ovl__grid').classList.remove('is-in');\n      clearTimeout(ov._t);\n      ov._t = setTimeout(function () { ov.classList.remove('is-open'); }, 380);\n      document.documentElement.classList.remove('c3d-ovl-lock');\n    }\n    /* claude- (2026-08-27, Adam: \"all states also change to States & Places\n       everwhere even in the menu\" \u2014 scrolling header exempted): a DISPLAY\n       rename only. Matching (walls, MENU_TILE_IMG, NAV_WALL_*) keeps the\n       nav's raw 'States' key. */\n    function dispLabel(l) {\n      if (/^states$/i.test(String(l || '').trim())) return 'States & Places';\n      return l;\n    }\n    function paintGrid(build, mode, title) {\n      var ov = ovEl();\n      /* the level's name reads across the top \u2014 the category itself is\n         just a word up there, never a tile (Adam, 2026-08-17) */\n      ov.querySelector('.c3d-ovl__title').textContent = dispLabel(title) || '';\n      var g = ov.querySelector('.c3d-ovl__grid');\n      g.classList.remove('is-in');\n      g.classList.toggle('c3d-ovl__grid--shop', mode === true || mode === 'shop');\n      g.classList.toggle('c3d-ovl__grid--pdp', mode === 'pdp');\n      g.classList.toggle('c3d-ovl__grid--menu', mode === 'menu');\n      g.innerHTML = '';\n      g.scrollTop = 0;\n      build(g);\n      /* shrink any label that would overrun its budget \u2014 nothing ever\n         lies outside the box (Adam, 2026-08-17) */\n      Array.prototype.slice.call(g.querySelectorAll('.c3d-ovl__chiplabel')).forEach(function (el) {\n        var size = 15;\n        el.style.fontSize = '';\n        while (size > 9 && el.scrollHeight > 60) {\n          size -= 1;\n          el.style.fontSize = size + 'px';\n        }\n      });\n      ov.querySelector('.c3d-ovl__back').style.display = ovStack.length > 1 ? '' : 'none';\n      /* EVEN SPACING (Adam, 2026-08-17: \"thats not even spacing\"): a\n         scrolling grid sizes each row to its own content, so tiles with\n         a 3-line name, a notify block or no reviews made ragged rows.\n         Measure the tallest shop tile and give every tile that height \u2014\n         once when the wall paints, again after Judge.me badges and lazy\n         images have settled. */\n      function evenPass() {\n        var chips = g.querySelectorAll('.c3d-ovl__chip--shop');\n        if (chips.length < 2) return;\n        /* per-ROW label zones first (Adam, 2026-08-17: \"just left to\n           right so you can look at each line as a group\" \u2014 a short name\n           must not inherit a 3-line gap from a different row) */\n        Array.prototype.forEach.call(chips, function (c) {\n          c.style.minHeight = '';\n          var lb = c.querySelector('.c3d-ovl__chiplabel');\n          if (lb) lb.style.minHeight = '';\n        });\n        var rows = {};\n        Array.prototype.forEach.call(chips, function (c) {\n          var k = Math.round(c.getBoundingClientRect().top / 8);\n          (rows[k] = rows[k] || []).push(c);\n        });\n        Object.keys(rows).forEach(function (k) {\n          var lmax = 0;\n          rows[k].forEach(function (c) {\n            var lb = c.querySelector('.c3d-ovl__chiplabel');\n            if (lb && lb.offsetHeight > lmax) lmax = lb.offsetHeight;\n          });\n          rows[k].forEach(function (c) {\n            var lb = c.querySelector('.c3d-ovl__chiplabel');\n            if (lb) lb.style.minHeight = lmax + 'px';\n          });\n        });\n        var max = 0;\n        Array.prototype.forEach.call(chips, function (c) {\n          if (c.offsetHeight > max) max = c.offsetHeight;\n        });\n        Array.prototype.forEach.call(chips, function (c) { c.style.minHeight = max + 'px'; });\n      }\n      /* the glass SEARCH wall swaps its result chips in place as the\n         query changes \u2014 it re-runs this same pass on the fresh chips */\n      g.__evenPass = evenPass;\n      setTimeout(evenPass, 450);\n      setTimeout(evenPass, 1500);\n      clearTimeout(ov._t);\n      if (!ov.classList.contains('is-open')) {\n        ov.classList.add('is-open');\n        document.documentElement.classList.add('c3d-ovl-lock');\n      }\n      /* two frames so the resting state paints before the pop begins */\n      requestAnimationFrame(function () {\n        requestAnimationFrame(function () { ov.classList.add('is-in'); g.classList.add('is-in'); });\n      });\n    }\n    /* WHITE BACKGROUNDS DIE AT RUNTIME (Adam, 2026-08-20: \"all of the photos\n       need the same treatment if they have the white background \u2014 for\n       example boonie white camo\"). Any glass image that loads with white\n       corners is flood-filled transparent on a canvas and swapped in place \u2014\n       catalog shots, current and future, no baked assets needed. Fill walks\n       in from the BORDER only, so white patches ON a hat survive. Images\n       already transparent fail the corner test and pass through untouched.\n       Shopify's CDN sends CORS headers; a tainted canvas (any other origin)\n       bails silently and the original photo stays. */\n    function deWhite(im) {\n      if (im.__c3dDW) return;\n      im.__c3dDW = 1;\n      if (!im.crossOrigin) im.crossOrigin = 'anonymous';\n      var run = function () {\n        var W0 = im.naturalWidth, H0 = im.naturalHeight;\n        if (!W0 || !H0) return;\n        var W = Math.min(W0, 480), H = Math.max(1, Math.round(H0 * W / W0));\n        var cv = document.createElement('canvas');\n        cv.width = W; cv.height = H;\n        var cx = cv.getContext('2d', { willReadFrequently: true });\n        cx.drawImage(im, 0, 0, W, H);\n        var d;\n        try { d = cx.getImageData(0, 0, W, H); } catch (e) { return; }\n        var px = d.data;\n        function white(i2) {\n          return px[i2 + 3] > 0 && px[i2] >= 235 && px[i2 + 1] >= 235 && px[i2 + 2] >= 235;\n        }\n        var corners = [(1 * W + 1) * 4, (1 * W + (W - 2)) * 4,\n                       ((H - 2) * W + 1) * 4, ((H - 2) * W + (W - 2)) * 4];\n        var wc = 0;\n        corners.forEach(function (c) { if (white(c)) wc++; });\n        if (wc < 3) return;\n        var visited = new Uint8Array(W * H);\n        var stack = [];\n        var x, y;\n        for (x = 0; x < W; x++) { stack.push(x, 0, x, H - 1); }\n        for (y = 0; y < H; y++) { stack.push(0, y, W - 1, y); }\n        while (stack.length) {\n          y = stack.pop(); x = stack.pop();\n          if (x < 0 || y < 0 || x >= W || y >= H) continue;\n          var n = y * W + x;\n          if (visited[n]) continue;\n          visited[n] = 1;\n          var i2 = n * 4;\n          if (!white(i2)) continue;\n          px[i2 + 3] = 0;\n          stack.push(x + 1, y, x - 1, y, x, y + 1, x, y - 1);\n        }\n        /* POCKETS (Adam, 2026-08-20: \"white camo still has some white where\n           the neck strap is\") \u2014 background showing THROUGH a loop is sealed\n           off from the border, so the walk above never reaches it. Second\n           pass: clear a leftover white region only when it is big AND pure\n           white throughout \u2014 a printed patch or a highlight has shading and\n           fails the purity bar, so whites ON the hat still survive. */\n        var n2, i3, cxx, cyy;\n        for (n2 = 0; n2 < W * H; n2++) {\n          if (visited[n2]) continue;\n          i3 = n2 * 4;\n          if (!white(i3)) continue;\n          var comp = [], hi = 0;\n          var st2 = [n2 % W, (n2 / W) | 0];\n          while (st2.length) {\n            cyy = st2.pop(); cxx = st2.pop();\n            if (cxx < 0 || cyy < 0 || cxx >= W || cyy >= H) continue;\n            var m = cyy * W + cxx;\n            if (visited[m]) continue;\n            visited[m] = 1;\n            var i4 = m * 4;\n            if (!white(i4)) continue;\n            comp.push(i4);\n            if (px[i4] >= 246 && px[i4 + 1] >= 246 && px[i4 + 2] >= 246) hi++;\n            st2.push(cxx + 1, cyy, cxx - 1, cyy, cxx, cyy + 1, cxx, cyy - 1);\n          }\n          /* studio background is BLOWN white (>=246); fabric white never is.\n             A big region that is mostly blown = background through a loop,\n             even with a soft shadow ramp at its rim. */\n          if (comp.length >= 400 && hi / comp.length >= 0.8) {\n            comp.forEach(function (i5) { px[i5 + 3] = 0; });\n          }\n        }\n        /* nibble the shadow ring a cleared pocket leaves behind: two thin\n           dilation passes eating dim gray pixels that touch transparency */\n        var pass, k, moved;\n        for (pass = 0; pass < 2; pass++) {\n          moved = [];\n          for (k = 0; k < W * H; k++) {\n            i3 = k * 4;\n            if (px[i3 + 3] === 0) continue;\n            if (px[i3] < 200 || px[i3 + 1] < 200 || px[i3 + 2] < 200) continue;\n            x = k % W; y = (k / W) | 0;\n            var t1 = x > 0 && px[(k - 1) * 4 + 3] === 0;\n            var t2 = x < W - 1 && px[(k + 1) * 4 + 3] === 0;\n            var t3 = y > 0 && px[(k - W) * 4 + 3] === 0;\n            var t4 = y < H - 1 && px[(k + W) * 4 + 3] === 0;\n            if (t1 || t2 || t3 || t4) moved.push(i3);\n          }\n          moved.forEach(function (i5) { px[i5 + 3] = 0; });\n        }\n        cx.putImageData(d, 0, 0);\n        try { im.src = cv.toDataURL('image/png'); } catch (e) {}\n      };\n      if (im.complete && im.naturalWidth) {\n        /* already loaded \u2014 possibly without CORS; reload a clean copy,\n           cut on that, hand the result back to the DOM node */\n        var clean = new Image();\n        clean.crossOrigin = 'anonymous';\n        clean.onload = function () {\n          var keep = im;\n          im = clean;\n          run();\n          keep.src = clean.src;   /* dataURL when cut; original otherwise */\n        };\n        clean.src = im.src;\n      } else {\n        if (im.src) { var s = im.src; im.src = ''; im.src = s; }  /* restart the fetch WITH CORS */\n        im.addEventListener('load', function once() {\n          im.removeEventListener('load', once);\n          run();\n        });\n      }\n    }\n\n    function chip(g, i, opts) {\n      var el = document.createElement(opts.href && !opts.cart && !opts.onPick ? 'a' : 'div');\n      el.className = 'c3d-ovl__chip';\n      if (el.tagName === 'A') el.href = opts.href;\n      if (opts.img) {\n        var im = document.createElement('img');\n        im.className = 'c3d-ovl__chipimg';\n        im.crossOrigin = 'anonymous';\n        im.src = opts.img; im.alt = ''; im.loading = 'lazy'; im.decoding = 'async';\n        deWhite(im);\n        el.appendChild(im);\n      }\n      var sp = document.createElement('span');\n      sp.className = 'c3d-ovl__chiplabel';\n      sp.textContent = dispLabel(opts.label);\n      el.appendChild(sp);\n      (opts.fabLines || []).forEach(function (line) {\n        var f = document.createElement('span');\n        f.className = 'c3d-ovl__fabline';\n        f.textContent = line;\n        el.appendChild(f);\n      });\n      /* shop tiles RESERVE the mesh row even when there isn't one, so\n         stars / price / buttons land on the same line in every tile\n         (Adam, 2026-08-17: \"everything must line up\") */\n      if (opts.cart && (!opts.fabLines || !opts.fabLines.length)) {\n        var f0 = document.createElement('span');\n        f0.className = 'c3d-ovl__fabline';\n        f0.innerHTML = '&nbsp;';\n        el.appendChild(f0);\n      }\n      if (opts.jdgmHandle) {\n        /* Judge.me's own preview badge (stars + count) \u2014 filled after the\n           level renders via jdgm.batchRenderBadges([{productHandle,\n           badgePlaceholder}]), which is the shape its source expects */\n        var jb = document.createElement('div');\n        jb.className = 'c3d-ovl__stars';\n        jb.setAttribute('data-product-handle', opts.jdgmHandle);\n        el.appendChild(jb);\n      }\n      if (opts.sub) {\n        var sb = document.createElement('span');\n        sb.className = 'c3d-ovl__chipsub';\n        if (opts.was) {\n          /* struck compare-at beside the sale price (Adam, launch night) */\n          sb.innerHTML = '<s class=\"c3d-pp-was\">' + opts.was + '</s> ' + opts.sub;\n        } else {\n          sb.textContent = opts.sub;\n        }\n        el.appendChild(sb);\n      }\n      if (opts.mix) { el.appendChild(mixEl()); }\n      if (opts.cart) {\n        el.classList.add('c3d-ovl__chip--shop');\n        if (!opts.cart.available && klaviyoCompanyId()) {\n          /* sold out: a quiet flag plus NOTIFY ME \u2014 no dead button */\n          var sf = document.createElement('span');\n          sf.className = 'c3d-ovl__soldflag';\n          sf.textContent = 'Sold out';\n          el.appendChild(sf);\n          el.appendChild(notifyControl(opts.cart.id));\n        } else {\n        var btn = document.createElement('button');\n        btn.type = 'button';\n        btn.className = 'c3d-ovl__atc';\n        if (opts.cart.available) { btn.textContent = 'Add to cart'; }\n        else {\n          btn.textContent = 'Sold out';\n          btn.disabled = true;\n        }\n        btn.addEventListener('click', function (e) {\n          e.stopPropagation();\n          if (btn.disabled) return;\n          btn.disabled = true;\n          btn.textContent = 'Adding\u2026';\n          cartAdd(opts.cart.id).then(function () {\n            btn.textContent = 'Added \u2713';\n            btn.disabled = false;\n            /* rope popup retired (Adam, 2026-08-26) \u2014 the cart drawer's\n               Suggested Add-Ons unit replaced it; code kept for rollback */\n          }).catch(function () {\n            btn.textContent = 'Try again';\n            btn.disabled = false;\n          });\n        });\n        el.appendChild(btn);\n        }\n      }\n      if (opts.onPick) {\n        el.addEventListener('click', function (e) { e.preventDefault(); opts.onPick(); });\n        el.style.cursor = 'pointer';\n      } else if (opts.cart && opts.onOpen) {\n        /* tapping the tile opens the GLASS product page \u2014 the shopper is\n           never navigated away (Adam, 2026-08-17) */\n        el.addEventListener('click', function () { opts.onOpen(); });\n        el.style.cursor = 'pointer';\n      } else if (opts.cart && opts.href) {\n        el.addEventListener('click', function () { window.location.href = opts.href; });\n        el.style.cursor = 'pointer';\n      }\n      /* one at a time \u2014 capped so a 38-hat level doesn't trickle for\n         seconds while the shopper is already scrolling */\n      el.style.transitionDelay = (40 + Math.min(i * 40, 480)) + 'ms';\n      g.appendChild(el);\n      return el;\n    }\n    function go(fn) { ovStack.push(fn); fn(); }\n\n    /* the store's live volume ladder, under every glass price \u2014 MIX &\n       MATCH headline above the numbers, both sized up (Adam, 2026-08-17) */\n    function mixEl() {\n      var mx = document.createElement('div');\n      mx.className = 'c3d-ovl__mix';\n      var h = document.createElement('span');\n      h.className = 'c3d-ovl__mixhead';\n      h.textContent = 'Mix & Match';\n      var vals = document.createElement('span');\n      vals.className = 'c3d-ovl__mixvals';\n      vals.textContent = '2 for $60 \u00B7 3 for $85 \u00B7 4 for $100';   /* standard promo restored (sale over, 2026-08-31) */\n      mx.appendChild(h);\n      mx.appendChild(vals);\n      return mx;\n    }\n\n    /* NOTIFY WHEN AVAILABLE (Adam, 2026-08-17): sold-out hats grow a\n       notify button; the email goes to Klaviyo's back-in-stock API using\n       the site's own public key, read off the Klaviyo script tag at\n       runtime \u2014 nothing hardcoded. Klaviyo emails them when stock lands.\n       If Klaviyo isn't on the page the button simply doesn't render. */\n    function klaviyoCompanyId() {\n      if (window.__c3dKco !== undefined) return window.__c3dKco;\n      var id = null;\n      Array.prototype.slice.call(document.querySelectorAll('script[src*=\"klaviyo\"]')).forEach(function (s) {\n        var m = /company_id=([A-Za-z0-9]+)/.exec(s.src || '');\n        if (m) id = m[1];\n      });\n      window.__c3dKco = id;\n      return id;\n    }\n    /* the collection page's grid builds the SAME sold-out notify block\n       (Adam, 2026-08-17: \"I want the product on all glass to mimic each\n       other\") \u2014 hoisting makes the function reachable from here */\n    window.__c3dNotifyControl = function (variantId) {\n      return klaviyoCompanyId() ? notifyControl(variantId) : null;\n    };\n    function notifyControl(variantId) {\n      /* the whole thing stands open (Adam, 2026-08-17): Sold out flag\n         above this, then the email field, then NOTIFY ME which submits */\n      var wrap = document.createElement('div');\n      wrap.className = 'c3d-ovl__notify';\n      var inp = document.createElement('input');\n      inp.type = 'email';\n      inp.placeholder = 'Enter Email';   /* Adam's wording, 2026-08-17 */\n      inp.className = 'c3d-ovl__notifyinput';\n      inp.addEventListener('click', function (ev) { ev.stopPropagation(); });\n      var send_ = document.createElement('button');\n      send_.type = 'button';\n      send_.className = 'c3d-ovl__atc';\n      send_.textContent = 'Notify me';\n      send_.addEventListener('click', function (ev) {\n        ev.stopPropagation();\n        var email = inp.value.trim();\n        if (!/^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$/.test(email)) { inp.classList.add('is-bad'); return; }\n        inp.classList.remove('is-bad');\n        send_.disabled = true;\n        send_.textContent = '\u2026';\n        fetch('https://a.klaviyo.com/client/back-in-stock-subscriptions/?company_id=' + klaviyoCompanyId(), {\n          method: 'POST',\n          headers: { 'Content-Type': 'application/json', 'revision': '2024-10-15' },\n          body: JSON.stringify({ data: {\n            type: 'back-in-stock-subscription',\n            attributes: {\n              profile: { data: { type: 'profile', attributes: { email: email } } },\n              channels: ['EMAIL']\n            },\n            relationships: { variant: { data: {\n              type: 'catalog-variant',\n              id: '$shopify:::$default:::' + variantId\n            } } }\n          } })\n        }).then(function (r) {\n          if (r.status < 200 || r.status >= 300) throw new Error('klaviyo ' + r.status);\n          wrap.innerHTML = '';\n          var ok = document.createElement('span');\n          ok.className = 'c3d-ovl__chipsub';\n          ok.textContent = \"You're on the list \u2713\";\n          wrap.appendChild(ok);\n        }).catch(function () {\n          send_.disabled = false;\n          send_.textContent = 'Try again';\n        });\n      });\n      wrap.appendChild(inp);\n      wrap.appendChild(send_);\n      return wrap;\n    }\n\n    /* THE ROPE UPSELL (Adam, 2026-08-17): after any successful add-to-cart\n       from the glass, a small glass sheet slides up offering a hat rope \u2014\n       a swipeable carousel of every rope in stock, NO THANKS bottom-right.\n       \"No thanks\" silences it for the SESSION; adding a rope or ignoring\n       it does not \u2014 it returns on the next add. The price in the title is\n       the ropes' LIVE minimum price from the storefront, never hardcoded\n       (they list at $5.99 as of 2026-08-17, not the $4.99 in the ask \u2014\n       flagged to Adam). */\n    var ROPE_KEY = 'c3dRopeNoThanks';\n    function maybeOfferRope() {\n      try { if (window.sessionStorage.getItem(ROPE_KEY) === '1') return; } catch (e) {}\n      fetchCollection('hat-ropes').then(function (ropes) {\n        ropes = ropes.filter(function (p) { var v = firstAvail(p); return v && v.available; });\n        if (ropes.length) showRopeSheet(ropes);\n      }).catch(function () {});\n    }\n    function hideRopeSheet() {\n      var s = document.querySelector('.c3d-rope');\n      if (!s) return;\n      s.classList.remove('is-in');\n      setTimeout(function () { s.remove(); }, 380);\n    }\n    function showRopeSheet(ropes) {\n      hideRopeSheet();\n      var minP = null;\n      ropes.forEach(function (p) {\n        var n = parseFloat(firstAvail(p).price);\n        if (minP === null || n < minP) minP = n;\n      });\n      var sheet = document.createElement('div');\n      sheet.className = 'c3d-rope';\n      var ttl = document.createElement('p');\n      ttl.className = 'c3d-rope__title';\n      ttl.textContent = 'Add a hat rope \u2014 $' + minP.toFixed(2);\n      sheet.appendChild(ttl);\n      var row = document.createElement('div');\n      row.className = 'c3d-rope__row';\n      ropes.forEach(function (p) {\n        var v = firstAvail(p);\n        var t = document.createElement('button');\n        t.type = 'button';\n        t.className = 'c3d-rope__tile';\n        var im = document.createElement('img');\n        im.src = prodImgSrc(p); im.alt = ''; im.loading = 'lazy'; im.decoding = 'async';\n        t.appendChild(im);\n        var nm = document.createElement('span');\n        nm.textContent = p.title\n          .replace(/^Hat Rope - /i, '')\n          .replace(/\\s*\\(Hat Not Included\\)\\s*/i, '');\n        t.appendChild(nm);\n        t.addEventListener('click', function () {\n          if (t.classList.contains('is-busy')) return;\n          t.classList.add('is-busy');\n          nm.textContent = 'Adding\u2026';\n          cartAdd(v.id).then(function () {\n            nm.textContent = 'Added \u2713';\n            setTimeout(hideRopeSheet, 750);\n          }).catch(function () {\n            nm.textContent = 'Try again';\n            t.classList.remove('is-busy');\n          });\n        });\n        row.appendChild(t);\n      });\n      sheet.appendChild(row);\n      var no = document.createElement('button');\n      no.type = 'button';\n      no.className = 'c3d-rope__no';\n      no.textContent = 'No thanks';\n      no.addEventListener('click', function () {\n        try { window.sessionStorage.setItem(ROPE_KEY, '1'); } catch (e) {}\n        hideRopeSheet();\n      });\n      sheet.appendChild(no);\n      /* body-level, not inside the overlay \u2014 the dialog centers on the\n         SCREEN and outranks the theme's cart drawer */\n      document.body.appendChild(sheet);\n      requestAnimationFrame(function () {\n        requestAnimationFrame(function () { sheet.classList.add('is-in'); });\n      });\n    }\n\n    function renderProducts(prods, styleName, title) {\n      paintGrid(function (g) {\n        prods.forEach(function (p, i) {\n          var v = firstAvail(p);\n          var n = glassNameOf(p, styleName);\n          chip(g, i, {\n            label: n.name,\n            fabLines: n.mesh ? [n.mesh] : [],\n            sub: v ? '$' + v.price : '',\n              was: v && parseFloat(v.compare_at_price || 0) > parseFloat(v.price || 0) ? '$' + v.compare_at_price : null,\n            img: prodImgSrc(p),\n            href: '/products/' + p.handle,\n            jdgmHandle: p.handle,\n            cart: v ? { id: v.id, available: !!v.available } : null,\n            onOpen: function () { go(function () { renderProduct(p, prods, styleName); }); }\n          });\n        });\n      }, true, title || styleName || '');\n      /* light up the stars on the fresh tiles */\n      if (window.jdgm && typeof window.jdgm.batchRenderBadges === 'function') {\n        try {\n          var slots = Array.prototype.slice.call(\n            document.querySelectorAll('.c3d-ovl .c3d-ovl__stars[data-product-handle]'));\n          if (slots.length) {\n            window.jdgm.batchRenderBadges(slots.map(function (el) {\n              return { productHandle: el.getAttribute('data-product-handle'), badgePlaceholder: el };\n            }));\n          }\n        } catch (e) {}\n      }\n    }\n    /* THE GLASS SEARCH (Adam, 2026-08-27: \"the entire search experience\n       needs the glass treatment it is clunky old and hats photos with\n       white backgrounds its messy\" \u2014 then, same day: \"it should still\n       interact with the current search bar not be its own overlay\").\n       So: the THEME'S OWN search bar stays the input \u2014 it keeps focus,\n       value and markup \u2014 and the glass only paints the RESULTS below it,\n       as the same shop tiles every other wall uses (side shots, deWhite,\n       stars, price, add to cart, tap \u2192 glass PDP). Nothing server-\n       rendered changes: the form, the input, /search and the predictive\n       markup are byte-identical for a crawler, and a crawler never\n       focuses a field, so it never triggers any of this. Data comes from\n       the search.claude-results JSON view, so images follow the house\n       pick rules instead of the white featured shots. */\n    var searchSeq = 0, searchT = null, searchLast = null, searchBar = null;\n    function searchFetch(q) {\n      return fetch('/search?q=' + encodeURIComponent(q) + '&type=product&view=claude-results')\n        .then(function (r) { if (!r.ok) throw new Error('search ' + r.status); return r.json(); });\n    }\n    function searchChrome(on) {\n      var ov = document.querySelector('.c3d-ovl');\n      if (!ov) return;\n      if (on) {\n        ov.classList.add('c3d-ovl--search');\n        var top = 0;\n        try { top = Math.max(0, Math.round(searchBar.getBoundingClientRect().bottom) + 6); } catch (e) {}\n        ov.style.top = top + 'px';\n      } else {\n        ov.classList.remove('c3d-ovl--search');\n        ov.style.top = '';\n        /* leaving search folds the bar's focus too, so the keyboard drops\n           and the theme's search UI has no reason to wake up */\n        if (searchBar) { try { searchBar.blur(); } catch (e) {} }\n      }\n    }\n    function paintSearchResults(prods, msg) {\n      var g = searchPaint._grid, note = searchPaint._note;\n      if (!g || !note || !g.isConnected) return;\n      Array.prototype.slice.call(g.children).forEach(function (c) {\n        if (c !== note) g.removeChild(c);\n      });\n      note.textContent = msg || '';\n      prods.forEach(function (p, i) {\n        var v = firstAvail(p);\n        var n = glassNameOf(p, null);\n        chip(g, i, {\n          label: n.name,\n          fabLines: n.mesh ? [n.mesh] : [],\n          sub: v ? '$' + v.price : '',\n          was: v && parseFloat(v.compare_at_price || 0) > parseFloat(v.price || 0) ? '$' + v.compare_at_price : null,\n          img: prodImgSrc(p),\n          href: '/products/' + p.handle,\n          jdgmHandle: p.handle,\n          cart: v ? { id: v.id, available: !!v.available } : null,\n          /* opening a product leaves search mode \u2014 the PDP wall wants the\n             whole screen; back returns to the cached results */\n          onOpen: function () { searchChrome(false); go(function () { renderProduct(p, prods, null); }); }\n        });\n      });\n      /* the same label-shrink and row-evening every wall gets \u2014\n         paintGrid already ran; these chips arrived after it */\n      Array.prototype.slice.call(g.querySelectorAll('.c3d-ovl__chiplabel')).forEach(function (el) {\n        var size = 15;\n        el.style.fontSize = '';\n        while (size > 9 && el.scrollHeight > 60) {\n          size -= 1;\n          el.style.fontSize = size + 'px';\n        }\n      });\n      if (g.__evenPass) { setTimeout(g.__evenPass, 60); setTimeout(g.__evenPass, 900); }\n      if (window.jdgm && typeof window.jdgm.batchRenderBadges === 'function') {\n        try {\n          var slots = Array.prototype.slice.call(\n            g.querySelectorAll('.c3d-ovl__stars[data-product-handle]'));\n          if (slots.length) {\n            window.jdgm.batchRenderBadges(slots.map(function (el) {\n              return { productHandle: el.getAttribute('data-product-handle'), badgePlaceholder: el };\n            }));\n          }\n        } catch (e) {}\n      }\n    }\n    function searchPaint() {\n      paintGrid(function (g) {\n        var note = document.createElement('p');\n        note.className = 'c3d-ovl__searchnote';\n        note.textContent = 'Type to search hats';\n        g.appendChild(note);\n        searchPaint._grid = g;\n        searchPaint._note = note;\n        if (searchLast) paintSearchResults(searchLast.prods, searchLast.msg);\n      }, true, 'Search');\n      searchChrome(true);\n    }\n    function runGlassSearch(q) {\n      var seq = ++searchSeq;\n      q = (q || '').trim();\n      if (!q) { searchLast = null; paintSearchResults([], 'Type to search hats'); return; }\n      paintSearchResults((searchLast && searchLast.prods) || [], 'Searching\u2026');\n      searchFetch(q).then(function (d) {\n        if (seq !== searchSeq) return;\n        var prods = (d && d.products) || [];\n        var msg = !prods.length\n          ? 'No hats matched \u201C' + q + '\u201D \u2014 try another word.'\n          : (d.pages > 1\n            ? d.count + ' matches \u2014 showing the first ' + prods.length\n            : d.count + (d.count === 1 ? ' match' : ' matches'));\n        searchLast = { q: q, prods: prods, msg: msg };\n        paintSearchResults(prods, msg);\n      }).catch(function () {\n        if (seq === searchSeq) paintSearchResults([], 'Search hit a snag \u2014 try again.');\n      });\n    }\n    function glassSearchLive() {\n      /* the note is the liveness token: paintGrid wipes the grid's\n         children when any other wall paints, disconnecting it */\n      var ov = document.querySelector('.c3d-ovl.is-open.c3d-ovl--search');\n      return !!(ov && searchPaint._note && searchPaint._note.isConnected);\n    }\n    function glassSearchOpen(inp) {\n      searchBar = inp;\n      if (glassSearchLive()) return;\n      ovStack = [];\n      go(searchPaint);\n    }\n    function renderSubsections(cfg, prods, title) {\n      var subs = cfg.groups;\n      var groups = {}, order = [];\n      subs.forEach(function (s) { order.push(s.label); });\n      if (!cfg.noMore) order.push('More');\n      prods.forEach(function (p) {\n        var bucket = null;\n        for (var i = 0; i < subs.length; i++) {\n          if (subs[i].match.test(p.title)) { bucket = subs[i].label; break; }\n        }\n        if (!bucket) {\n          if (cfg.noMore) return;          /* only the named groups show */\n          bucket = 'More';\n        }\n        (groups[bucket] = groups[bucket] || []).push(p);\n      });\n      var byLabel = {};\n      subs.forEach(function (s) { byLabel[s.label] = s; });\n      paintGrid(function (g) {\n        var i = 0;\n        order.forEach(function (s) {\n          if (!groups[s]) return;\n          var ps = groups[s];\n          var def = byLabel[s];\n          chip(g, i++, {\n            label: s,\n            sub: ps.length === 1 ? '1 hat' : ps.length + ' hats',\n            img: prodImgSrc(ps[0]),\n            onPick: (def && def.drill)\n              ? function () { go(function () { renderSubsections(def.drill, ps, s); }); }\n              : function () { go(function () { renderProducts(ps, null, s); }); }\n          });\n        });\n      }, null, title || '');\n    }\n    function levelFor(handle, prods, title) {\n      var t = title || handle.replace(/-/g, ' ');\n      if (SUBSECTIONS[handle]) return function () { renderSubsections(SUBSECTIONS[handle], prods, t); };\n      if (DIRECT_TILES[handle]) return function () { renderProducts(prods, null, t); };\n      return function () { renderStyles(prods, t); };\n    }\n    /* the glass PDP photo sequence (Adam, 2026-08-17): the 3-hat composite\n       first, the PONYTAIL-HOLE shot second when the hat has one (the real\n       filename convention, learned from Florida ponytail pink \u2014 e.g.\n       \"...pink-white-ponytail-hole.png\"; some ponytail hats have it, some\n       don't yet), then the front shot, then the underbill. A WHITELIST,\n       and lifestyle shots (\"-woman-in-hat\") are excluded everywhere \u2014 no\n       person photos until Adam reshoots them. Glass only. */\n    function glassGallery(p) {\n      var imgs = p.images || [];\n      function find(re) {\n        for (var i = 0; i < imgs.length; i++) {\n          var s = imgs[i].src, l = s.toLowerCase();\n          if (l.indexOf('featureicon') >= 0) continue;\n          if (l.indexOf('-in-hat') >= 0 || l.indexOf('lifestyle') >= 0) continue;\n          if (re.test(l)) return s;\n        }\n        return null;\n      }\n      /* the FIRST shot must be the product's first real picture even when\n         nothing is named 'main' (Adam, launch night 2026-08-27: \"it should\n         always open on the first picture some are opening on the 2nd or\n         3rd\" \u2014 those products had no main composite, so the back or front\n         shot led). Fall back to the first non-excluded gallery image. */\n      var first = find(/main/);\n      if (!first) {\n        for (var fi = 0; fi < imgs.length; fi++) {\n          var fl = imgs[fi].src.toLowerCase();\n          if (fl.indexOf('featureicon') >= 0 || fl.indexOf('-in-hat') >= 0 || fl.indexOf('lifestyle') >= 0) continue;\n          first = imgs[fi].src;\n          break;\n        }\n      }\n      var seq = [first, find(/ponytail-hole|-back\\./), find(/-front\\./), find(/underbill/)];\n      var out = [], seen = {};\n      seq.forEach(function (s) { if (s && !seen[s]) { seen[s] = 1; out.push(s); } });\n      return out.length ? out : [prodImgSrc(p)];\n    }\n\n    /* THE GLASS PRODUCT PAGE (Adam, 2026-08-17: \"a glass product page with\n       all of the swatches so they are never navigated away\"): big image,\n       name, stars, price, add to cart \u2014 and a swatch row of every sibling\n       colorway in the current list. Tapping a swatch swaps the page in\n       place (the stack top is REPLACED, so BACK always returns to the\n       list, not back through every colour viewed). */\n    /* ANALYTICS FROM INSIDE THE GLASS (Adam, 2026-08-17: \"all of that\n       needs to function inside of the glass\"). A glass product open is\n       a real product view, so the two systems that care are told:\n       \u00B7 Klaviyo \u2014 'Viewed Product' + trackViewedItem, which is exactly\n         what arms the browse-abandonment flow (\"you were looking at\u2026\")\n       \u00B7 Shopify \u2014 a trekkie pageview + Viewed Product so sessions and\n         product-view counts include glass shopping.\n       SEO itself needs neither: crawlers read the real pages, and every\n       glass tile carries a real href for them to follow. Swatch hops\n       re-fire on purpose \u2014 each is a view of a different product. */\n    function glassTrackProduct(p) {\n      var url = window.location.origin + '/products/' + p.handle;\n      var v = p.variants && p.variants[0];\n      var price = v ? parseFloat(v.price) : null;\n      var img = p.images && p.images[0] && p.images[0].src;\n      try {\n        var kl = window.klaviyo || window._learnq;\n        if (kl && kl.push) {\n          kl.push(['track', 'Viewed Product', {\n            ProductName: p.title, ProductID: p.id, Handle: p.handle,\n            ImageURL: img, URL: url, Brand: 'The Heartbeat Brand', Price: price\n          }]);\n          kl.push(['trackViewedItem', {\n            Title: p.title, ItemId: p.id, ImageUrl: img, Url: url,\n            Metadata: { Price: price }\n          }]);\n        }\n      } catch (e) {}\n      try {\n        var sa = window.ShopifyAnalytics;\n        if (sa && sa.lib) {\n          if (sa.lib.page) sa.lib.page('/products/' + p.handle,\n            { pageType: 'product', resourceType: 'product', resourceId: p.id });\n          if (sa.lib.track) sa.lib.track('Viewed Product', {\n            currency: (sa.meta && sa.meta.currency) || 'USD',\n            variantId: v && v.id, productId: p.id,\n            name: p.title, price: price, brand: 'The Heartbeat Brand'\n          });\n        }\n      } catch (e) {}\n    }\n    /* THE SPEC CARD (Adam, 2026-08-17: \"i really only want the section\n       between unisex and color\"): the description's SIZE / FIT / VISOR /\n       MATERIAL / CLOSURE lines, parsed out of the body HTML. UNISEX and\n       COLOR themselves stay out \u2014 the color is the hat on screen. */\n    function specRows(p) {\n      var html = p.body_html || p.description || '';\n      if (!html) return [];\n      var div = document.createElement('div');\n      div.innerHTML = html;\n      var rows = [], started = false;\n      Array.prototype.slice.call(div.querySelectorAll('p, li')).forEach(function (el) {\n        var line = (el.textContent || '').replace(/\\s+/g, ' ').trim();\n        if (!line) return;\n        if (/^unisex\\b/i.test(line)) { started = true; return; }\n        if (/^colou?r\\s*:/i.test(line)) { started = false; return; }\n        if (!started) return;\n        var m2 = /^([a-z ]{2,20}):\\s*(.+)$/i.exec(line);\n        if (m2) rows.push({ k: m2[1].trim(), v: m2[2].trim() });\n      });\n      return rows;\n    }\n    /* how a collection's hats BREAK UP for the PDP's mini carousels:\n       subsection collections (color vibes types, flag, straw) use their\n       own groups; everything else groups by style in Adam's order. */\n    function pdpGroups(handle, prods, subject) {\n      /* STICKERS never ride the hat swatches (Adam, 2026-08-17: \"you\n         don't need more for the sticker\") \u2014 a freedom sticker was the\n         whole More mini on the freedom PDP */\n      prods = prods.filter(function (q) { return !/sticker/i.test(q.title); });\n      /* YOUTH NEVER TOUCHES ADULT (Adam, 2026-08-27): swatches stay in the\n         subject's own age segment, in every collection */\n      if (subject) {\n        /* the marker is the TITLE PREFIX \u2014 \"**YOUTH** \u2026\" (Adam, 2026-08-27) */\n        var yRe = /^\\s*\\**\\s*youth/i;\n        var subjY = yRe.test(subject.title || '');\n        prods = prods.filter(function (q) { return yRe.test(q.title || '') === subjY; });\n      }\n      var spec = SUBSECTIONS[handle];\n      var groups = {}, order = [];\n      if (spec) {\n        prods.forEach(function (q) {\n          for (var i = 0; i < spec.groups.length; i++) {\n            if (spec.groups[i].match.test(q.title)) {\n              (groups[spec.groups[i].label] = groups[spec.groups[i].label] || []).push(q);\n              return;\n            }\n          }\n          if (!spec.noMore) (groups['More'] = groups['More'] || []).push(q);\n        });\n        spec.groups.forEach(function (sg) { if (groups[sg.label]) order.push(sg.label); });\n        if (groups['More']) order.push('More');\n      } else {\n        prods.forEach(function (q) {\n          var s = styleOf(q);\n          (groups[s] = groups[s] || []).push(q);\n        });\n        STYLE_ORDER.concat(['More']).forEach(function (L) { if (groups[L]) order.push(L); });\n      }\n      return { groups: groups, order: order };\n    }\n    function renderProduct(p, prods, styleName) {\n      glassTrackProduct(p);\n      glassUrlEnter(p);\n      paintGrid(function (g) {\n        var v = firstAvail(p);\n        var wrap = document.createElement('div');\n        wrap.className = 'c3d-ovl__pdp';\n        /* rope products (Adam, 2026-08-28): square swatches so the wide\n           rope-arc pictures fit instead of being cropped by the circle */\n        if (/rope/i.test(p.title || '')) wrap.classList.add('c3d-ovl__pdp--ropes');\n        /* claude- (2026-08-28, Adam): TWO COLUMNS on desktop \u2014 the buy\n           block (photo/title/price/cart) on the RIGHT, the full swatch\n           wall with the spec card on the LEFT. Both wrappers are\n           display:contents below 1024px, so the mobile single-column\n           flow is untouched. */\n        var colBuy = document.createElement('div');\n        colBuy.className = 'c3d-ovl__pdp-col c3d-ovl__pdp-col--buy';\n        var colPick = document.createElement('div');\n        colPick.className = 'c3d-ovl__pdp-col c3d-ovl__pdp-col--pick';\n        wrap.appendChild(colBuy);\n        wrap.appendChild(colPick);\n        /* swipeable photo strip in Adam's order, with dots */\n        var shots = glassGallery(p);\n        var gal = document.createElement('div');\n        gal.className = 'c3d-ovl__pdp-gal';\n        var track = document.createElement('div');\n        track.className = 'c3d-ovl__pdp-track';\n        shots.forEach(function (src, si) {\n          var im = document.createElement('img');\n          im.className = 'c3d-ovl__pdp-img';\n          im.crossOrigin = 'anonymous';\n          im.src = src; im.alt = ''; im.decoding = 'async';\n          /* the FIRST photo loads eagerly \u2014 the rest lazy. With all lazy,\n             a later photo already in cache (the cart's add-on tiles prime\n             them) painted before photo one, and scroll anchoring + snap\n             settled the strip on it (Adam, launch night: \"mostly from the\n             cart open on the 2nd or 3rd picture\"). */\n          im.loading = si === 0 ? 'eager' : 'lazy';\n          if (si === 0) { try { im.fetchPriority = 'high' } catch (e) {} }\n          deWhite(im);\n          track.appendChild(im);\n        });\n        gal.appendChild(track);\n        /* ...and the strip is PINNED to photo one until the shopper\n           touches it: every image load (deWhite re-fires load when it\n           swaps in the cleaned copy) can shift a snap container, so each\n           one re-asserts scrollLeft 0 until a real interaction. */\n        var pinned = true;\n        function unpin () { pinned = false }\n        track.addEventListener('touchstart', unpin, { passive: true, once: true });\n        track.addEventListener('wheel', unpin, { passive: true, once: true });\n        track.addEventListener('pointerdown', unpin, { passive: true, once: true });\n        function pinHome () { if (pinned && track.scrollLeft !== 0) track.scrollLeft = 0 }\n        Array.prototype.forEach.call(track.children, function (im) {\n          im.addEventListener('load', pinHome);\n        });\n        requestAnimationFrame(pinHome);\n        setTimeout(pinHome, 200);\n        setTimeout(pinHome, 600);\n        /* claude- (2026-08-27, Adam): the product's theme, top left above\n           the hat picture \u2014 glass popup and PDP only, never the browsing\n           cards. Re-renders with every swatch swap. */\n        var corner = document.createElement('span');\n        corner.className = 'c3d-theme-corner';\n        corner.textContent = (p.title || '').split(' - ')[0].replace(/\\s*Hat\\s*$/i, '').toUpperCase();\n        if (corner.textContent) colBuy.appendChild(corner);\n        var dots = null;\n        if (shots.length > 1) {\n          dots = document.createElement('div');\n          dots.className = 'c3d-ovl__pdp-dots';\n          shots.forEach(function (_, di) {\n            var d = document.createElement('span');\n            if (di === 0) d.className = 'is-on';\n            dots.appendChild(d);\n          });\n          gal.appendChild(dots);\n          track.addEventListener('scroll', function () {\n            var k = Math.round(track.scrollLeft / track.clientWidth);\n            Array.prototype.forEach.call(dots.children, function (d, di) {\n              d.className = di === k ? 'is-on' : '';\n            });\n          }, { passive: true });\n        }\n        colBuy.appendChild(gal);\n        var n = glassNameOf(p, styleName);\n        var ttl = document.createElement('p');\n        ttl.className = 'c3d-ovl__chiplabel c3d-ovl__pdp-title';\n        ttl.textContent = n.name;\n        colBuy.appendChild(ttl);\n        if (n.mesh) {\n          var fl = document.createElement('span');\n          fl.className = 'c3d-ovl__fabline';\n          fl.textContent = n.mesh;\n          colBuy.appendChild(fl);\n        }\n        var stars = document.createElement('div');\n        stars.className = 'c3d-ovl__stars';\n        stars.setAttribute('data-product-handle', p.handle);\n        colBuy.appendChild(stars);\n        var pr = document.createElement('p');\n        pr.className = 'c3d-ovl__chipsub c3d-ovl__pdp-price';\n        /* the compare-at is struck beside the price (Adam, launch night:\n           \"the glass does not show the compare at ... 34.99 swiped\n           through then 29.99\"). Cents ride as data attrs so the pricing\n           engine never parses the struck text. */\n        if (v) {\n          var prCmp = parseFloat(v.compare_at_price || 0);\n          var prPrc = parseFloat(v.price || 0);\n          pr.dataset.ppcents = String(Math.round(prPrc * 100));\n          if (prCmp > prPrc) {\n            pr.dataset.ppcompare = String(Math.round(prCmp * 100));\n            pr.innerHTML = '<s class=\"c3d-pp-was\">$' + v.compare_at_price + '</s> $' + v.price;\n          } else {\n            pr.textContent = '$' + v.price;\n          }\n        } else {\n          pr.textContent = '';\n        }\n        colBuy.appendChild(pr);\n        colBuy.appendChild(mixEl());\n        if (v && !v.available && klaviyoCompanyId()) {\n          /* sold out on the glass PDP: quiet flag + NOTIFY ME, no dead\n             button \u2014 email captured right here, never leaving the glass */\n          var sf = document.createElement('span');\n          sf.className = 'c3d-ovl__soldflag';\n          sf.textContent = 'Sold out';\n          colBuy.appendChild(sf);\n          colBuy.appendChild(notifyControl(v.id));\n        } else {\n        var btn = document.createElement('button');\n        btn.type = 'button';\n        btn.className = 'c3d-ovl__atc c3d-ovl__pdp-atc';\n        if (v && v.available) { btn.textContent = 'Add to cart'; }\n        else {\n          btn.textContent = 'Sold out';\n          btn.disabled = true;\n        }\n        btn.addEventListener('click', function () {\n          if (btn.disabled) return;\n          btn.disabled = true;\n          btn.textContent = 'Adding\u2026';\n          cartAdd(v.id).then(function () {\n            btn.textContent = 'Added \u2713';\n            btn.disabled = false;\n            /* rope popup retired (2026-08-26) \u2014 see cart Suggested Add-Ons */\n          }).catch(function () {\n            btn.textContent = 'Try again';\n            btn.disabled = false;\n          });\n        });\n        colBuy.appendChild(btn);\n        }\n        /* VIEW FULL DETAILS \u2014 under Add to cart, ABOVE the swatches (Adam,\n           2026-08-25). data-c3d-native so the router NAVIGATES to the full\n           glass product page instead of re-opening this quick-view. */\n        var full = document.createElement('a');\n        full.className = 'c3d-ovl__fulllink';\n        full.setAttribute('data-c3d-native', '');\n        full.href = '/products/' + p.handle;\n        full.textContent = 'View full details';\n        colBuy.appendChild(full);\n        /* every sibling colourway as a swatch \u2014 and on color vibes ALL of\n           them visible at once (Adam, 2026-08-27: \"i want the swatches to\n           all be seen right there cause there are so many\"): the noCross\n           collections wrap into a wall instead of a scroll strip */\n        var swWall = lastCol && SUBSECTIONS[lastCol.handle] && SUBSECTIONS[lastCol.handle].noCross;\n        var sw = document.createElement('div');\n        sw.className = 'c3d-ovl__swatches' + (swWall ? ' c3d-ovl__swatches--wall' : '');\n        prods.forEach(function (sib) {\n          var s = document.createElement('button');\n          s.type = 'button';\n          s.className = 'c3d-ovl__swatch' + (sib === p ? ' is-current' : '');\n          var si = document.createElement('img');\n          si.src = prodImgSrc(sib); si.alt = colorwayOf(sib, styleName);\n          si.loading = 'lazy'; si.decoding = 'async';\n          s.appendChild(si);\n          if (sib !== p) {\n            s.addEventListener('click', function () {\n              ovStack.pop();\n              go(function () { renderProduct(sib, prods, styleName); });\n            });\n          }\n          sw.appendChild(s);\n        });\n        colPick.appendChild(sw);\n        /* OTHER GROUPS under the main swatches (Adam, 2026-08-17):\n           half-width labelled mini swatch carousels, two per line. The\n           grouping follows the COLLECTION'S OWN BREAKUP \u2014 styles for\n           most, color TYPES for color vibes and the other subsection\n           collections (\"you can put the same rule for color vibes how\n           it is broken up into type\"). Picking from another group\n           promotes that group to the main row. */\n        /* noCross (color vibes, 2026-08-27): the \"other group\" is always\n           the other AGE SEGMENT \u2014 never shown inside a product (\"don't\n           have youth swatches inside the adult product\"). */\n        var colSpec0 = lastCol && SUBSECTIONS[lastCol.handle];\n        if (lastCol && lastCol.prods && lastCol.prods.length && !(colSpec0 && colSpec0.noCross)) {\n          var grpInfo = pdpGroups(lastCol.handle, lastCol.prods, p);\n          var curLabel = null;\n          grpInfo.order.forEach(function (L) {\n            if (!curLabel && grpInfo.groups[L].some(function (q) { return q.handle === p.handle; })) curLabel = L;\n          });\n          if (!curLabel) curLabel = styleName || styleOf(p);\n          var others = document.createElement('div');\n          others.className = 'c3d-ovl__ostyles';\n          grpInfo.order.forEach(function (L) {\n            if (L === curLabel || !grpInfo.groups[L] || !grpInfo.groups[L].length) return;\n            var box = document.createElement('div');\n            box.className = 'c3d-ovl__ostyle';\n            var oh = document.createElement('p');\n            oh.className = 'c3d-ovl__ostylehead';\n            oh.textContent = L.toUpperCase();\n            box.appendChild(oh);\n            var row = document.createElement('div');\n            row.className = 'c3d-ovl__swatches c3d-ovl__swatches--mini';\n            var Lstyle = STYLE_ORDER.indexOf(L) >= 0 ? L : null;\n            grpInfo.groups[L].forEach(function (q) {\n              var ob = document.createElement('button');\n              ob.type = 'button';\n              ob.className = 'c3d-ovl__swatch';\n              var oi = document.createElement('img');\n              oi.src = prodImgSrc(q); oi.alt = colorwayOf(q, Lstyle);\n              oi.loading = 'lazy'; oi.decoding = 'async';\n              ob.appendChild(oi);\n              ob.addEventListener('click', function () {\n                ovStack.pop();\n                go(function () { renderProduct(q, grpInfo.groups[L], Lstyle); });\n              });\n              row.appendChild(ob);\n            });\n            box.appendChild(row);\n            others.appendChild(box);\n          });\n          if (others.children.length) colPick.appendChild(others);\n        }\n        /* edge fades on every swatch strip, main and minis */\n        Array.prototype.slice.call(wrap.querySelectorAll('.c3d-ovl__swatches')).forEach(edgeFade);\n        /* the spec card, under all the swatches */\n        var specs = specRows(p);\n        if (specs.length) {\n          var specGrid = document.createElement('div');\n          specGrid.className = 'c3d-ovl__specs';\n          specs.forEach(function (srow) {\n            var cell = document.createElement('div');\n            cell.className = 'c3d-ovl__spec' + (srow.v.length > 38 ? ' c3d-ovl__spec--wide' : '');\n            var kEl = document.createElement('span');\n            kEl.className = 'c3d-ovl__speck';\n            kEl.textContent = srow.k.toUpperCase();\n            var vEl = document.createElement('span');\n            vEl.className = 'c3d-ovl__specv';\n            vEl.textContent = srow.v;\n            cell.appendChild(kEl);\n            cell.appendChild(vEl);\n            specGrid.appendChild(cell);\n          });\n          colPick.appendChild(specGrid);\n        }\n        g.appendChild(wrap);\n      }, 'pdp');\n      if (window.jdgm && typeof window.jdgm.batchRenderBadges === 'function') {\n        try {\n          var slot = document.querySelector('.c3d-ovl .c3d-ovl__pdp .c3d-ovl__stars');\n          if (slot) window.jdgm.batchRenderBadges([{ productHandle: p.handle, badgePlaceholder: slot }]);\n        } catch (e) {}\n      }\n    }\n\n    function renderStyles(prods, title) {\n      var groups = {};\n      prods.forEach(function (p) {\n        var s = styleOf(p);\n        (groups[s] = groups[s] || []).push(p);\n      });\n      var order = STYLE_ORDER.concat(['More']);\n      paintGrid(function (g) {\n        var i = 0;\n        order.forEach(function (s) {\n          if (!groups[s]) return;\n          var ps = groups[s];\n          chip(g, i++, {\n            label: s,\n            sub: ps.length === 1 ? '1 hat' : ps.length + ' hats',\n            img: prodImgSrc(ps[0]),\n            onPick: function () { go(function () { renderProducts(ps, s); }); }\n          });\n        });\n      }, null, title || '');\n    }\n    function collectionTile(g, i, l, wordOnly) {\n      var el = chip(g, i, {\n        label: l.label,\n        img: l.img,\n        href: l.href,\n        onPick: function () {\n          /* claude- (2026-08-24, Adam): a collection tile takes you TO the\n             collection page \u2014 the in-glass product wall is retired. Pages\n             still open in the glass reader via leafPick. */\n          if (/\\/collections\\//.test(l.href)) { window.location.href = l.href; return; }\n          leafPick(l.href);\n        }\n      });\n      if (wordOnly) el.classList.add('c3d-ovl__chip--txt');\n      else lazyChipImg(el, l.href);\n      return el;\n    }\n    function renderCollections(links, title) {\n      paintGrid(function (g) {\n        links.forEach(function (l, i) { collectionTile(g, i, l); });\n      }, null, title || '');\n    }\n    /* THE ALL HATS DIRECTORY (Adam, 2026-08-17: \"inside all hats i want\n       sub categories... states in copperplate and the states a-z\n       underneath and so on; if it doesn't have a category put it under a\n       More heading, keeping the a-z format\"): Copperplate group headers\n       starting at the left \u2014 States, Sports, Passions \u2014 each with its\n       collections A\u2013Z beneath, then More with every remaining collection\n       from the nav, also A\u2013Z. */\n    function renderDirectory(items) {\n      var groups = [], grouped = {};\n      ['STATES', 'SPORTS', 'PASSIONS'].forEach(function (gl) {\n        var it = null;\n        items.forEach(function (x) {\n          if (!it && x.children && x.label.toUpperCase() === gl) it = x;\n        });\n        if (!it) return;\n        var kids = it.children.filter(function (k) {\n          return /\\/collections\\//.test(k.href || '');\n        }).slice().sort(function (a, b) { return a.label.localeCompare(b.label); });\n        kids.forEach(function (k) { grouped[k.label.toUpperCase()] = 1; });\n        grouped[gl] = 1;   /* the group's own parent collection never\n                              repeats itself inside More */\n        if (kids.length) groups.push({ label: it.label, kids: kids });\n      });\n      var uni = {}, more = [];\n      Array.prototype.slice.call(document.querySelectorAll(\n        'header a[href*=\"/collections/\"], .fixed-nav-top a[href*=\"/collections/\"]'\n      )).forEach(function (a) {\n        var label = normMenuLabel(a.textContent.trim().replace(/\\s+/g, ' '));\n        var href = a.getAttribute('href');\n        if (!label || !href) return;\n        var u = label.toUpperCase();\n        if (uni[u] || grouped[u]) return;\n        if (/gift card/i.test(label)) return;   /* not a hat category */\n        /* USA 250 and FREEDOM live inside the FLAG subsections \u2014 never\n           repeated in More (Adam, 2026-08-17) */\n        if (u === 'USA 250' || u === 'FREEDOM') return;\n        uni[u] = 1;\n        more.push({ label: label, href: href });\n      });\n      more.sort(function (a, b) { return a.label.localeCompare(b.label); });\n      /* the directory is a LIST \u2014 the small word buttons, no pictures\n         (Adam, 2026-08-17: \"i like how you had them without the pictures\n         and as a list in the smaller blocks\") */\n      paintGrid(function (g) {\n        var i = 0;\n        function header(text) {\n          var h = document.createElement('p');\n          h.className = 'c3d-ovl__ghead';\n          h.textContent = dispLabel(text);\n          g.appendChild(h);\n        }\n        groups.forEach(function (gr) {\n          header(gr.label);\n          gr.kids.forEach(function (k) { collectionTile(g, i++, k, true); });\n        });\n        if (more.length) {\n          header('More');\n          more.forEach(function (k) { collectionTile(g, i++, k, true); });\n        }\n      }, 'menu', 'All Hats');\n    }\n    /* tiles without a baked picture (states, sports, menu walls) fill in\n       the collection's first best-seller composite as it loads \u2014 and the\n       fetch doubles as the tap prefetch */\n    /* some collections need a SPECIFIC hat fronting their tile \u2014 boonies'\n       first product is the white camo whose photo is bad; Adam: \"use the\n       gray boonie\". The beanie/straw walls front their TOP SELLER (Adam,\n       2026-08-20: \"use the top selling for the images\") \u2014 resolved from\n       Admin sortKey BEST_SELLING on 2026-08-20; re-pin when sales shift.\n       Boonies keeps the gray: the top seller is that same bad-photo white\n       camo, and the photo call outranks the general rule. */\n    var COL_TILE_PICK = {\n      'boonies': /gray camo/i,\n      'beanies-hats': /tahoe beanie.*pom.*black/i,\n      'tahoe-beanies': /tahoe beanie.*pom.*black/i,\n      'mountains-beanies': /mountains beanie.*cuffed.*black/i,\n      'florida-beanies': /ribbed cuff.*black/i,\n      'idaho-beanies': /marled cuff.*black/i,\n      'cuffed-beanies-hats': /mountains beanie.*cuffed.*black/i,\n      'pom-beanies-hats': /tahoe beanie.*pom.*black/i,\n      'no-cuff-beanies-hats': /no cuff.*charcoal/i,\n      'straw-hats': /flag rugged/i,\n      'tahoe-straw': /emerald bay sunrise/i,\n      'florida-straw': /palms/i,\n      'idaho-straw': /sawtooth/i,\n      'nevada-straw': /mountains/i,\n      'surf-straw': /wave/i,\n      'flag-straw': /flag rugged/i\n    };\n    function lazyChipImg(el, href) {\n      if (!el || el.querySelector('.c3d-ovl__chipimg')) return;\n      var mm = /\\/collections\\/([^\\/?#]+)/.exec(href || '');\n      if (!mm) return;\n      fetchCollectionLite(mm[1]).then(function (prods) {\n        if (!prods.length || !el.parentNode) return;\n        var pickP = prods[0];\n        var re = COL_TILE_PICK[mm[1]];\n        if (re) {\n          for (var pi = 0; pi < prods.length; pi++) {\n            if (re.test(prods[pi].title)) { pickP = prods[pi]; break; }\n          }\n        }\n        /* claude- (2026-08-27, Adam: \"camping needs a 3 hat photo\",\n           \"team heros needs a 2 hat photo if we have it\"): wall tiles wear\n           the FAMILY '-main' shot, so a tile whose lead product is one of\n           the 45 single-hat cutouts (cutFor outranks 'main' in prodImgSrc)\n           no longer shows a lone hat \u2014 and a lead with no family shot at\n           all (camping) borrows the first sibling that has one. Pinned\n           picks (COL_TILE_PICK) keep their approved images untouched. */\n        var src = null;\n        if (!re) {\n          for (var pi2 = 0; pi2 < prods.length && !src; pi2++) {\n            var fimgs = prods[pi2].images || [];\n            for (var fi = 0; fi < fimgs.length && !src; fi++) {\n              var fs = fimgs[fi].src;\n              if (imgOk(fs) && fs.toLowerCase().indexOf('main') >= 0) src = fs;\n            }\n          }\n        }\n        if (!src) src = prodImgSrc(pickP);\n        if (!src || el.querySelector('.c3d-ovl__chipimg')) return;\n        var im = document.createElement('img');\n        im.className = 'c3d-ovl__chipimg';\n        im.crossOrigin = 'anonymous';\n        im.src = src; im.alt = ''; im.loading = 'lazy'; im.decoding = 'async';\n        deWhite(im);\n        el.insertBefore(im, el.firstChild);\n      }).catch(function () {});\n    }\n\n    /* THE WHOLE STORE IN THE GLASS (Adam, 2026-08-17: \"I want all of the\n       shopping to be done through the glass \u2014 any link, page, the\n       swatches in the hero... even the exchange/return policy and privacy\n       notices, our mission, ambassadors, contact, gift card, stickers \u2014\n       not blanks or custom yet\"). A capture-phase click router on the\n       homepage sends same-origin links into the glass: collections open\n       the shop, products open the glass product page, pages and policies\n       open a glass reader whose forms (contact) submit in place. Blanks,\n       custom, wholesale, cart, checkout, account and anything external\n       (Instagram cannot be embedded) stay untouched. */\n    var GLASS_SKIP = /^\\/(pages\\/(blanks|custom|wholesale)|cart|checkout|account|challenge|apps)/;\n    /* Adam's scrolling top bar (2026-08-17: \"it all needs to open its\n       pages in glass\") \u2014 three of its links can't be answered by their\n       own target: sports-hats is an EMPTY display collection (0\n       products, so the glass used to give up and navigate), and States /\n       Passions point at desktop landing pages (the passions one put a\n       stray 2-for-$60 banner in the glass reader). Each opens the same\n       glass wall the menu builds for that group instead. */\n    var NAV_WALL_COL = { 'sports-hats': 'SPORTS' };\n    var NAV_WALL_PAGE = {\n      'states-and-cities': 'STATES',\n      'dog-mountains-beach': 'PASSIONS',\n      'passions': 'PASSIONS'\n    };\n    function openMenuWall(name) {\n      var grp = null;\n      readFullMenu().forEach(function (it) {\n        if (!grp && it.children && it.label.toUpperCase() === name) grp = it;\n      });\n      if (!grp) return false;\n      var colKids = grp.children.filter(function (k) { return /\\/collections\\//.test(k.href || ''); });\n      go(colKids.length\n        ? function () { renderCollections(grp.children, grp.label); }\n        : function () { renderMenu(grp.children, grp.label); });\n      return true;\n    }\n    function glassRoute(path) {\n      /* one router for everything: collections \u2192 the shop, products \u2192 the\n         glass PDP, pages/policies \u2192 the glass reader. Excluded paths and\n         anything unrecognised fall back to real navigation. Returns true\n         when the glass took it. */\n      if (GLASS_SKIP.test(path)) return false;\n      /* claude- (2026-08-24, Adam, corrected same day): PRODUCTS still open\n         the glass PDP \u2014 \"i didn't want the old product page at all\". What was\n         retired is the HOMEPAGE shop-from-glass (collection walls / subsection\n         walls from the home cards) and the styles glass; collection links\n         navigate to real collection pages. */\n      var m = /\\/products\\/([^\\/?#]+)/.exec(path);\n      if (m) {\n        var directP = fetch('/products/' + m[1] + '.js')\n          .then(function (r) { if (!r.ok) throw new Error('p ' + r.status); return r.json(); })\n          .then(function (pj) {\n            return {\n              id: pj.id, title: pj.title, handle: pj.handle,\n              description: pj.description,   /* the spec card reads it */\n              images: (pj.images || []).map(function (s) { return { src: typeof s === 'string' ? s : s.src }; }),\n              variants: (pj.variants || []).map(function (v) {\n                return { id: v.id, available: v.available, price: (v.price / 100).toFixed(2),\n                  compare_at_price: v.compare_at_price ? (v.compare_at_price / 100).toFixed(2) : null,\n                  title: v.title };\n              })\n            };\n          });\n        /* SWATCHES EVERYWHERE (Adam, 2026-08-17: \"add in the swatches\n           ... just like from the homepage, they should always be the\n           same throughout\"): a direct open used to know only its own\n           product \u2014 one lonely swatch \u2014 where the homepage's walls pass\n           the whole style family. When the page knows its collection\n           (the collection template stamps data-c3d-collection), the\n           family is fetched and the PDP gets the same full swatch row. */\n        var colEl = document.querySelector('[data-c3d-collection]');\n        var colH = colEl && colEl.getAttribute('data-c3d-collection');\n        var sibsP = colH\n          ? fetchCollection(colH).catch(function () { return []; })\n          : Promise.resolve([]);\n        Promise.all([directP, sibsP]).then(function (r) {\n          var p = r[0], prods = r[1] || [];\n          var mine = null;\n          prods.forEach(function (q) { if (q.handle === p.handle) mine = q; });\n          var subject = mine || p;\n          /* siblings follow the collection's own breakup \u2014 style family\n             for most, color TYPE for color vibes etc (same rule as the\n             PDP minis) */\n          var sibs = [subject], sName = null;\n          if (mine && colH) {\n            var gi = pdpGroups(colH, prods, p);\n            gi.order.forEach(function (L) {\n              if (sName === null && gi.groups[L].some(function (q) { return q.handle === p.handle; })) {\n                sibs = gi.groups[L];\n                sName = STYLE_ORDER.indexOf(L) >= 0 ? L : '';\n              }\n            });\n            if (sName === '') sName = null;\n          }\n          go(function () { renderProduct(subject, sibs, sName); });\n        }).catch(function () { window.location.href = path; });\n        return true;\n      }\n      /* SHOP ALL HATS (hero, /collections/all) and the A-Z page both open\n         the All Hats DIRECTORY (Adam, 2026-08-17: \"it should go to the\n         same menu that we created\") */\n      if (/^\\/collections\\/all\\/?$/.test(path) || /^\\/pages\\/all-hats/.test(path)) {\n        /* claude- (2026-08-28, Adam): HATS goes to the REAL Shop All Hats\n           A-Z page \u2014 pictures, no carousel, no glass. The view param\n           forces the template until it's assigned in admin (launch\n           checklist); drop the param after assignment. */\n        if (/view=claude-all-hats/.test(window.location.search)) return false;\n        window.location.href = '/pages/all-hats-a-z?view=claude-all-hats';\n        return true;\n      }\n      /* claude- (2026-08-27, Adam: \"when i clock beanies it should open\n         Mountains Beanie, Tahoe Beanie and Idaho beanie sections to pick\n         from before entering into beanies, the customer will have a\n         preference which logo\") \u2014 a beanies click opens the three-family\n         chooser wall; each tile enters its own beanie collection. */\n      if (/^\\/collections\\/beanies(-hats)?\\/?$/.test(path)) {\n        go(function () {\n          renderCollections([\n            { label: 'Mountains Beanies', href: '/collections/mountains-beanies' },\n            { label: 'Tahoe Beanies', href: '/collections/tahoe-beanies' },\n            { label: 'Idaho Beanies', href: '/collections/idaho-beanies' }\n          ], 'Beanies');\n        });\n        return true;\n      }\n      /* claude- (2026-08-27, Adam: \"straw should get the same chooser\n         treatment with the different logos\") \u2014 six live straw families,\n         tile images already pinned in COL_TILE_PICK. */\n      if (/^\\/collections\\/straw-hats\\/?$/.test(path)) {\n        go(function () {\n          renderCollections([\n            { label: 'Flag Straw', href: '/collections/flag-straw' },\n            { label: 'Tahoe Straw', href: '/collections/tahoe-straw' },\n            { label: 'Florida Straw', href: '/collections/florida-straw' },\n            { label: 'Idaho Straw', href: '/collections/idaho-straw' },\n            { label: 'Nevada Straw', href: '/collections/nevada-straw' },\n            { label: 'Surf Straw', href: '/collections/surf-straw' }\n          ], 'Straw Hats');\n        });\n        return true;\n      }\n      m = /^\\/collections\\/([^\\/?#]+)\\/?$/.exec(path);\n      if (m) {\n        var h = m[1];\n        /* a group link (Sports \u2192 empty display collection) still opens its\n           glass LIST of collections; everything else navigates to the real\n           collection page (Adam, 2026-08-24) */\n        if (NAV_WALL_COL[h] && openMenuWall(NAV_WALL_COL[h])) return true;\n        return false;\n      }\n      m = /^\\/pages\\/([^\\/?#]+)/.exec(path);\n      if (m && NAV_WALL_PAGE[m[1]] && openMenuWall(NAV_WALL_PAGE[m[1]])) return true;\n      /* claude- (2026-08-27, Adam: \"the about us click in the menus should\n         now lead us to the page\"): pages and policies NAVIGATE \u2014 every page\n         carries the glass treatment now, so the glass reader pop-out is\n         retired for them. The category walls (states/passions above) and\n         the All Hats directory keep their glass. renderPage/bootHulk stay\n         in the file for rollback. */\n      return false;\n    }\n    window.__c3dGlassOpenCollection = function (href) {\n      try {\n        var path = new URL(href, window.location.origin).pathname;\n        ovStack = [];\n        return glassRoute(path);\n      } catch (e) { return false; }\n    };\n    /* THE HULK FORM (returns & exchanges, Adam 2026-08-17: \"returns and\n       exchanges should be the hulk form that i built as glass\"). The\n       form is MOUNTED by the app's JS into an empty .pxFormGenerator\n       div, so extraction alone shows a blank card \u2014 and Shopify sends\n       frame-ancestors 'none' on every storefront page, so framing the\n       real page is impossible. Instead the app's two scripts (the\n       inline window.hulkFormBuilder config and the CDN renderer) are\n       re-run HERE after the glass mounts the div: the form builds\n       itself inside the glass and Hulk's own JS handles submission. */\n    function bootHulk(doc) {\n      var cfg = null, src = null;\n      Array.prototype.slice.call(doc.querySelectorAll('script')).forEach(function (s) {\n        var t = s.textContent || '';\n        if (!s.getAttribute('src') && /hulkFormBuilder/.test(t) && !cfg) cfg = t;\n        if (s.getAttribute('src') && /form-builder/i.test(s.getAttribute('src')) && !src) src = s.getAttribute('src');\n      });\n      if (!cfg || !src) return;\n      Array.prototype.slice.call(document.querySelectorAll('.c3d-hulk-boot')).forEach(function (n) { n.remove(); });\n      /* the app's loader only boots on DOMContentLoaded \u2014 long gone by\n         now \u2014 so its exact chain is reproduced here: config, loader,\n         the assets the loader's handler would fetch (styles, then\n         searchableDropdown \u2192 extraFunctions), then the init calls the\n         handler makes. Read out of the loader source 2026-08-17. */\n      function el(tag, attrs) {\n        var n = document.createElement(tag);\n        n.className = 'c3d-hulk-boot';\n        for (var k in attrs) n[k] = attrs[k];\n        return n;\n      }\n      function js(u, then) {\n        if (!u) { then(); return; }\n        var s = el('script', { src: u });\n        s.onload = then;\n        s.onerror = then;\n        document.body.appendChild(s);\n      }\n      var c = el('script', {});\n      c.textContent = cfg;\n      document.body.appendChild(c);\n      js(src, function () {\n        var a = (window.hulkFormBuilder && window.hulkFormBuilder.assets) || {};\n        ['extraStyles', 'bootstrapStyles', 'formLayoutStyles'].forEach(function (k) {\n          if (a[k]) document.head.appendChild(el('link', { rel: 'stylesheet', href: a[k] }));\n        });\n        js(a.searchableDropdown, function () {\n          js(a.extraFunctions, function () {\n            if (typeof window.GetCorePage === 'function') window.GetCorePage();\n            if (typeof window.hulkFBInitFormBuilder === 'function') window.hulkFBInitFormBuilder();\n            if (typeof window.hulkFBKeyboardAccess === 'function') window.hulkFBKeyboardAccess();\n          });\n        });\n      });\n    }\n    function renderPage(href, title) {\n      paintGrid(function (g) {\n        var card = document.createElement('div');\n        card.className = 'c3d-ovl__page';\n        card.textContent = 'Loading\u2026';\n        g.appendChild(card);\n        fetch(href).then(function (r) { return r.text(); }).then(function (html) {\n          var doc = new DOMParser().parseFromString(html, 'text/html');\n          /* pages with a FORM (contact) take the whole main content \u2014 the\n             theme keeps the form in its own section, outside .rte, and\n             the narrow pick rendered contact with no form at all\n             (Adam, 2026-08-17: \"the contact form isn't working\") */\n          var node = doc.querySelector('.shopify-policy__container')\n            || (doc.querySelector('main form') ? doc.querySelector('main') : null)\n            || doc.querySelector('main .rte')\n            || doc.querySelector('main')\n            || doc.body;\n          Array.prototype.slice.call(node.querySelectorAll('script, style, iframe, noscript')).forEach(function (n) { n.remove(); });\n          card.textContent = '';\n          var body = document.createElement('div');\n          body.className = 'c3d-ovl__pagebody';\n          body.innerHTML = node.innerHTML;\n          card.appendChild(body);\n          /* an app-mounted form (Hulk) needs its scripts re-run now\n             that its mount div lives inside the glass */\n          if (body.querySelector('.pxFormGenerator')) bootHulk(doc);\n          /* forms (contact) submit from inside the glass */\n          Array.prototype.slice.call(body.querySelectorAll('form')).forEach(function (f) {\n            f.addEventListener('submit', function (e) {\n              e.preventDefault();\n              var sb = f.querySelector('[type=\"submit\"]');\n              if (sb) sb.disabled = true;\n              fetch(f.getAttribute('action') || href, { method: 'POST', body: new FormData(f) })\n                .then(function (r) {\n                  /* Shopify may bounce a programmatic post to its spam\n                     challenge \u2014 that needs a human on the REAL page, so\n                     hand over honestly instead of faking a success */\n                  if (r.url && r.url.indexOf('/challenge') >= 0) {\n                    window.location.href = href;\n                    return;\n                  }\n                  if (!r.ok) throw new Error('form ' + r.status);\n                  f.innerHTML = '';\n                  f.textContent = 'Sent \u2713 \u2014 we will get back to you.';\n                })\n                .catch(function () { if (sb) sb.disabled = false; });\n            });\n          });\n        }).catch(function () { window.location.href = href; });\n      }, 'pdp');\n    }\n    /* THE GLASS MENU (Adam, 2026-08-17: \"i even want the menu popout to\n       be glass\"): the hamburger opens a glass wall of the store's menu \u2014\n       groups drill in place, leaves route through glassRoute. The model\n       is read live off the theme's own menu drawer DOM. */\n    function findMenuRoot() {\n      var s = Array.prototype.slice.call(document.querySelectorAll('details summary')).filter(function (x) {\n        return /passions|sports|states/i.test(x.textContent);\n      })[0];\n      if (s) {\n        var host = s.closest('nav') || s.closest('[class*=\"drawer\" i]') || s.closest('[class*=\"menu\" i]');\n        if (host) return host;\n      }\n      return document.querySelector('header nav') || document.querySelector('header') || document.body;\n    }\n    function readMenu(root) {\n      var items = [], seen = {};\n      Array.prototype.slice.call(root.querySelectorAll('details')).forEach(function (d) {\n        var s = d.querySelector('summary');\n        if (!s) return;\n        var label = s.textContent.trim().replace(/\\s+/g, ' ');\n        var kseen = {};\n        var kids = Array.prototype.slice.call(d.querySelectorAll('a')).map(function (a) {\n          return { label: a.textContent.trim().replace(/\\s+/g, ' '), href: a.getAttribute('href') };\n        }).filter(function (k) {\n          if (!k.label || !k.href) return false;\n          var u = k.label.toUpperCase();\n          if (u.indexOf('7K') >= 0 || String(k.href).indexOf('7k-club') >= 0) return false;   /* unlisted (2026-08-27) */\n          if (u === label.toUpperCase()) return false;   /* no self-link row */\n          if (kseen[u]) return false;\n          kseen[u] = 1;\n          return true;\n        });\n        if (label && kids.length && !seen[label.toUpperCase()]) {\n          seen[label.toUpperCase()] = 1;\n          items.push({ label: label, children: kids });\n        }\n      });\n      Array.prototype.slice.call(root.querySelectorAll('a')).forEach(function (a) {\n        if (a.closest('details')) return;\n        var label = a.textContent.trim().replace(/\\s+/g, ' ');\n        if (/^hats$/i.test(label)) label = 'All Hats';   /* Adam, 2026-08-17 */\n        var href = a.getAttribute('href');\n        if (!label || !href || href.charAt(0) === '#') return;\n        if (/log ?in|basket|cart|search/i.test(label)) return;\n        if (seen[label.toUpperCase()]) return;\n        seen[label.toUpperCase()] = 1;\n        items.push({ label: label, href: href });\n      });\n      return items;\n    }\n    /* the FULL menu (Adam, 2026-08-17: \"i didn't say take anything out\")\n       \u2014 union of the drawer nav AND the scrolling top bar, with a group\n       literally named MORE flattened into the wall so Our Mission,\n       Pickleball Paddles, Stickers, Gift Card etc all show. Wholesale,\n       Custom and Blanks are listed too \u2014 they route natively per the\n       standing exclusion. */\n    function normMenuLabel(label) {\n      return /^hats$/i.test(label) ? 'All Hats' : label;\n    }\n    function readFullMenu() {\n      var base = readMenu(findMenuRoot());\n      var seen = {}, childSeen = {};\n      var items = [];\n      base.forEach(function (it) {\n        it.label = normMenuLabel(it.label);\n        if (it.children) {\n          it.children.forEach(function (k) { childSeen[k.label.toUpperCase()] = 1; });\n        }\n      });\n      base.forEach(function (it) {\n        if (it.children && /^more$/i.test(it.label)) {\n          it.children.forEach(function (k) {\n            var u = k.label.toUpperCase();\n            if (seen[u]) return;\n            seen[u] = 1;\n            items.push(k);\n          });\n          return;\n        }\n        var u = it.label.toUpperCase();\n        if (seen[u]) return;\n        seen[u] = 1;\n        items.push(it);\n      });\n      /* the scrolling TOP BAR is Adam's own curated top level (USA 250,\n         Freedom, Color Vibes, Hat Ropes, Wholesale, Custom, Blanks\u2026) \u2014\n         everything on it joins the wall even when it also lives inside a\n         group. Other header links join only when they are NOT already a\n         child of a group (keeps fifty states off the top level). */\n      function sweep(selector, respectChildren) {\n        Array.prototype.slice.call(document.querySelectorAll(selector)).forEach(function (a) {\n          var label = normMenuLabel(a.textContent.trim().replace(/\\s+/g, ' '));\n          var href = a.getAttribute('href');\n          if (!label || !href || href.charAt(0) === '#') return;\n          if (/^(home|more)$/i.test(label)) return;\n          if (/log ?in|basket|cart|search/i.test(label)) return;\n          var u = label.toUpperCase();\n          if (seen[u]) return;\n          if (respectChildren && childSeen[u]) return;\n          seen[u] = 1;\n          items.push({ label: label, href: href });\n        });\n      }\n      sweep('.fixed-nav-top a', false);\n      sweep('header nav a', true);\n      /* BEANIES / STRAW / BOONIES \u2014 glass-only additions (Adam, 2026-08-20:\n         \"add in beanies straw and boonies after sale with pictures ...\n         beanies will have the categories such as mountains and tahoe to\n         click into, straw will have the same thing. just in the glass, not\n         update the menu entirely\"). Synthetic because the real nav must not\n         change; GLASS_MENU_ORDER seats them after SALE!. Groups drill into\n         the same collection wall every other group uses. */\n      [\n        /* Beanies re-cut 2026-08-20 per Adam: Florida OUT (\"there is\n           nothing there\"); Cuffed/Pom/No Cuff live INSIDE each place, not\n           at the top; Idaho has no No Cuff products so it shows two. Style\n           tiles open PRODUCT walls filtered by title \u2014 no per-place style\n           collections exist and none are needed. Tile art = white\n           backgrounds cut out (\"if they have a white background on\n           anything you can cut them out\") \u2014 claude-bn-*.png assets via\n           data-beanie-art. */\n        { label: 'Beanies', href: '/collections/beanies-hats', children: [\n          /* no top-level art: the tile wears MENU_TILE_IMG's white pom\n             (Adam, 2026-08-27); the drill tiles keep their cut art */\n          /* claude- (2026-08-24, Adam): the styles glass is retired \u2014 every\n             leaf here NAVIGATES to its real collection page. The style level\n             (Cuffed/Pom/No Cuff product walls) is gone with it. */\n          { label: 'All Beanies', href: '/collections/beanies-hats', art: 'tahoe-pom' },\n          { label: 'Tahoe', href: '/collections/tahoe-beanies', art: 'tahoe-pom' },\n          { label: 'Mountains', href: '/collections/mountains-beanies', art: 'mtn-cuffed' },\n          { label: 'Idaho', href: '/collections/idaho-beanies', art: 'idaho-cuffed' }\n        ] },\n        { label: 'Straw', href: '/collections/straw-hats', art: 'straw-flag', children: [\n          { label: 'All Straw', href: '/collections/straw-hats', art: 'straw-flag' },\n          { label: 'Tahoe', href: '/collections/tahoe-straw', art: 'straw-tahoe' },\n          { label: 'Florida', href: '/collections/florida-straw', art: 'straw-florida' },\n          { label: 'Idaho', href: '/collections/idaho-straw', art: 'straw-idaho' },\n          { label: 'Nevada', href: '/collections/nevada-straw', art: 'straw-nevada' },\n          { label: 'Surf', href: '/collections/surf-straw', art: 'straw-surf' },\n          /* flag-straw and thb-straw hold the SAME four hats \u2014 one tile,\n             Adam's name for it: \"it will say THB Flag\" (2026-08-20) */\n          { label: 'THB Flag', href: '/collections/flag-straw', art: 'straw-flag' }\n        ] },\n        { label: 'Boonies', href: '/collections/boonies', art: 'boonie-gray' }\n      ].forEach(function (x) {\n        var u = x.label.toUpperCase();\n        if (!seen[u]) { seen[u] = 1; items.push(x); }\n      });\n      return orderMenu(items);\n    }\n    /* THE GLASS MENU'S OWN ORDER (Adam, 2026-08-17: \"change the order of\n       the glass menu without touching the order of the menu on desktop\")\n       \u2014 the theme nav is never modified; only this wall sorts by the\n       list below. Shopping first, story second, business doors last.\n       Anything not listed keeps its natural position after the list. */\n    var GLASS_MENU_ORDER = [\n      /* picture tiles first, ending at GIFT CARD (Adam, 2026-08-17:\n         \"$7k club next to color vibes and sale next to 7k club ...\n         that will end anything with pictures\") */\n      'ALL HATS', 'USA 250', 'FREEDOM', 'SPORTS', 'STATES', 'PASSIONS',\n      'COLOR VIBES', '$7K CLUB', 'SALE!',\n      /* Adam, 2026-08-20: \"after sale\" */\n      'BEANIES', 'STRAW', 'BOONIES',\n      'HAT ROPES', 'PICKLEBALL PADDLES', 'STICKERS',\n      /* the Instagram glyph tile closes the picture rows, next to\n         STICKERS (Adam, 2026-08-27) */\n      'INSTAGRAM',\n      /* then the word-only rows: 3, then 2 centered, then 3 (Adam,\n         2026-08-27) \u2014 the centering itself is CSS on the CONTACT chip */\n      'GIFT CARD', 'OUR STORY', 'BECOME AN AMBASSADOR',\n      'CONTACT', 'RETURNS AND EXCHANGES',\n      'WHOLESALE', 'CUSTOM HATS', 'BLANK HATS'\n    ];\n    /* forced word buttons even though a collection could dress them */\n    var MENU_WORD_ONLY = { 'GIFT CARD': 1 };\n    function orderMenu(items) {\n      /* claude- (2026-08-27, Adam): \"7k club can be gone from everywhere\n         menus and everything only people that access it will have a link\n         to the page so keep the page live\" \u2014 the collection stays\n         published and reachable by direct link; every menu drops it. */\n      items = items.filter(function (it) {\n        return String(it.label || '').toUpperCase().indexOf('7K') < 0\n          && String(it.href || '').indexOf('7k-club') < 0;\n      });\n      /* glass renames (Adam, 2026-08-27). \"Become an Ambassador\" is the\n         MOBILE menu's word for it \u2014 the desktop nav keeps \"Ambassadors\".\n         Our Story / Custom Hats / Blank Hats are renamed at the THEME\n         level (claude-nav-label snippet + header-group), so the DOM\n         normally hands them over already renamed \u2014 the aliases here are\n         a backstop for any surface still emitting the old words. FOLLOW\n         US becomes the Instagram glyph tile beside STICKERS. */\n      items.forEach(function (it) {\n        var u = String(it.label || '').toUpperCase();\n        if (u === 'AMBASSADORS') it.label = 'Become an Ambassador';\n        if (u === 'OUR MISSION') it.label = 'Our Story';\n        if (u === 'CUSTOM') it.label = 'Custom Hats';\n        if (u === 'BLANKS') it.label = 'Blank Hats';\n        if (u === 'FOLLOW US') {\n          it.label = 'Instagram';\n          it.ig = true;\n          it.href = 'https://www.instagram.com/theheartbeatbrand';\n        }\n      });\n      var rank = {};\n      GLASS_MENU_ORDER.forEach(function (l, i) { rank[l] = i + 1; });\n      return items.map(function (it, i) {\n        return { it: it, r: rank[it.label.toUpperCase()] || (1000 + i) };\n      }).sort(function (a, b) { return a.r - b.r; })\n        .map(function (x) { return x.it; });\n    }\n    function leafPick(href) {\n      try {\n        var path = new URL(href, window.location.origin).pathname;\n        if (!glassRoute(path)) window.location.href = href;\n      } catch (e) { window.location.href = href; }\n    }\n    /* which collection fronts a menu tile's picture (Adam, 2026-08-17:\n       Alabama led STATES only by alphabet and \"it is one of our worst\n       selling hats\" \u2014 All Hats wears a mountains hat, States wears\n       Florida). Unlisted groups borrow their first collection child. */\n    var MENU_TILE_IMG = {\n      /* COLORFUL LEADS (Adam, 2026-08-27: \"wherever there is gray or\n         black hats as the main photo outside of the actual product need\n         to be a colorful 7 panel that doesn't clash with the background\n         ... even tan camo is hard\"). THREE-hat family composites, not\n         singles (\"all hats usa250 freedom and sports are all 1 hat not\n         the 3\") \u2014 only the white pom beanie stays a single (no trio\n         shot exists). His picks:\n         sports = the soft teal camo fishing hat, beanies = the white\n         pom, freedom = red/white/blue flat bill with the white back,\n         usa = red/white/blue with the navy back; All Hats wears the\n         mountains cream/black/charcoal, States the ocean-blue Florida. */\n      'ALL HATS': 'https://cdn.shopify.com/s/files/1/0802/0049/9515/files/mountains-hat-flat-bill-hat-snapback-cream-black-charcoal-main-side.png?width=360',\n      'HATS': 'https://cdn.shopify.com/s/files/1/0802/0049/9515/files/mountains-hat-flat-bill-hat-snapback-cream-black-charcoal-main-side.png?width=360',\n      /* STATES keeps its THREE-hat florida cork photo (Adam, 2026-08-27:\n         \"you got rid of the 3 hats on the mobile menu you shouldn't have\n         ... you can keep the flat bill florida cork\" \u2014 the ocean-blue\n         single blended into the glass) */\n      'STATES': '/collections/florida-hats',\n      'FREEDOM': 'https://cdn.shopify.com/s/files/1/0802/0049/9515/files/freedom-hats-flat-bill-snapback-hat-dark-red-white-navy-white-main.png?width=360',\n      'USA 250': 'https://cdn.shopify.com/s/files/1/0802/0049/9515/files/usa-hat-flat-bill-snapback-red-navy-white-navy-main-side.png?width=360',\n      'SPORTS': 'https://cdn.shopify.com/s/files/1/0802/0049/9515/files/golf-hat-flat-bill-snapback-black-white-camo-main-side.png?width=360',\n      'BEANIES': 'https://cdn.shopify.com/s/files/1/0802/0049/9515/files/mountains-beanie-pom-white-front.png?width=360'\n    };\n    /* STICKERS wears Adam's baseball-heartbeat artwork (the same theme\n       asset the hero swatch uses), passed in by the section (Adam,\n       2026-08-17). A non-/collections/ value is a direct image URL. */\n    var stickerArt = root.getAttribute('data-sticker-art');\n    if (stickerArt) MENU_TILE_IMG['STICKERS'] = stickerArt;\n    /* cut-out beanie art (slot -> asset url), passed the same way the\n       sticker art is \u2014 see the sections' data-beanie-art attribute */\n    var beanieArt = {};\n    try { beanieArt = JSON.parse(root.getAttribute('data-beanie-art') || '{}'); } catch (e) {}\n    /* which titles belong to a style tile's product wall */\n    var STYLE_FILTERS = {\n      all: function () { return true; },\n      pom: function (t) { return /pom/i.test(t); },\n      nocuff: function (t) { return /no cuff/i.test(t); },\n      cuffed: function (t) { return /cuff/i.test(t) && !/no cuff/i.test(t); }\n    };\n    function renderMenu(items, title) {\n      paintGrid(function (g) {\n        items.forEach(function (it, i) {\n          if (/^hats$/i.test(it.label)) it.label = 'All Hats';   /* groups too */\n          if (it.ig) {\n            /* FOLLOW US is one big Instagram glyph now (Adam, 2026-08-27:\n               \"a big instagram icon ... next to stickers\") \u2014 icon only,\n               opens the profile in a new tab like the underbill card */\n            var igEl = chip(g, i, {\n              label: 'Instagram', sub: '',\n              onPick: function () { window.open(it.href, '_blank', 'noopener'); }\n            });\n            igEl.classList.add('c3d-ovl__chip--ig');\n            igEl.setAttribute('aria-label', 'Follow us on Instagram');\n            var glyph = document.createElement('span');\n            glyph.className = 'c3d-ovl__ig';\n            glyph.innerHTML = '<svg viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\" focusable=\"false\"><circle cx=\"15.238\" cy=\"4.948\" r=\"1.238\"/><path d=\"M19.47 3.444A5.11 5.11 0 0 0 16.548.527a7.351 7.351 0 0 0-2.43-.466C13.05.014 12.713 0 9.999 0c-2.712 0-3.057 0-4.12.06A7.351 7.351 0 0 0 3.45.528 5.11 5.11 0 0 0 .528 3.444 7.317 7.317 0 0 0 .06 5.87C.014 6.936 0 7.274 0 9.982s0 3.053.06 4.113c.018.829.176 1.649.468 2.425a5.11 5.11 0 0 0 2.922 2.917 7.35 7.35 0 0 0 2.429.5c1.069.047 1.407.06 4.12.06s3.058 0 4.12-.06a7.351 7.351 0 0 0 2.429-.466 5.11 5.11 0 0 0 2.922-2.918 7.31 7.31 0 0 0 .467-2.424c.047-1.067.06-1.405.06-4.113s0-3.053-.06-4.113a7.317 7.317 0 0 0-.467-2.459zm-1.437 10.537a5.439 5.439 0 0 1-.34 1.843 3.262 3.262 0 0 1-1.87 1.87 5.451 5.451 0 0 1-1.825.34c-1.04.046-1.332.06-3.996.06-2.664 0-2.937 0-3.995-.06a5.451 5.451 0 0 1-1.825-.34 3.255 3.255 0 0 1-1.878-1.87 5.439 5.439 0 0 1-.34-1.823c-.046-1.038-.06-1.33-.06-3.992s0-2.934.06-3.992c.006-.63.121-1.253.34-1.844a3.255 3.255 0 0 1 1.878-1.87 5.451 5.451 0 0 1 1.825-.339c1.038-.046 1.331-.06 3.995-.06s2.937 0 3.996.06c.623.008 1.24.123 1.824.34.86.331 1.54 1.01 1.872 1.87.216.583.331 1.2.34 1.823.046 1.038.06 1.33.06 3.992 0 2.661 0 2.948-.047 3.992h-.014z\"/><path d=\"M9.991 14.753a4.761 4.761 0 1 1 0-9.523 4.761 4.761 0 0 1 0 9.523zm0-1.905a2.857 2.857 0 1 0 0-5.713 2.857 2.857 0 0 0 0 5.713z\"/></svg>';\n            igEl.insertBefore(glyph, igEl.firstChild);\n            return;\n          }\n          var override = MENU_TILE_IMG[it.label.toUpperCase()];\n          /* a non-/collections/ override is a direct image URL (STICKERS\n             wears Adam's baseball-heartbeat art) */\n          var directImg = (override && !/^\\/collections\\//.test(override)) ? override : null;\n          var imgHref = (!directImg && override) || it.href;\n          var colKids = (it.children || []).filter(function (k) {\n            return /\\/collections\\//.test(k.href || '');\n          });\n          if (!override && colKids.length) imgHref = colKids[0].href;\n          /* a tile is a PICTURE tile only when a collection can dress it;\n             everything else is a small word button (Adam, 2026-08-17) */\n          var hasPic = !MENU_WORD_ONLY[it.label.toUpperCase()]\n            && !!(directImg || (imgHref && /\\/collections\\//.test(imgHref)));\n          /* cut-out art beats every other image source for this tile */\n          var artImg = (it.art && beanieArt[it.art]) || null;\n          if (artImg) { directImg = artImg; hasPic = true; }\n          /* a group whose children are THEMSELVES groups (or style walls)\n             re-enters this menu renderer \u2014 the collection wall is flat and\n             would drop the third level (beanies places, 2026-08-20) */\n          var hasSubGroups = (it.children || []).some(function (k) {\n            return (k.children && k.children.length) || k.styleWall;\n          });\n          var el = chip(g, i, {\n            label: it.label,\n            img: directImg || null,\n            /* claude- (2026-08-27): no \"N inside\" count \u2014 Adam: \"i don't\n               like where it say how many are inside i think thats weird\" */\n            sub: '',\n            onPick: /^all hats$/i.test(it.label)\n              /* ALL HATS goes to the real Shop All Hats A-Z PAGE\n                 (Adam, 2026-08-28 \u2014 the glass directory is retired) */\n              ? function () { window.location.href = '/pages/all-hats-a-z?view=claude-all-hats'; }\n              : (it.children\n                /* a group with collections drills into the SAME wall the\n                   takeover uses; a group of plain links (Ambassadors)\n                   gets normal-size buttons, not screen-filling boxes */\n                ? (hasSubGroups\n                  ? function () { go(function () { renderMenu(it.children, it.label); }); }\n                  : (colKids.length\n                    ? function () { go(function () { renderCollections(it.children, it.label); }); }\n                    : function () { go(function () { renderMenu(it.children, it.label); }); }))\n                : function () { leafPick(it.href); })\n          });\n          if (hasPic && !directImg) lazyChipImg(el, imgHref);\n          if (!hasPic) el.classList.add('c3d-ovl__chip--txt');\n          /* CONTACT leads the centered pair in the 3 / 2 / 3 word rows\n             (Adam, 2026-08-27) \u2014 the offset itself is mobile-only CSS */\n          if (!hasPic && /^contact$/i.test(it.label)) el.classList.add('c3d-ovl__chip--pairlead');\n        });\n      }, 'menu', title || 'Menu');\n    }\n    /* claude- (2026-08-25): the glass menu + router now boot on EVERY page\n       (claude-glass-host snippet) \u2014 pages with a real c3d section would bind\n       these document listeners twice without this guard */\n    if (!window.__c3dDocBound) {\n    window.__c3dDocBound = true;\n    document.addEventListener('click', function (e) {\n      var t = e.target && e.target.closest ? e.target.closest('button, summary') : null;\n      if (!t || (t.closest && t.closest('.c3d-ovl'))) return;\n      var sig = ((t.getAttribute && (t.getAttribute('aria-label') || '')) + ' '\n        + (t.className || '') + ' ' + (t.id || '')).toLowerCase();\n      if (!/(hamburger|burger|menu[-_ ]*(toggle|icon|open|drawer|btn|button)|open[-_ ]*menu)/.test(sig)) return;\n      e.preventDefault();\n      e.stopPropagation();\n      var items = readFullMenu();\n      if (items.length) { ovStack = []; go(function () { renderMenu(items); }); }\n    }, true);\n\n    /* WHOLESALE INTRO: SOUND ON (Adam, 2026-08-27: \"sound on\n       automatically on the video when you click on wholesale\") \u2014 the\n       theme autoplays it muted (video_tag mutes any autoplay). This\n       tries the unmuted start browsers allow once the visitor has\n       clicked within the site (Chrome counts the nav tap that got them\n       here); where policy refuses \u2014 iOS Safari, cold landings \u2014 it\n       falls back to muted autoplay and unmutes on the first tap or\n       click anywhere on the page. */\n    if (window.location.pathname.indexOf('/pages/wholesale') === 0) {\n      (function () {\n        var tries = 0;\n        function arm(v) {\n          function un() {\n            v.muted = false; v.volume = 1;\n            var p = v.play();\n            if (p && p.catch) p.catch(function () {});\n            document.removeEventListener('pointerdown', un, true);\n            document.removeEventListener('touchstart', un, true);\n          }\n          document.addEventListener('pointerdown', un, true);\n          document.addEventListener('touchstart', un, true);\n        }\n        function attempt() {\n          var v = document.querySelector('.cc-video video');\n          if (!v) {\n            if (++tries < 40) setTimeout(attempt, 300);\n            return;\n          }\n          v.muted = false; v.volume = 1;\n          var p = v.play();\n          if (p && p.catch) {\n            p.catch(function () {\n              v.muted = true;\n              var p2 = v.play();\n              if (p2 && p2.catch) p2.catch(function () {});\n              arm(v);\n            });\n          }\n        }\n        attempt();\n      })();\n    }\n\n    /* THE SEARCH HOOKUP (Adam, 2026-08-27): the theme's own search bar\n       drives the glass \u2014 it keeps focus and value the whole time, the\n       glass results wall opens BELOW it, and nothing about the bar or\n       the /search page changes server-side. Focusing opens the wall,\n       typing re-queries it, Enter queries immediately instead of\n       navigating to the old results page. */\n    function isSearchBar(el) {\n      return !!(el && el.matches\n        && !el.closest('.c3d-ovl')\n        && el.matches('input[type=\"search\"], input[name=\"q\"]'));\n    }\n    document.addEventListener('focusin', function (e) {\n      if (!isSearchBar(e.target)) return;\n      glassSearchOpen(e.target);\n      if ((e.target.value || '').trim()) {\n        clearTimeout(searchT);\n        searchT = setTimeout(function () { runGlassSearch(e.target.value); }, 200);\n      }\n    }, true);\n    document.addEventListener('input', function (e) {\n      if (!isSearchBar(e.target)) return;\n      glassSearchOpen(e.target);\n      clearTimeout(searchT);\n      searchT = setTimeout(function () { runGlassSearch(e.target.value); }, 350);\n    }, true);\n    document.addEventListener('keydown', function (e) {\n      if (e.key !== 'Enter' || !isSearchBar(e.target)) return;\n      e.preventDefault();\n      e.stopPropagation();\n      glassSearchOpen(e.target);\n      clearTimeout(searchT);\n      runGlassSearch(e.target.value);\n      try { e.target.blur(); } catch (err) {}   /* fold the phone keyboard */\n    }, true);\n    document.addEventListener('submit', function (e) {\n      var f = e.target;\n      if (!f || !f.getAttribute || f.closest('.c3d-ovl')) return;\n      if (String(f.getAttribute('action') || '').indexOf('/search') < 0) return;\n      var qi = f.querySelector('input[name=\"q\"]');\n      if (!qi) return;\n      e.preventDefault();\n      e.stopPropagation();\n      glassSearchOpen(qi);\n      clearTimeout(searchT);\n      runGlassSearch(qi.value);\n    }, true);\n\n    /* the click router: every same-origin link on the page flows into the\n       glass; links inside a glass page keep the back stack */\n    document.addEventListener('click', function (e) {\n      var a = e.target && e.target.closest ? e.target.closest('a[href]') : null;\n      if (!a) return;\n      var inGlassBody = a.closest('.c3d-ovl__pagebody');\n      if (a.closest('.c3d-ovl') && !inGlassBody) return;   /* glass runs itself */\n      if (a.closest('.c3d-flip')) return;   /* the carousel cards bind their\n        own glass openers \u2014 routing their href here sent PASSIONS to beach\n        (its link target) instead of the Passions wall (2026-08-17) */\n      if (a.closest('[data-c3d-native]')) return;   /* the collection page's\n        A-Z carousel browses PAGE to PAGE on purpose \u2014 each collection page\n        is now itself the experience (Adam, 2026-08-17) */\n      if (a.closest('.fixed-nav-top')) return;   /* the scrolling TOP BAR is\n        REAL LINKS again \u2014 its pages and collections navigate natively\n        (Adam, 2026-08-20: \"I need the scrolling top bar to be links again\") */\n      var raw = a.getAttribute('href') || '';\n      if (!raw || raw.charAt(0) === '#') return;\n      var url;\n      try { url = new URL(a.href, window.location.origin); } catch (err) { return; }\n      if (url.origin !== window.location.origin\n        && url.hostname.indexOf('theheartbeatbrand.com') < 0) return;\n      if (!inGlassBody) ovStack = [];\n      if (glassRoute(url.pathname)) { e.preventDefault(); e.stopPropagation(); }\n    }, true);\n\n    }\n\n    flips.forEach(function (flip) {\n      var drawer = flip.querySelector('.c3d-flip__drawer');\n      var cta = flip.querySelector('.c3d-flip__cta');\n      if (!cta) return;\n      var links = drawer ? Array.prototype.slice.call(drawer.querySelectorAll('a'))\n        .map(function (a) {\n          return { href: a.getAttribute('href'), label: a.textContent, img: a.getAttribute('data-img') };\n        }) : [];\n      var m = /\\/collections\\/([^\\/?#]+)/.exec(cta.getAttribute('href') || '');\n      var subHandle = m && (SUBSECTIONS[m[1]] || DIRECT_TILES[m[1]]) ? m[1] : null;\n      var openFn = null;\n      if (links.length) {\n        openFn = function (e) {\n          e.preventDefault();\n          ovStack = [];\n          go(function () { renderCollections(links, cta.textContent.trim()); });\n        };\n      }\n      /* claude- (2026-08-24, Adam): the in-glass subsection wall is retired \u2014\n         a card with no drawer list is a plain link straight to its collection\n         page (\"i click on usa ... take me directly into the usa collection\").\n         Cards WITH a drawer list still open the glass LIST (Sports), and each\n         entry in that list navigates. */\n      if (openFn) {\n        cta.addEventListener('click', openFn);\n        var pic = flip.querySelector('.c3d-flip__pic');\n        if (pic) pic.addEventListener('click', openFn);   /* the photo too */\n      }\n      /* cards with neither stay plain links */\n    });\n\n    /* (the positional button tint lived here for an hour on 2026-08-17\n       and was replaced by fixed zone colors in CSS \u2014 Adam: white on the\n       main grid, black on the More carousel.) */\n\n    if (reduceMotion) return;   /* the scroll-snap row stands, static */\n\n    loadLibs(false).then(function (libs) {\n      var gsap = libs.gsap;\n      /* (the idle float was removed 2026-08-17 \u2014 Adam: \"not floating but\n         static\". The cards sit still in their 2-across grid.) */\n\n      /* (a 360 wrapping ring lived here for one hour on 2026-08-17 and was\n         removed at Adam's call the same night: \"don't make it 360 either\n         just normal carousel but floating is cool\". The scroll-snap row IS\n         the carousel; the idle float above is the motion.) */\n\n      /* header rises in */\n      var head = root.querySelector('.c3d-ub__head');\n      if (head) {\n        gsap.from(head.children, {\n          y: 16, autoAlpha: 0, duration: .5, stagger: .08, ease: 'power2.out',\n          scrollTrigger: { trigger: head, start: 'top 85%' }\n        });\n      }\n    }).catch(function () {});\n  }\n\n  /* EVERY scrolling strip melts at an edge when more is hiding past it,\n     and only then \u2014 never a harsh cut, never a fade over a first item\n     with nothing behind it (Adam, 2026-08-17: \"that should be\n     standard\"). Scroll + resize keep the state honest. */\n  function edgeFade(el) {\n    if (!el || el._c3dFade) return;\n    el._c3dFade = true;\n    el.classList.add('c3d-fade');\n    function upd() {\n      var more = el.scrollWidth - el.clientWidth;\n      el.classList.toggle('has-left', el.scrollLeft > 2);\n      el.classList.toggle('has-right', more > 2 && el.scrollLeft < more - 2);\n    }\n    el.addEventListener('scroll', upd, { passive: true });\n    window.addEventListener('resize', upd);\n    setTimeout(upd, 60);\n    setTimeout(upd, 700);   /* again once lazy images settle */\n  }\n\n  /* ----------------------------------------------------------------- WIRING */\n  function initAll(scope) {\n    (scope || document).querySelectorAll('[data-c3d-hero]').forEach(initHero);\n    (scope || document).querySelectorAll('[data-c3d-underbill]').forEach(initUnderbill);\n  }\n\n  if (document.readyState === 'loading') {\n    document.addEventListener('DOMContentLoaded', function () { initAll(); });\n  } else {\n    initAll();\n  }\n\n  /* theme editor: sections are torn down and re-inserted */\n  document.addEventListener('shopify:section:load', function (e) { initAll(e.target); });\n  document.addEventListener('shopify:section:unload', function (e) {\n    var el = e.target.querySelector('[data-c3d-hero]');\n    if (el && el._c3dDestroy) el._c3dDestroy();\n  });\n})();\n\n/* claude- (2026-08-28, Adam: \"the carousel on the previous page turns\n   white in the transition to the new page\", after preserveDrawingBuffer\n   made it worse): the instant a click commits to a REAL navigation, every\n   3D stage canvas goes invisible \u2014 the browser's held frame then shows\n   the dark gradient instead of an uncaptured white canvas. pageshow\n   restores it for back/forward-cache returns. */\n(function () {\n  function blankStages() {\n    Array.prototype.forEach.call(document.querySelectorAll('.c3d-stage canvas'), function (c) {\n      c.style.visibility = 'hidden';\n    });\n  }\n  function restoreStages() {\n    Array.prototype.forEach.call(document.querySelectorAll('.c3d-stage canvas'), function (c) {\n      c.style.visibility = '';\n    });\n  }\n  document.addEventListener('click', function (e) {\n    var a = e.target && e.target.closest ? e.target.closest('a[href]') : null;\n    if (!a) return;\n    if (a.target === '_blank' || a.hasAttribute('download')) return;\n    var href = a.getAttribute('href') || '';\n    if (!href || href.charAt(0) === '#' || /^(javascript|mailto|tel):/.test(href)) return;\n    /* SYNCHRONOUS: once navigation starts, the outgoing page stops\n       compositing \u2014 a hide issued even one tick later never reaches the\n       screen (proven on Adam's machine, 2026-08-28). Blank now, restore\n       a tick later if the glass router handled the click in-page. */\n    blankStages();\n    setTimeout(function () {\n      if (e.defaultPrevented) restoreStages();\n    }, 0);\n  }, true);\n  window.addEventListener('pagehide', blankStages);\n  window.addEventListener('pageshow', restoreStages);\n})();\n\n/* claude- (2026-08-26): the app side tabs (Judge.me reviews + Klaviyo\n   Mystery Discount) wear light glass that disappears once the homepage\n   scrolls out of the dark gradient onto white. Toggle c3d-appdark on\n   <html> when the tabs' viewport position passes the bottom of the last\n   dark claude section \u2014 the CSS fades them to dark teal glass. Homepage\n   only (Adam's scope); other pages keep the light glass. */\n(function () {\n  if (!document.querySelector('.cc-claude-3d-hero')) return;\n  /* Adam, 2026-08-26: \"should switch right when the top of mystery\n     discount gets past more...\" \u2014 the More... header is retired\n     (2026-08-27, the grid flows as one), so the trigger line is where it\n     used to stand: the top of the 8th underbill card (Straw, the first\n     of the old More set), falling back to the grid's bottom edge. The\n     probe stays the Mystery Discount tab's own top, measured live. */\n  var lineAbs = 0, tabTop = 0;\n  function measure() {\n    var cards = document.querySelectorAll('.c3d-ub__grid .c3d-flip');\n    var anchor = cards[7] || null;\n    var grid = document.querySelector('.c3d-ub__grid');\n    lineAbs = anchor ? anchor.getBoundingClientRect().top + window.scrollY\n      : grid ? grid.getBoundingClientRect().bottom + window.scrollY : 0;\n    var teaser = document.querySelector('[class*=\"kl-teaser\"]');\n    tabTop = teaser && teaser.getBoundingClientRect().height > 0\n      ? teaser.getBoundingClientRect().top\n      : window.innerHeight * 0.4;\n  }\n  function update() {\n    var over = lineAbs > 0 && (window.scrollY + tabTop) > lineAbs;\n    document.documentElement.classList.toggle('c3d-appdark', over);\n  }\n  window.addEventListener('scroll', function () { requestAnimationFrame(update); }, { passive: true });\n  window.addEventListener('resize', function () { measure(); update(); });\n  /* late measure: the 3D scenes settle their heights after first paint,\n     and the Klaviyo teaser mounts on its own clock */\n  setTimeout(function () { measure(); update(); }, 600);\n  setTimeout(function () { measure(); update(); }, 2000);\n})();\n\n/* claude- (2026-08-26): remember which glass collections the shopper browses\n   so the cart drawer's Suggested Add-Ons pull from \"the same collection or\n   collections they are shopping in\" (Adam). Most recent first, capped at 4. */\n(function () {\n  var el = document.querySelector('[data-c3d-collection]');\n  if (!el) return;\n  var h = el.getAttribute('data-c3d-collection');\n  if (!h) return;\n  try {\n    var list = JSON.parse(localStorage.getItem('c3dShopCols') || '[]');\n    list = [h].concat(list.filter(function (x) { return x !== h; })).slice(0, 4);\n    localStorage.setItem('c3dShopCols', JSON.stringify(list));\n  } catch (e) {}\n})();\n\n/* ==================================================== THE SWIPE COMPASS\n   (Adam, 2026-08-27, from phone testing: \"i could not swipe down the page\n   if i was on a left to right swipe ... If i am swiping anywhere from\n   north east, north, north west down to south east, south or south west\n   and anything inbetween ... that should be controlling the page scroll\n   and when i am outside of those boundaries i can be controlling the\n   scroller that my finger is touching.\")\n\n   So: of the compass's eight sectors, only EAST and WEST \u2014 within 22.5\u00B0\n   of horizontal \u2014 belong to the thing under the finger. Everything else\n   is the page's, ALWAYS, even when the finger starts on a carousel.\n\n   How: every swipe surface is touch-action: pan-y (the browser owns\n   vertical natively, so the page can never get stuck), and this one\n   document-level gate holds the first 8px of any touch on a surface\n   undecided (preventDefault, so the browser can't commit early), then\n   reads the angle once:\n     within the E/W cone -> keep preventing; drag drives the surface\n       (rails get scrollLeft + a momentum fling, since preventDefault\n       killed the native one; the 3D stage/thumbs keep their own pointer\n       physics \u2014 the gate only shields them from the browser)\n     anywhere else -> hands the gesture straight back; the browser turns\n       it into page scroll and fires pointercancel at the widgets, whose\n       release handlers already cope.\n   Delegated on document so dynamically-built rails (cart add-ons, the\n   glass PDP gallery) are covered without registration. */\n(function () {\n  'use strict';\n  var WIDGETS = '.c3d-stage, .c3d-thumbs, [data-c3d-title]';\n  var RAILS = '.c3d-ub__trustedrail, .ccart__addons-row, .c3d-pcard__strip, ' +\n              '.c3d-ovl__pdp-track, .cc-claude-bestsellers .slider';\n  /* widened from tan 67.5\u00B0 (2.414) \u2014 Adam, 2026-08-27: \"swipe left to\n     right right to left can be a little more sensitive\". Horizontal now\n     claims up to ~34\u00B0 off-axis; steeper still belongs to the page. */\n  var HCONE = 1.5;\n  var g = null;\n\n  /* eased scroll follower \u2014 one per rail element, lives on the node */\n  function railTo(el, x) {\n    var max = el.scrollWidth - el.clientWidth;\n    el.__c3dTarget = Math.max(0, Math.min(max, x));\n    if (el.__c3dRaf) return;\n    var last = performance.now();\n    el.__c3dRaf = requestAnimationFrame(function step(now) {\n      var dt = Math.min(0.05, (now - last) / 1000); last = now;\n      var t = el.__c3dTarget, cur = el.scrollLeft, d = t - cur;\n      /* rest threshold is a full pixel: the browser rounds scrollLeft\n         writes, so a fractional target (180.15 vs a stored 181) can never\n         be approached closer than ~1px \u2014 at 0.5 the loop span forever and\n         snap/behavior stayed parked */\n      if (Math.abs(d) < 1 && !el.__c3dDrag) {\n        el.scrollLeft = t; el.__c3dRaf = null;\n        /* snap parked for the whole glide comes back only now (Adam,\n           2026-08-28: Featured Favorites \"barely swiping\" \u2014 settle's fixed\n           240ms restore landed mid-glide, and with mandatory snap live\n           every scrollLeft write re-snaps to the nearest card, yanking the\n           fling back to where it started) */\n        if (el.__c3dSnap !== undefined) {\n          el.style.scrollSnapType = el.__c3dSnap;\n          delete el.__c3dSnap;\n        }\n        if (el.__c3dBehave !== undefined) {\n          el.style.scrollBehavior = el.__c3dBehave;\n          delete el.__c3dBehave;\n        }\n        return;\n      }\n      /* two ease rates, same lerp: while the finger is down the rail\n         chases quickly (14) so it feels attached; after release it decays\n         at the hat carousel's own rate (6), which is the long floating\n         coast Adam calls GLASS GLIDE (2026-08-28: \"feels like it is\n         gliding through cards\"). The step is never allowed below a whole\n         pixel: browsers store scrollLeft quantized, so a fractional nudge\n         (335 + 0.22 -> still 335) floors away and the loop stalls a pixel\n         short of the target forever, holding snap parked (bitten twice,\n         2026-08-28). */\n      var stepPx = d * Math.min(1, dt * (el.__c3dDrag ? 14 : 6));\n      if (Math.abs(stepPx) < 1) stepPx = d > 0 ? 1 : -1;\n      el.scrollLeft = cur + stepPx;\n      el.__c3dRaf = requestAnimationFrame(step);\n    });\n  }\n\n  document.addEventListener('touchstart', function (e) {\n    if (e.touches.length !== 1) {\n      /* two fingers ON THE HERO belong to its pinch-to-peek hat zoom\n         (Adam, 2026-08-27) \u2014 hold the browser's page zoom off so the\n         stage's pointer events keep flowing. Two fingers anywhere else\n         stay native pinch-zoom. */\n      var st = e.target && e.target.closest && e.target.closest('.c3d-stage');\n      g = (e.touches.length === 2 && st) ? { mode: 3 } : null;\n      return;\n    }\n    var t = e.target;\n    if (!t || !t.closest) { g = null; return; }\n    var rail = t.closest(RAILS);\n    /* NESTED RAILS \u2014 this rule flipped twice on 2026-08-28 and the final\n       form is: the PHOTO STRIP wins when it has photos to show. Morning\n       (pre-dots): \"featured favorites lost its swiping capability ...\n       needs to be changed to swipe through the carousel\" \u2014 outer rail\n       won. Evening (strips now circular, dotted, trio-led): \"i cant flip\n       through the photos on featured favorites anymore\" \u2014 the strip wins\n       again. The carousel is still swiped from anywhere that is not a\n       photo: names, prices, the gaps between cards. A strip with fewer\n       than two photos has nothing to flip and still defers to the row. */\n    if (rail && rail.classList.contains('c3d-pcard__strip') &&\n        rail.querySelectorAll('img').length < 2) {\n      var outer = rail.parentElement && rail.parentElement.closest(RAILS);\n      if (outer) rail = outer;\n    }\n    var widget = rail ? null : t.closest(WIDGETS);\n    if (!rail && !widget) { g = null; return; }\n    g = {\n      el: rail || widget, isRail: !!rail, mode: 0,\n      x: e.touches[0].clientX, y: e.touches[0].clientY,\n      sl: rail ? rail.scrollLeft : 0,\n      lx: e.touches[0].clientX, lt: e.timeStamp, v: 0,\n      snap: null, behave: null\n    };\n    /* CSS scroll-snap fights a hand-driven drag: we write scrollLeft on every\n       touchmove, and `mandatory` snap re-resolves after each write, so the rail\n       stutters between snap points instead of tracking the finger (Adam,\n       2026-08-28: add-ons \"working now but super sensitive to the swipe its\n       choppy\"). Snap is parked for the drag and restored on release, where the\n       settle lands it cleanly. */\n    if (rail) {\n      rail.__c3dDrag = 1;\n      var cs = getComputedStyle(rail);\n      var sn = cs.scrollSnapType;\n      if (sn && sn !== 'none') {\n        g.snap = rail.style.scrollSnapType || '';\n        rail.style.scrollSnapType = 'none';\n      }\n      /* scroll-behavior: smooth (the theme's .slider has it, for its arrow\n         buttons) turns every per-frame scrollLeft write into its own\n         animated scroll that the next frame overwrites before it moves \u2014\n         the drag and the fling both crawl (Adam, 2026-08-28: Featured\n         Favorites \"barely swiping\"). Parked like snap, restored with it. */\n      if (cs.scrollBehavior === 'smooth') {\n        g.behave = rail.style.scrollBehavior || '';\n        rail.style.scrollBehavior = 'auto';\n      }\n    }\n  }, { passive: true, capture: true });\n\n  document.addEventListener('touchmove', function (e) {\n    if (!g || g.mode === 2) return;\n    if (g.mode === 3) {                        /* hero pinch: browser stays out */\n      if (e.cancelable) e.preventDefault();\n      return;\n    }\n    var x = e.touches[0].clientX, y = e.touches[0].clientY;\n    var dx = x - g.x, dy = y - g.y;\n    if (g.mode === 0) {\n      /* NEVER hold the browser while undecided (Adam, 2026-08-27: \"i am\n         now getting frustrated when trying to swipe ... south southeast\n         south west\" after a zoom or a sideways swipe) \u2014 iOS refuses to\n         scroll a gesture once ANY of its moves was prevented, so the old\n         8px hold made every vertical swipe that started on a rail feel\n         dead. Now vertical starts natively and instantly; we claim only\n         flat swipes, and only while the move is still cancelable (if the\n         browser committed first, we yield instead of fighting it). */\n      if (dx * dx + dy * dy < 36) return;   /* 6px \u2014 quicker to engage */\n      if (Math.abs(dx) > Math.abs(dy) * HCONE && e.cancelable) {\n        g.mode = 1;                            /* E/W \u2014 the surface's gesture */\n      } else {\n        g.mode = 2;                            /* everything else \u2014 the page's */\n        return;\n      }\n    }\n    if (!e.cancelable) { g.mode = 2; return; } /* browser took it mid-flight */\n    e.preventDefault();\n    if (g.isRail) {\n      /* THE CAROUSEL'S FEEL, ON RAILS (Adam, 2026-08-28: the add-ons rail\n         \"still isn't smooth\", and of the hat carousel, \"i like the way the\n         carasol swipes\"). The hats never write their position directly \u2014\n         a drag moves a TARGET and the render loop eases toward it\n         (pos += (target - pos) * dt * 6), which filters out the ragged\n         timing of raw touch events. Rails were assigning scrollLeft on\n         every touchmove, so they inherited that raggedness one-for-one.\n         Now they chase a target the same way. */\n      railTo(g.el, g.sl - dx);\n      var dt = e.timeStamp - g.lt;\n      if (dt > 0) {\n        /* clamped: a degenerate dt (seen with synthetic events) must not\n           turn a short drag into a runaway fling */\n        g.v = Math.max(-3, Math.min(3, (x - g.lx) / dt));   /* px per ms */\n      }\n      g.lx = x; g.lt = e.timeStamp;\n    }\n  }, { passive: false, capture: true });\n\n  function settle() {\n    /* hand the rail its snap back \u2014 after the settle animations below have\n       been armed, so their eases are never fought either. Rails that get\n       the generic momentum glide hand their snap to the follower instead\n       (restored when it comes to rest) \u2014 a fixed 240ms landed mid-glide\n       and mandatory snap yanked the fling back (Adam, 2026-08-28:\n       Featured Favorites \"barely swiping\"). */\n    if (g && g.isRail) g.el.__c3dDrag = 0;\n    /* every rail settles via the railTo follower now (the PDP track\n       joined 2026-08-28, the trusted logos the same day) \u2014 snap rides\n       the follower handoff, never the 240ms timeout, which would land\n       mid-glide and yank */\n    var generic = g && g.isRail && g.mode === 1;\n    if (g && g.isRail && (g.snap !== null || g.behave !== null)) {\n      if (generic) {\n        if (g.snap !== null) g.el.__c3dSnap = g.snap;\n        if (g.behave !== null) g.el.__c3dBehave = g.behave;\n      } else {\n        var railEl = g.el, restore = g.snap, rebehave = g.behave;\n        setTimeout(function () {\n          if (restore !== null) railEl.style.scrollSnapType = restore;\n          if (rebehave !== null) railEl.style.scrollBehavior = rebehave;\n        }, 240);\n      }\n    }\n    if (g && g.mode === 1 && g.isRail) {\n      var el = g.el, v = g.v, startSl = g.sl;\n      {\n        /* (the trusted logos' one-logo-per-flick branch lived here\n           2026-08-27 \u2192 2026-08-28, retired at Adam's call: \"give the\n           trusted logos the glass slide treatment too\" \u2014 they ride the\n           generic glide below now, like every other rail) */\n        /* (the PDP photo track had its own page-one-per-flick branch here\n           from launch night through 2026-08-28, retired at Adam's call:\n           \"you have a swipe on the product photo inside of the collections\n           page which is awesome ... if that swipe speed can be translated\n           to the photo when i am inside the product glass\". It now rides\n           the same generic rail as the card strips \u2014 1:1 drag, momentum\n           fling, glide decay, snap aligns the landing to a photo.) */\n        /* momentum as a TARGET, not a per-frame shove: the follower eases\n           into it, so the glide decelerates smoothly instead of stepping.\n           The Featured Favorites carousel throws harder \u2014 its cards are\n           ~half the viewport wide, and at the add-ons rail's 220 a normal\n           flick died short of the next snap point and rounded back. */\n        el.__c3dDrag = 0;\n        /* GLASS GLIDE (Adam, 2026-08-28): Featured Favorites floats free \u2014\n           its CSS snap is off (claude-3d.css), so the fling decays\n           naturally and rests wherever momentum dies, card hanging off\n           the edge and all. An earlier pass rounded the target to card\n           boundaries; Adam swapped that for this. */\n        var mult = el.closest('.cc-claude-bestsellers') ? 300 : 220;\n        railTo(el, (el.__c3dTarget === undefined ? el.scrollLeft : el.__c3dTarget) - v * mult);\n      }\n    }\n    g = null;\n  }\n  document.addEventListener('touchend', settle, { passive: true, capture: true });\n  document.addEventListener('touchcancel', settle, { passive: true, capture: true });\n})();\n\n/* ============================================= STRIP LOOP + DOTS\n   (Adam, 2026-08-28: \"make the swipe on the product photo on the\n   collection page circular so they can swipe left or right to see\n   images with the image dots below it so people know they can swipe\")\n\n   Every multi-photo card strip (.c3d-pcard__strip \u2014 collection pgrid and\n   Featured Favorites alike) becomes a RING: a clone of the last photo\n   sits before the first and a clone of the first sits after the last,\n   the strip boots parked on the real first, and when a glide comes to\n   rest on a clone it teleports to the clone's real twin \u2014 identical\n   pixels, so the switch is invisible and the next swipe keeps going the\n   same way. Dots under the strip track the REAL photo. Cards with one\n   photo get an empty dots row so every card in a row stays the same\n   height (the fixed-slots alignment rule). */\n(function () {\n  'use strict';\n  function enhance(strip) {\n    if (strip.__c3dLoop) return;\n    strip.__c3dLoop = true;\n    var imgs = Array.prototype.filter.call(strip.children, function (c) {\n      return c.tagName === 'IMG';\n    });\n    var n = imgs.length;\n    var dots = document.createElement('div');\n    dots.className = 'c3d-pcard__dots';\n    dots.setAttribute('aria-hidden', 'true');\n    strip.parentNode.insertBefore(dots, strip.nextSibling);\n    if (n < 2) return;                       /* row-height placeholder only */\n    var pips = [];\n    for (var i = 0; i < n; i++) {\n      var d = document.createElement('i');\n      dots.appendChild(d); pips.push(d);\n    }\n    /* long strips don't show a runway of dots (Adam, 2026-08-28: \"the\n       dots on the bottom can fade out on the left and right so there\n       arent too many dots\") \u2014 beyond 9 photos, dots fade with distance\n       from the current one and disappear past 5 away. */\n    function paintDots(real) {\n      for (var k = 0; k < n; k++) {\n        pips[k].className = k === real ? 'is-on' : '';\n        if (n > 9) {\n          var dd = Math.abs(k - real);\n          var o = dd <= 2 ? 1 : dd <= 3 ? 0.55 : dd <= 5 ? 0.25 : 0;\n          pips[k].style.opacity = o;\n          pips[k].style.display = o === 0 ? 'none' : '';\n        }\n      }\n    }\n    paintDots(0);\n    /* ring clones \u2014 lazy stays lazy, they sit off-view until swiped to */\n    var head = imgs[n - 1].cloneNode(true), tail = imgs[0].cloneNode(true);\n    head.setAttribute('aria-hidden', 'true'); tail.setAttribute('aria-hidden', 'true');\n    strip.insertBefore(head, imgs[0]);\n    strip.appendChild(tail);\n    function W() { return strip.clientWidth || 1; }\n    function park() { strip.scrollLeft = W(); }\n    park();\n    /* re-park once layout truly settles (fonts/images can shift widths) */\n    requestAnimationFrame(park); setTimeout(park, 250);\n    var settleT = null;\n    strip.addEventListener('scroll', function () {\n      var w = W(), idx = Math.round(strip.scrollLeft / w);\n      var real = ((idx - 1) % n + n) % n;    /* clone-aware -> real photo */\n      paintDots(real);\n      clearTimeout(settleT);\n      settleT = setTimeout(function () {\n        /* at rest on a clone -> jump to its twin. Never mid-gesture or\n           mid-glide: the follower owns scrollLeft until it rests. */\n        if (strip.__c3dDrag || strip.__c3dRaf) return;\n        var w2 = W(), i2 = Math.round(strip.scrollLeft / w2);\n        if (i2 === 0) strip.scrollLeft = n * w2;\n        else if (i2 === n + 1) strip.scrollLeft = w2;\n      }, 140);\n    }, { passive: true });\n  }\n  function pass(root) {\n    Array.prototype.forEach.call(\n      (root || document).querySelectorAll('.c3d-pcard__strip'), enhance);\n  }\n  if (document.readyState === 'loading') {\n    document.addEventListener('DOMContentLoaded', function () { pass(); });\n  } else pass();\n  /* strips built later (glass walls, section rerenders) get picked up too */\n  new MutationObserver(function () { pass(); })\n    .observe(document.documentElement, { childList: true, subtree: true });\n})();\n\n/* ==================================================== TITLE-BUTTON FIT\n   (Adam, 2026-08-27, corrected): titles may wrap, but a WORD never\n   splits across lines \u2014 with word-break disabled, an overflowing\n   scrollWidth means some single word is too wide, and the font steps\n   down until every word fits whole. Runs on the grid buttons and the\n   A-Z labels; re-runs when fonts land and on resize. */\n(function () {\n  'use strict';\n  function fit(el) {\n    el.style.fontSize = '';\n    var size = parseFloat(getComputedStyle(el).fontSize) || 13;\n    var guard = 24;\n    while (el.scrollWidth > el.clientWidth + 1 && size > 7 && guard--) {\n      size -= 0.5;\n      el.style.fontSize = size + 'px';\n    }\n  }\n  function pass() {\n    Array.prototype.forEach.call(\n      document.querySelectorAll('.c3d-ub__grid .c3d-flip__cta, .c3d-az__label, .c3d-salebanner'), fit);\n  }\n  if (document.readyState === 'loading') {\n    document.addEventListener('DOMContentLoaded', pass);\n  } else {\n    pass();\n  }\n  if (document.fonts && document.fonts.ready) document.fonts.ready.then(pass);\n  var t;\n  window.addEventListener('resize', function () {\n    clearTimeout(t);\n    t = setTimeout(pass, 150);\n  });\n})();\n"],
  "mappings": "CA0BC,UAAY,CACX,aAEA,IAAI,aAAe,OAAO,WAAW,kCAAkC,EAAE,QAErE,YAAc,CAAC,EACnB,SAAS,WAAW,IAAK,CACvB,OAAK,YAAY,GAAG,IAClB,YAAY,GAAG,EAAI,IAAI,QAAQ,SAAU,QAAS,OAAQ,CACxD,IAAI,EAAI,SAAS,cAAc,QAAQ,EACvC,EAAE,IAAM,IAAK,EAAE,MAAQ,GACvB,EAAE,OAAS,QACX,EAAE,QAAU,UAAY,CAAE,OAAO,IAAI,MAAM,WAAa,GAAG,CAAC,CAAG,EAC/D,SAAS,KAAK,YAAY,CAAC,CAC7B,CAAC,GAEI,YAAY,GAAG,CACxB,CAEA,SAAS,SAAS,UAAW,CAC3B,IAAI,KAAO,OAAO,aAAe,CAAC,EAC9B,MAAQ,WAAW,KAAK,IAAI,EAAE,KAAK,UAAY,CAAE,OAAO,WAAW,KAAK,EAAE,CAAG,CAAC,EAClF,OAAI,YAAW,MAAQ,MAAM,KAAK,UAAY,CAAE,OAAO,WAAW,KAAK,KAAK,CAAG,CAAC,GACzE,MAAM,KAAK,UAAY,CAC5B,GAAI,CAAC,OAAO,MAAQ,CAAC,OAAO,eAAkB,WAAa,CAAC,OAAO,MACjE,M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