@extends('layouts.site', ['headerTemplate' => 'Demo27 Header']) @php use Illuminate\Support\Facades\Storage; @endphp @section('title', $product->translate('title') ?? 'Ürün Detayı') @section('meta_description', Str::limit(strip_tags($product->translate('content')), 160)) @php $landingData = $product->landing_page_data ?? []; $hero = $landingData['hero'] ?? []; $features = $landingData['features'] ?? []; $howItWorks = $landingData['how_it_works'] ?? []; $steps = $howItWorks['steps'] ?? []; $video = $landingData['video'] ?? []; $faqs = $landingData['faqs'] ?? []; $currentLang = app()->getLocale(); // Helper function to get translated value with fallback $getTranslated = function($item, $key, $default = '') use ($currentLang) { if (isset($item["{$key}_{$currentLang}"])) { return $item["{$key}_{$currentLang}"]; } return $item[$key] ?? $default; }; @endphp @section('content') {{-- Hero Section --}} @if(!empty($hero))
@if($slogan = $getTranslated($hero, 'slogan'))

{!! nl2br(e($slogan)) !!}

@endif @if($subSlogan = $getTranslated($hero, 'sub_slogan'))

{{ $subSlogan }}

@endif
@if(!empty($hero['app_store_link'])) App Store @endif @if(!empty($hero['google_play_link'])) Google Play @endif
@if(!empty($hero['featured_image']))
{{ $product->translate('title') }}
@endif
@endif {{-- App Features Section --}} @if(!empty($features))

{{ t('Özellikler') }}

{{ $product->translate('title') }} {{ t('deneyiminizi mükemmelleştirmek için buradayız.') }}

@foreach($features as $index => $feature) @php $featureTitle = $getTranslated($feature, 'title'); @endphp
@if(!empty($feature['icon']))
@php $iconPath = public_path('assets/img/icons/solid/' . $feature['icon'] . '.svg'); $iconUrl = file_exists($iconPath) ? asset('assets/img/icons/solid/' . $feature['icon'] . '.svg') : null; @endphp @if($iconUrl) {{ $featureTitle }} @else
{{ substr($feature['icon'], 0, 2) }}
@endif
@endif @if($featureTitle)

{{ $featureTitle }}

@endif
@endforeach
@endif {{-- Description Section --}} @php $productContent = $product->translate('content'); @endphp @if(!empty($productContent)) {!! $productContent !!} @endif {{-- How It Works Section --}} @if(!empty($howItWorks) && !empty($steps))
@if($howItWorksLabel = $getTranslated($howItWorks, 'download_form_label'))

{{ $howItWorksLabel }}

@endif
@if(!empty($howItWorks['download_image']))
How It Works
@endif
@foreach($steps as $index => $step) @if($index < 2)
{{ str_pad($step['number'] ?? ($index + 1), 2, '0', STR_PAD_LEFT) }} @if($stepTitle = $getTranslated($step, 'title'))

{{ $stepTitle }}

@endif @if($stepDescription = $getTranslated($step, 'description'))

{{ $stepDescription }}

@endif
@endif @endforeach
@foreach($steps as $index => $step) @if($index >= 2)
{{ str_pad($step['number'] ?? ($index + 1), 2, '0', STR_PAD_LEFT) }} @if($stepTitle = $getTranslated($step, 'title'))

{{ $stepTitle }}

@endif @if($stepDescription = $getTranslated($step, 'description'))

{{ $stepDescription }}

@endif
@endif @endforeach
@endif {{-- Video Section --}} @if(!empty($video['youtube_video_id']))
@endif {{-- FAQ Section --}} @if(!empty($faqs))

{{ t('Sık Sorulan Sorular')}}

@foreach($faqs as $index => $faq)

{!! nl2br(e($getTranslated($faq, 'answer'))) !!}

@endforeach
@endif @endsection