<script>
let selectedVehicle = "";
let selectedPrice = 0;
let selectedExtras = [];

function searchVehicles() {
    let results = document.getElementById('results');

    results.innerHTML = `
        <h3>Available Vehicles</h3>

        <div class="vehicle-card">
            <img src="https://picsum.photos/200">
            <h4>TukTuk Standard</h4>
            <p>$25</p>
            <button class="btn" onclick="selectVehicle('TukTuk Standard', 25)">Select</button>
        </div>

        <div class="vehicle-card">
            <img src="https://picsum.photos/200">
            <h4>TukTuk Premium</h4>
            <p>$35</p>
            <button class="btn" onclick="selectVehicle('TukTuk Premium', 35)">Select</button>
        </div>

        <div class="vehicle-card">
            <img src="https://picsum.photos/200">
            <h4>Safari Jeep</h4>
            <p>$120</p>
            <button class="btn" onclick="selectVehicle('Safari Jeep', 120)">Select</button>
        </div>
    `;
}

function selectVehicle(name, price) {
    selectedVehicle = name;
    selectedPrice = price;

    document.getElementById('results').innerHTML = `
        <h3>Optional Extras</h3>

        <label><input type="checkbox" value="Child Seat"> Child Seat (+$5)</label><br>
        <label><input type="checkbox" value="Extra Luggage"> Extra Luggage (+$10)</label><br>
        <label><input type="checkbox" value="Guide"> English Guide (+$20)</label><br><br>

        <button class="btn" onclick="goToDetails()">Continue</button>
    `;
}

function goToDetails() {
    selectedExtras = [];

    document.querySelectorAll('#results input[type=checkbox]:checked').forEach(el => {
        selectedExtras.push(el.value);
    });

    document.getElementById('results').innerHTML = `
        <h3>Your Details</h3>

        <input type="text" id="name" placeholder="Your Name"><br><br>
        <input type="text" id="phone" placeholder="WhatsApp Number"><br><br>
        <input type="email" id="email" placeholder="Email"><br><br>

        <button class="btn" onclick="confirmBooking()">Confirm Booking</button>
    `;
}

function confirmBooking() {
    let name = document.getElementById('name').value;
    let phone = document.getElementById('phone').value;
    let email = document.getElementById('email').value;

    document.getElementById('results').innerHTML = `
        <h3>Booking Confirmed ✅</h3>
        <p>Thank you, ${name}</p>
        <p><strong>Vehicle:</strong> ${selectedVehicle}</p>
        <p><strong>Extras:</strong> ${selectedExtras.join(", ") || "None"}</p>
        <p>We will contact you soon.</p>
    `;
}
</script>

echo '
<div id="results"></div>

<script>
// your JS here
</script>
';<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://getmytuktuk.com/wp-sitemap-index.xsl" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://getmytuktuk.com/wp-sitemap-posts-post-1.xml</loc></sitemap><sitemap><loc>https://getmytuktuk.com/wp-sitemap-posts-page-1.xml</loc></sitemap><sitemap><loc>https://getmytuktuk.com/wp-sitemap-taxonomies-category-1.xml</loc></sitemap><sitemap><loc>https://getmytuktuk.com/wp-sitemap-users-1.xml</loc></sitemap></sitemapindex>
