y
                if (searchTerm && searchTerm.trim() !== '') {
                    addToSearchHistory(searchTerm);
                }

                // First filter by catalog type
                let initialDatasets = datasets;
                if (activeCatalogFilter === 'main') {
                    initialDatasets = mainCatalogDatasets;
                } else if (activeCatalogFilter === 'community') {
                    initialDatasets = communityCatalogDatasets;
                }

                // 