<!DOCTYPE html>
<html lang="tr">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Vector Shop - Dijital Ürün Satış Platformu</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
</head>
<body>
    <header>
        <div class="container">
            <h1>Vector Shop</h1>
            <nav>
                <a href="{{ url_for('index') }}">Ana Sayfa</a>
                <a href="{{ url_for('admin_login') }}">Admin</a>
            </nav>
        </div>
    </header>

    <main class="container">
        <section class="hero">
            <h2>Dijital Ürünlerinizi Güvenle Satın Alın</h2>
            <p>Şifreli ve güvenli teslimat sistemi ile dijital içeriklerinize anında erişin</p>
        </section>

        <section class="products">
            <h2>Ürünler</h2>
            {% if products %}
            <div class="product-grid">
                {% for product in products %}
                <div class="product-card">
                    {% if product.image_url %}
                    <img src="{{ product.image_url }}" alt="{{ product.name }}">
                    {% else %}
                    <div class="product-placeholder">
                        <span>{{ product.name[0] }}</span>
                    </div>
                    {% endif %}
                    <div class="product-info">
                        <h3>{{ product.name }}</h3>
                        <p class="description">{{ product.description[:100] }}...</p>
                        <div class="product-footer">
                            <span class="price">${{ "%.2f"|format(product.price) }}</span>
                            <a href="{{ url_for('product_detail', product_id=product.id) }}" class="btn">Detay</a>
                        </div>
                    </div>
                </div>
                {% endfor %}
            </div>
            {% else %}
            <p class="no-products">Henüz ürün bulunmamaktadır.</p>
            {% endif %}
        </section>
    </main>

    <footer>
        <div class="container">
            <p>&copy; 2026 Vector Shop. Tüm hakları saklıdır.</p>
        </div>
    </footer>
</body>
</html>
