@extends('layouts.app') @php $productImages = collect($images ?? array_merge([$product['primary_image']], $product['gallery'] ?? [])) ->filter() ->unique() ->values(); $primaryImage = $productImages->first(); $specifications = collect([ 'Category' => $product['category_label'] ?? null, 'Product format' => $product['format'] ?? null, 'Packaging directions' => !empty($product['packaging_options']) ? implode(' / ', $product['packaging_options']) : null, 'Suitable for' => !empty($product['suitable_for']) ? implode(' / ', $product['suitable_for']) : null, 'Sales channels' => !empty($product['sales_channels']) ? implode(' / ', $product['sales_channels']) : null, 'Range role' => $product['range_role'] ?? null, 'Development status' => $product['development_status'] ?? null, ])->filter(fn ($value) => filled($value)); @endphp @section('title', $product['seo_title']) @section('meta_description', $product['seo_description']) @section('content')
@if($primaryImage) @endif @if($productImages->count() > 1) @endif
@if(!empty($product['category_label']))

{{ $product['category_label'] }}

@endif

{{ $product['name'] }}

@if(!empty($product['short_description']))

{{ $product['short_description'] }}

@endif
@foreach([ 'Category' => $product['category_label'] ?? null, 'Format' => $product['format'] ?? null, 'Packaging' => !empty($product['packaging_options']) ? implode(' / ', $product['packaging_options']) : null, ] as $label => $value) @if(filled($value))
{{ $label }}
{{ $value }}
@endif @endforeach

{{ $product['name'] }} description

@if(!empty($product['long_description']))

{{ $product['long_description'] }}

@else

A detailed description is not currently available. Please enquire for product-specific information.

@endif

{{ $product['name'] }} specifications

@if($specifications->isNotEmpty())
@foreach($specifications as $label => $value)
{{ $label }}
{{ $value }}
@endforeach
@else

No additional specifications are currently available.

@endif
@if(!empty($related))

Continue the range

View all products
@foreach($related as $item) @endforeach
@endif
@endsection