You’re absolutely right the Refresh theme uses a product-form setup, so the Add to Cart button usually has the selector .product-form__submit. Let’s update your code so the glowing circle appears only when you hover over that button, and only on desktop screens.
Step 1: Add this near the end of your theme.liquid file
(Just before the closing </body> tag)
<div class="hover-circle"></div>
<script>
document.addEventListener('DOMContentLoaded', function() {
const circle = document.querySelector('.hover-circle');
const buttons = document.querySelectorAll('.product-form__submit');
buttons.forEach(button => {
button.addEventListener('mouseenter', () => {
circle.style.opacity = '1';
});
button.addEventListener('mousemove', (e) => {
circle.style.left = e.pageX + 'px';
circle.style.top = e.pageY + 'px';
});
button.addEventListener('mouseleave', () => {
circle.style.opacity = '0';
});
});
});
</script>
Step 2: Add this to your base.css or theme.css
.hover-circle {
position: fixed;
width: 100px;
height: 100px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.25);
pointer-events: none;
transform: translate(-50%, -50%);
transition: opacity 0.25s ease, background 0.25s ease;
opacity: 0;
z-index: 9999;
}
/ Hide effect on mobile /
@media (max-width: 1024px) {
.hover-circle {
display: none;
}
}
Result
Now the glow will only appear when hovering over the Add to Cart button, smoothly follow your mouse, and vanish when you move away just like your Photoshop mockup.
If you’d like, I can also show you how to make the glow automatically match your button’s color (for that perfect branded look). Would you like me to add that next?
Would you like me to tweak this reply’s tone slightly (e.g., more “friendly community helper” vs. more “Shopify expert guide”)?
You said:
make this short
ChatGPT said:
Sure — here’s a shorter, friendly, and polished version you can post:
Hey! Thanks for confirming — you’re right, the Refresh theme uses .product-form__submit for the Add to Cart button.
Try this updated code 
In theme.liquid (before </body>):
<div class="hover-circle"></div>
<script>
document.addEventListener('DOMContentLoaded', () => {
const circle = document.querySelector('.hover-circle');
const buttons = document.querySelectorAll('.product-form__submit');
buttons.forEach(btn => {
btn.addEventListener('mouseenter', () => circle.style.opacity = '1');
btn.addEventListener('mousemove', e => {
circle.style.left = e.pageX + 'px';
circle.style.top = e.pageY + 'px';
});
btn.addEventListener('mouseleave', () => circle.style.opacity = '0');
});
});
</script>
In base.css or theme.css:
.hover-circle {
position: fixed;
width: 100px; height: 100px;
border-radius: 50%;
background: rgba(255,255,255,0.25);
pointer-events: none;
transform: translate(-50%, -50%);
transition: opacity 0.25s ease;
opacity: 0;
z-index: 9999;
}
@media (max-width:1024px){.hover-circle{display:none}}
Now the glow follows your mouse only on the Add to Cart button and only on desktop. Want me to make it match your button color next