{% extends 'frontend/base.html.twig' %}
{% from 'frontend/partials/_realizations.html.twig' import realization_slider %}
{% block metaTitle %}{{ product.metaTitle|default(product.name) }}{% endblock %}
{% block metaDescription %}{{ product.metaDescription|default(product.introduction|block_editor_render|striptags|html_entity_decode|slice(0, 200)) }}{% endblock %}
{% block body %}
{% include 'frontend/partials/_breadcrumb.html.twig' %}
<section class="space-1">
<div class="container">
<h5 class="h4 mb-4 fw-medium">
{% trans %}Sei nell’area{% endtrans%} {{ product.name|lower }}.
{% trans %}Scorrendo la pagina troverai informazioni, cataloghi e promozioni che ti aiuteranno nella scelta del prodotto giusto per le tue esigenze.{% endtrans%}
</h5>
<div class="position-relative mb-4">
<div class="d-lg-none">
<figure class="media equal-1-1">
<span style="background-image: url('{{ product.cover.publicUrl }}')"></span>
</figure>
</div>
<div class="d-none d-lg-block">
<figure class="media equal-2-1">
<span style="background-image: url('{{ product.cover.publicUrl }}')"></span>
</figure>
</div>
</div>
</div>
</section>
<section class="space-1">
<div class="container">
{{ product.introduction|block_editor_render }}
</div>
</section>
{{ realization_slider(product.realizations) }}
<section class="space-2">
<div class="container">
{% for section in product.sections %}
<div class="row align-items-center justify-content-center space-top-1 space-top-lg-2 space-bottom-lg-1">
<div class="col-lg-5 ps-lg-5 {{ loop.index % 2 == 0 ? 'order-lg-1' }}">
<h3 class="text-uppercase text-primary display-5 fw-bold mb-2 mb-lg-4" style="line-height: 1">
{{ section.custom ? section.title : section.page.name }}
</h3>
<p class="fs-lg">
{{ section.custom ? section.description : section.page.introduction }}
</p>
<a href="{{ section.custom ? section.link : path('frontend_product_page_index', {product: section.page.product.slug, page: section.page.slug}) }}"
class="btn btn-primary text-uppercase fw-bold mb-4 mb-lg-0"
aria-label="{{ section.custom ? section.title : section.page.name }}"
>{% trans %}Scopri di più{% endtrans %}</a>
</div>
<div class="col-lg-5 {{ loop.index % 2 == 0 ? 'order-lg-0' }}">
<img src="{{ section.custom ? section.cover.publicUrl : section.page.cover.publicUrl }}" alt="{{ section.custom ? section.title : section.page.name }}"
class="img-fluid">
</div>
</div>
{% endfor %}
</div>
</section>
<section class="space-bottom-2">
<div class="container">
<div class="row justify-content-center">
{% for productCallToAction in product.productCallToActions %}
{% include 'frontend/partials/_call_to_action_card.html.twig' with {callToAction: productCallToAction.callToAction, size: productCallToAction.size} %}
{% endfor %}
</div>
</div>
</section>
{% endblock %}