<?php if (!defined('STORE_ROOT')) { http_response_code(403); exit; } $row = null; try { $row = Database::one("SELECT * FROM terms WHERE slug = 'privacy' LIMIT 1"); } catch (\Throwable $e) { error_log('[Privacy] ' . $e->getMessage()); } $subtitle = $row['subtitle'] ?? 'How we collect, use, and protect your data — with complete transparency.'; ?>
<div class="legal-page">
<div class="page-banner sf-page-banner">
<img src="/uploads/banners/store.png" alt="" class="sf-page-banner-bg">
<div class="sf-page-banner-content">
<div class="page-banner-icon">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/><polyline points="9 12 11 14 15 10"/></svg>
</div>
<div class="page-banner-text">
<h1 class="page-banner-title">Privacy Policy</h1>
<p class="page-banner-sub"><?= htmlspecialchars($subtitle) ?></p>
</div>
</div>
</div>
<div class="legal-body">
<?php if ($row): ?>
<?php for ($i = 1; $i <= 30; $i++): ?>
<?php $n = str_pad($i, 2, '0', STR_PAD_LEFT); $type = $row["t{$n}"] ?? ''; $content = $row["c{$n}"] ?? ''; if (!$content) continue; ?>
<?php if ($type === 'h'): ?>
<h2 class="legal-heading"><?= htmlspecialchars($content) ?></h2>
<?php elseif ($type === 'ul'): ?>
<ul class="legal-list"><?= strip_tags($content, '<li>') ?></ul>
<?php elseif ($type === 'ol'): ?>
<ol class="legal-list legal-list-ordered"><?= strip_tags($content, '<li>') ?></ol>
<?php elseif ($type === 'note'): ?>
<div class="legal-note"><?= htmlspecialchars($content) ?></div>
<?php else: ?>
<p class="legal-p legal-p-<?= $n ?>"><?= htmlspecialchars($content) ?></p>
<?php endif; ?>
<?php endfor; ?>
<?php else: ?>
<p class="legal-p">Privacy policy content is being updated. Please check back shortly.</p>
<?php endif; ?>
</div>
</div>