<x-app-layout>
    <x-slot name="header">
        <h2 class="serif" style="font-size: 1.3rem; color: var(--cream); font-weight: 400; letter-spacing: 0.05em;">
            {{ __('Admin / Create Hero Banner') }}
        </h2>
    </x-slot>

    <style>
        .form-card {
            background: #fff;
            border-radius: 4px;
            border: 1px solid rgba(26,24,20,0.08);
            padding: 3rem;
            max-width: 800px;
            margin: 0 auto;
        }
        .form-group { margin-bottom: 1.5rem; }
        .form-label {
            display: block;
            font-size: 0.7rem;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: var(--warm-gray);
            font-weight: 600;
            margin-bottom: 0.6rem;
        }
        .form-input {
            width: 100%;
            padding: 0.8rem 1rem;
            background: var(--ivory);
            border: 1px solid rgba(26,24,20,0.08);
            border-radius: 2px;
            font-family: 'DM Sans', sans-serif;
            font-size: 0.9rem;
            color: var(--ink);
            transition: border-color 0.2s;
        }
        .form-input:focus {
            outline: none;
            border-color: var(--amber);
        }
        .btn-save {
            background: var(--charcoal);
            color: var(--cream);
            border: none;
            border-radius: 2px;
            padding: 1rem 2rem;
            font-size: 0.8rem;
            letter-spacing: 0.15em;
            text-transform: uppercase;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
        }
        .btn-save:hover {
            background: var(--amber);
            color: var(--charcoal);
        }
    </style>

    <div style="padding: 4rem 0 8rem;">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
            
            <div class="form-card">
                <form action="{{ route('admin.banners.store') }}" method="POST" enctype="multipart/form-data">
                    @csrf

                    <div class="form-group">
                        <label class="form-label">Banner Title</label>
                        <input type="text" name="title" class="form-input" placeholder="e.g. Summer Collection 2026" required>
                    </div>

                    <div class="form-group">
                        <label class="form-label">Subtitle</label>
                        <input type="text" name="subtitle" class="form-input" placeholder="e.g. Discover the elegance">
                    </div>

                    <div class="form-group">
                        <label class="form-label">Description</label>
                        <textarea name="description" rows="3" class="form-input" placeholder="A short description..."></textarea>
                    </div>

                    <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;">
                        <div class="form-group">
                            <label class="form-label">Banner Image</label>
                            <input type="file" name="image" class="form-input">
                            <p style="font-size: 0.7rem; color: var(--mist); margin-top: 0.5rem;">Recommended size: 1920x800px</p>
                        </div>
                        <div class="form-group">
                            <label class="form-label">Display Order</label>
                            <input type="number" name="order" value="0" class="form-input">
                        </div>
                    </div>

                    <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;">
                        <div class="form-group">
                            <label class="form-label">Button Text</label>
                            <input type="text" name="button_text" class="form-input" placeholder="e.g. Shop Now">
                        </div>
                        <div class="form-group">
                            <label class="form-label">Button URL</label>
                            <input type="text" name="button_url" class="form-input" placeholder="e.g. /products">
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="form-label">
                            <input type="checkbox" name="is_active" value="1" checked> 
                            Active (Visible on Slider)
                        </label>
                    </div>

                    <div style="margin-top: 3rem; display: flex; justify-content: space-between; align-items: center;">
                        <a href="{{ route('admin.banners.index') }}" style="color: var(--warm-gray); text-decoration: none; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em;">Cancel</a>
                        <button type="submit" class="btn-save">Create Banner</button>
                    </div>
                </form>
            </div>

        </div>
    </div>
</x-app-layout>
