{% extends 'base_front.html.twig' %}
{% block body %}
<section id="products">
<div class="container-right container-video position-relative bg-black-transparent p-5">
<h2 class="black mb-3">Products <br><span>& services</span></h2>
<div class="tabs-page mt-5">
<div class="row col-md-12">
{% for category in allCategories %}
{% if category.subcategories is not empty %}
{% if not loop.first %}
<div class="separate"></div>
{% endif %}
<a href="{{ path('front_product_list', {'category_slug' : category.slug, 'subcategory_slug': category.subcategories.0.slug}) }}" {% if currentCategory.id == category.id %}class="active"{% endif %}>
<h3>{{ category.name }}</h3>
</a>
{% endif %}
{% endfor %}
</div>
</div>
<div class="col-md-12 mt-5 tabs-services">
<ul class="nav nav-pills mb-3" id="pills-tab" role="tablist">
{% for subCategory in currentCategory.subCategories %}
<li class="nav-item" role="presentation">
<button class="nav-link {% if subCategory.id == currentSubCategory.id %}active{% endif %}"
id="pills-home-tab"
data-toggle="pill"
data-target="#{{ subCategory.slug }}"
type="button"
role="tab"
aria-controls="pills-home"
aria-selected="{% if subCategory.id == currentSubCategory.id %}true{% else %}false{% endif %}">{{ subCategory.name }}</button>
</li>
{% endfor %}
</ul>
<div class="tab-content" id="pills-tabContent">
{% for subCategory in currentCategory.subCategories %}
<div class="tab-pane fade {% if subCategory.id == currentSubCategory.id %}show active{% endif %}" id="{{ subCategory.slug }}" role="tabpanel" aria-labelledby="pills-home-tab">
<div class="row col-md-12 mt-5 align-items-start">
<div class="col-md-12 col-lg-12 col-xl-5 service-description" style="background-color:{{ subCategory.category.color }};">
<h3>DESCRIPTION</h3>
<p class="white">{{ subCategory.description }}</p>
</div>
<div class="col-lg-12 col-xl-7 service-list pt-4">
<div class="row">
{% for page in subCategory.productPages %}
<div class="col-lg-4 col-xl-4 mt-3">
<a href="{{ path('front_product_page', {'category_slug' : page.subcategory.category.slug, 'subcategory_slug': page.subcategory.slug, 'slug_page': page.slug}) }}">
<div class="bg-white black square"><span>{{ page.name }}</div>
</a>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</section>
{% endblock %}