<article class="property-card h-100">
  {% if entry.photo %}
  <img class="property-thumb" src="{{ entry.photo.url }}" alt="Uploaded property photo for entry {{ entry.pk }}">
  {% else %}
  <div class="property-thumb placeholder-thumb" aria-hidden="true">⌂</div>
  {% endif %}
  <div class="property-card-body">
    <div class="d-flex justify-content-between gap-2 align-items-start">
      <span class="badge listing-badge">{{ entry.get_listing_type_display }}</span>
      <small class="text-muted">{{ entry.created_at|timesince }} ago</small>
    </div>
    <h3>{{ entry.address|default:"Location-only property" }}</h3>
    <p class="card-meta">
      {{ entry.get_source_display }}{% if entry.has_gps_data %} · GPS from photo{% endif %}{% if entry.distance_km is not None %} · {{ entry.distance_km|floatformat:1 }} km{% endif %}
    </p>
    <div class="mini-tags">
      {% if entry.phone %}<span>Phone</span>{% endif %}
      {% if entry.email %}<span>Email</span>{% endif %}
      {% if entry.idealista_url %}<span>Idealista link</span>{% endif %}
      {% if not entry.phone and not entry.email %}<span>Needs details</span>{% endif %}
    </div>
    <a class="stretched-link" href="{{ entry.get_absolute_url }}" aria-label="Open property {{ entry.pk }}"></a>
  </div>
</article>
