<?php
/**
 * Archive Template
 *
 * @package Navier_Instruments
 */

get_header();
?>

<div class="archive-header">
    <div class="container">
        <?php
        the_archive_title('<h1 class="page-title">', '</h1>');
        the_archive_description('<div class="archive-description">', '</div>');
        ?>
    </div>
</div>

<div class="container">
    <?php if (have_posts()) : ?>
        <div class="posts-grid">
            <?php
            while (have_posts()) :
                the_post();
                get_template_part('template-parts/content', get_post_type());
            endwhile;
            ?>
        </div>

        <?php
        the_posts_pagination(array(
            'mid_size'  => 2,
            'prev_text' => '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="15 18 9 12 15 6"></polyline></svg>',
            'next_text' => '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="9 18 15 12 9 6"></polyline></svg>',
        ));
        ?>

    <?php else : ?>
        <div class="no-results" style="padding: var(--spacing-4xl) 0; text-align: center;">
            <h2><?php esc_html_e('Nothing Found', 'navier-instruments'); ?></h2>
            <p><?php esc_html_e('It seems we can&rsquo;t find what you&rsquo;re looking for.', 'navier-instruments'); ?></p>
        </div>
    <?php endif; ?>
</div>

<?php
get_footer();
