manish-code's picture
Initial DeepSite commit
f0e01c8 verified
Raw History Blame Contribute Delete
67.4 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Meesho - Lowest Prices, Best Deals</title>
==============cdn.tailwindcss.com"></script>
<script src="https:// ============ PROFILE DROPDOWN ============
function toggleProfileDropdown(event) {
event.stopPropagation();
const menu = document.getElementById('profileMenu');
const isOpen = menu.classList.contains('opacity-100');
if (isOpen) {
menu.classList.remove('opacity-100', 'visible');
menu.classList.add('opacity-0', 'invisible');
} else {
menu.classList.remove('opacity-0', 'invisible');
menu.classList.add('opacity-100', 'visible');
}
}
document.addEventListener('click', function(e) {
const dropdown = document.getElementById('profileDropdown');
const menu = document.getElementById('profileMenu');
if (dropdown && !dropdown.contains(e.target)) {
menu.classList.remove('opacity-100', 'visible');
menu.classList.add('opacity-0', 'invisible');
}
});
// ============ INIT ============unpkg.com/lucide@latest"></script>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
<script>
tailwind.config = {
theme: {
extend: {
colors: {
meesho: '#570057',
meeshoLight: '#7a007a',
meeshoDark: '#3e003e',
meeshoPink: '#f43397',
meeshoOrange: '#ff6b00',
meeshoGreen: '#00b853',
meeshoBg: '#f1f3f6',
},
fontFamily: {
poppins: ['Poppins', 'sans-serif'],
}
}
}
}
</script>
<style>
* { font-family: 'Poppins', sans-serif; }
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.banner-slide { transition: opacity 0.5s ease-in-out; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0,0,0,0.15); }
.product-card { transition: all 0.3s ease; }
.category-item:hover { transform: scale(1.05); }
.category-item { transition: all 0.2s ease; }
.deal-timer { animation: pulse 1s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.6s ease forwards; }
.nav-link:hover::after { width: 100%; }
.nav-link::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px; background: #570057; transition: width 0.3s; }
</style>
</head>
<body class="bg-meeshoBg min-h-screen">
<!-- Top Bar -->
<div class="bg-meesho text-white text-xs py-1.5 text-center">
<span>🎉 Mega Sale is LIVE! Up to 70% OFF on all categories | Free Delivery on orders above ₹499</span>
</div>
<!-- Header -->
<header class="bg-white sticky top-0 z-50 shadow-md">
<div class="max-w-7xl mx-auto px-4">
<div class="flex items-center justify-between h-16">
<!-- Logo -->
<div class="flex items-center gap-2 shrink-0">
<div class="text-meesho font-extrabold text-2xl tracking-tight flex items-center gap-1">
<svg width="28" height="28" viewBox="0 0 40 40" fill="none">
<circle cx="20" cy="20" r="18" fill="#570057"/>
<text x="10" y="27" fill="white" font-size="18" font-weight="bold">M</text>
</svg>
Meesho
</div>
</div>
<!-- Search Bar -->
<div class="flex-1 max-w-2xl mx-4 hidden md:block">
<div class="relative">
<input type="text" id="searchInput" placeholder="Try Saree, Kurti or Search by Product Code"
class="w-full bg-gray-50 border border-gray-200 rounded-lg py-2.5 pl-11 pr-4 text-sm focus:outline-none focus:border-meesho focus:bg-white transition-all">
<i data-lucide="search" class="absolute left-3.5 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"></i>
</div>
</div>
<!-- Right Actions -->
<div class="flex items-center gap-1 sm:gap-3">
<button class="md:hidden p-2 hover:bg-gray-100 rounded-full" onclick="toggleMobileSearch()">
<i data-lucide="search" class="w-5 h-5 text-gray-600"></i>
</button>
<div class="hidden sm:flex items-center gap-1 cursor-pointer hover:bg-gray-50 rounded-lg px-3 py-2">
<i data-lucide="download" class="w-4 h-4 text-gray-600"></i>
<span class="text-xs font-medium text-gray-700">App</span>
</div>
<div class="relative" id="profileDropdown">
<button class="flex items-center gap-1 hover:bg-gray-50 rounded-lg px-3 py-2" onclick="toggleProfileDropdown(event)">
<i data-lucide="user" class="w-5 h-5 text-gray-600"></i>
<span class="text-xs font-medium text-gray-700 hidden lg:block">Profile</span>
<i data-lucide="chevron-down" class="w-3 h-3 text-gray-500 hidden lg:block" id="profileChevron"></i>
</button>
<div id="profileMenu" class="absolute right-0 top-full mt-1 bg-white rounded-xl shadow-xl border border-gray-100 py-2 w-56 opacity-0 invisible transition-all duration-200 z-50">
<div class="px-4 py-3 border-b border-gray-100">
<p class="text-sm font-semibold text-gray-800">Welcome!</p>
<p class="text-xs text-gray-500">Login to access your account</p>
</div>
<a href="#" class="flex items-center gap-3 px-4 py-2.5 hover:bg-gray-50 text-sm text-gray-700">
<i data-lucide="user" class="w-4 h-4"></i> My Account
</a>
<a href="#" class="flex items-center gap-3 px-4 py-2.5 hover:bg-gray-50 text-sm text-gray-700">
<i data-lucide="package" class="w-4 h-4"></i> My Orders
</a>
<a href="#" class="flex items-center gap-3 px-4 py-2.5 hover:bg-gray-50 text-sm text-gray-700">
<i data-lucide="heart" class="w-4 h-4"></i> Wishlist
</a>
<a href="#" class="flex items-center gap-3 px-4 py-2.5 hover:bg-gray-50 text-sm text-gray-700">
<i data-lucide="gift" class="w-4 h-4"></i> Rewards
</a>
</div>
</div>
<button class="flex items-center gap-1 hover:bg-gray-50 rounded-lg px-3 py-2 relative">
<i data-lucide="shopping-cart" class="w-5 h-5 text-gray-600"></i>
<span class="text-xs font-medium text-gray-700 hidden lg:block">Cart</span>
<span id="cartCount" class="absolute -top-0.5 right-0.5 bg-meeshoPink text-white text-[10px] font-bold w-4.5 h-4.5 rounded-full flex items-center justify-center min-w-[18px] h-[18px]">0</span>
</button>
</div>
</div>
<!-- Mobile Search (Hidden by default) -->
<div id="mobileSearch" class="hidden pb-3 md:hidden">
<div class="relative">
<input type="text" placeholder="Search products..."
class="w-full bg-gray-50 border border-gray-200 rounded-lg py-2.5 pl-11 pr-4 text-sm focus:outline-none focus:border-meesho">
<i data-lucide="search" class="absolute left-3.5 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"></i>
</div>
</div>
</div>
<!-- Category Nav -->
<div class="border-t border-gray-100 bg-white">
<div class="max-w-7xl mx-auto px-4">
<div class="flex items-center gap-6 overflow-x-auto hide-scrollbar py-2.5">
<a href="#" class="nav-link relative text-xs font-medium text-gray-700 hover:text-meesho whitespace-nowrap transition-colors">Women Ethnic</a>
<a href="#" class="nav-link relative text-xs font-medium text-gray-700 hover:text-meesho whitespace-nowrap transition-colors">Women Western</a>
<a href="#" class="nav-link relative text-xs font-medium text-gray-700 hover:text-meesho whitespace-nowrap transition-colors">Men</a>
<a href="#" class="nav-link relative text-xs font-medium text-gray-700 hover:text-meesho whitespace-nowrap transition-colors">Kids</a>
<a href="#" class="nav-link relative text-xs font-medium text-gray-700 hover:text-meesho whitespace-nowrap transition-colors">Home & Kitchen</a>
<a href="#" class="nav-link relative text-xs font-medium text-gray-700 hover:text-meesho whitespace-nowrap transition-colors">Beauty & Health</a>
<a href="#" class="nav-link relative text-xs font-medium text-gray-700 hover:text-meesho whitespace-nowrap transition-colors">Jewellery & Accessories</a>
<a href="#" class="nav-link relative text-xs font-medium text-gray-700 hover:text-meesho whitespace-nowrap transition-colors">Bags & Footwear</a>
<a href="#" class="nav-link relative text-xs font-medium text-gray-700 hover:text-meesho whitespace-nowrap transition-colors">Electronics</a>
</div>
</div>
</div>
</header>
<!-- Hero Banner Carousel -->
<section class="max-w-7xl mx-auto px-4 mt-4">
<div class="relative rounded-2xl overflow-hidden bg-gradient-to-r from-meesho via-meeshoLight to-meeshoPink h-48 sm:h-64 md:h-80">
<div id="bannerCarousel" class="relative w-full h-full">
<div class="banner-slide absolute inset-0 flex items-center" data-slide="0">
<div class="flex flex-col md:flex-row items-center w-full h-full">
<div class="flex-1 px-6 md:px-12 text-white">
<span class="inline-block bg-yellow-400 text-meeshoDark text-xs font-bold px-3 py-1 rounded-full mb-3">MEGA SALE</span>
<h2 class="text-2xl sm:text-3xl md:text-5xl font-extrabold leading-tight mb-2">Up to 70% OFF</h2>
<p class="text-sm sm:text-base opacity-90 mb-4">On Lakhs of Products | Free Delivery</p>
<button class="bg-white text-meesho font-semibold px-6 py-2.5 rounded-lg text-sm hover:bg-gray-100 transition-colors">Shop Now</button>
</div>
<div class="hidden md:block flex-1 h-full relative">
<img src="http://static.photos/fashion/640x360/1" alt="Sale" class="h-full w-full object-cover opacity-60 rounded-r-2xl">
</div>
</div>
</div>
<div class="banner-slide absolute inset-0 flex items-center opacity-0" data-slide="1">
<div class="flex flex-col md:flex-row items-center w-full h-full">
<div class="flex-1 px-6 md:px-12 text-white">
<span class="inline-block bg-meeshoGreen text-white text-xs font-bold px-3 py-1 rounded-full mb-3">NEW ARRIVALS</span>
<h2 class="text-2xl sm:text-3xl md:text-5xl font-extrabold leading-tight mb-2">Stylish Kurtis</h2>
<p class="text-sm sm:text-base opacity-90 mb-4">Starting from ₹199 | Trending Designs</p>
<button class="bg-white text-meesho font-semibold px-6 py-2.5 rounded-lg text-sm hover:bg-gray-100 transition-colors">Explore Now</button>
</div>
<div class="hidden md:block flex-1 h-full relative">
<img src="http://static.photos/cosmetic/640x360/2" alt="Kurtis" class="h-full w-full object-cover opacity-60 rounded-r-2xl">
</div>
</div>
</div>
<div class="banner-slide absolute inset-0 flex items-center opacity-0" data-slide="2">
<div class="flex flex-col md:flex-row items-center w-full h-full">
<div class="flex-1 px-6 md:px-12 text-white">
<span class="inline-block bg-meeshoOrange text-white text-xs font-bold px-3 py-1 rounded-full mb-3">TOP DEALS</span>
<h2 class="text-2xl sm:text-3xl md:text-5xl font-extrabold leading-tight mb-2">Electronics Sale</h2>
<p class="text-sm sm:text-base opacity-90 mb-4">Smartphones, Accessories & More</p>
<button class="bg-white text-meesho font-semibold px-6 py-2.5 rounded-lg text-sm hover:bg-gray-100 transition-colors">Grab Deals</button>
</div>
<div class="hidden md:block flex-1 h-full relative">
<img src="http://static.photos/technology/640x360/3" alt="Electronics" class="h-full w-full object-cover opacity-60 rounded-r-2xl">
</div>
</div>
</div>
</div>
<!-- Carousel Controls -->
<button onclick="changeSlide(-1)" class="absolute left-3 top-1/2 -translate-y-1/2 bg-white/80 hover:bg-white p-2 rounded-full shadow-lg transition-colors">
<i data-lucide="chevron-left" class="w-4 h-4 text-gray-700"></i>
</button>
<button onclick="changeSlide(1)" class="absolute right-3 top-1/2 -translate-y-1/2 bg-white/80 hover:bg-white p-2 rounded-full shadow-lg transition-colors">
<i data-lucide="chevron-right" class="w-4 h-4 text-gray-700"></i>
</button>
<!-- Dots -->
<div class="absolute bottom-3 left-1/2 -translate-x-1/2 flex gap-2">
<button onclick="goToSlide(0)" class="carousel-dot w-2.5 h-2.5 rounded-full bg-white transition-all"></button>
<button onclick="goToSlide(1)" class="carousel-dot w-2.5 h-2.5 rounded-full bg-white/50 transition-all"></button>
<button onclick="goToSlide(2)" class="carousel-dot w-2.5 h-2.5 rounded-full bg-white/50 transition-all"></button>
</div>
</div>
</section>
<!-- Top Categories -->
<section class="max-w-7xl mx-auto px-4 mt-8">
<div class="flex items-center justify-between mb-5">
<h2 class="text-xl sm:text-2xl font-bold text-gray-800">Shop by Category</h2>
<a href="#" class="text-meeshoPink text-sm font-semibold hover:underline">View All</a>
</div>
<div class="grid grid-cols-3 sm:grid-cols-4 md:grid-cols-6 lg:grid-cols-8 gap-3 sm:gap-4">
<div class="category-item flex flex-col items-center cursor-pointer" onclick="filterByCategory('women')">
<div class="w-16 h-16 sm:w-20 sm:h-20 rounded-full bg-pink-50 flex items-center justify-center border-2 border-pink-100 hover:border-meeshoPink transition-colors overflow-hidden">
<img src="http://static.photos/cosmetic/200x200/10" class="w-full h-full object-cover" alt="Women">
</div>
<span class="text-[10px] sm:text-xs font-medium text-gray-700 mt-2 text-center">Women</span>
</div>
<div class="category-item flex flex-col items-center cursor-pointer" onclick="filterByCategory('men')">
<div class="w-16 h-16 sm:w-20 sm:h-20 rounded-full bg-blue-50 flex items-center justify-center border-2 border-blue-100 hover:border-blue-400 transition-colors overflow-hidden">
<img src="http://static.photos/people/200x200/11" class="w-full h-full object-cover" alt="Men">
</div>
<span class="text-[10px] sm:text-xs font-medium text-gray-700 mt-2 text-center">Men</span>
</div>
<div class="category-item flex flex-col items-center cursor-pointer" onclick="filterByCategory('kids')">
<div class="w-16 h-16 sm:w-20 sm:h-20 rounded-full bg-yellow-50 flex items-center justify-center border-2 border-yellow-100 hover:border-yellow-400 transition-colors overflow-hidden">
<img src="http://static.photos/education/200x200/12" class="w-full h-full object-cover" alt="Kids">
</div>
<span class="text-[10px] sm:text-xs font-medium text-gray-700 mt-2 text-center">Kids</span>
</div>
<div class="category-item flex flex-col items-center cursor-pointer" onclick="filterByCategory('electronics')">
<div class="w-16 h-16 sm:w-20 sm:h-20 rounded-full bg-purple-50 flex items-center justify-center border-2 border-purple-100 hover:border-purple-400 transition-colors overflow-hidden">
<img src="http://static.photos/technology/200x200/13" class="w-full h-full object-cover" alt="Electronics">
</div>
<span class="text-[10px] sm:text-xs font-medium text-gray-700 mt-2 text-center">Electronics</span>
</div>
<div class="category-item flex flex-col items-center cursor-pointer" onclick="filterByCategory('home')">
<div class="w-16 h-16 sm:w-20 sm:h-20 rounded-full bg-green-50 flex items-center justify-center border-2 border-green-100 hover:border-green-400 transition-colors overflow-hidden">
<img src="http://static.photos/indoor/200x200/14" class="w-full h-full object-cover" alt="Home">
</div>
<span class="text-[10px] sm:text-xs font-medium text-gray-700 mt-2 text-center">Home</span>
</div>
<div class="category-item flex flex-col items-center cursor-pointer" onclick="filterByCategory('beauty')">
<div class="w-16 h-16 sm:w-20 sm:h-20 rounded-full bg-red-50 flex items-center justify-center border-2 border-red-100 hover:border-red-400 transition-colors overflow-hidden">
<img src="http://static.photos/cosmetic/200x200/15" class="w-full h-full object-cover" alt="Beauty">
</div>
<span class="text-[10px] sm:text-xs font-medium text-gray-700 mt-2 text-center">Beauty</span>
</div>
<div class="category-item flex flex-col items-center cursor-pointer" onclick="filterByCategory('footwear')">
<div class="w-16 h-16 sm:w-20 sm:h-20 rounded-full bg-orange-50 flex items-center justify-center border-2 border-orange-100 hover:border-orange-400 transition-colors overflow-hidden">
<img src="http://static.photos/fashion/200x200/16" class="w-full h-full object-cover" alt="Footwear">
</div>
<span class="text-[10px] sm:text-xs font-medium text-gray-700 mt-2 text-center">Footwear</span>
</div>
<div class="category-item flex flex-col items-center cursor-pointer" onclick="filterByCategory('jewellery')">
<div class="w-16 h-16 sm:w-20 sm:h-20 rounded-full bg-amber-50 flex items-center justify-center border-2 border-amber-100 hover:border-amber-400 transition-colors overflow-hidden">
<img src="http://static.photos/vintage/200x200/17" class="w-full h-full object-cover" alt="Jewellery">
</div>
<span class="text-[10px] sm:text-xs font-medium text-gray-700 mt-2 text-center">Jewellery</span>
</div>
</div>
</section>
<!-- Deal of the Day -->
<section class="max-w-7xl mx-auto px-4 mt-10">
<div class="bg-gradient-to-r from-meesho via-purple-700 to-meeshoPink rounded-2xl p-5 sm:p-8">
<div class="flex flex-col sm:flex-row items-start sm:items-center justify-between mb-6 gap-3">
<div>
<h2 class="text-xl sm:text-2xl font-bold text-white flex items-center gap-2">
<i data-lucide="zap" class="w-6 h-6 text-yellow-400"></i>
Deal of the Day
</h2>
<p class="text-white/70 text-sm mt-1">Limited time offers on top products</p>
</div>
<div class="flex items-center gap-2">
<span class="text-white/80 text-sm">Ends in:</span>
<div class="flex items-center gap-1.5">
<span id="hours" class="bg-white text-meesho font-bold text-sm px-2.5 py-1 rounded-md">08</span>
<span class="text-white font-bold">:</span>
<span id="minutes" class="bg-white text-meesho font-bold text-sm px-2.5 py-1 rounded-md">45</span>
<span class="text-white font-bold">:</span>
<span id="seconds" class="bg-white text-meesho font-bold text-sm px-2.5 py-1 rounded-md deal-timer">30</span>
</div>
</div>
</div>
<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-3 sm:gap-4">
<div class="bg-white rounded-xl overflow-hidden cursor-pointer product-card" onclick="addToCart(1)">
<div class="relative">
<img src="http://static.photos/fashion/320x240/20" class="w-full h-32 sm:h-40 object-cover" alt="Product">
<span class="absolute top-2 left-2 bg-meeshoPink text-white text-[10px] font-bold px-2 py-0.5 rounded">70% OFF</span>
<button class="absolute top-2 right-2 bg-white/80 p-1.5 rounded-full hover:bg-white" onclick="event.stopPropagation(); toggleWishlist(this)">
<i data-lucide="heart" class="w-3.5 h-3.5 text-gray-500"></i>
</button>
</div>
<div class="p-3">
<p class="text-xs text-gray-500 truncate">Embroidered Kurti</p>
<div class="flex items-center gap-2 mt-1">
<span class="text-sm font-bold text-gray-900">₹249</span>
<span class="text-xs text-gray-400 line-through">₹849</span>
</div>
<div class="flex items-center gap-1 mt-1">
<div class="flex">
<i data-lucide="star" class="w-3 h-3 text-yellow-400 fill-yellow-400"></i>
<i data-lucide="star" class="w-3 h-3 text-yellow-400 fill-yellow-400"></i>
<i data-lucide="star" class="w-3 h-3 text-yellow-400 fill-yellow-400"></i>
<i data-lucide="star" class="w-3 h-3 text-yellow-400 fill-yellow-400"></i>
<i data-lucide="star" class="w-3 h-3 text-gray-300"></i>
</div>
<span class="text-[10px] text-gray-400">(1.2k)</span>
</div>
</div>
</div>
<div class="bg-white rounded-xl overflow-hidden cursor-pointer product-card" onclick="addToCart(2)">
<div class="relative">
<img src="http://static.photos/technology/320x240/21" class="w-full h-32 sm:h-40 object-cover" alt="Product">
<span class="absolute top-2 left-2 bg-meeshoOrange text-white text-[10px] font-bold px-2 py-0.5 rounded">55% OFF</span>
<button class="absolute top-2 right-2 bg-white/80 p-1.5 rounded-full hover:bg-white" onclick="event.stopPropagation(); toggleWishlist(this)">
<i data-lucide="heart" class="w-3.5 h-3.5 text-gray-500"></i>
</button>
</div>
<div class="p-3">
<p class="text-xs text-gray-500 truncate">Wireless Earbuds Pro</p>
<div class="flex items-center gap-2 mt-1">
<span class="text-sm font-bold text-gray-900">₹499</span>
<span class="text-xs text-gray-400 line-through">₹1,099</span>
</div>
<div class="flex items-center gap-1 mt-1">
<div class="flex">
<i data-lucide="star" class="w-3 h-3 text-yellow-400 fill-yellow-400"></i>
<i data-lucide="star" class="w-3 h-3 text-yellow-400 fill-yellow-400"></i>
<i data-lucide="star" class="w-3 h-3 text-yellow-400 fill-yellow-400"></i>
<i data-lucide="star" class="w-3 h-3 text-yellow-400 fill-yellow-400"></i>
<i data-lucide="star" class="w-3 h-3 text-yellow-400 fill-yellow-400"></i>
</div>
<span class="text-[10px] text-gray-400">(3.5k)</span>
</div>
</div>
</div>
<div class="bg-white rounded-xl overflow-hidden cursor-pointer product-card" onclick="addToCart(3)">
<div class="relative">
<img src="http://static.photos/indoor/320x240/22" class="w-full h-32 sm:h-40 object-cover" alt="Product">
<span class="absolute top-2 left-2 bg-meeshoGreen text-white text-[10px] font-bold px-2 py-0.5 rounded">40% OFF</span>
<button class="absolute top-2 right-2 bg-white/80 p-1.5 rounded-full hover:bg-white" onclick="event.stopPropagation(); toggleWishlist(this)">
<i data-lucide="heart" class="w-3.5 h-3.5 text-gray-500"></i>
</button>
</div>
<div class="p-3">
<p class="text-xs text-gray-500 truncate">Home Decor Set</p>
<div class="flex items-center gap-2 mt-1">
<span class="text-sm font-bold text-gray-900">₹349</span>
<span class="text-xs text-gray-400 line-through">₹599</span>
</div>
<div class="flex items-center gap-1 mt-1">
<div class="flex">
<i data-lucide="star" class="w-3 h-3 text-yellow-400 fill-yellow-400"></i>
<i data-lucide="star" class="w-3 h-3 text-yellow-400 fill-yellow-400"></i>
<i data-lucide="star" class="w-3 h-3 text-yellow-400 fill-yellow-400"></i>
<i data-lucide="star" class="w-3 h-3 text-yellow-400 fill-yellow-400"></i>
<i data-lucide="star" class="w-3 h-3 text-gray-300"></i>
</div>
<span class="text-[10px] text-gray-400">(856)</span>
</div>
</div>
</div>
<div class="bg-white rounded-xl overflow-hidden cursor-pointer product-card hidden sm:block" onclick="addToCart(4)">
<div class="relative">
<img src="http://static.photos/vintage/320x240/23" class="w-full h-32 sm:h-40 object-cover" alt="Product">
<span class="absolute top-2 left-2 bg-meeshoPink text-white text-[10px] font-bold px-2 py-0.5 rounded">65% OFF</span>
<button class="absolute top-2 right-2 bg-white/80 p-1.5 rounded-full hover:bg-white" onclick="event.stopPropagation(); toggleWishlist(this)">
<i data-lucide="heart" class="w-3.5 h-3.5 text-gray-500"></i>
</button>
</div>
<div class="p-3">
<p class="text-xs text-gray-500 truncate">Oxidised Necklace Set</p>
<div class="flex items-center gap-2 mt-1">
<span class="text-sm font-bold text-gray-900">₹179</span>
<span class="text-xs text-gray-400 line-through">₹499</span>
</div>
<div class="flex items-center gap-1 mt-1">
<div class="flex">
<i data-lucide="star" class="w-3 h-3 text-yellow-400 fill-yellow-400"></i>
<i data-lucide="star" class="w-3 h-3 text-yellow-400 fill-yellow-400"></i>
<i data-lucide="star" class="w-3 h-3 text-yellow-400 fill-yellow-400"></i>
<i data-lucide="star" class="w-3 h-3 text-gray-300"></i>
<i data-lucide="star" class="w-3 h-3 text-gray-300"></i>
</div>
<span class="text-[10px] text-gray-400">(2.1k)</span>
</div>
</div>
</div>
<div class="bg-white rounded-xl overflow-hidden cursor-pointer product-card hidden lg:block" onclick="addToCart(5)">
<div class="relative">
<img src="http://static.photos/cosmetic/320x240/24" class="w-full h-32 sm:h-40 object-cover" alt="Product">
<span class="absolute top-2 left-2 bg-meeshoOrange text-white text-[10px] font-bold px-2 py-0.5 rounded">50% OFF</span>
<button class="absolute top-2 right-2 bg-white/80 p-1.5 rounded-full hover:bg-white" onclick="event.stopPropagation(); toggleWishlist(this)">
<i data-lucide="heart" class="w-3.5 h-3.5 text-gray-500"></i>
</button>
</div>
<div class="p-3">
<p class="text-xs text-gray-500 truncate">Makeup Kit Combo</p>
<div class="flex items-center gap-2 mt-1">
<span class="text-sm font-bold text-gray-900">₹299</span>
<span class="text-xs text-gray-400 line-through">₹599</span>
</div>
<div class="flex items-center gap-1 mt-1">
<div class="flex">
<i data-lucide="star" class="w-3 h-3 text-yellow-400 fill-yellow-400"></i>
<i data-lucide="star" class="w-3 h-3 text-yellow-400 fill-yellow-400"></i>
<i data-lucide="star" class="w-3 h-3 text-yellow-400 fill-yellow-400"></i>
<i data-lucide="star" class="w-3 h-3 text-yellow-400 fill-yellow-400"></i>
<i data-lucide="star" class="w-3 h-3 text-gray-300"></i>
</div>
<span class="text-[10px] text-gray-400">(4.7k)</span>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Promo Strip -->
<section class="max-w-7xl mx-auto px-4 mt-8">
<div class="grid grid-cols-1 sm:grid-cols-3 gap-4">
<div class="bg-gradient-to-r from-pink-50 to-pink-100 rounded-xl p-4 sm:p-5 flex items-center gap-4 cursor-pointer hover:shadow-md transition-shadow">
<div class="bg-white p-3 rounded-xl shadow-sm">
<i data-lucide="truck" class="w-6 h-6 text-meeshoPink"></i>
</div>
<div>
<p class="font-semibold text-sm text-gray-800">Free Delivery</p>
<p class="text-xs text-gray-500">On orders above ₹499</p>
</div>
</div>
<div class="bg-gradient-to-r from-green-50 to-green-100 rounded-xl p-4 sm:p-5 flex items-center gap-4 cursor-pointer hover:shadow-md transition-shadow">
<div class="bg-white p-3 rounded-xl shadow-sm">
<i data-lucide="rotate-ccw" class="w-6 h-6 text-meeshoGreen"></i>
</div>
<div>
<p class="font-semibold text-sm text-gray-800">Easy Returns</p>
<p class="text-xs text-gray-500">7-day return policy</p>
</div>
</div>
<div class="bg-gradient-to-r from-purple-50 to-purple-100 rounded-xl p-4 sm:p-5 flex items-center gap-4 cursor-pointer hover:shadow-md transition-shadow">
<div class="bg-white p-3 rounded-xl shadow-sm">
<i data-lucide="shield-check" class="w-6 h-6 text-meesho"></i>
</div>
<div>
<p class="font-semibold text-sm text-gray-800">Secure Payment</p>
<p class="text-xs text-gray-500">100% protected payments</p>
</div>
</div>
</div>
</section>
<!-- Products Grid -->
<section class="max-w-7xl mx-auto px-4 mt-10">
<div class="flex items-center justify-between mb-5">
<div>
<h2 class="text-xl sm:text-2xl font-bold text-gray-800">Products For You</h2>
<p class="text-xs text-gray-500 mt-0.5">Based on your interests</p>
</div>
<div class="flex items-center gap-2">
<button class="filter-btn active bg-meesho text-white text-xs font-medium px-3 py-1.5 rounded-full" onclick="filterProducts('all', this)">All</button>
<button class="filter-btn bg-gray-100 text-gray-600 text-xs font-medium px-3 py-1.5 rounded-full hover:bg-gray-200" onclick="filterProducts('women', this)">Women</button>
<button class="filter-btn bg-gray-100 text-gray-600 text-xs font-medium px-3 py-1.5 rounded-full hover:bg-gray-200 hidden sm:block" onclick="filterProducts('men', this)">Men</button>
<button class="filter-btn bg-gray-100 text-gray-600 text-xs font-medium px-3 py-1.5 rounded-full hover:bg-gray-200 hidden sm:block" onclick="filterProducts('electronics', this)">Electronics</button>
</div>
</div>
<div id="productsGrid" class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-3 sm:gap-4">
<!-- Products will be dynamically injected -->
</div>
<div class="text-center mt-8">
<button id="loadMoreBtn" onclick="loadMoreProducts()" class="bg-meesho hover:bg-meeshoDark text-white font-semibold px-8 py-3 rounded-lg text-sm transition-colors">
Load More Products
</button>
</div>
</section>
<!-- Top Brands -->
<section class="max-w-7xl mx-auto px-4 mt-10">
<h2 class="text-xl sm:text-2xl font-bold text-gray-800 mb-5">Top Brands</h2>
<div class="flex gap-4 overflow-x-auto hide-scrollbar pb-2">
<div class="min-w-[140px] sm:min-w-[160px] bg-white rounded-xl p-4 flex flex-col items-center cursor-pointer hover:shadow-lg transition-shadow">
<div class="w-16 h-16 rounded-full bg-gradient-to-br from-pink-200 to-pink-400 flex items-center justify-center mb-3">
<span class="text-white font-bold text-lg">A</span>
</div>
<p class="text-sm font-semibold text-gray-800">Anouk</p>
<p class="text-[10px] text-meeshoPink font-medium">Min 40% Off</p>
</div>
<div class="min-w-[140px] sm:min-w-[160px] bg-white rounded-xl p-4 flex flex-col items-center cursor-pointer hover:shadow-lg transition-shadow">
<div class="w-16 h-16 rounded-full bg-gradient-to-br from-blue-200 to-blue-400 flex items-center justify-center mb-3">
<span class="text-white font-bold text-lg">S</span>
</div>
<p class="text-sm font-semibold text-gray-800">SASSAFRAS</p>
<p class="text-[10px] text-meeshoPink font-medium">Min 50% Off</p>
</div>
<div class="min-w-[140px] sm:min-w-[160px] bg-white rounded-xl p-4 flex flex-col items-center cursor-pointer hover:shadow-lg transition-shadow">
<div class="w-16 h-16 rounded-full bg-gradient-to-br from-purple-200 to-purple-400 flex items-center justify-center mb-3">
<span class="text-white font-bold text-lg">M</span>
</div>
<p class="text-sm font-semibold text-gray-800">MKS</p>
<p class="text-[10px] text-meeshoPink font-medium">Min 60% Off</p>
</div>
<div class="min-w-[140px] sm:min-w-[160px] bg-white rounded-xl p-4 flex flex-col items-center cursor-pointer hover:shadow-lg transition-shadow">
<div class="w-16 h-16 rounded-full bg-gradient-to-br from-green-200 to-green-400 flex items-center justify-center mb-3">
<span class="text-white font-bold text-lg">K</span>
</div>
<p class="text-sm font-semibold text-gray-800">Kraus</p>
<p class="text-[10px] text-meeshoPink font-medium">Min 35% Off</p>
</div>
<div class="min-w-[140px] sm:min-w-[160px] bg-white rounded-xl p-4 flex flex-col items-center cursor-pointer hover:shadow-lg transition-shadow">
<div class="w-16 h-16 rounded-full bg-gradient-to-br from-orange-200 to-orange-400 flex items-center justify-center mb-3">
<span class="text-white font-bold text-lg">D</span>
</div>
<p class="text-sm font-semibold text-gray-800">Dillinger</p>
<p class="text-[10px] text-meeshoPink font-medium">Min 45% Off</p>
</div>
<div class="min-w-[140px] sm:min-w-[160px] bg-white rounded-xl p-4 flex flex-col items-center cursor-pointer hover:shadow-lg transition-shadow">
<div class="w-16 h-16 rounded-full bg-gradient-to-br from-red-200 to-red-400 flex items-center justify-center mb-3">
<span class="text-white font-bold text-lg">V</span>
</div>
<p class="text-sm font-semibold text-gray-800">Vendula</p>
<p class="text-[10px] text-meeshoPink font-medium">Min 55% Off</p>
</div>
<div class="min-w-[140px] sm:min-w-[160px] bg-white rounded-xl p-4 flex flex-col items-center cursor-pointer hover:shadow-lg transition-shadow">
<div class="w-16 h-16 rounded-full bg-gradient-to-br from-teal-200 to-teal-400 flex items-center justify-center mb-3">
<span class="text-white font-bold text-lg">H</span>
</div>
<p class="text-sm font-semibold text-gray-800">Hubber</p>
<p class="text-[10px] text-meeshoPink font-medium">Min 30% Off</p>
</div>
</div>
</section>
<!-- App Download Banner -->
<section class="max-w-7xl mx-auto px-4 mt-10">
<div class="bg-gradient-to-r from-meeshoDark via-meesho to-meeshoLight rounded-2xl p-6 sm:p-10 flex flex-col md:flex-row items-center gap-6 md:gap-10">
<div class="flex-1 text-center md:text-left">
<h2 class="text-2xl sm:text-3xl font-bold text-white mb-2">Download the Meesho App</h2>
<p class="text-white/80 text-sm sm:text-base mb-5">Get exclusive app-only deals & manage your orders on the go!</p>
<div class="flex flex-col sm:flex-row gap-3 justify-center md:justify-start">
<button class="bg-black text-white px-5 py-3 rounded-lg flex items-center gap-3 hover:bg-gray-900 transition-colors">
<i data-lucide="smartphone" class="w-6 h-6"></i>
<div class="text-left">
<p class="text-[9px] opacity-80">GET IT ON</p>
<p class="text-sm font-semibold">Google Play</p>
</div>
</button>
<button class="bg-black text-white px-5 py-3 rounded-lg flex items-center gap-3 hover:bg-gray-900 transition-colors">
<i data-lucide="apple" class="w-6 h-6"></i>
<div class="text-left">
<p class="text-[9px] opacity-80">Download on the</p>
<p class="text-sm font-semibold">App Store</p>
</div>
</button>
</div>
</div>
<div class="hidden md:block">
<div class="bg-white/10 rounded-2xl p-4 backdrop-blur-sm">
<div class="w-48 h-32 bg-white/20 rounded-xl flex items-center justify-center">
<div class="text-center text-white">
<i data-lucide="qr-code" class="w-16 h-16 mx-auto mb-2 opacity-80"></i>
<p class="text-xs font-medium">Scan to Download</p>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer class="bg-gray-900 mt-12">
<div class="max-w-7xl mx-auto px-4 py-10 sm:py-14">
<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-5 gap-8">
<div class="col-span-2 sm:col-span-1">
<div class="text-white font-extrabold text-2xl mb-4 flex items-center gap-1">
<svg width="24" height="24" viewBox="0 0 40 40" fill="none">
<circle cx="20" cy="20" r="18" fill="#570057"/>
<text x="10" y="27" fill="white" font-size="18" font-weight="bold">M</text>
</svg>
Meesho
</div>
<p class="text-gray-400 text-sm leading-relaxed mb-4">India's most affordable online shopping destination. Quality products at the lowest prices.</p>
<div class="flex gap-3">
<a href="#" class="bg-gray-800 hover:bg-meesho p-2 rounded-lg transition-colors">
<i data-lucide="facebook" class="w-4 h-4 text-gray-300"></i>
</a>
<a href="#" class="bg-gray-800 hover:bg-meesho p-2 rounded-lg transition-colors">
<i data-lucide="instagram" class="w-4 h-4 text-gray-300"></i>
</a>
<a href="#" class="bg-gray-800 hover:bg-meesho p-2 rounded-lg transition-colors">
<i data-lucide="twitter" class="w-4 h-4 text-gray-300"></i>
</a>
<a href="#" class="bg-gray-800 hover:bg-meesho p-2 rounded-lg transition-colors">
<i data-lucide="youtube" class="w-4 h-4 text-gray-300"></i>
</a>
</div>
</div>
<div>
<h4 class="text-white font-semibold text-sm mb-4">Shop</h4>
<ul class="space-y-2.5">
<li><a href="#" class="text-gray-400 text-sm hover:text-white transition-colors">Women</a></li>
<li><a href="#" class="text-gray-400 text-sm hover:text-white transition-colors">Men</a></li>
<li><a href="#" class="text-gray-400 text-sm hover:text-white transition-colors">Kids</a></li>
<li><a href="#" class="text-gray-400 text-sm hover:text-white transition-colors">Electronics</a></li>
<li><a href="#" class="text-gray-400 text-sm hover:text-white transition-colors">Home & Kitchen</a></li>
</ul>
</div>
<div>
<h4 class="text-white font-semibold text-sm mb-4">Account</h4>
<ul class="space-y-2.5">
<li><a href="#" class="text-gray-400 text-sm hover:text-white transition-colors">My Account</a></li>
<li><a href="#" class="text-gray-400 text-sm hover:text-white transition-colors">Orders</a></li>
<li><a href="#" class="text-gray-400 text-sm hover:text-white transition-colors">Wishlist</a></li>
<li><a href="#" class="text-gray-400 text-sm hover:text-white transition-colors">Returns</a></li>
<li><a href="#" class="text-gray-400 text-sm hover:text-white transition-colors">Rewards</a></li>
</ul>
</div>
<div>
<h4 class="text-white font-semibold text-sm mb-4">Help</h4>
<ul class="space-y-2.5">
<li><a href="#" class="text-gray-400 text-sm hover:text-white transition-colors">FAQs</a></li>
<li><a href="#" class="text-gray-400 text-sm hover:text-white transition-colors">Contact Us</a></li>
<li><a href="#" class="text-gray-400 text-sm hover:text-white transition-colors">Shipping Info</a></li>
<li><a href="#" class="text-gray-400 text-sm hover:text-white transition-colors">Return Policy</a></li>
<li><a href="#" class="text-gray-400 text-sm hover:text-white transition-colors">Sell on Meesho</a></li>
</ul>
</div>
<div>
<h4 class="text-white font-semibold text-sm mb-4">Company</h4>
<ul class="space-y-2.5">
<li><a href="#" class="text-gray-400 text-sm hover:text-white transition-colors">About Us</a></li>
<li><a href="#" class="text-gray-400 text-sm hover:text-white transition-colors">Careers</a></li>
<li><a href="#" class="text-gray-400 text-sm hover:text-white transition-colors">Blog</a></li>
<li><a href="#" class="text-gray-400 text-sm hover:text-white transition-colors">Press</a></li>
<li><a href="#" class="text-gray-400 text-sm hover:text-white transition-colors">Privacy Policy</a></li>
</ul>
</div>
</div>
<div class="border-t border-gray-800 mt-10 pt-6 flex flex-col sm:flex-row items-center justify-between gap-4">
<p class="text-gray-500 text-sm">© 2024 Meesho. All rights reserved.</p>
<div class="flex items-center gap-4">
<span class="text-gray-500 text-xs">We accept:</span>
<div class="flex items-center gap-2">
<div class="bg-gray-800 px-2 py-1 rounded text-[10px] text-gray-300 font-medium">VISA</div>
<div class="bg-gray-800 px-2 py-1 rounded text-[10px] text-gray-300 font-medium">UPI</div>
<div class="bg-gray-800 px-2 py-1 rounded text-[10px] text-gray-300 font-medium">COD</div>
<div class="bg-gray-800 px-2 py-1 rounded text-[10px] text-gray-300 font-medium">NET</div>
</div>
</div>
</div>
</div>
</footer>
<!-- Toast Notification -->
<div id="toast" class="fixed bottom-6 left-1/2 -translate-x-1/2 bg-gray-900 text-white px-5 py-3 rounded-xl shadow-2xl flex items-center gap-3 z-50 opacity-0 translate-y-4 transition-all duration-300 pointer-events-none">
<i data-lucide="check-circle" class="w-5 h-5 text-green-400"></i>
<span id="toastMessage" class="text-sm font-medium">Item added to cart!</span>
</div>
<!-- Back to Top -->
<button id="backToTop" onclick="window.scrollTo({top:0,behavior:'smooth'})" class="fixed bottom-6 right-6 bg-meesho text-white p-3 rounded-full shadow-xl opacity-0 translate-y-4 transition-all duration-300 hover:bg-meeshoDark z-40">
<i data-lucide="arrow-up" class="w-5 h-5"></i>
</button>
<script>
// ============ PRODUCTS DATA ============
const allProducts = [
{ id: 1, name: "Floral Print Kurti", price: 279, originalPrice: 899, discount: 69, rating: 4.2, reviews: "3.2k", category: "women", image: "http://static.photos/fashion/320x240/30", badge: "Bestseller" },
{ id: 2, name: "Cotton Saree Collection", price: 449, originalPrice: 1299, discount: 65, rating: 4.5, reviews: "5.1k", category: "women", image: "http://static.photos/vintage/320x240/31", badge: "" },
{ id: 3, name: "Designer Lehenga Choli", price: 599, originalPrice: 1999, discount: 70, rating: 4.3, reviews: "2.8k", category: "women", image: "http://static.photos/red/320x240/32", badge: "New" },
{ id: 4, name: "Silk Dupatta Set", price: 199, originalPrice: 599, discount: 67, rating: 3.9, reviews: "1.5k", category: "women", image: "http://static.photos/cosmetic/320x240/33", badge: "" },
{ id: 5, name: "Casual Shirt for Men", price: 349, originalPrice: 799, discount: 56, rating: 4.1, reviews: "4.3k", category: "men", image: "http://static.photos/people/320x240/34", badge: "" },
{ id: 6, name: "Slim Fit Jeans", price: 499, originalPrice: 1199, discount: 58, rating: 4.4, reviews: "6.7k", category: "men", image: "http://static.photos/workspace/320x240/35", badge: "Trending" },
{ id: 7, name: "Sports T-Shirt", price: 249, originalPrice: 699, discount: 64, rating: 4.0, reviews: "2.1k", category: "men", image: "http://static.photos/sport/320x240/36", badge: "" },
{ id: 8, name: "Formal Blazer", price: 799, originalPrice: 2499, discount: 68, rating: 4.6, reviews: "890", category: "men", image: "http://static.photos/office/320x240/37", badge: "Premium" },
{ id: 9, name: "Wireless Earbuds", price: 599, originalPrice: 1499, discount: 60, rating: 4.3, reviews: "8.5k", category: "electronics", image: "http://static.photos/technology/320x240/38", badge: "Top Pick" },
{ id: 10, name: "Smart Watch", price: 899, originalPrice: 2999, discount: 70, rating: 4.1, reviews: "3.4k", category: "electronics", image: "http://static.photos/gaming/320x240/39", badge: "" },
{ id: 11, name: "Bluetooth Speaker", price: 449, originalPrice: 999, discount: 55, rating: 4.5, reviews: "5.2k", category: "electronics", image: "http://static.photos/technology/320x240/40", badge: "" },
{ id: 12, name: "Phone Case Cover", price: 149, originalPrice: 499, discount: 70, rating: 3.8, reviews: "1.1k", category: "electronics", image: "http://static.photos/abstract/320x240/41", badge: "" },
{ id: 13, name: "Kids Party Dress", price: 349, originalPrice: 899, discount: 61, rating: 4.4, reviews: "2.3k", category: "kids", image: "http://static.photos/education/320x240/42", badge: "New" },
{ id: 14, name: "Boys Casual Set", price: 449, originalPrice: 999, discount: 55, rating: 4.0, reviews: "1.7k", category: "kids", image: "http://static.photos/season/320x240/43", badge: "" },
{ id: 15, name: "Kitchen Storage Set", price: 299, originalPrice: 799, discount: 63, rating: 4.2, reviews: "3.9k", category: "home", image: "http://static.photos/indoor/320x240/44", badge: "Bestseller" },
{ id: 16, name: "Bed Sheet Combo", price: 399, originalPrice: 1199, discount: 67, rating: 4.6, reviews: "7.1k", category: "home", image: "http://static.photos/textures/320x240/45", badge: "" },
{ id: 17, name: "Wall Decor Frame", price: 249, originalPrice: 699, discount: 64, rating: 3.9, reviews: "980", category: "home", image: "http://static.photos/minimal/320x240/46", badge: "" },
{ id: 18, name: "Makeup Essential Kit", price: 399, originalPrice: 999, discount: 60, rating: 4.3, reviews: "4.5k", category: "beauty", image: "http://static.photos/cosmetic/320x240/47", badge: "Trending" },
{ id: 19, name: "Hair Care Combo", price: 279, originalPrice: 699, discount: 60, rating: 4.1, reviews: "2.8k", category: "beauty", image: "http://static.photos/wellness/320x240/48", badge: "" },
{ id: 20, name: "Ankle Strap Heels", price: 499, originalPrice: 1299, discount: 62, rating: 4.0, reviews: "1.9k", category: "footwear", image: "http://static.photos/fashion/320x240/49", badge: "" },
];
let currentFilter = 'all';
let currentPage = 0;
const productsPerPage = 10;
let cartCount = 0;
// ============ RENDER PRODUCTS ============
function renderProducts(append = false) {
const grid = document.getElementById('productsGrid');
let filtered = currentFilter === 'all' ? allProducts : allProducts.filter(p => p.category === currentFilter);
const start = append ? currentPage * productsPerPage : 0;
const end = (currentPage + 1) * productsPerPage;
const toShow = filtered.slice(start, end);
if (!append) grid.innerHTML = '';
toShow.forEach((product, index) => {
const stars = getStarsHTML(product.rating);
const badgeColor = {
'Bestseller': 'bg-meeshoGreen',
'New': 'bg-blue-500',
'Trending': 'bg-meeshoOrange',
'Premium': 'bg-meesho',
'Top Pick': 'bg-meeshoPink'
}[product.badge] || 'bg-meeshoPink';
const card = document.createElement('div');
card.className = 'bg-white rounded-xl overflow-hidden cursor-pointer product-card fade-in';
card.style.animationDelay = `${index * 0.05}s`;
card.onclick = () => addToCart(product.id);
card.innerHTML = `
<div class="relative">
<img src="${product.image}" class="w-full h-36 sm:h-44 object-cover" alt="${product.name}" loading="lazy">
<span class="absolute top-2 left-2 ${badgeColor} text-white text-[10px] font-bold px-2 py-0.5 rounded">${product.discount}% OFF</span>
${product.badge ? `<span class="absolute top-2 right-2 ${badgeColor} text-white text-[9px] font-bold px-2 py-0.5 rounded">${product.badge}</span>` : ''}
<button class="absolute bottom-2 right-2 bg-white/80 p-1.5 rounded-full hover:bg-white shadow-sm" onclick="event.stopPropagation(); toggleWishlist(this)">
<i data-lucide="heart" class="w-3.5 h-3.5 text-gray-500"></i>
</button>
</div>
<div class="p-3">
<p class="text-xs text-gray-500 truncate">${product.name}</p>
<div class="flex items-center gap-2 mt-1">
<span class="text-sm font-bold text-gray-900">₹${product.price}</span>
<span class="text-xs text-gray-400 line-through">₹${product.originalPrice.toLocaleString()}</span>
</div>
<div class="flex items-center gap-1 mt-1">
<div class="flex">${stars}</div>
<span class="text-[10px] text-gray-400">(${product.reviews})</span>
</div>
<button class="w-full mt-2 bg-meesho/10 text-meesho text-xs font-semibold py-1.5 rounded-md hover:bg-meesho/20 transition-colors" onclick="event.stopPropagation(); addToCart(${product.id})">
Add to Cart
</button>
</div>
`;
grid.appendChild(card);
});
lucide.createIcons();
const totalShowing = Math.min(end, filtered.length);
document.getElementById('loadMoreBtn').style.display = totalShowing >= filtered.length ? 'none' : 'inline-block';
}
function getStarsHTML(rating) {
let stars = '';
for (let i = 1; i <= 5; i++) {
if (i <= Math.floor(rating)) {
stars += '<i data-lucide="star" class="w-3 h-3 text-yellow-400 fill-yellow-400"></i>';
} else if (i - 0.5 <= rating) {
stars += '<i data-lucide="star" class="w-3 h-3 text-yellow-400 fill-yellow-400"></i>';
} else {
stars += '<i data-lucide="star" class="w-3 h-3 text-gray-300"></i>';
}
}
return stars;
}
// ============ FILTER ============
function filterProducts(filter, btn) {
currentFilter = filter;
currentPage = 0;
document.querySelectorAll('.filter-btn').forEach(b => {
b.classList.remove('bg-meesho', 'text-white');
b.classList.add('bg-gray-100', 'text-gray-600');
});
btn.classList.remove('bg-gray-100', 'text-gray-600');
btn.classList.add('bg-meesho', 'text-white');
renderProducts();
}
function filterByCategory(cat) {
currentFilter = cat;
currentPage = 0;
document.querySelectorAll('.filter-btn').forEach(b => {
b.classList.remove('bg-meesho', 'text-white');
b.classList.add('bg-gray-100', 'text-gray-600');
});
const matchBtn = [...document.querySelectorAll('.filter-btn')].find(b => b.textContent.trim().toLowerCase() === cat);
if (matchBtn) {
matchBtn.classList.remove('bg-gray-100', 'text-gray-600');
matchBtn.classList.add('bg-meesho', 'text-white');
}
renderProducts();
document.getElementById('productsGrid').scrollIntoView({ behavior: 'smooth', block: 'start' });
}
function loadMoreProducts() {
currentPage++;
renderProducts(true);
}
// ============ CART ============
function addToCart(productId) {
cartCount++;
document.getElementById('cartCount').textContent = cartCount;
document.getElementById('cartCount').classList.add('scale-125');
setTimeout(() => document.getElementById('cartCount').classList.remove('scale-125'), 200);
showToast('Item added to cart! 🛒');
}
// ============ WISHLIST ============
function toggleWishlist(btn) {
const icon = btn.querySelector('i');
const isActive = btn.classList.contains('wishlist-active');
if (isActive) {
btn.classList.remove('wishlist-active');
icon.style.fill = 'none';
icon.style.color = '#6b7280';
showToast('Removed from wishlist');
} else {
btn.classList.add('wishlist-active');
icon.style.fill = '#ef4444';
icon.style.color = '#ef4444';
showToast('Added to wishlist ❤️');
}
}
// ============ TOAST ============
function showToast(message) {
const toast = document.getElementById('toast');
document.getElementById('toastMessage').textContent = message;
toast.classList.remove('opacity-0', 'translate-y-4', 'pointer-events-none');
toast.classList.add('opacity-100', 'translate-y-0');
setTimeout(() => {
toast.classList.add('opacity-0', 'translate-y-4', 'pointer-events-none');
toast.classList.remove('opacity-100', 'translate-y-0');
}, 2500);
}
// ============ BANNER CAROUSEL ============
let currentSlide = 0;
const totalSlides = 3;
function goToSlide(n) {
const slides = document.querySelectorAll('.banner-slide');
const dots = document.querySelectorAll('.carousel-dot');
slides.forEach(s => s.style.opacity = '0');
dots.forEach(d => { d.classList.remove('bg-white'); d.classList.add('bg-white/50'); });
currentSlide = ((n % totalSlides) + totalSlides) % totalSlides;
slides[currentSlide].style.opacity = '1';
dots[currentSlide].classList.remove('bg-white/50');
dots[currentSlide].classList.add('bg-white');
}
function changeSlide(dir) {
goToSlide(currentSlide + dir);
}
setInterval(() => goToSlide(currentSlide + 1), 4000);
// ============ COUNTDOWN TIMER ============
let totalSeconds = 8 * 3600 + 45 * 60 + 30;
function updateTimer() {
const h = Math.floor(totalSeconds / 3600);
const m = Math.floor((totalSeconds % 3600) / 60);
const s = totalSeconds % 60;
document.getElementById('hours').textContent = String(h).padStart(2, '0');
document.getElementById('minutes').textContent = String(m).padStart(2, '0');
document.getElementById('seconds').textContent = String(s).padStart(2, '0');
if (totalSeconds > 0) totalSeconds--;
}
setInterval(updateTimer, 1000);
// ============ MOBILE SEARCH ============
function toggleMobileSearch() {
const el = document.getElementById('mobileSearch');
el.classList.toggle('hidden');
if (!el.classList.contains('hidden')) {
el.querySelector('input').focus();
}
}
// ============ BACK TO TOP ============
window.addEventListener('scroll', () => {
const btn = document.getElementById('backToTop');
if (window.scrollY > 400) {
btn.classList.remove('opacity-0', 'translate-y-4');
btn.classList.add('opacity-100', 'translate-y-0');
} else {
btn.classList.add('opacity-0', 'translate-y-4');
btn.classList.remove('opacity-100', 'translate-y-0');
}
});
// ============ SEARCH ============
document.getElementById('searchInput')?.addEventListener('keyup', function(e) {
if (e.key === 'Enter') {
const query = this.value.trim().toLowerCase();
if (query) {
currentFilter = 'all';
currentPage = 0;
const grid = document.getElementById('productsGrid');
const filtered = allProducts.filter(p => p.name.toLowerCase().includes(query));
if (filtered.length > 0) {
grid.innerHTML = '';
// Temporarily replace allProducts render with filtered
filtered.forEach((product, index) => {
const stars = getStarsHTML(product.rating);
const card = document.createElement('div');
card.className = 'bg-white rounded-xl overflow-hidden cursor-pointer product-card fade-in';
card.onclick = () => addToCart(product.id);
card.innerHTML = `
<div class="relative">
<img src="${product.image}" class="w-full h-36 sm:h-44 object-cover" alt="${product.name}" loading="lazy">
<span class="absolute top-2 left-2 bg-meeshoPink text-white text-[10px] font-bold px-2 py-0.5 rounded">${product.discount}% OFF</span>
<button class="absolute bottom-2 right-2 bg-white/80 p-1.5 rounded-full hover:bg-white shadow-sm" onclick="event.stopPropagation(); toggleWishlist(this)">
<i data-lucide="heart" class="w-3.5 h-3.5 text-gray-500"></i>
</button>
</div>
<div class="p-3">
<p class="text-xs text-gray-500 truncate">${product.name}</p>
<div class="flex items-center gap-2 mt-1">
<span class="text-sm font-bold text-gray-900">₹${product.price}</span>
<span class="text-xs text-gray-400 line-through">₹${product.originalPrice.toLocaleString()}</span>
</div>
<div class="flex items-center gap-1 mt-1">
<div class="flex">${stars}</div>
<span class="text-[10px] text-gray-400">(${product.reviews})</span>
</div>
<button class="w-full mt-2 bg-meesho/10 text-meesho text-xs font-semibold py-1.5 rounded-md hover:bg-meesho/20 transition-colors" onclick="event.stopPropagation(); addToCart(${product.id})">
Add to Cart
</button>
</div>
`;
grid.appendChild(card);
});
lucide.createIcons();
document.getElementById('loadMoreBtn').style.display = 'none';
showToast(`Found ${filtered.length} results for "${query}"`);
} else {
grid.innerHTML = `<div class="col-span-full text-center py-16"><i data-lucide="search-x" class="w-16 h-16 text-gray-300 mx-auto mb-4"></i><p class="text-gray-500 text-lg font-medium">No products found</p><p class="text-gray-400 text-sm mt-1">Try a different search term</p></div>`;
lucide.createIcons();
document.getElementById('loadMoreBtn').style.display = 'none';
}
} else {
renderProducts();
}
}
});
// ============ INIT ============
document.addEventListener('DOMContentLoaded', () => {
renderProducts();
lucide.createIcons();
goToSlide(0);
});
</script>
<script src="https://deepsite.hf.co/deepsite-badge.js"></script>
</body>
</html>