{% load tailwind_tags %}
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <title>{% if current_site %}{{ current_site.name }}{% else %}Ecoloop{% endif %} — {% block title %}{% endblock %}</title>
  {% tailwind_css %}
</head>
<body class="bg-gray-50 text-gray-900">
  <header class="bg-white shadow">
    <div class="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8 flex items-center justify-between h-16">
      <a href="/" class="text-lg font-semibold">{% if current_site %}{{ current_site.name }}{% else %}Ecoloop{% endif %}</a>
      <nav class="hidden md:flex items-center gap-6">
        <a href="{% url 'public_frontend:materials_list' %}" class="hover:text-black/70">Materials</a>
        <a href="{% url 'public_frontend:listings_list' %}" class="hover:text-black/70">Listings</a>
        <a href="{% url 'public_frontend:pickup_request' %}" class="hover:text-black/70">Request Pickup</a>
        <a href="{% url 'public_frontend:blog_list' %}" class="hover:text-black/70">Blog</a>
        <a href="{% url 'public_frontend:contact' %}" class="hover:text-black/70">Contact</a>
      </nav>
    </div>
  </header>
  <main class="mx-auto max-w-7xl p-4 sm:p-6 lg:p-8">
    {% block content %}{% endblock %}
  </main>
  <footer class="bg-white border-t">
    <div class="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8 h-16 flex items-center justify-between text-sm text-gray-600">
      <span>&copy; {% now "Y" %} {% if current_site %}{{ current_site.name }}{% else %}Ecoloop{% endif %}</span>
      <a href="/webadmin/" class="hover:underline">Staff Login</a>
    </div>
  </footer>
</body>
</html>
