Create a Shopify theme for an electronics shop
Browse files- README.md +9 -6
- index.html +414 -19
- script.js +449 -0
- style.css +200 -19
README.md
CHANGED
|
@@ -1,10 +1,13 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
colorTo: yellow
|
| 6 |
sdk: static
|
| 7 |
-
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: TechVault Electronics Theme ⚡
|
| 3 |
+
colorFrom: red
|
| 4 |
+
colorTo: red
|
|
|
|
| 5 |
sdk: static
|
| 6 |
+
emoji: 🧩
|
| 7 |
+
tags:
|
| 8 |
+
- deepsite-v4
|
| 9 |
---
|
| 10 |
|
| 11 |
+
# TechVault Electronics Theme ⚡
|
| 12 |
+
|
| 13 |
+
This project has been created with [DeepSite](https://deepsite.hf.co) AI Vibe Coding.
|
index.html
CHANGED
|
@@ -1,19 +1,414 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>TechVault - Premium Electronics</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<script src="https://unpkg.com/lucide@latest"></script>
|
| 9 |
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
|
| 10 |
+
<link rel="stylesheet" href="style.css">
|
| 11 |
+
</head>
|
| 12 |
+
<body class="bg-slate-950 text-slate-100 font-['Inter'] antialiased overflow-x-hidden">
|
| 13 |
+
|
| 14 |
+
<!-- Navigation -->
|
| 15 |
+
<nav class="fixed top-0 w-full z-50 bg-slate-950/80 backdrop-blur-md border-b border-slate-800">
|
| 16 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 17 |
+
<div class="flex items-center justify-between h-16">
|
| 18 |
+
<!-- Logo -->
|
| 19 |
+
<div class="flex items-center gap-2 cursor-pointer" onclick="window.scrollTo(0,0)">
|
| 20 |
+
<div class="w-8 h-8 bg-blue-500 rounded-lg flex items-center justify-center">
|
| 21 |
+
<i data-lucide="zap" class="w-5 h-5 text-white"></i>
|
| 22 |
+
</div>
|
| 23 |
+
<span class="text-xl font-bold bg-gradient-to-r from-blue-400 to-cyan-400 bg-clip-text text-transparent">TechVault</span>
|
| 24 |
+
</div>
|
| 25 |
+
|
| 26 |
+
<!-- Desktop Menu -->
|
| 27 |
+
<div class="hidden md:flex items-center gap-8">
|
| 28 |
+
<a href="#products" class="text-sm font-medium text-slate-300 hover:text-white transition-colors">Products</a>
|
| 29 |
+
<a href="#deals" class="text-sm font-medium text-slate-300 hover:text-white transition-colors">Deals</a>
|
| 30 |
+
<a href="#categories" class="text-sm font-medium text-slate-300 hover:text-white transition-colors">Categories</a>
|
| 31 |
+
<a href="#support" class="text-sm font-medium text-slate-300 hover:text-white transition-colors">Support</a>
|
| 32 |
+
</div>
|
| 33 |
+
|
| 34 |
+
<!-- Actions -->
|
| 35 |
+
<div class="flex items-center gap-4">
|
| 36 |
+
<button class="p-2 hover:bg-slate-800 rounded-full transition-colors" onclick="toggleSearch()">
|
| 37 |
+
<i data-lucide="search" class="w-5 h-5 text-slate-300"></i>
|
| 38 |
+
</button>
|
| 39 |
+
<button class="p-2 hover:bg-slate-800 rounded-full transition-colors relative" onclick="toggleCart()">
|
| 40 |
+
<i data-lucide="shopping-cart" class="w-5 h-5 text-slate-300"></i>
|
| 41 |
+
<span id="cart-badge" class="absolute -top-1 -right-1 w-5 h-5 bg-blue-500 text-xs rounded-full flex items-center justify-center font-semibold hidden">0</span>
|
| 42 |
+
</button>
|
| 43 |
+
<button class="md:hidden p-2 hover:bg-slate-800 rounded-full transition-colors" onclick="toggleMobileMenu()">
|
| 44 |
+
<i data-lucide="menu" class="w-5 h-5 text-slate-300"></i>
|
| 45 |
+
</button>
|
| 46 |
+
</div>
|
| 47 |
+
</div>
|
| 48 |
+
</div>
|
| 49 |
+
|
| 50 |
+
<!-- Search Overlay -->
|
| 51 |
+
<div id="search-overlay" class="hidden absolute top-full left-0 w-full bg-slate-900 border-b border-slate-800 p-4">
|
| 52 |
+
<div class="max-w-3xl mx-auto relative">
|
| 53 |
+
<i data-lucide="search" class="absolute left-4 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400"></i>
|
| 54 |
+
<input type="text" id="search-input" placeholder="Search for products..."
|
| 55 |
+
class="w-full pl-12 pr-4 py-3 bg-slate-800 rounded-xl text-white placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-blue-500">
|
| 56 |
+
</div>
|
| 57 |
+
</div>
|
| 58 |
+
|
| 59 |
+
<!-- Mobile Menu -->
|
| 60 |
+
<div id="mobile-menu" class="hidden md:hidden bg-slate-900 border-b border-slate-800">
|
| 61 |
+
<div class="px-4 py-4 space-y-2">
|
| 62 |
+
<a href="#products" class="block py-2 text-slate-300 hover:text-white">Products</a>
|
| 63 |
+
<a href="#deals" class="block py-2 text-slate-300 hover:text-white">Deals</a>
|
| 64 |
+
<a href="#categories" class="block py-2 text-slate-300 hover:text-white">Categories</a>
|
| 65 |
+
<a href="#support" class="block py-2 text-slate-300 hover:text-white">Support</a>
|
| 66 |
+
</div>
|
| 67 |
+
</div>
|
| 68 |
+
</nav>
|
| 69 |
+
|
| 70 |
+
<!-- Hero Section -->
|
| 71 |
+
<section class="relative pt-32 pb-20 overflow-hidden">
|
| 72 |
+
<div class="absolute inset-0 bg-gradient-to-br from-blue-600/20 via-purple-600/20 to-slate-950 pointer-events-none"></div>
|
| 73 |
+
<div class="absolute top-20 right-0 w-96 h-96 bg-blue-500/30 rounded-full blur-3xl pointer-events-none"></div>
|
| 74 |
+
<div class="absolute bottom-0 left-0 w-96 h-96 bg-purple-500/20 rounded-full blur-3xl pointer-events-none"></div>
|
| 75 |
+
|
| 76 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10">
|
| 77 |
+
<div class="grid lg:grid-cols-2 gap-12 items-center">
|
| 78 |
+
<div class="space-y-8 animate-fade-in">
|
| 79 |
+
<div class="inline-flex items-center gap-2 px-4 py-2 bg-blue-500/10 border border-blue-500/20 rounded-full">
|
| 80 |
+
<span class="w-2 h-2 bg-blue-500 rounded-full animate-pulse"></span>
|
| 81 |
+
<span class="text-sm font-medium text-blue-400">New Arrivals Available</span>
|
| 82 |
+
</div>
|
| 83 |
+
<h1 class="text-5xl md:text-7xl font-bold leading-tight">
|
| 84 |
+
Next Gen <br>
|
| 85 |
+
<span class="bg-gradient-to-r from-blue-400 via-cyan-400 to-teal-400 bg-clip-text text-transparent">Electronics</span>
|
| 86 |
+
</h1>
|
| 87 |
+
<p class="text-lg text-slate-400 max-w-lg">
|
| 88 |
+
Discover cutting-edge technology with premium devices. From flagship smartphones to professional audio equipment.
|
| 89 |
+
</p>
|
| 90 |
+
<div class="flex flex-wrap gap-4">
|
| 91 |
+
<button onclick="scrollToProducts()" class="px-8 py-4 bg-blue-600 hover:bg-blue-700 text-white font-semibold rounded-xl transition-all transform hover:scale-105 flex items-center gap-2">
|
| 92 |
+
Shop Now
|
| 93 |
+
<i data-lucide="arrow-right" class="w-5 h-5"></i>
|
| 94 |
+
</button>
|
| 95 |
+
<button class="px-8 py-4 bg-slate-800 hover:bg-slate-700 text-white font-semibold rounded-xl transition-all flex items-center gap-2">
|
| 96 |
+
View Deals
|
| 97 |
+
<i data-lucide="tag" class="w-5 h-5"></i>
|
| 98 |
+
</button>
|
| 99 |
+
</div>
|
| 100 |
+
<div class="flex items-center gap-8 pt-4">
|
| 101 |
+
<div>
|
| 102 |
+
<div class="text-2xl font-bold text-white">50K+</div>
|
| 103 |
+
<div class="text-sm text-slate-400">Products Sold</div>
|
| 104 |
+
</div>
|
| 105 |
+
<div class="w-px h-12 bg-slate-700"></div>
|
| 106 |
+
<div>
|
| 107 |
+
<div class="text-2xl font-bold text-white">4.9</div>
|
| 108 |
+
<div class="text-sm text-slate-400">Customer Rating</div>
|
| 109 |
+
</div>
|
| 110 |
+
<div class="w-px h-12 bg-slate-700"></div>
|
| 111 |
+
<div>
|
| 112 |
+
<div class="text-2xl font-bold text-white">24/7</div>
|
| 113 |
+
<div class="text-sm text-slate-400">Support</div>
|
| 114 |
+
</div>
|
| 115 |
+
</div>
|
| 116 |
+
</div>
|
| 117 |
+
<div class="relative animate-float">
|
| 118 |
+
<div class="relative z-10">
|
| 119 |
+
<img src="https://images.unsplash.com/photo-1592899677977-9c10ca588bbd?w=800&auto=format&fit=crop&q=80" alt="Premium Headphones" class="rounded-3xl shadow-2xl shadow-blue-500/20 w-full object-cover">
|
| 120 |
+
</div>
|
| 121 |
+
<div class="absolute -bottom-6 -right-6 bg-slate-800 p-4 rounded-2xl border border-slate-700 shadow-xl">
|
| 122 |
+
<div class="flex items-center gap-3">
|
| 123 |
+
<div class="w-12 h-12 bg-green-500/20 rounded-full flex items-center justify-center">
|
| 124 |
+
<i data-lucide="check" class="w-6 h-6 text-green-500"></i>
|
| 125 |
+
</div>
|
| 126 |
+
<div>
|
| 127 |
+
<div class="font-semibold text-white">In Stock</div>
|
| 128 |
+
<div class="text-sm text-slate-400">Free Shipping</div>
|
| 129 |
+
</div>
|
| 130 |
+
</div>
|
| 131 |
+
</div>
|
| 132 |
+
</div>
|
| 133 |
+
</div>
|
| 134 |
+
</div>
|
| 135 |
+
</section>
|
| 136 |
+
|
| 137 |
+
<!-- Categories Section -->
|
| 138 |
+
<section id="categories" class="py-20 bg-slate-900/50">
|
| 139 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 140 |
+
<div class="text-center mb-12">
|
| 141 |
+
<h2 class="text-3xl font-bold text-white mb-4">Shop by Category</h2>
|
| 142 |
+
<p class="text-slate-400">Browse our wide range of premium electronics</p>
|
| 143 |
+
</div>
|
| 144 |
+
<div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4">
|
| 145 |
+
<button onclick="filterByCategory('all')" class="category-btn active group p-6 bg-slate-800 hover:bg-slate-700 rounded-2xl border border-slate-700 hover:border-blue-500/50 transition-all text-center">
|
| 146 |
+
<div class="w-12 h-12 mx-auto mb-3 bg-blue-500/20 rounded-xl flex items-center justify-center group-hover:scale-110 transition-transform">
|
| 147 |
+
<i data-lucide="layout-grid" class="w-6 h-6 text-blue-400"></i>
|
| 148 |
+
</div>
|
| 149 |
+
<span class="font-medium text-sm">All</span>
|
| 150 |
+
</button>
|
| 151 |
+
<button onclick="filterByCategory('phones')" class="category-btn group p-6 bg-slate-800 hover:bg-slate-700 rounded-2xl border border-slate-700 hover:border-blue-500/50 transition-all text-center">
|
| 152 |
+
<div class="w-12 h-12 mx-auto mb-3 bg-purple-500/20 rounded-xl flex items-center justify-center group-hover:scale-110 transition-transform">
|
| 153 |
+
<i data-lucide="smartphone" class="w-6 h-6 text-purple-400"></i>
|
| 154 |
+
</div>
|
| 155 |
+
<span class="font-medium text-sm">Phones</span>
|
| 156 |
+
</button>
|
| 157 |
+
<button onclick="filterByCategory('laptops')" class="category-btn group p-6 bg-slate-800 hover:bg-slate-700 rounded-2xl border border-slate-700 hover:border-blue-500/50 transition-all text-center">
|
| 158 |
+
<div class="w-12 h-12 mx-auto mb-3 bg-cyan-500/20 rounded-xl flex items-center justify-center group-hover:scale-110 transition-transform">
|
| 159 |
+
<i data-lucide="laptop" class="w-6 h-6 text-cyan-400"></i>
|
| 160 |
+
</div>
|
| 161 |
+
<span class="font-medium text-sm">Laptops</span>
|
| 162 |
+
</button>
|
| 163 |
+
<button onclick="filterByCategory('audio')" class="category-btn group p-6 bg-slate-800 hover:bg-slate-700 rounded-2xl border border-slate-700 hover:border-blue-500/50 transition-all text-center">
|
| 164 |
+
<div class="w-12 h-12 mx-auto mb-3 bg-pink-500/20 rounded-xl flex items-center justify-center group-hover:scale-110 transition-transform">
|
| 165 |
+
<i data-lucide="headphones" class="w-6 h-6 text-pink-400"></i>
|
| 166 |
+
</div>
|
| 167 |
+
<span class="font-medium text-sm">Audio</span>
|
| 168 |
+
</button>
|
| 169 |
+
<button onclick="filterByCategory('gaming')" class="category-btn group p-6 bg-slate-800 hover:bg-slate-700 rounded-2xl border border-slate-700 hover:border-blue-500/50 transition-all text-center">
|
| 170 |
+
<div class="w-12 h-12 mx-auto mb-3 bg-orange-500/20 rounded-xl flex items-center justify-center group-hover:scale-110 transition-transform">
|
| 171 |
+
<i data-lucide="gamepad-2" class="w-6 h-6 text-orange-400"></i>
|
| 172 |
+
</div>
|
| 173 |
+
<span class="font-medium text-sm">Gaming</span>
|
| 174 |
+
</button>
|
| 175 |
+
<button onclick="filterByCategory('accessories')" class="category-btn group p-6 bg-slate-800 hover:bg-slate-700 rounded-2xl border border-slate-700 hover:border-blue-500/50 transition-all text-center">
|
| 176 |
+
<div class="w-12 h-12 mx-auto mb-3 bg-emerald-500/20 rounded-xl flex items-center justify-center group-hover:scale-110 transition-transform">
|
| 177 |
+
<i data-lucide="watch" class="w-6 h-6 text-emerald-400"></i>
|
| 178 |
+
</div>
|
| 179 |
+
<span class="font-medium text-sm">Accessories</span>
|
| 180 |
+
</button>
|
| 181 |
+
</div>
|
| 182 |
+
</div>
|
| 183 |
+
</section>
|
| 184 |
+
|
| 185 |
+
<!-- Products Section -->
|
| 186 |
+
<section id="products" class="py-20">
|
| 187 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 188 |
+
<div class="flex flex-col md:flex-row md:items-center justify-between mb-8 gap-4">
|
| 189 |
+
<div>
|
| 190 |
+
<h2 class="text-3xl font-bold text-white mb-2">Featured Products</h2>
|
| 191 |
+
<p class="text-slate-400">Handpicked premium electronics for you</p>
|
| 192 |
+
</div>
|
| 193 |
+
<div class="flex items-center gap-4">
|
| 194 |
+
<select id="sort-select" onchange="sortProducts()" class="px-4 py-2 bg-slate-800 border border-slate-700 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-500">
|
| 195 |
+
<option value="featured">Featured</option>
|
| 196 |
+
<option value="price-low">Price: Low to High</option>
|
| 197 |
+
<option value="price-high">Price: High to Low</option>
|
| 198 |
+
<option value="newest">Newest</option>
|
| 199 |
+
</select>
|
| 200 |
+
</div>
|
| 201 |
+
</div>
|
| 202 |
+
|
| 203 |
+
<!-- Products Grid -->
|
| 204 |
+
<div id="products-grid" class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6">
|
| 205 |
+
<!-- Products will be injected here by JavaScript -->
|
| 206 |
+
</div>
|
| 207 |
+
|
| 208 |
+
<div class="text-center mt-12">
|
| 209 |
+
<button class="px-8 py-3 bg-slate-800 hover:bg-slate-700 border border-slate-700 rounded-xl font-medium transition-all">
|
| 210 |
+
Load More Products
|
| 211 |
+
</button>
|
| 212 |
+
</div>
|
| 213 |
+
</div>
|
| 214 |
+
</section>
|
| 215 |
+
|
| 216 |
+
<!-- Features Section -->
|
| 217 |
+
<section class="py-20 bg-slate-900/30 border-y border-slate-800">
|
| 218 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 219 |
+
<div class="grid md:grid-cols-3 gap-8">
|
| 220 |
+
<div class="flex items-start gap-4 p-6 bg-slate-800/50 rounded-2xl border border-slate-700">
|
| 221 |
+
<div class="w-12 h-12 bg-blue-500/20 rounded-xl flex items-center justify-center flex-shrink-0">
|
| 222 |
+
<i data-lucide="truck" class="w-6 h-6 text-blue-400"></i>
|
| 223 |
+
</div>
|
| 224 |
+
<div>
|
| 225 |
+
<h3 class="font-semibold text-white mb-1">Free Express Shipping</h3>
|
| 226 |
+
<p class="text-sm text-slate-400">On all orders over $500. International delivery available.</p>
|
| 227 |
+
</div>
|
| 228 |
+
</div>
|
| 229 |
+
<div class="flex items-start gap-4 p-6 bg-slate-800/50 rounded-2xl border border-slate-700">
|
| 230 |
+
<div class="w-12 h-12 bg-green-500/20 rounded-xl flex items-center justify-center flex-shrink-0">
|
| 231 |
+
<i data-lucide="shield-check" class="w-6 h-6 text-green-400"></i>
|
| 232 |
+
</div>
|
| 233 |
+
<div>
|
| 234 |
+
<h3 class="font-semibold text-white mb-1">2-Year Warranty</h3>
|
| 235 |
+
<p class="text-sm text-slate-400">Full coverage on all electronics with easy replacements.</p>
|
| 236 |
+
</div>
|
| 237 |
+
</div>
|
| 238 |
+
<div class="flex items-start gap-4 p-6 bg-slate-800/50 rounded-2xl border border-slate-700">
|
| 239 |
+
<div class="w-12 h-12 bg-purple-500/20 rounded-xl flex items-center justify-center flex-shrink-0">
|
| 240 |
+
<i data-lucide="rotate-ccw" class="w-6 h-6 text-purple-400"></i>
|
| 241 |
+
</div>
|
| 242 |
+
<div>
|
| 243 |
+
<h3 class="font-semibold text-white mb-1">30-Day Returns</h3>
|
| 244 |
+
<p class="text-sm text-slate-400">Not satisfied? Return within 30 days for full refund.</p>
|
| 245 |
+
</div>
|
| 246 |
+
</div>
|
| 247 |
+
</div>
|
| 248 |
+
</div>
|
| 249 |
+
</section>
|
| 250 |
+
|
| 251 |
+
<!-- Newsletter Section -->
|
| 252 |
+
<section class="py-20">
|
| 253 |
+
<div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center">
|
| 254 |
+
<div class="p-8 md:p-12 bg-gradient-to-br from-blue-600/20 to-purple-600/20 rounded-3xl border border-blue-500/20">
|
| 255 |
+
<h2 class="text-3xl font-bold text-white mb-4">Stay Updated</h2>
|
| 256 |
+
<p class="text-slate-400 mb-8 max-w-lg mx-auto">Subscribe to get exclusive deals, new arrival alerts, and tech news delivered to your inbox.</p>
|
| 257 |
+
<form class="flex flex-col sm:flex-row gap-4 max-w-md mx-auto" onsubmit="handleSubscribe(event)">
|
| 258 |
+
<input type="email" placeholder="Enter your email" required
|
| 259 |
+
class="flex-1 px-6 py-3 bg-slate-950/50 border border-slate-700 rounded-xl focus:outline-none focus:ring-2 focus:ring-blue-500 text-white placeholder-slate-500">
|
| 260 |
+
<button type="submit" class="px-6 py-3 bg-blue-600 hover:bg-blue-700 text-white font-semibold rounded-xl transition-colors whitespace-nowrap">
|
| 261 |
+
Subscribe
|
| 262 |
+
</button>
|
| 263 |
+
</form>
|
| 264 |
+
</div>
|
| 265 |
+
</div>
|
| 266 |
+
</section>
|
| 267 |
+
|
| 268 |
+
<!-- Footer -->
|
| 269 |
+
<footer class="bg-slate-900 border-t border-slate-800 pt-16 pb-8">
|
| 270 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 271 |
+
<div class="grid grid-cols-2 md:grid-cols-4 lg:grid-cols-5 gap-8 mb-12">
|
| 272 |
+
<div class="col-span-2 lg:col-span-2">
|
| 273 |
+
<div class="flex items-center gap-2 mb-4">
|
| 274 |
+
<div class="w-8 h-8 bg-blue-500 rounded-lg flex items-center justify-center">
|
| 275 |
+
<i data-lucide="zap" class="w-5 h-5 text-white"></i>
|
| 276 |
+
</div>
|
| 277 |
+
<span class="text-xl font-bold text-white">TechVault</span>
|
| 278 |
+
</div>
|
| 279 |
+
<p class="text-slate-400 mb-6 max-w-sm">Your trusted destination for premium electronics. Quality products, exceptional service, guaranteed satisfaction.</p>
|
| 280 |
+
<div class="flex gap-4">
|
| 281 |
+
<a href="#" class="w-10 h-10 bg-slate-800 hover:bg-slate-700 rounded-lg flex items-center justify-center transition-colors">
|
| 282 |
+
<i data-lucide="twitter" class="w-5 h-5 text-slate-400"></i>
|
| 283 |
+
</a>
|
| 284 |
+
<a href="#" class="w-10 h-10 bg-slate-800 hover:bg-slate-700 rounded-lg flex items-center justify-center transition-colors">
|
| 285 |
+
<i data-lucide="instagram" class="w-5 h-5 text-slate-400"></i>
|
| 286 |
+
</a>
|
| 287 |
+
<a href="#" class="w-10 h-10 bg-slate-800 hover:bg-slate-700 rounded-lg flex items-center justify-center transition-colors">
|
| 288 |
+
<i data-lucide="facebook" class="w-5 h-5 text-slate-400"></i>
|
| 289 |
+
</a>
|
| 290 |
+
<a href="#" class="w-10 h-10 bg-slate-800 hover:bg-slate-700 rounded-lg flex items-center justify-center transition-colors">
|
| 291 |
+
<i data-lucide="youtube" class="w-5 h-5 text-slate-400"></i>
|
| 292 |
+
</a>
|
| 293 |
+
</div>
|
| 294 |
+
</div>
|
| 295 |
+
<div>
|
| 296 |
+
<h4 class="font-semibold text-white mb-4">Products</h4>
|
| 297 |
+
<ul class="space-y-3 text-sm text-slate-400">
|
| 298 |
+
<li><a href="#" class="hover:text-white transition-colors">Smartphones</a></li>
|
| 299 |
+
<li><a href="#" class="hover:text-white transition-colors">Laptops</a></li>
|
| 300 |
+
<li><a href="#" class="hover:text-white transition-colors">Audio</a></li>
|
| 301 |
+
<li><a href="#" class="hover:text-white transition-colors">Gaming</a></li>
|
| 302 |
+
<li><a href="#" class="hover:text-white transition-colors">Accessories</a></li>
|
| 303 |
+
</ul>
|
| 304 |
+
</div>
|
| 305 |
+
<div>
|
| 306 |
+
<h4 class="font-semibold text-white mb-4">Support</h4>
|
| 307 |
+
<ul class="space-y-3 text-sm text-slate-400">
|
| 308 |
+
<li><a href="#" class="hover:text-white transition-colors">Help Center</a></li>
|
| 309 |
+
<li><a href="#" class="hover:text-white transition-colors">Track Order</a></li>
|
| 310 |
+
<li><a href="#" class="hover:text-white transition-colors">Returns</a></li>
|
| 311 |
+
<li><a href="#" class="hover:text-white transition-colors">Warranty</a></li>
|
| 312 |
+
<li><a href="#" class="hover:text-white transition-colors">Contact Us</a></li>
|
| 313 |
+
</ul>
|
| 314 |
+
</div>
|
| 315 |
+
<div>
|
| 316 |
+
<h4 class="font-semibold text-white mb-4">Company</h4>
|
| 317 |
+
<ul class="space-y-3 text-sm text-slate-400">
|
| 318 |
+
<li><a href="#" class="hover:text-white transition-colors">About Us</a></li>
|
| 319 |
+
<li><a href="#" class="hover:text-white transition-colors">Careers</a></li>
|
| 320 |
+
<li><a href="#" class="hover:text-white transition-colors">Press</a></li>
|
| 321 |
+
<li><a href="#" class="hover:text-white transition-colors">Privacy Policy</a></li>
|
| 322 |
+
<li><a href="#" class="hover:text-white transition-colors">Terms of Service</a></li>
|
| 323 |
+
</ul>
|
| 324 |
+
</div>
|
| 325 |
+
</div>
|
| 326 |
+
<div class="pt-8 border-t border-slate-800 flex flex-col md:flex-row justify-between items-center gap-4">
|
| 327 |
+
<p class="text-sm text-slate-500">© 2024 TechVault. All rights reserved.</p>
|
| 328 |
+
<div class="flex items-center gap-6">
|
| 329 |
+
<div class="flex items-center gap-2 text-sm text-slate-500">
|
| 330 |
+
<i data-lucide="credit-card" class="w-4 h-4"></i>
|
| 331 |
+
<span>Secure Payment</span>
|
| 332 |
+
</div>
|
| 333 |
+
<div class="flex gap-2">
|
| 334 |
+
<div class="w-8 h-5 bg-slate-800 rounded"></div>
|
| 335 |
+
<div class="w-8 h-5 bg-slate-800 rounded"></div>
|
| 336 |
+
<div class="w-8 h-5 bg-slate-800 rounded"></div>
|
| 337 |
+
<div class="w-8 h-5 bg-slate-800 rounded"></div>
|
| 338 |
+
</div>
|
| 339 |
+
</div>
|
| 340 |
+
</div>
|
| 341 |
+
</div>
|
| 342 |
+
</footer>
|
| 343 |
+
|
| 344 |
+
<!-- Cart Sidebar -->
|
| 345 |
+
<div id="cart-sidebar" class="fixed inset-y-0 right-0 w-full md:w-96 bg-slate-900 border-l border-slate-800 transform translate-x-full transition-transform duration-300 z-50 shadow-2xl">
|
| 346 |
+
<div class="flex flex-col h-full">
|
| 347 |
+
<div class="flex items-center justify-between p-6 border-b border-slate-800">
|
| 348 |
+
<h2 class="text-xl font-bold text-white flex items-center gap-2">
|
| 349 |
+
<i data-lucide="shopping-cart" class="w-5 h-5"></i>
|
| 350 |
+
Your Cart
|
| 351 |
+
</h2>
|
| 352 |
+
<button onclick="toggleCart()" class="p-2 hover:bg-slate-800 rounded-lg transition-colors">
|
| 353 |
+
<i data-lucide="x" class="w-5 h-5 text-slate-400"></i>
|
| 354 |
+
</button>
|
| 355 |
+
</div>
|
| 356 |
+
<div id="cart-items" class="flex-1 overflow-y-auto p-6 space-y-4">
|
| 357 |
+
<div class="text-center text-slate-500 py-12">
|
| 358 |
+
<i data-lucide="shopping-bag" class="w-12 h-12 mx-auto mb-4 opacity-50"></i>
|
| 359 |
+
<p>Your cart is empty</p>
|
| 360 |
+
</div>
|
| 361 |
+
</div>
|
| 362 |
+
<div class="p-6 border-t border-slate-800 bg-slate-900">
|
| 363 |
+
<div class="space-y-3 mb-6">
|
| 364 |
+
<div class="flex justify-between text-sm">
|
| 365 |
+
<span class="text-slate-400">Subtotal</span>
|
| 366 |
+
<span id="cart-subtotal" class="text-white font-medium">$0.00</span>
|
| 367 |
+
</div>
|
| 368 |
+
<div class="flex justify-between text-sm">
|
| 369 |
+
<span class="text-slate-400">Shipping</span>
|
| 370 |
+
<span class="text-green-400 font-medium">Free</span>
|
| 371 |
+
</div>
|
| 372 |
+
<div class="flex justify-between text-lg font-bold pt-3 border-t border-slate-800">
|
| 373 |
+
<span class="text-white">Total</span>
|
| 374 |
+
<span id="cart-total" class="text-blue-400">$0.00</span>
|
| 375 |
+
</div>
|
| 376 |
+
</div>
|
| 377 |
+
<button onclick="checkout()" class="w-full py-3 bg-blue-600 hover:bg-blue-700 text-white font-semibold rounded-xl transition-colors">
|
| 378 |
+
Checkout
|
| 379 |
+
</button>
|
| 380 |
+
</div>
|
| 381 |
+
</div>
|
| 382 |
+
</div>
|
| 383 |
+
<div id="cart-overlay" class="fixed inset-0 bg-black/50 backdrop-blur-sm z-40 hidden" onclick="toggleCart()"></div>
|
| 384 |
+
|
| 385 |
+
<!-- Product Modal -->
|
| 386 |
+
<div id="product-modal" class="fixed inset-0 z-50 hidden overflow-y-auto">
|
| 387 |
+
<div class="flex items-center justify-center min-h-screen px-4 pt-4 pb-20">
|
| 388 |
+
<div class="fixed inset-0 bg-black/70 backdrop-blur-sm transition-opacity" onclick="closeProductModal()"></div>
|
| 389 |
+
<div class="relative bg-slate-900 rounded-3xl max-w-4xl w-full border border-slate-800 shadow-2xl transform transition-all">
|
| 390 |
+
<button onclick="closeProductModal()" class="absolute top-4 right-4 p-2 bg-slate-800 hover:bg-slate-700 rounded-full transition-colors z-10">
|
| 391 |
+
<i data-lucide="x" class="w-5 h-5 text-slate-400"></i>
|
| 392 |
+
</button>
|
| 393 |
+
<div id="modal-content" class="grid md:grid-cols-2 gap-0">
|
| 394 |
+
<!-- Content injected by JS -->
|
| 395 |
+
</div>
|
| 396 |
+
</div>
|
| 397 |
+
</div>
|
| 398 |
+
</div>
|
| 399 |
+
|
| 400 |
+
<!-- Toast Notification -->
|
| 401 |
+
<div id="toast" class="fixed bottom-6 right-6 bg-slate-800 border border-slate-700 text-white px-6 py-4 rounded-xl shadow-2xl transform translate-y-24 transition-transform duration-300 z-50 flex items-center gap-3">
|
| 402 |
+
<div class="w-8 h-8 bg-green-500/20 rounded-full flex items-center justify-center">
|
| 403 |
+
<i data-lucide="check" class="w-4 h-4 text-green-500"></i>
|
| 404 |
+
</div>
|
| 405 |
+
<span id="toast-message">Added to cart!</span>
|
| 406 |
+
</div>
|
| 407 |
+
|
| 408 |
+
<script src="script.js"></script>
|
| 409 |
+
<script>
|
| 410 |
+
lucide.createIcons();
|
| 411 |
+
</script>
|
| 412 |
+
<script src="https://deepsite.hf.co/deepsite-badge.js"></script>
|
| 413 |
+
</body>
|
| 414 |
+
</html>
|
script.js
ADDED
|
@@ -0,0 +1,449 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Product Data
|
| 2 |
+
const products = [
|
| 3 |
+
{
|
| 4 |
+
id: 1,
|
| 5 |
+
name: "iPhone 15 Pro Max",
|
| 6 |
+
category: "phones",
|
| 7 |
+
price: 1199,
|
| 8 |
+
originalPrice: 1299,
|
| 9 |
+
image: "https://images.unsplash.com/photo-1696446701796-da61225697cc?w=500&auto=format&fit=crop&q=80",
|
| 10 |
+
rating: 4.9,
|
| 11 |
+
reviews: 2341,
|
| 12 |
+
badge: "Best Seller",
|
| 13 |
+
description: "Titanium design. A17 Pro chip. Action button. 48MP Main camera. 5x Telephoto.",
|
| 14 |
+
specs: ["256GB Storage", "A17 Pro Chip", "48MP Camera", "5x Zoom"]
|
| 15 |
+
},
|
| 16 |
+
{
|
| 17 |
+
id: 2,
|
| 18 |
+
name: "MacBook Pro 16",
|
| 19 |
+
category: "laptops",
|
| 20 |
+
price: 2499,
|
| 21 |
+
originalPrice: 2699,
|
| 22 |
+
image: "https://images.unsplash.com/photo-1517336714731-489689fd1ca8?w=500&auto=format&fit=crop&q=80",
|
| 23 |
+
rating: 4.8,
|
| 24 |
+
reviews: 1856,
|
| 25 |
+
badge: "New",
|
| 26 |
+
description: "M3 Max chip. 16-inch Liquid Retina XDR display. Up to 22 hours battery life.",
|
| 27 |
+
specs: ["M3 Max", "36GB RAM", "1TB SSD", "16-inch Display"]
|
| 28 |
+
},
|
| 29 |
+
{
|
| 30 |
+
id: 3,
|
| 31 |
+
name: "Sony WH-1000XM5",
|
| 32 |
+
category: "audio",
|
| 33 |
+
price: 399,
|
| 34 |
+
originalPrice: 449,
|
| 35 |
+
image: "https://images.unsplash.com/photo-1618366712010-f4ae9c647dcb?w=500&auto=format&fit=crop&q=80",
|
| 36 |
+
rating: 4.7,
|
| 37 |
+
reviews: 3422,
|
| 38 |
+
badge: "Popular",
|
| 39 |
+
description: "Industry-leading noise cancellation. 30-hour battery life. Crystal clear hands-free calling.",
|
| 40 |
+
specs: ["Noise Cancelling", "30h Battery", "Multipoint", "LDAC"]
|
| 41 |
+
},
|
| 42 |
+
{
|
| 43 |
+
id: 4,
|
| 44 |
+
name: "PlayStation 5",
|
| 45 |
+
category: "gaming",
|
| 46 |
+
price: 499,
|
| 47 |
+
originalPrice: 549,
|
| 48 |
+
image: "https://images.unsplash.com/photo-1606813907291-d86efa9b94db?w=500&auto=format&fit=crop&q=80",
|
| 49 |
+
rating: 4.9,
|
| 50 |
+
reviews: 5621,
|
| 51 |
+
badge: "Hot",
|
| 52 |
+
description: "Experience lightning-fast loading with an ultra-high-speed SSD and haptic feedback.",
|
| 53 |
+
specs: ["4K Gaming", "Ray Tracing", "SSD", "DualSense"]
|
| 54 |
+
},
|
| 55 |
+
{
|
| 56 |
+
id: 5,
|
| 57 |
+
name: "Apple Watch Ultra 2",
|
| 58 |
+
category: "accessories",
|
| 59 |
+
price: 799,
|
| 60 |
+
originalPrice: 799,
|
| 61 |
+
image: "https://images.unsplash.com/photo-1434493789847-2f02dc6ca35d?w=500&auto=format&fit=crop&q=80",
|
| 62 |
+
rating: 4.8,
|
| 63 |
+
reviews: 1234,
|
| 64 |
+
badge: null,
|
| 65 |
+
description: "The most rugged and capable Apple Watch. 49mm titanium case. Precision GPS.",
|
| 66 |
+
specs: ["49mm", "Titanium", "100m Water", "72h Battery"]
|
| 67 |
+
},
|
| 68 |
+
{
|
| 69 |
+
id: 6,
|
| 70 |
+
name: "Samsung Galaxy S24 Ultra",
|
| 71 |
+
category: "phones",
|
| 72 |
+
price: 1299,
|
| 73 |
+
originalPrice: 1399,
|
| 74 |
+
image: "https://images.unsplash.com/photo-1610945265078-3858a0828671?w=500&auto=format&fit=crop&q=80",
|
| 75 |
+
rating: 4.7,
|
| 76 |
+
reviews: 1890,
|
| 77 |
+
badge: "New",
|
| 78 |
+
description: "Galaxy AI is here. 200MP camera. S Pen built-in. Titanium frame.",
|
| 79 |
+
specs: ["200MP Camera", "S Pen", "Galaxy AI", "Titanium"]
|
| 80 |
+
},
|
| 81 |
+
{
|
| 82 |
+
id: 7,
|
| 83 |
+
name: "Dell XPS 15",
|
| 84 |
+
category: "laptops",
|
| 85 |
+
price: 1899,
|
| 86 |
+
originalPrice: 2099,
|
| 87 |
+
image: "https://images.unsplash.com/photo-1593642632823-8f78536788c6?w=500&auto=format&fit=crop&q=80",
|
| 88 |
+
rating: 4.6,
|
| 89 |
+
reviews: 876,
|
| 90 |
+
badge: null,
|
| 91 |
+
description: "Stunning OLED display. 13th Gen Intel Core. NVIDIA 40-series graphics.",
|
| 92 |
+
specs: ["OLED Touch", "i9-13900H", "RTX 4070", "32GB RAM"]
|
| 93 |
+
},
|
| 94 |
+
{
|
| 95 |
+
id: 8,
|
| 96 |
+
name: "AirPods Pro 2",
|
| 97 |
+
category: "audio",
|
| 98 |
+
price: 249,
|
| 99 |
+
originalPrice: 299,
|
| 100 |
+
image: "https://images.unsplash.com/photo-1603351154351-5cfb3d04ef32?w=500&auto=format&fit=crop&q=80",
|
| 101 |
+
rating: 4.8,
|
| 102 |
+
reviews: 8934,
|
| 103 |
+
badge: "Best Seller",
|
| 104 |
+
description: "Active Noise Cancellation with Adaptive Audio. Personalized Spatial Audio.",
|
| 105 |
+
specs: ["ANC", "Spatial Audio", "6h Battery", "MagSafe"]
|
| 106 |
+
}
|
| 107 |
+
];
|
| 108 |
+
|
| 109 |
+
// State
|
| 110 |
+
let cart = [];
|
| 111 |
+
let currentCategory = 'all';
|
| 112 |
+
let searchQuery = '';
|
| 113 |
+
|
| 114 |
+
// DOM Elements
|
| 115 |
+
const productsGrid = document.getElementById('products-grid');
|
| 116 |
+
const cartSidebar = document.getElementById('cart-sidebar');
|
| 117 |
+
const cartOverlay = document.getElementById('cart-overlay');
|
| 118 |
+
const cartItems = document.getElementById('cart-items');
|
| 119 |
+
const cartBadge = document.getElementById('cart-badge');
|
| 120 |
+
const cartSubtotal = document.getElementById('cart-subtotal');
|
| 121 |
+
const cartTotal = document.getElementById('cart-total');
|
| 122 |
+
const mobileMenu = document.getElementById('mobile-menu');
|
| 123 |
+
const searchOverlay = document.getElementById('search-overlay');
|
| 124 |
+
const searchInput = document.getElementById('search-input');
|
| 125 |
+
|
| 126 |
+
// Initialize
|
| 127 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 128 |
+
renderProducts();
|
| 129 |
+
lucide.createIcons();
|
| 130 |
+
});
|
| 131 |
+
|
| 132 |
+
// Render Products
|
| 133 |
+
function renderProducts() {
|
| 134 |
+
let filtered = products;
|
| 135 |
+
|
| 136 |
+
// Filter by category
|
| 137 |
+
if (currentCategory !== 'all') {
|
| 138 |
+
filtered = filtered.filter(p => p.category === currentCategory);
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
// Filter by search
|
| 142 |
+
if (searchQuery) {
|
| 143 |
+
filtered = filtered.filter(p =>
|
| 144 |
+
p.name.toLowerCase().includes(searchQuery.toLowerCase()) ||
|
| 145 |
+
p.description.toLowerCase().includes(searchQuery.toLowerCase())
|
| 146 |
+
);
|
| 147 |
+
}
|
| 148 |
+
|
| 149 |
+
productsGrid.innerHTML = filtered.map((product, index) => `
|
| 150 |
+
<div class="product-card stagger-item bg-slate-800 rounded-2xl border border-slate-700 overflow-hidden group" style="animation-delay: ${index * 0.1}s">
|
| 151 |
+
<div class="relative img-zoom aspect-square bg-slate-900">
|
| 152 |
+
<img src="${product.image}" alt="${product.name}" class="w-full h-full object-cover">
|
| 153 |
+
${product.badge ? `
|
| 154 |
+
<div class="absolute top-4 left-4 px-3 py-1 bg-blue-600 text-white text-xs font-bold rounded-full">
|
| 155 |
+
${product.badge}
|
| 156 |
+
</div>
|
| 157 |
+
` : ''}
|
| 158 |
+
<button onclick="openProductModal(${product.id})" class="quick-view absolute bottom-4 right-4 p-3 bg-white/90 hover:bg-white text-slate-900 rounded-full shadow-lg backdrop-blur-sm">
|
| 159 |
+
<i data-lucide="eye" class="w-5 h-5"></i>
|
| 160 |
+
</button>
|
| 161 |
+
</div>
|
| 162 |
+
<div class="p-5">
|
| 163 |
+
<div class="flex items-center justify-between mb-2">
|
| 164 |
+
<span class="text-xs font-medium text-blue-400 uppercase tracking-wider">${product.category}</span>
|
| 165 |
+
<div class="flex items-center gap-1 text-sm">
|
| 166 |
+
<i data-lucide="star" class="w-4 h-4 text-yellow-500 fill-yellow-500"></i>
|
| 167 |
+
<span class="text-slate-300">${product.rating}</span>
|
| 168 |
+
<span class="text-slate-500">(${product.reviews})</span>
|
| 169 |
+
</div>
|
| 170 |
+
</div>
|
| 171 |
+
<h3 class="font-semibold text-white mb-2 line-clamp-1">${product.name}</h3>
|
| 172 |
+
<p class="text-sm text-slate-400 mb-4 line-clamp-2">${product.description}</p>
|
| 173 |
+
<div class="flex items-center justify-between">
|
| 174 |
+
<div>
|
| 175 |
+
<span class="text-xl font-bold text-white">$${product.price}</span>
|
| 176 |
+
${product.originalPrice > product.price ? `
|
| 177 |
+
<span class="text-sm text-slate-500 line-through ml-2">$${product.originalPrice}</span>
|
| 178 |
+
` : ''}
|
| 179 |
+
</div>
|
| 180 |
+
<button onclick="addToCart(${product.id})" class="p-3 bg-blue-600 hover:bg-blue-700 text-white rounded-xl transition-all transform hover:scale-105 active:scale-95">
|
| 181 |
+
<i data-lucide="plus" class="w-5 h-5"></i>
|
| 182 |
+
</button>
|
| 183 |
+
</div>
|
| 184 |
+
</div>
|
| 185 |
+
</div>
|
| 186 |
+
`).join('');
|
| 187 |
+
|
| 188 |
+
lucide.createIcons();
|
| 189 |
+
}
|
| 190 |
+
|
| 191 |
+
// Filter by Category
|
| 192 |
+
function filterByCategory(category) {
|
| 193 |
+
currentCategory = category;
|
| 194 |
+
|
| 195 |
+
// Update active button
|
| 196 |
+
document.querySelectorAll('.category-btn').forEach(btn => {
|
| 197 |
+
btn.classList.remove('active');
|
| 198 |
+
});
|
| 199 |
+
event.currentTarget.classList.add('active');
|
| 200 |
+
|
| 201 |
+
renderProducts();
|
| 202 |
+
}
|
| 203 |
+
|
| 204 |
+
// Sort Products
|
| 205 |
+
function sortProducts() {
|
| 206 |
+
const sortValue = document.getElementById('sort-select').value;
|
| 207 |
+
|
| 208 |
+
switch(sortValue) {
|
| 209 |
+
case 'price-low':
|
| 210 |
+
products.sort((a, b) => a.price - b.price);
|
| 211 |
+
break;
|
| 212 |
+
case 'price-high':
|
| 213 |
+
products.sort((a, b) => b.price - a.price);
|
| 214 |
+
break;
|
| 215 |
+
case 'newest':
|
| 216 |
+
products.sort((a, b) => b.id - a.id);
|
| 217 |
+
break;
|
| 218 |
+
default:
|
| 219 |
+
products.sort((a, b) => a.id - b.id);
|
| 220 |
+
}
|
| 221 |
+
|
| 222 |
+
renderProducts();
|
| 223 |
+
}
|
| 224 |
+
|
| 225 |
+
// Search Toggle
|
| 226 |
+
function toggleSearch() {
|
| 227 |
+
searchOverlay.classList.toggle('hidden');
|
| 228 |
+
if (!searchOverlay.classList.contains('hidden')) {
|
| 229 |
+
searchInput.focus();
|
| 230 |
+
}
|
| 231 |
+
}
|
| 232 |
+
|
| 233 |
+
// Search Input Handler
|
| 234 |
+
searchInput.addEventListener('input', (e) => {
|
| 235 |
+
searchQuery = e.target.value;
|
| 236 |
+
renderProducts();
|
| 237 |
+
});
|
| 238 |
+
|
| 239 |
+
// Mobile Menu Toggle
|
| 240 |
+
function toggleMobileMenu() {
|
| 241 |
+
mobileMenu.classList.toggle('hidden');
|
| 242 |
+
}
|
| 243 |
+
|
| 244 |
+
// Cart Toggle
|
| 245 |
+
function toggleCart() {
|
| 246 |
+
cartSidebar.classList.toggle('translate-x-full');
|
| 247 |
+
cartOverlay.classList.toggle('hidden');
|
| 248 |
+
document.body.classList.toggle('overflow-hidden');
|
| 249 |
+
}
|
| 250 |
+
|
| 251 |
+
// Add to Cart
|
| 252 |
+
function addToCart(productId) {
|
| 253 |
+
const product = products.find(p => p.id === productId);
|
| 254 |
+
const existingItem = cart.find(item => item.id === productId);
|
| 255 |
+
|
| 256 |
+
if (existingItem) {
|
| 257 |
+
existingItem.quantity++;
|
| 258 |
+
} else {
|
| 259 |
+
cart.push({ ...product, quantity: 1 });
|
| 260 |
+
}
|
| 261 |
+
|
| 262 |
+
updateCart();
|
| 263 |
+
showToast(`${product.name} added to cart!`);
|
| 264 |
+
}
|
| 265 |
+
|
| 266 |
+
// Remove from Cart
|
| 267 |
+
function removeFromCart(productId) {
|
| 268 |
+
cart = cart.filter(item => item.id !== productId);
|
| 269 |
+
updateCart();
|
| 270 |
+
}
|
| 271 |
+
|
| 272 |
+
// Update Quantity
|
| 273 |
+
function updateQuantity(productId, change) {
|
| 274 |
+
const item = cart.find(item => item.id === productId);
|
| 275 |
+
if (item) {
|
| 276 |
+
item.quantity += change;
|
| 277 |
+
if (item.quantity <= 0) {
|
| 278 |
+
removeFromCart(productId);
|
| 279 |
+
} else {
|
| 280 |
+
updateCart();
|
| 281 |
+
}
|
| 282 |
+
}
|
| 283 |
+
}
|
| 284 |
+
|
| 285 |
+
// Update Cart UI
|
| 286 |
+
function updateCart() {
|
| 287 |
+
// Update badge
|
| 288 |
+
const totalItems = cart.reduce((sum, item) => sum + item.quantity, 0);
|
| 289 |
+
cartBadge.textContent = totalItems;
|
| 290 |
+
cartBadge.classList.toggle('hidden', totalItems === 0);
|
| 291 |
+
|
| 292 |
+
// Update items
|
| 293 |
+
if (cart.length === 0) {
|
| 294 |
+
cartItems.innerHTML = `
|
| 295 |
+
<div class="text-center text-slate-500 py-12">
|
| 296 |
+
<i data-lucide="shopping-bag" class="w-12 h-12 mx-auto mb-4 opacity-50"></i>
|
| 297 |
+
<p>Your cart is empty</p>
|
| 298 |
+
</div>
|
| 299 |
+
`;
|
| 300 |
+
} else {
|
| 301 |
+
cartItems.innerHTML = cart.map(item => `
|
| 302 |
+
<div class="cart-item flex gap-4 p-4 bg-slate-800 rounded-xl border border-slate-700">
|
| 303 |
+
<img src="${item.image}" alt="${item.name}" class="w-20 h-20 object-cover rounded-lg bg-slate-900">
|
| 304 |
+
<div class="flex-1 min-w-0">
|
| 305 |
+
<h4 class="font-medium text-white text-sm truncate">${item.name}</h4>
|
| 306 |
+
<p class="text-blue-400 font-semibold mt-1">$${item.price}</p>
|
| 307 |
+
<div class="flex items-center gap-3 mt-2">
|
| 308 |
+
<button onclick="updateQuantity(${item.id}, -1)" class="w-6 h-6 flex items-center justify-center bg-slate-700 hover:bg-slate-600 rounded text-white text-xs transition-colors">-</button>
|
| 309 |
+
<span class="text-sm text-white w-4 text-center">${item.quantity}</span>
|
| 310 |
+
<button onclick="updateQuantity(${item.id}, 1)" class="w-6 h-6 flex items-center justify-center bg-slate-700 hover:bg-slate-600 rounded text-white text-xs transition-colors">+</button>
|
| 311 |
+
</div>
|
| 312 |
+
</div>
|
| 313 |
+
<button onclick="removeFromCart(${item.id})" class="p-2 hover:bg-slate-700 rounded-lg transition-colors self-start">
|
| 314 |
+
<i data-lucide="trash-2" class="w-4 h-4 text-slate-400"></i>
|
| 315 |
+
</button>
|
| 316 |
+
</div>
|
| 317 |
+
`).join('');
|
| 318 |
+
}
|
| 319 |
+
|
| 320 |
+
// Update totals
|
| 321 |
+
const subtotal = cart.reduce((sum, item) => sum + (item.price * item.quantity), 0);
|
| 322 |
+
cartSubtotal.textContent = `$${subtotal.toFixed(2)}`;
|
| 323 |
+
cartTotal.textContent = `$${subtotal.toFixed(2)}`;
|
| 324 |
+
|
| 325 |
+
lucide.createIcons();
|
| 326 |
+
}
|
| 327 |
+
|
| 328 |
+
// Product Modal
|
| 329 |
+
function openProductModal(productId) {
|
| 330 |
+
const product = products.find(p => p.id === productId);
|
| 331 |
+
const modal = document.getElementById('product-modal');
|
| 332 |
+
const content = document.getElementById('modal-content');
|
| 333 |
+
|
| 334 |
+
content.innerHTML = `
|
| 335 |
+
<div class="img-zoom h-64 md:h-full bg-slate-950 rounded-t-3xl md:rounded-l-3xl md:rounded-tr-none overflow-hidden">
|
| 336 |
+
<img src="${product.image}" alt="${product.name}" class="w-full h-full object-cover">
|
| 337 |
+
</div>
|
| 338 |
+
<div class="p-8 md:p-12 flex flex-col">
|
| 339 |
+
<div class="flex items-center gap-2 mb-4">
|
| 340 |
+
<span class="px-3 py-1 bg-blue-500/20 text-blue-400 text-xs font-bold rounded-full uppercase">${product.category}</span>
|
| 341 |
+
${product.badge ? `<span class="px-3 py-1 bg-purple-500/20 text-purple-400 text-xs font-bold rounded-full">${product.badge}</span>` : ''}
|
| 342 |
+
</div>
|
| 343 |
+
<h2 class="text-3xl font-bold text-white mb-4">${product.name}</h2>
|
| 344 |
+
<div class="flex items-center gap-4 mb-6">
|
| 345 |
+
<div class="flex items-center gap-1">
|
| 346 |
+
<i data-lucide="star" class="w-5 h-5 text-yellow-500 fill-yellow-500"></i>
|
| 347 |
+
<span class="text-white font-semibold">${product.rating}</span>
|
| 348 |
+
</div>
|
| 349 |
+
<span class="text-slate-500">${product.reviews} reviews</span>
|
| 350 |
+
</div>
|
| 351 |
+
<p class="text-slate-400 mb-6 leading-relaxed">${product.description}</p>
|
| 352 |
+
|
| 353 |
+
<div class="grid grid-cols-2 gap-3 mb-8">
|
| 354 |
+
${product.specs.map(spec => `
|
| 355 |
+
<div class="flex items-center gap-2 text-sm text-slate-300">
|
| 356 |
+
<i data-lucide="check-circle" class="w-4 h-4 text-blue-500"></i>
|
| 357 |
+
${spec}
|
| 358 |
+
</div>
|
| 359 |
+
`).join('')}
|
| 360 |
+
</div>
|
| 361 |
+
|
| 362 |
+
<div class="flex items-center justify-between pt-6 border-t border-slate-800 mt-auto">
|
| 363 |
+
<div>
|
| 364 |
+
<span class="text-3xl font-bold text-white">$${product.price}</span>
|
| 365 |
+
${product.originalPrice > product.price ? `
|
| 366 |
+
<span class="text-lg text-slate-500 line-through ml-3">$${product.originalPrice}</span>
|
| 367 |
+
` : ''}
|
| 368 |
+
</div>
|
| 369 |
+
<button onclick="addToCart(${product.id}); closeProductModal();" class="px-8 py-3 bg-blue-600 hover:bg-blue-700 text-white font-semibold rounded-xl transition-all transform hover:scale-105 flex items-center gap-2">
|
| 370 |
+
<i data-lucide="shopping-cart" class="w-5 h-5"></i>
|
| 371 |
+
Add to Cart
|
| 372 |
+
</button>
|
| 373 |
+
</div>
|
| 374 |
+
</div>
|
| 375 |
+
`;
|
| 376 |
+
|
| 377 |
+
modal.classList.remove('hidden');
|
| 378 |
+
lucide.createIcons();
|
| 379 |
+
}
|
| 380 |
+
|
| 381 |
+
function closeProductModal() {
|
| 382 |
+
document.getElementById('product-modal').classList.add('hidden');
|
| 383 |
+
}
|
| 384 |
+
|
| 385 |
+
// Toast Notification
|
| 386 |
+
function showToast(message) {
|
| 387 |
+
const toast = document.getElementById('toast');
|
| 388 |
+
const toastMessage = document.getElementById('toast-message');
|
| 389 |
+
|
| 390 |
+
toastMessage.textContent = message;
|
| 391 |
+
toast.classList.remove('translate-y-24');
|
| 392 |
+
|
| 393 |
+
setTimeout(() => {
|
| 394 |
+
toast.classList.add('translate-y-24');
|
| 395 |
+
}, 3000);
|
| 396 |
+
}
|
| 397 |
+
|
| 398 |
+
// Checkout
|
| 399 |
+
function checkout() {
|
| 400 |
+
if (cart.length === 0) {
|
| 401 |
+
showToast('Your cart is empty!');
|
| 402 |
+
return;
|
| 403 |
+
}
|
| 404 |
+
|
| 405 |
+
// Simulate checkout
|
| 406 |
+
const total = cart.reduce((sum, item) => sum + (item.price * item.quantity), 0);
|
| 407 |
+
showToast(`Proceeding to checkout... Total: $${total.toFixed(2)}`);
|
| 408 |
+
|
| 409 |
+
// In a real app, this would redirect to checkout page
|
| 410 |
+
setTimeout(() => {
|
| 411 |
+
cart = [];
|
| 412 |
+
updateCart();
|
| 413 |
+
toggleCart();
|
| 414 |
+
showToast('Order placed successfully! 🎉');
|
| 415 |
+
}, 1500);
|
| 416 |
+
}
|
| 417 |
+
|
| 418 |
+
// Newsletter Subscribe
|
| 419 |
+
function handleSubscribe(e) {
|
| 420 |
+
e.preventDefault();
|
| 421 |
+
const email = e.target.querySelector('input').value;
|
| 422 |
+
showToast(`Thanks for subscribing with ${email}!`);
|
| 423 |
+
e.target.reset();
|
| 424 |
+
}
|
| 425 |
+
|
| 426 |
+
// Scroll to Products
|
| 427 |
+
function scrollToProducts() {
|
| 428 |
+
document.getElementById('products').scrollIntoView({ behavior: 'smooth' });
|
| 429 |
+
}
|
| 430 |
+
|
| 431 |
+
// Close modal on escape key
|
| 432 |
+
document.addEventListener('keydown', (e) => {
|
| 433 |
+
if (e.key === 'Escape') {
|
| 434 |
+
closeProductModal();
|
| 435 |
+
if (!cartSidebar.classList.contains('translate-x-full')) {
|
| 436 |
+
toggleCart();
|
| 437 |
+
}
|
| 438 |
+
if (!searchOverlay.classList.contains('hidden')) {
|
| 439 |
+
toggleSearch();
|
| 440 |
+
}
|
| 441 |
+
}
|
| 442 |
+
});
|
| 443 |
+
|
| 444 |
+
// Close mobile menu when clicking outside
|
| 445 |
+
document.addEventListener('click', (e) => {
|
| 446 |
+
if (!e.target.closest('nav') && !mobileMenu.classList.contains('hidden')) {
|
| 447 |
+
mobileMenu.classList.add('hidden');
|
| 448 |
+
}
|
| 449 |
+
});
|
style.css
CHANGED
|
@@ -1,28 +1,209 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
}
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
}
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
}
|
| 17 |
|
| 18 |
-
.
|
| 19 |
-
|
| 20 |
-
margin: 0 auto;
|
| 21 |
-
padding: 16px;
|
| 22 |
-
border: 1px solid lightgray;
|
| 23 |
-
border-radius: 16px;
|
| 24 |
}
|
| 25 |
|
| 26 |
-
.
|
| 27 |
-
|
| 28 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Custom Animations */
|
| 2 |
+
@keyframes fade-in {
|
| 3 |
+
from {
|
| 4 |
+
opacity: 0;
|
| 5 |
+
transform: translateY(20px);
|
| 6 |
+
}
|
| 7 |
+
to {
|
| 8 |
+
opacity: 1;
|
| 9 |
+
transform: translateY(0);
|
| 10 |
+
}
|
| 11 |
}
|
| 12 |
|
| 13 |
+
@keyframes float {
|
| 14 |
+
0%, 100% {
|
| 15 |
+
transform: translateY(0px);
|
| 16 |
+
}
|
| 17 |
+
50% {
|
| 18 |
+
transform: translateY(-20px);
|
| 19 |
+
}
|
| 20 |
}
|
| 21 |
|
| 22 |
+
@keyframes pulse-ring {
|
| 23 |
+
0% {
|
| 24 |
+
transform: scale(0.8);
|
| 25 |
+
opacity: 0.5;
|
| 26 |
+
}
|
| 27 |
+
100% {
|
| 28 |
+
transform: scale(1.3);
|
| 29 |
+
opacity: 0;
|
| 30 |
+
}
|
| 31 |
}
|
| 32 |
|
| 33 |
+
.animate-fade-in {
|
| 34 |
+
animation: fade-in 0.8s ease-out;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
}
|
| 36 |
|
| 37 |
+
.animate-float {
|
| 38 |
+
animation: float 6s ease-in-out infinite;
|
| 39 |
}
|
| 40 |
+
|
| 41 |
+
/* Custom Scrollbar */
|
| 42 |
+
::-webkit-scrollbar {
|
| 43 |
+
width: 8px;
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
::-webkit-scrollbar-track {
|
| 47 |
+
background: #0f172a;
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
::-webkit-scrollbar-thumb {
|
| 51 |
+
background: #334155;
|
| 52 |
+
border-radius: 4px;
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
::-webkit-scrollbar-thumb:hover {
|
| 56 |
+
background: #475569;
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
/* Product Card Hover Effects */
|
| 60 |
+
.product-card {
|
| 61 |
+
transition: all 0.3s ease;
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
.product-card:hover {
|
| 65 |
+
transform: translateY(-8px);
|
| 66 |
+
box-shadow: 0 20px 40px -15px rgba(59, 130, 246, 0.3);
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
.product-card .quick-view {
|
| 70 |
+
opacity: 0;
|
| 71 |
+
transform: translateY(10px);
|
| 72 |
+
transition: all 0.3s ease;
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
+
.product-card:hover .quick-view {
|
| 76 |
+
opacity: 1;
|
| 77 |
+
transform: translateY(0);
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
/* Category Button Active State */
|
| 81 |
+
.category-btn.active {
|
| 82 |
+
background: rgba(59, 130, 246, 0.2);
|
| 83 |
+
border-color: rgba(59, 130, 246, 0.5);
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
/* Glassmorphism */
|
| 87 |
+
.glass {
|
| 88 |
+
background: rgba(30, 41, 59, 0.7);
|
| 89 |
+
backdrop-filter: blur(10px);
|
| 90 |
+
-webkit-backdrop-filter: blur(10px);
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
/* Smooth Scroll */
|
| 94 |
+
html {
|
| 95 |
+
scroll-behavior: smooth;
|
| 96 |
+
}
|
| 97 |
+
|
| 98 |
+
/* Selection Color */
|
| 99 |
+
::selection {
|
| 100 |
+
background: rgba(59, 130, 246, 0.3);
|
| 101 |
+
color: white;
|
| 102 |
+
}
|
| 103 |
+
|
| 104 |
+
/* Loading Skeleton */
|
| 105 |
+
.skeleton {
|
| 106 |
+
background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
|
| 107 |
+
background-size: 200% 100%;
|
| 108 |
+
animation: loading 1.5s infinite;
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
@keyframes loading {
|
| 112 |
+
0% {
|
| 113 |
+
background-position: 200% 0;
|
| 114 |
+
}
|
| 115 |
+
100% {
|
| 116 |
+
background-position: -200% 0;
|
| 117 |
+
}
|
| 118 |
+
}
|
| 119 |
+
|
| 120 |
+
/* Cart Item Animation */
|
| 121 |
+
.cart-item {
|
| 122 |
+
animation: slide-in 0.3s ease-out;
|
| 123 |
+
}
|
| 124 |
+
|
| 125 |
+
@keyframes slide-in {
|
| 126 |
+
from {
|
| 127 |
+
opacity: 0;
|
| 128 |
+
transform: translateX(20px);
|
| 129 |
+
}
|
| 130 |
+
to {
|
| 131 |
+
opacity: 1;
|
| 132 |
+
transform: translateX(0);
|
| 133 |
+
}
|
| 134 |
+
}
|
| 135 |
+
|
| 136 |
+
/* Badge Pulse */
|
| 137 |
+
.badge-pulse {
|
| 138 |
+
position: relative;
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
.badge-pulse::before {
|
| 142 |
+
content: '';
|
| 143 |
+
position: absolute;
|
| 144 |
+
inset: -4px;
|
| 145 |
+
border-radius: 50%;
|
| 146 |
+
background: #3b82f6;
|
| 147 |
+
animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
|
| 148 |
+
z-index: -1;
|
| 149 |
+
}
|
| 150 |
+
|
| 151 |
+
/* Image Zoom */
|
| 152 |
+
.img-zoom {
|
| 153 |
+
overflow: hidden;
|
| 154 |
+
}
|
| 155 |
+
|
| 156 |
+
.img-zoom img {
|
| 157 |
+
transition: transform 0.5s ease;
|
| 158 |
+
}
|
| 159 |
+
|
| 160 |
+
.img-zoom:hover img {
|
| 161 |
+
transform: scale(1.1);
|
| 162 |
+
}
|
| 163 |
+
|
| 164 |
+
/* Gradient Text */
|
| 165 |
+
.gradient-text {
|
| 166 |
+
background: linear-gradient(135deg, #60a5fa 0%, #2dd4bf 100%);
|
| 167 |
+
-webkit-background-clip: text;
|
| 168 |
+
-webkit-text-fill-color: transparent;
|
| 169 |
+
background-clip: text;
|
| 170 |
+
}
|
| 171 |
+
|
| 172 |
+
/* Focus Styles */
|
| 173 |
+
button:focus-visible,
|
| 174 |
+
a:focus-visible,
|
| 175 |
+
input:focus-visible {
|
| 176 |
+
outline: 2px solid #3b82f6;
|
| 177 |
+
outline-offset: 2px;
|
| 178 |
+
}
|
| 179 |
+
|
| 180 |
+
/* Mobile Menu Animation */
|
| 181 |
+
#mobile-menu {
|
| 182 |
+
transition: all 0.3s ease;
|
| 183 |
+
max-height: 0;
|
| 184 |
+
overflow: hidden;
|
| 185 |
+
}
|
| 186 |
+
|
| 187 |
+
#mobile-menu:not(.hidden) {
|
| 188 |
+
max-height: 300px;
|
| 189 |
+
}
|
| 190 |
+
|
| 191 |
+
/* Search Overlay */
|
| 192 |
+
#search-overlay {
|
| 193 |
+
transition: all 0.3s ease;
|
| 194 |
+
}
|
| 195 |
+
|
| 196 |
+
/* Stagger Animation for Products */
|
| 197 |
+
.stagger-item {
|
| 198 |
+
opacity: 0;
|
| 199 |
+
animation: fade-in 0.5s ease-out forwards;
|
| 200 |
+
}
|
| 201 |
+
|
| 202 |
+
.stagger-item:nth-child(1) { animation-delay: 0.1s; }
|
| 203 |
+
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
|
| 204 |
+
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
|
| 205 |
+
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
|
| 206 |
+
.stagger-item:nth-child(5) { animation-delay: 0.5s; }
|
| 207 |
+
.stagger-item:nth-child(6) { animation-delay: 0.6s; }
|
| 208 |
+
.stagger-item:nth-child(7) { animation-delay: 0.7s; }
|
| 209 |
+
.stagger-item:nth-child(8) { animation-delay: 0.8s; }
|