undefined / loja.html
danilomecene's picture
criar loja virtual dropsshipp no estados unidos
69c78e3 verified
Raw History Blame Contribute Delete
21.5 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dropship Dreamland USA - Virtual Store</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: '#3B82F6',
secondary: '#10B981',
}
}
}
}
</script>
<style>
.product-card:hover {
transform: translateY(-5px);
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.cart-sidebar {
transition: transform 0.3s ease-in-out;
}
</style>
</head>
<body class="bg-gray-50">
<!-- Navigation -->
<nav class="bg-white shadow-sm">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-between h-16 items-center">
<div class="flex items-center">
<div class="flex-shrink-0 flex items-center">
<i data-feather="truck" class="text-primary h-8 w-8"></i>
<span class="ml-2 text-xl font-bold text-gray-900">Dropship Dreamland</span>
</div>
</div>
<div class="hidden md:block">
<div class="ml-10 flex items-center space-x-4">
<a href="index.html" class="px-3 py-2 rounded-md text-sm font-medium text-gray-500 hover:text-primary transition">Home</a>
<a href="loja.html" class="px-3 py-2 rounded-md text-sm font-medium text-gray-900 hover:text-primary transition">Store</a>
<a href="#" class="px-3 py-2 rounded-md text-sm font-medium text-gray-500 hover:text-primary transition">Products</a>
<a href="#" class="px-3 py-2 rounded-md text-sm font-medium text-gray-500 hover:text-primary transition">Suppliers</a>
</div>
</div>
<div class="flex items-center space-x-4">
<button id="cart-toggle" class="relative p-2 text-gray-600 hover:text-primary">
<i data-feather="shopping-cart"></i>
<span id="cart-count" class="absolute -top-1 -right-1 bg-primary text-white rounded-full text-xs w-5 h-5 flex items-center justify-center">0</span>
</button>
<button class="bg-primary hover:bg-primary-600 text-white px-4 py-2 rounded-md text-sm font-medium transition">
Sign In
</button>
</div>
</div>
</div>
</nav>
<!-- Store Header -->
<div class="bg-white shadow-sm border-b">
<div class="max-w-7xl mx-auto py-6 px-4 sm:px-6 lg:px-8">
<div class="flex flex-col md:flex-row md:items-center md:justify-between">
<h1 class="text-2xl font-bold text-gray-900">Our Virtual Store</h1>
<div class="mt-4 md:mt-0">
<div class="flex space-x-4">
<select class="border-gray-300 rounded-md shadow-sm focus:border-primary focus:ring focus:ring-primary focus:ring-opacity-50">
<option>All Categories</option>
<option>Electronics</option>
<option>Home & Kitchen</option>
<option>Beauty</option>
<option>Outdoor</option>
</select>
<div class="relative">
<input type="text" placeholder="Search products..." class="border-gray-300 rounded-md shadow-sm focus:border-primary focus:ring focus:ring-primary focus:ring-opacity-50 pl-10 pr-4 py-2">
<i data-feather="search" class="absolute left-3 top-3 text-gray-400"></i>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Products Grid -->
<div class="max-w-7xl mx-auto py-8 px-4 sm:px-6 lg:px-8">
<div class="grid grid-cols-1 gap-y-12 sm:grid-cols-2 gap-x-6 lg:grid-cols-4">
<!-- Product 1 -->
<div class="product-card group relative bg-white p-6 rounded-lg shadow-md transition duration-300 ease-in-out">
<div class="w-full min-h-80 bg-gray-200 aspect-w-1 aspect-h-1 rounded-md overflow-hidden group-hover:opacity-75 lg:h-80 lg:aspect-none">
<img src="http://static.photos/technology/640x360/1" alt="Smart Fitness Tracker" class="w-full h-full object-center object-cover">
</div>
<div class="mt-4 flex justify-between">
<div>
<h3 class="text-sm text-gray-700">
<span class="absolute inset-0"></span>
Smart Fitness Tracker
</h3>
<p class="mt-1 text-sm text-gray-500">Electronics</p>
</div>
<p class="text-sm font-medium text-gray-900">$29.99</p>
</div>
<div class="mt-4">
<button class="add-to-cart w-full bg-primary hover:bg-primary-600 text-white py-2 px-4 rounded-md text-sm font-medium transition" data-product='{"name": "Smart Fitness Tracker", "price": 29.99, "image": "http://static.photos/technology/640x360/1"}'>
Add to Cart
</button>
</div>
</div>
<!-- Product 2 -->
<div class="product-card group relative bg-white p-6 rounded-lg shadow-md transition duration-300 ease-in-out">
<div class="w-full min-h-80 bg-gray-200 aspect-w-1 aspect-h-1 rounded-md overflow-hidden group-hover:opacity-75 lg:h-80 lg:aspect-none">
<img src="http://static.photos/home/640x360/2" alt="Bamboo Cutting Board Set" class="w-full h-full object-center object-cover">
</div>
<div class="mt-4 flex justify-between">
<div>
<h3 class="text-sm text-gray-700">
<span class="absolute inset-0"></span>
Bamboo Cutting Board Set
</h3>
<p class="mt-1 text-sm text-gray-500">Home & Kitchen</p>
</div>
<p class="text-sm font-medium text-gray-900">$39.99</p>
</div>
<div class="mt-4">
<button class="add-to-cart w-full bg-primary hover:bg-primary-600 text-white py-2 px-4 rounded-md text-sm font-medium transition" data-product='{"name": "Bamboo Cutting Board Set", "price": 39.99, "image": "http://static.photos/home/640x360/2"}'>
Add to Cart
</button>
</div>
</div>
<!-- Product 3 -->
<div class="product-card group relative bg-white p-6 rounded-lg shadow-md transition duration-300 ease-in-out">
<div class="w-full min-h-80 bg-gray-200 aspect-w-1 aspect-h-1 rounded-md overflow-hidden group-hover:opacity-75 lg:h-80 lg:aspect-none">
<img src="http://static.photos/beauty/640x360/3" alt="Organic Skincare Set" class="w-full h-full object-center object-cover">
</div>
<div class="mt-4 flex justify-between">
<div>
<h3 class="text-sm text-gray-700">
<span class="absolute inset-0"></span>
Organic Skincare Set
</h3>
<p class="mt-1 text-sm text-gray-500">Beauty</p>
</div>
<p class="text-sm font-medium text-gray-900">$49.99</p>
</div>
<div class="mt-4">
<button class="add-to-cart w-full bg-primary hover:bg-primary-600 text-white py-2 px-4 rounded-md text-sm font-medium transition" data-product='{"name": "Organic Skincare Set", "price": 49.99, "image": "http://static.photos/beauty/640x360/3"}'>
Add to Cart
</button>
</div>
</div>
<!-- Product 4 -->
<div class="product-card group relative bg-white p-6 rounded-lg shadow-md transition duration-300 ease-in-out">
<div class="w-full min-h-80 bg-gray-200 aspect-w-1 aspect-h-1 rounded-md overflow-hidden group-hover:opacity-75 lg:h-80 lg:aspect-none">
<img src="http://static.photos/outdoor/640x360/4" alt="Portable Camping Hammock" class="w-full h-full object-center object-cover">
</div>
<div class="mt-4 flex justify-between">
<div>
<h3 class="text-sm text-gray-700">
<span class="absolute inset-0"></span>
Portable Camping Hammock
</h3>
<p class="mt-1 text-sm text-gray-500">Outdoor</p>
</div>
<p class="text-sm font-medium text-gray-900">$34.99</p>
</div>
<div class="mt-4">
<button class="add-to-cart w-full bg-primary hover:bg-primary-600 text-white py-2 px-4 rounded-md text-sm font-medium transition" data-product='{"name": "Portable Camping Hammock", "price": 34.99, "image": "http://static.photos/outdoor/640x360/4"}'>
Add to Cart
</button>
</div>
</div>
<!-- Product 5 -->
<div class="product-card group relative bg-white p-6 rounded-lg shadow-md transition duration-300 ease-in-out">
<div class="w-full min-h-80 bg-gray-200 aspect-w-1 aspect-h-1 rounded-md overflow-hidden group-hover:opacity-75 lg:h-80 lg:aspect-none">
<img src="http://static.photos/technology/640x360/8" alt="Wireless Earbuds" class="w-full h-full object-center object-cover">
</div>
<div class="mt-4 flex justify-between">
<div>
<h3 class="text-sm text-gray-700">
<span class="absolute inset-0"></span>
Wireless Earbuds Pro
</h3>
<p class="mt-1 text-sm text-gray-500">Electronics</p>
</div>
<p class="text-sm font-medium text-gray-900">$79.99</p>
</div>
<div class="mt-4">
<button class="add-to-cart w-full bg-primary hover:bg-primary-600 text-white py-2 px-4 rounded-md text-sm font-medium transition" data-product='{"name": "Wireless Earbuds Pro", "price": 79.99, "image": "http://static.photos/technology/640x360/8"}'>
Add to Cart
</button>
</div>
</div>
<!-- Product 6 -->
<div class="product-card group relative bg-white p-6 rounded-lg shadow-md transition duration-300 ease-in-out">
<div class="w-full min-h-80 bg-gray-200 aspect-w-1 aspect-h-1 rounded-md overflow-hidden group-hover:opacity-75 lg:h-80 lg:aspect-none">
<img src="http://static.photos/home/640x360/9" alt="Smart Coffee Maker" class="w-full h-full object-center object-cover">
</div>
<div class="mt-4 flex justify-between">
<div>
<h3 class="text-sm text-gray-700">
<span class="absolute inset-0"></span>
Smart Coffee Maker
</h3>
<p class="mt-1 text-sm text-gray-500">Home & Kitchen</p>
</div>
<p class="text-sm font-medium text-gray-900">$89.99</p>
</div>
<div class="mt-4">
<button class="add-to-cart w-full bg-primary hover:bg-primary-600 text-white py-2 px-4 rounded-md text-sm font-medium transition" data-product='{"name": "Smart Coffee Maker", "price": 89.99, "image": "http://static.photos/home/640x360/9"}'>
Add to Cart
</button>
</div>
</div>
<!-- Product 7 -->
<div class="product-card group relative bg-white p-6 rounded-lg shadow-md transition duration-300 ease-in-out">
<div class="w-full min-h-80 bg-gray-200 aspect-w-1 aspect-h-1 rounded-md overflow-hidden group-hover:opacity-75 lg:h-80 lg:aspect-none">
<img src="http://static.photos/beauty/640x360/10" alt="Hair Care Kit" class="w-full h-full object-center object-cover">
</div>
<div class="mt-4 flex justify-between">
<div>
<h3 class="text-sm text-gray-700">
<span class="absolute inset-0"></span>
Premium Hair Care Kit
</h3>
<p class="mt-1 text-sm text-gray-500">Beauty</p>
</div>
<p class="text-sm font-medium text-gray-900">$59.99</p>
</div>
<div class="mt-4">
<button class="add-to-cart w-full bg-primary hover:bg-primary-600 text-white py-2 px-4 rounded-md text-sm font-medium transition" data-product='{"name": "Premium Hair Care Kit", "price": 59.99, "image": "http://static.photos/beauty/640x360/10"}'>
Add to Cart
</button>
</div>
</div>
<!-- Product 8 -->
<div class="product-card group relative bg-white p-6 rounded-lg shadow-md transition duration-300 ease-in-out">
<div class="w-full min-h-80 bg-gray-200 aspect-w-1 aspect-h-1 rounded-md overflow-hidden group-hover:opacity-75 lg:h-80 lg:aspect-none">
<img src="http://static.photos/outdoor/640x360/11" alt="Camping Tent" class="w-full h-full object-center object-cover">
</div>
<div class="mt-4 flex justify-between">
<div>
<h3 class="text-sm text-gray-700">
<span class="absolute inset-0"></span>
4-Person Camping Tent
</h3>
<p class="mt-1 text-sm text-gray-500">Outdoor</p>
</div>
<p class="text-sm font-medium text-gray-900">$129.99</p>
</div>
<div class="mt-4">
<button class="add-to-cart w-full bg-primary hover:bg-primary-600 text-white py-2 px-4 rounded-md text-sm font-medium transition" data-product='{"name": "4-Person Camping Tent", "price": 129.99, "image": "http://static.photos/outdoor/640x360/11"}'>
Add to Cart
</button>
</div>
</div>
</div>
</div>
<!-- Cart Sidebar -->
<div id="cart-sidebar" class="cart-sidebar fixed top-0 right-0 w-96 h-full bg-white shadow-xl transform translate-x-full z-50">
<div class="p-6 h-full flex flex-col">
<div class="flex justify-between items-center mb-6">
<h2 class="text-lg font-semibold">Shopping Cart</h2>
<button id="close-cart" class="text-gray-400 hover:text-gray-600">
<i data-feather="x"></i>
</button>
</div>
<div id="cart-items" class="flex-1 overflow-y-auto">
<!-- Cart items will be dynamically added here -->
</div>
<div class="border-t pt-4">
<div class="flex justify-between text-lg font-semibold mb-4">
<span>Total:</span>
<span id="cart-total">$0.00</span>
</div>
<button class="w-full bg-primary hover:bg-primary-600 text-white py-3 px-4 rounded-md font-medium transition">
Checkout
</button>
</div>
</div>
</div>
<!-- Overlay -->
<div id="overlay" class="fixed inset-0 bg-black bg-opacity-50 z-40 hidden"></div>
<script>
// Cart functionality
let cart = [];
const cartSidebar = document.getElementById('cart-sidebar');
const overlay = document.getElementById('overlay');
const cartToggle = document.getElementById('cart-toggle');
const closeCart = document.getElementById('close-cart');
const cartItems = document.getElementById('cart-items');
const cartTotal = document.getElementById('cart-total');
const cartCount = document.getElementById('cart-count');
// Add to cart functionality
document.querySelectorAll('.add-to-cart').forEach(button => {
button.addEventListener('click', (e) => {
const productData = JSON.parse(e.target.dataset.product);
addToCart(productData);
});
});
function addToCart(product) {
const existingItem = cart.find(item => item.name === product.name);
if (existingItem) {
existingItem.quantity += 1;
} else {
cart.push({
...product,
quantity: 1
});
}
updateCart();
showCart();
}
function updateCart() {
// Update cart items display
cartItems.innerHTML = '';
let total = 0;
cart.forEach(item => {
const itemTotal = item.price * item.quantity;
total += itemTotal;
const cartItem = document.createElement('div');
cartItem.className = 'flex items-center space-x-4 py-4 border-b';
cartItem.innerHTML = `
<img src="${item.image}" alt="${item.name}" class="w-16 h-16 object-cover rounded">
<div class="flex-1">
<h3 class="text-sm font-medium">${item.name}</h3>
<p class="text-gray-600">$${item.price.toFixed(2)}</p>
</div>
<div class="flex items-center space-x-2">
<button class="decrease-quantity text-gray-400 hover:text-gray-600" data-name="${item.name}">
<i data-feather="minus" class="w-4 h-4"></i>
</button>
<span class="quantity">${item.quantity}</span>
<button class="increase-quantity text-gray-400 hover:text-gray-600" data-name="${item.name}">
<i data-feather="plus" class="w-4 h-4"></i>
</button>
</div>
`;
cartItems.appendChild(cartItem);
});
// Update total and count
cartTotal.textContent = `$${total.toFixed(2)}`;
cartCount.textContent = cart.reduce((sum, item) => sum + item.quantity, 0);
// Add event listeners for quantity buttons
document.querySelectorAll('.increase-quantity').forEach(button => {
button.addEventListener('click', (e) => {
const productName = e.target.closest('button').dataset.name;
const item = cart.find(item => item.name === productName);
if (item) {
item.quantity += 1;
updateCart();
}
});
});
document.querySelectorAll('.decrease-quantity').forEach(button => {
button.addEventListener('click', (e) => {
const productName = e.target.closest('button').dataset.name;
const itemIndex = cart.findIndex(item => item.name === productName);
if (itemIndex !== -1) {
if (cart[itemIndex].quantity > 1) {
cart[itemIndex].quantity -= 1;
} else {
cart.splice(itemIndex, 1);
}
updateCart();
}
});
});
feather.replace();
}
function showCart() {
cartSidebar.classList.remove('translate-x-full');
overlay.classList.remove('hidden');
}
function hideCart() {
cartSidebar.classList.add('translate-x-full');
overlay.classList.add('hidden');
}
cartToggle.addEventListener('click', showCart);
closeCart.addEventListener('click', hideCart);
overlay.addEventListener('click', hideCart);
// Initialize feather icons
feather.replace();
</script>
</body>
</html>