<!doctype html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>New Order {{ $order->order_number }}</title>
    </head>
    <body style="margin:0;background:#f7f7f7;color:#222;font-family:Arial,Helvetica,sans-serif;">
        <table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="background:#f7f7f7;padding:24px 12px;">
            <tr>
                <td align="center">
                    <table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="max-width:680px;background:#ffffff;border-radius:18px;overflow:hidden;border:1px solid #ebebeb;">
                        <tr>
                            <td style="padding:28px 28px 18px;">
                                <strong style="font-size:28px;color:#111;">8Stores</strong>
                                <div style="margin-top:8px;color:#717171;font-size:14px;">New order notification for admin.</div>
                            </td>
                        </tr>
                        <tr>
                            <td style="padding:0 28px 28px;">
                                <h1 style="margin:0 0 12px;font-size:26px;line-height:1.2;color:#111;">{{ $order->order_number }}</h1>
                                <p style="margin:0 0 16px;color:#717171;">Customer: {{ $order->customer->name }} ({{ $order->customer->email }})</p>
                                <table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="border-collapse:collapse;">
                                    <tr>
                                        <td style="padding:10px 0;border-bottom:1px solid #ebebeb;">Status</td>
                                        <td align="right" style="padding:10px 0;border-bottom:1px solid #ebebeb;">{{ $order->statusLabel() }}</td>
                                    </tr>
                                    <tr>
                                        <td style="padding:10px 0;border-bottom:1px solid #ebebeb;">Subtotal</td>
                                        <td align="right" style="padding:10px 0;border-bottom:1px solid #ebebeb;">{{ \App\Models\SiteSetting::formatPrice($order->subtotal) }}</td>
                                    </tr>
                                    <tr>
                                        <td style="padding:10px 0;border-bottom:1px solid #ebebeb;">Shipping</td>
                                        <td align="right" style="padding:10px 0;border-bottom:1px solid #ebebeb;">{{ \App\Models\SiteSetting::formatPrice($order->shipping_amount) }}</td>
                                    </tr>
                                    <tr>
                                        <td style="padding:10px 0;font-weight:700;">Total</td>
                                        <td align="right" style="padding:10px 0;font-weight:700;">{{ \App\Models\SiteSetting::formatPrice($order->total) }}</td>
                                    </tr>
                                </table>
                                <h2 style="margin:22px 0 10px;font-size:18px;color:#111;">Items</h2>
                                @foreach ($order->items as $item)
                                    <div style="padding:10px 0;border-top:1px solid #ebebeb;">
                                        <strong>{{ $item->product_name }}</strong>
                                        @if ($item->variant_label)
                                            <div style="color:#717171;font-size:13px;">{{ $item->variant_label }}</div>
                                        @endif
                                        <div style="color:#717171;">Qty {{ $item->quantity }} x {{ \App\Models\SiteSetting::formatPrice($item->unit_price) }}</div>
                                    </div>
                                @endforeach
                            </td>
                        </tr>
                        <tr>
                            <td style="padding:18px 28px;background:#111;color:#fff;font-size:13px;">Open admin panel to review the payment method and approve the order.</td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </body>
</html>
