@if(count($carts))

    <div class="cart-products pe-lg-4 mb-4">
        <div class="line-title mb-4"> <h5 class="bg-white pe-3"> {{__('web.cart_car')}} </h5> </div>
        <div class="prods">
            @foreach($carts as $row)
                <div class="item cart_card_row">
                <div class="row">
                    <div class="col-lg-3">
                        <div class="img">
                            <img src="{{asset($row['product']->image)}}" alt="">
                        </div>
                    </div>
                    <div class="col-lg-6">
                        <div class="info py-5">
                            <h6 class="mb-3"> {{$row['product']->currentDescription->title}} </h6>
                            <div class="text mb-1"> {{__('web.get_it')}} <span class="text-dark"> {{$tomorrow}} </span> </div>
                            <div class="text mb-1"> {{__('web.store')}} <span class="cr-blue"> {{$row['product']->store->currentDescription->title}}  </span> </div>
{{--                             <div class="text mb-1"> الكمية <span class="cr-blue"> {{$row['count']}} </span> </div>--}}
                            <div class="quant">
                                <small class="cr-gray"> {{__('web.quantity')}} </small>
                                <select onchange="selectCount(this)" data-id="{{route('cart.update',$row['id'])}}" class="form-select form-control">
                                    @for($i=1;$i<=$row['product']->max_count ;$i++)
                                        <option {{$row['count'] == $i ? 'selected' : ''}} value="{{ $i }}"> {{ $i }} </option>
                                    @endfor
                                </select>
{{--                                <a href="#" class="cr-blue small"> حذف </a>--}}
                                <a onclick="deleteCart(this)" action-id="{{route('cart.destroy',$row['id'])}}" style="cursor: pointer" class="cr-blue small"> {{__('web.delete_cart')}} </a>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-3">
                        <div class="price-side py-lg-5">
                            <div class="price-wrapper"> <span class="price"> {{$row['product']->cost['cost']}} </span> <small>{{__('web.sar')}}.</small> </div>
{{--                            <div class="cr-green small mt-3"> <i class="fal fa-truck"></i> <span class="txt"> توصيل مجاني </span> </div>--}}
                        </div>
                    </div>
                </div>
            </div>
            @endforeach
        </div>
    </div>

@else
    @include('web.pages.components.not_found',['message'=>__('web.not_found_product_cart')])
@endif
