<script>
    document.addEventListener("DOMContentLoaded", function() {
        var element = document.querySelectorAll('.product-total')[0];
        if (element) {
            var decodedHTML = element.innerHTML;

            var parser = new DOMParser();
            var dom = parser.parseFromString(
                '<!doctype html><body>' + decodedHTML,
                'text/html'
            );
            var correctedHTML = dom.body.textContent;
            // correctedHTML.setAttribute('target', '_blank');
            var cleanedHTML = dom.body.innerHTML.replace(/\s+/g, ' ');

            element.innerHTML = correctedHTML;
        }
    });

    document.addEventListener("DOMContentLoaded", function() {
        var element = document.querySelectorAll('.product-total')[0];
        if (element) {
            var decodedHTML = element.innerHTML;
            decodedHTML.replace(/\s+/g, ' ');
            var parser = new DOMParser();
            var dom = parser.parseFromString(
                '<!doctype html><body>' + decodedHTML,
                'text/html'
            );

            // Traverse the DOM and add target="_blank" to all anchor elements
            var anchors = dom.body.querySelectorAll('a');
            anchors.forEach(function(anchor) {
                anchor.setAttribute('target', '_blank');
            });

            var correctedHTML = dom.body.innerHTML;
            element.innerHTML = correctedHTML;
            // correctedHTML. = '<i class="fa-solid fa-arrow-up-right-from-square" style="color: #000000;"></i>';
            // element.innerHTML += correctedHTML;

        }
    });
</script>
<div class="overlay" id="overlay" style="display: none;"></div>

<div class="popup" id="citypopup" style="display: none;">

	<span class="close-button sp" onclick="hidePopupfun('citypopup')"><img draggable="false" role="img" class="emoji" alt="✖" src="https://s.w.org/images/core/emoji/14.0.0/svg/2716.svg"></span>
	<h2><b>City</b></h2>
	<p>This is the city where the personal shopper will need to meet up with the customer to personally deliver the item.</p>
	<p>The exact meet-up location or address can be agreed in the Messages section.</p>
</div>

<div class="popup" id="pricepopup" style="display: none;">

	<span class="close-button sp" onclick="hidePopupfun('pricepopup')"><img draggable="false" role="img" class="emoji" alt="✖" src="https://s.w.org/images/core/emoji/14.0.0/svg/2716.svg"></span>
	<h2><b>Estimated Price per piece</b></h2>
	<p>This is the unit price of the item that's expected by the customer.</p>
	<p>This is just an estimate, and the final price can be negotiated further within the personal shopper's offer. </p>
	<h3><b>Is it per piece or in total?</b></h3>
	<p>This price is per piece. To calculate the total order and payment due, we'll multiply the unit price by the quantity in the agreed offer.</p>
</div>

<div class="popup" id="needed" style="display: none;">

	<span class="close-button sp" onclick="hidePopupfun('needed')"><img draggable="false" role="img" class="emoji" alt="✖" src="https://s.w.org/images/core/emoji/14.0.0/svg/2716.svg"></span>
	<h2><b>Deliver By</b></h2>
	<p>This is the target date when the customer would like to receive the item by.</p>
	<p>This can be changed and negotiated between the two parties through the Messages section in the offer.</p>
</div>


<div class="popup" id="website" style="display: none;">

	<span class="close-button sp" onclick="hidePopupfun('website')"><img draggable="false" role="img" class="emoji" alt="✖" src="https://s.w.org/images/core/emoji/14.0.0/svg/2716.svg"></span>
	<h2><b>Website</b></h2>
	<p>This is the suggested website link for the item, coming from the customer. </p>
	<p>For security purposes, you'll need to open the link manually in a new window on your browser. <strong>Please make sure to only open links that you trust.</strong></p>
</div>
<script>
	document.addEventListener("DOMContentLoaded", function() {
		
		document.querySelector(".City").addEventListener("click", function() {
				showPopupfun('citypopup');
			});

			document.querySelector(".price.per.piece").addEventListener("click", function() {
				showPopupfun('pricepopup');
			});

			document.querySelector(".deliver.by").addEventListener("click", function() {
				showPopupfun('needed');
			});

			document.querySelector(".Website").addEventListener("click", function() {
				showPopupfun('website');
			});

	});
	
	function showPopupfun(popup) {
	
		document.getElementById('overlay').style.display = 'block';
		document.getElementById(popup).style.display = 'block';
	}

	function hidePopupfun(popup) {
		document.getElementById('overlay').style.display = 'none';
		document.getElementById(popup).style.display = 'none';
	}
</script>


img[data-lazyloaded]{opacity:0}img.litespeed-loaded{-webkit-transition:opacity .5s linear 0.2s;-moz-transition:opacity .5s linear 0.2s;transition:opacity .5s linear 0.2s;opacity:1}#wrapper .header-wrapper header{border-bottom-style:none}body.page-id-1094 #wrapper div .elementor{overflow:hidden}body #footer .widget .thb-widget-title{color:#ecf0f1}body #footer{background-color:#000}body #menu-discover .menu-item a{color:#fff}body #menu-our-company .menu-item a{color:#fff}body #footer .columns{max-width:48%}body #footer .columns:nth-child(1){min-width:90%}body #block-5 h2{margin-top:-10px}body #block-6 p{margin-top:-10px;line-height:3px;padding-bottom:40px}#block-8 p{color:#ecf0f1!important}#wrapper>div.subfooter::before{background:#ecf0f1}body #wrapper .subfooter{background-color:#000;color:#fff}.home .footer{margin-top:0}body.page-id-36 #wrapper .header-wrapper{background-color:transparent}body.page-id-36 #wrapper .header-wrapper header{border-bottom-style:solid}#side-cart{display:none!important}body .thb-item-icon-wrapper .thb-item-icon span{cursor:pointer}.wkmp-role-selector{position:absolute;opacity:0;z-index:-2222222;left:0}.wkmp-show-fields-if-seller{display:block!important}.woocommerce-error a{display:inline!important}body.page-id-1322 .mlt_ratings div img{border-top-right-radius:75px;border-bottom-left-radius:75px;border-bottom-right-radius:75px;border-top-left-radius:75px}body.page-id-1322 .mlt_ratings div h3{letter-spacing:1.2px}body.page-id-1322 .hentry .mp-profile-wrapper .mlt_ratings{padding-bottom:20px}body.page-id-1322 .mp-profile-wrapper .mp-seller-recent-product h3{display:block}