{include file="header.tpl" title='Результат поиска' keywords='' description=''}

{fetch_products perPage=1 assign=products section=2 assignPagination=pagination query=$query page=$page seFriendly=true}

<main class="main">

	<div class="flex:col padd-static-140">
		<div class="flex:col-max">

			<div class="bradcrumbs">
				<ul itemscope="" itemtype="http://schema.org/BreadcrumbList">

					<li itemscope="" itemprop="itemListElement" itemtype="http://schema.org/ListItem">
						<a itemprop="item" href="{$SITE_URL}">
							<span itemprop="name">Главная</span>
							<meta itemprop="position" content="1">
						</a>
					</li>

					<li itemscope="" itemprop="itemListElement" itemtype="http://schema.org/ListItem">
						<i itemprop="item">
							<span itemprop="name">Поиск</span>
							<meta itemprop="position" content="2">
						</i>
					</li>

				</ul>
			</div>

		</div>
	</div>

	<section class="flex:col pad-t-50 pad-b-80">
		<div class="flex:col-max">

			<div class="grid:fr-1 g-gap-40">

				<div class="search">

					<form class="search__form">

						<div class="input">
							<input class="input__field" type="text" name="query" value="{$query}" placeholder="Введите ключевое слово или название продукта" data-empty="Обязательно для заполнения">
						</div>

						<button class="btn accent-3 large" >Поиск</button>

					</form>

				</div>



                {if isset($smarty.get.min) && !empty($smarty.get.min)}
                    {assign var=min value=$smarty.get.min}
                {else}
                    {assign var=min value=''}
                {/if}
                {if isset($smarty.get.max) && !empty($smarty.get.max)}
                    {assign var=max value=$smarty.get.max}
                {else}
                    {assign var=max value=''}
                {/if}

                {fetch_products perPage=12 assign=products section=2 minPrice=$min maxPrice=$max query=$query assignPagination=pagination page=$page path=$section.path seFriendly=true}


					<div class="filter">
						<div class="filter__content">
                            {* form filter *}
							<div class="filter__content-ui">
                                {include file="modules/filter.tpl"}
							</div>
                            {* /form filter *}

                            {if !empty($products)}
								<div class="filter__content-cards">
		                            {foreach item=product from=$products name=products key=key}
		                                {include file="items/item-product.tpl" productItem=$product sectionName=$section.name}
		                            {/foreach}
								</div>

		                        {include file="modules/pagination-products.tpl"}
                            {else}
	                            <div class="not-result not-result_js">

		                            <div class="not-result__content">
			                            <div class="not-result__icons">

				                            <svg width="62" height="62" viewBox="0 0 62 62" fill="none" xmlns="http://www.w3.org/2000/svg">
					                            <path d="M29.7077 56.1873C15.1118 56.1873 3.22852 44.304 3.22852 29.7082C3.22852 15.1123 15.1118 3.229 29.7077 3.229C44.3035 3.229 56.1868 15.1123 56.1868 29.7082C56.1868 44.304 44.3035 56.1873 29.7077 56.1873ZM29.7077 7.104C17.2302 7.104 7.10352 17.2565 7.10352 29.7082C7.10352 42.1598 17.2302 52.3123 29.7077 52.3123C42.1852 52.3123 52.3118 42.1598 52.3118 29.7082C52.3118 17.2565 42.1852 7.104 29.7077 7.104Z" fill="#C1A269" />
					                            <path d="M56.834 58.771C56.3432 58.771 55.8524 58.5902 55.4649 58.2027L50.2982 53.0361C49.549 52.2869 49.549 51.0469 50.2982 50.2977C51.0474 49.5485 52.2874 49.5485 53.0365 50.2977L58.2032 55.4644C58.9524 56.2135 58.9524 57.4536 58.2032 58.2027C57.8157 58.5902 57.3249 58.771 56.834 58.771Z" fill="#C1A269" />
				                            </svg>

			                            </div>

			                            <div class="text-tmp color-white title-26 marg-all-10 txt-all-center title-fw-500 txt-accent-5 txt-fw-500">
				                            <h3>По вашему запросу результатов не найдено.</h3>
				                            <p>Проверьте правописание или используйте другое слово или фразу</p>
			                            </div>
		                            </div>

	                            </div>
                            {/if}

						</div>
					</div>

			</div>

		</div>

	</section>

</main>

{* script filter *}
{include file="init/filter.tpl"}
{* /script filter *}

{include file="footer.tpl"}











