{{-- Main form column --}}
{{-- Progress steps --}}
@foreach(['Contact', 'Shipping', 'Review', 'Payment'] as $i => $label) @php $stepNum = $i + 1; @endphp
@if($i > 0)
@endif
{{ $stepNum }}
@endforeach
{{-- Step 1: Contact + Billing --}} @if($step === 1)

Contact & Billing

@error('contact_name')

{{ $message }}

@enderror
@error('contact_email')

{{ $message }}

@enderror

Billing Address

@error('bill_address1')

{{ $message }}

@enderror
@error('bill_city')

{{ $message }}

@enderror
@error('bill_province')

{{ $message }}

@enderror
@error('bill_postal_code')

{{ $message }}

@enderror
@error('bill_country')

{{ $message }}

@enderror
@endif {{-- Step 2: Shipping --}} @if($step === 2)

Shipping

{{-- Shipping method selection --}}
@forelse($shippingMethods as $method) @empty

No shipping methods available. Please contact the store.

@endforelse @error('shipping_method_id')

{{ $message }}

@enderror
{{-- Shipping breakdown (shown after method is selected) --}} @if ($shippingResult)
@if ($shippingResult['base_reason'] !== 'no_base_items')
Base shipping @if ($shippingResult['base_reason'] === 'free_all_items') (all items ship free) @elseif ($shippingResult['base_reason'] === 'threshold_met') (order qualifies for free shipping) @endif {{ $shippingResult['base_shipping'] == 0 ? 'Free' : ($settings->currency_symbol ?? '$') . number_format($shippingResult['base_shipping'], 2) }}
@endif @foreach ($shippingResult['own_shipping_lines'] as $line)
{{ $line['name'] }} (ships separately) {{ ($settings->currency_symbol ?? '$') . number_format($line['cost'], 2) }}
@endforeach
@endif {{-- Ship-to address --}}
@if(!$ship_same_as_billing)
@error('ship_name')

{{ $message }}

@enderror
@error('ship_address1')

{{ $message }}

@enderror
@error('ship_city')

{{ $message }}

@enderror
@error('ship_province')

{{ $message }}

@enderror
@error('ship_postal_code')

{{ $message }}

@enderror
@error('ship_country')

{{ $message }}

@enderror
@endif
@endif {{-- Step 3: Review --}} @if($step === 3)

Review Your Order

{{-- Coupon Code --}}
@if($appliedCouponId)
Coupon {{ $couponCode }} applied — {{ $settings->currency_symbol ?? '$' }}{{ number_format($discountAmount, 2) }} off
@else
@if($couponError)

{{ $couponError }}

@endif @endif
{{-- Contact summary --}}

Contact

{{ $contact_name }}

{{ $contact_email }}

@if($contact_phone)

{{ $contact_phone }}

@endif
{{-- Shipping summary --}}

Shipping to

@if($ship_same_as_billing)

{{ $bill_address1 }}, {{ $bill_city }}, {{ $bill_province }} {{ $bill_postal_code }}

@else

{{ $ship_name }}

{{ $ship_address1 }}, {{ $ship_city }}, {{ $ship_province }} {{ $ship_postal_code }}

@endif
@if($paymentError)
{{ $paymentError }}
@endif
@endif {{-- Step 4: Payment --}} @if($step === 4)

Payment

@endif
{{-- Stripe Elements — defined unconditionally so the function exists when Alpine initializes step 4 --}} {{-- Order summary sidebar --}}

Order Summary

@foreach($cartItems as $item)
@if($item['image']) @else 📷 @endif

{{ $item['name'] }}

@if($item['variant_label'])

{{ $item['variant_label'] }}

@endif

Qty: {{ $item['quantity'] }}

{{ $settings->currency_symbol ?? '$' }}{{ number_format($item['price'] * $item['quantity'], 2) }}

@endforeach
Subtotal {{ $settings->currency_symbol ?? '$' }}{{ number_format($subtotal, 2) }}
@if($discountAmount)
Discount ({{ $couponCode }}) -{{ $settings->currency_symbol ?? '$' }}{{ number_format($discountAmount, 2) }}
@endif
Shipping {{ $freight !== null ? ($settings->currency_symbol ?? '$') . number_format($freight, 2) : '—' }}
@if(isset($tax) && $tax > 0)
Tax ({{ number_format($taxRate, 0) }}%) {{ ($settings->currency_symbol ?? '$') . number_format($tax, 2) }}
@if(!empty($settings->tax_number))
Reg: {{ $settings->tax_number }}
@endif @endif
Total {{ $total !== null ? ($settings->currency_symbol ?? '$') . number_format($total, 2) : '—' }}