@if(isset($special))
    <div class="prod_card_row">
        <div class="row">
            <div class="col-lg-5">
                <a href="#">
                    <div class="img_box">
                        <img src="{{asset($product->image)}}" class="secImg" alt="" />
                    </div>
                </a>
            </div>
            <div class="col-lg-7">
                <div class="card-body">
                    <div class="d-flex justify-content-between align-items-center">
                        <h4 class="prod_name fs-2 fw-bold"> {{$product->title}} </h4>
                        <button type="button" style="cursor: pointer" onclick="favorite(this)" data-id="{{$product->id}}" class="fav_butn butn sm_butn white_butn">
                            <img src="{{url('')}}/assets/web/images/icons/heart.svg" class="icon icon15" alt="" />
                        </button>
                    </div>
                    <div class="price_box d-flex align-items-center my-2">
                        <span class="color-primary">  <b>{{$product->price}} {{__('web.sar')}} </b></span>
                    </div>

                    @if(count($product->sizes))
                        <div class="sizes_box">
                            <h6 class="text-center fs-5 fw-bold mb-2">{{__('web.sizes')}}</h6>
                            <div class="sizes_radios d-flex flex-wrap justify-content-center">
                                @foreach($product->sizes as $row)
                                    @include('web.pages.components.products.size',['size'=>$row,'product'=>$product,'type'=>($type ?? '')])
                                @endforeach
                            </div>
                        </div>
                        <button type="button" onclick="sizeProduct(this)" product-id="{{$product->id}}" action-id="{{route('web.product.details',$product->id)}}" class="butn w-100 mt-2 cart_butn">
                            <img src="{{url('')}}/assets/web/images/icons/cart-2.svg" class="icon me-2" alt="" /> {{ __('web.add_to_cart') }}
                        </button>
                    @else
                        <button type="button" style="cursor: pointer" onclick="addToCart(this)" count-id="1" data-id="{{$product->id}}" class="butn w-100 mt-2 cart_butn">
                            <img src="{{url('')}}/assets/web/images/icons/cart-2.svg" class="icon me-2" alt="" /> {{ __('web.add_to_cart') }}
                        </button>
                    @endif


                </div>
            </div>
        </div>
    </div>
@else
    <div class="prod_card">
        <div class="img_box">
            <a href="{{route('web.product.details',$product->id)}}">
                <img src="{{asset($product->image)}}" class="secImg" alt="" />
            </a>
            @if(count($product->sizes))
                    <button type="button" onclick="sizeProduct(this)" product-id="{{$product->id}}" action-id="{{route('web.product.details',$product->id)}}" class="butn white_butn cart_butn">
                        <img src="{{url('')}}/assets/web/images/icons/cart-2.svg" class="icon me-2" alt="" /> {{ __('web.show_product') }}
                    </button>
                    <div class="sizes_box">
                        <h6 class="text-center fs-5 fw-bold mb-2">{{__('web.sizes')}}</h6>
                        <div class="sizes_radios d-flex flex-wrap justify-content-center">
                            @foreach($product->sizes as $row)
                                @include('web.pages.components.products.size',['size'=>$row,'product'=>$product])
                            @endforeach
                        </div>
                    </div>
            @else
                <button type="button" style="cursor: pointer" onclick="addToCart(this)" count-id="1" data-id="{{$product->id}}"  class="butn white_butn cart_butn">
                    <img src="{{url('')}}/assets/web/images/icons/cart-2.svg" class="icon me-2" alt="" /> {{ __('web.add_to_cart') }}
                </button>
            @endif
            <span class="rate_badge"> <i class="fa-solid fa-star"></i> {{$product->rate}} </span>
            @if($product->cost_discount)
                @include('web.pages.components.products.offer',['product'=>$product])
            @endif
        </div>
        <div class="card-body">
            <div class="d-flex justify-content-between align-items-center">
                <h4 class="prod_name fs-2 fw-bold"> {!! $product->title !!} </h4>
                <button type="button" style="cursor: pointer" onclick="favorite(this)" data-id="{{$product->id}}" class="fav_butn butn sm_butn white_butn {{auth()->user()?->favorited($product->id) ? 'active': ''}}">
                    <img src="{{url('')}}/assets/web/images/icons/heart.svg" class="icon" alt="" />
                </button>
            </div>
            <div class="price_box d-flex align-items-center mt-3">
                <span class="color-primary">  <b> @include('web.pages.components.products.cost',['product'=>$product])  </b></span>
            </div>

        </div>
    </div>
@endif
