{% if not bottomMenu %}
{% set item = item.category %}
{% endif %}
{% set isActive = item.id == activeId %}
{% set hasChildren = item.visibleChildCount > 0 %}
{% set url = category_url(item) %}
{% set name = item.translated.name %}
{% set level = item.level %}
{# Check for SALE menu item, as this will need specific styling #}
{# {% set sale = item.id == '828c5896f4ba43cc80cd9656f2f47c82' %} #}
{% set sale = item.customFields and 'custom_is_highlight' in item.customFields|keys and item.customFields.custom_is_highlight %}
{% set has_margin_bottom = item.customFields and 'custom_has_bottom_margin' in item.customFields|keys and item.customFields.custom_has_bottom_margin %}
<li class="navigation-offcanvas-list-item">
{% block layout_navigation_offcanvas_navigation_categories_list_category_item_link %}
<a class="navigation-offcanvas-link nav-item nav-link flex justify-between items-center p-4 text-sm font-bold transition hover:text-grey-600 lg:ml-page
{% if isActive %} active text-grey-200{% endif %}
{% if hasChildren and level < 3 %} js-navigation-offcanvas-link{% endif %}
{% if sale %}btn btn-white text-red-500 text-lg font-bold px-8 py-4 mt-2{% endif %}
{% if has_margin_bottom %}mb-20{% endif %}
"
href="{{ url }}"
{% if hasChildren and level < 3 %}
data-href="{{ path('frontend.menu.offcanvas', {'navigationId': item.id}) }}"
{% endif %}
itemprop="url"
{% if category_linknewtab(item) %}target="_blank"{% endif %}
title="{{ name }}"
data-level="{{ level }}">
{% block layout_navigation_offcanvas_navigation_categories_list_category_item_link_text %}
<span itemprop="name">{{ name }}</span>
{% if hasChildren and level < 3 %}
{% block layout_navigation_offcanvas_navigation_categories_list_category_item_link_icon %}
<span class="navigation-offcanvas-link-icon js-navigation-offcanvas-loading-icon text-white">
{% sw_icon 'chevron-right' style { 'pack':'theme-icons', 'class': ' w-5 h-5' } %}
</span>
{% endblock %}
{% endif %}
{% endblock %}
</a>
{% endblock %}
</li>