{"product_id":"foldable-metal-divot-tool","title":"Foldable Metal Divot Tool","description":"\u003cstyle\u003e\n\/* =========================\n   AF APPLE-STYLE DARK MODE — DIVOT TOOL PDP (THEME-PROOF VARIANT SWITCH)\n   Uses the same working framework as Stubby.\n   ========================= *\/\n:root{\n  --bg-color:#000;\n  --card-bg:#1c1c1e;\n  --text-main:#f5f5f7;\n  --text-muted:#86868b;\n  --accent:#22c55e;\n  --border:rgba(255,255,255,.10);\n}\n\n#af-divot-pdp.af-luxury-page{\n  background:var(--bg-color);\n  color:var(--text-main);\n  padding:60px 20px;\n  font-family:-apple-system,BlinkMacSystemFont,\"SF Pro Text\",\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif;\n  line-height:1.6;\n  -webkit-font-smoothing:antialiased;\n}\n#af-divot-pdp *{ box-sizing:border-box; }\n#af-divot-pdp .af-container{ max-width:1000px; margin:0 auto; }\n\n#af-divot-pdp .af-eyebrow{\n  color:var(--accent);\n  letter-spacing:.1em;\n  text-transform:uppercase;\n  font-weight:700;\n  font-size:.75rem;\n  margin:0 0 16px;\n  text-align:center;\n}\n#af-divot-pdp .af-hero{\n  display:flex;\n  flex-direction:column;\n  align-items:center;\n  margin-bottom:40px;\n}\n#af-divot-pdp .af-hero h1{\n  margin:0 0 20px;\n  font-weight:700;\n  line-height:1.1;\n  font-size:clamp(2.3rem,5vw,3.6rem);\n  letter-spacing:-.02em;\n  background:linear-gradient(180deg,#fff,#a1a1aa);\n  -webkit-background-clip:text;\n  -webkit-text-fill-color:transparent;\n  text-align:center;\n}\n#af-divot-pdp .af-lead{\n  font-size:1.2rem;\n  color:#fff;\n  font-weight:600;\n  text-align:center;\n  margin:14px 0 10px;\n}\n#af-divot-pdp .af-lede{\n  margin:0 auto 24px;\n  max-width:760px;\n  color:var(--text-muted);\n  font-size:1.1rem;\n  text-align:center;\n  line-height:1.6;\n}\n\n\/* Executive summary *\/\n#af-divot-pdp .af-exec-summary{\n  background:#151516;\n  border:1px solid rgba(34,197,94,.30);\n  border-radius:20px;\n  padding:24px;\n  margin:0 auto 26px;\n  max-width:820px;\n  text-align:left;\n}\n#af-divot-pdp .af-exec-summary strong{\n  display:block;\n  font-size:.75rem;\n  letter-spacing:.05em;\n  text-transform:uppercase;\n  color:var(--accent);\n  font-weight:700;\n  margin-bottom:8px;\n}\n#af-divot-pdp .af-exec-summary p{\n  margin:0;\n  color:#d1d5db;\n  font-size:1.05rem;\n  line-height:1.6;\n}\n\n\/* Interaction module *\/\n#af-divot-pdp .af-hero-interaction{\n  background:rgba(28,28,30,.60);\n  border:1px solid var(--border);\n  border-radius:24px;\n  padding:24px;\n  margin:18px auto;\n  max-width:560px;\n  width:100%;\n  backdrop-filter:blur(10px);\n  text-align:center;\n}\n#af-divot-pdp .af-interaction-label{\n  font-size:.8rem;\n  text-transform:uppercase;\n  letter-spacing:.05em;\n  color:var(--text-muted);\n  margin-bottom:12px;\n  font-weight:600;\n  display:block;\n}\n\n\/* Swatches *\/\n#af-divot-pdp .af-swatch-row{\n  display:flex;\n  justify-content:center;\n  gap:12px;\n  margin-bottom:10px;\n  flex-wrap:wrap;\n}\n#af-divot-pdp .af-swatch{\n  width:32px;\n  height:32px;\n  border-radius:50%;\n  border:2px solid rgba(255,255,255,.20);\n  cursor:pointer;\n  transition:transform .2s,border-color .2s,box-shadow .2s;\n  padding:0;\n  background:#111;\n}\n#af-divot-pdp .af-swatch:hover{ transform:scale(1.1); border-color:#fff; }\n#af-divot-pdp .af-swatch[aria-selected=\"true\"]{\n  border-color:rgba(34,197,94,.95);\n  box-shadow:0 0 0 4px rgba(34,197,94,.18);\n}\n\n\/* Divot tool swatch colors *\/\n#af-divot-pdp .af-swatch[data-af-finish=\"Black\"]{ background:#111; }\n#af-divot-pdp .af-swatch[data-af-finish=\"Silver\"]{ background:linear-gradient(135deg,#c9c9c9,#6b7280); }\n#af-divot-pdp .af-swatch[data-af-finish=\"Gunmetal\"]{ background:#374151; }\n#af-divot-pdp .af-swatch[data-af-finish=\"Blue\"]{ background:#1e3a8a; }\n#af-divot-pdp .af-swatch[data-af-finish=\"Red\"]{ background:#991b1b; }\n\n#af-divot-pdp .af-nudge{\n  text-align:center;\n  margin-top:10px;\n  color:var(--text-muted);\n  font-size:.9rem;\n}\n\n\/* Cards *\/\n#af-divot-pdp .af-card{\n  background:var(--card-bg);\n  border-radius:24px;\n  padding:40px;\n  margin:24px 0;\n  border:1px solid var(--border);\n  box-shadow:0 20px 40px rgba(0,0,0,.40);\n}\n#af-divot-pdp .af-h2{\n  margin:0 0 16px;\n  font-size:1.8rem;\n  line-height:1.2;\n  font-weight:600;\n  color:#fff;\n  letter-spacing:-.01em;\n}\n#af-divot-pdp .af-muted{\n  color:var(--text-muted);\n  font-size:1.05rem;\n  margin:0 0 1rem;\n}\n#af-divot-pdp .af-bullets{\n  margin:0;\n  padding-left:1.2rem;\n  color:var(--text-muted);\n}\n#af-divot-pdp .af-bullets li{ margin:.8rem 0; }\n#af-divot-pdp .af-bullets li strong{ color:#fff; font-weight:600; }\n\n\/* Chips *\/\n#af-divot-pdp .af-chip-row{\n  display:flex;\n  flex-wrap:wrap;\n  gap:10px;\n  margin-top:18px;\n  justify-content:center;\n}\n#af-divot-pdp .af-chip{\n  background:#2c2c2e;\n  border:1px solid #3a3a3c;\n  color:#e5e5e7;\n  padding:8px 16px;\n  border-radius:999px;\n  font-size:.9rem;\n  font-weight:500;\n}\n\n\/* Buttons *\/\n#af-divot-pdp .af-btn-wrap{\n  display:flex;\n  justify-content:center;\n  flex-wrap:wrap;\n  gap:12px;\n  margin-top:16px;\n}\n#af-divot-pdp .af-btn{\n  display:inline-flex;\n  align-items:center;\n  justify-content:center;\n  padding:14px 28px;\n  border-radius:999px;\n  font-weight:600;\n  text-decoration:none;\n  font-size:1rem;\n  transition:all .2s ease;\n  border:0;\n  cursor:pointer;\n}\n#af-divot-pdp .af-btn-primary{\n  background:var(--accent);\n  color:#000;\n  border:1px solid var(--accent);\n}\n#af-divot-pdp .af-btn-primary:hover{\n  background:#16a34a;\n  border-color:#16a34a;\n  transform:translateY(-2px);\n}\n#af-divot-pdp .af-btn-secondary{\n  background:#2c2c2e;\n  color:#fff;\n  border:1px solid #3a3a3c;\n}\n#af-divot-pdp .af-btn-secondary:hover{\n  background:#3a3a3c;\n  border-color:#48484a;\n  transform:translateY(-2px);\n}\n\n\/* Grid *\/\n#af-divot-pdp .af-grid-2{ display:grid; grid-template-columns:1fr; gap:24px; }\n@media (min-width:768px){ #af-divot-pdp .af-grid-2{ grid-template-columns:1fr 1fr; } }\n\n\/* FAQ *\/\n#af-divot-pdp .af-faq{ border-top:1px solid #2c2c2e; padding:20px 0; }\n#af-divot-pdp .af-faq summary{\n  cursor:pointer;\n  font-weight:600;\n  color:#fff;\n  font-size:1.1rem;\n  list-style:none;\n  display:flex;\n  justify-content:space-between;\n  align-items:center;\n}\n#af-divot-pdp .af-faq summary::-webkit-details-marker{ display:none; }\n#af-divot-pdp .af-faq summary::after{ content:\"+\"; font-weight:400; color:var(--text-muted); font-size:1.5rem; }\n#af-divot-pdp details[open] summary::after{ content:\"−\"; }\n#af-divot-pdp .af-faq div{ margin-top:12px; color:var(--text-muted); line-height:1.6; }\n\u003c\/style\u003e\n\u003cdiv id=\"af-divot-pdp\" class=\"af-luxury-page\"\u003e\n\u003cdiv class=\"af-container\"\u003e\n\u003cheader class=\"af-hero\"\u003e\n\u003cp class=\"af-eyebrow\"\u003eOn-Course Essentials • Pocket Safe • Foldable Metal\u003c\/p\u003e\n\u003c!-- Exactly one H1 --\u003e\n\u003ch1\u003ePremium Foldable Divot Tool\u003c\/h1\u003e\n\u003cdiv class=\"af-exec-summary\"\u003e\n\u003cstrong\u003eTest Verdict\u003c\/strong\u003e\n\u003cp\u003eMost divot tools fail for a dumb reason: you don’t carry them. Fixed prongs jab your pocket, plastic bends on firm greens, and the tool ends up abandoned. This one is built around \u003cstrong\u003epocket-safe carry\u003c\/strong\u003e and \u003cstrong\u003econfident repair\u003c\/strong\u003e: foldable deployment, solid metal leverage, and a routine that’s easy enough you’ll actually do it. \u003cbr\u003e\u003cbr\u003e\u003cstrong\u003eVerdict:\u003c\/strong\u003e Buy it if you want a tool you’ll keep on you. Skip it if you’re committed to being “that guy” who uses a tee.\u003c\/p\u003e\n\u003c\/div\u003e\n\u003cp class=\"af-lead\"\u003eCarry it every round. Repair marks without stabbing your leg.\u003c\/p\u003e\n\u003cp class=\"af-lede\"\u003eProper green repair is the smallest habit with the biggest impact. The catch is brutal: you have to actually carry the tool. This one stays closed in your pocket and opens fast when you need it.\u003c\/p\u003e\n\u003c!-- Variant + ATC module (same framework as Stubby) --\u003e\n\u003cdiv data-af-variant-sync=\"\" class=\"af-hero-interaction\"\u003e\n\u003cspan class=\"af-interaction-label\"\u003ePick Your Finish\u003c\/span\u003e\n\u003cdiv aria-label=\"Choose finish\" role=\"listbox\" class=\"af-swatch-row\"\u003e\n\u003cbutton aria-selected=\"false\" aria-label=\"Black finish\" data-af-finish=\"Black\" type=\"button\" class=\"af-swatch\"\u003e\u003c\/button\u003e \u003cbutton aria-selected=\"false\" aria-label=\"Silver finish\" data-af-finish=\"Silver\" type=\"button\" class=\"af-swatch\"\u003e\u003c\/button\u003e \u003cbutton aria-selected=\"false\" aria-label=\"Gunmetal finish\" data-af-finish=\"Gunmetal\" type=\"button\" class=\"af-swatch\"\u003e\u003c\/button\u003e \u003cbutton aria-selected=\"false\" aria-label=\"Blue finish\" data-af-finish=\"Blue\" type=\"button\" class=\"af-swatch\"\u003e\u003c\/button\u003e \u003cbutton aria-selected=\"false\" aria-label=\"Red finish\" data-af-finish=\"Red\" type=\"button\" class=\"af-swatch\"\u003e\u003c\/button\u003e\n\u003c\/div\u003e\n\u003cdiv data-af-status=\"\" class=\"af-nudge\"\u003ePick a finish. I’ll sync the variant and force the gallery to switch.\u003c\/div\u003e\n\u003cspan class=\"af-interaction-label\"\u003eCarry + Repair\u003c\/span\u003e\n\u003cdiv class=\"af-btn-wrap\"\u003e\n\u003ca class=\"af-btn af-btn-primary\" href=\"#choose\"\u003eLock in my setup\u003c\/a\u003e \u003ca class=\"af-btn af-btn-secondary\" href=\"#how\"\u003eSee how it works\u003c\/a\u003e \u003cbutton data-af-atc=\"\" class=\"af-btn af-btn-primary\" type=\"button\"\u003eAdd to cart\u003c\/button\u003e\n\u003c\/div\u003e\n\u003cdiv class=\"af-nudge\"\u003eTip: Pair with a magnetic towel system so you stop cleaning grooves with regret.\u003c\/div\u003e\n\u003c\/div\u003e\n\u003cdiv class=\"af-btn-wrap\"\u003e\n\u003ca class=\"af-btn af-btn-secondary\" href=\"\/pages\/our-golf-gear-testing-design-standards\"\u003eTesting Standards\u003c\/a\u003e \u003ca class=\"af-btn af-btn-secondary\" href=\"\/collections\/divot-tools\"\u003eShop Divot Tools\u003c\/a\u003e\n\u003c\/div\u003e\n\u003c\/header\u003e\n\u003csection class=\"af-card\"\u003e\n\u003ch2 class=\"af-h2\"\u003eThe problem isn’t ball marks. It’s friction.\u003c\/h2\u003e\n\u003cp class=\"af-muted\"\u003eIf carrying the tool is annoying, you won’t carry it. If it feels flimsy, you won’t trust it. Both lead to the same outcome: greens get wrecked and you look like you were raised by wolves.\u003c\/p\u003e\n\u003cp class=\"af-muted\"\u003eFoldable solves carry friction. Metal solves leverage friction. The rest is just you doing the smallest right thing for 10 seconds.\u003c\/p\u003e\n\u003cdiv aria-hidden=\"true\" class=\"af-chip-row\"\u003e\n\u003cspan class=\"af-chip\"\u003eFoldable\u003c\/span\u003e \u003cspan class=\"af-chip\"\u003ePocket Safe\u003c\/span\u003e \u003cspan class=\"af-chip\"\u003eMetal Build\u003c\/span\u003e \u003cspan class=\"af-chip\"\u003eConfident Leverage\u003c\/span\u003e\n\u003c\/div\u003e\n\u003c\/section\u003e\n\u003csection class=\"af-card\" id=\"how\"\u003e\n\u003ch2 class=\"af-h2\"\u003eHow it works\u003c\/h2\u003e\n\u003cul class=\"af-bullets\"\u003e\n\u003cli\u003e\n\u003cstrong\u003ePocket-safe fold:\u003c\/strong\u003e prongs retract so nothing stabs or snags.\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eFast deployment:\u003c\/strong\u003e open it quickly so you actually use it.\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eRepair logic:\u003c\/strong\u003e push turf inward toward the center, don’t pry upward.\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eClose + carry:\u003c\/strong\u003e the best tool is the one still in your pocket on hole 14.\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003c\/section\u003e\n\u003csection class=\"af-grid-2\"\u003e\n\u003cdiv class=\"af-card\"\u003e\n\u003ch2 class=\"af-h2\"\u003eWho it’s for\u003c\/h2\u003e\n\u003cul class=\"af-bullets\"\u003e\n\u003cli\u003e\n\u003cstrong\u003eWalkers:\u003c\/strong\u003e sits flat in-pocket without digging into your leg.\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eFirm greens:\u003c\/strong\u003e metal leverage beats bending plastic.\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003ePeople with standards:\u003c\/strong\u003e you repair marks because you’re not a menace.\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003c\/div\u003e\n\u003cdiv class=\"af-card\"\u003e\n\u003ch2 class=\"af-h2\"\u003eWho it’s not for\u003c\/h2\u003e\n\u003cul class=\"af-bullets\"\u003e\n\u003cli\u003e\n\u003cstrong\u003eFreebie loyalists:\u003c\/strong\u003e if a tournament handout is “good enough,” keep it.\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eZero-change types:\u003c\/strong\u003e if you never repair marks, a tool won’t fix your values.\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003c\/div\u003e\n\u003c\/section\u003e\n\u003csection class=\"af-card\" id=\"choose\"\u003e\n\u003ch2 class=\"af-h2\"\u003eChoose your setup\u003c\/h2\u003e\n\u003cp class=\"af-muted\"\u003ePick a finish above. Then add it to cart from the button in the hero module. Fast, clean, done.\u003c\/p\u003e\n\u003cdiv class=\"af-btn-wrap\"\u003e\n\u003ca class=\"af-btn af-btn-secondary\" href=\"\/collections\/magnetic-towels\"\u003eAdd a Magnetic Towel\u003c\/a\u003e \u003ca class=\"af-btn af-btn-secondary\" href=\"\/collections\/on-course-systems\"\u003eShop On-Course Systems\u003c\/a\u003e\n\u003c\/div\u003e\n\u003c\/section\u003e\n\u003csection aria-label=\"Product FAQ\" class=\"af-card\"\u003e\n\u003ch2 class=\"af-h2\"\u003eProduct FAQ\u003c\/h2\u003e\n\u003cdetails class=\"af-faq\"\u003e\n\u003csummary\u003eDoes the finish change the tool?\u003c\/summary\u003e\n\u003cdiv\u003eNo. Same tool. Same function. Pick based on visibility and preference.\u003c\/div\u003e\n\u003c\/details\u003e\n\u003cdetails class=\"af-faq\"\u003e\n\u003csummary\u003eHow do I repair a ball mark correctly?\u003c\/summary\u003e\n\u003cdiv\u003eInsert just outside the mark, push turf inward toward the center from multiple angles, then smooth with a putter. Don’t pry upward.\u003c\/div\u003e\n\u003c\/details\u003e\n\u003cdetails class=\"af-faq\"\u003e\n\u003csummary\u003eWhy metal over plastic?\u003c\/summary\u003e\n\u003cdiv\u003eDurability and leverage. Plastic tends to flex or snap when greens are firm.\u003c\/div\u003e\n\u003c\/details\u003e\n\u003cdetails class=\"af-faq\"\u003e\n\u003csummary\u003eWhat pairs best with this?\u003c\/summary\u003e\n\u003cdiv\u003eA magnetic towel system for groove cleaning and a Landing Pad for a consistent home base inside your bag between dividers.\u003c\/div\u003e\n\u003c\/details\u003e\n\u003c\/section\u003e\n\u003csection aria-label=\"Final call to action\" style=\"text-align: center;\" class=\"af-card\"\u003e\n\u003ch2 class=\"af-h2\"\u003eFix the green. Respect the course.\u003c\/h2\u003e\n\u003cp class=\"af-muted\"\u003ePick a finish, add to cart, and stop pretending a tee is a divot tool.\u003c\/p\u003e\n\u003cdiv class=\"af-btn-wrap\"\u003e\n\u003ca class=\"af-btn af-btn-primary\" href=\"\/collections\/divot-tools\"\u003eShop Divot Tools\u003c\/a\u003e \u003ca class=\"af-btn af-btn-secondary\" href=\"\/pages\/our-golf-gear-testing-design-standards\"\u003eTesting Standards\u003c\/a\u003e\n\u003c\/div\u003e\n\u003c\/section\u003e\n\u003c!-- FAQ schema --\u003e \u003cscript type=\"application\/ld+json\"\u003e\n    {\n      \"@context\":\"https:\/\/schema.org\",\n      \"@type\":\"FAQPage\",\n      \"mainEntity\":[\n        {\"@type\":\"Question\",\"name\":\"Does the finish change the tool?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"No. Same tool and function. Choose based on visibility and preference.\"}},\n        {\"@type\":\"Question\",\"name\":\"How do I repair a ball mark correctly?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Insert just outside the mark, push turf inward toward the center from multiple angles, then smooth with a putter. Avoid prying upward.\"}},\n        {\"@type\":\"Question\",\"name\":\"Why metal over plastic?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Metal typically provides better durability and leverage, especially on firmer greens. Plastic can flex or snap under higher force.\"}},\n        {\"@type\":\"Question\",\"name\":\"What pairs best with this divot tool?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Pair it with a magnetic towel system for groove cleaning and a Landing Pad for a consistent home base inside your bag between dividers.\"}}\n      ]\n    }\n    \u003c\/script\u003e \u003c!-- Variant sync script (same mechanics as Stubby, updated for divot tool variants) --\u003e \u003cscript\u003e\n    (function(){\n      const finishToVariantId = {\n        \"Black\": \"40559932932139\",\n        \"Silver\": \"40559932964907\",\n        \"Blue\": \"40970142777387\",\n        \"Gunmetal\": \"40987345322027\",\n        \"Red\": \"40987345354795\"\n      };\n\n      const finishToImage = {\n        \"Silver\": \"https:\/\/cdn.shopify.com\/s\/files\/1\/0555\/0830\/3915\/files\/Updated_Main_Image_53ee84b2-a667-4cbe-9b82-8dc4e30f7cd1.jpg?v=1765461229\",\n        \"Red\": \"https:\/\/cdn.shopify.com\/s\/files\/1\/0555\/0830\/3915\/files\/Updated_Main_Image_f80e0dc3-5114-403f-b3ed-745988acaa86.jpg?v=1765461229\",\n        \"Gunmetal\": \"https:\/\/cdn.shopify.com\/s\/files\/1\/0555\/0830\/3915\/files\/Updated_Main_Image_7dd024f1-ccc8-4e13-afb5-fbcbc0e1916a.jpg?v=1765461229\",\n        \"Blue\": \"https:\/\/cdn.shopify.com\/s\/files\/1\/0555\/0830\/3915\/files\/Updated_Main_Image_c4d93332-f0a1-4151-9651-a12fbcba885d.png?v=1765461229\",\n        \"Black\": \"https:\/\/cdn.shopify.com\/s\/files\/1\/0555\/0830\/3915\/files\/Updated_Main_Image.png?v=1765461229\"\n      };\n\n      const module = document.querySelector('#af-divot-pdp [data-af-variant-sync]');\n      if(!module) return;\n\n      const status = module.querySelector('[data-af-status]');\n      const swatches = Array.from(module.querySelectorAll('[data-af-finish]'));\n      const atcBtn = module.querySelector('[data-af-atc]');\n\n      function setStatus(msg){ if(status) status.textContent = msg; }\n      function stripQuery(url){ return (url||'').split('?')[0]; }\n\n      \/\/ Find native variant select OR radio inputs.\n      const variantSelect =\n        document.querySelector('form[action^=\"\/cart\/add\"] select[name=\"id\"]') ||\n        document.querySelector('form[action*=\"\/cart\/add\"] select[name=\"id\"]') ||\n        document.querySelector('select[name=\"id\"]');\n\n      const variantRadios = Array.from(document.querySelectorAll('input[type=\"radio\"][name=\"id\"]'));\n\n      \/\/ Find native theme Add to Cart\n      const nativeAtc =\n        document.querySelector('form[action^=\"\/cart\/add\"] button[type=\"submit\"], form[action^=\"\/cart\/add\"] [type=\"submit\"]') ||\n        document.querySelector('form[action*=\"\/cart\/add\"] button[type=\"submit\"], form[action*=\"\/cart\/add\"] [type=\"submit\"]') ||\n        document.querySelector('button[name=\"add\"], button[type=\"submit\"][name=\"add\"]');\n\n      function setSelectedSwatch(finishLabel){\n        swatches.forEach(btn =\u003e btn.setAttribute('aria-selected', btn.dataset.afFinish === finishLabel ? 'true' : 'false'));\n      }\n\n      function setVariantById(variantId){\n        let didSet = false;\n\n        if(variantSelect \u0026\u0026 variantSelect.options){\n          const opt = Array.from(variantSelect.options).find(o =\u003e String(o.value) === String(variantId));\n          if(opt){\n            variantSelect.value = opt.value;\n            variantSelect.dispatchEvent(new Event('change', { bubbles:true }));\n            didSet = true;\n          }\n        }\n\n        if(!didSet \u0026\u0026 variantRadios.length){\n          const radio = variantRadios.find(r =\u003e String(r.value) === String(variantId));\n          if(radio){\n            radio.checked = true;\n            radio.dispatchEvent(new Event('change', { bubbles:true }));\n            didSet = true;\n          }\n        }\n\n        return didSet;\n      }\n\n      \/\/ Keep search inside product area\n      function getProductRoot(){\n        const addForm = document.querySelector('form[action^=\"\/cart\/add\"], form[action*=\"\/cart\/add\"]');\n        if(addForm) return addForm.closest('section, .shopify-section, main, body') || document;\n        return document;\n      }\n\n      function clickGalleryItemByUrl(url){\n        const root = getProductRoot();\n        const target = stripQuery(url);\n\n        const candidates = Array.from(root.querySelectorAll(\n          'button, a, img, source, [data-src], [data-zoom], [data-image], [href]'\n        ));\n\n        for(const el of candidates){\n          const attrs = [\n            el.getAttribute('src'),\n            el.getAttribute('href'),\n            el.getAttribute('data-src'),\n            el.getAttribute('data-zoom'),\n            el.getAttribute('data-image'),\n            el.getAttribute('srcset')\n          ].filter(Boolean);\n\n          if(attrs.some(a =\u003e stripQuery(a).includes(target))){\n            const clickable = el.closest('button, a') || (el.tagName === 'BUTTON' || el.tagName === 'A' ? el : null);\n            if(clickable){\n              clickable.click();\n              return true;\n            }\n          }\n        }\n        return false;\n      }\n\n      function bruteSwapActiveMedia(url, finishLabel){\n        const root = getProductRoot();\n        const imgCandidates = [];\n\n        const activeWrappers = Array.from(root.querySelectorAll(\n          '[aria-current=\"true\"], .is-selected, .is-active, .active, [data-active=\"true\"], [data-selected=\"true\"]'\n        ));\n\n        activeWrappers.forEach(w =\u003e {\n          imgCandidates.push(...Array.from(w.querySelectorAll('img')));\n          Array.from(w.querySelectorAll('picture source')).forEach(s =\u003e s.setAttribute('srcset', url));\n        });\n\n        if(imgCandidates.length === 0){\n          imgCandidates.push(...Array.from(root.querySelectorAll('img')).filter(i =\u003e {\n            const s = (i.getAttribute('src') || '');\n            return s.includes('cdn.shopify.com') \u0026\u0026 !s.includes('logo') \u0026\u0026 !s.includes('icon');\n          }).slice(0,3));\n        }\n\n        if(imgCandidates.length === 0) return false;\n\n        imgCandidates.forEach(img =\u003e {\n          img.src = url;\n          img.removeAttribute('srcset');\n          img.removeAttribute('sizes');\n          const oldAlt = img.getAttribute('alt') || 'Foldable divot tool';\n          const baseAlt = oldAlt.split('—')[0].trim();\n          img.setAttribute('alt', baseAlt + ' — ' + finishLabel);\n        });\n\n        return true;\n      }\n\n      function selectFinish(finishLabel){\n        const variantId = finishToVariantId[finishLabel];\n        const imgUrl = finishToImage[finishLabel];\n\n        setSelectedSwatch(finishLabel);\n\n        \/\/ 1) Sync Shopify variant\n        const ok = variantId ? setVariantById(variantId) : false;\n\n        \/\/ 2) Force gallery switch\n        if(imgUrl){\n          const clicked = clickGalleryItemByUrl(imgUrl);\n          setTimeout(() =\u003e {\n            if(clicked){\n              setStatus('Selected: ' + finishLabel + '.');\n              return;\n            }\n            const swapped = bruteSwapActiveMedia(imgUrl, finishLabel);\n            setStatus(swapped\n              ? ('Selected: ' + finishLabel + '.')\n              : ('Selected: ' + finishLabel + '. (Gallery element not found in this theme.)')\n            );\n          }, 80);\n        } else {\n          setStatus('Selected: ' + finishLabel + '.');\n        }\n\n        if(!ok){\n          \/\/ Variant input not detected (theme oddity). Still keep finish selection for ATC fallback.\n          setStatus('Selected: ' + finishLabel + '. (Variant control not found. ATC will use fallback link.)');\n        }\n      }\n\n      \/\/ Swatch clicks\n      swatches.forEach(btn =\u003e btn.addEventListener('click', () =\u003e selectFinish(btn.dataset.afFinish)));\n\n      \/\/ ATC button\n      if(atcBtn){\n        atcBtn.addEventListener('click', () =\u003e {\n          const selected = swatches.find(b =\u003e b.getAttribute('aria-selected') === 'true');\n          const finish = selected ? selected.dataset.afFinish : null;\n          const variantId = finish ? finishToVariantId[finish] : null;\n\n          \/\/ Prefer native theme ATC (best)\n          if(nativeAtc){\n            nativeAtc.click();\n            return;\n          }\n\n          \/\/ Fallback: direct add by variant ID\n          if(variantId){\n            window.location.href = '\/cart\/add?id=' + encodeURIComponent(variantId) + '\u0026quantity=1';\n            return;\n          }\n\n          setStatus('Pick a finish first. Then add to cart.');\n        });\n      }\n\n      \/\/ Default selection: Gunmetal (matches your “recommended” from earlier)\n      selectFinish('Gunmetal');\n\n    })();\n    \u003c\/script\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e","brand":"Aiming Fluid Golf","offers":[{"title":"Black","offer_id":43994745766023,"sku":"AFDT-B","price":24.69,"currency_code":"USD","in_stock":true},{"title":"Silver","offer_id":43994745798791,"sku":"AFDT-S","price":24.69,"currency_code":"USD","in_stock":true},{"title":"Blue","offer_id":43994745831559,"sku":"AFDT-BL","price":24.69,"currency_code":"USD","in_stock":true},{"title":"Gunmetal","offer_id":43994745864327,"sku":"AFDT-G","price":24.69,"currency_code":"USD","in_stock":true},{"title":"Red","offer_id":43994745897095,"sku":"AFDT-R","price":24.69,"currency_code":"USD","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0707\/1082\/0999\/files\/Updated_Main_Image_7dd024f1-ccc8-4e13-afb5-fbcbc0e1916a.jpg?v=1771937026","url":"https:\/\/bings.shop\/products\/foldable-metal-divot-tool","provider":"BINGS","version":"1.0","type":"link"}