{{-- admin/pages/settings/site.blade.php --}}
@extends('admin.layouts.app')
@section('title','Site Settings')
@section('page-title','Site Settings')
@section('content')
<form method="POST" action="{{ route('admin.settings.save') }}">
    @csrf
    <div class="row g-3">
        <div class="col-lg-8">
            <div class="card-admin p-4 mb-3">
                <div class="fw-700 mb-3" style="font-size:.88rem">General</div>
                <div class="row g-3">
                    <div class="col-md-6">
                        <label class="form-label">Site Name</label>
                        <input type="text" name="settings[site_name]" class="form-control" value="{{ $settings['site_name'] ?? '' }}">
                    </div>
                    <div class="col-md-6">
                        <label class="form-label">Contact Email</label>
                        <input type="email" name="settings[contact_email]" class="form-control" value="{{ $settings['contact_email'] ?? '' }}">
                    </div>
                    <div class="col-12">
                        <label class="form-label">Tagline / Footer Tagline</label>
                        <input type="text" name="settings[footer_tagline]" class="form-control" value="{{ $settings['footer_tagline'] ?? '' }}">
                    </div>
                    <div class="col-12">
                        <label class="form-label">Address</label>
                        <textarea name="settings[address]" class="form-control" rows="2">{{ $settings['address'] ?? '' }}</textarea>
                    </div>
                    <div class="col-12">
                        <label class="form-label">Google Maps Embed Code <span style="font-size:.73rem;color:#94a3b8">(paste &lt;iframe&gt; from Google Maps)</span></label>
                        <textarea name="settings[google_maps_embed]" class="form-control" rows="3" style="font-family:monospace;font-size:.78rem">{{ $settings['google_maps_embed'] ?? '' }}</textarea>
                    </div>
                </div>
            </div>
            <div class="card-admin p-4">
                <div class="fw-700 mb-3" style="font-size:.88rem">SEO Defaults</div>
                <div class="mb-3">
                    <label class="form-label">Default Meta Title</label>
                    <input type="text" name="settings[meta_title]" class="form-control" value="{{ $settings['meta_title'] ?? '' }}">
                </div>
                <div class="mb-0">
                    <label class="form-label">Default Meta Description</label>
                    <textarea name="settings[meta_description]" class="form-control" rows="3">{{ $settings['meta_description'] ?? '' }}</textarea>
                </div>
            </div>
        </div>
        <div class="col-lg-4">
            <div class="card-admin p-4">
                <button type="submit" class="btn btn-admin w-100 mb-2">Save Settings</button>
                <div style="font-size:.75rem;color:#94a3b8;text-align:center">Changes take effect immediately</div>
            </div>
        </div>
    </div>
</form>
@endsection
