@foreach ($listings as $listing)
    <div class="col-md-6 col-lg-4">
        <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">
            <div class="thumb">
                <img class="low-opacity img-whp view-property image-fix-box"
                    src="{{ $listing->getThumbImagePublicUrlAttribute() }}" alt="{{ $listing->title }}">
                <div class="thmb_cntnt style2">
                    @if ($listing->is_featured == 1)
                        <ul class="tag mb0">
                            <li class="list-inline-item">Featured</li>
                        </ul>
                    @endif
                </div>
                <div class="thmb_cntnt style3">
                    @if ($listing->price)
                        <a class="fp_price">AED
                            {{ number_format($listing->price) }}
                            @if ($listing->purpose && $listing->purpose->id == 37 && $listing->rent_frequency)
                                / {{ $listing->rent_frequency->name }}
                            @endif
                        </a>
                    @endif
                </div>
            </div>
            <div class="details">
                <div class="tc_content view-property">
                    @if ($listing->property_type)
                        <p class="text-thm">{{ $listing->property_type->name }}</p>
                    @endif
                    <h4>{{ $listing->title }}</h4>
                    @if ($listing->getHK())
                        <p><span class="flaticon-placeholder"></span>
                            {{ $listing->getHK() }}
                        </p>
                    @endif
                </div>
                <div class="fp_footer">
                    <div class="row">
                        <div class="col-md-6">
                            <a data-url="{{ env('APP_URL') . '/property/' . $listing->p_id }}"
                                class="property-email-btn btn btn-block theme-btn"><i class="fa fa-envelope-o"></i>
                                Email</a>
                        </div>
                        <div class="col-md-6">
                            <a href="https://wa.me/+971503879245?text=Hello, I am interested in {{ env('APP_URL') . '/property/' . $listing->p_id }}"
                                target="_blank" class="btn btn-block theme-btn"><i class="fa fa-whatsapp"></i>
                                Whatsapp</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
@endforeach
