<?php
/**
 * The template for displaying product content within loops.
 *
 * @package EasySite_Pro
 */

defined( 'ABSPATH' ) || exit;

global $product;

if ( empty( $product ) || ! $product->is_visible() ) {
	return;
}
?>
<li <?php wc_product_class( 'easysite-product-card', $product ); ?>>
	<a href="<?php the_permalink(); ?>" class="easysite-product-link">
		<?php woocommerce_show_product_loop_sale_flash(); ?>
		<div class="easysite-product-image">
			<?php echo woocommerce_get_product_thumbnail( 'easysite-card' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
		</div>
		<h2 class="woocommerce-loop-product__title easysite-product-title"><?php the_title(); ?></h2>
		<?php woocommerce_template_loop_rating(); ?>
		<span class="price easysite-product-price"><?php echo wp_kses_post( $product->get_price_html() ); ?></span>
	</a>
	<div class="easysite-product-actions">
		<?php woocommerce_template_loop_add_to_cart(); ?>
	</div>
</li>
