<div class="max-w-4xl mx-auto mb-16">
<div x-data="{
items: [
{ id: 1, name: 'Classic White Sneakers', price: 89.99, image: 'https://images.unsplash.com/photo-1549298916-b41d501d3772?w=300&h=300&fit=crop' },
{ id: 2, name: 'Leather Backpack', price: 129.99, image: 'https://images.unsplash.com/photo-1553062407-98eeb64c6a62?w=300&h=300&fit=crop' },
{ id: 3, name: 'Wireless Headphones', price: 199.99, image: 'https://images.unsplash.com/photo-1505740420928-5e560c06d30e?w=300&h=300&fit=crop' }
],
removeItem(id) {
this.items = this.items.filter(item => item.id !== id);
}
}" class="bg-white rounded-lg shadow-sm p-6">
<div class="flex justify-between items-center mb-6">
<h3 class="text-xl font-semibold">My Wishlist</h3>
<span class="text-sm text-gray-500" x-text="items.length + ' items'"></span>
</div>
<div class="space-y-4">
<template x-for="item in items" :key="item.id">
<div class="flex gap-4 p-4 border border-gray-200 rounded-lg">
<img :src="item.image" :alt="item.name" class="w-20 h-20 object-cover rounded">
<div class="flex-1">
<h4 class="font-medium" x-text="item.name"></h4>
<p class="text-lg font-semibold text-gray-900 mt-1">$<span x-text="item.price.toFixed(2)"></span></p>
</div>
<div class="flex flex-col gap-2">
<button class="px-4 py-2 bg-blue-600 text-white text-sm rounded hover:bg-blue-700">
Add to Cart
</button>
<button @click="removeItem(item.id)" class="px-4 py-2 border border-gray-300 text-gray-700 text-sm rounded hover:bg-gray-50">
Remove
</button>
</div>
</div>
</template>
</div>
<div x-show="items.length === 0" class="text-center py-12">
<p class="text-gray-500">Your wishlist is empty</p>
</div>
</div>
</div>