{% if Products|length %}
<section class="ranking splide ranking-splide">
<div class="inner">
<h2 class="section__heading --center">Ranking<span class="section__sub-heading">ランキング</span></h2>
<div class="splide__track">
<ul class="ranking__list splide__list">
{% for Product in Products|slice(0, 5) %}
<li class="ranking__item splide__slide">
<a href="{{ url('product_detail', {'id': Product.id}) }}" class="ranking__item-link">
<div class="ranking__badge --en --rank{{ loop.index }}"><span class="number">0{{ loop.index }}</span>Ranking</div>
{% if Product.major_heading is not null %}
<p class="ranking__head"><span>{{Product.major_heading}}</span></p>
{% endif %}
<div class="ranking__body">
<div class="ranking__thumb">
<img src="{{ asset(Product.mainFileName|no_image_product, "save_image") }}" alt="{{ Product.name }}">
</div>
<div class="ranking__desc">
{% for ProductCategory in Product.ProductCategories %}
{% set ParentCategory = ProductCategory.Category %}
{% for ChildCategory in ParentCategory.children %}
<p class="ranking__category">{{ ChildCategory.name }}</p>
{% endfor %}
{% endfor %}
<p class="ranking__name">{{ Product.name }}</p>
{% for spec in Product.ProductSpecs %}
{% if spec.title == '産地' %}
<p class="ranking__area">産地:{{ spec.content|raw|nl2br }}</p>
{% endif %}
{% endfor %}
<p class="ranking__price --en">
{% if Product.hasProductClass %}
{% if Product.getPrice02Min == Product.getPrice02Max %}
{{ Product.getPrice02IncTaxMin|price }}<span>(税込)</span>
{% else %}
{{ Product.getPrice02IncTaxMin|price }}<span>(税込)</span>
~
{{ Product.getPrice02IncTaxMax|price }}<span>(税込)</span>
{% endif %}
{% else %}
{{ Product.getPrice02IncTaxMin|price }}<span>(税込)</span>
{% endif %}
</p>
</div>
</div>
</a>
</li>
{% endfor %}
</ul>
</div>
</div>
</section>
{% endif %}