Change the product page Add To Cart button background without affecting the other buttons

I managed to change the add to cart button but it affected all add to cart buttons on my store.

how can I solve that?

Hi, @orhl1234

Can you share your store url?

Hello @orhl1234

You can add code by following these steps

  1. Go to Online Store → Theme → Edit code.

  2. Open your theme.liquid file

  3. Paste the below code before on theme.liquid

.product-form__buttons .button.product-form__submit { background: blue !important; /*change color according to you*/ }

Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.

Add This Css in your open Edit code > base.css File

product-form.product-form .product-form__submit{
    background: #000;
    color: #fff;
}

its working but is that fine?

Yes, but when you add background white then you have to change the button text color also.
.product-form__buttons .button.product-form__submit {
color: #000 !important;
}