{% if existing_cards %}
    <div class="row">
        {% for card in existing_cards %}
        <div class="col-md-4 mb-3">
            <div class="card h-100">
                <img src="{{ card.business_card_image.url }}?t={{ now|date:'U' }}" 
                     class="card-img-top" alt="Business Card">
                <div class="card-body">
                    <p><strong>Promo page:</strong> {{ card.referral_link|truncatechars:50 }}</p>
                    <p><strong>Created:</strong> {{ card.created_at|date:"Y-m-d H:i" }}</p>
                    <a href="{{ card.business_card_image.url }}" download class="btn btn-sm btn-success">Download Card</a>
                    <a href="{{ card.qr_code_image.url }}" download class="btn btn-sm btn-info">Download QR</a>
                </div>
            </div>
        </div>
        {% endfor %}
    </div>
{% else %}
    <p>No business cards generated yet. Use the form above to create one.</p>
{% endif %}