window.addEventListener("load", function() {
// Check if 'brandSearch' element exists in the page
const input = document.getElementById("brandSearch");
if (input) { // Only run the script if the element exists on the page
input.addEventListener("keyup", function() {
const filter = input.value.toLowerCase();
const items = document.querySelectorAll("ul.pwb-row li");
items.forEach(function(item) {
const text = item.textContent.toLowerCase();
item.style.display = text.includes(filter) ? "block" : "none";
});
});
}
});