Spaces:
Running
Running
| <html lang="pt-BR"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Loja Bebê Reborn - Bonecas Realistas</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> | |
| .product-card:hover { | |
| transform: translateY(-5px); | |
| box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1); | |
| } | |
| .rating-star { | |
| color: #fbbf24; | |
| } | |
| .cart-notification { | |
| animation: bounce 0.5s; | |
| } | |
| @keyframes bounce { | |
| 0%, 100% { transform: scale(1); } | |
| 50% { transform: scale(1.2); } | |
| } | |
| .modal-overlay { | |
| background-color: rgba(0, 0, 0, 0.5); | |
| } | |
| .checkout-modal { | |
| animation: slideUp 0.3s ease-out; | |
| } | |
| @keyframes slideUp { | |
| from { transform: translateY(100%); } | |
| to { transform: translateY(0); } | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-50 font-sans"> | |
| <div id="app"> | |
| <!-- Header --> | |
| <header class="bg-white shadow-sm sticky top-0 z-10"> | |
| <div class="container mx-auto px-4 py-4 flex justify-between items-center"> | |
| <div class="flex items-center space-x-2"> | |
| <i class="fas fa-baby text-pink-500 text-2xl"></i> | |
| <h1 class="text-2xl font-bold text-gray-800">Loja Bebê Reborn</h1> | |
| </div> | |
| <div class="flex items-center space-x-4"> | |
| <div class="relative hidden md:block"> | |
| <input type="text" placeholder="Buscar bebê reborn..." | |
| class="border border-gray-300 rounded-full py-2 px-4 w-64 focus:outline-none focus:ring-2 focus:ring-pink-300"> | |
| <i class="fas fa-search absolute right-3 top-3 text-gray-400"></i> | |
| </div> | |
| <div class="relative cursor-pointer" onclick="toggleCart()"> | |
| <i class="fas fa-shopping-cart text-gray-700 text-xl"></i> | |
| <span id="cart-count" class="absolute -top-2 -right-2 bg-pink-500 text-white rounded-full w-5 h-5 flex items-center justify-center text-xs font-bold">0</span> | |
| </div> | |
| <button class="hidden md:block bg-pink-500 hover:bg-pink-600 text-white px-4 py-2 rounded-full transition duration-300"> | |
| Minha Conta | |
| </button> | |
| </div> | |
| </div> | |
| </header> | |
| <!-- Hero Section --> | |
| <section class="bg-gradient-to-r from-pink-100 to-purple-100 py-12"> | |
| <div class="container mx-auto px-4 text-center"> | |
| <h2 class="text-3xl md:text-4xl font-bold text-gray-800 mb-4">Bebês Reborn Realistas</h2> | |
| <p class="text-lg text-gray-600 max-w-2xl mx-auto mb-8"> | |
| Bonecas feitas à mão com amor e detalhes impressionantes. Perfeitas para colecionadores e mães de coração. | |
| </p> | |
| <button class="bg-pink-500 hover:bg-pink-600 text-white px-6 py-3 rounded-full font-medium transition duration-300 shadow-lg"> | |
| Ver Coleção Completa | |
| </button> | |
| </div> | |
| </section> | |
| <!-- Products Section --> | |
| <section class="py-12 container mx-auto px-4"> | |
| <div class="flex justify-between items-center mb-8"> | |
| <h2 class="text-2xl font-bold text-gray-800">Nossos Bebês Reborn</h2> | |
| <div class="flex space-x-2"> | |
| <button class="px-4 py-2 border rounded-full text-gray-600 hover:bg-gray-100">Todos</button> | |
| <button class="px-4 py-2 border rounded-full text-gray-600 hover:bg-gray-100">Meninas</button> | |
| <button class="px-4 py-2 border rounded-full text-gray-600 hover:bg-gray-100">Meninos</button> | |
| </div> | |
| </div> | |
| <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8"> | |
| <!-- Product 1 --> | |
| <div class="bg-white rounded-lg overflow-hidden shadow-md product-card transition duration-300"> | |
| <div class="relative"> | |
| <img src="https://images.unsplash.com/photo-1596704017256-e0ef812c4a1a?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80" | |
| alt="Bebê Reborn Ana Clara" class="w-full h-64 object-cover"> | |
| <div class="absolute top-2 right-2 bg-pink-500 text-white px-2 py-1 rounded-full text-xs font-bold"> | |
| NOVO | |
| </div> | |
| </div> | |
| <div class="p-5"> | |
| <div class="flex justify-between items-start mb-2"> | |
| <h3 class="text-lg font-semibold text-gray-800">Bebê Reborn Ana Clara</h3> | |
| <div class="flex"> | |
| <i class="fas fa-star rating-star"></i> | |
| <i class="fas fa-star rating-star"></i> | |
| <i class="fas fa-star rating-star"></i> | |
| <i class="fas fa-star rating-star"></i> | |
| <i class="fas fa-star rating-star"></i> | |
| </div> | |
| </div> | |
| <p class="text-pink-600 font-bold text-xl mb-3">R$ 499,90</p> | |
| <p class="text-gray-600 text-sm mb-4"> | |
| Feita à mão com amor, Ana Clara é incrivelmente realista, com toque suave e cheirinho de bebê. Acompanha roupinha, manta e chupeta magnética. | |
| </p> | |
| <div class="flex space-x-2"> | |
| <button class="flex-1 bg-pink-500 hover:bg-pink-600 text-white py-2 rounded transition duration-300" | |
| onclick="addToCart(1, 'Bebê Reborn Ana Clara', 499.90, 'https://images.unsplash.com/photo-1596704017256-e0ef812c4a1a?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80')"> | |
| <i class="fas fa-shopping-cart mr-2"></i> Comprar | |
| </button> | |
| <button class="w-10 h-10 border border-gray-300 rounded flex items-center justify-center hover:bg-gray-100"> | |
| <i class="far fa-heart text-gray-500"></i> | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Product 2 --> | |
| <div class="bg-white rounded-lg overflow-hidden shadow-md product-card transition duration-300"> | |
| <div class="relative"> | |
| <img src="https://images.unsplash.com/photo-1603712725038-e9334ae8f2f8?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1471&q=80" | |
| alt="Bebê Reborn João Pedro" class="w-full h-64 object-cover"> | |
| </div> | |
| <div class="p-5"> | |
| <div class="flex justify-between items-start mb-2"> | |
| <h3 class="text-lg font-semibold text-gray-800">Bebê Reborn João Pedro</h3> | |
| <div class="flex"> | |
| <i class="fas fa-star rating-star"></i> | |
| <i class="fas fa-star rating-star"></i> | |
| <i class="fas fa-star rating-star"></i> | |
| <i class="fas fa-star rating-star"></i> | |
| <i class="far fa-star rating-star"></i> | |
| </div> | |
| </div> | |
| <p class="text-pink-600 font-bold text-xl mb-3">R$ 479,90</p> | |
| <p class="text-gray-600 text-sm mb-4"> | |
| João Pedro é um bebê reborn fofo e delicado, com detalhes ricos em realismo. Perfeito para presentear ou colecionar. | |
| </p> | |
| <div class="flex space-x-2"> | |
| <button class="flex-1 bg-pink-500 hover:bg-pink-600 text-white py-2 rounded transition duration-300" | |
| onclick="addToCart(2, 'Bebê Reborn João Pedro', 479.90, 'https://images.unsplash.com/photo-1603712725038-e9334ae8f2f8?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1471&q=80')"> | |
| <i class="fas fa-shopping-cart mr-2"></i> Comprar | |
| </button> | |
| <button class="w-10 h-10 border border-gray-300 rounded flex items-center justify-center hover:bg-gray-100"> | |
| <i class="far fa-heart text-gray-500"></i> | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Product 3 --> | |
| <div class="bg-white rounded-lg overflow-hidden shadow-md product-card transition duration-300"> | |
| <div class="relative"> | |
| <img src="https://images.unsplash.com/photo-1605000797499-95a51c5269ae?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1471&q=80" | |
| alt="Bebê Reborn Maria Eduarda" class="w-full h-64 object-cover"> | |
| <div class="absolute top-2 right-2 bg-green-500 text-white px-2 py-1 rounded-full text-xs font-bold"> | |
| MAIS VENDIDO | |
| </div> | |
| </div> | |
| <div class="p-5"> | |
| <div class="flex justify-between items-start mb-2"> | |
| <h3 class="text-lg font-semibold text-gray-800">Bebê Reborn Maria Eduarda</h3> | |
| <div class="flex"> | |
| <i class="fas fa-star rating-star"></i> | |
| <i class="fas fa-star rating-star"></i> | |
| <i class="fas fa-star rating-star"></i> | |
| <i class="fas fa-star rating-star"></i> | |
| <i class="fas fa-star-half-alt rating-star"></i> | |
| </div> | |
| </div> | |
| <p class="text-pink-600 font-bold text-xl mb-3">R$ 549,90</p> | |
| <p class="text-gray-600 text-sm mb-4"> | |
| Maria Eduarda é nossa boneca mais premiada, com detalhes impressionantes de realismo. Inclui certificado de autenticidade e kit completo. | |
| </p> | |
| <div class="flex space-x-2"> | |
| <button class="flex-1 bg-pink-500 hover:bg-pink-600 text-white py-2 rounded transition duration-300" | |
| onclick="addToCart(3, 'Bebê Reborn Maria Eduarda', 549.90, 'https://images.unsplash.com/photo-1605000797499-95a51c5269ae?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1471&q=80')"> | |
| <i class="fas fa-shopping-cart mr-2"></i> Comprar | |
| </button> | |
| <button class="w-10 h-10 border border-gray-300 rounded flex items-center justify-center hover:bg-gray-100"> | |
| <i class="far fa-heart text-gray-500"></i> | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Features Section --> | |
| <section class="bg-gray-100 py-12"> | |
| <div class="container mx-auto px-4"> | |
| <h2 class="text-2xl font-bold text-center text-gray-800 mb-12">Por que escolher nossos bebês reborn?</h2> | |
| <div class="grid grid-cols-1 md:grid-cols-3 gap-8"> | |
| <div class="text-center"> | |
| <div class="bg-pink-100 w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-4"> | |
| <i class="fas fa-hands text-pink-500 text-2xl"></i> | |
| </div> | |
| <h3 class="text-lg font-semibold mb-2">Feitos à Mão</h3> | |
| <p class="text-gray-600">Cada bebê é cuidadosamente esculpido e pintado à mão por artistas especializados.</p> | |
| </div> | |
| <div class="text-center"> | |
| <div class="bg-pink-100 w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-4"> | |
| <i class="fas fa-gem text-pink-500 text-2xl"></i> | |
| </div> | |
| <h3 class="text-lg font-semibold mb-2">Materiais Premium</h3> | |
| <p class="text-gray-600">Utilizamos apenas materiais da mais alta qualidade para máxima durabilidade e realismo.</p> | |
| </div> | |
| <div class="text-center"> | |
| <div class="bg-pink-100 w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-4"> | |
| <i class="fas fa-award text-pink-500 text-2xl"></i> | |
| </div> | |
| <h3 class="text-lg font-semibold mb-2">Certificado</h3> | |
| <p class="text-gray-600">Todos os bebês incluem certificado de autenticidade e garantia de 1 ano.</p> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Cart Sidebar --> | |
| <div id="cart-sidebar" class="fixed top-0 right-0 h-full w-full md:w-96 bg-white shadow-lg transform translate-x-full transition-transform duration-300 z-20 overflow-y-auto"> | |
| <div class="p-6"> | |
| <div class="flex justify-between items-center mb-6"> | |
| <h2 class="text-xl font-bold">Seu Carrinho</h2> | |
| <button onclick="toggleCart()" class="text-gray-500 hover:text-gray-700"> | |
| <i class="fas fa-times text-xl"></i> | |
| </button> | |
| </div> | |
| <div id="cart-items" class="space-y-4 mb-6"> | |
| <!-- Cart items will be added here dynamically --> | |
| <div class="text-center py-8 text-gray-500"> | |
| <i class="fas fa-shopping-cart text-4xl mb-2"></i> | |
| <p>Seu carrinho está vazio</p> | |
| </div> | |
| </div> | |
| <div class="border-t pt-4"> | |
| <div class="flex justify-between mb-2"> | |
| <span class="font-medium">Subtotal</span> | |
| <span id="cart-subtotal" class="font-medium">R$ 0,00</span> | |
| </div> | |
| <div class="flex justify-between mb-4"> | |
| <span class="font-medium">Frete</span> | |
| <span class="font-medium">Calculado no checkout</span> | |
| </div> | |
| <div class="flex justify-between text-lg font-bold mb-6"> | |
| <span>Total</span> | |
| <span id="cart-total" class="text-pink-600">R$ 0,00</span> | |
| </div> | |
| <button id="checkout-btn" class="w-full bg-pink-500 hover:bg-pink-600 text-white py-3 rounded font-medium transition duration-300 disabled:opacity-50" disabled> | |
| Finalizar Compra | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Checkout Modal --> | |
| <div id="checkout-modal" class="fixed inset-0 z-30 hidden"> | |
| <div class="modal-overlay absolute inset-0 bg-black opacity-50"></div> | |
| <div class="absolute inset-0 flex items-center justify-center p-4"> | |
| <div class="checkout-modal bg-white rounded-lg shadow-xl w-full max-w-md"> | |
| <div class="p-6"> | |
| <div class="flex justify-between items-center mb-6"> | |
| <h2 class="text-xl font-bold">Finalizar Compra</h2> | |
| <button onclick="closeCheckoutModal()" class="text-gray-500 hover:text-gray-700"> | |
| <i class="fas fa-times text-xl"></i> | |
| </button> | |
| </div> | |
| <form id="checkout-form" class="space-y-4"> | |
| <div> | |
| <label class="block text-gray-700 mb-1">Nome Completo</label> | |
| <input type="text" class="w-full border border-gray-300 rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-pink-300" required> | |
| </div> | |
| <div> | |
| <label class="block text-gray-700 mb-1">E-mail</label> | |
| <input type="email" class="w-full border border-gray-300 rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-pink-300" required> | |
| </div> | |
| <div> | |
| <label class="block text-gray-700 mb-1">Endereço</label> | |
| <input type="text" class="w-full border border-gray-300 rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-pink-300" required> | |
| </div> | |
| <div class="grid grid-cols-2 gap-4"> | |
| <div> | |
| <label class="block text-gray-700 mb-1">CEP</label> | |
| <input type="text" class="w-full border border-gray-300 rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-pink-300" required> | |
| </div> | |
| <div> | |
| <label class="block text-gray-700 mb-1">Telefone</label> | |
| <input type="tel" class="w-full border border-gray-300 rounded px-3 py-2 focus:outline-none focus:ring-2 focus:ring-pink-300" required> | |
| </div> | |
| </div> | |
| <div class="border-t pt-4"> | |
| <div class="flex justify-between font-bold text-lg mb-4"> | |
| <span>Total</span> | |
| <span id="modal-total" class="text-pink-600">R$ 0,00</span> | |
| </div> | |
| <button type="submit" class="w-full bg-green-500 hover:bg-green-600 text-white py-3 rounded font-medium transition duration-300"> | |
| <i class="fas fa-lock mr-2"></i> Confirmar Pagamento | |
| </button> | |
| </div> | |
| </form> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Notification --> | |
| <div id="notification" class="fixed bottom-4 right-4 bg-green-500 text-white px-4 py-2 rounded shadow-lg hidden items-center space-x-2 z-20"> | |
| <i class="fas fa-check-circle"></i> | |
| <span>Item adicionado ao carrinho!</span> | |
| </div> | |
| <!-- Footer --> | |
| <footer class="bg-gray-800 text-white py-12"> | |
| <div class="container mx-auto px-4"> | |
| <div class="grid grid-cols-1 md:grid-cols-4 gap-8"> | |
| <div> | |
| <h3 class="text-lg font-bold mb-4">Loja Bebê Reborn</h3> | |
| <p class="text-gray-400"> | |
| Especializados em bebês reborn realistas feitos à mão com amor e atenção aos detalhes. | |
| </p> | |
| </div> | |
| <div> | |
| <h3 class="text-lg font-bold mb-4">Links Úteis</h3> | |
| <ul class="space-y-2"> | |
| <li><a href="#" class="text-gray-400 hover:text-white transition">Sobre Nós</a></li> | |
| <li><a href="#" class="text-gray-400 hover:text-white transition">Política de Privacidade</a></li> | |
| <li><a href="#" class="text-gray-400 hover:text-white transition">Termos de Serviço</a></li> | |
| <li><a href="#" class="text-gray-400 hover:text-white transition">FAQ</a></li> | |
| </ul> | |
| </div> | |
| <div> | |
| <h3 class="text-lg font-bold mb-4">Atendimento</h3> | |
| <ul class="space-y-2"> | |
| <li class="flex items-center space-x-2 text-gray-400"> | |
| <i class="fas fa-phone"></i> | |
| <span>(11) 99999-9999</span> | |
| </li> | |
| <li class="flex items-center space-x-2 text-gray-400"> | |
| <i class="fas fa-envelope"></i> | |
| <span>contato@bebereborn.com</span> | |
| </li> | |
| <li class="flex items-center space-x-2 text-gray-400"> | |
| <i class="fas fa-map-marker-alt"></i> | |
| <span>São Paulo - SP</span> | |
| </li> | |
| </ul> | |
| </div> | |
| <div> | |
| <h3 class="text-lg font-bold mb-4">Redes Sociais</h3> | |
| <div class="flex space-x-4"> | |
| <a href="#" class="text-gray-400 hover:text-white transition text-xl"> | |
| <i class="fab fa-facebook"></i> | |
| </a> | |
| <a href="#" class="text-gray-400 hover:text-white transition text-xl"> | |
| <i class="fab fa-instagram"></i> | |
| </a> | |
| <a href="#" class="text-gray-400 hover:text-white transition text-xl"> | |
| <i class="fab fa-pinterest"></i> | |
| </a> | |
| <a href="#" class="text-gray-400 hover:text-white transition text-xl"> | |
| <i class="fab fa-youtube"></i> | |
| </a> | |
| </div> | |
| <h3 class="text-lg font-bold mt-6 mb-4">Formas de Pagamento</h3> | |
| <div class="flex flex-wrap gap-2"> | |
| <i class="fab fa-cc-visa text-gray-400 text-2xl"></i> | |
| <i class="fab fa-cc-mastercard text-gray-400 text-2xl"></i> | |
| <i class="fab fa-cc-amex text-gray-400 text-2xl"></i> | |
| <i class="fab fa-cc-paypal text-gray-400 text-2xl"></i> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="border-t border-gray-700 mt-8 pt-8 text-center text-gray-400"> | |
| <p>© 2023 Loja Bebê Reborn. Todos os direitos reservados.</p> | |
| </div> | |
| </div> | |
| </footer> | |
| </div> | |
| <script> | |
| // Cart functionality | |
| let cart = []; | |
| // Add to cart function | |
| function addToCart(id, name, price, image) { | |
| // Check if item already exists in cart | |
| const existingItem = cart.find(item => item.id === id); | |
| if (existingItem) { | |
| existingItem.quantity += 1; | |
| } else { | |
| cart.push({ | |
| id, | |
| name, | |
| price, | |
| image, | |
| quantity: 1 | |
| }); | |
| } | |
| updateCart(); | |
| showNotification(); | |
| } | |
| // Remove from cart function | |
| function removeFromCart(id) { | |
| cart = cart.filter(item => item.id !== id); | |
| updateCart(); | |
| } | |
| // Update quantity function | |
| function updateQuantity(id, newQuantity) { | |
| const item = cart.find(item => item.id === id); | |
| if (item) { | |
| item.quantity = parseInt(newQuantity); | |
| if (item.quantity <= 0) { | |
| removeFromCart(id); | |
| } else { | |
| updateCart(); | |
| } | |
| } | |
| } | |
| // Update cart UI | |
| function updateCart() { | |
| const cartItemsContainer = document.getElementById('cart-items'); | |
| const cartCount = document.getElementById('cart-count'); | |
| const cartSubtotal = document.getElementById('cart-subtotal'); | |
| const cartTotal = document.getElementById('cart-total'); | |
| const checkoutBtn = document.getElementById('checkout-btn'); | |
| // Update cart count | |
| const totalItems = cart.reduce((sum, item) => sum + item.quantity, 0); | |
| cartCount.textContent = totalItems; | |
| if (cart.length === 0) { | |
| cartItemsContainer.innerHTML = ` | |
| <div class="text-center py-8 text-gray-500"> | |
| <i class="fas fa-shopping-cart text-4xl mb-2"></i> | |
| <p>Seu carrinho está vazio</p> | |
| </div> | |
| `; | |
| checkoutBtn.disabled = true; | |
| cartSubtotal.textContent = 'R$ 0,00'; | |
| cartTotal.textContent = 'R$ 0,00'; | |
| return; | |
| } | |
| // Update cart items | |
| let itemsHTML = ''; | |
| let subtotal = 0; | |
| cart.forEach(item => { | |
| const itemTotal = item.price * item.quantity; | |
| subtotal += itemTotal; | |
| itemsHTML += ` | |
| <div class="flex items-start border-b pb-4"> | |
| <img src="${item.image}" alt="${item.name}" class="w-16 h-16 object-cover rounded mr-4"> | |
| <div class="flex-1"> | |
| <h3 class="font-medium">${item.name}</h3> | |
| <p class="text-pink-600 font-bold">R$ ${item.price.toFixed(2)}</p> | |
| <div class="flex items-center mt-2"> | |
| <button onclick="updateQuantity(${item.id}, ${item.quantity - 1})" class="w-6 h-6 border rounded flex items-center justify-center"> | |
| <i class="fas fa-minus text-xs"></i> | |
| </button> | |
| <input type="number" value="${item.quantity}" min="1" | |
| onchange="updateQuantity(${item.id}, this.value)" | |
| class="w-10 h-6 border text-center mx-1"> | |
| <button onclick="updateQuantity(${item.id}, ${item.quantity + 1})" class="w-6 h-6 border rounded flex items-center justify-center"> | |
| <i class="fas fa-plus text-xs"></i> | |
| </button> | |
| </div> | |
| </div> | |
| <button onclick="removeFromCart(${item.id})" class="text-gray-500 hover:text-red-500"> | |
| <i class="fas fa-trash"></i> | |
| </button> | |
| </div> | |
| `; | |
| }); | |
| cartItemsContainer.innerHTML = itemsHTML; | |
| checkoutBtn.disabled = false; | |
| cartSubtotal.textContent = `R$ ${subtotal.toFixed(2)}`; | |
| cartTotal.textContent = `R$ ${subtotal.toFixed(2)}`; | |
| } | |
| // Show notification | |
| function showNotification() { | |
| const notification = document.getElementById('notification'); | |
| notification.classList.remove('hidden'); | |
| notification.classList.add('flex'); | |
| setTimeout(() => { | |
| notification.classList.remove('flex'); | |
| notification.classList.add('hidden'); | |
| }, 3000); | |
| } | |
| // Toggle cart sidebar | |
| function toggleCart() { | |
| const cartSidebar = document.getElementById('cart-sidebar'); | |
| cartSidebar.classList.toggle('translate-x-full'); | |
| cartSidebar.classList.toggle('translate-x-0'); | |
| } | |
| // Checkout functionality | |
| function openCheckoutModal() { | |
| const modal = document.getElementById('checkout-modal'); | |
| const modalTotal = document.getElementById('modal-total'); | |
| // Calculate total | |
| const total = cart.reduce((sum, item) => sum + (item.price * item.quantity), 0); | |
| modalTotal.textContent = `R$ ${total.toFixed(2)}`; | |
| modal.classList.remove('hidden'); | |
| toggleCart(); // Close cart sidebar | |
| } | |
| function closeCheckoutModal() { | |
| document.getElementById('checkout-modal').classList.add('hidden'); | |
| } | |
| // Initialize event listeners | |
| document.addEventListener('DOMContentLoaded', function() { | |
| // Checkout button | |
| document.getElementById('checkout-btn').addEventListener('click', openCheckoutModal); | |
| // Checkout form submission | |
| document.getElementById('checkout-form').addEventListener('submit', function(e) { | |
| e.preventDefault(); | |
| // Here you would normally process the payment | |
| alert('Compra finalizada com sucesso! Obrigado por sua compra.'); | |
| // Clear cart | |
| cart = []; | |
| updateCart(); | |
| closeCheckoutModal(); | |
| }); | |
| }); | |
| </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=wenderson12/beberborn" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
| </html> |