Spaces:
Running
Running
| <html lang="pt-BR"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>ShopEasy - Sua loja online favorita</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"> | |
| <style> | |
| @keyframes fadeIn { | |
| from { opacity: 0; transform: translateY(10px); } | |
| to { opacity: 1; transform: translateY(0); } | |
| } | |
| .fade-in { | |
| animation: fadeIn 0.3s ease-out forwards; | |
| } | |
| .notification-badge { | |
| position: absolute; | |
| top: -5px; | |
| right: -5px; | |
| width: 20px; | |
| height: 20px; | |
| border-radius: 50%; | |
| background-color: #FF5722; | |
| color: white; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| font-size: 12px; | |
| font-weight: bold; | |
| } | |
| .discount-badge { | |
| position: absolute; | |
| top: 10px; | |
| left: 10px; | |
| background-color: #FF5722; | |
| color: white; | |
| padding: 3px 8px; | |
| border-radius: 4px; | |
| font-size: 12px; | |
| font-weight: bold; | |
| } | |
| .slide-up { | |
| transform: translateY(100%); | |
| transition: transform 0.3s ease-out; | |
| } | |
| .slide-up.show { | |
| transform: translateY(0); | |
| } | |
| .skeleton { | |
| background-color: #E5E7EB; | |
| border-radius: 4px; | |
| animation: pulse 1.5s infinite; | |
| } | |
| @keyframes pulse { | |
| 0%, 100% { opacity: 1; } | |
| 50% { opacity: 0.5; } | |
| } | |
| .cart-item-enter { | |
| opacity: 0; | |
| transform: translateX(20px); | |
| } | |
| .cart-item-enter-active { | |
| opacity: 1; | |
| transform: translateX(0); | |
| transition: all 300ms ease-out; | |
| } | |
| .cart-item-exit { | |
| opacity: 1; | |
| } | |
| .cart-item-exit-active { | |
| opacity: 0; | |
| transform: translateX(20px); | |
| transition: all 300ms ease-out; | |
| } | |
| .product-card:hover { | |
| transform: translateY(-5px); | |
| transition: transform 0.2s ease-out; | |
| box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-50 font-sans"> | |
| <!-- Main App Container --> | |
| <div class="max-w-md mx-auto bg-white min-h-screen shadow-lg relative overflow-hidden"> | |
| <!-- Header --> | |
| <header class="bg-purple-600 text-white p-4 flex justify-between items-center sticky top-0 z-10"> | |
| <button id="menuBtn" class="text-white"> | |
| <i class="fas fa-bars text-xl"></i> | |
| </button> | |
| <h1 class="text-xl font-bold">ShopEasy</h1> | |
| <div class="flex items-center space-x-4"> | |
| <button id="searchBtn" class="text-white"> | |
| <i class="fas fa-search text-xl"></i> | |
| </button> | |
| <button id="cartBtn" class="relative"> | |
| <i class="fas fa-shopping-cart text-xl"></i> | |
| <span id="cartCount" class="notification-badge hidden">0</span> | |
| </button> | |
| </div> | |
| </header> | |
| <!-- Main Content --> | |
| <main class="p-4 pb-20"> | |
| <!-- Hero Banner --> | |
| <div class="relative rounded-xl overflow-hidden mb-6 fade-in"> | |
| <img src="https://images.unsplash.com/photo-1607082348824-0a96f2a4b9da?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1000&q=80" | |
| alt="Promoção de Verão" class="w-full h-40 object-cover"> | |
| <div class="absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-4"> | |
| <h2 class="text-white font-bold text-lg">Oferta de Verão</h2> | |
| <p class="text-white/90 text-sm">Até 50% de desconto</p> | |
| <button class="mt-2 bg-white text-purple-600 px-4 py-1 rounded-full text-sm font-medium"> | |
| Compre agora | |
| </button> | |
| </div> | |
| </div> | |
| <!-- Categories --> | |
| <section class="mb-6 fade-in"> | |
| <h2 class="font-semibold text-lg text-gray-800 mb-3">Categorias</h2> | |
| <div class="grid grid-cols-4 gap-3"> | |
| <div class="flex flex-col items-center"> | |
| <div class="bg-purple-100 w-14 h-14 rounded-full flex items-center justify-center mb-1"> | |
| <i class="fas fa-tshirt text-purple-600 text-xl"></i> | |
| </div> | |
| <span class="text-xs text-center">Moda</span> | |
| </div> | |
| <div class="flex flex-col items-center"> | |
| <div class="bg-blue-100 w-14 h-14 rounded-full flex items-center justify-center mb-1"> | |
| <i class="fas fa-mobile-alt text-blue-600 text-xl"></i> | |
| </div> | |
| <span class="text-xs text-center">Eletrônicos</span> | |
| </div> | |
| <div class="flex flex-col items-center"> | |
| <div class="bg-green-100 w-14 h-14 rounded-full flex items-center justify-center mb-1"> | |
| <i class="fas fa-home text-green-600 text-xl"></i> | |
| </div> | |
| <span class="text-xs text-center">Casa</span> | |
| </div> | |
| <div class="flex flex-col items-center"> | |
| <div class="bg-yellow-100 w-14 h-14 rounded-full flex items-center justify-center mb-1"> | |
| <i class="fas fa-heart text-yellow-600 text-xl"></i> | |
| </div> | |
| <span class="text-xs text-center">Beleza</span> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Featured Products --> | |
| <section class="mb-6 fade-in"> | |
| <div class="flex justify-between items-center mb-3"> | |
| <h2 class="font-semibold text-lg text-gray-800">Destaques</h2> | |
| <a href="#" class="text-purple-600 text-sm">Ver todos</a> | |
| </div> | |
| <div class="grid grid-cols-2 gap-3"> | |
| <!-- Product 1 --> | |
| <div class="product-card bg-white rounded-lg shadow-md overflow-hidden border border-gray-100 cursor-pointer transition-all"> | |
| <div class="relative"> | |
| <img src="https://images.unsplash.com/photo-1546868871-7041f2a55e12?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=80" | |
| alt="Smartphone" class="w-full h-32 object-cover"> | |
| <div class="discount-badge">-20%</div> | |
| <div class="absolute top-2 right-2 bg-white bg-opacity-90 rounded-full p-1"> | |
| <i class="far fa-heart text-gray-400"></i> | |
| </div> | |
| </div> | |
| <div class="p-3"> | |
| <h3 class="font-medium text-gray-800 text-sm truncate">Smartphone X9 Pro</h3> | |
| <div class="flex items-center mt-1"> | |
| <div class="flex text-yellow-400 text-xs"> | |
| <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-gray-500 text-xs ml-1">(128)</span> | |
| </div> | |
| <div class="flex items-center mt-2"> | |
| <span class="text-purple-600 font-bold">R$ 1.799</span> | |
| <span class="text-gray-400 text-xs line-through ml-2">R$ 2.249</span> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Product 2 --> | |
| <div class="product-card bg-white rounded-lg shadow-md overflow-hidden border border-gray-100 cursor-pointer transition-all"> | |
| <div class="relative"> | |
| <img src="https://images.unsplash.com/photo-1591047139829-d91aecb6caea?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=80" | |
| alt="Tênis Esportivo" class="w-full h-32 object-cover"> | |
| <div class="absolute top-2 right-2 bg-white bg-opacity-90 rounded-full p-1"> | |
| <i class="fas fa-heart text-red-500"></i> | |
| </div> | |
| </div> | |
| <div class="p-3"> | |
| <h3 class="font-medium text-gray-800 text-sm truncate">Tênis RunMax</h3> | |
| <div class="flex items-center mt-1"> | |
| <div class="flex text-yellow-400 text-xs"> | |
| <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"></i> | |
| </div> | |
| <span class="text-gray-500 text-xs ml-1">(256)</span> | |
| </div> | |
| <div class="flex items-center mt-2"> | |
| <span class="text-purple-600 font-bold">R$ 249</span> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Flash Sale --> | |
| <section class="mb-6 fade-in"> | |
| <div class="bg-red-50 p-3 rounded-lg"> | |
| <div class="flex justify-between items-center mb-3"> | |
| <div> | |
| <h2 class="font-semibold text-lg text-red-600">Oferta Relâmpago</h2> | |
| <p class="text-xs text-red-500">Termina em 04:32:15</p> | |
| </div> | |
| <a href="#" class="text-red-600 text-sm">Ver todos</a> | |
| </div> | |
| <div class="grid grid-cols-3 gap-2"> | |
| <!-- Flash Product 1 --> | |
| <div class="bg-white rounded-lg shadow-sm overflow-hidden border border-gray-100"> | |
| <img src="https://images.unsplash.com/photo-1523275335684-37898b6baf30?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=80" | |
| alt="Relógio" class="w-full h-24 object-contain p-2"> | |
| <div class="p-2"> | |
| <div class="flex justify-between items-center"> | |
| <span class="text-red-600 font-bold text-sm">R$ 89</span> | |
| <span class="text-gray-400 text-xs line-through">R$ 129</span> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Flash Product 2 --> | |
| <div class="bg-white rounded-lg shadow-sm overflow-hidden border border-gray-100"> | |
| <img src="https://images.unsplash.com/photo-1505740420928-5e560c06d30e?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=80" | |
| alt="Fones" class="w-full h-24 object-contain p-2"> | |
| <div class="p-2"> | |
| <div class="flex justify-between items-center"> | |
| <span class="text-red-600 font-bold text-sm">R$ 59</span> | |
| <span class="text-gray-400 text-xs line-through">R$ 99</span> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Flash Product 3 --> | |
| <div class="bg-white rounded-lg shadow-sm overflow-hidden border border-gray-100"> | |
| <img src="https://images.unsplash.com/photo-1543512214-318c7553f230?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=80" | |
| alt="Mochila" class="w-full h-24 object-contain p-2"> | |
| <div class="p-2"> | |
| <div class="flex justify-between items-center"> | |
| <span class="text-red-600 font-bold text-sm">R$ 119</span> | |
| <span class="text-gray-400 text-xs line-through">R$ 179</span> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Recently Viewed --> | |
| <section class="fade-in"> | |
| <div class="flex justify-between items-center mb-3"> | |
| <h2 class="font-semibold text-lg text-gray-800">Vistos recentemente</h2> | |
| <a href="#" class="text-purple-600 text-sm">Ver todos</a> | |
| </div> | |
| <div class="space-y-3"> | |
| <!-- Viewed Product 1 --> | |
| <div class="flex items-center bg-white p-3 rounded-lg shadow-sm border border-gray-100"> | |
| <img src="https://images.unsplash.com/photo-1526170375885-4d8ecf77b99f?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=80" | |
| alt="Câmera" class="w-16 h-16 rounded-lg object-cover"> | |
| <div class="ml-3 flex-1"> | |
| <h3 class="font-medium text-gray-800 text-sm">Câmera Instantânea</h3> | |
| <div class="flex items-center mt-1"> | |
| <div class="flex text-yellow-400 text-xs"> | |
| <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="far fa-star"></i> | |
| </div> | |
| <span class="text-gray-500 text-xs ml-1">(87)</span> | |
| </div> | |
| <div class="flex justify-between items-center mt-1"> | |
| <span class="text-purple-600 font-bold text-sm">R$ 349</span> | |
| <button class="bg-purple-100 text-purple-600 p-1 rounded-full text-xs"> | |
| <i class="fas fa-plus"></i> | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Viewed Product 2 --> | |
| <div class="flex items-center bg-white p-3 rounded-lg shadow-sm border border-gray-100"> | |
| <img src="https://images.unsplash.com/photo-1585386959984-a4155224a1ad?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=80" | |
| alt="Perfume" class="w-16 h-16 rounded-lg object-cover"> | |
| <div class="ml-3 flex-1"> | |
| <h3 class="font-medium text-gray-800 text-sm">Perfume Essence</h3> | |
| <div class="flex items-center mt-1"> | |
| <div class="flex text-yellow-400 text-xs"> | |
| <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> | |
| <i class="far fa-star"></i> | |
| </div> | |
| <span class="text-gray-500 text-xs ml-1">(42)</span> | |
| </div> | |
| <div class="flex justify-between items-center mt-1"> | |
| <span class="text-purple-600 font-bold text-sm">R$ 129</span> | |
| <button class="bg-purple-100 text-purple-600 p-1 rounded-full text-xs"> | |
| <i class="fas fa-plus"></i> | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| </main> | |
| <!-- Bottom Navigation --> | |
| <nav class="bg-white border-t border-gray-200 fixed bottom-0 w-full max-w-md flex justify-around py-3"> | |
| <button class="text-purple-600 flex flex-col items-center"> | |
| <i class="fas fa-home text-xl"></i> | |
| <span class="text-xs mt-1">Início</span> | |
| </button> | |
| <button class="text-gray-500 flex flex-col items-center"> | |
| <i class="fas fa-search text-xl"></i> | |
| <span class="text-xs mt-1">Buscar</span> | |
| </button> | |
| <button class="text-gray-500 flex flex-col items-center"> | |
| <i class="fas fa-heart text-xl"></i> | |
| <span class="text-xs mt-1">Favoritos</span> | |
| </button> | |
| <button class="text-gray-500 flex flex-col items-center"> | |
| <i class="fas fa-user text-xl"></i> | |
| <span class="text-xs mt-1">Perfil</span> | |
| </button> | |
| </nav> | |
| <!-- Side Menu (Hidden by default) --> | |
| <div id="sideMenu" class="fixed inset-0 bg-black bg-opacity-50 z-20 hidden"> | |
| <div class="absolute left-0 top-0 h-full w-3/4 bg-white shadow-lg transform transition-transform duration-300 ease-in-out -translate-x-full"> | |
| <div class="p-4 border-b border-gray-200 flex items-center"> | |
| <img src="https://randomuser.me/api/portraits/women/44.jpg" alt="User" class="w-12 h-12 rounded-full object-cover"> | |
| <div class="ml-3"> | |
| <h3 class="font-medium">Ana Silva</h3> | |
| <p class="text-sm text-gray-500">Nível: Ouro</p> | |
| </div> | |
| </div> | |
| <nav class="p-2"> | |
| <a href="#" class="flex items-center p-3 rounded-lg hover:bg-gray-100"> | |
| <i class="fas fa-user-circle text-gray-600 mr-3"></i> | |
| <span>Meu Perfil</span> | |
| </a> | |
| <a href="#" class="flex items-center p-3 rounded-lg hover:bg-gray-100"> | |
| <i class="fas fa-box-open text-gray-600 mr-3"></i> | |
| <span>Meus Pedidos</span> | |
| </a> | |
| <a href="#" class="flex items-center p-3 rounded-lg hover:bg-gray-100"> | |
| <i class="fas fa-heart text-gray-600 mr-3"></i> | |
| <span>Favoritos</span> | |
| </a> | |
| <a href="#" class="flex items-center p-3 rounded-lg hover:bg-gray-100"> | |
| <i class="fas fa-map-marker-alt text-gray-600 mr-3"></i> | |
| <span>Endereços</span> | |
| </a> | |
| <a href="#" class="flex items-center p-3 rounded-lg hover:bg-gray-100"> | |
| <i class="fas fa-credit-card text-gray-600 mr-3"></i> | |
| <span>Pagamentos</span> | |
| </a> | |
| <a href="#" class="flex items-center p-3 rounded-lg hover:bg-gray-100"> | |
| <i class="fas fa-cog text-gray-600 mr-3"></i> | |
| <span>Configurações</span> | |
| </a> | |
| <a href="#" class="flex items-center p-3 rounded-lg hover:bg-gray-100"> | |
| <i class="fas fa-question-circle text-gray-600 mr-3"></i> | |
| <span>Ajuda</span> | |
| </a> | |
| <a href="#" class="flex items-center p-3 rounded-lg hover:bg-gray-100"> | |
| <i class="fas fa-sign-out-alt text-gray-600 mr-3"></i> | |
| <span>Sair</span> | |
| </a> | |
| </nav> | |
| </div> | |
| </div> | |
| <!-- Search Panel (Hidden by default) --> | |
| <div id="searchPanel" class="fixed inset-0 bg-white z-30 hidden"> | |
| <div class="p-4 border-b border-gray-200 flex items-center sticky top-0 bg-white z-10"> | |
| <button id="closeSearch" class="mr-3 text-gray-500"> | |
| <i class="fas fa-arrow-left"></i> | |
| </button> | |
| <div class="relative flex-1"> | |
| <input type="text" placeholder="O que você está procurando?" | |
| class="w-full p-2 pl-10 rounded-full border border-gray-300 focus:outline-none focus:ring-1 focus:ring-purple-500"> | |
| <i class="fas fa-search absolute left-3 top-3 text-gray-400"></i> | |
| </div> | |
| </div> | |
| <div class="p-4 overflow-y-auto h-full pb-20"> | |
| <h3 class="font-medium text-gray-800 mb-3">Histórico de busca</h3> | |
| <div class="space-y-2"> | |
| <div class="flex justify-between items-center p-2 rounded-lg hover:bg-gray-50"> | |
| <span class="text-gray-600">smartphone</span> | |
| <button class="text-gray-400"> | |
| <i class="fas fa-times"></i> | |
| </button> | |
| </div> | |
| <div class="flex justify-between items-center p-2 rounded-lg hover:bg-gray-50"> | |
| <span class="text-gray-600">tênis esportivo</span> | |
| <button class="text-gray-400"> | |
| <i class="fas fa-times"></i> | |
| </button> | |
| </div> | |
| <div class="flex justify-between items-center p-2 rounded-lg hover:bg-gray-50"> | |
| <span class="text-gray-600">fone bluetooth</span> | |
| <button class="text-gray-400"> | |
| <i class="fas fa-times"></i> | |
| </button> | |
| </div> | |
| </div> | |
| <h3 class="font-medium text-gray-800 mt-6 mb-3">Categorias populares</h3> | |
| <div class="grid grid-cols-2 gap-3"> | |
| <div class="bg-gray-50 p-3 rounded-lg"> | |
| <i class="fas fa-tshirt text-purple-600 mb-1"></i> | |
| <span class="text-sm">Moda</span> | |
| </div> | |
| <div class="bg-gray-50 p-3 rounded-lg"> | |
| <i class="fas fa-mobile-alt text-blue-600 mb-1"></i> | |
| <span class="text-sm">Eletrônicos</span> | |
| </div> | |
| <div class="bg-gray-50 p-3 rounded-lg"> | |
| <i class="fas fa-home text-green-600 mb-1"></i> | |
| <span class="text-sm">Casa</span> | |
| </div> | |
| <div class="bg-gray-50 p-3 rounded-lg"> | |
| <i class="fas fa-heart text-pink-600 mb-1"></i> | |
| <span class="text-sm">Beleza</span> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Cart Panel (Hidden by default) --> | |
| <div id="cartPanel" class="fixed inset-0 bg-black bg-opacity-50 z-40 hidden flex items-end"> | |
| <div class="bg-white w-full rounded-t-3xl slide-up max-h-[90vh] flex flex-col"> | |
| <div class="p-4 sticky top-0 bg-white z-10 border-b border-gray-200 flex justify-between items-center"> | |
| <h3 class="font-semibold text-lg">Meu Carrinho</h3> | |
| <button id="closeCart" class="text-gray-500"> | |
| <i class="fas fa-times"></i> | |
| </button> | |
| </div> | |
| <div class="flex-1 overflow-y-auto p-4 space-y-4" id="cartItems"> | |
| <!-- Cart Item 1 --> | |
| <div class="flex items-center border-b border-gray-100 pb-4"> | |
| <img src="https://images.unsplash.com/photo-1546868871-7041f2a55e12?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=80" | |
| alt="Smartphone" class="w-16 h-16 rounded-lg object-cover"> | |
| <div class="ml-3 flex-1"> | |
| <h4 class="font-medium text-sm">Smartphone X9 Pro</h4> | |
| <div class="flex justify-between items-center mt-1"> | |
| <span class="text-purple-600 font-bold text-sm">R$ 1.799</span> | |
| <div class="flex items-center space-x-2"> | |
| <button class="w-6 h-6 rounded-full border border-gray-300 flex items-center justify-center"> | |
| <i class="fas fa-minus text-xs"></i> | |
| </button> | |
| <span>1</span> | |
| <button class="w-6 h-6 rounded-full border border-gray-300 flex items-center justify-center"> | |
| <i class="fas fa-plus text-xs"></i> | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <button class="ml-2 text-gray-400"> | |
| <i class="fas fa-trash-alt"></i> | |
| </button> | |
| </div> | |
| <!-- Cart Item 2 --> | |
| <div class="flex items-center border-b border-gray-100 pb-4"> | |
| <img src="https://images.unsplash.com/photo-1591047139829-d91aecb6caea?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=80" | |
| alt="Tênis Esportivo" class="w-16 h-16 rounded-lg object-cover"> | |
| <div class="ml-3 flex-1"> | |
| <h4 class="font-medium text-sm">Tênis RunMax</h4> | |
| <div class="flex justify-between items-center mt-1"> | |
| <span class="text-purple-600 font-bold text-sm">R$ 249</span> | |
| <div class="flex items-center space-x-2"> | |
| <button class="w-6 h-6 rounded-full border border-gray-300 flex items-center justify-center"> | |
| <i class="fas fa-minus text-xs"></i> | |
| </button> | |
| <span>1</span> | |
| <button class="w-6 h-6 rounded-full border border-gray-300 flex items-center justify-center"> | |
| <i class="fas fa-plus text-xs"></i> | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <button class="ml-2 text-gray-400"> | |
| <i class="fas fa-trash-alt"></i> | |
| </button> | |
| </div> | |
| </div> | |
| <div class="sticky bottom-0 bg-white p-4 border-t border-gray-200"> | |
| <div class="flex justify-between items-center mb-3"> | |
| <span class="text-gray-600">Subtotal</span> | |
| <span class="font-bold">R$ 2.048</span> | |
| </div> | |
| <div class="flex justify-between items-center mb-3"> | |
| <span class="text-gray-600">Frete</span> | |
| <span class="font-bold">Grátis</span> | |
| </div> | |
| <div class="flex justify-between items-center mb-4"> | |
| <span class="text-gray-600">Desconto</span> | |
| <span class="font-bold text-purple-600">-R$ 200</span> | |
| </div> | |
| <div class="flex justify-between items-center font-bold text-lg mb-4"> | |
| <span>Total</span> | |
| <span>R$ 1.848</span> | |
| </div> | |
| <button class="w-full bg-purple-600 text-white py-3 rounded-lg font-medium"> | |
| Finalizar Compra | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <script> | |
| // DOM Elements | |
| const menuBtn = document.getElementById('menuBtn'); | |
| const sideMenu = document.getElementById('sideMenu'); | |
| const searchBtn = document.getElementById('searchBtn'); | |
| const searchPanel = document.getElementById('searchPanel'); | |
| const closeSearch = document.getElementById('closeSearch'); | |
| const cartBtn = document.getElementById('cartBtn'); | |
| const cartPanel = document.getElementById('cartPanel'); | |
| const closeCart = document.getElementById('closeCart'); | |
| const cartCount = document.getElementById('cartCount'); | |
| // Sample products data | |
| const products = [ | |
| { | |
| id: 1, | |
| name: "Smartphone X9 Pro", | |
| price: 1799, | |
| discount: 2249, | |
| image: "https://images.unsplash.com/photo-1546868871-7041f2a55e12?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=80", | |
| rating: 4.5, | |
| reviews: 128, | |
| discountPercent: 20 | |
| }, | |
| { | |
| id: 2, | |
| name: "Tênis RunMax", | |
| price: 249, | |
| image: "https://images.unsplash.com/photo-1591047139829-d91aecb6caea?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=80", | |
| rating: 5, | |
| reviews: 256 | |
| } | |
| ]; | |
| // Cart items | |
| let cartItems = [ | |
| { product: products[0], quantity: 1 }, | |
| { product: products[1], quantity: 1 } | |
| ]; | |
| // Update cart count | |
| function updateCartCount() { | |
| const totalItems = cartItems.reduce((total, item) => total + item.quantity, 0); | |
| if (totalItems > 0) { | |
| cartCount.textContent = totalItems; | |
| cartCount.classList.remove('hidden'); | |
| } else { | |
| cartCount.classList.add('hidden'); | |
| } | |
| } | |
| // Initialize cart count | |
| updateCartCount(); | |
| // Event Listeners | |
| menuBtn.addEventListener('click', () => { | |
| sideMenu.classList.remove('hidden'); | |
| setTimeout(() => { | |
| sideMenu.querySelector('div').classList.remove('-translate-x-full'); | |
| }, 10); | |
| }); | |
| sideMenu.addEventListener('click', (e) => { | |
| if (e.target === sideMenu) { | |
| sideMenu.querySelector('div').classList.add('-translate-x-full'); | |
| setTimeout(() => { | |
| sideMenu.classList.add('hidden'); | |
| }, 300); | |
| } | |
| }); | |
| searchBtn.addEventListener('click', () => { | |
| searchPanel.classList.remove('hidden'); | |
| }); | |
| closeSearch.addEventListener('click', () => { | |
| searchPanel.classList.add('hidden'); | |
| }); | |
| cartBtn.addEventListener('click', () => { | |
| cartPanel.classList.remove('hidden'); | |
| setTimeout(() => { | |
| cartPanel.querySelector('.slide-up').classList.add('show'); | |
| }, 10); | |
| }); | |
| closeCart.addEventListener('click', () => { | |
| cartPanel.querySelector('.slide-up').classList.remove('show'); | |
| setTimeout(() => { | |
| cartPanel.classList.add('hidden'); | |
| }, 300); | |
| }); | |
| cartPanel.addEventListener('click', (e) => { | |
| if (e.target === cartPanel) { | |
| cartPanel.querySelector('.slide-up').classList.remove('show'); | |
| setTimeout(() => { | |
| cartPanel.classList.add('hidden'); | |
| }, 300); | |
| } | |
| }); | |
| // Initialize fade-in animations for content | |
| document.addEventListener('DOMContentLoaded', () => { | |
| const fadeElements = document.querySelectorAll('.fade-in'); | |
| fadeElements.forEach((el, index) => { | |
| setTimeout(() => { | |
| el.style.opacity = '1'; | |
| el.style.transform = 'translateY(0)'; | |
| }, index * 100); | |
| }); | |
| // Add hover effect to product cards | |
| const productCards = document.querySelectorAll('.product-card'); | |
| productCards.forEach(card => { | |
| card.addEventListener('mouseenter', () => { | |
| card.style.transform = 'translateY(-5px)'; | |
| card.style.boxShadow = '0 10px 15px -3px rgba(0, 0, 0, 0.1)'; | |
| }); | |
| card.addEventListener('mouseleave', () => { | |
| card.style.transform = ''; | |
| card.style.boxShadow = ''; | |
| }); | |
| }); | |
| }); | |
| // Simulate adding items to cart | |
| const addToCartButtons = document.querySelectorAll('.fa-plus'); | |
| addToCartButtons.forEach(button => { | |
| button.addEventListener('click', (e) => { | |
| e.stopPropagation(); | |
| // Find the product in the products array | |
| const productName = e.target.closest('.flex.items-center').querySelector('h3').textContent; | |
| const product = products.find(p => p.name === productName); | |
| if (product) { | |
| // Check if product already in cart | |
| const existingItem = cartItems.find(item => item.product.id === product.id); | |
| if (existingItem) { | |
| existingItem.quantity += 1; | |
| } else { | |
| cartItems.push({ product, quantity: 1 }); | |
| } | |
| // Update cart count | |
| updateCartCount(); | |
| // Show added to cart feedback | |
| const badge = document.createElement('div'); | |
| badge.className = 'absolute top-2 right-2 bg-green-500 text-white text-xs px-2 py-1 rounded-full animate-bounce'; | |
| badge.textContent = 'Adicionado!'; | |
| e.target.closest('.flex.items-center').appendChild(badge); | |
| setTimeout(() => { | |
| badge.remove(); | |
| }, 1000); | |
| } | |
| }); | |
| }); | |
| </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 <a href="https://enzostvs-deepsite.hf.space" style="color: #fff;" target="_blank" >DeepSite</a> <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;"></p><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=WizardImon/shopeasy" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
| </html> |