Spaces:
Running
Running
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>LUX OPTICA | Premium Eyewear</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: '#0a0a0a', | |
secondary: '#1e1e1e', | |
accent: '#b89f80', | |
gold: '#d4af37', | |
cream: '#f5f0e6', | |
}, | |
fontFamily: { | |
sans: ['Montserrat', 'sans-serif'], | |
serif: ['Playfair Display', 'serif'], | |
}, | |
} | |
} | |
} | |
</script> | |
<style> | |
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&family=Playfair+Display:wght@400;500;600;700&display=swap'); | |
.product-card:hover .product-actions { | |
opacity: 1; | |
transform: translateY(0); | |
} | |
.zoom-image { | |
transition: transform 0.3s ease; | |
} | |
.zoom-image:hover { | |
transform: scale(1.05); | |
} | |
.dropdown:hover .dropdown-menu { | |
display: block; | |
} | |
.image-zoom-container { | |
position: relative; | |
overflow: hidden; | |
} | |
.image-zoom-lens { | |
position: absolute; | |
border: 1px solid #d4d4d4; | |
width: 100px; | |
height: 100px; | |
background-repeat: no-repeat; | |
cursor: none; | |
} | |
.image-zoom-result { | |
position: absolute; | |
width: 300px; | |
height: 300px; | |
border: 1px solid #d4d4d4; | |
background-repeat: no-repeat; | |
display: none; | |
z-index: 100; | |
right: -320px; | |
top: 0; | |
} | |
</style> | |
</head> | |
<body class="font-sans bg-cream text-primary"> | |
<!-- Announcement Bar --> | |
<div class="bg-primary text-gold text-center py-2 text-sm font-medium"> | |
Free worldwide shipping on all orders over $150 | 30-day returns | |
</div> | |
<!-- Header --> | |
<header class="sticky top-0 z-50 bg-cream border-b border-gray-200"> | |
<div class="container mx-auto px-4"> | |
<div class="flex justify-between items-center py-4"> | |
<!-- Mobile Menu Button --> | |
<button class="md:hidden text-primary focus:outline-none"> | |
<i class="fas fa-bars text-xl"></i> | |
</button> | |
<!-- Logo --> | |
<div class="text-2xl font-serif font-bold tracking-wider"> | |
<a href="#" class="hover:text-accent transition">LUX OPTICA</a> | |
</div> | |
<!-- Navigation --> | |
<nav class="hidden md:flex space-x-8"> | |
<div class="dropdown relative"> | |
<button class="hover:text-accent transition">Shop <i class="fas fa-chevron-down text-xs ml-1"></i></button> | |
<div class="dropdown-menu absolute hidden bg-white shadow-lg mt-2 py-2 w-48"> | |
<a href="#" class="block px-4 py-2 hover:bg-gray-100">Sunglasses</a> | |
<a href="#" class="block px-4 py-2 hover:bg-gray-100">Eyeglasses</a> | |
<a href="#" class="block px-4 py-2 hover:bg-gray-100">New Arrivals</a> | |
<a href="#" class="block px-4 py-2 hover:bg-gray-100">Best Sellers</a> | |
</div> | |
</div> | |
<a href="#" class="hover:text-accent transition">Brands</a> | |
<a href="#" class="hover:text-accent transition">About</a> | |
<a href="#" class="hover:text-accent transition">Journal</a> | |
</nav> | |
<!-- Icons --> | |
<div class="flex items-center space-x-4"> | |
<button class="hover:text-accent transition"> | |
<i class="fas fa-search"></i> | |
</button> | |
<button class="hover:text-accent transition"> | |
<i class="fas fa-user"></i> | |
</button> | |
<button class="hover:text-accent transition relative"> | |
<i class="fas fa-shopping-bag"></i> | |
<span class="absolute -top-2 -right-2 bg-accent text-white text-xs rounded-full h-5 w-5 flex items-center justify-center">3</span> | |
</button> | |
</div> | |
</div> | |
</div> | |
</header> | |
<!-- Hero Section --> | |
<section class="relative h-screen flex items-center justify-center bg-gray-100 overflow-hidden"> | |
<div class="absolute inset-0 bg-black opacity-30"></div> | |
<img src="https://images.unsplash.com/photo-1511499767150-a48a79f39864?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1920&q=80" | |
alt="Luxury sunglasses" class="absolute inset-0 w-full h-full object-cover"> | |
<div class="relative z-10 text-center px-4 max-w-4xl mx-auto"> | |
<h1 class="text-4xl md:text-6xl font-serif font-bold text-white mb-6">Timeless Eyewear, Modern Vision</h1> | |
<p class="text-xl text-white mb-8">Handcrafted frames designed for those who appreciate the finer details</p> | |
<div class="flex justify-center space-x-4"> | |
<a href="#" class="bg-accent hover:bg-opacity-90 text-white px-8 py-3 font-medium transition">Shop Now</a> | |
<a href="#" class="bg-transparent border-2 border-white hover:bg-white hover:text-primary text-white px-8 py-3 font-medium transition">Discover</a> | |
</div> | |
</div> | |
</section> | |
<!-- Featured Brands --> | |
<section class="py-16 bg-gray-50"> | |
<div class="container mx-auto px-4"> | |
<h2 class="text-2xl font-serif font-medium text-center mb-12">Featured Brands</h2> | |
<div class="grid grid-cols-2 md:grid-cols-5 gap-8"> | |
<div class="flex items-center justify-center p-4"> | |
<img src="https://via.placeholder.com/150x60?text=Ray-Ban" alt="Ray-Ban" class="h-12 object-contain opacity-70 hover:opacity-100 transition"> | |
</div> | |
<div class="flex items-center justify-center p-4"> | |
<img src="https://via.placeholder.com/150x60?text=Gucci" alt="Gucci" class="h-12 object-contain opacity-70 hover:opacity-100 transition"> | |
</div> | |
<div class="flex items-center justify-center p-4"> | |
<img src="https://via.placeholder.com/150x60?text=Prada" alt="Prada" class="h-12 object-contain opacity-70 hover:opacity-100 transition"> | |
</div> | |
<div class="flex items-center justify-center p-4"> | |
<img src="https://via.placeholder.com/150x60?text=Tom+Ford" alt="Tom Ford" class="h-12 object-contain opacity-70 hover:opacity-100 transition"> | |
</div> | |
<div class="flex items-center justify-center p-4"> | |
<img src="https://via.placeholder.com/150x60?text=Oliver+Peoples" alt="Oliver Peoples" class="h-12 object-contain opacity-70 hover:opacity-100 transition"> | |
</div> | |
</div> | |
</div> | |
</section> | |
<!-- New Arrivals --> | |
<section class="py-16"> | |
<div class="container mx-auto px-4"> | |
<div class="flex justify-between items-center mb-8"> | |
<h2 class="text-2xl font-serif font-medium">New Arrivals</h2> | |
<a href="#" class="text-sm font-medium hover:text-accent transition">View All</a> | |
</div> | |
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-8"> | |
<!-- Product 1 --> | |
<div class="product-card group relative"> | |
<div class="relative overflow-hidden mb-4"> | |
<img src="https://images.unsplash.com/photo-1511499767150-a48a79f39864?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80" | |
alt="Aviator sunglasses" class="w-full h-80 object-cover zoom-image"> | |
<div class="product-actions absolute bottom-0 left-0 right-0 bg-white bg-opacity-90 p-4 opacity-0 transform translate-y-4 transition duration-300 flex justify-between"> | |
<button class="text-primary hover:text-accent transition"> | |
<i class="fas fa-heart"></i> | |
</button> | |
<button class="bg-primary text-white px-4 py-2 text-sm hover:bg-accent transition"> | |
Add to Cart | |
</button> | |
<button class="text-primary hover:text-accent transition"> | |
<i class="fas fa-search"></i> | |
</button> | |
</div> | |
<div class="absolute top-4 left-4 bg-accent text-white text-xs px-2 py-1"> | |
New | |
</div> | |
</div> | |
<div class="text-center"> | |
<h3 class="font-medium mb-1">Classic Aviator</h3> | |
<p class="text-secondary text-sm mb-2">Ray-Ban</p> | |
<p class="font-medium">$195</p> | |
</div> | |
</div> | |
<!-- Product 2 --> | |
<div class="product-card group relative"> | |
<div class="relative overflow-hidden mb-4"> | |
<img src="https://images.unsplash.com/photo-1556306535-0f09a537f0a3?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80" | |
alt="Round sunglasses" class="w-full h-80 object-cover zoom-image"> | |
<div class="product-actions absolute bottom-0 left-0 right-0 bg-white bg-opacity-90 p-4 opacity-0 transform translate-y-4 transition duration-300 flex justify-between"> | |
<button class="text-primary hover:text-accent transition"> | |
<i class="fas fa-heart"></i> | |
</button> | |
<button class="bg-primary text-white px-4 py-2 text-sm hover:bg-accent transition"> | |
Add to Cart | |
</button> | |
<button class="text-primary hover:text-accent transition"> | |
<i class="fas fa-search"></i> | |
</button> | |
</div> | |
</div> | |
<div class="text-center"> | |
<h3 class="font-medium mb-1">Round Metal</h3> | |
<p class="text-secondary text-sm mb-2">Gucci</p> | |
<p class="font-medium">$320</p> | |
</div> | |
</div> | |
<!-- Product 3 --> | |
<div class="product-card group relative"> | |
<div class="relative overflow-hidden mb-4"> | |
<img src="https://images.unsplash.com/photo-1511499767150-a48a79f39864?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80" | |
alt="Square sunglasses" class="w-full h-80 object-cover zoom-image"> | |
<div class="product-actions absolute bottom-0 left-0 right-0 bg-white bg-opacity-90 p-4 opacity-0 transform translate-y-4 transition duration-300 flex justify-between"> | |
<button class="text-primary hover:text-accent transition"> | |
<i class="fas fa-heart"></i> | |
</button> | |
<button class="bg-primary text-white px-4 py-2 text-sm hover:bg-accent transition"> | |
Add to Cart | |
</button> | |
<button class="text-primary hover:text-accent transition"> | |
<i class="fas fa-search"></i> | |
</button> | |
</div> | |
</div> | |
<div class="text-center"> | |
<h3 class="font-medium mb-1">Square Frame</h3> | |
<p class="text-secondary text-sm mb-2">Prada</p> | |
<p class="font-medium">$275</p> | |
</div> | |
</div> | |
<!-- Product 4 --> | |
<div class="product-card group relative"> | |
<div class="relative overflow-hidden mb-4"> | |
<img src="https://images.unsplash.com/photo-1556306535-0f09a537f0a3?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80" | |
alt="Cat-eye sunglasses" class="w-full h-80 object-cover zoom-image"> | |
<div class="product-actions absolute bottom-0 left-0 right-0 bg-white bg-opacity-90 p-4 opacity-0 transform translate-y-4 transition duration-300 flex justify-between"> | |
<button class="text-primary hover:text-accent transition"> | |
<i class="fas fa-heart"></i> | |
</button> | |
<button class="bg-primary text-white px-4 py-2 text-sm hover:bg-accent transition"> | |
Add to Cart | |
</button> | |
<button class="text-primary hover:text-accent transition"> | |
<i class="fas fa-search"></i> | |
</button> | |
</div> | |
<div class="absolute top-4 left-4 bg-accent text-white text-xs px-2 py-1"> | |
New | |
</div> | |
</div> | |
<div class="text-center"> | |
<h3 class="font-medium mb-1">Cat-Eye</h3> | |
<p class="text-secondary text-sm mb-2">Tom Ford</p> | |
<p class="font-medium">$350</p> | |
</div> | |
</div> | |
</div> | |
</div> | |
</section> | |
<!-- Banner --> | |
<section class="py-20 bg-gray-100"> | |
<div class="container mx-auto px-4 text-center"> | |
<h2 class="text-3xl font-serif font-medium mb-6">Prescription Eyewear</h2> | |
<p class="text-lg max-w-2xl mx-auto mb-8">Our optical collection combines exceptional craftsmanship with advanced lens technology for perfect vision and style.</p> | |
<a href="#" class="bg-primary hover:bg-accent text-white px-8 py-3 font-medium transition">Shop Eyeglasses</a> | |
</div> | |
</section> | |
<!-- Best Sellers --> | |
<section class="py-16"> | |
<div class="container mx-auto px-4"> | |
<div class="flex justify-between items-center mb-8"> | |
<h2 class="text-2xl font-serif font-medium">Best Sellers</h2> | |
<a href="#" class="text-sm font-medium hover:text-accent transition">View All</a> | |
</div> | |
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-8"> | |
<!-- Product 1 --> | |
<div class="product-card group relative"> | |
<div class="relative overflow-hidden mb-4"> | |
<img src="https://images.unsplash.com/photo-1511499767150-a48a79f39864?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80" | |
alt="Wayfarer sunglasses" class="w-full h-80 object-cover zoom-image"> | |
<div class="product-actions absolute bottom-0 left-0 right-0 bg-white bg-opacity-90 p-4 opacity-0 transform translate-y-4 transition duration-300 flex justify-between"> | |
<button class="text-primary hover:text-accent transition"> | |
<i class="fas fa-heart"></i> | |
</button> | |
<button class="bg-primary text-white px-4 py-2 text-sm hover:bg-accent transition"> | |
Add to Cart | |
</button> | |
<button class="text-primary hover:text-accent transition"> | |
<i class="fas fa-search"></i> | |
</button> | |
</div> | |
</div> | |
<div class="text-center"> | |
<h3 class="font-medium mb-1">Wayfarer Classic</h3> | |
<p class="text-secondary text-sm mb-2">Ray-Ban</p> | |
<p class="font-medium">$175</p> | |
</div> | |
</div> | |
<!-- Product 2 --> | |
<div class="product-card group relative"> | |
<div class="relative overflow-hidden mb-4"> | |
<img src="https://images.unsplash.com/photo-1556306535-0f09a537f0a3?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80" | |
alt="Oversized sunglasses" class="w-full h-80 object-cover zoom-image"> | |
<div class="product-actions absolute bottom-0 left-0 right-0 bg-white bg-opacity-90 p-4 opacity-0 transform translate-y-4 transition duration-300 flex justify-between"> | |
<button class="text-primary hover:text-accent transition"> | |
<i class="fas fa-heart"></i> | |
</button> | |
<button class="bg-primary text-white px-4 py-2 text-sm hover:bg-accent transition"> | |
Add to Cart | |
</button> | |
<button class="text-primary hover:text-accent transition"> | |
<i class="fas fa-search"></i> | |
</button> | |
</div> | |
<div class="absolute top-4 left-4 bg-red-500 text-white text-xs px-2 py-1"> | |
Sale | |
</div> | |
</div> | |
<div class="text-center"> | |
<h3 class="font-medium mb-1">Oversized Square</h3> | |
<p class="text-secondary text-sm mb-2">Prada</p> | |
<p class="font-medium"><span class="line-through text-gray-400 mr-2">$295</span> $235</p> | |
</div> | |
</div> | |
<!-- Product 3 --> | |
<div class="product-card group relative"> | |
<div class="relative overflow-hidden mb-4"> | |
<img src="https://images.unsplash.com/photo-1511499767150-a48a79f39864?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80" | |
alt="Round eyeglasses" class="w-full h-80 object-cover zoom-image"> | |
<div class="product-actions absolute bottom-0 left-0 right-0 bg-white bg-opacity-90 p-4 opacity-0 transform translate-y-4 transition duration-300 flex justify-between"> | |
<button class="text-primary hover:text-accent transition"> | |
<i class="fas fa-heart"></i> | |
</button> | |
<button class="bg-primary text-white px-4 py-2 text-sm hover:bg-accent transition"> | |
Add to Cart | |
</button> | |
<button class="text-primary hover:text-accent transition"> | |
<i class="fas fa-search"></i> | |
</button> | |
</div> | |
</div> | |
<div class="text-center"> | |
<h3 class="font-medium mb-1">Round Optical</h3> | |
<p class="text-secondary text-sm mb-2">Oliver Peoples</p> | |
<p class="font-medium">$285</p> | |
</div> | |
</div> | |
<!-- Product 4 --> | |
<div class="product-card group relative"> | |
<div class="relative overflow-hidden mb-4"> | |
<img src="https://images.unsplash.com/photo-1556306535-0f09a537f0a3?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80" | |
alt="Rectangle eyeglasses" class="w-full h-80 object-cover zoom-image"> | |
<div class="product-actions absolute bottom-0 left-0 right-0 bg-white bg-opacity-90 p-4 opacity-0 transform translate-y-4 transition duration-300 flex justify-between"> | |
<button class="text-primary hover:text-accent transition"> | |
<i class="fas fa-heart"></i> | |
</button> | |
<button class="bg-primary text-white px-4 py-2 text-sm hover:bg-accent transition"> | |
Add to Cart | |
</button> | |
<button class="text-primary hover:text-accent transition"> | |
<i class="fas fa-search"></i> | |
</button> | |
</div> | |
</div> | |
<div class="text-center"> | |
<h3 class="font-medium mb-1">Rectangle Frame</h3> | |
<p class="text-secondary text-sm mb-2">Tom Ford</p> | |
<p class="font-medium">$310</p> | |
</div> | |
</div> | |
</div> | |
</div> | |
</section> | |
<!-- Features --> | |
<section class="py-16 bg-gray-50"> | |
<div class="container mx-auto px-4"> | |
<div class="grid grid-cols-1 md:grid-cols-3 gap-8"> | |
<div class="text-center"> | |
<div class="mb-4 text-accent text-3xl"> | |
<i class="fas fa-truck"></i> | |
</div> | |
<h3 class="font-medium mb-2">Free Shipping</h3> | |
<p class="text-secondary">On all orders over $150 with delivery within 3-5 business days</p> | |
</div> | |
<div class="text-center"> | |
<div class="mb-4 text-accent text-3xl"> | |
<i class="fas fa-undo"></i> | |
</div> | |
<h3 class="font-medium mb-2">Easy Returns</h3> | |
<p class="text-secondary">30-day return policy with free return shipping for all orders</p> | |
</div> | |
<div class="text-center"> | |
<div class="mb-4 text-accent text-3xl"> | |
<i class="fas fa-shield-alt"></i> | |
</div> | |
<h3 class="font-medium mb-2">Secure Payment</h3> | |
<p class="text-secondary">Your payment information is processed securely with encryption</p> | |
</div> | |
</div> | |
</div> | |
</section> | |
<!-- Newsletter --> | |
<section class="py-16 bg-primary text-cream"> | |
<div class="container mx-auto px-4 text-center max-w-3xl"> | |
<h2 class="text-2xl font-serif font-medium mb-4">Join Our Community</h2> | |
<p class="mb-6">Subscribe to receive updates, access to exclusive deals, and style inspiration.</p> | |
<form class="flex flex-col sm:flex-row max-w-md mx-auto"> | |
<input type="email" placeholder="Your email address" class="flex-grow px-4 py-3 text-primary mb-2 sm:mb-0 sm:mr-2 focus:outline-none"> | |
<button type="submit" class="bg-accent hover:bg-opacity-90 text-white px-6 py-3 font-medium transition">Subscribe</button> | |
</form> | |
</div> | |
</section> | |
<!-- Footer --> | |
<footer class="bg-primary text-cream py-12"> | |
<div class="container mx-auto px-4"> | |
<div class="grid grid-cols-1 md:grid-cols-4 gap-8 mb-8"> | |
<div> | |
<h3 class="font-serif text-xl font-medium mb-4">LUX OPTICA</h3> | |
<p class="mb-4 text-gray-300">Curated luxury eyewear for the modern individual.</p> | |
<div class="flex space-x-4"> | |
<a href="#" class="hover:text-accent transition"><i class="fab fa-instagram"></i></a> | |
<a href="#" class="hover:text-accent transition"><i class="fab fa-facebook-f"></i></a> | |
<a href="#" class="hover:text-accent transition"><i class="fab fa-twitter"></i></a> | |
<a href="#" class="hover:text-accent transition"><i class="fab fa-pinterest-p"></i></a> | |
</div> | |
</div> | |
<div> | |
<h3 class="font-medium mb-4">Shop</h3> | |
<ul class="space-y-2"> | |
<li><a href="#" class="text-gray-300 hover:text-accent transition">Sunglasses</a></li> | |
<li><a href="#" class="text-gray-300 hover:text-accent transition">Eyeglasses</a></li> | |
<li><a href="#" class="text-gray-300 hover:text-accent transition">New Arrivals</a></li> | |
<li><a href="#" class="text-gray-300 hover:text-accent transition">Best Sellers</a></li> | |
<li><a href="#" class="text-gray-300 hover:text-accent transition">Sale</a></li> | |
</ul> | |
</div> | |
<div> | |
<h3 class="font-medium mb-4">Information</h3> | |
<ul class="space-y-2"> | |
<li><a href="#" class="text-gray-300 hover:text-accent transition">About Us</a></li> | |
<li><a href="#" class="text-gray-300 hover:text-accent transition">Journal</a></li> | |
<li><a href="#" class="text-gray-300 hover:text-accent transition">Contact</a></li> | |
<li><a href="#" class="text-gray-300 hover:text-accent transition">Shipping & Returns</a></li> | |
<li><a href="#" class="text-gray-300 hover:text-accent transition">Privacy Policy</a></li> | |
</ul> | |
</div> | |
<div> | |
<h3 class="font-medium mb-4">Contact</h3> | |
<ul class="space-y-2 text-gray-300"> | |
<li>1234 Design Street</li> | |
<li>New York, NY 10001</li> | |
<li>info@luxeoptic.com</li> | |
<li>+1 (555) 123-4567</li> | |
</ul> | |
</div> | |
</div> | |
<div class="border-t border-gray-700 pt-8 text-center text-gray-400 text-sm"> | |
<p>© 2023 LUX OPTICA. All rights reserved.</p> | |
</div> | |
</div> | |
</footer> | |
<!-- Product Quick View Modal --> | |
<div class="fixed inset-0 z-50 hidden overflow-y-auto" id="quickViewModal"> | |
<div class="flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"> | |
<div class="fixed inset-0 transition-opacity" aria-hidden="true"> | |
<div class="absolute inset-0 bg-gray-500 opacity-75"></div> | |
</div> | |
<span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">​</span> | |
<div class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-4xl sm:w-full"> | |
<div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4"> | |
<div class="sm:flex sm:items-start"> | |
<button type="button" class="absolute top-4 right-4 text-gray-400 hover:text-gray-500"> | |
<span class="sr-only">Close</span> | |
<i class="fas fa-times"></i> | |
</button> | |
<div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"> | |
<div class="grid grid-cols-1 md:grid-cols-2 gap-8"> | |
<div class="image-zoom-container"> | |
<img id="zoomImage" src="https://images.unsplash.com/photo-1511499767150-a48a79f39864?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80" | |
alt="Product" class="w-full"> | |
<div class="image-zoom-lens"></div> | |
<div class="image-zoom-result"></div> | |
</div> | |
<div> | |
<h3 class="text-2xl font-serif font-medium mb-2">Classic Aviator</h3> | |
<p class="text-accent mb-4">Ray-Ban</p> | |
<p class="text-2xl font-medium mb-4">$195</p> | |
<div class="flex items-center mb-6"> | |
<div class="flex text-yellow-400 mr-2"> | |
<i class="fas fa-star"></i> | |
<i class="fas fa-star"></i> | |
<i class="fas fa-star"></i> | |
<i class="fas fa-star"></i> | |
<i class="fas fa-star-half-alt"></i> | |
</div> | |
<span class="text-sm text-gray-500">(24 reviews)</span> | |
</div> | |
<p class="text-secondary mb-6">The timeless aviator design with modern lightweight materials for all-day comfort. Features 100% UV protection and polarized lenses.</p> | |
<div class="mb-6"> | |
<h4 class="font-medium mb-2">Color</h4> | |
<div class="flex space-x-2"> | |
<button class="w-8 h-8 rounded-full bg-black border-2 border-white focus:outline-none focus:ring-2 focus:ring-accent"></button> | |
<button class="w-8 h-8 rounded-full bg-gray-400 border-2 border-white focus:outline-none focus:ring-2 focus:ring-accent"></button> | |
<button class="w-8 h-8 rounded-full bg-brown-500 border-2 border-white focus:outline-none focus:ring-2 focus:ring-accent"></button> | |
</div> | |
</div> | |
<div class="mb-6"> | |
<h4 class="font-medium mb-2">Lens Type</h4> | |
<div class="flex space-x-4"> | |
<button class="px-4 py-2 border border-gray-300 hover:border-primary focus:outline-none focus:ring-2 focus:ring-accent">Polarized</button> | |
<button class="px-4 py-2 border border-gray-300 hover:border-primary focus:outline-none focus:ring-2 focus:ring-accent">Mirrored</button> | |
<button class="px-4 py-2 border border-gray-300 hover:border-primary focus:outline-none focus:ring-2 focus:ring-accent">Gradient</button> | |
</div> | |
</div> | |
<div class="flex items-center space-x-4"> | |
<div class="flex items-center border border-gray-300"> | |
<button class="px-3 py-1 text-xl">-</button> | |
<span class="px-4">1</span> | |
<button class="px-3 py-1 text-xl">+</button> | |
</div> | |
<button class="flex-grow bg-primary hover:bg-accent text-white px-6 py-3 font-medium transition"> | |
Add to Cart | |
</button> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<script> | |
// Image zoom functionality | |
function imageZoom(imgID, resultID) { | |
var img, lens, result, cx, cy; | |
img = document.getElementById(imgID); | |
result = document.getElementById(resultID); | |
// Create lens | |
lens = document.createElement("DIV"); | |
lens.setAttribute("class", "image-zoom-lens"); | |
// Insert lens | |
img.parentElement.insertBefore(lens, img); | |
// Calculate the ratio between result DIV and lens | |
cx = result.offsetWidth / lens.offsetWidth; | |
cy = result.offsetHeight / lens.offsetHeight; | |
// Set background properties for the result DIV | |
result.style.backgroundImage = "url('" + img.src + "')"; | |
result.style.backgroundSize = (img.width * cx) + "px " + (img.height * cy) + "px"; | |
// Execute when cursor moves on the image | |
lens.addEventListener("mousemove", moveLens); | |
img.addEventListener("mousemove", moveLens); | |
// Hide the lens and result when mouse leaves the image | |
lens.addEventListener("mouseout", function() { | |
lens.style.display = "none"; | |
result.style.display = "none"; | |
}); | |
img.addEventListener("mouseout", function() { | |
lens.style.display = "none"; | |
result.style.display = "none"; | |
}); | |
// Show the lens and result when mouse enters the image | |
img.addEventListener("mouseover", function() { | |
lens.style.display = "block"; | |
result.style.display = "block"; | |
}); | |
function moveLens(e) { | |
e.preventDefault(); | |
// Get cursor position | |
var pos = getCursorPos(e); | |
// Calculate lens position | |
var x = pos.x - (lens.offsetWidth / 2); | |
var y = pos.y - (lens.offsetHeight / 2); | |
// Prevent lens from being positioned outside the image | |
if (x > img.width - lens.offsetWidth) {x = img.width - lens.offsetWidth;} | |
if (x < 0) {x = 0;} | |
if (y > img.height - lens.offsetHeight) {y = img.height - lens.offsetHeight;} | |
if (y < 0) {y = 0;} | |
// Set lens position | |
lens.style.left = x + "px"; | |
lens.style.top = y + "px"; | |
// Display what the lens "sees" | |
result.style.backgroundPosition = "-" + (x * cx) + "px -" + (y * cy) + "px"; | |
} | |
function getCursorPos(e) { | |
var a, x = 0, y = 0; | |
e = e || window.event; | |
// Get image position | |
a = img.getBoundingClientRect(); | |
// Calculate cursor coordinates relative to the image | |
x = e.pageX - a.left; | |
y = e.pageY - a.top; | |
// Consider any page scrolling | |
x = x - window.pageXOffset; | |
y = y - window.pageYOffset; | |
return {x : x, y : y}; | |
} | |
} | |
// Initialize zoom when modal opens | |
document.addEventListener('DOMContentLoaded', function() { | |
// This would be triggered when opening the quick view modal | |
// imageZoom("zoomImage", "image-zoom-result"); | |
// For demo purposes, we'll add click handlers to the quick view buttons | |
document.querySelectorAll('.product-actions button:nth-child(3)').forEach(button => { | |
button.addEventListener('click', function() { | |
document.getElementById('quickViewModal').classList.remove('hidden'); | |
imageZoom("zoomImage", "image-zoom-result"); | |
}); | |
}); | |
// Close modal | |
document.querySelector('#quickViewModal button').addEventListener('click', function() { | |
document.getElementById('quickViewModal').classList.add('hidden'); | |
}); | |
}); | |
</script> | |
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=ricardocertad/optica" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
</html> |