1+ // src/pages/HomePage.jsx
2+ // Assembles all home section components and their connected images
3+
14import { useEffect , useState , useRef } from 'react' ;
2- import { useInView , motion } from 'framer-motion' ;
5+ import { useInView } from 'framer-motion' ;
36import HeroBanner from '../components/home/HeroBanner' ;
47import CategoryGrid from '../components/home/CategoryGrid' ;
58import FeaturedProducts from '../components/home/FeaturedProducts' ;
@@ -8,6 +11,7 @@ import BestSellers from '../components/home/BestSellers';
811import Testimonials from '../components/home/Testimonials' ;
912import CouponPopup from '../components/home/CouponPopup' ;
1013
14+ // Inline component so we don't create a new file
1115import { FiShoppingBag , FiUsers } from 'react-icons/fi' ;
1216
1317function StatsCounter ( ) {
@@ -40,69 +44,60 @@ function StatsCounter() {
4044 } , [ isInView ] ) ;
4145
4246 return (
43- < section ref = { ref } className = "py-24 relative overflow-hidden bg-slate-50/50" >
44- { /* Decorative blurred background elements for a modern glass feel */ }
45- < div className = "absolute top-0 left-1/2 -translate-x-1/2 w-full max-w-7xl h-full overflow-hidden opacity-60 pointer-events-none" >
46- < div className = "absolute -top-32 -left-32 w-96 h-96 rounded-full bg-indigo-200/50 blur-3xl" > </ div >
47- < div className = "absolute -bottom-32 -right-32 w-96 h-96 rounded-full bg-purple-200/50 blur-3xl" > </ div >
48- </ div >
49-
50- < div className = "container mx-auto px-6 relative z-10" >
51- < motion . div
52- initial = { { opacity : 0 , y : 30 } }
53- animate = { isInView ? { opacity : 1 , y : 0 } : { opacity : 0 , y : 30 } }
54- transition = { { duration : 0.8 , ease : "easeOut" } }
55- className = "flex flex-col md:flex-row justify-center items-center gap-16 md:gap-32 bg-white/70 backdrop-blur-2xl border border-white/50 shadow-2xl shadow-indigo-900/5 rounded-3xl p-12 md:p-16 max-w-5xl mx-auto"
56- >
57- { /* Products Stat */ }
58- < div className = "flex flex-col items-center text-center group" >
59- < div className = "w-20 h-20 mb-6 rounded-2xl bg-indigo-50 text-indigo-600 flex items-center justify-center transform group-hover:-translate-y-2 group-hover:shadow-lg group-hover:shadow-indigo-200 transition-all duration-300 border border-indigo-100" >
60- < FiShoppingBag size = { 32 } strokeWidth = { 1.5 } />
61- </ div >
62- < div className = "text-5xl md:text-7xl font-black tracking-tighter text-slate-900 mb-2 drop-shadow-sm" >
47+ < section ref = { ref } className = "stats-section py-16 my-8" >
48+ < div className = "container mx-auto px-4 flex flex-col sm:flex-row justify-center items-center gap-12 sm:gap-32 text-center" >
49+ < div >
50+ < div className = "flex items-center justify-center gap-3 mb-3" >
51+ < FiShoppingBag size = { 40 } style = { { color : 'var(--color-primary)' } } />
52+ < div className = "text-4xl md:text-6xl font-black tracking-tight" style = { { fontFamily : 'var(--font-space)' , color : 'var(--color-primary)' } } >
6353 { products } +
6454 </ div >
65- < div className = "text-xs md:text-sm font-bold uppercase tracking-[0.25em] text-slate-500" >
66- Premium Products
67- </ div >
6855 </ div >
69-
70- { /* Refined Divider */ }
71- < div className = "hidden md:block w-px h-32 bg-gradient-to-b from-transparent via-slate-200 to-transparent" > </ div >
72-
73- { /* Customers Stat */ }
74- < div className = "flex flex-col items-center text-center group" >
75- < div className = "w-20 h-20 mb-6 rounded-2xl bg-purple-50 text-purple-600 flex items-center justify-center transform group-hover:-translate-y-2 group-hover:shadow-lg group-hover:shadow-purple-200 transition-all duration-300 border border-purple-100" >
76- < FiUsers size = { 32 } strokeWidth = { 1.5 } />
77- </ div >
78- < div className = "text-5xl md:text-7xl font-black tracking-tighter text-slate-900 mb-2 drop-shadow-sm" >
56+ < div className = "text-sm md:text-base font-bold uppercase tracking-widest" style = { { color : 'var(--color-text-muted)' , fontFamily : 'var(--font-oswald)' } } >
57+ Products
58+ </ div >
59+ </ div >
60+ < div className = "hidden sm:block w-px h-24" style = { { backgroundColor : 'var(--color-border)' } } > </ div >
61+ < div >
62+ < div className = "flex items-center justify-center gap-4 mb-3" >
63+ < FiUsers size = { 44 } style = { { color : 'var(--color-primary)' } } />
64+ < div className = "text-4xl md:text-6xl font-black tracking-tight" style = { { fontFamily : 'var(--font-space)' , color : 'var(--color-primary)' } } >
7965 { customers . toLocaleString ( ) } +
8066 </ div >
81- < div className = "text-xs md:text-sm font-bold uppercase tracking-[0.25em] text-slate-500" >
82- Happy Customers
83- </ div >
8467 </ div >
85- </ motion . div >
68+ < div className = "text-sm md:text-base font-bold uppercase tracking-widest" style = { { color : 'var(--color-text-muted)' , fontFamily : 'var(--font-oswald)' } } >
69+ Happy Customers
70+ </ div >
71+ </ div >
8672 </ div >
8773 </ section >
8874 ) ;
8975}
9076
9177export default function HomePage ( ) {
9278 return (
93- < main className = "min-h-screen bg-white text-slate-900 selection:bg-indigo-100 selection:text-indigo-900" >
79+ < main >
9480 < CouponPopup />
95-
96- { /* Using space-y for consistent vertical rhythm while allowing full-bleed components */ }
97- < div className = "flex flex-col space-y-12 md:space-y-24 pb-24" >
98- < HeroBanner />
99- < CategoryGrid />
100- < FeaturedProducts />
101- < OfferBanner />
102- < BestSellers />
103- < StatsCounter />
104- < Testimonials />
105- </ div >
81+ { /* 1. Full-width hero carousel — hero-1 to hero-4.webp + hero-pattern-bg.svg */ }
82+ < HeroBanner />
83+
84+ { /* 2. Shop by Category — cat-men-formal, cat-men-outdoor, cat-women-formal, cat-women-outdoor .webp */ }
85+ < CategoryGrid />
86+
87+ { /* 3. New Arrivals — promo-new-arrivals.webp header + product images from allProducts (isNew: true) */ }
88+ < FeaturedProducts />
89+
90+ { /* 4. Mid-page offer strip — offer-strip.webp + india-delivery.svg */ }
91+ < OfferBanner />
92+
93+ { /* 5. Best Sellers horizontal scroll — promo-bestsellers.webp header + product images (isBestSeller: true) */ }
94+ < BestSellers />
95+
96+ { /* Animated Number Counter */ }
97+ < StatsCounter />
98+
99+ { /* 6. Testimonial user reviews */ }
100+ < Testimonials />
106101 </ main >
107102 ) ;
108103}
0 commit comments