<div class="row g-3">
  {% if data %}
    {% for mt, info in data.items %}
    <div class="col-6 col-md-4 col-lg-3 col-xl-2">
      <div class="card text-center h-100">
        <div class="card-body d-flex flex-column align-items-center justify-content-center" style="aspect-ratio: 1;">
          {% if info.change_pct > 0 %}
            <div class="display-3 lh-1 text-success">↑</div>
            <div class="fs-6 text-success mt-1">+{{ info.change_pct }}%</div>
          {% elif info.change_pct < 0 %}
            <div class="display-3 lh-1 text-danger">↓</div>
            <div class="fs-6 text-danger mt-1">{{ info.change_pct }}%</div>
          {% else %}
            <div class="display-3 lh-1 text-muted">→</div>
            <div class="fs-6 text-muted mt-1">0%</div>
          {% endif %}
          <div class="fw-bold mt-2">{{ mt }}</div>
        </div>
      </div>
    </div>
    {% endfor %}
  {% else %}
    <div class="col-12">
      <p class="text-muted">No trending data found.</p>
    </div>
  {% endif %}
</div>
