{"product_id":"build-your-own-12-pack-assorted-naturally-infused-ceylon-iced-tea-case","title":"Build Your Own 12-Pack Assorted Naturally Infused Ceylon Iced Tea Case","description":"\u003cstyle\u003e\n  :root { --dark-matte: #1a1a1a; --border-soft: #e8e8e8; }\n  .byo-wrapper { max-width: 1000px; margin: 20px auto; font-family: sans-serif; }\n  \n  \/* Optimized Sticky Counter *\/\n  .sticky-counter {\n    position: sticky; top: 10px; z-index: 100; background: rgba(255,255,255,0.95);\n    backdrop-filter: blur(10px); border: 1px solid var(--border-soft);\n    padding: 12px 20px; border-radius: 50px; display: flex; align-items: center; \n    margin-bottom: 25px; box-shadow: 0 4px 15px rgba(0,0,0,0.08);\n  }\n\n  .progress-bar-bg { flex-grow: 1; margin: 0 15px; height: 8px; background: #eee; border-radius: 4px; overflow: hidden; }\n  .progress-fill { height: 100%; background: #6b7a31; width: 0%; transition: width 0.3s ease; }\n  \n  \/* Responsive Grid *\/\n  .flavor-grid { \n    display: grid; \n    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); \n    gap: 15px; \n  }\n\n  \/* Mobile Specific Adjustments *\/\n  @media (max-width: 480px) {\n    .flavor-grid { \n      grid-template-columns: 1fr 1fr; \/* Force 2 columns on small phones *\/\n      gap: 10px; \n    }\n    .sticky-counter {\n      padding: 10px 15px;\n      margin-bottom: 20px;\n    }\n    #status-hint { font-size: 10px !important; }\n    #counter-label { font-size: 13px; }\n  }\n\n  .flavor-card { border: 1px solid var(--border-soft); border-radius: 12px; padding: 10px; text-align: center; background: #fff; }\n  .flavor-card img { width: 100%; height: auto; border-radius: 8px; }\n  .qty-box { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 10px; }\n  \n  \/* Larger touch targets for mobile *\/\n  .btn-circle { \n    width: 32px; height: 32px; border-radius: 50%; border: 1px solid #000; \n    background: none; cursor: pointer; display: flex; align-items: center; justify-content: center;\n    font-size: 18px; line-height: 0;\n  }\n  .btn-circle:disabled { border-color: #ccc; color: #ccc; }\n  .disabled-atc { opacity: 0.5 !important; pointer-events: none !important; filter: grayscale(1); }\n\u003c\/style\u003e\n\n\u003cdiv class=\"byo-wrapper\"\u003e\n  \u003cdiv class=\"sticky-counter\"\u003e\n    \u003cdiv id=\"counter-label\"\u003e\n\u003cstrong\u003e0\u003c\/strong\u003e \/ 12\u003c\/div\u003e\n    \u003cdiv class=\"progress-bar-bg\"\u003e\u003cdiv class=\"progress-fill\" id=\"fill\"\u003e\u003c\/div\u003e\u003c\/div\u003e\n    \u003cdiv id=\"status-hint\" style=\"font-size: 12px; font-weight: bold; text-transform: uppercase;\"\u003eSelect 12\u003c\/div\u003e\n  \u003c\/div\u003e\n\n  \u003cinput type=\"hidden\" id=\"bundle-selection-input\" name=\"properties[Flavor Selection]\" value=\"\"\u003e\n\n  \u003cdiv class=\"flavor-grid\"\u003e\n    \u003cdiv class=\"flavor-card\"\u003e\n      \u003cimg src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0634\/0755\/4629\/files\/Mango1.png?v=1766064817\"\u003e\n      \u003cp style=\"font-size: 13px; font-weight: 600; margin: 8px 0 4px;\"\u003eMango\u003c\/p\u003e\n      \u003cdiv class=\"qty-box\"\u003e\n        \u003cbutton type=\"button\" class=\"btn-circle\" onclick=\"changeQty('Mango', -1)\"\u003e−\u003c\/button\u003e\n        \u003cspan id=\"q-Mango\" style=\"font-weight: bold; min-width: 15px;\"\u003e0\u003c\/span\u003e\n        \u003cbutton type=\"button\" class=\"btn-circle\" onclick=\"changeQty('Mango', 1)\"\u003e+\u003c\/button\u003e\n      \u003c\/div\u003e\n    \u003c\/div\u003e\n    \n    \u003cdiv class=\"flavor-card\"\u003e\n      \u003cimg src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0634\/0755\/4629\/files\/Peche1.png?v=1766064505\"\u003e\n      \u003cp style=\"font-size: 13px; font-weight: 600; margin: 8px 0 4px;\"\u003ePêche\u003c\/p\u003e\n      \u003cdiv class=\"qty-box\"\u003e\n        \u003cbutton type=\"button\" class=\"btn-circle\" onclick=\"changeQty('Peche', -1)\"\u003e−\u003c\/button\u003e\n        \u003cspan id=\"q-Peche\" style=\"font-weight: bold; min-width: 15px;\"\u003e0\u003c\/span\u003e\n        \u003cbutton type=\"button\" class=\"btn-circle\" onclick=\"changeQty('Peche', 1)\"\u003e+\u003c\/button\u003e\n      \u003c\/div\u003e\n    \u003c\/div\u003e\n\n    \u003cdiv class=\"flavor-card\"\u003e\n      \u003cimg src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0634\/0755\/4629\/files\/TropicalFruit1.png?v=1766064108\"\u003e\n      \u003cp style=\"font-size: 13px; font-weight: 600; margin: 8px 0 4px;\"\u003eTropical\u003c\/p\u003e\n      \u003cdiv class=\"qty-box\"\u003e\n        \u003cbutton type=\"button\" class=\"btn-circle\" onclick=\"changeQty('Tropical', -1)\"\u003e−\u003c\/button\u003e\n        \u003cspan id=\"q-Tropical\" style=\"font-weight: bold; min-width: 15px;\"\u003e0\u003c\/span\u003e\n        \u003cbutton type=\"button\" class=\"btn-circle\" onclick=\"changeQty('Tropical', 1)\"\u003e+\u003c\/button\u003e\n      \u003c\/div\u003e\n    \u003c\/div\u003e\n\n    \u003cdiv class=\"flavor-card\"\u003e\n      \u003cimg src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0634\/0755\/4629\/files\/Peach1.png?v=1766063606\"\u003e\n      \u003cp style=\"font-size: 13px; font-weight: 600; margin: 8px 0 4px;\"\u003ePeach Zero\u003c\/p\u003e\n      \u003cdiv class=\"qty-box\"\u003e\n        \u003cbutton type=\"button\" class=\"btn-circle\" onclick=\"changeQty('PeachZero', -1)\"\u003e−\u003c\/button\u003e\n        \u003cspan id=\"q-PeachZero\" style=\"font-weight: bold; min-width: 15px;\"\u003e0\u003c\/span\u003e\n        \u003cbutton type=\"button\" class=\"btn-circle\" onclick=\"changeQty('PeachZero', 1)\"\u003e+\u003c\/button\u003e\n      \u003c\/div\u003e\n    \u003c\/div\u003e\n\n    \u003cdiv class=\"flavor-card\"\u003e\n      \u003cimg src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0634\/0755\/4629\/files\/RedFruits1.png?v=1766063065\"\u003e\n      \u003cp style=\"font-size: 13px; font-weight: 600; margin: 8px 0 4px;\"\u003eRed Fruits\u003c\/p\u003e\n      \u003cdiv class=\"qty-box\"\u003e\n        \u003cbutton type=\"button\" class=\"btn-circle\" onclick=\"changeQty('RedFruits', -1)\"\u003e−\u003c\/button\u003e\n        \u003cspan id=\"q-RedFruits\" style=\"font-weight: bold; min-width: 15px;\"\u003e0\u003c\/span\u003e\n        \u003cbutton type=\"button\" class=\"btn-circle\" onclick=\"changeQty('RedFruits', 1)\"\u003e+\u003c\/button\u003e\n      \u003c\/div\u003e\n    \u003c\/div\u003e\n  \u003c\/div\u003e\n\u003c\/div\u003e\n\n\u003cscript\u003e\n  let counts = { Mango: 0, Peche: 0, Tropical: 0, PeachZero: 0, RedFruits: 0 };\n  const target = 12;\n  const productForm = document.querySelector('form[action*=\"\/cart\/add\"]');\nconst shopifyAtcBtn = productForm ? productForm.querySelector('[name=\"add\"]') : document.querySelector('[name=\"add\"]');\nconst bundleInput = document.getElementById('bundle-selection-input');\n\nif (productForm \u0026\u0026 bundleInput \u0026\u0026 !productForm.contains(bundleInput)) {\n  productForm.appendChild(bundleInput);\n}\n\n  function changeQty(item, val) {\n    const total = Object.values(counts).reduce((a, b) =\u003e a + b, 0);\n    if (val \u003e 0 \u0026\u0026 total \u003e= target) return;\n    if (val \u003c 0 \u0026\u0026 counts[item] \u003c= 0) return;\n\n    counts[item] += val;\n    document.getElementById(`q-${item}`).innerText = counts[item];\n    updateUI();\n  }\n\n  function updateUI() {\n    const total = Object.values(counts).reduce((a, b) =\u003e a + b, 0);\n    const perc = (total \/ target) * 100;\n    document.getElementById('fill').style.width = perc + '%';\n    document.getElementById('counter-label').innerHTML = `\u003cstrong\u003e${total}\u003c\/strong\u003e \/ ${target}`;\n\n    let summary = [];\n    for (const [key, value] of Object.entries(counts)) {\n      if(value \u003e 0) summary.push(`${value}x ${key}`);\n    }\n    bundleInput.value = summary.join(', ');\n\n    if (shopifyAtcBtn) {\n      if (total === target) {\n        shopifyAtcBtn.classList.remove('disabled-atc');\n        shopifyAtcBtn.innerText = \"ADD BUNDLE TO CART\";\n      } else {\n        shopifyAtcBtn.classList.add('disabled-atc');\n        shopifyAtcBtn.innerText = `SELECT ${target - total} MORE`;\n      }\n    }\n  }\n  updateUI();\n\u003c\/script\u003e","brand":"McCoy Teas Canada","offers":[{"title":"Default Title","offer_id":44807744127045,"sku":null,"price":16.99,"currency_code":"CAD","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0634\/0755\/4629\/files\/Build_Your_Own_12-Pack_Assorted_Naturally_Infused_Ceylon_Iced_Tea_Case.png?v=1774229758","url":"https:\/\/www.mccoyteascanada.com\/products\/build-your-own-12-pack-assorted-naturally-infused-ceylon-iced-tea-case","provider":"McCoy Teas Canada","version":"1.0","type":"link"}