{"product_id":"build-your-own-protein-bar-box","title":"Build Your Own Protein Bar Box","description":"\u003cul\u003e\n\u003cli\u003ePick any mix of 4 flavours\u003c\/li\u003e\n\u003cli\u003e15 g protein and zero added sugar in every bar\u003c\/li\u003e\n\u003c\/ul\u003e\u003cp\u003eMake your own box of PureBoost protein bars. Choose a box of 6 or 12 above, then pick how many of each flavour you want: Chocolate, Choco Almond, Choco Berry and Coffee Mocha. Your mix is saved with the order and packed exactly as you picked it.\u003c\/p\u003e\u003ch3\u003eAt a glance\u003c\/h3\u003e\u003cul\u003e\n\u003cli\u003e50 g bars, 15 g protein each\u003c\/li\u003e\n\u003cli\u003eZero added sugar\u003c\/li\u003e\n\u003cli\u003eBox of 6: Rs. 540 · Box of 12: Rs. 990\u003c\/li\u003e\n\u003c\/ul\u003e\u003cp\u003e\u003cstrong\u003eAllergens:\u003c\/strong\u003e Contains milk, soy and nuts.\u003c\/p\u003e\u003cstyle\u003e\n.pbx{margin:6px 0 4px}\n.pbx-h{display:flex;justify-content:space-between;align-items:baseline;gap:10px;margin:18px 0 8px}\n.pbx-h b{font-size:17px}\n.pbx-h span{font-size:13px;opacity:.7}\n.pbx-list{border:2px solid #151515;border-radius:18px;overflow:hidden;background:#fff}\n.pbx-row{display:flex;align-items:center;gap:12px;padding:10px 12px;border-top:1px solid rgba(0,0,0,.12)}\n.pbx-row:first-child{border-top:0}\n.pbx-row img{flex:0 0 46px;width:46px;height:46px;border-radius:10px;object-fit:cover;background:#fff;border:1px solid rgba(0,0,0,.1)}\n.pbx-row .nm{flex:1;min-width:0;line-height:1.2}\n.pbx-row .nm b{display:block;font-size:16px;font-weight:800}\n.pbx-row .nm small{font-size:12.5px;opacity:.75;color:#151515}\n.pbx-st{flex:0 0 auto;display:flex;align-items:center;border-radius:10px;overflow:hidden;border:2px solid currentColor}\n.pbx-st button{width:34px;height:34px;border:0!important;border-radius:0!important;margin:0!important;min-height:0!important;box-shadow:none!important;color:#fff;font:700 20px\/1 'DM Sans',sans-serif;cursor:pointer;padding:0}\n.pbx-st button:disabled{opacity:.35;cursor:default}\n.pbx-st span{min-width:34px;text-align:center;font-weight:800;font-size:16px;background:#fff;color:#151515;line-height:34px}\n.pbx-count{display:flex;align-items:center;gap:12px;margin:12px 0 0;font-weight:700}\n.pbx-count .trk{flex:1;height:10px;border-radius:99px;background:rgba(0,0,0,.1);overflow:hidden;border:1px solid rgba(0,0,0,.15)}\n.pbx-count .fil{height:100%;width:0;background:#FFD93B;transition:width .2s}\n.pbx-count .n{white-space:nowrap}\n.pbx-tip{font-size:13px;opacity:.75;margin:6px 0 0}\n@media(max-width:540px){.pbx-row{gap:10px;padding:9px 10px}.pbx-row img{flex-basis:40px;width:40px;height:40px}.pbx-row .nm b{font-size:15px}.pbx-st button{width:30px;height:30px}.pbx-st span{min-width:30px;line-height:30px}}\n\u003c\/style\u003e\u003cscript\u003e\n(function(){\n  var C = {\"items\":[{\"name\":\"Chocolate\",\"sub\":\"15 g protein · 167 kcal\",\"img\":\"https:\/\/cdn.shopify.com\/s\/files\/1\/0739\/3768\/2570\/files\/chocolateproteinbarpackof12.jpg?width=160\",\"c\":\"#5a3522\",\"t\":\"#f6ece4\"},{\"name\":\"Choco Almond\",\"sub\":\"15 g protein · 139 kcal\",\"img\":\"https:\/\/cdn.shopify.com\/s\/files\/1\/0739\/3768\/2570\/files\/chocoalmondpaclof12.png?width=160\",\"c\":\"#8f4f22\",\"t\":\"#f8efe2\"},{\"name\":\"Choco Berry\",\"sub\":\"15 g protein · 148 kcal\",\"img\":\"https:\/\/cdn.shopify.com\/s\/files\/1\/0739\/3768\/2570\/files\/WhatsAppImage2026-06-27at3.07.02PM.jpg?width=160\",\"c\":\"#a3214a\",\"t\":\"#fbe8ef\"},{\"name\":\"Coffee Mocha\",\"sub\":\"15 g protein · 160 kcal\",\"img\":\"https:\/\/cdn.shopify.com\/s\/files\/1\/0739\/3768\/2570\/files\/coffeepackof12.jpg?width=160\",\"c\":\"#6b4632\",\"t\":\"#efe4da\"}],\"heading\":\"Pick your flavours\",\"hint\":\"Any mix you like\",\"countLabel\":\"No. of bars\",\"word\":\"bar\",\"prop\":\"Flavours\",\"minQty\":1};\n  function init(){\n    var form = document.getElementById('pbp-form');\n    var sel = document.getElementById('pbp-variant');\n    if (!form || !sel || form.querySelector('.pbx')) return;\n    var adds = [document.getElementById('pbp-add'), document.getElementById('pbp-bar-add')].filter(Boolean);\n    var qty = form.querySelector('input[name=\"quantity\"]');\n    var counts = C.items.map(function(){ return 0; });\n    function slots(){ var m = (sel.options[sel.selectedIndex].text || '').match(\/(\\d+)\/); return m ? parseInt(m[1], 10) : 6; }\n    function total(){ return counts.reduce(function(a, b){ return a + b; }, 0); }\n    var box = document.createElement('div'); box.className = 'pbx';\n    box.innerHTML = '\u003cdiv class=\"pbx-h\"\u003e\u003cb\u003e' + C.heading + '\u003c\/b\u003e\u003cspan\u003e' + C.hint + '\u003c\/span\u003e\u003c\/div\u003e\u003cdiv class=\"pbx-list\"\u003e\u003c\/div\u003e' +\n      '\u003cdiv class=\"pbx-count\"\u003e\u003cspan class=\"n\"\u003e\u003c\/span\u003e\u003cdiv class=\"trk\"\u003e\u003cdiv class=\"fil\"\u003e\u003c\/div\u003e\u003c\/div\u003e\u003c\/div\u003e\u003cp class=\"pbx-tip\"\u003e\u003c\/p\u003e';\n    var list = box.querySelector('.pbx-list');\n    C.items.forEach(function(it, i){\n      var r = document.createElement('div'); r.className = 'pbx-row'; r.style.background = it.t;\n      r.innerHTML = '\u003cimg alt=\"\" loading=\"lazy\"\u003e\u003cdiv class=\"nm\"\u003e\u003cb\u003e\u003c\/b\u003e\u003csmall\u003e\u003c\/small\u003e\u003c\/div\u003e' +\n        '\u003cdiv class=\"pbx-st\"\u003e\u003cbutton type=\"button\" class=\"m\" aria-label=\"Remove one\"\u003e\u0026minus;\u003c\/button\u003e\u003cspan\u003e0\u003c\/span\u003e\u003cbutton type=\"button\" class=\"p\" aria-label=\"Add one\"\u003e+\u003c\/button\u003e\u003c\/div\u003e';\n      r.querySelector('img').src = it.img; r.querySelector('img').alt = it.name;\n      r.querySelector('b').textContent = it.name; r.querySelector('b').style.color = it.c;\n      r.querySelector('small').textContent = it.sub;\n      var st = r.querySelector('.pbx-st'); st.style.color = it.c;\n      st.querySelectorAll('button').forEach(function(b){ b.style.background = it.c; });\n      r.querySelector('.m').addEventListener('click', function(){ if (counts[i] \u003e 0) { counts[i]--; update(); } });\n      r.querySelector('.p').addEventListener('click', function(){ if (slots() \u003e total()) { counts[i]++; update(); } });\n      list.appendChild(r);\n    });\n    var prop = document.createElement('input'); prop.type = 'hidden'; prop.name = 'properties[' + C.prop + ']';\n    form.appendChild(prop);\n    var row = form.querySelector('.row');\n    form.insertBefore(box, row);\n    if (C.minQty \u003e 1 \u0026\u0026 qty) {\n      qty.min = C.minQty; qty.value = C.minQty;\n      qty.addEventListener('change', function(){ if (C.minQty \u003e (parseInt(qty.value, 10) || 0)) qty.value = C.minQty; });\n      form.querySelectorAll('.qty button').forEach(function(b){ b.addEventListener('click', function(){ setTimeout(function(){ if (C.minQty \u003e (parseInt(qty.value, 10) || 0)) qty.value = C.minQty; }, 0); }); });\n    }\n    function update(){\n      var s = slots();\n      while (total() \u003e s) { for (var k = counts.length - 1; k \u003e= 0; k--) { if (counts[k] \u003e 0) { counts[k]--; break; } } }\n      var t = total(), left = s - t;\n      list.querySelectorAll('.pbx-row').forEach(function(r, i){\n        r.querySelector('span').textContent = counts[i];\n        r.querySelector('.m').disabled = counts[i] === 0;\n        r.querySelector('.p').disabled = left === 0;\n      });\n      box.querySelector('.n').textContent = C.countLabel + ': ' + t + '\/' + s;\n      box.querySelector('.fil').style.width = (100 * t \/ s) + '%';\n      box.querySelector('.pbx-tip').textContent = left === 0 ? 'All set. Your mix is saved with the order.' : 'Pick ' + left + ' more ' + (left === 1 ? C.word : C.word + 's') + ' to add this to your cart.';\n      var parts = []; C.items.forEach(function(it, i){ if (counts[i] \u003e 0) parts.push(it.name + ' x ' + counts[i]); });\n      prop.value = parts.join(', ');\n      var ok = sel.options[sel.selectedIndex].dataset.available !== 'false';\n      adds.forEach(function(a){ a.disabled = !ok || left !== 0; a.textContent = !ok ? 'Sold out' : (left === 0 ? 'Add to cart' : 'Pick ' + left + ' more'); });\n    }\n    sel.addEventListener('change', function(){ setTimeout(update, 0); });\n    document.addEventListener('submit', function(e){\n      if (e.target !== form) return;\n      if (total() !== slots()) { e.preventDefault(); e.stopImmediatePropagation(); box.scrollIntoView({behavior: 'smooth', block: 'center'}); }\n    }, true);\n    update();\n  }\n  if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', init); else init();\n})();\n\u003c\/script\u003e","brand":"PUREBOOST","offers":[{"title":"Box of 6","offer_id":50415227175050,"sku":null,"price":540.0,"currency_code":"INR","in_stock":true},{"title":"Box of 12","offer_id":50415227207818,"sku":null,"price":990.0,"currency_code":"INR","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0739\/3768\/2570\/files\/build-your-own-protein-bar-box.jpg?v=1791734021","url":"https:\/\/pureboost.in\/products\/build-your-own-protein-bar-box","provider":"PUREBOOST","version":"1.0","type":"link"}