I am trying to integrate some external code (CSS and JavaScript) into my Shopify store. The integration is mostly working, but it is overriding some of the existing styles of my Shopify theme, causing serious layout and ui issues. Here is what I have added to my Shopify theme files:
In 'theme.liquid' (within <head>):
<link rel="stylesheet" href="https://embed-scripts.s3.amazonaws.com/embed.css" type="text/css" />
In 'theme.liquid' (within <body>):
<div id="ecowiser-verified-root"></div>
<script defer type="module" src="https://embed-scripts.s3.amazonaws.com/embed.js"></script>
In 'footer.liquid':
<div id="ecowiser-verified" data-url="https://wiser.eco/brands/category/Clothing%20and%20Accessories/1036" data-badges="Gives Back, Vegan, Low Waste, Sustainable Materials, Sustainable Packaging"></div>
While the code works and displays correctly, the CSS file (embed.css) is causing some of my existing Shopify styles to be overridden, leading to UI inconsistencies.
What is the best way to include external CSS and scripts in Shopify without them affecting or overriding the existing theme styles?
I am looking for a solution that keeps both the existing Shopify styles and the external styles intact without conflicts