@extends('layouts.frontend') @section('title', $car->title) @section('content')
@php $imagePath = $car->mainImage ? $car->mainImage->path : null; $imageUrl = $imagePath ? (str_starts_with($imagePath, 'http') ? $imagePath : asset('storage/'.$imagePath)) : 'https://images.unsplash.com/photo-1552519507-da3b142c6e3d?auto=format&fit=crop&q=80&w=1200'; @endphp {{ $car->title }}
@foreach($car->images as $image) @php $thumbUrl = str_starts_with($image->path, 'http') ? $image->path : asset('storage/'.$image->path); @endphp
Gallery
@endforeach
{{ $car->year }} {{ $car->type == 'sale' ? 'للبيع' : 'للايجار' }} {{ $car->dynamic_status['label'] }}

{{ $car->title }}

@if($car->price) {{ number_format($car->price) }} ر.س @elseif($car->daily_price) {{ number_format($car->daily_price) }} ر.س / يومي @endif
الممشى
{{ number_format($car->mileage) }} كم
ناقل الحركة
{{ $car->transmission }}
نوع الوقود
{{ $car->fuel_type }}
الضمان
متاح

المميزات الرئيسية

@if($car->features && is_array($car->features)) @foreach($car->features as $feature)
{{ $feature }}
@endforeach @else
لا توجد مميزات مسجلة.
@endif
WhatsApp
@if($addOns->count() > 0)

🚀 عزز تجربتك

اختر من خدماتنا المميزة لراحة بال قصوى

@foreach($addOns as $addOn) @php $price = $addOn->pivot->custom_price ?? $addOn->price; @endphp
@if($addOn->is_bundle)
باقة مميزة
@endif
@if($addOn->name == 'تأمين شامل') 🛡️ @elseif($addOn->name == 'كيلومترات مفتوحة') 🛣️ @elseif($addOn->name == 'إضافة كرسي اطفال') 👶 @elseif($addOn->name == 'حماية الإطارات والزجاج') 🛞 @else ✨ @endif
{{ number_format($price) }} ر.س
{{ $addOn->price_type == 'daily' ? 'يومي' : 'ثابت' }}

{{ $addOn->name }}

{{ $addOn->description }}

@if($addOn->badge)
{{ $addOn->badge }}
@endif
@endforeach
💡
مثال للسعر مع الباقة الذهبية: {{ number_format($car->daily_price + ($addOns->where('is_bundle', true)->first()->pivot->custom_price ?? ($addOns->where('is_bundle', true)->first()->price ?? 0))) }} ر.س / يومي
@endif

الوصف

{{ $car->description ?? 'لا يوجد وصف متاح لهذه السيارة.' }}

المواصفات التقنية

سنة الصنع {{ $car->year }}
معرض السيارة {{ $car->branch->name ?? 'غير محدد' }}
نوع الهيكل {{ $car->body_type }}
ناقل الحركة {{ $car->transmission }}
نوع الوقود {{ $car->fuel_type }}

استفسر عن هذه السيارة

@csrf
@if(session('success'))
{{ session('success') }}
@endif
@endsection