mobile-store-website / index.html
Hazz1694's picture
Deploy from HuggingChat
98a8228 verified
Raw
History Blame Contribute Delete
28.4 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PhoneVault - Premium Mobile Store</title>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<style>
:root {
--primary: #6366f1;
--primary-dark: #4f46e5;
--secondary: #0f172a;
--accent: #10b981;
--bg: #f8fafc;
--card: #ffffff;
--text: #1e293b;
--text-light: #64748b;
--border: #e2e8f0;
--shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
--shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Inter', sans-serif;
background: var(--bg);
color: var(--text);
line-height: 1.6;
}
/* Navigation */
nav {
background: var(--card);
border-bottom: 1px solid var(--border);
position: sticky;
top: 0;
z-index: 100;
}
.nav-container {
max-width: 1200px;
margin: 0 auto;
padding: 1rem 2rem;
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
font-size: 1.5rem;
font-weight: 700;
color: var(--primary);
text-decoration: none;
display: flex;
align-items: center;
gap: 0.5rem;
}
.nav-links {
display: flex;
gap: 2rem;
list-style: none;
align-items: center;
}
.nav-links a {
text-decoration: none;
color: var(--text);
font-weight: 500;
transition: color 0.2s;
}
.nav-links a:hover {
color: var(--primary);
}
.cart-btn {
background: var(--primary);
color: white;
border: none;
padding: 0.5rem 1.25rem;
border-radius: 0.5rem;
cursor: pointer;
font-weight: 600;
display: flex;
align-items: center;
gap: 0.5rem;
transition: background 0.2s;
}
.cart-btn:hover {
background: var(--primary-dark);
}
/* Hero Section */
.hero {
background: linear-gradient(135deg, var(--secondary) 0%, #1e293b 100%);
color: white;
padding: 5rem 2rem;
text-align: center;
}
.hero h1 {
font-size: 3rem;
font-weight: 700;
margin-bottom: 1rem;
letter-spacing: -0.025em;
}
.hero p {
font-size: 1.25rem;
color: #94a3b8;
max-width: 600px;
margin: 0 auto 2rem;
}
.hero-btns {
display: flex;
gap: 1rem;
justify-content: center;
flex-wrap: wrap;
}
.btn {
padding: 0.875rem 2rem;
border-radius: 0.5rem;
font-weight: 600;
text-decoration: none;
transition: all 0.2s;
cursor: pointer;
border: none;
font-size: 1rem;
}
.btn-primary {
background: var(--primary);
color: white;
}
.btn-primary:hover {
background: var(--primary-dark);
transform: translateY(-2px);
}
.btn-outline {
background: transparent;
color: white;
border: 2px solid rgba(255,255,255,0.3);
}
.btn-outline:hover {
background: rgba(255,255,255,0.1);
border-color: white;
}
/* Features */
.features {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 2rem;
max-width: 1200px;
margin: -3rem auto 0;
padding: 0 2rem;
position: relative;
z-index: 2;
}
.feature-card {
background: var(--card);
padding: 2rem;
border-radius: 1rem;
box-shadow: var(--shadow-lg);
text-align: center;
transition: transform 0.2s;
}
.feature-card:hover {
transform: translateY(-5px);
}
.feature-icon {
width: 60px;
height: 60px;
background: var(--bg);
border-radius: 1rem;
display: flex;
align-items: center;
justify-content: center;
margin: 0 auto 1rem;
font-size: 1.5rem;
}
.feature-card h3 {
margin-bottom: 0.5rem;
font-size: 1.125rem;
}
.feature-card p {
color: var(--text-light);
font-size: 0.875rem;
}
/* Products */
.products-section {
max-width: 1200px;
margin: 4rem auto;
padding: 0 2rem;
}
.section-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 2rem;
flex-wrap: wrap;
gap: 1rem;
}
.section-header h2 {
font-size: 2rem;
font-weight: 700;
}
.filter-btns {
display: flex;
gap: 0.5rem;
flex-wrap: wrap;
}
.filter-btn {
padding: 0.5rem 1rem;
border: 1px solid var(--border);
background: var(--card);
border-radius: 0.5rem;
cursor: pointer;
font-weight: 500;
transition: all 0.2s;
}
.filter-btn.active, .filter-btn:hover {
background: var(--primary);
color: white;
border-color: var(--primary);
}
.products-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 2rem;
}
.product-card {
background: var(--card);
border-radius: 1rem;
overflow: hidden;
box-shadow: var(--shadow);
transition: transform 0.2s, box-shadow 0.2s;
border: 1px solid var(--border);
}
.product-card:hover {
transform: translateY(-5px);
box-shadow: var(--shadow-lg);
}
.product-img {
height: 220px;
background: var(--bg);
display: flex;
align-items: center;
justify-content: center;
font-size: 4rem;
position: relative;
}
.badge {
position: absolute;
top: 1rem;
left: 1rem;
background: var(--accent);
color: white;
padding: 0.25rem 0.75rem;
border-radius: 0.25rem;
font-size: 0.75rem;
font-weight: 600;
}
.badge-sale {
background: #ef4444;
}
.product-info {
padding: 1.5rem;
}
.product-brand {
color: var(--primary);
font-size: 0.875rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.product-name {
font-size: 1.125rem;
font-weight: 600;
margin: 0.25rem 0 0.5rem;
}
.product-specs {
display: flex;
gap: 1rem;
font-size: 0.875rem;
color: var(--text-light);
margin-bottom: 1rem;
}
.product-price {
display: flex;
align-items: center;
gap: 0.75rem;
margin-bottom: 1rem;
}
.price-current {
font-size: 1.5rem;
font-weight: 700;
color: var(--text);
}
.price-old {
font-size: 1rem;
color: var(--text-light);
text-decoration: line-through;
}
.add-to-cart {
width: 100%;
padding: 0.75rem;
background: var(--secondary);
color: white;
border: none;
border-radius: 0.5rem;
font-weight: 600;
cursor: pointer;
transition: background 0.2s;
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
}
.add-to-cart:hover {
background: var(--primary);
}
/* Cart Sidebar */
.cart-overlay {
position: fixed;
inset: 0;
background: rgba(0,0,0,0.5);
z-index: 200;
opacity: 0;
pointer-events: none;
transition: opacity 0.3s;
}
.cart-overlay.open {
opacity: 1;
pointer-events: all;
}
.cart-sidebar {
position: fixed;
top: 0;
right: 0;
width: 400px;
max-width: 90vw;
height: 100vh;
background: var(--card);
z-index: 201;
transform: translateX(100%);
transition: transform 0.3s;
display: flex;
flex-direction: column;
}
.cart-sidebar.open {
transform: translateX(0);
}
.cart-header {
padding: 1.5rem;
border-bottom: 1px solid var(--border);
display: flex;
justify-content: space-between;
align-items: center;
}
.cart-header h2 {
font-size: 1.25rem;
}
.close-cart {
background: none;
border: none;
font-size: 1.5rem;
cursor: pointer;
color: var(--text-light);
}
.cart-items {
flex: 1;
overflow-y: auto;
padding: 1rem;
}
.cart-item {
display: flex;
gap: 1rem;
padding: 1rem;
background: var(--bg);
border-radius: 0.5rem;
margin-bottom: 1rem;
align-items: center;
}
.cart-item-img {
width: 60px;
height: 60px;
background: white;
border-radius: 0.5rem;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.5rem;
}
.cart-item-info {
flex: 1;
}
.cart-item-name {
font-weight: 600;
font-size: 0.875rem;
}
.cart-item-price {
color: var(--primary);
font-weight: 600;
font-size: 0.875rem;
}
.cart-item-qty {
display: flex;
align-items: center;
gap: 0.5rem;
}
.qty-btn {
width: 28px;
height: 28px;
border: 1px solid var(--border);
background: white;
border-radius: 0.25rem;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
}
.cart-footer {
padding: 1.5rem;
border-top: 1px solid var(--border);
}
.cart-total {
display: flex;
justify-content: space-between;
font-size: 1.25rem;
font-weight: 700;
margin-bottom: 1rem;
}
.checkout-btn {
width: 100%;
padding: 1rem;
background: var(--accent);
color: white;
border: none;
border-radius: 0.5rem;
font-weight: 700;
font-size: 1rem;
cursor: pointer;
transition: opacity 0.2s;
}
.checkout-btn:hover {
opacity: 0.9;
}
.empty-cart {
text-align: center;
padding: 3rem 1rem;
color: var(--text-light);
}
.remove-item {
background: none;
border: none;
color: #ef4444;
cursor: pointer;
font-size: 1.25rem;
}
/* Toast */
.toast {
position: fixed;
bottom: 2rem;
right: 2rem;
background: var(--secondary);
color: white;
padding: 1rem 1.5rem;
border-radius: 0.5rem;
box-shadow: var(--shadow-lg);
transform: translateY(200%);
transition: transform 0.3s;
z-index: 300;
display: flex;
align-items: center;
gap: 0.75rem;
}
.toast.show {
transform: translateY(0);
}
/* Footer */
footer {
background: var(--secondary);
color: #94a3b8;
padding: 3rem 2rem;
text-align: center;
}
.footer-content {
max-width: 1200px;
margin: 0 auto;
}
.footer-links {
display: flex;
justify-content: center;
gap: 2rem;
margin-bottom: 2rem;
flex-wrap: wrap;
}
.footer-links a {
color: #94a3b8;
text-decoration: none;
transition: color 0.2s;
}
.footer-links a:hover {
color: white;
}
/* Responsive */
@media (max-width: 768px) {
.hero h1 {
font-size: 2rem;
}
.nav-links {
display: none;
}
.products-grid {
grid-template-columns: 1fr;
}
.features {
grid-template-columns: 1fr;
margin-top: 2rem;
}
}
</style>
</head>
<body>
<!-- Navigation -->
<nav>
<div class="nav-container">
<a href="#" class="logo">📱 PhoneVault</a>
<ul class="nav-links">
<li><a href="#home">Home</a></li>
<li><a href="#products">Phones</a></li>
<li><a href="#accessories">Accessories</a></li>
<li><a href="#deals">Deals</a></li>
<li><button class="cart-btn" onclick="toggleCart()">
🛒 Cart <span id="cart-count">0</span>
</button></li>
</ul>
</div>
</nav>
<!-- Hero -->
<section class="hero" id="home">
<h1>Next-Gen Smartphones</h1>
<p>Discover the latest flagship devices with cutting-edge technology, premium design, and unbeatable prices.</p>
<div class="hero-btns">
<a href="#products" class="btn btn-primary">Shop Now</a>
<a href="#deals" class="btn btn-outline">View Deals</a>
</div>
</section>
<!-- Features -->
<div class="features">
<div class="feature-card">
<div class="feature-icon">🚚</div>
<h3>Free Shipping</h3>
<p>Free express delivery on all orders over $500</p>
</div>
<div class="feature-card">
<div class="feature-icon">🛡️</div>
<h3>2-Year Warranty</h3>
<p>Full coverage warranty on every device</p>
</div>
<div class="feature-card">
<div class="feature-icon">↩️</div>
<h3>30-Day Returns</h3>
<p>Hassle-free returns if you're not satisfied</p>
</div>
<div class="feature-card">
<div class="feature-icon">🔒</div>
<h3>Secure Payment</h3>
<p>Encrypted transactions for your safety</p>
</div>
</div>
<!-- Products -->
<section class="products-section" id="products">
<div class="section-header">
<h2>Latest Phones</h2>
<div class="filter-btns">
<button class="filter-btn active" onclick="filterProducts('all')">All</button>
<button class="filter-btn" onclick="filterProducts('flagship')">Flagship</button>
<button class="filter-btn" onclick="filterProducts('midrange')">Mid-Range</button>
<button class="filter-btn" onclick="filterProducts('budget')">Budget</button>
</div>
</div>
<div class="products-grid" id="products-grid">
<!-- Products injected by JS -->
</div>
</section>
<!-- Cart -->
<div class="cart-overlay" id="cart-overlay" onclick="toggleCart()"></div>
<div class="cart-sidebar" id="cart-sidebar">
<div class="cart-header">
<h2>🛒 Your Cart</h2>
<button class="close-cart" onclick="toggleCart()"></button>
</div>
<div class="cart-items" id="cart-items">
<div class="empty-cart">Your cart is empty</div>
</div>
<div class="cart-footer">
<div class="cart-total">
<span>Total</span>
<span id="cart-total">$0</span>
</div>
<button class="checkout-btn" onclick="checkout()">Proceed to Checkout</button>
</div>
</div>
<!-- Toast -->
<div class="toast" id="toast">
<span></span>
<span id="toast-message">Added to cart!</span>
</div>
<!-- Footer -->
<footer>
<div class="footer-content">
<div class="footer-links">
<a href="#">About Us</a>
<a href="#">Contact</a>
<a href="#">Privacy Policy</a>
<a href="#">Terms of Service</a>
<a href="#">Support</a>
</div>
<p>&copy; 2026 PhoneVault. All rights reserved.</p>
</div>
</footer>
<script>
const products = [
{ id: 1, name: "Galaxy S25 Ultra", brand: "Samsung", category: "flagship", price: 1199, oldPrice: 1299, specs: "256GB • 12GB RAM", emoji: "📱", badge: "New" },
{ id: 2, name: "iPhone 16 Pro Max", brand: "Apple", category: "flagship", price: 1299, oldPrice: null, specs: "512GB • Titanium", emoji: "🍎", badge: "Hot" },
{ id: 3, name: "Pixel 9 Pro", brand: "Google", category: "flagship", price: 999, oldPrice: 1099, specs: "128GB • AI Camera", emoji: "🤖", badge: "Sale" },
{ id: 4, name: "OnePlus 13", brand: "OnePlus", category: "flagship", price: 899, oldPrice: null, specs: "256GB • 120Hz", emoji: "⚡", badge: null },
{ id: 5, name: "Xiaomi 15", brand: "Xiaomi", category: "midrange", price: 649, oldPrice: 699, specs: "256GB • 108MP", emoji: "📷", badge: "Sale" },
{ id: 6, name: "Nothing Phone 3", brand: "Nothing", category: "midrange", price: 599, oldPrice: null, specs: "128GB • Glyph", emoji: "💡", badge: null },
{ id: 7, name: "Moto G85", brand: "Motorola", category: "budget", price: 299, oldPrice: 349, specs: "128GB • 5G", emoji: "📲", badge: "Sale" },
{ id: 8, name: "Redmi Note 14", brand: "Xiaomi", category: "budget", price: 249, oldPrice: null, specs: "128GB • 6000mAh", emoji: "🔋", badge: null }
];
let cart = [];
let currentFilter = 'all';
function renderProducts() {
const grid = document.getElementById('products-grid');
const filtered = currentFilter === 'all' ? products : products.filter(p => p.category === currentFilter);
grid.innerHTML = filtered.map(product => `
<div class="product-card" data-category="${product.category}">
<div class="product-img">
${product.emoji}
${product.badge ? `<span class="badge ${product.badge === 'Sale' ? 'badge-sale' : ''}">${product.badge}</span>` : ''}
</div>
<div class="product-info">
<div class="product-brand">${product.brand}</div>
<div class="product-name">${product.name}</div>
<div class="product-specs">${product.specs}</div>
<div class="product-price">
<span class="price-current">$${product.price}</span>
${product.oldPrice ? `<span class="price-old">$${product.oldPrice}</span>` : ''}
</div>
<button class="add-to-cart" onclick="addToCart(${product.id})">
<span>🛒</span> Add to Cart
</button>
</div>
</div>
`).join('');
}
function filterProducts(category) {
currentFilter = category;
document.querySelectorAll('.filter-btn').forEach(btn => btn.classList.remove('active'));
event.target.classList.add('active');
renderProducts();
}
function addToCart(id) {
const product = products.find(p => p.id === id);
const existing = cart.find(item => item.id === id);
if (existing) {
existing.qty++;
} else {
cart.push({ ...product, qty: 1 });
}
updateCart();
showToast(`${product.name} added to cart!`);
}
function updateCart() {
const count = document.getElementById('cart-count');
const items = document.getElementById('cart-items');
const total = document.getElementById('cart-total');
const totalQty = cart.reduce((sum, item) => sum + item.qty, 0);
const totalPrice = cart.reduce((sum, item) => sum + (item.price * item.qty), 0);
count.textContent = totalQty;
if (cart.length === 0) {
items.innerHTML = '<div class="empty-cart">Your cart is empty</div>';
} else {
items.innerHTML = cart.map(item => `
<div class="cart-item">
<div class="cart-item-img">${item.emoji}</div>
<div class="cart-item-info">
<div class="cart-item-name">${item.name}</div>
<div class="cart-item-price">$${item.price}</div>
</div>
<div class="cart-item-qty">
<button class="qty-btn" onclick="changeQty(${item.id}, -1)">−</button>
<span>${item.qty}</span>
<button class="qty-btn" onclick="changeQty(${item.id}, 1)">+</button>
</div>
<button class="remove-item" onclick="removeItem(${item.id})">🗑</button>
</div>
`).join('');
}
total.textContent = `$${totalPrice}`;
}
function changeQty(id, delta) {
const item = cart.find(item => item.id === id);
if (item) {
item.qty += delta;
if (item.qty <= 0) removeItem(id);
else updateCart();
}
}
function removeItem(id) {
cart = cart.filter(item => item.id !== id);
updateCart();
}
function toggleCart() {
document.getElementById('cart-overlay').classList.toggle('open');
document.getElementById('cart-sidebar').classList.toggle('open');
}
function showToast(msg) {
const toast = document.getElementById('toast');
document.getElementById('toast-message').textContent = msg;
toast.classList.add('show');
setTimeout(() => toast.classList.remove('show'), 3000);
}
function checkout() {
if (cart.length === 0) return;
alert('Thank you for your order! This is a demo checkout.');
cart = [];
updateCart();
toggleCart();
}
renderProducts();
</script>
</body>
</html>
<script data-huggingchat-badge="script">
(function () {
try {
if (document.querySelector("[data-huggingchat-badge]:not(script)")) return;
var host = document.createElement("div");
host.setAttribute("data-huggingchat-badge", "");
var styles = [["all","initial"],["position","fixed"],["right","12px"],["bottom","12px"],["z-index","2147483647"],["display","block"],["visibility","visible"],["opacity","1"],["pointer-events","auto"],["width","auto"],["height","auto"],["margin","0"],["padding","0"],["max-width","none"],["max-height","none"],["transform","none"],["filter","none"],["clip-path","none"],["color-scheme","light"]];
for (var i = 0; i < styles.length; i++) {
host.style.setProperty(styles[i][0], styles[i][1], "important");
}
host.attachShadow({ mode: "closed" }).innerHTML = "<style>\n:host { all: initial; }\na {\n display: flex;\n align-items: center;\n gap: 5px;\n box-sizing: border-box;\n height: 26px;\n padding: 0 9px 0 7px;\n border-radius: 999px;\n border: 1px solid rgba(0, 0, 0, 0.07);\n background: rgba(255, 255, 255, 0.92);\n -webkit-backdrop-filter: saturate(180%) blur(8px);\n backdrop-filter: saturate(180%) blur(8px);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 6px 16px rgba(0, 0, 0, 0.06);\n color: #111827;\n font: 500 11px/1 ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", sans-serif;\n letter-spacing: 0.01em;\n text-decoration: none;\n white-space: nowrap;\n opacity: 0.72;\n transition: opacity 0.15s ease, transform 0.15s ease;\n}\na:hover, a:focus-visible { opacity: 1; transform: translateY(-1px); }\nsvg { width: 14px; height: 14px; flex: none; }\n@media print { a { display: none; } }\n<\/style><a href=\"https://huggingface.co/chat\" target=\"_blank\" rel=\"noopener noreferrer nofollow\"><svg viewBox=\"0 0 32 32\" fill=\"none\" aria-hidden=\"true\"><path d=\"M16.0006 25.9992C13.8266 25.999 11.7118 25.2901 9.97686 23.9799C8.2419 22.6698 6.98127 20.8298 6.38599 18.7388C5.79071 16.6478 5.89323 14.4198 6.678 12.3923C7.46278 10.3648 8.88705 8.64837 10.735 7.50308C12.5829 6.35779 14.7538 5.84606 16.9187 6.04544C19.0837 6.24481 21.1246 7.14442 22.7323 8.60795C24.34 10.0715 25.4268 12.0192 25.8281 14.1559C26.2293 16.2926 25.9232 18.5019 24.9561 20.449C24.7703 20.8042 24.7223 21.2155 24.8211 21.604L25.4211 23.8316C25.4803 24.0518 25.4805 24.2837 25.4216 24.5039C25.3627 24.7242 25.2468 24.925 25.0856 25.0862C24.9244 25.2474 24.7235 25.3633 24.5033 25.4222C24.283 25.4811 24.0512 25.4809 23.831 25.4217L21.6034 24.8217C21.2172 24.7248 20.809 24.7729 20.4558 24.9567C19.0683 25.6467 17.5457 26.0068 16.0006 26.0068V25.9992Z\" fill=\"currentColor\"/><path d=\"M9.62598 16.0013C9.62598 15.3799 10.1294 14.8765 10.7508 14.8765C11.3721 14.8765 11.8756 15.3799 11.8756 16.0013C11.8756 17.0953 12.3102 18.1448 13.0838 18.9184C13.8574 19.692 14.9069 20.1266 16.001 20.1267C17.095 20.1267 18.1445 19.692 18.9181 18.9184C19.6918 18.1448 20.1264 17.0953 20.1264 16.0013C20.1264 15.3799 20.6299 14.8765 21.2512 14.8765C21.8725 14.8765 22.3759 15.3799 22.3759 16.0013C22.3759 17.6921 21.7046 19.3137 20.509 20.5093C19.3134 21.7049 17.6918 22.3762 16.001 22.3762C14.3102 22.3762 12.6885 21.7049 11.4929 20.5093C10.2974 19.3137 9.62598 17.6921 9.62598 16.0013Z\" fill=\"#fff\"/><\/svg><span>Made with HuggingChat<\/span><\/a>";
function attach() {
var parent = document.body || document.documentElement;
if (parent && host.parentNode !== parent) parent.appendChild(host);
}
attach();
// Artifacts that rewrite document.body wholesale would drop the badge.
if (document.body && typeof MutationObserver === "function") {
new MutationObserver(attach).observe(document.body, { childList: true });
} else {
document.addEventListener("DOMContentLoaded", attach);
}
} catch (e) {}
})();
</script>