<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Digital Store - Kategori Produk</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
    <style>
        .background-image {
            background-image: url('/images/background.jpg');
            background-size: cover;
            background-position: center;
            background-attachment: fixed;
        }
        .glassmorphism-card {
            background-color: rgba(255, 255, 255, 0.15); 
            backdrop-filter: blur(10px); 
            border: 1px solid rgba(255, 255, 255, 0.2); 
            box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37); 
        }
    </style>
</head>
<body class="bg-gray-100">
    <%- include('./includes/header.ejs') %>

    <div class="background-image min-h-screen pt-20 pb-10">
        <div class="container mx-auto px-4">
            <h1 class="text-4xl font-extrabold text-white text-center drop-shadow-lg mb-12">
                Pilih Kategori Produk Kami
            </h1>
            <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8">
                <% categories.forEach(function(category) { %>
                    <div class="glassmorphism-card rounded-xl shadow-lg p-6 transform transition-transform duration-300 hover:scale-105">
                        <h2 class="text-2xl font-bold text-white mb-2">
                            <%= category.category %>
                        </h2>
                        <p class="text-white mb-4"><%= category.description %></p>
                        <a href="/kategori/<%= category.slug %>" class="bg-blue-500 text-white py-2 px-4 rounded-full hover:bg-blue-600">
                            Lihat Produk
                        </a>
                    </div>
                <% }); %>
            </div>
        </div>
    </div>

    <%- include('./includes/footer.ejs') %>
</body>
</html>