<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
  <div class="text-center">
    <div class="text-6xl text-gray-300 mb-4"><i class="fas fa-shopping-bag"></i></div>
    <h1 class="text-3xl font-bold text-gray-800 mb-4"><%= appName %></h1>
    <p class="text-gray-600 mb-2">Welcome to your new e-commerce store!</p>
    <p class="text-gray-500 text-sm mb-8">Discover amazing products at great prices.</p>
    
    <div class="grid grid-cols-1 md:grid-cols-3 gap-6 max-w-3xl mx-auto">
      <a href="/products" class="bg-white p-6 rounded-xl shadow-sm hover:shadow-md transition border border-gray-200">
        <i class="fas fa-store text-3xl text-indigo-600 mb-3"></i>
        <h3 class="font-semibold text-gray-800">Browse Products</h3>
        <p class="text-sm text-gray-500 mt-1">Explore our catalog</p>
      </a>
      <a href="/cart" class="bg-white p-6 rounded-xl shadow-sm hover:shadow-md transition border border-gray-200">
        <i class="fas fa-shopping-cart text-3xl text-indigo-600 mb-3"></i>
        <h3 class="font-semibold text-gray-800">View Cart</h3>
        <p class="text-sm text-gray-500 mt-1"><%= cartCount %> items in cart</p>
      </a>
      <% if (currentUser) { %>
        <a href="/account" class="bg-white p-6 rounded-xl shadow-sm hover:shadow-md transition border border-gray-200">
          <i class="fas fa-user text-3xl text-indigo-600 mb-3"></i>
          <h3 class="font-semibold text-gray-800">My Account</h3>
          <p class="text-sm text-gray-500 mt-1">View your orders</p>
        </a>
      <% } else { %>
        <a href="/register" class="bg-white p-6 rounded-xl shadow-sm hover:shadow-md transition border border-gray-200">
          <i class="fas fa-user-plus text-3xl text-indigo-600 mb-3"></i>
          <h3 class="font-semibold text-gray-800">Create Account</h3>
          <p class="text-sm text-gray-500 mt-1">Join us today</p>
        </a>
      <% } %>
    </div>

    <!-- Categories -->
    <% if (typeof categories !== 'undefined' && categories && categories.length) { %>
      <h2 class="text-2xl font-bold text-gray-800 mt-16 mb-8">Shop by Category</h2>
      <div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4 max-w-5xl mx-auto">
        <% categories.forEach(function(cat) { %>
          <a href="/products?category=<%= cat.id %>" class="bg-white p-4 rounded-xl shadow-sm hover:shadow-md transition border border-gray-200 text-center">
            <div class="w-16 h-16 bg-indigo-100 rounded-full flex items-center justify-center mx-auto mb-3">
              <i class="fas fa-tag text-2xl text-indigo-600"></i>
            </div>
            <h3 class="font-medium text-gray-800 text-sm"><%= cat.name %></h3>
          </a>
        <% }) %>
      </div>
    <% } %>

    <!-- Featured Products -->
    <% if (typeof featuredProducts !== 'undefined' && featuredProducts && featuredProducts.length) { %>
      <h2 class="text-2xl font-bold text-gray-800 mt-16 mb-8">Featured Products</h2>
      <div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-6">
        <% featuredProducts.forEach(function(product) { %>
          <a href="/products/<%= product.slug %>" class="bg-white rounded-xl shadow-sm hover:shadow-md transition border border-gray-200 overflow-hidden group">
            <div class="aspect-square bg-gray-100 relative overflow-hidden">
              <% if (product.images && product.images.length) { %>
                <img src="<%= product.images[0].imagePath %>" alt="<%= product.name %>" class="w-full h-full object-cover group-hover:scale-105 transition duration-300">
              <% } else { %>
                <div class="w-full h-full flex items-center justify-center text-gray-400">
                  <i class="fas fa-image text-4xl"></i>
                </div>
              <% } %>
              <% if (product.comparePrice && parseFloat(product.comparePrice) > parseFloat(product.price)) { %>
                <span class="absolute top-2 left-2 bg-red-500 text-white text-xs px-2 py-1 rounded-full">
                  -<%= Math.round((1 - parseFloat(product.price)/parseFloat(product.comparePrice)) * 100) %>% OFF
                </span>
              <% } %>
            </div>
            <div class="p-4">
              <h3 class="font-medium text-gray-800 text-sm truncate"><%= product.name %></h3>
              <div class="flex items-center gap-2 mt-2">
                <span class="text-lg font-bold text-indigo-600"><%= currencySymbol %><%= parseFloat(product.price).toFixed(2) %></span>
                <% if (product.comparePrice) { %>
                  <span class="text-sm text-gray-400 line-through"><%= currencySymbol %><%= parseFloat(product.comparePrice).toFixed(2) %></span>
                <% } %>
              </div>
            </div>
          </a>
        <% }) %>
      </div>
    <% } %>
  </div>
</div>
