@extends('layouts.site') @section('meta_title') {{ locale_field($product, 'name') }} — {{ __('site.nav_products') }} @endsection @section('title') {{ locale_field($product, 'name') }} @endsection @push('meta') @if (filled($product->meta_keywords)) @endif @endpush @section('content') @php $locale = app()->getLocale(); $card = \App\Support\Cards\ProductCardPresenter::from($product); $specs = collect($product->specifications ?? [])->filter(fn ($row) => $row !== null && $row !== '' && (! is_array($row) || ! empty(array_filter((array) $row)))); $hasDesc = filled(locale_field($product, 'description')); $hasSpecs = $specs->isNotEmpty(); $detailTabs = collect([ $hasDesc ? ['key' => 'desc', 'label' => __('validation.attributes.description')] : null, $hasSpecs ? ['key' => 'specs', 'label' => __('site.spec_title')] : null, ['key' => 'faq', 'label' => __('site.detail_tab_faq')], ])->filter()->values()->all(); $initialTab = $detailTabs[0]['key'] ?? 'faq'; @endphp
@if ($product->featured) {{ __('site.featured') }} @endif @if ($product->category) {{ locale_category_name($product->category) }} @endif @if ($product->manufacturer) {{ $product->manufacturer }} @endif

{{ locale_field($product, 'name') }}

@if (locale_field($product, 'summary'))

{{ locale_field($product, 'summary') }}

@endif @if ($card['has_price'] ?? false)

{{ $card['formatted_price'] }}

@endif @if ($product->ai_recommendation_percent)

{{ __('site.card_ai_recommend', ['percent' => $product->ai_recommendation_percent]) }}

@endif
@if ($card['can_request_price'] ?? false) @endif {{ __('site.cta_whatsapp') }} @feature('repair_services') @endfeature
@if ($product->sku)
{{ __('site.sku') }}
{{ $product->sku }}
@endif @if ($product->manufacturer)
{{ __('site.manufacturer') }}
{{ $product->manufacturer }}
@endif @if ($product->official_warranty)
{{ __('site.card_badge_warranty') }}
{{ __('site.repair_warranty_active') }}
@endif
@if ($hasDesc)
{!! nl2br(e(locale_field($product, 'description'))) !!}
@endif @if ($hasSpecs)
@foreach ($specs as $key => $row) @if (is_array($row)) @php $label = $row['label'] ?? $row['title'] ?? $row['key'] ?? null; $value = $row['value'] ?? $row['text'] ?? null; @endphp @if ($label !== null && $label !== '')
{{ $label }}
{{ $value ?? '—' }}
@endif @elseif (! is_numeric($key))
{{ $key }}
{{ $row }}
@endif @endforeach
@endif

{{ __('site.detail_faq_contact') }}

@include('partials.site.related-rail', ['rail' => $relatedRail ?? null])
@endsection