-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshop.html
More file actions
324 lines (288 loc) · 16.1 KB
/
shop.html
File metadata and controls
324 lines (288 loc) · 16.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Collections | THREE CROWN WEAR</title>
<meta name="description" content="Browse the sovereign collection of THREE CROWN WEAR. Premium monochrome apparel, accessories, and footwear.">
<!-- Security Headers -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self' https: 'unsafe-inline' 'unsafe-eval'; img-src 'self' https: data:; font-src 'self' https: data:;">
<meta http-equiv="X-XSS-Protection" content="1; mode=block">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@400;500;600;700&display=swap" rel="stylesheet">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/gsap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/ScrollTrigger.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/ScrollToPlugin.min.js"></script>
<script src="https://unpkg.com/lucide@latest"></script>
<link rel="stylesheet" href="css/styles.css">
<script>
tailwind.config = {
theme: {
extend: {
colors: {
'pure-black': '#000000',
'pure-white': '#FFFFFF',
'crown-glass': 'rgba(255, 255, 255, 0.03)',
'crown-border': 'rgba(255, 255, 255, 0.1)',
'crown-muted': 'rgba(255, 255, 255, 0.4)',
},
fontFamily: {
'display': ['Playfair Display', 'serif'],
'body': ['Inter', 'sans-serif'],
}
}
}
}
</script>
</head>
<body class="bg-pure-black text-pure-white selection:bg-pure-white selection:text-pure-black">
<!-- Navigation -->
<nav id="navbar" class="fixed top-0 left-0 right-0 z-50 bg-pure-black/80 backdrop-blur-md border-b border-white/5 py-6 px-6 md:px-12">
<div class="max-w-[1800px] mx-auto flex items-center justify-between">
<a href="index.html" class="font-display text-xl tracking-[0.3em] font-medium">
THREE CROWN WEAR
</a>
<div class="hidden lg:flex items-center gap-16">
<a href="shop.html" class="nav-link active">Collections</a>
<a href="about.html" class="nav-link">Kingdom</a>
<a href="contact.html" class="nav-link">Contact</a>
</div>
<div class="flex items-center gap-8">
<button id="search-trigger" class="hover:opacity-60 transition-opacity">
<i data-lucide="search" class="w-5 h-5"></i>
</button>
<button id="cart-btn" class="relative hover:opacity-60 transition-opacity">
<i data-lucide="shopping-bag" class="w-5 h-5"></i>
<span id="cart-count" class="absolute -top-2 -right-2 w-4 h-4 bg-pure-white text-pure-black text-[10px] rounded-full flex items-center justify-center hidden">0</span>
</button>
<button class="lg:hidden" id="menu-btn">
<i data-lucide="menu" class="w-6 h-6"></i>
</button>
</div>
</div>
</nav>
<!-- Page Header -->
<header class="pt-48 pb-24 px-6 md:px-12 container mx-auto">
<div class="max-w-4xl">
<span class="text-[10px] tracking-[0.5em] uppercase text-white/40 block mb-6">The Sovereign Archive</span>
<h1 class="font-display text-5xl md:text-8xl uppercase leading-none mb-12">Collections</h1>
</div>
<!-- Filters -->
<div class="flex flex-wrap items-center gap-8 border-t border-white/5 pt-12">
<button onclick="Shop.filter('all')" class="text-[10px] tracking-[0.4em] uppercase text-white hover:text-white transition-opacity filter-btn active-filter" data-category="all">All</button>
<button onclick="Shop.filter('clothing')" class="text-[10px] tracking-[0.4em] uppercase text-white/40 hover:text-white transition-opacity filter-btn" data-category="clothing">Clothing</button>
<button onclick="Shop.filter('accessories')" class="text-[10px] tracking-[0.4em] uppercase text-white/40 hover:text-white transition-opacity filter-btn" data-category="accessories">Accessories</button>
<button onclick="Shop.filter('footwear')" class="text-[10px] tracking-[0.4em] uppercase text-white/40 hover:text-white transition-opacity filter-btn" data-category="footwear">Footwear</button>
<button onclick="Shop.filter('premium')" class="text-[10px] tracking-[0.4em] uppercase text-white/40 hover:text-white transition-opacity filter-btn" data-category="premium">Crown Royal</button>
</div>
</header>
<!-- Product Grid -->
<section class="pb-32 px-6 md:px-12 container mx-auto">
<div id="product-grid" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-y-24 gap-x-12">
<!-- Products dynamically populated -->
</div>
<!-- Empty State -->
<div id="shop-empty" class="hidden text-center py-48">
<h3 class="font-display text-4xl mb-8">The Kingdom is expanding...</h3>
<p class="text-xs tracking-[0.4em] uppercase text-white/40 mb-12">Stay tuned for the next drop.</p>
<a href="index.html" class="btn-secondary">Return Home</a>
</div>
</section>
<!-- Imperial Newsletter -->
<section class="py-32 bg-pure-black border-t border-white/5 relative">
<div class="container mx-auto px-6 max-w-4xl text-center">
<h2 class="font-display text-3xl md:text-5xl tracking-[0.1em] uppercase mb-12 newsletter-reveal opacity-0">Enter THE ARCHIVE</h2>
<p class="text-[10px] tracking-[0.4em] uppercase text-white/40 mb-16 newsletter-reveal opacity-0">Signatories receive early access to seasonal artifacts and royal drops.</p>
<form onsubmit="event.preventDefault(); ThreeCrown.showToast('PROTOCOL ACCEPTED. WELCOME TO THE KINGDOM.', 'success'); this.reset();" class="flex flex-col md:flex-row gap-6 justify-center items-center newsletter-reveal opacity-0">
<input type="email" placeholder="YOUR REGISTRY EMAIL" required class="bg-transparent border-b border-white/20 py-4 px-6 text-xs tracking-[0.3em] uppercase focus:outline-none focus:border-white transition-all w-full md:w-96 text-center">
<button type="submit" class="btn-primary py-4 px-12 text-xs">Authorize</button>
</form>
</div>
</section>
<!-- Advanced Footer -->
<footer class="bg-pure-black border-t border-white/5 py-32 px-6 md:px-12">
<div class="max-w-[1800px] mx-auto">
<div class="grid grid-cols-1 lg:grid-cols-4 gap-24 lg:gap-12 mb-32">
<div class="lg:col-span-1">
<h3 class="font-display text-xl tracking-[0.3em] mb-8 uppercase">THREE CROWN WEAR</h3>
<p class="text-white/40 text-xs tracking-widest uppercase leading-loose">
High performance monochrome aesthetics. <br>
Established 2024. <br>
The Kingdom Awaits.
</p>
</div>
<div>
<h4 class="text-[10px] tracking-[0.5em] uppercase text-white/60 mb-12">Collections</h4>
<ul class="space-y-6 text-xs tracking-[0.3em] uppercase">
<li><a href="shop.html?category=clothing" class="hover:text-white/60 transition-colors">Clothing</a></li>
<li><a href="shop.html?category=accessories" class="hover:text-white/60 transition-colors">Accessories</a></li>
<li><a href="shop.html?category=footwear" class="hover:text-white/60 transition-colors">Footwear</a></li>
<li><a href="shop.html?category=premium" class="hover:text-white/60 transition-colors">Crown Royal</a></li>
</ul>
</div>
<div>
<h4 class="text-[10px] tracking-[0.5em] uppercase text-white/60 mb-12">Support</h4>
<ul class="space-y-6 text-xs tracking-[0.3em] uppercase">
<li><a href="contact.html" class="hover:text-white/60 transition-colors">Contact Us</a></li>
<li><a href="about.html" class="hover:text-white/60 transition-colors">Our Story</a></li>
<li><a href="admin/index.html" class="hover:text-white/60 transition-colors">Admin Portal</a></li>
<li><a href="#" class="hover:text-white/60 transition-colors">Shipping & Returns</a></li>
</ul>
</div>
<div>
<h4 class="text-[10px] tracking-[0.5em] uppercase text-white/60 mb-12">Follow</h4>
<div class="flex gap-8">
<a href="#" class="hover:opacity-60 transition-opacity"><i data-lucide="instagram" class="w-5 h-5"></i></a>
<a href="#" class="hover:opacity-60 transition-opacity"><i data-lucide="twitter" class="w-5 h-5"></i></a>
<a href="#" class="hover:opacity-60 transition-opacity"><i data-lucide="facebook" class="w-5 h-5"></i></a>
</div>
<div class="mt-12">
<p class="text-xs tracking-[0.4em] uppercase text-white/40">threecrownwear@gmail.com</p>
<p class="text-xs tracking-[0.4em] uppercase text-white/40 mt-2">+92 344 0455505</p>
</div>
</div>
</div>
<div class="flex flex-col md:flex-row justify-between items-center border-t border-white/5 pt-12">
<p class="text-[10px] tracking-[0.4em] uppercase text-white/20">© 2024 THREE CROWN WEAR. All Rights Reserved.</p>
<div class="flex gap-12 mt-6 md:mt-0">
<a href="privacy.html" class="text-[10px] tracking-[0.4em] uppercase text-white/20 hover:text-white transition-colors">Privacy</a>
<a href="terms.html" class="text-[10px] tracking-[0.4em] uppercase text-white/20 hover:text-white transition-colors">Terms</a>
</div>
</div>
</div>
</footer>
<!-- Cart Components (Drawer & Overlay) -->
<div id="cart-drawer" class="fixed top-0 right-0 h-full w-full md:w-[450px] bg-pure-black border-l border-white/10 z-[110] translate-x-full transition-transform duration-700 ease-out">
<div class="flex flex-col h-full p-12">
<div class="flex items-center justify-between mb-16">
<h3 class="font-display text-2xl tracking-[0.2em] uppercase">Cart</h3>
<button id="close-cart" class="text-white/60 hover:text-white"><i data-lucide="x" class="w-6 h-6"></i></button>
</div>
<div id="cart-items" class="flex-1 overflow-y-auto"></div>
<div class="mt-12 border-t border-white/5 pt-12">
<div class="flex justify-between items-center mb-12">
<span class="text-[10px] tracking-[0.5em] uppercase text-white/40">Subtotal</span>
<span id="cart-total" class="font-display text-2xl">$0.00</span>
</div>
<a href="checkout.html" id="checkout-btn" class="btn-primary w-full shadow-2xl block text-center">Proceed to Checkout</a>
</div>
</div>
</div>
<div id="cart-overlay" class="fixed inset-0 bg-black/60 backdrop-blur-sm z-[105] hidden"></div>
<!-- Search Modal -->
<div id="search-modal" class="fixed inset-0 z-[100] bg-pure-black h-screen w-full hidden opacity-0">
<div class="flex flex-col items-center justify-center h-full px-6">
<button id="close-search" class="absolute top-12 right-12 text-white/60 hover:text-white transition-colors">
<i data-lucide="x" class="w-10 h-10"></i>
</button>
<div class="w-full max-w-4xl text-center">
<input type="text" id="search-input" placeholder="Search the Kingdom..." class="w-full bg-transparent border-b border-white/10 py-8 text-4xl md:text-7xl font-display text-center focus:outline-none focus:border-white transition-colors placeholder:text-white/10 uppercase">
<div id="search-results" class="mt-12 grid grid-cols-1 md:grid-cols-2 gap-8 text-left"></div>
</div>
</div>
</div>
<!-- Toast Container -->
<div id="toast-container" class="fixed bottom-12 right-12 z-[200] flex flex-col gap-4"></div>
<script src="js/main.js"></script>
<script>
const Shop = {
products: JSON.parse(localStorage.getItem('tcw_products') || '[]'),
init() {
const params = new URLSearchParams(window.location.search);
const cat = params.get('category') || 'all';
const searchQuery = params.get('search');
if (searchQuery) {
this.performSearch(searchQuery);
} else {
this.filter(cat);
}
},
performSearch(query) {
const q = query.toLowerCase();
const filtered = this.products.filter(p =>
p.name.toLowerCase().includes(q) ||
p.category.toLowerCase().includes(q) ||
p.description.toLowerCase().includes(q)
);
// Update UI to show search title
document.querySelector('h1').textContent = `Results: ${query}`;
document.querySelectorAll('.filter-btn').forEach(btn => btn.classList.remove('text-white', 'active-filter'));
this.render(filtered);
},
filter(category) {
// Update active UI
document.querySelectorAll('.filter-btn').forEach(btn => {
if (btn.getAttribute('data-category') === category) {
btn.classList.add('text-white');
btn.classList.remove('text-white/40');
} else {
btn.classList.remove('text-white');
btn.classList.add('text-white/40');
}
});
const filtered = category === 'all'
? this.products
: this.products.filter(p => p.category.toLowerCase() === category.toLowerCase());
this.render(filtered);
},
render(items) {
const grid = document.getElementById('product-grid');
const empty = document.getElementById('shop-empty');
if (items.length === 0) {
grid.classList.add('hidden');
empty.classList.remove('hidden');
return;
}
grid.classList.remove('hidden');
empty.classList.add('hidden');
grid.innerHTML = items.map((p, i) => `
<div class="product-card group animate-slide-up" style="animation-delay: ${i * 0.1}s">
<a href="product.html?id=${p.id}" class="block relative overflow-hidden bg-white/5 aspect-[4/5] border border-white/5 group-hover:border-white/20 transition-all duration-700">
<img src="${p.images[0]}" class="product-image w-full h-full object-cover transition-all duration-1000" alt="${sanitizeHTML(p.name)}">
${p.isLimitedEdition ? '<span class="absolute top-8 right-8 text-[8px] tracking-[0.4em] uppercase bg-white text-black px-3 py-1 font-bold z-10">Limited</span>' : ''}
<div class="absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-all duration-700"></div>
</a>
<div class="product-info mt-12 flex justify-between items-start">
<div>
<span class="product-category text-[9px] tracking-[0.3em] uppercase text-white/40 block mb-2">${sanitizeHTML(p.category)}</span>
<h3 class="font-display text-xl tracking-[0.1em] uppercase group-hover:tracking-[0.2em] transition-all duration-700">${sanitizeHTML(p.name)}</h3>
</div>
<span class="font-display text-xl text-white/80">$${p.price.toFixed(2)}</span>
</div>
</div>
`).join('');
// Re-trigger animation if necessary (though using class is fine)
}
};
document.addEventListener('DOMContentLoaded', () => {
Shop.init();
// Scroll Animations
gsap.registerPlugin(ScrollTrigger);
gsap.to('.product-card', {
scrollTrigger: {
trigger: '#product-grid',
start: 'top 85%',
},
opacity: 1,
y: 0,
stagger: 0.1,
duration: 1,
ease: 'power3.out'
});
gsap.to('.newsletter-reveal', {
scrollTrigger: {
trigger: '.newsletter-reveal',
start: 'top 90%',
},
opacity: 1,
y: 0,
stagger: 0.2,
duration: 1.5,
ease: 'power3.out'
});
});
</script>
</body>
</html>