Want this item customized? Reach out to us today!
<script>
(function(){
  // Add this helper anywhere after your CSS
  const BADGE_TOKEN_RE = /\[badge(@[a-z]{2})?\s*:\s*([^\]]+)\]/i;
  const posClass = p => (p||"").toLowerCase()==="@tr"?"-tr":(p||"").toLowerCase()==="@bl"?"-bl":(p||"").toLowerCase()==="@br"?"-br":"";

  function injectFromTitleToken(card){
    if (card.querySelector('.sassy-badge')) return false;
    const a = card.querySelector('a[href*="/product/"], a[href*="/shop/p/"], a[href]');
    if (!a) return false;

    const text = (a.textContent||"").trim();
    const m = text.match(BADGE_TOKEN_RE);
    if (!m) return false;

    const wrap = card.querySelector('.grid-image-wrapper, .product-item-image, .product-list-item-image, .sqs-image, a[href]') || card;
    if (!wrap) return false;

    // Draw badge
    const badge = document.createElement('div');
    badge.className = 'sassy-badge ' + posClass(m[1]||"");
    badge.textContent = (m[2]||"").trim();
    wrap.appendChild(badge);

    // Hide token from the link text so customers don’t see it
    a.textContent = text.replace(BADGE_TOKEN_RE, '').trim();
    return true;
  }

  // Run on load + after mutations
  function run(root=document){
    const cards = root.querySelectorAll('.ProductList-item, .product-list-item, .grid-item, .grid-image-wrapper');
    cards.forEach(el => {
      const card = el.closest?.('.ProductList-item, .product-list-item, .grid-item, li, article') || el;
      injectFromTitleToken(card);
    });
  }
  if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', ()=>run());
  else run();

  new MutationObserver(m=>m.forEach(x=>x.addedNodes&&x.addedNodes.forEach(n=>{
    if(n.nodeType===1 && (n.matches?.('.ProductList, .products, .collection') || n.querySelector?.('.grid-image-wrapper,.ProductList-item,.product-list-item')))
      run(n);
  }))).observe(document.documentElement,{childList:true,subtree:true});
})();
</script>