Download index.html from fokox/codex: direct link, hf CLI and curl.
- Browser
- Download file 69.6 kB
-
https://huggingface.co/spaces/fokox/codex/resolve/main/index.html
- Command line
-
hf download hf://spaces/fokox/codex/index.html
-
curl -L -o index.html https://huggingface.co/spaces/fokox/codex/resolve/main/index.html
69.6 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dazai Starshop | Premium Online Store</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: {
50: '#f0f9ff',
100: '#e0f2fe',
200: '#bae6fd',
300: '#7dd3fc',
400: '#38bdf8',
500: '#0ea5e9',
600: '#0284c7',
700: '#0369a1',
800: '#075985',
900: '#0c4a6e',
},
glass: 'rgba(255, 255, 255, 0.15)',
'glass-dark': 'rgba(0, 0, 0, 0.15)',
'mat-glass': 'rgba(255, 255, 255, 0.05)',
},
backdropBlur: {
xs: '2px',
sm: '4px',
md: '8px',
lg: '12px',
xl: '16px',
},
boxShadow: {
'glow': '0 0 15px rgba(56, 189, 248, 0.5)',
'glow-sm': '0 0 8px rgba(56, 189, 248, 0.3)',
'glow-lg': '0 0 25px rgba(56, 189, 248, 0.7)',
},
animation: {
'float': 'float 6s ease-in-out infinite',
'float-reverse': 'float-reverse 5s ease-in-out infinite',
'pulse-slow': 'pulse 4s cubic-bezier(0.4, 0, 0.6, 1) infinite',
},
keyframes: {
float: {
'0%, 100%': { transform: 'translateY(0)' },
'50%': { transform: 'translateY(-10px)' },
},
'float-reverse': {
'0%, 100%': { transform: 'translateY(0)' },
'50%': { transform: 'translateY(10px)' },
}
}
}
}
}
</script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
body {
font-family: 'Poppins', sans-serif;
background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #bae6fd 100%);
min-height: 100vh;
color: #0c4a6e;
}
.glass-card {
background: rgba(255, 255, 255, 0.15);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
border: 1px solid rgba(255, 255, 255, 0.18);
box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}
.glass-card-dark {
background: rgba(0, 0, 0, 0.15);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
border: 1px solid rgba(255, 255, 255, 0.05);
}
.mat-glass {
background: rgba(255, 255, 255, 0.05);
backdrop-filter: blur(4px);
-webkit-backdrop-filter: blur(4px);
}
.hover-glow:hover {
box-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
transition: all 0.3s ease;
}
.under-glow {
position: relative;
}
.under-glow::after {
content: '';
position: absolute;
bottom: -5px;
left: 0;
width: 100%;
height: 2px;
background: rgba(56, 189, 248, 0.5);
transform: scaleX(0);
transform-origin: right;
transition: transform 0.3s ease;
}
.under-glow:hover::after {
transform: scaleX(1);
transform-origin: left;
}
.product-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 25px -5px rgba(56, 189, 248, 0.4);
}
.cart-item-enter {
opacity: 0;
transform: translateX(-20px);
}
.cart-item-enter-active {
opacity: 1;
transform: translateX(0);
transition: all 300ms ease;
}
.cart-item-exit {
opacity: 1;
}
.cart-item-exit-active {
opacity: 0;
transform: translateX(20px);
transition: all 300ms ease;
}
.wave-bg {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
overflow: hidden;
line-height: 0;
transform: rotate(180deg);
}
.wave-bg svg {
position: relative;
display: block;
width: calc(100% + 1.3px);
height: 150px;
}
.wave-bg .shape-fill {
fill: rgba(56, 189, 248, 0.15);
}
.blob {
position: absolute;
width: 300px;
height: 300px;
background: linear-gradient(135deg, rgba(56, 189, 248, 0.2) 0%, rgba(14, 165, 233, 0.3) 100%);
border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
filter: blur(30px);
z-index: -1;
}
.blob-1 {
top: 10%;
left: 10%;
animation: float 8s ease-in-out infinite;
}
.blob-2 {
bottom: 10%;
right: 10%;
animation: float-reverse 7s ease-in-out infinite;
}
.blob-3 {
top: 50%;
right: 20%;
animation: float 9s ease-in-out infinite;
}
.notification {
position: fixed;
top: 20px;
right: 20px;
z-index: 1000;
opacity: 0;
transform: translateX(100%);
transition: all 0.3s ease;
}
.notification.show {
opacity: 1;
transform: translateX(0);
}
.dropdown-enter {
opacity: 0;
transform: translateY(-10px);
}
.dropdown-enter-active {
opacity: 1;
transform: translateY(0);
transition: all 0.2s ease;
}
.dropdown-exit {
opacity: 1;
}
.dropdown-exit-active {
opacity: 0;
transform: translateY(-10px);
transition: all 0.2s ease;
}
.tab-underline::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 2px;
background: #0ea5e9;
transform: scaleX(0);
transition: transform 0.3s ease;
}
.tab-underline.active::after {
transform: scaleX(1);
}
@keyframes shimmer {
0% {
background-position: -468px 0;
}
100% {
background-position: 468px 0;
}
}
.shimmer {
background: linear-gradient(to right, #f0f0f0 8%, #e0e0e0 18%, #f0f0f0 33%);
background-size: 800px 104px;
animation: shimmer 1.5s infinite linear;
}
</style>
</head>
<body class="relative overflow-x-hidden">
<!-- Blob background elements -->
<div class="blob blob-1"></div>
<div class="blob blob-2"></div>
<div class="blob blob-3"></div>
<!-- Notification system -->
<div id="notification" class="notification glass-card rounded-lg p-4 shadow-lg hidden">
<div class="flex items-center">
<div id="notification-icon" class="mr-3"></div>
<div>
<h4 id="notification-title" class="font-semibold"></h4>
<p id="notification-message" class="text-sm"></p>
</div>
</div>
</div>
<!-- Navigation -->
<nav class="glass-card sticky top-0 z-50">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex items-center justify-between h-16">
<!-- Logo -->
<div class="flex-shrink-0 flex items-center">
<div class="flex items-center">
<i class="fas fa-star text-2xl text-primary-600 mr-2"></i>
<span class="text-xl font-bold text-primary-800">Dazai Starshop</span>
</div>
</div>
<!-- Desktop Menu -->
<div class="hidden md:block">
<div class="ml-10 flex items-baseline space-x-4">
<a href="#" class="under-glow px-3 py-2 rounded-md text-sm font-medium text-primary-800 hover:text-primary-600 transition">Home</a>
<a href="#products" class="under-glow px-3 py-2 rounded-md text-sm font-medium text-primary-800 hover:text-primary-600 transition">Products</a>
<a href="#features" class="under-glow px-3 py-2 rounded-md text-sm font-medium text-primary-800 hover:text-primary-600 transition">Features</a>
<a href="#about" class="under-glow px-3 py-2 rounded-md text-sm font-medium text-primary-800 hover:text-primary-600 transition">About</a>
</div>
</div>
<!-- Right side icons -->
<div class="hidden md:block">
<div class="ml-4 flex items-center md:ml-6">
<!-- Search -->
<div class="relative mx-4">
<input type="text" placeholder="Search..." class="mat-glass pl-10 pr-4 py-2 rounded-full text-sm focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent w-64">
<i class="fas fa-search absolute left-3 top-2.5 text-primary-600"></i>
</div>
<!-- Cart -->
<button id="cart-btn" class="p-1 rounded-full text-primary-800 hover:text-primary-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500 relative">
<i class="fas fa-shopping-cart text-xl"></i>
<span id="cart-count" class="absolute -top-2 -right-2 bg-primary-600 text-white text-xs font-bold rounded-full h-5 w-5 flex items-center justify-center">0</span>
</button>
<!-- Profile dropdown -->
<div class="ml-3 relative">
<div>
<button id="user-menu" class="max-w-xs flex items-center text-sm rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500">
<img id="profile-img" class="h-8 w-8 rounded-full" src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80" alt="Profile">
</button>
</div>
<!-- Dropdown menu -->
<div id="profile-dropdown" class="origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg py-1 glass-card hidden" style="z-index: 100;">
<a href="#" class="block px-4 py-2 text-sm text-primary-800 hover:bg-primary-100 hover:text-primary-900" id="profile-link">Your Profile</a>
<a href="#" class="block px-4 py-2 text-sm text-primary-800 hover:bg-primary-100 hover:text-primary-900" id="orders-link">Orders</a>
<a href="#" class="block px-4 py-2 text-sm text-primary-800 hover:bg-primary-100 hover:text-primary-900" id="settings-link">Settings</a>
<div class="border-t border-gray-200 my-1"></div>
<a href="#" class="block px-4 py-2 text-sm text-primary-800 hover:bg-primary-100 hover:text-primary-900" id="signout-link">Sign out</a>
</div>
</div>
</div>
</div>
<!-- Mobile menu button -->
<div class="md:hidden flex items-center">
<button id="mobile-menu-btn" class="p-1 rounded-full text-primary-800 hover:text-primary-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500 relative mr-2">
<i class="fas fa-shopping-cart text-xl"></i>
<span id="mobile-cart-count" class="absolute -top-2 -right-2 bg-primary-600 text-white text-xs font-bold rounded-full h-5 w-5 flex items-center justify-center">0</span>
</button>
<button id="mobile-menu-toggle" class="inline-flex items-center justify-center p-2 rounded-md text-primary-800 hover:text-primary-600 hover:bg-primary-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500">
<span class="sr-only">Open main menu</span>
<i class="fas fa-bars"></i>
</button>
</div>
</div>
</div>
<!-- Mobile menu -->
<div id="mobile-menu" class="md:hidden hidden">
<div class="px-2 pt-2 pb-3 space-y-1 sm:px-3">
<a href="#" class="block px-3 py-2 rounded-md text-base font-medium text-primary-800 hover:text-primary-600 hover:bg-primary-100">Home</a>
<a href="#products" class="block px-3 py-2 rounded-md text-base font-medium text-primary-800 hover:text-primary-600 hover:bg-primary-100">Products</a>
<a href="#features" class="block px-3 py-2 rounded-md text-base font-medium text-primary-800 hover:text-primary-600 hover:bg-primary-100">Features</a>
<a href="#about" class="block px-3 py-2 rounded-md text-base font-medium text-primary-800 hover:text-primary-600 hover:bg-primary-100">About</a>
</div>
<div class="pt-4 pb-3 border-t border-primary-200">
<div class="flex items-center px-5">
<div class="flex-shrink-0">
<img class="h-10 w-10 rounded-full" src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80" alt="Profile">
</div>
<div class="ml-3">
<div class="text-base font-medium text-primary-800">John Doe</div>
<div class="text-sm font-medium text-primary-600">john@example.com</div>
</div>
</div>
<div class="mt-3 px-2 space-y-1">
<a href="#" class="block px-3 py-2 rounded-md text-base font-medium text-primary-800 hover:text-primary-600 hover:bg-primary-100">Your Profile</a>
<a href="#" class="block px-3 py-2 rounded-md text-base font-medium text-primary-800 hover:text-primary-600 hover:bg-primary-100">Orders</a>
<a href="#" class="block px-3 py-2 rounded-md text-base font-medium text-primary-800 hover:text-primary-600 hover:bg-primary-100">Settings</a>
<a href="#" class="block px-3 py-2 rounded-md text-base font-medium text-primary-800 hover:text-primary-600 hover:bg-primary-100">Sign out</a>
</div>
</div>
</div>
</nav>
<!-- Hero Section -->
<section class="relative">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-20 md:py-32">
<div class="glass-card rounded-2xl p-8 md:p-12 shadow-xl hover-glow transition">
<div class="flex flex-col md:flex-row items-center">
<div class="md:w-1/2 mb-10 md:mb-0 md:pr-10">
<h1 class="text-4xl md:text-5xl font-bold text-primary-900 mb-4">Welcome to Dazai Starshop</h1>
<p class="text-lg text-primary-700 mb-8">Your premier destination for quality products at wholesale prices. Join thousands of satisfied customers today!</p>
<div class="flex flex-col sm:flex-row space-y-4 sm:space-y-0 sm:space-x-4">
<a href="#products" class="bg-primary-600 hover:bg-primary-700 text-white px-6 py-3 rounded-lg font-medium transition duration-300 transform hover:scale-105 shadow-lg hover:shadow-xl text-center">Shop Now</a>
<a href="#features" class="border border-primary-600 text-primary-600 hover:bg-primary-50 px-6 py-3 rounded-lg font-medium transition duration-300 transform hover:scale-105 text-center">Become a Seller</a>
</div>
</div>
<div class="md:w-1/2 relative">
<div class="relative w-full h-64 md:h-96">
<img src="https://images.unsplash.com/photo-1556740738-b6a63e27c4df?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80" alt="Hero Image" class="absolute inset-0 w-full h-full object-contain object-center rounded-xl shadow-lg animation-float">
<div class="absolute -inset-4 bg-primary-500 rounded-xl opacity-20 blur-xl"></div>
</div>
</div>
</div>
</div>
</div>
<div class="wave-bg">
<svg data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none">
<path d="M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z" class="shape-fill"></path>
</svg>
</div>
</section>
<!-- Featured Products -->
<section id="products" class="py-16 bg-gradient-to-b from-primary-50 to-white">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="text-center mb-16">
<h2 class="text-3xl font-bold text-primary-900 mb-4">Featured Products</h2>
<p class="text-lg text-primary-600 max-w-3xl mx-auto">Browse our wide selection of wholesale products</p>
</div>
<!-- Category tabs -->
<div class="flex justify-center mb-10">
<div class="glass-card rounded-full p-1 inline-flex">
<div class="flex space-x-1">
<button class="tab-underline relative px-4 py-2 text-sm font-medium rounded-full focus:outline-none active" data-category="all">All</button>
<button class="tab-underline relative px-4 py-2 text-sm font-medium rounded-full focus:outline-none" data-category="electronics">Electronics</button>
<button class="tab-underline relative px-4 py-2 text-sm font-medium rounded-full focus:outline-none" data-category="clothing">Clothing</button>
<button class="tab-underline relative px-4 py-2 text-sm font-medium rounded-full focus:outline-none" data-category="home">Home</button>
<button class="tab-underline relative px-4 py-2 text-sm font-medium rounded-full focus:outline-none" data-category="accessories">Accessories</button>
</div>
</div>
</div>
<!-- Product grid -->
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-8" id="product-grid">
<!-- Products will be loaded here dynamically -->
</div>
<div class="text-center mt-12">
<button id="load-more" class="bg-primary-600 hover:bg-primary-700 text-white px-6 py-3 rounded-lg font-medium transition duration-300 transform hover:scale-105 shadow-lg hover:shadow-xl">Load More</button>
</div>
</div>
</section>
<!-- Features Section -->
<section id="features" class="py-20 bg-white">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="text-center mb-16">
<h2 class="text-3xl font-bold text-primary-900 mb-4">Why Choose Dazai Starshop</h2>
<p class="text-lg text-primary-600 max-w-3xl mx-auto">We connect buyers with quality suppliers worldwide</p>
</div>
<div class="grid md:grid-cols-3 gap-8">
<div class="glass-card rounded-xl p-8 hover-glow transition">
<div class="flex justify-center mb-6">
<div class="bg-primary-100 rounded-full p-4">
<i class="fas fa-globe text-primary-600 text-2xl"></i>
</div>
</div>
<h3 class="text-xl font-bold text-center text-primary-800 mb-3">Global Marketplace</h3>
<p class="text-primary-600 text-center">Access millions of products from suppliers around the world, all in one place.</p>
</div>
<div class="glass-card rounded-xl p-8 hover-glow transition">
<div class="flex justify-center mb-6">
<div class="bg-primary-100 rounded-full p-4">
<i class="fas fa-shield-alt text-primary-600 text-2xl"></i>
</div>
</div>
<h3 class="text-xl font-bold text-center text-primary-800 mb-3">Trade Assurance</h3>
<p class="text-primary-600 text-center">Your orders are protected from payment to delivery with our secure system.</p>
</div>
<div class="glass-card rounded-xl p-8 hover-glow transition">
<div class="flex justify-center mb-6">
<div class="bg-primary-100 rounded-full p-4">
<i class="fas fa-tags text-primary-600 text-2xl"></i>
</div>
</div>
<h3 class="text-xl font-bold text-center text-primary-800 mb-3">Competitive Prices</h3>
<p class="text-primary-600 text-center">Get the best wholesale prices directly from manufacturers and suppliers.</p>
</div>
</div>
</div>
</section>
<!-- About Section -->
<section id="about" class="py-20 bg-gradient-to-b from-white to-primary-50 relative">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="glass-card rounded-2xl p-8 md:p-12 shadow-xl hover-glow transition">
<div class="flex flex-col md:flex-row items-center">
<div class="md:w-1/2 mb-10 md:mb-0 md:pr-10">
<h2 class="text-3xl font-bold text-primary-900 mb-6">About Dazai Starshop</h2>
<p class="text-primary-700 mb-4">Founded in 2015, Dazai Starshop has grown to become one of the leading B2B e-commerce platforms, connecting buyers with quality suppliers worldwide.</p>
<p class="text-primary-700 mb-6">Our mission is to make global trade easier and more accessible for businesses of all sizes, from small retailers to large corporations.</p>
<div class="flex items-center space-x-4">
<div class="flex items-center">
<i class="fas fa-check-circle text-primary-600 mr-2"></i>
<span class="text-primary-700">10M+ Products</span>
</div>
<div class="flex items-center">
<i class="fas fa-check-circle text-primary-600 mr-2"></i>
<span class="text-primary-700">200+ Countries</span>
</div>
</div>
</div>
<div class="md:w-1/2">
<div class="relative w-full h-64 md:h-96 rounded-xl overflow-hidden">
<img src="https://images.unsplash.com/photo-1522202176988-66273c2fd55f?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80" alt="Our Team" class="absolute inset-0 w-full h-full object-cover">
<div class="absolute inset-0 bg-primary-500 opacity-20"></div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Newsletter -->
<section class="py-16 bg-primary-800 text-white">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="glass-card-dark rounded-2xl p-8 md:p-12 shadow-xl">
<div class="flex flex-col md:flex-row items-center justify-between">
<div class="md:w-1/2 mb-8 md:mb-0">
<h2 class="text-2xl font-bold mb-2">Join Our Community</h2>
<p class="text-primary-200">Subscribe to get the latest product updates, wholesale deals, and business tips.</p>
</div>
<div class="md:w-1/2">
<form class="flex flex-col sm:flex-row gap-4">
<input type="email" placeholder="Your email address" class="flex-grow px-4 py-3 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 text-primary-900">
<button type="submit" class="bg-primary-600 hover:bg-primary-700 text-white px-6 py-3 rounded-lg font-medium transition duration-300 transform hover:scale-105 shadow-lg hover:shadow-xl">Subscribe</button>
</form>
</div>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer class="bg-primary-900 text-white pt-16 pb-8">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="grid grid-cols-2 md:grid-cols-4 gap-8 mb-12">
<div>
<h3 class="text-lg font-semibold mb-4">Buyer Services</h3>
<ul class="space-y-2">
<li><a href="#" class="text-primary-300 hover:text-white transition">Browse Products</a></li>
<li><a href="#" class="text-primary-300 hover:text-white transition">Request for Quotation</a></li>
<li><a href="#" class="text-primary-300 hover:text-white transition">Manage Orders</a></li>
<li><a href="#" class="text-primary-300 hover:text-white transition">Trade Assurance</a></li>
</ul>
</div>
<div>
<h3 class="text-lg font-semibold mb-4">Supplier Services</h3>
<ul class="space-y-2">
<li><a href="#" class="text-primary-300 hover:text-white transition">Supplier Membership</a></li>
<li><a href="#" class="text-primary-300 hover:text-white transition">Learn to Sell</a></li>
<li><a href="#" class="text-primary-300 hover:text-white transition">Industry Insights</a></li>
<li><a href="#" class="text-primary-300 hover:text-white transition">Seller Center</a></li>
</ul>
</div>
<div>
<h3 class="text-lg font-semibold mb-4">About Dazai</h3>
<ul class="space-y-2">
<li><a href="#" class="text-primary-300 hover:text-white transition">About Us</a></li>
<li><a href="#" class="text-primary-300 hover:text-white transition">Careers</a></li>
<li><a href="#" class="text-primary-300 hover:text-white transition">Sustainability</a></li>
<li><a href="#" class="text-primary-300 hover:text-white transition">Press Center</a></li>
</ul>
</div>
<div>
<h3 class="text-lg font-semibold mb-4">Help & Contact</h3>
<div class="flex space-x-4 mb-4">
<a href="#" class="text-primary-300 hover:text-white transition"><i class="fab fa-facebook-f"></i></a>
<a href="#" class="text-primary-300 hover:text-white transition"><i class="fab fa-twitter"></i></a>
<a href="#" class="text-primary-300 hover:text-white transition"><i class="fab fa-linkedin-in"></i></a>
<a href="#" class="text-primary-300 hover:text-white transition"><i class="fab fa-youtube"></i></a>
</div>
<p class="text-primary-300">Email: support@dazaistarshop.com</p>
<p class="text-primary-300">Phone: +1 (555) 123-4567</p>
</div>
</div>
<div class="border-t border-primary-800 pt-8">
<div class="flex flex-col md:flex-row justify-between items-center">
<div class="flex items-center mb-4 md:mb-0">
<i class="fas fa-star text-2xl text-primary-300 mr-2"></i>
<span class="text-xl font-bold text-white">Dazai Starshop</span>
</div>
<p class="text-primary-300 text-sm">© 2023 Dazai Starshop. All rights reserved.</p>
</div>
</div>
</div>
</footer>
<!-- Shopping Cart Sidebar -->
<div id="cart-sidebar" class="fixed inset-y-0 right-0 w-full sm:w-96 bg-white shadow-xl transform translate-x-full transition-transform duration-300 ease-in-out z-50 overflow-y-auto">
<div class="flex flex-col h-full">
<!-- Cart header -->
<div class="glass-card p-6 border-b border-gray-200">
<div class="flex items-center justify-between">
<h3 class="text-lg font-medium text-primary-900">Your Cart</h3>
<button id="close-cart" class="text-primary-500 hover:text-primary-700 focus:outline-none">
<i class="fas fa-times"></i>
</button>
</div>
<p id="cart-summary" class="text-sm text-primary-600 mt-1">0 items</p>
</div>
<!-- Cart items -->
<div id="cart-items" class="flex-1 overflow-y-auto p-6">
<!-- Empty cart state -->
<div id="empty-cart" class="flex flex-col items-center justify-center h-full">
<i class="fas fa-shopping-cart text-4xl text-primary-300 mb-4"></i>
<p class="text-lg text-primary-600 mb-6">Your cart is empty</p>
<a href="#products" class="bg-primary-600 hover:bg-primary-700 text-white px-6 py-3 rounded-lg font-medium transition duration-300">Continue Shopping</a>
</div>
<!-- Cart items will be loaded here dynamically -->
</div>
<!-- Cart footer -->
<div id="cart-footer" class="glass-card border-t border-gray-200 p-6 hidden">
<div class="flex justify-between mb-4">
<span class="text-primary-700">Subtotal</span>
<span id="cart-subtotal" class="font-medium text-primary-900">$0.00</span>
</div>
<div class="flex justify-between mb-6">
<span class="text-primary-700">Shipping</span>
<span class="font-medium text-primary-900">Free</span>
</div>
<div class="flex justify-between mb-6 text-lg">
<span class="text-primary-900 font-semibold">Total</span>
<span id="cart-total" class="font-bold text-primary-900">$0.00</span>
</div>
<button id="checkout-btn" class="w-full bg-primary-600 hover:bg-primary-700 text-white py-3 px-4 rounded-lg font-medium transition duration-300">Proceed to Checkout</button>
</div>
</div>
</div>
<!-- Overlay -->
<div id="overlay" class="fixed inset-0 bg-black bg-opacity-50 z-40 hidden"></div>
<!-- Profile Modal -->
<div id="profile-modal" class="fixed inset-0 flex items-center justify-center z-50 hidden">
<div class="glass-card rounded-xl shadow-2xl w-full max-w-md max-h-screen overflow-y-auto">
<div class="p-6">
<div class="flex justify-between items-center mb-6">
<h3 class="text-2xl font-bold text-primary-900">Your Profile</h3>
<button id="close-profile" class="text-primary-500 hover:text-primary-700">
<i class="fas fa-times"></i>
</button>
</div>
<div class="flex flex-col items-center mb-6">
<div class="relative mb-4">
<img id="modal-profile-img" class="h-24 w-24 rounded-full object-cover" src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80" alt="Profile">
<button id="change-profile-pic" class="absolute bottom-0 right-0 bg-primary-600 text-white rounded-full p-2 hover:bg-primary-700 transition">
<i class="fas fa-camera"></i>
</button>
<input type="file" id="profile-pic-input" accept="image/*" class="hidden">
</div>
<h4 id="profile-name" class="text-xl font-semibold text-primary-900">John Doe</h4>
<p id="profile-email" class="text-primary-600">john@example.com</p>
</div>
<form class="space-y-4">
<div>
<label for="name" class="block text-sm font-medium text-primary-700 mb-1">Full Name</label>
<input type="text" id="name" class="w-full px-4 py-2 rounded-lg border border-primary-300 focus:ring-2 focus:ring-primary-500 focus:border-transparent" value="John Doe">
</div>
<div>
<label for="email" class="block text-sm font-medium text-primary-700 mb-1">Email</label>
<input type="email" id="email" class="w-full px-4 py-2 rounded-lg border border-primary-300 focus:ring-2 focus:ring-primary-500 focus:border-transparent" value="john@example.com">
</div>
<div>
<label for="phone" class="block text-sm font-medium text-primary-700 mb-1">Phone</label>
<input type="tel" id="phone" class="w-full px-4 py-2 rounded-lg border border-primary-300 focus:ring-2 focus:ring-primary-500 focus:border-transparent" value="+1 (555) 123-4567">
</div>
<div>
<label for="address" class="block text-sm font-medium text-primary-700 mb-1">Address</label>
<textarea id="address" rows="3" class="w-full px-4 py-2 rounded-lg border border-primary-300 focus:ring-2 focus:ring-primary-500 focus:border-transparent">123 Main St, Apt 4B, New York, NY 10001</textarea>
</div>
<div class="pt-4">
<button type="button" id="save-profile" class="w-full bg-primary-600 hover:bg-primary-700 text-white py-3 px-4 rounded-lg font-medium transition duration-300">Save Changes</button>
</div>
</form>
</div>
</div>
</div>
<!-- Orders Modal -->
<div id="orders-modal" class="fixed inset-0 flex items-center justify-center z-50 hidden">
<div class="glass-card rounded-xl shadow-2xl w-full max-w-4xl max-h-screen overflow-y-auto">
<div class="p-6">
<div class="flex justify-between items-center mb-6">
<h3 class="text-2xl font-bold text-primary-900">Your Orders</h3>
<button id="close-orders" class="text-primary-500 hover:text-primary-700">
<i class="fas fa-times"></i>
</button>
</div>
<div class="space-y-6" id="orders-container">
<!-- Orders will be loaded here dynamically -->
<div class="text-center py-10">
<i class="fas fa-box-open text-4xl text-primary-300 mb-4"></i>
<p class="text-lg text-primary-600">You haven't placed any orders yet</p>
</div>
</div>
</div>
</div>
</div>
<!-- Settings Modal -->
<div id="settings-modal" class="fixed inset-0 flex items-center justify-center z-50 hidden">
<div class="glass-card rounded-xl shadow-2xl w-full max-w-md max-h-screen overflow-y-auto">
<div class="p-6">
<div class="flex justify-between items-center mb-6">
<h3 class="text-2xl font-bold text-primary-900">Settings</h3>
<button id="close-settings" class="text-primary-500 hover:text-primary-700">
<i class="fas fa-times"></i>
</button>
</div>
<div class="space-y-6">
<div>
<h4 class="text-lg font-medium text-primary-800 mb-4">Account Settings</h4>
<div class="space-y-4">
<div class="flex items-center justify-between">
<span class="text-primary-700">Email Notifications</span>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" class="sr-only peer" checked>
<div class="w-11 h-6 bg-primary-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-primary-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-primary-600"></div>
</label>
</div>
<div class="flex items-center justify-between">
<span class="text-primary-700">SMS Notifications</span>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" class="sr-only peer">
<div class="w-11 h-6 bg-primary-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-primary-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-primary-600"></div>
</label>
</div>
<div class="flex items-center justify-between">
<span class="text-primary-700">Dark Mode</span>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" class="sr-only peer">
<div class="w-11 h-6 bg-primary-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-primary-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-primary-600"></div>
</label>
</div>
</div>
</div>
<div>
<h4 class="text-lg font-medium text-primary-800 mb-4">Security</h4>
<div class="space-y-4">
<button class="w-full text-left px-4 py-2 bg-primary-50 rounded-lg text-primary-700 hover:bg-primary-100 transition">Change Password</button>
<button class="w-full text-left px-4 py-2 bg-primary-50 rounded-lg text-primary-700 hover:bg-primary-100 transition">Two-Factor Authentication</button>
<button class="w-full text-left px-4 py-2 bg-primary-50 rounded-lg text-primary-700 hover:bg-primary-100 transition">Connected Devices</button>
</div>
</div>
<div>
<h4 class="text-lg font-medium text-primary-800 mb-4">Help & Support</h4>
<div class="space-y-4">
<button class="w-full text-left px-4 py-2 bg-primary-50 rounded-lg text-primary-700 hover:bg-primary-100 transition">Help Center</button>
<button class="w-full text-left px-4 py-2 bg-primary-50 rounded-lg text-primary-700 hover:bg-primary-100 transition">Contact Support</button>
<button class="w-full text-left px-4 py-2 bg-primary-50 rounded-lg text-primary-700 hover:bg-primary-100 transition">Privacy Policy</button>
</div>
</div>
<div class="pt-4">
<button id="sign-out-btn" class="w-full bg-red-600 hover:bg-red-700 text-white py-3 px-4 rounded-lg font-medium transition duration-300">Sign Out</button>
</div>
</div>
</div>
</div>
</div>
<!-- Checkout Modal -->
<div id="checkout-modal" class="fixed inset-0 flex items-center justify-center z-50 hidden">
<div class="glass-card rounded-xl shadow-2xl w-full max-w-2xl max-h-screen overflow-y-auto">
<div class="p-6">
<div class="flex justify-between items-center mb-6">
<h3 class="text-2xl font-bold text-primary-900">Checkout</h3>
<button id="close-checkout" class="text-primary-500 hover:text-primary-700">
<i class="fas fa-times"></i>
</button>
</div>
<div class="grid md:grid-cols-2 gap-8">
<div>
<h4 class="text-lg font-medium text-primary-800 mb-4">Shipping Information</h4>
<form class="space-y-4">
<div>
<label for="checkout-name" class="block text-sm font-medium text-primary-700 mb-1">Full Name</label>
<input type="text" id="checkout-name" class="w-full px-4 py-2 rounded-lg border border-primary-300 focus:ring-2 focus:ring-primary-500 focus:border-transparent" value="John Doe">
</div>
<div>
<label for="checkout-email" class="block text-sm font-medium text-primary-700 mb-1">Email</label>
<input type="email" id="checkout-email" class="w-full px-4 py-2 rounded-lg border border-primary-300 focus:ring-2 focus:ring-primary-500 focus:border-transparent" value="john@example.com">
</div>
<div>
<label for="checkout-address" class="block text-sm font-medium text-primary-700 mb-1">Address</label>
<input type="text" id="checkout-address" class="w-full px-4 py-2 rounded-lg border border-primary-300 focus:ring-2 focus:ring-primary-500 focus:border-transparent" value="123 Main St">
</div>
<div class="grid grid-cols-2 gap-4">
<div>
<label for="checkout-city" class="block text-sm font-medium text-primary-700 mb-1">City</label>
<input type="text" id="checkout-city" class="w-full px-4 py-2 rounded-lg border border-primary-300 focus:ring-2 focus:ring-primary-500 focus:border-transparent" value="New York">
</div>
<div>
<label for="checkout-zip" class="block text-sm font-medium text-primary-700 mb-1">ZIP Code</label>
<input type="text" id="checkout-zip" class="w-full px-4 py-2 rounded-lg border border-primary-300 focus:ring-2 focus:ring-primary-500 focus:border-transparent" value="10001">
</div>
</div>
<div>
<label for="checkout-country" class="block text-sm font-medium text-primary-700 mb-1">Country</label>
<select id="checkout-country" class="w-full px-4 py-2 rounded-lg border border-primary-300 focus:ring-2 focus:ring-primary-500 focus:border-transparent">
<option>United States</option>
<option>Canada</option>
<option>United Kingdom</option>
<option>Australia</option>
</select>
</div>
</form>
</div>
<div>
<h4 class="text-lg font-medium text-primary-800 mb-4">Order Summary</h4>
<div id="checkout-items" class="space-y-4 mb-6">
<!-- Checkout items will be loaded here dynamically -->
</div>
<div class="space-y-3 border-t border-primary-200 pt-4">
<div class="flex justify-between">
<span class="text-primary-700">Subtotal</span>
<span id="checkout-subtotal" class="font-medium text-primary-900">$0.00</span>
</div>
<div class="flex justify-between">
<span class="text-primary-700">Shipping</span>
<span class="font-medium text-primary-900">Free</span>
</div>
<div class="flex justify-between text-lg pt-2">
<span class="font-semibold text-primary-900">Total</span>
<span id="checkout-total" class="font-bold text-primary-900">$0.00</span>
</div>
</div>
<div class="mt-6">
<h4 class="text-lg font-medium text-primary-800 mb-4">Payment Method</h4>
<div class="space-y-3">
<div class="flex items-center">
<input id="credit-card" name="payment" type="radio" class="h-4 w-4 text-primary-600 focus:ring-primary-500" checked>
<label for="credit-card" class="ml-3 block text-sm font-medium text-primary-700">Credit Card</label>
</div>
<div class="flex items-center">
<input id="paypal" name="payment" type="radio" class="h-4 w-4 text-primary-600 focus:ring-primary-500">
<label for="paypal" class="ml-3 block text-sm font-medium text-primary-700">PayPal</label>
</div>
<div class="flex items-center">
<input id="apple-pay" name="payment" type="radio" class="h-4 w-4 text-primary-600 focus:ring-primary-500">
<label for="apple-pay" class="ml-3 block text-sm font-medium text-primary-700">Apple Pay</label>
</div>
</div>
<div id="credit-card-form" class="mt-4 space-y-4">
<div>
<label for="card-number" class="block text-sm font-medium text-primary-700 mb-1">Card Number</label>
<input type="text" id="card-number" placeholder="1234 5678 9012 3456" class="w-full px-4 py-2 rounded-lg border border-primary-300 focus:ring-2 focus:ring-primary-500 focus:border-transparent">
</div>
<div class="grid grid-cols-2 gap-4">
<div>
<label for="expiry-date" class="block text-sm font-medium text-primary-700 mb-1">Expiry Date</label>
<input type="text" id="expiry-date" placeholder="MM/YY" class="w-full px-4 py-2 rounded-lg border border-primary-300 focus:ring-2 focus:ring-primary-500 focus:border-transparent">
</div>
<div>
<label for="cvv" class="block text-sm font-medium text-primary-700 mb-1">CVV</label>
<input type="text" id="cvv" placeholder="123" class="w-full px-4 py-2 rounded-lg border border-primary-300 focus:ring-2 focus:ring-primary-500 focus:border-transparent">
</div>
</div>
</div>
<button id="place-order-btn" class="w-full mt-6 bg-primary-600 hover:bg-primary-700 text-white py-3 px-4 rounded-lg font-medium transition duration-300">Place Order</button>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Order Confirmation Modal -->
<div id="confirmation-modal" class="fixed inset-0 flex items-center justify-center z-50 hidden">
<div class="glass-card rounded-xl shadow-2xl w-full max-w-md max-h-screen overflow-y-auto">
<div class="p-8 text-center">
<div class="mx-auto flex items-center justify-center h-12 w-12 rounded-full bg-green-100 mb-4">
<i class="fas fa-check text-green-600 text-xl"></i>
</div>
<h3 class="text-2xl font-bold text-primary-900 mb-2">Order Confirmed!</h3>
<p class="text-primary-700 mb-6">Thank you for your purchase. Your order has been placed successfully.</p>
<p class="text-sm text-primary-600 mb-6">Order #<span id="order-number">2045</span> • <span id="order-date">June 15, 2023</span></p>
<div class="bg-primary-50 rounded-lg p-4 mb-6">
<div class="flex justify-between mb-2">
<span class="text-primary-700">Items</span>
<span id="confirmation-items" class="font-medium text-primary-900">2</span>
</div>
<div class="flex justify-between mb-2">
<span class="text-primary-700">Total</span>
<span id="confirmation-total" class="font-medium text-primary-900">$299.97</span>
</div>
<div class="flex justify-between">
<span class="text-primary-700">Estimated Delivery</span>
<span class="font-medium text-primary-900">June 18, 2023</span>
</div>
</div>
<div class="flex flex-col sm:flex-row gap-4">
<button id="view-order-btn" class="flex-1 bg-primary-600 hover:bg-primary-700 text-white py-3 px-4 rounded-lg font-medium transition duration-300">View Order</button>
<button id="continue-shopping-btn" class="flex-1 border border-primary-600 text-primary-600 hover:bg-primary-50 py-3 px-4 rounded-lg font-medium transition duration-300">Continue Shopping</button>
</div>
</div>
</div>
</div>
<script>
// Sample product data
const products = [
{
id: 1,
name: "Wireless Headphones",
price: 99.99,
category: "electronics",
image: "https://images.unsplash.com/photo-1546868871-7041f2d55e0b?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&h=500&q=80",
description: "Premium wireless headphones with noise cancellation and 30-hour battery life.",
rating: 4.5,
reviews: 128,
colors: ["Black", "White", "Blue"],
stock: 15,
minOrder: 5,
supplier: "AudioTech Ltd."
},
{
id: 2,
name: "Smart Watch",
price: 199.99,
category: "electronics",
image: "https://images.unsplash.com/photo-1520390138845-fd2d229dd553?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&h=500&q=80",
description: "Advanced smartwatch with fitness tracking, heart rate monitor, and smartphone notifications.",
rating: 4.7,
reviews: 256,
colors: ["Black", "Silver", "Midnight Blue"],
stock: 8,
minOrder: 2,
supplier: "TechGadgets Inc."
},
{
id: 3,
name: "Leather Wallet",
price: 49.99,
category: "accessories",
image: "https://images.unsplash.com/photo-1546938576-6e6a64f317cc?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&h=500&q=80",
description: "Genuine leather wallet with multiple card slots and RFID protection.",
rating: 4.3,
reviews: 87,
colors: ["Brown", "Black"],
stock: 22,
minOrder: 10,
supplier: "LeatherCraft Co."
},
{
id: 4,
name: "Cotton T-Shirt",
price: 29.99,
category: "clothing",
image: "https://images.unsplash.com/photo-1521572163474-6864f9cf17ab?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&h=500&q=80",
description: "Premium quality cotton t-shirt with a comfortable fit and stylish design.",
rating: 4.2,
reviews: 143,
colors: ["White", "Black", "Gray", "Navy"],
sizes: ["S", "M", "L", "XL"],
stock: 35,
minOrder: 20,
supplier: "FashionHub"
},
{
id: 5,
name: "Ceramic Coffee Mug",
price: 19.99,
category: "home",
image: "https://images.unsplash.com/photo-1517705008128-361805f42e86?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&h=500&q=80",
description: "Handcrafted ceramic coffee mug with a unique design and comfortable handle.",
rating: 4.6,
reviews: 94,
colors: ["White", "Black", "Blue"],
stock: 18,
minOrder: 50,
supplier: "HomeEssentials"
},
{
id: 6,
name: "Wireless Earbuds",
price: 79.99,
category: "electronics",
image: "https://images.unsplash.com/photo-1590658268037-6bf12165ff8d?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&h=500&q=80",
description: "True wireless earbuds with crystal clear sound and touch controls.",
rating: 4.4,
reviews: 201,
colors: ["Black", "White", "Red"],
stock: 12,
minOrder: 5,
supplier: "SoundWave Tech"
},
{
id: 7,
name: "Denim Jeans",
price: 59.99,
category: "clothing",
image: "https://images.unsplash.com/photo-1542272604-787c3835535d?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&h=500&q=80",
description: "Classic fit denim jeans made with premium quality cotton and stretch fabric.",
rating: 4.1,
reviews: 76,
colors: ["Blue", "Black", "Gray"],
sizes: ["28", "30", "32", "34", "36"],
stock: 27,
minOrder: 10,
supplier: "DenimWorks"
},
{
id: 8,
name: "Wooden Desk Organizer",
price: 39.99,
category: "home",
image: "https://images.unsplash.com/photo-1603969072881-b0fc7f3d77d7?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&h=500&q=80",
description: "Handmade wooden desk organizer with multiple compartments for stationery.",
rating: 4.8,
reviews: 42,
colors: ["Natural", "Walnut", "Dark Oak"],
stock: 9,
minOrder: 5,
supplier: "WoodCrafters"
},
{
id: 9,
name: "Stainless Steel Water Bottle",
price: 24.99,
category: "accessories",
image: "https://images.unsplash.com/photo-1602143407151-7111542de6e8?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&h=500&q=80",
description: "Insulated stainless steel water bottle that keeps drinks cold for 24 hours and hot for 12 hours.",
rating: 4.5,
reviews: 178,
colors: ["Silver", "Black", "Rose Gold"],
stock: 31,
minOrder: 10,
supplier: "HydrateWell"
},
{
id: 10,
name: "Linen Button-Up Shirt",
price: 49.99,
category: "clothing",
image: "https://images.unsplash.com/photo-1598033129183-c4f50c736d10?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&h=500&q=80",
description: "Breathable linen button-up shirt perfect for summer with a relaxed fit.",
rating: 4.0,
reviews: 63,
colors: ["White", "Blue", "Beige"],
sizes: ["S", "M", "L", "XL"],
stock: 14,
minOrder: 5,
supplier: "CasualWear Co."
},
{
id: 11,
name: "Bluetooth Speaker",
price: 89.99,
category: "electronics",
image: "https://images.unsplash.com/photo-1585771724684-38269d6639fd?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&h=500&q=80",
description: "Portable Bluetooth speaker with 20W output and 15-hour battery life.",
rating: 4.6,
reviews: 112,
colors: ["Black", "Blue", "Red"],
stock: 7,
minOrder: 3,
supplier: "AudioMasters"
},
{
id: 12,
name: "Wool Beanie",
price: 34.99,
category: "accessories",
image: "https://images.unsplash.com/photo-1521369859029-b85b34384fe2?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&h=500&q=80",
description: "Warm wool beanie for winter with a soft inner lining and stylish design.",
rating: 4.3,
reviews: 45,
colors: ["Gray", "Black", "Navy", "Burgundy"],
stock: 23,
minOrder: 10,
supplier: "WinterWear Ltd."
}
];
// Shopping cart functionality
let cart = [];
let orders = [];
// User profile data
let userProfile = {
name: "John Doe",
email: "john@example.com",
phone: "+1 (555) 123-4567",
address: "123 Main St, Apt 4B, New York, NY 10001",
profilePic: "https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80"
};
// DOM elements
const productGrid = document.getElementById('product-grid');
const cartSidebar = document.getElementById('cart-sidebar');
const overlay = document.getElementById('overlay');
const cartBtn = document.getElementById('cart-btn');
const closeCartBtn = document.getElementById('close-cart');
const cartItemsContainer = document.getElementById('cart-items');
const emptyCart = document.getElementById('empty-cart');
const cartFooter = document.getElementById('cart-footer');
const cartCount = document.getElementById('cart-count');
const mobileCartCount = document.getElementById('mobile-cart-count');
const cartSubtotal = document.getElementById('cart-subtotal');
const cartTotal = document.getElementById('cart-total');
const checkoutBtn = document.getElementById('checkout-btn');
const loadMoreBtn = document.getElementById('load-more');
const categoryTabs = document.querySelectorAll('[data-category]');
const userMenuBtn = document.getElementById('user-menu');
const profileDropdown = document.getElementById('profile-dropdown');
const profileLink = document.getElementById('profile-link');
const ordersLink = document.getElementById('orders-link');
const settingsLink = document.getElementById('settings-link');
const signoutLink = document.getElementById('signout-link');
const profileModal = document.getElementById('profile-modal');
const ordersModal = document.getElementById('orders-modal');
const settingsModal = document.getElementById('settings-modal');
const closeProfile = document.getElementById('close-profile');
const closeOrders = document.getElementById('close-orders');
const closeSettings = document.getElementById('close-settings');
const checkoutModal = document.getElementById('checkout-modal');
const closeCheckout = document.getElementById('close-checkout');
const placeOrderBtn = document.getElementById('place-order-btn');
const confirmationModal = document.getElementById('confirmation-modal');
const viewOrderBtn = document.getElementById('view-order-btn');
const continueShoppingBtn = document.getElementById('continue-shopping-btn');
const checkoutItemsContainer = document.getElementById('checkout-items');
const checkoutSubtotal = document.getElementById('checkout-subtotal');
const checkoutTotal = document.getElementById('checkout-total');
const confirmationItems = document.getElementById('confirmation-items');
const confirmationTotal = document.getElementById('confirmation-total');
const mobileMenuToggle = document.getElementById('mobile-menu-toggle');
const mobileMenu = document.getElementById('mobile-menu');
const mobileCartBtn = document.getElementById('mobile-menu-btn');
const notification = document.getElementById('notification');
const notificationTitle = document.getElementById('notification-title');
const notificationMessage = document.getElementById('notification-message');
const notificationIcon = document.getElementById('notification-icon');
const profileImg = document.getElementById('profile-img');
const modalProfileImg = document.getElementById('modal-profile-img');
const profileName = document.getElementById('profile-name');
const profileEmail = document.getElementById('profile-email');
const nameInput = document.getElementById('name');
const emailInput = document.getElementById('email');
const phoneInput = document.getElementById('phone');
const addressInput = document.getElementById('address');
const saveProfileBtn = document.getElementById('save-profile');
const changeProfilePicBtn = document.getElementById('change-profile-pic');
const profilePicInput = document.getElementById('profile-pic-input');
const signOutBtn = document.getElementById('sign-out-btn');
const ordersContainer = document.getElementById('orders-container');
// Current filter and pagination
let currentCategory = 'all';
let currentPage = 1;
const productsPerPage = 8;
// Initialize the app
function init() {
renderProducts();
setupEventListeners();
loadCartFromStorage();
loadOrdersFromStorage();
updateCartCount();
updateProfileUI();
}
// Set up event listeners
function setupEventListeners() {
// Cart sidebar
cartBtn.addEventListener('click', toggleCartSidebar);
mobileCartBtn.addEventListener('click', toggleCartSidebar);
closeCartBtn.addEventListener('click', toggleCartSidebar);
overlay.addEventListener('click', closeAllModals);
// Checkout
checkoutBtn.addEventListener('click', openCheckoutModal);
placeOrderBtn.addEventListener('click', confirmOrder);
viewOrderBtn.addEventListener('click', viewOrderDetails);
continueShoppingBtn.addEventListener('click', continueShopping);
// Load more products
loadMoreBtn.addEventListener('click', loadMoreProducts);
// Category tabs
categoryTabs.forEach(tab => {
tab.addEventListener('click', () => {
currentCategory = tab.dataset.category;
currentPage = 1;
// Update active tab
categoryTabs.forEach(t => t.classList.remove('active'));
tab.classList.add('active');
// Re-render products
renderProducts();
});
});
// Profile dropdown
userMenuBtn.addEventListener('click', toggleProfileDropdown);
// Profile links
profileLink.addEventListener('click', (e) => {
e.preventDefault();
closeProfileDropdown();
openProfileModal();
});
ordersLink.addEventListener('click', (e) => {
e.preventDefault();
closeProfileDropdown();
openOrdersModal();
});
settingsLink.addEventListener('click', (e) => {
e.preventDefault();
closeProfileDropdown();
openSettingsModal();
});
signoutLink.addEventListener('click', (e) => {
e.preventDefault();
closeProfileDropdown();
signOut();
});
// Mobile menu
mobileMenuToggle.addEventListener('click', toggleMobileMenu);
//
</html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dazai Starshop | Premium Online Store</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: {
50: '#f0f9ff',
100: '#e0f2fe',
200: '#bae6fd',
300: '#7dd3fc',
400: '#38bdf8',
500: '#0ea5e9',
600: '#0284c7',
700: '#0369a1',
800: '#075985',
900: '#0c4a6e',
},
glass: 'rgba(255, 255, 255, 0.15)',
'glass-dark': 'rgba(0, 0, 0, 0.15)',
'mat-glass': 'rgba(255, 255, 255, 0.05)',
},
backdropBlur: {
xs: '2px',
sm: '4px',
md: '8px',
lg: '12px',
xl: '16px',
},
boxShadow: {
'glow': '0 0 15px rgba(56, 189, 248, 0.5)',
'glow-sm': '0 0 8px rgba(56, 189, 248, 0.3)',
'glow-lg': '0 0 25px rgba(56, 189, 248, 0.7)',
},
animation: {
'float': 'float 6s ease-in-out infinite',
'float-reverse': 'float-reverse 5s ease-in-out infinite',
'pulse-slow': 'pulse 4s cubic-bezier(0.4, 0, 0.6, 1) infinite',
},
keyframes: {
float: {
'0%, 100%': { transform: 'translateY(0)' },
'50%': { transform: 'translateY(-10px)' },
},
'float-reverse': {
'0%, 100%': { transform: 'translateY(0)' },
'50%': { transform: 'translateY(10px)' },
}
}
}
}
}
</script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
body {
font-family: 'Poppins', sans-serif;
background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #bae6fd 100%);
min-height: 100vh;
color: #0c4a6e;
}
.glass-card {
background: rgba(255, 255, 255, 0.15);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
border: 1px solid rgba(255, 255, 255, 0.18);
box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}
.glass-card-dark {
background: rgba(0, 0, 0, 0.15);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
border: 1px solid rgba(255, 255, 255, 0.05);
}
.mat-glass {
background: rgba(255, 255, 255, 0.05);
backdrop-filter: blur(4px);
-webkit-backdrop-filter: blur(4px);
}
.hover-glow:hover {
box-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
transition: all 0.3s ease;
}
.under-glow {
position: relative;
}