{% load static %}
<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>{% block title %}Pasar UMKM Desa Pemagarsari{% endblock %}</title>
    <meta name="description" content="{% block meta_description %}Pasar Online UMKM Desa Pemagarsari. Berdayakan ekonomi lokal melalui transaksi mudah via WhatsApp.{% endblock %}">
    
    <!-- Google Fonts -->
    <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700;800&family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
    
    <!-- Bootstrap CSS CDN -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    
    <!-- FontAwesome -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    
    <!-- Custom CSS -->
    <link rel="stylesheet" href="{% static 'css/custom.css' %}?v={{ current_time|date:'U' }}">
    
    {% block extra_head %}{% endblock %}
</head>
<body>

    <!-- Navbar -->
    <nav class="navbar navbar-expand-lg navbar-dark sticky-top">
        <div class="container">
            <a class="navbar-brand" href="{% url 'home' %}">
                <i class="fas fa-store me-2"></i> PASAR UMKM
            </a>
            <button class="navbar-toggler border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarNav">
                <ul class="navbar-nav me-auto mb-3 mb-lg-0">
                    <li class="nav-item">
                        <a class="nav-link" href="{% url 'home' %}">Beranda</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="{% url 'product_list' %}">Semua Produk</a>
                    </li>
                </ul>
                <div class="d-grid d-lg-block">
                    <a href="{% url 'vendor_login' %}" class="btn btn-outline-light btn-sm rounded-pill px-3">
                        <i class="fas fa-user-circle me-1"></i> Admin / Vendor Login
                    </a>
                </div>
            </div>
        </div>
    </nav>

    <main>
        {% block content %}{% endblock %}
    </main>

    <!-- Floating WA Button -->
    <a href="https://wa.me/6281385035662" target="_blank" class="wa-floating-btn shadow-lg">
        <i class="fab fa-whatsapp"></i>
        <span>Chat Admin</span>
    </a>

    <!-- Footer -->
    <footer class="footer mt-auto">
        <div class="container">
            <div class="row g-4">
                <div class="col-lg-4 col-md-6">
                    <h5 class="fw-bold">Pasar UMKM Pemagarsari</h5>
                    <p class="small opacity-75">Inisiatif Desa Pemagarsari untuk menghubungkan UMKM lokal dengan pembeli melalui sistem pasar online yang modern dan mudah.</p>
                </div>
                <div class="col-lg-2 col-6">
                    <h5 class="fw-bold">Navigasi</h5>
                    <ul class="list-unstyled">
                        <li><a href="{% url 'home' %}" class="footer-link small">Beranda</a></li>
                        <li><a href="{% url 'product_list' %}" class="footer-link small">Semua Produk</a></li>
                        <li><a href="{% url 'vendor_login' %}" class="footer-link small">Admin / Vendor</a></li>
                    </ul>
                </div>
                <div class="col-lg-2 col-6">
                    <h5 class="fw-bold">Bantuan</h5>
                    <ul class="list-unstyled">
                        <li><a href="#" class="footer-link small">Cara Belanja</a></li>
                        <li><a href="#" class="footer-link small">Syarat & Ketentuan</a></li>
                        <li><a href="#" class="footer-link small">Kebijakan Privasi</a></li>
                    </ul>
                </div>
                <div class="col-lg-4 col-md-6">
                    <h5 class="fw-bold">Kontak Kami</h5>
                    <p class="small mb-2"><i class="fas fa-map-marker-alt me-2 text-accent"></i> Kp.Tajur Rt 04/ Rw 04 Desa Pemagarsari Parung Bogor</p>
                    <p class="small mb-3"><i class="fas fa-phone me-2 text-accent"></i> +62 813-8503-5662</p>
                    <div class="d-flex gap-3">
                        <a href="#" class="text-white fs-5 opacity-75 hover-opacity-100"><i class="fab fa-instagram"></i></a>
                        <a href="#" class="text-white fs-5 opacity-75 hover-opacity-100"><i class="fab fa-facebook"></i></a>
                        <a href="https://wa.me/6281385035662" target="_blank" class="text-white fs-5 opacity-75 hover-opacity-100"><i class="fab fa-whatsapp"></i></a>
                    </div>
                </div>
            </div>
            <hr class="mt-5 mb-4 border-light opacity-10">
            <div class="text-center">
                <p class="mb-0 small text-light opacity-50">&copy; 2026 Desa Pemagarsari. Berdaya Bersama UMKM Lokal.</p>
            </div>
        </div>
    </footer>

    <!-- Bootstrap JS CDN -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    {% block extra_js %}{% endblock %}
</body>
</html>