@model goods.Models.Coupang.Product.Response

@{
    ViewData["Title"] = "쿠팡PL";
}

<div id="products" class="container-2xl mx-auto">
    <h1 class="text-2xl mb-2 text-center">@ViewData["Title"] - @ViewBag.PlName</h1>
    <hr/>
    <div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg\:grid-cols-5 xl:grid-cols-6 2xl:grid-cols-8 gap-4 mt-3">
        @foreach (var row in Model.Data)
        {
            <div>
                <a href="@row.ProductUrl" rel="external" target="_blank">
                    <figure>
                        <div class="img-box">
                            <img src="@row.ProductImage" alt="@row.ProductName" />
                        </div>
                        <figcaption>@row.ProductName</figcaption>
                        <p>@row.ProductPrice.ToString("N0") 원</p>
                        @if(row.IsRocket) {
                            <span>로켓배송</span>
                        }
                        @if (row.IsFreeShipping)
                        {
                            <span>무료배송</span>
                        }
                    </figure>
                </a>
            </div>
        }
    </div>
</div>