{{-- ── Search bar ────────────────────────────────────────────────────── --}}
@if($suggestions && count($suggestions))
@foreach($suggestions as $s) @endforeach
@endif
Check Price
@if($result) @if(isset($result['error']))
{{ $result['error'] }}
@else {{-- ── Product header ─────────────────────────────────────────────── --}}

{{ $result['product_name'] }}

Turn14 ID: {{ $result['turn14_id'] }} Part #: {{ $result['part_number'] }} Price source: {{ $result['price_source'] === 'live' ? 'Live from API' : 'Cached in DB' }}
@if($result['ltl_applied']) ⚠ LTL Freight Required @else Standard Freight @endif @if($result['duty_override']) ⚡ Duty Override Active @endif
{{-- ── Two-column layout ───────────────────────────────────────────── --}}
{{-- LEFT: Config + Boxes --}}
{{-- Active Config --}}

Active Config Values

@foreach($result['config_panel'] as $row) @endforeach
{{ $row['label'] }} {{ $row['value'] }}@if($row['override'] ?? false) ↑@endif
{{-- Duty override notice --}} @if($result['duty_override'])
Duty Override Applied
Rate: {{ $result['duty_override']['rate'] }}%
{{ $result['duty_override']['reason'] }}
@endif {{-- Per-box breakdown --}} @if(!empty($result['boxes']))

{{ count($result['boxes']) > 1 ? count($result['boxes']) . ' Boxes / Packages' : 'Dimensions & Weight' }}

@foreach($result['boxes'] as $box)
@if(count($result['boxes']) > 1)
Box {{ $box['box'] }}
@endif
Dimensions{{ $box['dims_in'] }}
Weight{{ $box['weight_lbs'] }}
Actual (kg){{ $box['weight_kg'] }}
Volumetric (kg){{ $box['vol_kg'] }}
Billable (kg) {{ $box['bill_kg'] }} ({{ $box['used'] }})
@endforeach
@endif
{{-- RIGHT: Formula breakdown --}}

Formula Breakdown

@php $currentSection = null; @endphp @foreach($result['steps'] as $step) @if($step['section'] !== $currentSection) @php $currentSection = $step['section']; @endphp @endif @endforeach
{{ $step['section'] }}
{{ $step['label'] }} {{ $step['value'] }} {{ $step['note'] ?? '' }}
{{-- ── Final price card ───────────────────────────────────────────── --}}
Retail Price (Tax Excl.) — stored in DB
R {{ number_format($result['price_excl'], 2) }}
Retail Price (Tax Incl.)
R {{ number_format($result['price_incl'], 2) }}
@if($result['ltl_applied'])
Includes LTL freight surcharge
@endif
USD cost used: ${{ number_format($result['usd_price_used'], 2) }} @if($result['usd_price_used'] != $result['usd_price_cached']) Cached: ${{ number_format($result['usd_price_cached'], 2) }} @endif Source: {{ $result['price_source'] === 'live' ? 'Live API' : 'DB cache' }}
@endif @endif