<h2>Mis fotos</h2>
<?php if (empty($photos)): ?>
  <p>Todavía no has subido fotos.</p>
<?php else: ?>
  <div class="grid3">
    <?php foreach ($photos as $p): ?>
      <div class="card">
        <img src="<?php echo htmlspecialchars(asset_url($p['storage_rel_path'])); ?>" alt="foto" style="max-width:100%;border-radius:10px;">
        <div style="margin-top:8px;">
          <small><?php echo htmlspecialchars($p['visibility']); ?> · <?php echo htmlspecialchars($p['created_at']); ?></small>
          <?php if (!empty($p['text'])): ?><p><?php echo htmlspecialchars($p['text']); ?></p><?php endif; ?>
        </div>
      </div>
    <?php endforeach; ?>
  </div>
<?php endif; ?>
