<?php
/**
 * 404 Error Page template.
 *
 * @package shopbar
 */

$err404_shop_url = ( shopbar_is_active_woocommerce() && function_exists( 'wc_get_page_permalink' ) )
	? wc_get_page_permalink( 'shop' )
	: home_url( '/' );

get_header();
?>

<div id="primary" class="content-area">
	<main id="main-content" class="site-main" role="main">

		<section class="err404" aria-labelledby="err404-title">
			<div class="err404__inner container">

				<div class="err404__code" aria-hidden="true">404</div>

				<h1 class="err404__title" id="err404-title">
					<?php esc_html_e( 'Page not found', 'shopbar' ); ?>
				</h1>

				<p class="err404__text">
					<?php esc_html_e( 'The page you are looking for may have been moved, renamed, or is no longer available.', 'shopbar' ); ?>
				</p>

				<div class="err404__search">
					<?php get_search_form(); ?>
				</div>

				<div class="err404__actions">
					<a href="<?php echo esc_url( $err404_shop_url ); ?>" class="err404__btn err404__btn--primary">
						<?php esc_html_e( 'Continue Shopping', 'shopbar' ); ?>
					</a>
					<a href="<?php echo esc_url( home_url( '/' ) ); ?>" class="err404__btn err404__btn--ghost">
						<?php esc_html_e( 'Back to Home', 'shopbar' ); ?>
					</a>
				</div>

			</div>
		</section>

	</main>
</div>

<?php get_footer(); ?>
