export interface Product {
  id: string
  seller_id: string
  name: string
  description: string
  batch: string
  expires_at: string // ISO date
  price_cents: number
  stock: number
  created_at: string
  updated_at: string
}

export interface ProductWithDistance extends Product {
  distance_km: number
  tenant_city: string
  tenant_state: string
}

export interface GroupedProduct {
  name: string
  description: string
  offers: ProductWithDistance[]
  minPriceCents: number
  offerCount: number
}

export interface ProductSearchFilters {
  search?: string
  min_price?: number
  max_price?: number
  max_distance?: number
  expires_before?: number
  category?: string
  min_expiry_days?: number
  exclude_seller_id?: string
  lat: number
  lng: number
  page?: number
  page_size?: number
}

export interface ProductSearchPage {
  products: ProductWithDistance[]
  total: number
  page: number
  page_size: number
}
