<div class="col-md-{{ $col }} posItem">
    <div class="image">
        <a class="addFirstUnit" href="#">
            <img src="{{ optional($item->getFirstMedia('images'))->getUrl() ?: asset('icons/p.png') }}">
            <p class="prodname">
                {{ $item->name }}
            </p>
        </a>
    </div>
    <div class="prices">
        @if ($item->is_service == 1)
            <p>
                <a unitname="خدمة" prodname="{{ $item->name }}" unit_id="خدمة" href="#" cost="0"
                    prodid="{{ $item->id }}" prodprice="{{ $item->last_cost }}" class="itemCard">

                    <span class="label label-success">
                        <i class="fa fa-shopping-cart"></i>
                        {{ $item->last_cost }}
                        {{ currency()->getCurrency()['symbol'] ?? '' }}</span>
                </a>
            </p>
        @else
            @foreach ($item->productUnit as $unit)
                @php
                    $sale_price = $unit->pivot->sale_price;
                @endphp
                <p>
                    <a unitname="{{ $unit->name }}" prodname="{{ $item->name }}" unit_id={{ $unit->id }}
                        href="#" cost="{{ $unit->pivot->cost_price }}" prodid="{{ $item->id }}"
                        prodprice="{{ $sale_price }}" class="itemCard">

                        <span class="label label-warning">{{ $unit->name }}:
                            {{ $sale_price }}
                            {{ currency()->getCurrency()['symbol'] ?? '' }}</span>
                    </a>
                </p>
            @endforeach
        @endif
    </div>

</div>
