@extends('layouts.app') @section('title', 'Your Order — AVIOBOOTS') @push('styles') @endpush @section('content')
{{-- Header --}}

Thank you, {{ $order->name }}!

Your order has been placed. We'll keep you updated every step of the way.

{{-- Tracking ID Banner --}}

Your Tracking ID

{{ $order->tracking_id }}

Order #{{ $order->id }}
{{ $order->created_at->format('d M Y · h:i A') }}
{{-- 4-Step Progress Bar --}} @php $steps = [ ['key'=>'pending', 'icon'=>'fa-clock', 'label'=>'Order Placed', 'sub'=>'Awaiting review'], ['key'=>'confirmed', 'icon'=>'fa-hammer', 'label'=>'In Production', 'sub'=>'Crafting your boots'], ['key'=>'shipped', 'icon'=>'fa-truck', 'label'=>'Shipped', 'sub'=>'On the way'], ['key'=>'complete', 'icon'=>'fa-circle-check', 'label'=>'Delivered', 'sub'=>'Enjoy!'], ]; $order_idx = ['pending'=>0,'confirmed'=>1,'shipped'=>2,'complete'=>3]; $cur = $order_idx[$order->status] ?? 0; @endphp
@foreach($steps as $i => $step) @php $isDone = $cur > $i; $isCurrent = $cur === $i; @endphp
{{ $step['label'] }} {{ $step['sub'] }}
@if($i < count($steps) - 1)
@endif @endforeach
{{-- Current status message --}} @php $messages = [ 'pending' => ['icon'=>'fa-clock', 'color'=>'#92400e', 'bg'=>'#fffbeb', 'border'=>'#fde68a', 'title'=>'Order Received!', 'body'=>'Our team has received your order and will confirm it shortly. You\'ll get an email once it\'s confirmed.'], 'confirmed' => ['icon'=>'fa-hammer', 'color'=>'#1e40af', 'bg'=>'#eff6ff', 'border'=>'#bfdbfe', 'title'=>'Your Boots Are Being Crafted!', 'body'=>'Our craftsmen have started working on your order. Every pair is handmade with care — we\'ll notify you when it ships.'], 'shipped' => ['icon'=>'fa-truck', 'color'=>'#065f46', 'bg'=>'#f0fdf4', 'border'=>'#6ee7b7', 'title'=>'Your Order Is On Its Way!', 'body'=>'Your order has been dispatched and is heading to you. Check the shipment details below.'], ]; $msg = $messages[$order->status] ?? $messages['pending']; @endphp

{{ $msg['title'] }}

{{ $msg['body'] }}

{{-- Shipment Details (only when shipped) --}} @if($order->status === 'shipped')

Shipment Details

@if($order->courier) @endif @if($order->shipped_at) @endif
Courier {{ $order->courier }}
Shipped On {{ $order->shipped_at->format('d M Y, h:i A') }}
@if($order->tracking_url)
Track on Courier Website
@endif
@endif {{-- Order Items --}}

Your Items

@foreach($order->items as $it)
{{ $it->product_name }}
{{ $it->product_name }}
Size: {{ $it->size ?? 'N/A' }}  ·  Qty: {{ $it->qty }}
Rs {{ number_format($it->price * $it->qty, 0) }}
@endforeach
Subtotal Rs {{ number_format($order->subtotal, 0) }}
Shipping {{ $order->shipping == 0 ? 'FREE' : 'Rs '.number_format($order->shipping, 0) }}
Total Rs {{ number_format($order->total, 0) }}
{{-- Delivery Address --}} @php $deliveryLocation = trim( $order->city . ($order->state ? ', ' . $order->state : '') . ($order->zip ? ' ' . $order->zip : '') ); @endphp

Delivering To

{{ $order->address }}, {{ $deliveryLocation }}
{{ $order->phone }}

{{-- CTA --}}
Continue Shopping

Questions? Email us at avioboots0@gmail.com

@endsection