<div class="front_page_section front_page_section_woocommerce<?php
	$kicker_scheme = kicker_get_theme_option( 'front_page_woocommerce_scheme' );
	if ( ! empty( $kicker_scheme ) && ! kicker_is_inherit( $kicker_scheme ) ) {
		echo ' scheme_' . esc_attr( $kicker_scheme );
	}
	echo ' front_page_section_paddings_' . esc_attr( kicker_get_theme_option( 'front_page_woocommerce_paddings' ) );
	if ( kicker_get_theme_option( 'front_page_woocommerce_stack' ) ) {
		echo ' sc_stack_section_on';
	}
?>"
		<?php
		$kicker_css      = '';
		$kicker_bg_image = kicker_get_theme_option( 'front_page_woocommerce_bg_image' );
		if ( ! empty( $kicker_bg_image ) ) {
			$kicker_css .= 'background-image: url(' . esc_url( kicker_get_attachment_url( $kicker_bg_image ) ) . ');';
		}
		if ( ! empty( $kicker_css ) ) {
			echo ' style="' . esc_attr( $kicker_css ) . '"';
		}
		?>
>
<?php
	// Add anchor
	$kicker_anchor_icon = kicker_get_theme_option( 'front_page_woocommerce_anchor_icon' );
	$kicker_anchor_text = kicker_get_theme_option( 'front_page_woocommerce_anchor_text' );
if ( ( ! empty( $kicker_anchor_icon ) || ! empty( $kicker_anchor_text ) ) && shortcode_exists( 'trx_sc_anchor' ) ) {
	echo do_shortcode(
		'[trx_sc_anchor id="front_page_section_woocommerce"'
									. ( ! empty( $kicker_anchor_icon ) ? ' icon="' . esc_attr( $kicker_anchor_icon ) . '"' : '' )
									. ( ! empty( $kicker_anchor_text ) ? ' title="' . esc_attr( $kicker_anchor_text ) . '"' : '' )
									. ']'
	);
}
?>
	<div class="front_page_section_inner front_page_section_woocommerce_inner
	<?php
	if ( kicker_get_theme_option( 'front_page_woocommerce_fullheight' ) ) {
		echo ' kicker-full-height sc_layouts_flex sc_layouts_columns_middle';
	}
	?>
			"
			<?php
			$kicker_css      = '';
			$kicker_bg_mask  = kicker_get_theme_option( 'front_page_woocommerce_bg_mask' );
			$kicker_bg_color_type = kicker_get_theme_option( 'front_page_woocommerce_bg_color_type' );
			if ( 'custom' == $kicker_bg_color_type ) {
				$kicker_bg_color = kicker_get_theme_option( 'front_page_woocommerce_bg_color' );
			} elseif ( 'scheme_bg_color' == $kicker_bg_color_type ) {
				$kicker_bg_color = kicker_get_scheme_color( 'bg_color', $kicker_scheme );
			} else {
				$kicker_bg_color = '';
			}
			if ( ! empty( $kicker_bg_color ) && $kicker_bg_mask > 0 ) {
				$kicker_css .= 'background-color: ' . esc_attr(
					1 == $kicker_bg_mask ? $kicker_bg_color : kicker_hex2rgba( $kicker_bg_color, $kicker_bg_mask )
				) . ';';
			}
			if ( ! empty( $kicker_css ) ) {
				echo ' style="' . esc_attr( $kicker_css ) . '"';
			}
			?>
	>
		<div class="front_page_section_content_wrap front_page_section_woocommerce_content_wrap content_wrap woocommerce">
			<?php
			// Content wrap with title and description
			$kicker_caption     = kicker_get_theme_option( 'front_page_woocommerce_caption' );
			$kicker_description = kicker_get_theme_option( 'front_page_woocommerce_description' );
			if ( ! empty( $kicker_caption ) || ! empty( $kicker_description ) || ( current_user_can( 'edit_theme_options' ) && is_customize_preview() ) ) {
				// Caption
				if ( ! empty( $kicker_caption ) || ( current_user_can( 'edit_theme_options' ) && is_customize_preview() ) ) {
					?>
					<h2 class="front_page_section_caption front_page_section_woocommerce_caption front_page_block_<?php echo ! empty( $kicker_caption ) ? 'filled' : 'empty'; ?>">
					<?php
						echo wp_kses( $kicker_caption, 'kicker_kses_content' );
					?>
					</h2>
					<?php
				}

				// Description (text)
				if ( ! empty( $kicker_description ) || ( current_user_can( 'edit_theme_options' ) && is_customize_preview() ) ) {
					?>
					<div class="front_page_section_description front_page_section_woocommerce_description front_page_block_<?php echo ! empty( $kicker_description ) ? 'filled' : 'empty'; ?>">
					<?php
						echo wp_kses( wpautop( $kicker_description ), 'kicker_kses_content' );
					?>
					</div>
					<?php
				}
			}

			// Content (widgets)
			?>
			<div class="front_page_section_output front_page_section_woocommerce_output list_products shop_mode_thumbs">
				<?php
				$kicker_woocommerce_sc = kicker_get_theme_option( 'front_page_woocommerce_products' );
				if ( 'products' == $kicker_woocommerce_sc ) {
					$kicker_woocommerce_sc_ids      = kicker_get_theme_option( 'front_page_woocommerce_products_per_page' );
					$kicker_woocommerce_sc_per_page = count( explode( ',', $kicker_woocommerce_sc_ids ) );
				} else {
					$kicker_woocommerce_sc_per_page = max( 1, (int) kicker_get_theme_option( 'front_page_woocommerce_products_per_page' ) );
				}
				$kicker_woocommerce_sc_columns = max( 1, min( $kicker_woocommerce_sc_per_page, (int) kicker_get_theme_option( 'front_page_woocommerce_products_columns' ) ) );
				echo do_shortcode(
					"[{$kicker_woocommerce_sc}"
									. ( 'products' == $kicker_woocommerce_sc
											? ' ids="' . esc_attr( $kicker_woocommerce_sc_ids ) . '"'
											: '' )
									. ( 'product_category' == $kicker_woocommerce_sc
											? ' category="' . esc_attr( kicker_get_theme_option( 'front_page_woocommerce_products_categories' ) ) . '"'
											: '' )
									. ( 'best_selling_products' != $kicker_woocommerce_sc
											? ' orderby="' . esc_attr( kicker_get_theme_option( 'front_page_woocommerce_products_orderby' ) ) . '"'
												. ' order="' . esc_attr( kicker_get_theme_option( 'front_page_woocommerce_products_order' ) ) . '"'
											: '' )
									. ' per_page="' . esc_attr( $kicker_woocommerce_sc_per_page ) . '"'
									. ' columns="' . esc_attr( $kicker_woocommerce_sc_columns ) . '"'
					. ']'
				);
				?>
			</div>
		</div>
	</div>
</div>
