{{--
Tur detay sayfası — Jolly deseninin modern/sade uyarlaması.
Bölümler: galeri kolaj + başlık overlay + aksiyon sidebar'ı → sticky sekmeler →
rezervasyon → tur programı → fiyatlar & tarihler → bilgiler.
Veri yoksa bölüm hiç render edilmez (sekmeden de düşer).
--}}
@php
$galleryPool = collect($tour->sliderImages ?? collect())
->concat($tour->galleryImages ?? collect())
->unique('id')
->values();
$coverUrl = $tour->cover_image_url ?: $galleryPool->first()?->image_url;
$collage = $galleryPool->take(5);
$currency = $tour->currency ?? 'TRY';
$startingPrice = $tour->starting_price;
$itineraries = ($tour->itineraries ?? collect())->where('is_active', true)->values();
$departurePoints = ($tour->transferPoints ?? collect())->where('is_active', true)->values();
$hasProgram = $itineraries->isNotEmpty();
$hasDates = $dates->isNotEmpty();
$hasInfo = filled($tour->description) || filled($tour->places_to_visit) || filled($tour->cancellation_policy) || filled($tour->terms_conditions);
$durationText = $isDayTour
? ($tour->duration_hours ? $tour->duration_hours . ' Saat' : 'Günübirlik')
: trim((($tour->days ?? $tour->duration) ? ($tour->days ?? $tour->duration) . ' Gün' : '') . ($tour->nights ? ' ' . $tour->nights . ' Gece' : ''));
$formAction = $preview ? '#' : route('customer.agency.forms.submit', ['agency' => $agency->slug, 'formKey' => 'reservation']);
$callbackAction = $preview ? '#' : route('customer.agency.forms.submit', ['agency' => $agency->slug, 'formKey' => 'callback']);
$inclusionList = collect(preg_split('/\r\n|\r|\n/', strip_tags((string) $tour->inclusions)))->map(fn ($s) => trim($s))->filter()->values();
$exclusionList = collect(preg_split('/\r\n|\r|\n/', strip_tags((string) $tour->exclusions)))->map(fn ($s) => trim($s))->filter()->values();
// Panelden girilen zengin metin HTML içerebilir; içermiyorsa satır sonları korunarak escape edilir
$rich = fn ($text) => str_contains((string) $text, '<') ? $text : nl2br(e($text));
@endphp
@extends('site.templates.voyage.layout', ['pageTitle' => $tour->name . ' | ' . $agency->name, 'ogImage' => $coverUrl])
@section('content')
{{-- ======================= GALERİ + BAŞLIK ======================= --}}
Bu tarih için fiyat bilgisini telefonla alabilirsiniz. 0) loading="lazy" @endif>
@if($index === 4 && $galleryPool->count() > 5)
+{{ $galleryPool->count() - 5 }} fotoğraf
@endif
@endforeach
@endif
{{ $tour->name }}
@if(!empty($tour->highlights) && is_array($tour->highlights))
@foreach(array_slice($tour->highlights, 0, 4) as $highlight)
@endif
Tarih Seçin, Talebinizi İletin
Tur Programı
{{ $isDayTour ? ($itinerary->time ?: ($loop->iteration . '.')) : ($itinerary->day_number . '. Gün') }}
{{ $itinerary->title }}
Fiyatlar & Tarihler
@foreach($rows as $row)
{{ $row[0] }} @endforeach
@foreach($rows as $row)
@include('site.templates.voyage.partials.price', ['amount' => $row[1], 'currency' => $dateCurrency])
@endforeach
Bilmeniz Gerekenler
Genel Bilgiler