import React from "react";
import type { Product } from "../types";
import { ProductCard } from "./ProductCard";

export function ProductGrid({ items, basePath = "" }: { items: Product[]; basePath?: string }) {
  return (
    <div className="grid grid-cols-2 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4 md:gap-6">
      {items.map((p) => (
        <ProductCard key={p.id} item={p} basePath={basePath} />
      ))}
    </div>
  );
}


