{% import "macros/product.html.twig" as productMacros %}
{% import "macros/banner.html.twig" as bannerMacros %}
{% import 'macros/banner-brands.html.twig' as bannerBrands %}
{% import "components/product/carousel.html.twig" as categoryCarousel %}
{% import "components/homepage/slider.html.twig" as homepageSlider %}
{% import 'components/button.html.twig' as button %}
{% extends 'base.html.twig' %}
{% block title %}
{{"general.products"|trans ~ " triwu_u" }}
{% endblock %}
{% block mainClass %}pt-20{% endblock %}
{% block login %}{% endblock login %}
{% block content %}
{% include 'components/header/categories.html.twig' %}
{{ homepageSlider.create(slider, "white") }}
<section class="relative">
<section class="relative overflow-hidden">
<img src="{{ asset('build/images/bg-pattern.svg') }}" class="absolute w-full left-0 top-0 opacity-20 h-[900px] object-cover z-10"/>
<section class="py-edge tablet:px-edge bg-primary desktop:px-0 desktop:pb-10">
<div class="relative z-10 mb-4 desktop:mb-10 flex items-center justify-center">
<h2 class="text-sm tablet:text-2xl uppercase font-bold text-center text-white desktop:text-4xl ">
{{ 'general.homepage_title'|trans }}
</h2>
<button data-modal="countdownProduct" id="info-icon" class="ml-2 -mt-4 hover:cursor-pointer border-2 border-white text-white rounded-full w-4 h-4 sm:w-5 sm:h-5 flex items-center justify-center cursor-pointer">
?
</button>
</div>
<div id="cover_carousel" class="relative z-10 flex flex-col gap-5 mx-auto desktop:max-w-7xl desktop:px-0">
<div class="splide splide__carousel">
<div class="splide__track">
<div class="splide__list">
{% for product in pagination %}
<div class="splide__slide">{{ productMacros.productCard(product,groupsProducts) }}</div>
{% endfor %}
</div>
</div>
</div>
</div>
</section>
</section>
<section class="grid-cover">
<div class="grid-cover__container">
{% for cat in featuredCategories %}
{% if cat.products|length %}
{{ categoryCarousel.create(cat.id, cat.name, cat.slug, cat.products,'default',groupsProducts) }}
{% endif %}
{% endfor %}
{{ bannerMacros.homepageBanner(banners, 'banner_extra', 'primary') }}
{{ bannerMacros.homepageBanner(banners, 'banner_sustainability', 'secondary') }}
</div>
<div>
{{ bannerBrands.create(featuredBrands) }}
{% if 'footer_banner' in banners|keys %}
{% set b = banners.footer_banner %}
{{ bannerMacros.productFooterBanner(b, b.key) }}
{% endif %}
</div>
</section>
</section>
<div id="ConfirmProduct" data-modal="confirmProduct" tabindex="-1" aria-hidden="true" class="modal-app">
<div class="modal-app__backdrop"></div>
<div class="modal-app__container">
<div class="modal-app__content">
<header>
<h3 class="text-xl font-bold desktop:text-2xl">
{{ "product.confirm.title" | trans }}
</h3>
</header>
<main class="leading-5 mt-3 mb-4">
<p>{{ "product.confirm.desc" | trans }} </p>
</main>
<a href="{{ path('app_product_add_to_shopping_cart', {'id': '#', 'isIndividual': false, 'newCart': true}) }}" class="ConfirmButton btn btn--primary btn--md btn-buy product-card__price-block__btn">
{{ "product.confirm.btn" | trans }}
</a>
<button id="CloseConfirmProduct" type="button" class="btn btn--md w-full mt-1">
{{ "product.confirm.cancel" | trans }}
</button>
</div>
</div>
</div>
{% if app.request.query.get('registered') and userId > 0 %}
<!-- Código del píxel -->
<img src='http://es.beruby.com/track/509916/dic24/{{userId}}/pixel' border='0' width='1' height='1' alt=''/>
{% endif %}
{% endblock %}