interface CheckoutSingleItemProps {
  thumb_src: string;
  thumb_alt: string;
  title: string;
  color?: string;
  size?: string;
  price: number;
}

export default function CheckoutSingleItem({ thumb_src, thumb_alt, title, color, size, price }: CheckoutSingleItemProps) {
  return (
    <div className="flex gap-4 py-4 border-b">
      <img
        src={thumb_src}
        alt={thumb_alt}
        className="w-20 h-20 object-cover rounded-lg"
      />
      <div className="flex-1">
        <h4 className="font-medium">{title}</h4>
        {(color || size) && (
          <p className="text-sm text-gray-500">
            {[color, size].filter(Boolean).join(' / ')}
          </p>
        )}
        <p className="font-bold mt-1">฿{price.toLocaleString()}</p>
      </div>
    </div>
  );
}