{# brutalist category-list override — from the `categories` provider. list or pills. Fields: heading, style, categories[], showCount. #}
{% set pills = style == "pills" %}
<section class="bg-background text-foreground{% if class %} {{ class }}{% endif %}">
{% if heading %}<h2 class="bru-meta mb-4 text-foreground">{{ heading }}</h2>{% endif %}
{% if pills %}
<div class="flex flex-wrap gap-2">
{% for cat in categories %}
<a href="{{ cat.url }}" class="bru-tag inline-flex items-center gap-1.5">{{ cat.name }}{% if showCount %}<span class="bru-index" style="font-size:0.85rem">{{ cat.post_count }}</span>{% endif %}</a>
{% endfor %}
</div>
{% else %}
<ul class="space-y-2">
{% for cat in categories %}
<li><a href="{{ cat.url }}" class="bru-slab bru-shadow-sm bru-hover flex items-center justify-between px-3 py-2 text-sm text-foreground transition-colors hover:text-accent"><span>{{ cat.name }}</span>{% if showCount %}<span class="bru-index" style="font-size:0.85rem">{{ cat.post_count }}</span>{% endif %}</a></li>
{% endfor %}
</ul>
{% endif %}
</section>
