Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>GlobalMarket - AliExpress Clone</title> | |
| <!-- Icons: FontAwesome --> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <!-- Fonts: Poppins --> | |
| <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet"> | |
| <style> | |
| /* ========================================= | |
| MODERN CSS STYLES | |
| ========================================= */ | |
| :root { | |
| --primary-color: #F26522; /* AliExpress Orange */ | |
| --primary-dark: #d65616; | |
| --secondary-color: #212121; | |
| --accent-color: #0073B3; | |
| --bg-light: #f7f8fa; | |
| --text-dark: #333; | |
| --text-light: #666; | |
| --white: #ffffff; | |
| --shadow: 0 4px 12px rgba(0,0,0,0.1); | |
| --transition: all 0.3s ease; | |
| } | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| font-family: 'Poppins', sans-serif; | |
| } | |
| body { | |
| background-color: var(--bg-light); | |
| color: var(--text-dark); | |
| line-height: 1.6; | |
| } | |
| /* --- HEADER & NAV --- */ | |
| header { | |
| background-color: var(--white); | |
| padding: 15px 5%; | |
| position: sticky; | |
| top: 0; | |
| z-index: 1000; | |
| box-shadow: 0 2px 5px rgba(0,0,0,0.05); | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| flex-wrap: wrap; | |
| gap: 15px; | |
| } | |
| .logo { | |
| font-size: 28px; | |
| font-weight: 700; | |
| color: var(--primary-color); | |
| text-decoration: none; | |
| display: flex; | |
| align-items: center; | |
| gap: 10px; | |
| } | |
| .logo span { | |
| color: var(--secondary-color); | |
| } | |
| .search-bar { | |
| flex: 1; | |
| max-width: 500px; | |
| position: relative; | |
| display: none; /* Hidden on very small screens */ | |
| } | |
| @media(min-width: 768px) { | |
| .search-bar { display: block; } | |
| } | |
| .search-bar input { | |
| width: 100%; | |
| padding: 10px 45px 10px 15px; | |
| border: 2px solid #ddd; | |
| border-radius: 25px; | |
| font-size: 14px; | |
| transition: var(--transition); | |
| } | |
| .search-bar input:focus { | |
| border-color: var(--primary-color); | |
| outline: none; | |
| } | |
| .search-bar button { | |
| position: absolute; | |
| right: 8px; | |
| top: 50%; | |
| transform: translateY(-50%); | |
| background: var(--primary-color); | |
| border: none; | |
| color: white; | |
| width: 35px; | |
| height: 35px; | |
| border-radius: 50%; | |
| cursor: pointer; | |
| transition: var(--transition); | |
| } | |
| .search-bar button:hover { | |
| background: var(--primary-dark); | |
| } | |
| .nav-icons { | |
| display: flex; | |
| align-items: center; | |
| gap: 20px; | |
| } | |
| .nav-item { | |
| position: relative; | |
| cursor: pointer; | |
| font-size: 18px; | |
| color: var(--secondary-color); | |
| transition: color 0.3s; | |
| } | |
| .nav-item:hover { | |
| color: var(--primary-color); | |
| } | |
| .cart-count { | |
| position: absolute; | |
| top: -8px; | |
| right: -10px; | |
| background: var(--primary-color); | |
| color: white; | |
| font-size: 10px; | |
| padding: 2px 6px; | |
| border-radius: 10px; | |
| font-weight: 700; | |
| } | |
| .user-menu { | |
| display: flex; | |
| align-items: center; | |
| gap: 10px; | |
| border-left: 1px solid #eee; | |
| padding-left: 20px; | |
| } | |
| .user-avatar { | |
| width: 35px; | |
| height: 35px; | |
| background-color: #ddd; | |
| border-radius: 50%; | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| color: #666; | |
| font-size: 14px; | |
| } | |
| /* --- HERO SECTION --- */ | |
| .hero { | |
| position: relative; | |
| height: 350px; | |
| background: linear-gradient(45deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%); | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| text-align: center; | |
| color: var(--white); | |
| overflow: hidden; | |
| } | |
| .hero::before { | |
| content: ''; | |
| position: absolute; | |
| top: 0; left: 0; width: 100%; height: 100%; | |
| background: url('https://images.unsplash.com/photo-1472851091035-528553d52223?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover; | |
| opacity: 0.3; | |
| } | |
| .hero-content { | |
| position: relative; | |
| z-index: 2; | |
| padding: 20px; | |
| } | |
| .hero h1 { | |
| font-size: 3rem; | |
| margin-bottom: 10px; | |
| text-shadow: 2px 2px 4px rgba(0,0,0,0.3); | |
| } | |
| .hero p { | |
| font-size: 1.2rem; | |
| margin-bottom: 20px; | |
| } | |
| .btn { | |
| padding: 12px 30px; | |
| border-radius: 30px; | |
| text-decoration: none; | |
| font-weight: 600; | |
| transition: var(--transition); | |
| cursor: pointer; | |
| border: none; | |
| font-size: 1rem; | |
| } | |
| .btn-primary { | |
| background-color: var(--primary-color); | |
| color: white; | |
| } | |
| .btn-primary:hover { | |
| background-color: var(--primary-dark); | |
| transform: translateY(-2px); | |
| } | |
| .btn-outline { | |
| background-color: transparent; | |
| border: 2px solid white; | |
| color: white; | |
| } | |
| .btn-outline:hover { | |
| background-color: white; | |
| color: var(--primary-color); | |
| } | |
| /* --- MAIN CONTENT GRID --- */ | |
| .container { | |
| max-width: 1200px; | |
| margin: 40px auto; | |
| padding: 0 20px; | |
| } | |
| .section-title { | |
| font-size: 2rem; | |
| margin-bottom: 30px; | |
| color: var(--secondary-color); | |
| border-bottom: 3px solid var(--primary-color); | |
| display: inline-block; | |
| padding-bottom: 5px; | |
| } | |
| .product-grid { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); | |
| gap: 25px; | |
| } | |
| .product-card { | |
| background: var(--white); | |
| border-radius: 12px; | |
| overflow: hidden; | |
| transition: var(--transition); | |
| box-shadow: var(--shadow); | |
| display: flex; | |
| flex-direction: column; | |
| } | |
| .product-card:hover { | |
| transform: translateY(-5px); | |
| box-shadow: 0 8px 20px rgba(0,0,0,0.15); | |
| } | |
| .product-image-container { | |
| width: 100%; | |
| height: 250px; | |
| overflow: hidden; | |
| position: relative; | |
| } | |
| .product-image { | |
| width: 100%; | |
| height: 100%; | |
| object-fit: cover; | |
| transition: transform 0.5s ease; | |
| } | |
| .product-card:hover .product-image { | |
| transform: scale(1.05); | |
| } | |
| .product-badge { | |
| position: absolute; | |
| top: 10px; | |
| left: 10px; | |
| background: rgba(255, 255, 255, 0.9); | |
| padding: 5px 10px; | |
| border-radius: 5px; | |
| font-size: 12px; | |
| font-weight: 600; | |
| color: var(--primary-color); | |
| box-shadow: 0 2px 5px rgba(0,0,0,0.1); | |
| } | |
| .product-info { | |
| padding: 20px; | |
| flex-grow: 1; | |
| display: flex; | |
| flex-direction: column; | |
| } | |
| .product-title { | |
| font-size: 16px; | |
| margin-bottom: 10px; | |
| color: var(--secondary-color); | |
| display: -webkit-box; | |
| -webkit-line-clamp: 2; | |
| -webkit-box-orient: vertical; | |
| overflow: hidden; | |
| height: 48px; | |
| } | |
| .product-rating { | |
| color: #ffc107; | |
| font-size: 14px; | |
| margin-bottom: 10px; | |
| } | |
| .price-row { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| margin-top: auto; | |
| } | |
| .product-price { | |
| font-size: 22px; | |
| font-weight: 700; | |
| color: var(--primary-color); | |
| } | |
| .product-price span { | |
| font-size: 14px; | |
| color: var(--text-light); | |
| font-weight: 400; | |
| } | |
| .add-to-cart-btn { | |
| background-color: var(--secondary-color); | |
| color: white; | |
| border: none; | |
| padding: 8px 15px; | |
| border-radius: 6px; | |
| cursor: pointer; | |
| transition: var(--transition); | |
| font-size: 14px; | |
| display: flex; | |
| align-items: center; | |
| gap: 5px; | |
| } | |
| .add-to-cart-btn:hover { | |
| background-color: var(--primary-color); | |
| } | |
| /* --- AUTH PAGES (Login/Register) --- */ | |
| .auth-container { | |
| max-width: 400px; | |
| margin: 50px auto; | |
| background: white; | |
| padding: 40px; | |
| border-radius: 15px; | |
| box-shadow: var(--shadow); | |
| text-align: center; | |
| } | |
| .auth-tabs { | |
| display: flex; | |
| margin-bottom: 30px; | |
| border-bottom: 2px solid #eee; | |
| } | |
| .auth-tab { | |
| flex: 1; | |
| padding: 15px; | |
| cursor: pointer; | |
| font-weight: 600; | |
| color: var(--text-light); | |
| transition: var(--transition); | |
| } | |
| .auth-tab.active { | |
| color: var(--primary-color); | |
| border-bottom: 3px solid var(--primary-color); | |
| margin-bottom: -2px; | |
| } | |
| .form-group { | |
| margin-bottom: 20px; | |
| text-align: left; | |
| } | |
| .form-group label { | |
| display: block; | |
| margin-bottom: 8px; | |
| font-weight: 500; | |
| color: var(--secondary-color); | |
| } | |
| .form-group input { | |
| width: 100%; | |
| padding: 12px; | |
| border: 1px solid #ddd; | |
| border-radius: 8px; | |
| font-size: 16px; | |
| transition: var(--transition); | |
| } | |
| .form-group input:focus { | |
| border-color: var(--primary-color); | |
| outline: none; | |
| } | |
| .btn-full { | |
| width: 100%; | |
| padding: 14px; | |
| font-size: 18px; | |
| margin-top: 10px; | |
| } | |
| .social-login { | |
| margin-top: 25px; | |
| display: flex; | |
| justify-content: center; | |
| gap: 15px; | |
| } | |
| .social-btn { | |
| width: 45px; | |
| height: 45px; | |
| border-radius: 50%; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| font-size: 20px; | |
| cursor: pointer; | |
| transition: var(--transition); | |
| color: white; | |
| } | |
| .fb { background-color: #3b5998; } | |
| .google { background-color: #db4437; } | |
| .twitter { background-color: #1da1f2; } | |
| .social-btn:hover { transform: scale(1.1); } | |
| /* --- CART & CHECKOUT --- */ | |
| .cart-container { | |
| background: white; | |
| padding: 30px; | |
| border-radius: 12px; | |
| box-shadow: var(--shadow); | |
| } | |
| .cart-item { | |
| display: flex; | |
| align-items: center; | |
| padding: 20px 0; | |
| border-bottom: 1px solid #eee; | |
| } | |
| .cart-item:last-child { border-bottom: none; } | |
| .cart-item-img { | |
| width: 100px; | |
| height: 100px; | |
| object-fit: cover; | |
| border-radius: 8px; | |
| margin-right: 20px; | |
| } | |
| .cart-item-details { | |
| flex-grow: 1; | |
| } | |
| .cart-item-title { | |
| font-size: 18px; | |
| font-weight: 600; | |
| margin-bottom: 5px; | |
| } | |
| .cart-item-price { | |
| color: var(--primary-color); | |
| font-weight: 700; | |
| font-size: 18px; | |
| } | |
| .cart-item-controls { | |
| display: flex; | |
| align-items: center; | |
| gap: 15px; | |
| margin-top: 10px; | |
| } | |
| .qty-btn { | |
| width: 30px; | |
| height: 30px; | |
| border: 1px solid #ddd; | |
| background: white; | |
| border-radius: 50%; | |
| cursor: pointer; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| font-size: 16px; | |
| } | |
| .cart-summary { | |
| margin-top: 30px; | |
| padding-top: 30px; | |
| border-top: 2px solid #eee; | |
| text-align: right; | |
| } | |
| .cart-summary h3 { | |
| margin-bottom: 20px; | |
| font-size: 24px; | |
| } | |
| .total-price { | |
| font-size: 32px; | |
| font-weight: 700; | |
| color: var(--primary-color); | |
| margin: 10px 0 20px 0; | |
| } | |
| /* --- ADMIN PANEL --- */ | |
| .admin-panel { | |
| display: grid; | |
| grid-template-columns: 250px 1fr; | |
| gap: 20px; | |
| } | |
| .admin-sidebar { | |
| background: white; | |
| padding: 20px; | |
| border-radius: 12px; | |
| box-shadow: var(--shadow); | |
| height: fit-content; | |
| } | |
| .admin-menu-item { | |
| padding: 12px; | |
| margin-bottom: 10px; | |
| cursor: pointer; | |
| border-radius: 8px; | |
| transition: var(--transition); | |
| color: var(--text-dark); | |
| display: flex; | |
| align-items: center; | |
| gap: 10px; | |
| } | |
| .admin-menu-item:hover, .admin-menu-item.active { | |
| background-color: #f0f0f0; | |
| color: var(--primary-color); | |
| font-weight: 600; | |
| } | |
| .admin-content { | |
| background: white; | |
| padding: 30px; | |
| border-radius: 12px; | |
| box-shadow: var(--shadow); | |
| } | |
| .table-responsive { | |
| overflow-x: auto; | |
| } | |
| table { | |
| width: 100%; | |
| border-collapse: collapse; | |
| margin-top: 20px; | |
| } | |
| th, td { | |
| padding: 15px; | |
| text-align: left; | |
| border-bottom: 1px solid #eee; | |
| } | |
| th { | |
| background-color: #f9f9f9; | |
| font-weight: 600; | |
| } | |
| .status-badge { | |
| padding: 4px 10px; | |
| border-radius: 15px; | |
| font-size: 12px; | |
| font-weight: 600; | |
| } | |
| .status-pending { background-color: #fff3cd; color: #856404; } | |
| .status-shipped { background-color: #d1ecf1; color: #0c5460; } | |
| .status-delivered { background-color: #d4edda; color: #155724; } | |
| /* --- FOOTER --- */ | |
| footer { | |
| background-color: var(--secondary-color); | |
| color: #ccc; | |
| padding: 50px 0 20px; | |
| margin-top: 60px; | |
| } | |
| .footer-grid { | |
| max-width: 1200px; | |
| margin: 0 auto; | |
| padding: 0 20px; | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); | |
| gap: 40px; | |
| margin-bottom: 40px; | |
| } | |
| .footer-col h4 { | |
| color: white; | |
| margin-bottom: 20px; | |
| font-size: 18px; | |
| } | |
| .footer-col ul { | |
| list-style: none; | |
| } | |
| .footer-col li { margin-bottom: 10px; } | |
| .footer-col a { color: #aaa; text-decoration: none; transition: 0.3s; } | |
| .footer-col a:hover { color: var(--primary-color); } | |
| .footer-bottom { | |
| text-align: center; | |
| padding-top: 30px; | |
| border-top: 1px solid #444; | |
| font-size: 14px; | |
| } | |
| .footer-bottom a { | |
| color: var(--primary-color); | |
| text-decoration: none; | |
| } | |
| /* --- NOTIFICATIONS --- */ | |
| .toast { | |
| position: fixed; | |
| bottom: 20px; | |
| right: 20px; | |
| background: var(--secondary-color); | |
| color: white; | |
| padding: 15px 25px; | |
| border-radius: 8px; | |
| box-shadow: 0 5px 15px rgba(0,0,0,0.3); | |
| transform: translateY(100px); | |
| transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55); | |
| z-index: 2000; | |
| display: flex; | |
| align-items: center; | |
| gap: 10px; | |
| } | |
| .toast.show { transform: translateY(0); } | |
| .toast.success { background-color: #28a745; } | |
| .toast.error { background-color: #dc3545; } | |
| /* --- RESPONSIVE --- */ | |
| @media (max-width: 768px) { | |
| .hero h1 { font-size: 2rem; } | |
| .product-grid { grid-template-columns: 1fr; } | |
| .admin-panel { grid-template-columns: 1fr; } | |
| .nav-icons .user-menu { display: none; } /* Hide user menu on mobile, show in dropdown */ | |
| .mobile-menu-btn { display: block; font-size: 24px; cursor: pointer; } | |
| .search-bar { max-width: 150px; } | |
| .search-bar input { display: none; } | |
| .search-bar.active input { display: block; width: 200px; position: absolute; left: 50%; transform: translateX(-50%); top: 10px; } | |
| .search-bar.active .search-bar button { top: 50%; transform: translateY(-50%); } | |
| } | |
| .mobile-menu-btn { display: none; } | |
| </style> | |
| </head> | |
| <body> | |
| <!-- Navigation --> | |
| <header> | |
| <a href="#" class="logo" onclick="App.navigate('index')"> | |
| <i class="fas fa-globe-americas"></i> Global<span>Market</span> | |
| </a> | |
| <div class="search-bar" id="searchBar"> | |
| <input type="text" id="searchInput" placeholder="Search for products, brands and more..."> | |
| <button onclick="App.searchProducts()"><i class="fas fa-search"></i></button> | |
| </div> | |
| <div class="nav-icons"> | |
| <div class="nav-item" onclick="alert('Wishlist feature coming soon!')"> | |
| <i class="far fa-heart"></i> | |
| </div> | |
| <div class="nav-item" onclick="App.navigate('cart')"> | |
| <i class="fas fa-shopping-cart"></i> | |
| <span class="cart-count" id="cartCount">0</span> | |
| </div> | |
| <div class="user-menu"> | |
| <div class="nav-item" onclick="App.navigate('profile')"> | |
| <i class="far fa-user"></i> | |
| </div> | |
| <div class="nav-item" onclick="App.navigate('orders')"> | |
| <i class="fas fa-truck"></i> | |
| </div> | |
| <div class="nav-item" onclick="alert('Notifications')"> | |
| <i class="far fa-bell"></i> | |
| </div> | |
| <!-- Mobile Menu Toggle --> | |
| <div class="mobile-menu-btn" onclick="document.querySelector('.user-menu').classList.toggle('show')"> | |
| <i class="fas fa-bars"></i> | |
| </div> | |
| </div> | |
| </div> | |
| </header> | |
| <!-- Main Content Area --> | |
| <main id="main-content"> | |
| <!-- Dynamic Content Loaded Here via JS --> | |
| </main> | |
| <!-- Toast Notification --> | |
| <div id="toast" class="toast"> | |
| <i class="fas fa-check-circle"></i> | |
| <span id="toastMessage">Action Successful</span> | |
| </div> | |
| <!-- Footer --> | |
| <footer> | |
| <div class="footer-grid"> | |
| <div class="footer-col"> | |
| <h4>GlobalMarket</h4> | |
| <p>Connecting the world with the best products at unbeatable prices. Your one-stop shop for everything.</p> | |
| </div> | |
| <div class="footer-col"> | |
| <h4>Customer Service</h4> | |
| <ul> | |
| <li><a href="#">Contact Us</a></li> | |
| <li><a href="#">Orders Tracking</a></li> | |
| <li><a href="#">Returns & Refunds</a></li> | |
| <li><a href="#">FAQ</a></li> | |
| </ul> | |
| </div> | |
| <div class="footer-col"> | |
| <h4>Categories</h4> | |
| <ul> | |
| <li><a href="#">Electronics</a></li> | |
| <li><a href="#">Fashion</a></li> | |
| <li><a href="#">Home & Living</a></li> | |
| <li><a href="#">Beauty</a></li> | |
| </ul> | |
| </div> | |
| <div class="footer-col"> | |
| <h4>Connect</h4> | |
| <div class="social-login" style="justify-content: flex-start; gap: 15px; margin-top: 10px;"> | |
| <div class="social-btn fb" onclick="alert('Facebook')"><i class="fab fa-facebook-f"></i></div> | |
| <div class="social-btn google" onclick="alert('Google')"><i class="fab fa-google"></i></div> | |
| <div class="social-btn twitter" onclick="alert('Twitter')"><i class="fab fa-twitter"></i></div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="footer-bottom"> | |
| © 2023 GlobalMarket Clone. All Rights Reserved. | | |
| <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank">Built with anycoder</a> | |
| </div> | |
| </footer> | |
| <!-- JavaScript Logic --> | |
| <script> | |