<div class="card">
    <a href="{{ route('shop.productOrCategory.index', $product->url_key) }}" title="{{ $product->name }}" style="color: black;">
        <div class="card-discount-img">
            <img src="{{ bagisto_asset('icons/BG.svg') }}" alt="bg" />
        </div>
        <h5 class="card-discount-text">{!! discount_prosent($product) !!} %</h5>
        <div class="card-wrapper">
            <h3 class="card-title">{{__('shop::app.home.weekly-offers')}}</h3>
            <div class="card-timer">
                <div class="card-timer-clock">
                    <img src="{{ bagisto_asset('icons/icon (timer).svg') }}" alt="timer" />
                </div>
                <div id="card-timer-div">{{Carbon\Carbon::parse($product->special_price_to)->format('d.m.Y')}}</div>
            </div>
        </div>
        <div class="card-img">
            <?php $productBaseImage = productimage()->getProductBaseImage($product); ?>
            <img src="{{ $productBaseImage['medium_image_url'] }}" onerror="this.src='{{ asset('vendor/webkul/ui/assets/images/product/meduim-product-placeholder.png') }}'"
                 alt="{{$product->name}}" />
        </div>
    </a>
    <div class="card-wrapper">
        <h4 class="card-subtitle">{{ $product->name }}</h4>
        <div class="card-rating">
            <div class="card-rating-img">
                <img src="{{ bagisto_asset('icons/icon (star).svg') }}" alt="rating" />
            </div>
            <h5 class="card-rating-text">{{ceil($reviewHelper->getAverageRating($product))}}</h5>
        </div>
        <div class="card-price">
            <div class="card-price-desc">
                {!! priceHtml($product) !!}
            </div>
            <form action="{{ route('cart.add', $product->product_id) }}" method="POST">
                @csrf
                <input type="hidden" name="product_id" value="{{ $product->product_id }}">
                <input type="hidden" name="quantity" value="1">
                <button class="card-price-cart" {{ $product->isSaleable() ? '' : 'disabled' }}>
                    <img src="{{ bagisto_asset('icons/icon (cart) 2.svg') }}" alt="cart" />
                </button>
            </form>

        </div>
    </div>
</div>