{% set product = page.product %}
{% set count = 0 %}
{% for element in page.product.children.elements %}
{% set count = count + element.stock %}
{% endfor %}
{% if count > 0 %}
<nav id="tap-bar" class="tap-bar-add-to-cart">
<div class="fixed bottom-0 left-0 right-0 py-3 lg:5 rounded-t-sm bg-white transition translate-y-full opacity-0 z-10 max-w-[1008px] mx-auto"
data-product-tab-bar="true"
data-toggle-classes="translate-y-0 opacity-100"
style="box-shadow: 0px -20px 25px -5px rgba(0, 0, 0, 0.1), 0px -10px 10px -5px rgba(0, 0, 0, 0.04);">
<div class="boxed-layout md:flex md:items-center md:grid-gap-8 md:justify-between lg:px-6">
<div class="tab-bar-product-container hidden md:flex md:grid-gap-4 lg:grid-gap-8">
<div class="product-thumbnail ratio ratio_product_image w-12">
{% sw_thumbnails 'product-tab-bar-thumbnail' with {
media: product.cover.media,
attributes: {
'class': 'product-tab-bar-thumbnail',
'alt': (product.cover.media.translated.alt ?: ''),
'title': (product.cover.media.translated.title ?: '')
}
} %}
</div>
<div class="product-info flex flex-col justify-center">
{# {% if product.manufacturer.translated.name %} #}
{# <div class="product-brand-name font-accent font-bold uppercase text-sm line-clamp-1 mb-2"> #}
{# {{ product.manufacturer.translated.name }} #}
{# </div> #}
{# {% endif %} #}
{% block component_product_box_name %}
<div class="product-name font-accent font-bold uppercase text-sm line-clamp-1">
{{ product.translated.name }}
</div>
{% endblock %}
{% block component_product_box_price %}
{% sw_include '@Storefront/storefront/component/product/card/price-unit.html.twig' %}
{% endblock %}
</div>
</div>
<div class="tab-bar-atc-container md:flex-grow-1 md:justify-end {% if page.product.children|length > 0 %}flex items-center grid-gap-2 lg:grid-gap-8{% endif %}">
{% set buyable = product.available and product.calculatedMaxPurchase > 0 %}
{% if buyable %}
{% if page.product.children|length > 0 %}
<div class="w-1/3 flex-shrink-0 lg:w-[240px]">
{% sw_include '@Storefront/storefront/page/product-detail/configurator/select.html.twig' with{
'type': 'dropdown',
'position': 'top',
'label': false,
'tapBar': true,
'product': page.product
} %}
</div>
{% endif %}
{% endif %}
<button class="btn btn-primary w-full {% if buyable %}{% else %}pointer-events-none disabled{% endif %}"
type="button"
{% if buyable %}
title="{{ "tapBar.addToCart"|trans|striptags }}"
aria-label="{{ "tapBar.addToCart"|trans|striptags }}"
data-product-add-to-cart-button="true"
{% endif %}
>
{% sw_icon 'cart-solid' style {'pack': 'hero', 'class': ' white w-5'} %}
{% if buyable %}
{{ "tapBar.addToCart"|trans|sw_sanitize }}
{% else %}
{{ "pages.product.soldOutLabel"|trans }}
{% endif %}
</button>
</div>
</div>
</div>
</nav>
{% endif %}