import { Suspense } from 'react';
import Header from '@/components/shopify/header';
import Footer from '@/components/shopify/footer';
import SearchResults from '@/components/shopify/search-results';

export const metadata = {
  title: 'Search — Shop',
};

export default function Page() {
  return (
    <>
      <Header
        storeName="Shop"
        logoUrl=""
        links={[
          { label: 'Products', url: '/' },
          { label: 'Collections', url: '/collections' },
        ]}
      />

      {/* useSearchParams needs a Suspense boundary to prerender this route. */}
      <Suspense fallback={<div className="py-10" />}>
        <SearchResults />
      </Suspense>

      <Footer
        storeName="Shop"
        copyright="© 2026 Shop. All rights reserved."
      />
    </>
  );
}
