I’ve seen that happen before, it’s usually a layering or shadow issue rather than the hover color itself. The black you’re seeing is likely coming from either a default button shadow or a border/background layer that still sits underneath.
Try adding this line to your button hover style in your CSS:
Ah yes That little black “shadow” usually comes from button borders or box-shadow that remain even after changing the hover color.
you can fix it in Shopify:
CSS Fix
Go to Online Store → Themes → Edit code → Assets → base.css (or your theme’s CSS file).
Add this at the bottom:
/* Remove black shadow/outline on button hover */
button:hover,
button:focus,
.btn:hover,
.btn:focus {
background-color: pink !important; /* your hover color */
border-color: pink !important; /* match border to background */
box-shadow: none !important; /* remove any shadow */
outline: none !important; /* remove outline */
}
Save and refresh your storefront.
Different themes use .btn or button for buttons — the code above targets both.
If you still see the black line, inspect the button in Chrome/Firefox DevTools → check if there’s a border, box-shadow, or outline from another class, then override it with the same CSS method.
Hope this helps! If you ever need help with Shopify theme customization or store setup, I provide professional and friendly services at affordable rates. I’m here to help merchants like you while earning a livelihood. – Hammad | Shopify Developer
Ah, that makes sense — the earlier code was too broad and affected all elements with hover states.
Let’s narrow it down to only product or action buttons.
Try this instead:
/* Apply hover color only to main buttons */
button.shopify-payment-button__button,
.shopify-payment-button button,
.button,
.btn,
.product-form__submit {
transition: all 0.3s ease;
}
button.shopify-payment-button__button:hover,
.shopify-payment-button button:hover,
.button:hover,
.btn:hover,
.product-form__submit:hover {
background-color: pink !important;
border-color: pink !important;
box-shadow: none !important;
outline: none !important;
}
This targets Shopify buy/add-to-cart buttons only, leaving other hover elements (like links or icons) untouched.
Hope this helps!
If you ever need help with Shopify theme customization or store setup, I provide professional and friendly services at affordable rates. I’m here to help merchants like you while earning a livelihood.
– Hammad | Shopify Developer