<?php require_once __DIR__ . '/../app/bootstrap.php'; $cats=App\Core\Database::fetchAll('SELECT * FROM categories WHERE status="active" ORDER BY sort_order,name'); $pageTitle='Categories | '.BRAND_NAME; include ROOT_PATH . '/app/Layouts/frontend_header.php'; ?><section class="container py-5"><h1 class="section-title mb-4">Categories</h1><div class="row g-3"><?php foreach($cats as $c): ?><div class="col-md-3"><div class="feature-pill"><h5><?= e($c['name']) ?></h5><p class="small text-muted"><?= e($c['description'] ?? '') ?></p><a href="<?= url('public/products.php?category='.$c['slug']) ?>">Browse</a></div></div><?php endforeach; if(!$cats) echo '<p class="text-muted">No categories yet.</p>'; ?></div></section><?php include ROOT_PATH . '/app/Layouts/frontend_footer.php'; ?>
