diff --git a/frontend/application/components/FeaturedProducts.tsx b/frontend/application/components/FeaturedProducts.tsx index 0ff178f1..c6e59625 100644 --- a/frontend/application/components/FeaturedProducts.tsx +++ b/frontend/application/components/FeaturedProducts.tsx @@ -36,6 +36,11 @@ function ProductCard({ product, onClick }: { product: Product; key?: string | nu transition={{ duration: 0.5 }} className="group bg-white rounded-3xl border border-medical-gray-200 overflow-hidden hover:shadow-2xl hover:shadow-canina-blue/10 transition-all duration-500 flex flex-col h-full cursor-pointer relative" > + {/* Independent Category Tag at the absolute top-right of the card */} +
diff --git a/frontend/application/lib/services/productService.ts b/frontend/application/lib/services/productService.ts index aa2f3d39..2ffbd7aa 100644 --- a/frontend/application/lib/services/productService.ts +++ b/frontend/application/lib/services/productService.ts @@ -45,7 +45,7 @@ export class ProductService { name: data.name, scientificTagline: data.scientificTagline, description: data.description, - shortDescription: data.shortDescription, + shortDescription: data.shortDescription || (data.description ? (data.description.split(/[.।]/)[0].trim() + '.') : ''), price: data.priceDisplay || `${data.priceValue.toLocaleString('fa-IR')} تومان`, priceValue: Number(data.priceValue), category: data.category?.name || data.category || CATEGORY_SLUG_TO_NAME[data.categorySlug] || data.categorySlug || '',