document.addEventListener('DOMContentLoaded', function () {
    // Standard Subscription
    const standardPrices = {
        1: 89,
        3: 200,
        6: 350,
        12: 650,
        24: 1200,
        36: 1800,
        60: 3000
    };

    const standardSubscriptionOptions = document.querySelectorAll('.standardSubscriptionOptions');

    standardSubscriptionOptions.forEach(function (options) {
        options.addEventListener('change', function () {
            const selectedValue = parseInt(this.value);
            const priceElement = this.closest('.feature').querySelector('.standardPrice');
            const price = standardPrices[selectedValue];
            priceElement.textContent = `$${price}`;
        });
    });

    // Premium Subscription
    const premiumPrices = {
        1: 169,
        3: 400,
        6: 700,
        12: 1300,
        24: 2400,
        36: 3600,
        60: 6000
    };

    const premiumSubscriptionOptions = document.querySelectorAll('.premiumSubscriptionOptions');

    premiumSubscriptionOptions.forEach(function (options) {
        options.addEventListener('change', function () {
            const selectedValue = parseInt(this.value);
            const priceElement = this.closest('.feature').querySelector('.premiumPrice');
            const price = premiumPrices[selectedValue];
            priceElement.textContent = `$${price}`;
        });
    });
});
