<script src="https://fareharbor.com/embeds/api/v1/?autolightframe=yes"></script>
<a href="https://fareharbor.com/embeds/book/lisbonaffair/?full-items=yes" class="fh-fixed--bottom fh-icon--calendar-check fh-button-true-flat-red fh-shape--square">BOOK NOW</a>
 <script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>
        <script>
        $(document).ready(function () {
            // Define the mapping of URLs to corresponding href values
            var urlMapping = {
                "/all-experiences/p/portuguese-bread-making-class": "https://fareharbor.com/embeds/book/lisbonaffair/items/512744/?full-items=yes&flow=1095022",
                "/all-experiences/p/pastel-de-nata-pastry-class": "https://fareharbor.com/embeds/book/lisbonaffair/items/512738/?full-items=yes&flow=1095022",
                "/all-experiences/p/portuguese-cooking-class": "https://fareharbor.com/embeds/book/lisbonaffair/items/512737/?full-items=yes&flow=1095022",
                "/all-experiences/p/petiscos-cooking-class": "https://fareharbor.com/embeds/book/lisbonaffair/items/512395/?full-items=yes&flow=1095022",
                "/all-experiences/p/gift-card": "https://fareharbor.com/embeds/book/lisbonaffair/items/512373/?full-items=yes&flow=1093254",
                "/all-experiences/p/portuguese-wine-tasting": "https://fareharbor.com/embeds/book/lisbonaffair/items/512745/?full-items=yes&flow=1095023",
                "/all-experiences/p/port-wines-tasting": "https://fareharbor.com/embeds/book/lisbonaffair/items/512774/?full-items=yes&flow=1095023",
                "/all-experiences/p/portuguese-olive-oil-tasting": "https://fareharbor.com/embeds/book/lisbonaffair/items/512765/?full-items=yes&flow=1095023",
                "/all-experiences/p/portuguese-cheeses-tasting": "https://fareharbor.com/embeds/book/lisbonaffair/items/512766/?full-items=yes&flow=1095023",
                "/all-experiences/p/portuguese-honey-tasting": "https://fareharbor.com/embeds/book/lisbonaffair/items/512768/?full-items=yes&flow=1095023",
                "/all-experiences/p/ceramics-workshop": "https://fareharbor.com/embeds/book/lisbonaffair/items/512807/?full-items=yes&flow=1095025",
                "/all-experiences/p/brunch-with-a-private-workshop": "https://fareharbor.com/embeds/book/lisbonaffair/items/513047/?full-items=yes&flow=1095026",
                "/all-experiences/p/macrame-workshop": "https://fareharbor.com/embeds/book/lisbonaffair/items/512810/?full-items=yes&flow=1095025",
                "/all-experiences/p/tile-painting-workshop": "https://fareharbor.com/embeds/book/lisbonaffair/items/512806/?full-items=yes&flow=1095025",
                "/all-experiences/p/knitting-crochet-workshop": "https://fareharbor.com/embeds/book/lisbonaffair/items/512814/?full-items=yes&flow=1095025",
                "/all-experiences/p/lisbon-luxury-shopping-tour": "https://fareharbor.com/embeds/book/lisbonaffair/items/512802/?full-items=yes&flow=1095024",
                "/all-experiences/p/authentic-lisbon-food-tour": "https://fareharbor.com/embeds/book/lisbonaffair/?full-items=yes&flow=1096149",
                "/all-experiences/p/lisbon-gourmet-tour": "https://fareharbor.com/embeds/book/lisbonaffair/?full-items=yes&flow=1096155",
                "/all-experiences/p/brunch-private-groups": "https://fareharbor.com/embeds/book/lisbonaffair/items/513044/?full-items=yes&flow=1095026",
                "/all-experiences/p/bespoke-private-picnic": "https://fareharbor.com/embeds/book/lisbonaffair/items/512818/?full-items=yes&flow=1095026",
            };

            // Get the current URL path
            var currentPath = window.location.pathname;

            // Check if the current path is in the mapping
            if (urlMapping.hasOwnProperty(currentPath)) {
                // Replace .sqs-add-to-cart-button-wrapper with custom button
                $(".sqs-add-to-cart-button-wrapper").replaceWith(
                    '<a href="' + urlMapping[currentPath] + '" class="fh-button-true-flat-red fh-shape--square">BOOK NOW</a>'
                );

                // Hide .product-variants and .product-quantity-input
                $(".product-variants, .product-quantity-input").hide();
            }
        });
    </script>