<?php
/**
 * Product loop list view
 *
 * @see https://woocommerce.com/document/template-structure/
 * @package WooCommerce\Templates
 */

defined( 'ABSPATH' ) || exit;

global $product;

// Ensure visibility.
if ( empty( $product ) || ! $product->is_visible() ) {
	return;
}
?>

<li <?php wc_product_class( '', $product ); ?>>
	<div class="product-card list-view">

		<div class="product-img">
			<a href="<?php the_permalink(); ?>">
				<?php
				if ( has_post_thumbnail() ) {
					the_post_thumbnail( 'full', array( 'class' => 'img-fluid' ) );
				} else {
					echo wc_placeholder_img( 'full' );
				}
				?>
			</a>
		</div>

		<div class="product-content">

			<span class="price">
				<?php woocommerce_template_loop_price(); ?>
			</span>

			<h3 class="product-title">
				<a href="<?php the_permalink(); ?>">
					<?php the_title(); ?>
				</a>
			</h3>

			<?php
			/**
			 * Hook: woocommerce_after_shop_loop_item_title
			 * @hooked woocommerce_template_loop_rating - 5
			 */
			do_action( 'woocommerce_after_shop_loop_item_title' );
			?>

			<p class="product-text">
				<?php the_excerpt(); ?>
			</p>

			<div class="btn-wrap">
				<?php woocommerce_template_loop_add_to_cart(); ?>
			</div>

		</div>
	</div>
</li>
