document.addEventListener("DOMContentLoaded", function () {
    const priceCountButton = document.getElementById('priceCount');
    const priceFlowerButton = document.getElementById('priceFlower');
    const priceColaleButton = document.getElementById('priceColale');
    const priceSafraneButton = document.getElementById('priceSafrane');

    priceCountButton.addEventListener('input', function() {
        let value = parseInt(priceCountButton.value);
        let amount = parseFloat(document.getElementById('reqCount').textContent);
        let price = value * amount;

        document.getElementById('priceCountText').textContent = price.toLocaleString() + ' تومان';
    });

    priceFlowerButton.addEventListener('input', function() {
        let value = parseInt(priceFlowerButton.value);
        let amount = parseFloat(document.getElementById('flowerWeight').textContent);
        let price = value * amount;

        document.getElementById('priceFlowerText').textContent = price.toLocaleString() + ' تومان';
    });

    priceColaleButton.addEventListener('input', function() {
        let value = parseInt(priceColaleButton.value);
        let amount = parseFloat(document.getElementById('colaleWeight').textContent);
        let price = value * amount;

        document.getElementById('priceColaleText').textContent = price.toLocaleString() + ' تومان';
    });

    priceSafraneButton.addEventListener('input', function() {
        let value = parseInt(priceSafraneButton.value);
        let amount = parseFloat(document.getElementById('safraneWeight').textContent);
        let price = value * amount;

        document.getElementById('priceSafraneText').textContent = price.toLocaleString() + ' تومان';
    });

});