diff --git a/src/components/FeaturedProducts.tsx b/src/components/FeaturedProducts.tsx index f6831fb..90ed310 100644 --- a/src/components/FeaturedProducts.tsx +++ b/src/components/FeaturedProducts.tsx @@ -1,21 +1,85 @@ import { products } from '@/data/products'; -import { ProductCard } from '@/components/ProductCard'; import { Button } from '@/components/ui/button'; import { Link } from 'react-router-dom'; -import { ArrowRight } from 'lucide-react'; +import { ArrowRight, ChevronLeft, ChevronRight } from 'lucide-react'; +import { useCart } from '@/context/CartContext'; +import { + Carousel, + CarouselContent, + CarouselItem, + CarouselNext, + CarouselPrevious, +} from '@/components/ui/carousel'; -// Get featured products (those with badges or first 6) +// Get featured products (those with badges or first 8) const featuredProducts = products .filter(p => p.badge === 'hot' || p.badge === 'new') - .slice(0, 6); + .slice(0, 8); export function FeaturedProducts() { + const { addItem } = useCart(); + return (
-
- {featuredProducts.map((product) => ( - - ))} + + + {featuredProducts.map((product) => ( + +
+ {/* Badge */} + {product.badge && ( +
+ {product.badge} +
+ )} + + {/* Image */} +
+ {product.name} +
+ + {/* Content */} +
+

+ {product.brand} +

+

+ {product.name} +

+ + +
+
+
+ ))} +
+ + +
+ + {/* Mobile scroll indicator */} +
+ ← Swipe to see more →