<?php
/*
Template Name: Search Page
*/
?>

<?php get_template_part('header-top') ?>

<!--
================================
SEZIONE HERO
================================
-->

<section class="sfondo_sfumato contenuto_pagina padding--vh-prodotti animazione--appare--up">
    <div class="container-80">
        <div class="paragrafo">
          <h1 class="animazione--appare--up"><?php printf( esc_html__( 'Hai cercato: %s', 'puraluce' ), '<span class="colore">' . get_search_query() . '</span>' ); ?></h1>
          <div class="linea_diversa"></div>
        </div>
    </div>
</section>

<!--
================================
LOOP CATEGORIE PRODOTTI
================================
-->

<section class="news_home mb-5 animazione--appare--up">
    <div class="container-80">
        <div class="row">

            <?php if(have_posts()) { ?>
            <?php while ( have_posts() ) : the_post(); ?>

            <div class="col-md-6 col-lg-4 col-xl-3 mb-3">


                <a href=" <?php the_permalink(); ?>">
                    <div class="news_item">
                        <div class="slide_news__img">
                            <img src="<?php echo get_the_post_thumbnail_url(get_the_ID(),'large'); ?>" alt="" class="img-fluid">
                        </div>
                        <div class="slide_news__text">
                            <div>
                                <div class="news__title">
                                    <h2><?php the_title() ?></h2>
                                </div>
                            </div>

                            <div class="news__link"><a href="<?php the_permalink() ?>">&mdash;<?php echo __('Scopri di più', 'puraluce'); ?></a></div>
                        </div>
                    </div>
                </a>


            </div>

            <?php endwhile; ?>
            <?php }

            else { ?>
            <div class="text-center">
                <p class="text-center"><?php echo __('Spiacenti, non sono stati trovati risulati per questo termine di ricerca.', 'puraluce'); ?></p>
            </div>
            <?php }

        ?>

        </div>
    </div>
</section>

<div class="cursor-dot-outline"></div>
<div class="cursor-dot"></div>


<?php get_footer(); ?>