export function searchProducts(products, query) {
  if (!query) return [];
  const lowerQuery = query.toLowerCase();
  return products.filter((product) => product.title.toLowerCase().includes(lowerQuery) || product.types.toLowerCase().includes(lowerQuery) || product.brand.toLowerCase().includes(lowerQuery) || (product.description && product.description.toLowerCase().includes(lowerQuery)));
}
