{{-- د لټون عصري فورمه --}}
<div class="row mt-3 search-section">
    <div class="col-12">
        <div class="search-header text-center">
            <div class="search-image-wrapper">
                <img src="{{ asset('front-end/images/sooma.png') }}" alt="سوما" class="search-logo">
            </div>
            <h5 class="search-tagline">د شعرونو لټون</h5>
        </div>

        <div class="search-card">
            <div class="card-body">
                <form action="{{ route('public.poetry_search') }}" method="GET" class="search-form">
                    <div class="row g-3">
                        {{-- د کټګورۍ ډراپ ډاون --}}
                        <div class="col-md-3">
                            <div class="input-group">
                                <span class="input-group-icon"><i class="fas fa-tag"></i></span>
                                <select name="category_id" class="form-select">
                                    <option value="any">ټولې کټګورۍ</option>
                                    @foreach ($categories ?? [] as $cat)
                                        <option value="{{ $cat->id }}" {{ request('category_id') == $cat->id ? 'selected' : '' }}>
                                            {{ $cat->title_ps }}
                                        </option>
                                    @endforeach
                                </select>
                            </div>
                        </div>

                        {{-- د شاعر ډراپ ډاون --}}
                        <div class="col-md-3">
                            <div class="input-group">
                                <span class="input-group-icon"><i class="fas fa-user"></i></span>
                                <select name="poet_id" class="form-select">
                                    <option value="any">ټول شاعران</option>
                                    @foreach ($poets ?? [] as $p)
                                        <option value="{{ $p->id }}" {{ request('poet_id') == $p->id ? 'selected' : '' }}>
                                            {{ $p->name }}
                                        </option>
                                    @endforeach
                                </select>
                            </div>
                        </div>

                        {{-- د کلیمې لټون --}}
                        <div class="col-md-4">
                            <div class="input-group">
                                <span class="input-group-icon"><i class="fas fa-search"></i></span>
                                <input type="text" name="keyword" class="form-control"
                                       placeholder="د شعر یا کلمې په اساس لټون..."
                                       value="{{ request('keyword') }}">
                            </div>
                        </div>

                        {{-- د لټون تڼۍ --}}
                        <div class="col-md-2">
                            <button type="submit" class="btn btn-search w-100">
                                <i class="fas fa-search"></i> لټون
                            </button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
