updatePrice(html) {
const priceContainer = this.querySelector(
"product-price [ref='priceContainer']"
);
const newPriceElement = html.querySelector(
"product-price [ref='priceContainer']"
);
if (!newPriceElement || !priceContainer) return;
morph(priceContainer, newPriceElement);
const updatedContainer = this.querySelector(
"product-price [ref='priceContainer']"
);
const salePrice = updatedContainer?.querySelector('.price');
const compareAtPrice =
updatedContainer?.querySelector('.compare-at-price');
if (
salePrice &&
compareAtPrice &&
salePrice.parentElement === compareAtPrice.parentElement
) {
compareAtPrice.before(salePrice);
compareAtPrice.style.marginInlineStart = '0.4em';
}