<x-layouts.guest
    title="Create Your Account"
    subtitle="Join Niayarsa for faster checkout, order tracking, and your saved wishlist."
>
    <form method="POST" action="{{ route('register') }}" class="space-y-6">
        @csrf

        <div>
            <x-input-label for="name" value="Full Name" />
            <x-text-input id="name" type="text" name="name" :value="old('name')" required autofocus autocomplete="name" />
            <x-input-error :messages="$errors->get('name')" />
        </div>

        <div>
            <x-input-label for="email" value="Email Address" />
            <x-text-input id="email" type="email" name="email" :value="old('email')" required autocomplete="username" />
            <x-input-error :messages="$errors->get('email')" />
        </div>

        <div>
            <x-input-label for="phone" value="Phone Number (optional)" />
            <x-text-input id="phone" type="tel" name="phone" :value="old('phone')" autocomplete="tel" placeholder="03XX-XXXXXXX" />
            <x-input-error :messages="$errors->get('phone')" />
        </div>

        <div>
            <x-input-label for="password" value="Password" />
            <x-text-input id="password" type="password" name="password" required autocomplete="new-password" />
            <x-input-error :messages="$errors->get('password')" />
        </div>

        <div>
            <x-input-label for="password_confirmation" value="Confirm Password" />
            <x-text-input id="password_confirmation" type="password" name="password_confirmation" required autocomplete="new-password" />
            <x-input-error :messages="$errors->get('password_confirmation')" />
        </div>

        <x-primary-button>Create Account</x-primary-button>
    </form>

    <p class="mt-6 text-center text-sm text-cream/60">
        Already have an account?
        <a href="{{ route('login') }}" class="font-medium text-champagne transition hover:text-champagne-light">
            Sign in
        </a>
    </p>
</x-layouts.guest>
