import { Link } from '@/core/lib/navigation';

/**
 * 404 page — rendered for unknown URLs and for `notFound()` calls from
 * product/category/blog pages (deleted products, renamed slugs). A branded
 * 404 with a path back to the catalog keeps the visitor (and their SEO
 * equity) on the site instead of bouncing off the framework default.
 */
export default function NotFound() {
  return (
    <div className="mx-auto flex max-w-2xl flex-col items-center justify-center px-4 py-24 text-center">
      <p className="text-sm font-medium text-muted-foreground">404</p>
      <h1 className="mt-2 text-3xl font-bold tracking-tight text-foreground sm:text-4xl">
        <%- language === 'he' ? 'העמוד לא נמצא' : 'Page not found' %>
      </h1>
      <p className="mt-4 text-muted-foreground">
        <%- language === 'he' ? 'יכול להיות שהעמוד הוסר או שהכתובת השתנתה.' : 'The page may have been removed, or the address may have changed.' %>
      </p>
      <div className="mt-8 flex gap-4">
        <Link
          href="/"
          className="rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:opacity-90"
        >
          <%- language === 'he' ? 'לדף הבית' : 'Go home' %>
        </Link>
        <Link
          href="/products"
          className="rounded-md border border-border px-4 py-2 text-sm font-medium text-foreground hover:bg-muted"
        >
          <%- language === 'he' ? 'לכל המוצרים' : 'Browse products' %>
        </Link>
      </div>
    </div>
  );
}
