{% if CheckProducts|length > 0 %}
{# 本番(coinpalace.jp)と同仕様のSwiperスライダー: SP=1枚/PC(980px以上)=3枚・矢印+ドット #}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css">
<script src="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js"></script>
<h3>最近チェックした商品</h3>
<div class="ichiran_coinlist checkwrap swiper" id="checkitem_wrap">
<ul class="swiper-wrapper">
{% for Product in CheckProducts %}
<li class="swiper-slide"><a href="{{ url('product_detail', {'id': Product.id}) }}">
<img src="{{ asset(Product.main_list_image|no_image_product, 'save_image') }}" alt="#">
{% if Product.Status.id == 8 %}
<b class="tab_yoyaku">ご予約可</b>
{% endif %}
<h2>{{ Product.name }}</h2>
<p>
{% if Product.Status.id == 6 %}
{# 取り置き(公開)は価格表示なし #}
{% elseif Product.getPrice02IncTaxMin == 0 and htMeyasu[Product.id] is defined %}
{# 価格0円の場合は目安価格を表示 #}
目安価格:{{ htMeyasu[Product.id]|number_format }}円(税込)
{% else %}
<s>一般価格:{{ Product.getPrice02IncTaxMin|number_format }}円(税込)</s>
{% if htPrice[Product.id] is defined %}
<br><strong>会員価格:{{ htPrice[Product.id]|number_format }}円(税込)</strong>
{% endif %}
{% endif %}
</p>
</a></li>
{% endfor %}
</ul>
<div class="swiper-pagination"></div>
<div class="swiper-button-prev"></div>
<div class="swiper-button-next"></div>
</div>
<style>
/* swiper化に伴う既存リストCSS(.ichiran_coinlist ul の flex-wrap/幅)の打ち消し。このブロック内限定 */
#checkitem_wrap ul.swiper-wrapper{flex-wrap:nowrap;width:100%;margin:0 auto}
#checkitem_wrap ul li{float:none}
#checkitem_wrap{padding:0 36px 34px;box-sizing:border-box}
#checkitem_wrap .swiper-button-prev,
#checkitem_wrap .swiper-button-next{color:#4285f4}
#checkitem_wrap .swiper-pagination-bullet-active{background:#4285f4}
</style>
<script>
new Swiper('#checkitem_wrap', {
slidesPerView: 1,
spaceBetween: 20,
pagination: { el: '#checkitem_wrap .swiper-pagination', clickable: true },
navigation: { nextEl: '#checkitem_wrap .swiper-button-next', prevEl: '#checkitem_wrap .swiper-button-prev' },
breakpoints: {
980: { slidesPerView: 3 }
}
});
</script>
{% endif %}