{extends file='cms_template:csm master'}

{block name='content'}

    <div class="rts-breadcrumb-area one" data-bg-src="{uploads_url}/csm/assets/images/breadcrumb/01.webp">
        <div class="container h-100">
            <div class="breadcrumb-area-wrapper">
                <div class="nav-bread-crumb">
                    <a href="index.html">Home</a>
                    <span><i class="fa-regular fa-chevron-right"></i></span>
                    <a href="/cmss/packages">Packages</a>
                    <span><i class="fa-regular fa-chevron-right"></i></span>
                    <a href="#" class="current">Search Results</a>
                </div>
                <h1 class="title">Search Results</h1>
            </div>
        </div>
    </div>
    <div class="rts-tour-area inner rts-section-gap">
        <div class="container">
            <div class="section-inner">
                <div class="row g-5">
                    <div class="col-lg-12">
                        <div class="filter-small-top-full mb--30">
                            <div class="left-filter">
                                {* Keep the form active on the results page too so they can search again *}
                                {LISEPackages action='search' searchtemplate='default' targetpage='package-search-results'}
                            </div>
                            <div class="right-filter">
                                <span class="filter"><a href="/cmss/packages">Clear Filter</a></span>
                                <div class="form-area">
                                    <div class="custom-select">
                                        <span class="dropdown-icon">
                                            <i class="fa-solid fa-chevron-down"></i>
                                        </span>
                                        <div class="custom-select-trigger">Filter By</div>
                                        <ul class="custom-options" style="height: 0px;">
                                            <li class="option selected" data-value="1">Hiking</li>
                                            <li class="option"><a class=" page" href="/cmss/packages?tt=Self%20Drive">Self Drive</a></li>
                                            <li class="option"><a class=" page" href="/cmss/packages?tt=Small%20Group">Small Group</a></li>
                                            <li class="option"><a class=" page" href="/cmss/packages?tt=Train%20Journey">Train</a></li>
                                            <li class="option"><a class=" page" href="/cmss/packages?tt=Winter">Winter</a></li>
                                            <li class="option"><a class=" page" href="/cmss/packages?tt=Soft%20Package">Soft</a></li>
                                        </ul>
                                        <input type="hidden" name="child" value="1">
                                    </div>
                                </div>
                                <ul class="nav nav-tabs" id="myTab" role="tablist">
                                    <li class="nav-item" role="presentation">
                                        <button class="nav-link active" id="home-tab" data-bs-toggle="tab" data-bs-target="#home" type="button" role="tab"><i class="fa-light fa-grid-2"></i></button>
                                    </li>
                                    <li class="nav-item" role="presentation">
                                        <button class="nav-link" id="profile-tab" data-bs-toggle="tab" data-bs-target="#profile" type="button" role="tab"><i class="fa-light fa-list"></i></button>
                                    </li>
                                </ul>
                            </div>
                        </div>
                       {* TAB 1: GRID VIEW RESULT *}
{* TAB 1: GRID VIEW RESULT *}
{* TAB 1: GRID VIEW RESULT *}
<div class="tab-pane fade show active" id="home" role="tabpanel">aaaaa<h2>SEARCHRESULTS TEMPLATE IS LOADING CORRECTLY</h2>
    <div class="row g-5">
        {if isset($smarty.get.keyword) && $smarty.get.keyword != ""}
            {* Force LISE to run a targeted search filter via the URL query string *}
            {LISEPackages search_query=$smarty.get.keyword summarytemplate='searchresults'}
        {else}
            {* If they landed here directly without a keyword, safely fallback to the native content placeholder block *}
            {content}
        {/if}
    </div>
</div>

{* TAB 2: LIST VIEW RESULT *}
<div class="tab-pane fade" id="profile" role="tabpanel">
    <div class="row g-5">
        <div class="col-lg-12">
            {* If they click list view, we load your list-styled template layout *}
            {LISEPackages summarytemplate='package_summary_2'}
        </div>
    </div>
</div>
                        
                    </div>
                </div>
            </div>
        </div>
    </div>
{/block}