{% extends 'public_frontend/base.html' %}
{% block title %}Listings{% endblock %}
{% block content %}
<div class="grid md:grid-cols-3 gap-4">
  {% for l in listings %}
    <a href="{% url 'public_frontend:listing_detail' l.id %}" class="block p-4 border rounded bg-white hover:bg-gray-50">
      <div class="text-sm text-gray-500">Ends {{ l.ends_at|default:'—' }}</div>
      <div class="font-medium">{{ l.title }}</div>
      <div class="text-sm text-gray-600 line-clamp-2">{{ l.description|truncatechars:140 }}</div>
    </a>
  {% empty %}
    <div class="text-gray-500">No public listings.</div>
  {% endfor %}
</div>
<div class="mt-4">
  {% include 'admin_frontend/_pagination.html' %}
  </div>
{% endblock %}

