('change', function() {
        const selectedValue = this.value;
        const url = new URL(window.location.href);
        
        if (selectedValue !== "default") {
            url.searchParams.set('sort', selectedValue);
        } else {
            url.searchParams.delete('sort');
        }
        
        window.location.href = url;
    });
</script>

<script>
    document.addEventListener('DOMContentLoaded', function () {
      const paginationLinks = document.querySelectorAll('.page-link');
      