@props([
'pageType' => 'home',
])

<div class="{{ $pageType == 'shop' ? 'col-12 col-sm-4 prod-item-col' : 'col-sm-6 col-lg-3' }}">
    <div class="product-item {{ $pageType == 'home' ? 'product-item-dark' : '' }} ">
        <ul class="product-icon-top">
            <li><a href="javascript:void(0)" data-product-id='{{ $productId }}' class="addToWishlist"><i class="fa fa-heart" aria-hidden="true"></i></a></li>
        </ul>
        <a href="{{ $productLink }}" class="product-img"><img class="lazy" src="{{ $featuredImage }}" alt="product"></a>
        <div class="{{ $pageType == 'shop' ? 'product-item-wrap' : 'product-item-content' }}">
            <div class="product-item-cover">
                <div class="price-cover {{ $productPrice > 0 &&  $productSalePrice > 0 ? '' : 'd-none' }} ">
                    <div class="old-price"><i class="fa fa-inr"></i> {{ $productPrice }}</div>
                    <div class="new-price ml-3"><i class="fa fa-inr"></i> {{ $productSalePrice }}</div>
                </div>
                <h6 class="prod-title text-center mt-3"><a href="{{ $productLink }}">{{ $productTitle }}</a></h6>
                @if($productType == 1 && $forRent == 0)

                <form action="{{ route('front.addToCart') }}" method="post" class="w-100 addToCartSingle">
                    @csrf
                    <input type="hidden" name="product_id" value="{{ $productId }}" />
                    <input type="hidden" name="product_quantity" id="product_quantity" value="1" />
                    <input type="hidden" name="product_type" value="{{ $productType }}" />
                    <input type="hidden" name="product_attribute" value="" />
                    <input type="hidden" name="child_attribute_id" value="" />
                    <input class="btn single-page-add-to-cart btn-buy-now w-100 mr-0 mb-4" type="submit" id="add_{{ $productId }}" value="Add to Cart" />
                </form>
                @else
                <a href="{{ $productLink }}" class="btn w-100 mr-0 mb-4"><span>View Details</span></a>
                @endif
            </div>
        </div>
    </div>
</div>