Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Voltix Marketplace | Multi-Vendor eCommerce Platform</title> | |
| <!-- Icons --> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <!-- Google Fonts --> | |
| <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Sans+Arabic:wght@400;700&display=swap" rel="stylesheet"> | |
| <style> | |
| /* --- CSS VARIABLES & THEME --- */ | |
| :root { | |
| --primary: #4f46e5; | |
| --primary-hover: #4338ca; | |
| --secondary: #ec4899; | |
| --accent: #06b6d4; | |
| --bg-body: #f3f4f6; | |
| --bg-card: #ffffff; | |
| --text-main: #111827; | |
| --text-muted: #6b7280; | |
| --border: #e5e7eb; | |
| --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); | |
| --radius: 0.75rem; | |
| --transition: all 0.3s ease; | |
| --font-en: 'Inter', sans-serif; | |
| --font-ar: 'Noto Sans Arabic', sans-serif; | |
| } | |
| [data-theme="dark"] { | |
| --bg-body: #0f172a; | |
| --bg-card: #1e293b; | |
| --text-main: #f8fafc; | |
| --text-muted: #94a3b8; | |
| --border: #334155; | |
| --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5); | |
| } | |
| /* --- RESET & BASE --- */ | |
| * { box-sizing: box-sizing; margin: 0; padding: 0; } | |
| body { | |
| font-family: var(--font-en); | |
| background-color: var(--bg-body); | |
| color: var(--text-main); | |
| transition: var(--transition); | |
| line-height: 1.6; | |
| overflow-x: hidden; | |
| } | |
| body.rtl { font-family: var(--font-ar); direction: rtl; } | |
| a { text-decoration: none; color: inherit; } | |
| ul { list-style: none; } | |
| img { max-width: 100%; display: block; } | |
| button, input, select { font-family: inherit; } | |
| /* --- UTILITIES --- */ | |
| .container { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; } | |
| .flex { display: flex; } | |
| .flex-col { display: flex; flex-direction: column; } | |
| .items-center { align-items: center; } | |
| .justify-between { justify-content: space-between; } | |
| .gap-2 { gap: 0.5rem; } | |
| .gap-4 { gap: 1rem; } | |
| .grid { display: grid; } | |
| .text-center { text-align: center; } | |
| .text-primary { color: var(--primary); } | |
| .bg-primary { background-color: var(--primary); } | |
| .rounded { border-radius: var(--radius); } | |
| .shadow { box-shadow: var(--shadow); } | |
| .p-4 { padding: 1rem; } | |
| .m-4 { margin: 1rem; } | |
| .hidden { display: none; } | |
| .btn { | |
| display: inline-flex; align-items: center; justify-content: center; | |
| padding: 0.6rem 1.2rem; border-radius: var(--radius); | |
| font-weight: 600; cursor: pointer; transition: var(--transition); | |
| border: none; gap: 0.5rem; | |
| } | |
| .btn-primary { background: var(--primary); color: white; } | |
| .btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); } | |
| .btn-outline { border: 1px solid var(--border); background: transparent; color: var(--text-main); } | |
| .btn-outline:hover { border-color: var(--primary); color: var(--primary); } | |
| /* --- HEADER --- */ | |
| header { | |
| background: var(--bg-card); border-bottom: 1px solid var(--border); | |
| position: sticky; top: 0; z-index: 100; | |
| } | |
| .top-bar { padding: 0.8rem 0; } | |
| .nav-links a { margin-left: 1.5rem; font-weight: 500; color: var(--text-muted); } | |
| .nav-links a:hover { color: var(--primary); } | |
| .rtl .nav-links a { margin-left: 0; margin-right: 1.5rem; } | |
| /* --- HERO SECTION --- */ | |
| .hero { | |
| background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); | |
| color: white; padding: 4rem 0; | |
| border-radius: 0 0 2rem 2rem; | |
| margin-bottom: 2rem; | |
| } | |
| .hero-content { max-width: 600px; } | |
| .hero h1 { font-size: 2.5rem; margin-bottom: 1rem; line-height: 1.2; } | |
| .hero p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 2rem; } | |
| /* --- GRID LAYOUTS --- */ | |
| .product-grid { | |
| grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); | |
| gap: 1.5rem; | |
| } | |
| .plan-grid { | |
| grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); | |
| gap: 2rem; | |
| } | |
| /* --- CARDS --- */ | |
| .card { | |
| background: var(--bg-card); border: 1px solid var(--border); | |
| border-radius: var(--radius); overflow: hidden; | |
| transition: var(--transition); | |
| } | |
| .card:hover { transform: translateY(-5px); box-shadow: var(--shadow); } | |
| .card-img { height: 200px; background: #ddd; position: relative; } | |
| .card-img img { width: 100%; height: 100%; object-fit: cover; } | |
| .badge { | |
| position: absolute; top: 10px; right: 10px; | |
| background: var(--secondary); color: white; | |
| padding: 0.2rem 0.6rem; font-size: 0.8rem; rounded: 4px; | |
| } | |
| .rtl .badge { right: auto; left: 10px; } | |
| .card-body { padding: 1rem; } | |
| .card-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; } | |
| .card-price { font-size: 1.2rem; font-weight: 700; color: var(--primary); } | |
| .card-meta { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.5rem; } | |
| /* --- STOREFRONT --- */ | |
| .store-header { | |
| background: var(--bg-card); padding: 2rem; border-radius: var(--radius); | |
| margin-bottom: 2rem; display: flex; align-items: center; gap: 2rem; | |
| } | |
| .store-logo { width: 100px; height: 100px; rounded: 50%; border: 3px solid var(--border); } | |
| .store-stats { display: flex; gap: 2rem; margin-top: 1rem; } | |
| .stat-item { font-size: 0.9rem; color: var(--text-muted); } | |
| .stat-item span { font-weight: 700; color: var(--text-main); } | |
| /* --- DASHBOARD --- */ | |
| .dashboard-layout { display: grid; grid-template-columns: 250px 1fr; gap: 2rem; min-height: 80vh; } | |
| .sidebar { background: var(--bg-card); padding: 1.5rem; border-radius: var(--radius); } | |
| .sidebar li { padding: 0.8rem; cursor: pointer; border-radius: 0.5rem; margin-bottom: 0.5rem; color: var(--text-muted); } | |
| .sidebar li:hover, .sidebar li.active { background: var(--bg-body); color: var(--primary); font-weight: 600; } | |
| .dash-content { background: var(--bg-card); padding: 2rem; border-radius: var(--radius); } | |
| .stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; } | |
| .stat-box { background: var(--bg-body); padding: 1.5rem; rounded: var(--radius); text-align: center; } | |
| .stat-box h3 { font-size: 2rem; color: var(--primary); } | |
| /* --- PLANS --- */ | |
| .plan-card { border: 1px solid var(--border); padding: 2rem; rounded: var(--radius); text-align: center; position: relative; } | |
| .plan-card.featured { border: 2px solid var(--primary); background: rgba(79, 46, 225, 0.05); } | |
| .plan-price { font-size: 2.5rem; font-weight: 700; margin: 1rem 0; } | |
| .plan-features li { margin: 0.5rem 0; color: var(--text-muted); } | |
| /* --- MODAL --- */ | |
| .modal { | |
| position: fixed; top: 0; left: 0; width: 100%; height: 100%; | |
| background: rgba(0,0,0,0.5); z-index: 1000; | |
| display: flex; align-items: center; justify-content: center; | |
| opacity: 0; pointer-events: none; transition: 0.3s; | |
| } | |
| .modal.open { opacity: 1; pointer-events: auto; } | |
| .modal-content { | |
| background: var(--bg-card); width: 400px; padding: 2rem; | |
| rounded: var(--radius); transform: scale(0.9); transition: 0.3s; | |
| } | |
| .modal.open .modal-content { transform: scale(1); } | |
| /* --- RESPONSIVE --- */ | |
| @media (max-width: 768px) { | |
| .dashboard-layout { grid-template-columns: 1fr; } | |
| .hero { padding: 2rem 0; text-align: center; } | |
| .store-header { flex-direction: column; text-align: center; } | |
| .nav-links { display: none; } /* Simplified for mobile demo */ | |
| .stat-grid { grid-template-columns: repeat(2, 1fr); } | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <!-- Header --> | |
| <header> | |
| <div class="container top-bar flex justify-between items-center"> | |
| <a href="#" onclick="app.navigate('home')" class="flex items-center gap-2" style="font-size: 1.5rem; font-weight: 800;"> | |
| <i class="fa-solid fa-bolt text-primary"></i> Voltix | |
| </a> | |
| <div class="nav-links flex items-center"> | |
| <a href="#" onclick="app.navigate('home')">Home</a> | |
| <a href="#" onclick="app.navigate('store')">Storefront</a> | |
| <a href="#" onclick="app.navigate('plans')">Plans</a> | |
| <a href="#" onclick="app.navigate('dashboard')">Dashboard</a> | |
| </div> | |
| <div class="flex items-center gap-4"> | |
| <button class="btn btn-outline" onclick="app.toggleTheme()"> | |
| <i class="fa-solid fa-moon"></i> | |
| </button> | |
| <button class="btn btn-outline" onclick="app.toggleLang()"> | |
| <span id="lang-text">EN</span> | |
| </button> | |
| <button class="btn btn-primary" onclick="app.openModal('login')"> | |
| <i class="fa-solid fa-user"></i> Login | |
| </button> | |
| <button class="btn btn-outline" style="position: relative;"> | |
| <i class="fa-solid fa-shopping-cart"></i> | |
| <span style="position:absolute; top:-8px; right:-8px; background:var(--secondary); color:white; font-size:0.7rem; padding:2px 6px; rounded:10px;">2</span> | |
| </button> | |
| </div> | |
| </div> | |
| </header> | |
| <!-- Main Content Injection Point --> | |
| <main id="app-root"></main> | |
| <!-- Modal Template --> | |
| <div class="modal" id="auth-modal"> | |
| <div class="modal-content"> | |
| <div class="flex justify-between items-center mb-4"> | |
| <h2>Welcome Back</h2> | |
| <button onclick="app.closeModal()" style="background:none; border:none; cursor:pointer;"><i class="fa-solid fa-xmark"></i></button> | |
| </div> | |
| <form onsubmit="app.handleLogin(event)"> | |
| <div class="flex-col gap-2"> | |
| <input type="email" placeholder="Email" class="p-4 rounded" style="background:var(--bg-body); border:1px solid var(--border); color:var(--text-main);"> | |
| <input type="password" placeholder="Password" class="p-4 rounded" style="background:var(--bg-body); border:1px solid var(--border); color:var(--text-main);"> | |
| <button type="submit" class="btn btn-primary mt-4">Sign In</button> | |
| </div> | |
| </form> | |
| </div> | |
| </div> | |
| <script> | |
| </script> | |
| </body> | |
| </html> |