<?php 
/***
* Products Grid Slider Template
**/
?>
<div id="<?php echo esc_attr($id);?>" class="<?php echo esc_attr( $class );?>">
	<?php if( ! empty( $heading ) ) { ?>
		<div class="section-heading">
			<h2><?php echo esc_html($heading); ?></h2>
			<?php if( $show_view_more_button ){ ?>
				<div class="view-all-btn">
					<a <?php echo implode( ' ', $view_all_btn );?> ><?php echo esc_html( $view_more_button_text );?></a>
				</div>
			<?php } ?>
		</div>
	<?php } ?>
	
	<?php 
	woocommerce_product_loop_start();		
		while ( $query->have_posts() ) {			
			$query->the_post();			
			wc_get_template_part( 'content', 'product' );
		}				
	woocommerce_product_loop_end();
	if($show_pagination) { ?>
		<div class="pls-pagination">
		<?php
			echo paginate_links(
					apply_filters(
						'woocommerce_pagination_args',
						array( // WPCS: XSS ok.
							'base'      => $base,
							'format'    => $format,
							'add_args'  => false,
							'current'   => max( 1, $current ),
							'total'     => $total,
							'prev_text' => esc_html__( 'Previous', 'modave-core' ),
							'next_text' => esc_html__( 'Next', 'modave-core' ),
							'type'      => 'list',
							'end_size'  => 2,
							'mid_size'  => 2,
						)
					)
				);
			
		?>
		</div>
	<?php
	}
	wp_reset_postdata();
	pls_reset_loop();
	?>	
</div>