Make out of stock variant appear opaque on product page

Hello,

I have been searching and cannot find a code that works. I am wanting to have item photos for products that do not have variants and are sold out to automatically be reduced in opacity.

I also am wanting to make items that have variants have “grayed out” variants in the product drop downs and product page so that customers know which items are available.

I am using the Dawn theme and I have tried several codes and none of them have worked.

I am also trying to delete the random code at the bottom of the main page. Have searched everywhere for it and can’t find where to remove it from. Any suggestions are appreciated!

www.adamidolls.com

Thank you!