@model IList<ProductOverviewModel>
@if (Model.Count > 0)
{
    <div class="also-purchased-products-grid col-xs-12 col-sm-12 col-md-12">
        <div class="title sub-title">
            <strong>@T("Products.AlsoPurchased")</strong>
        </div>
        <div class="product-grid">
            <div class="row item-grid">
                @if (Model.Count <= 4)
                {
                    foreach (var item in Model)
                    {
                        <div class="item-box col-xs-12 col-sm-4 col-md-3 product-align">
                            <div class="thumbnail">
                                @await Html.PartialAsync("_ProductBox", item)
                            </div>
                        </div>
                    }
                }
                else
                {
                    <div id="also-purchased-products-slider" class="also-purchased-products-slider owl-carousel owl-theme">
                        @foreach (var item in Model)
                        {
                            <div class="item-box col-xs-12 col-sm-12 col-md-12 product-align">
                                <div class="thumbnail">@await Html.PartialAsync("_ProductBox", item)</div>
                            </div>
                        }
                    </div>
                }
            </div>
        </div>
    </div>
}