@extends('layouts.app')

@section('title', 'Corporate Site Settings - Admin Portal')

@section('content')
<div class="bg-slate-900 text-white py-8">
    <div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8">
        <h1 class="font-heading font-extrabold text-2xl">Site Configuration & Global Settings</h1>
    </div>
</div>

<div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-10">
    <div class="bg-white rounded-3xl p-8 shadow-xl border border-slate-100">
        
        <form action="{{ route('admin.settings.update') }}" method="POST" class="space-y-6">
            @csrf

            <div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
                <div>
                    <label class="block text-xs font-bold text-slate-700 uppercase mb-1">Company Name</label>
                    <input type="text" name="company_name" value="{{ $settings['company_name'] }}" required class="w-full px-4 py-3 rounded-xl bg-slate-50 border border-slate-200 text-sm">
                </div>
                <div>
                    <label class="block text-xs font-bold text-slate-700 uppercase mb-1">Support Email</label>
                    <input type="email" name="company_email" value="{{ $settings['company_email'] }}" required class="w-full px-4 py-3 rounded-xl bg-slate-50 border border-slate-200 text-sm">
                </div>
            </div>

            <div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
                <div>
                    <label class="block text-xs font-bold text-slate-700 uppercase mb-1">Company Phone</label>
                    <input type="text" name="company_phone" value="{{ $settings['company_phone'] }}" required class="w-full px-4 py-3 rounded-xl bg-slate-50 border border-slate-200 text-sm">
                </div>
                <div>
                    <label class="block text-xs font-bold text-slate-700 uppercase mb-1">Global WhatsApp Number</label>
                    <input type="text" name="whatsapp_number" value="{{ $settings['whatsapp_number'] }}" required class="w-full px-4 py-3 rounded-xl bg-slate-50 border border-slate-200 text-sm">
                </div>
            </div>

            <div>
                <label class="block text-xs font-bold text-slate-700 uppercase mb-1">Headquarters Office Address</label>
                <input type="text" name="office_address" value="{{ $settings['office_address'] }}" required class="w-full px-4 py-3 rounded-xl bg-slate-50 border border-slate-200 text-sm">
            </div>

            <div>
                <label class="block text-xs font-bold text-slate-700 uppercase mb-1">Hero Title Banner</label>
                <input type="text" name="hero_title" value="{{ $settings['hero_title'] }}" required class="w-full px-4 py-3 rounded-xl bg-slate-50 border border-slate-200 text-sm">
            </div>

            <div>
                <label class="block text-xs font-bold text-slate-700 uppercase mb-1">Hero Subtitle Banner</label>
                <textarea name="hero_subtitle" rows="3" required class="w-full px-4 py-3 rounded-xl bg-slate-50 border border-slate-200 text-sm">{{ $settings['hero_subtitle'] }}</textarea>
            </div>

            <button type="submit" class="w-full py-4 rounded-xl bg-brand-blue text-white font-extrabold text-base hover:bg-brand-darkblue shadow-lg">
                Save Global Settings
            </button>
        </form>

    </div>
</div>
@endsection
