nt.key === "ArrowUp") {
            event.preventDefault();
            highlightedIndex = (highlightedIndex - 1 + items.length) % items.length;
            highlightItem(highlightedIndex);
        } else if (event.key === "Enter" && highlightedIndex >= 0) {
            event.preventDefault();
            items[highlightedIndex].click();
        }
    });

    // Hide suggestions when clicking outside
    document.addEventListener("click", (event) => {
        if (!searchBar.contains(event.target) && !autoc