<?php
 
 
 

$catTabs = [
    'alphabetical' => __('alphabetical'),
    'popularity'   => __('popularity'),
];
$catTabs = HookSystem::applyFilter('front.category_sort_tabs', $catTabs);
?>

<div class="section-title-row">
    <h1 class="section-title" style="text-transform:uppercase;"><?php echo __('page_title_categories'); ?></h1>
    <?php if (!empty($categories)): ?>
        <?php echo simplySortDropdown($sort, '/categories', $catTabs); ?>
    <?php endif; ?>
</div>

<?php if (!empty($categories)): ?>
<div class="category-grid" id="listing-grid">
    <?php foreach ($categories as $category): ?>
        <?php echo simplyCategoryCard($category); ?>
    <?php endforeach; ?>
</div>
<?php else: ?>
    <div class="empty-state">
        <div class="empty-state__icon"><i class="fa-light fa-grid-2"></i></div>
        <p class="empty-state__text"><?php echo __('no_categories'); ?></p>
    </div>
<?php endif; ?>

<?php echo simplyPagination($pagination); ?>

