@foreach ($listings as $listing)
    <div class="col-lg-12 new-search-result offplan-search">
        <div data-listing-id="{{ $listing->p_id }}"
             data-listing-img="{{ $listing->getThumbImagePublicUrlAttribute() }}"
             data-listing-price="{{ $listing->price }}"
             data-listing-title="{{ $listing->title }}"
             class="feat_property feat_property_cus home7 style4 list">
            <div class="thumb m-0 w-100">
                <img class="img-whp view-property"
                     src="{{ $listing->getThumbImagePublicUrlAttribute() }}"
                     alt="{{ $listing->title }}">
                <div class="dtls_headr feature-tag">
                    <ul class="tag">
                        @if ($listing->is_featured == 1)
                            <li class="list-inline-item">Featured</li>
                        @endif
                        @if ($listing->sale_status)
                            <li class="list-inline-item">{{ $listing->sale_status->name }}
                            </li>
                        @endif
                        @if ($listing->cheque)
                            <li class="list-inline-item">{{$listing->cheque->name}}</li>
                        @endif
                    </ul>
                </div>
            </div>
            <div class="details w-100 view-property">
                <div class="view-property-inner">
                    <div class="d-flex flex-column justify-content-between">
                        <h4 class="font-weight-bold">{!! $listing->title !!}</h4>
                        @if ($listing->getHK())
                            <p><span class="flaticon-placeholder"></span>
                                {{ $listing->getHK() }}
                            </p>
                        @endif
                    </div>
                    <div class="d-flex flex-column align-itemsm-md-end justify-content-between">
                        @if ($listing->area)
                            <p class="fp_price"><span
                                    class="font-weight-bold">Area (sqft):</span>
                                {{ number_format($listing->area) }}{{ $listing->max_area ? '-' . number_format($listing->max_area) : '' }}
                            </p>
                        @endif
                        <div class="">
                            <div class="dtls_headr d-flex justify-content-sm-end">
                                @if ($listing->price)
                                    <a class="fp_price float-right ">
                                        Starting From<br>
                                        AED
                                        {{ number_format($listing->price) }}
                                        @if ($listing->purpose && $listing->purpose->id == 37 && $listing->rent_frequency)
                                            / {{ $listing->rent_frequency->name }}
                                        @endif
                                    </a>
                                @endif
                            </div>
                            <div class="fp_footer p-0">
                                <div class="fp_pdate float-right">
                                    <a
                                        class="btn theme-btn-inverse cursor-pointer text-white font-weight-bold">Details</a>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
@endforeach
