修改後
const keyword = search.value.trim().toLowerCase();
return products.filter((product) => {
const matchesKeyword = product.name.toLowerCase().includes(keyword);
const matchesPrice = priceFilter.value === "all" || (priceFilter.value === "under-200" ? product.price < 200 : product.price >= 200);
return matchesKeyword && matchesPrice;
});