@extends('layouts.guest-landing') @section('title', $campaign->title . ' - Products') @section('content')
{{-- Back Navigation --}}
{{ __('landing.back_to_campaigns') }}
{{-- Campaign Header --}}
@if ($campaign->image_path)
{{ $campaign->title }}
@endif

{{ $campaign->title }}

{{ $campaign->description }}

{{-- Campaign Address (if enabled) --}} @if ($campaign->show_address_on_landing_page && $campaign->shippingAddress)
{{ __('landing.shipping_to') }}: {{ $campaign->shippingAddress->nickname ?? $campaign->shippingAddress->organization_name }}
@endif {{-- Campaign Stats if available --}} @if (isset($stats) && $stats)
@if (isset($stats['total_requested']))
{{ $stats['total_requested'] }}
Total Requested
@endif @if (isset($stats['total_donated']))
{{ $stats['total_donated'] }}
Total Donated
@endif @if (isset($stats['total_remaining']))
{{ $stats['total_remaining'] }}
Remaining
@endif @if (isset($stats['completion_percentage']))
{{ number_format($stats['completion_percentage'], 1) }}%
Complete
@endif
@endif
{{-- Products Section --}} @if ($products->count() > 0)
@foreach ($products as $product)
{{-- Product Image --}}
@if ($product->image_url) {{ $product->name }} @else
@endif
{{-- Product Content --}}

{{ $product->name }}

{{-- Price --}} @if ($product->price)

${{ number_format($product->price, 2) }}

@endif {{-- Availability Status --}} @php $availability = $product->availability_info ?? [ 'is_available' => false, 'remaining_quantity' => 0, ]; @endphp
@if ($availability['is_available']) @if ($availability['remaining_quantity'] === null) {{ __('landing.unlimited') }} @else {{ __('landing.limited_quantity', ['quantity' => $availability['remaining_quantity']]) }} @endif @else {{ __('landing.goal_reached') }} @endif
{{-- Progress Bar for Limited Items --}} @if ( $availability['is_available'] && isset($availability['progress_percentage']) && $availability['progress_percentage'] > 0)
Progress {{ number_format($availability['progress_percentage'], 1) }}%
@if (isset($availability['quantity_donated']) && isset($availability['quantity_limit']))
{{ $availability['quantity_donated'] }} of {{ $availability['quantity_limit'] }} donated
@endif
@endif {{-- Add to Cart Form --}} @if ($availability['is_available'] && $campaign->address_id)
@csrf
@elseif(!$campaign->address_id)
Campaign address not configured
@else @endif
@endforeach
@else {{-- No Products Available --}}

{{ $message ?? __('landing.no_products_available') }}

{{ __('landing.check_back_later') }}

@endif
@endsection @push('scripts') @endpush