@extends('store.layouts.app')

@section('title', 'Login')
@section('meta_description', 'Login – ' . ($store_name ?? config('app.name')))

@section('content')
<div class="max-w-md mx-auto px-4 py-12">
    <div class="card p-8">
        <h1 class="text-2xl font-bold text-gray-800 mb-6">Login</h1>
        <form action="{{ route('login') }}" method="POST" class="space-y-4">
            @csrf
            <div>
                <label class="block text-sm font-medium text-gray-700 mb-1">Email</label>
                <input type="email" name="email" value="{{ old('email') }}" required autofocus class="input" placeholder="you@example.com">
                @error('email')<p class="text-red-600 text-sm mt-1">{{ $message }}</p>@enderror
            </div>
            <div>
                <label class="block text-sm font-medium text-gray-700 mb-1">Password</label>
                <input type="password" name="password" required class="input">
                @error('password')<p class="text-red-600 text-sm mt-1">{{ $message }}</p>@enderror
            </div>
            <div class="flex items-center">
                <input type="checkbox" name="remember" id="remember" class="rounded border-gray-300 text-primary focus:ring-primary">
                <label for="remember" class="ml-2 text-sm text-gray-600">Remember me</label>
            </div>
            <button type="submit" class="btn-primary w-full py-3">Login</button>
        </form>
        <p class="mt-4 text-center text-sm text-gray-600">Don't have an account? <a href="{{ route('register') }}" class="text-primary font-semibold hover:underline">Register</a></p>
    </div>
</div>
@endsection
