Your IP : 216.73.216.162


Current Path : /home/x/b/o/xbodynamge/namtation/wp-content/
Upload File :
Current File : /home/x/b/o/xbodynamge/namtation/wp-content/compatibility.tar

beaver/class-hestia-beaver-builder-compatibility.php000066600000003333151132121210016631 0ustar00<?php
/**
 * Beaver Builder Compatibility class.
 *
 * @package Hestia
 */

/**
 * Class Hestia_Beaver_Builder_Compatibility
 */
class Hestia_Beaver_Builder_Compatibility extends Hestia_Abstract_Main {

	/**
	 * Initialize features.
	 */
	public function init() {
		add_action( 'after_setup_theme', array( $this, 'header_footer_support' ) );
		add_action( 'wp', array( $this, 'header_footer_render' ), 100 );
	}


	/**
	 * Add header and footer support for beaver.
	 *
	 * @since  1.1.24
	 * @access public
	 */
	public function header_footer_render() {

		if ( ! class_exists( 'FLThemeBuilderLayoutData' ) ) {
			return;
		}

		// Get the header ID.
		$header_ids = FLThemeBuilderLayoutData::get_current_page_header_ids();

		// If we have a header, remove the theme header and hook in Theme Builder's.
		if ( ! empty( $header_ids ) ) {
			remove_action( 'hestia_do_header', array( 'Hestia_Header', 'the_header_content' ) );
			remove_action( 'hestia_do_header', array( 'Hestia_Header_Addon', 'hestia_the_header_content' ) );
			add_action( 'hestia_do_header', 'FLThemeBuilderLayoutRenderer::render_header' );
		}

		// Get the footer ID.
		$footer_ids = FLThemeBuilderLayoutData::get_current_page_footer_ids();

		// If we have a footer, remove the theme footer and hook in Theme Builder's.
		if ( ! empty( $footer_ids ) ) {
			remove_action( 'hestia_do_footer', array( 'Hestia_Footer', 'the_footer_content' ) );
			add_action( 'hestia_do_footer', 'FLThemeBuilderLayoutRenderer::render_footer' );
		}
	}

	/**
	 * Add theme support for header and footer.
	 *
	 * @since  1.1.24
	 * @access public
	 */
	public function header_footer_support() {
		add_theme_support( 'fl-theme-builder-headers' );
		add_theme_support( 'fl-theme-builder-footers' );
	}

}
elementor/class-hestia-elementor-compatibility.php000066600000010636151132121210016465 0ustar00<?php
/**
 * Elementor Compatibility class.
 *
 * @package Hestia
 */

/**
 * Class Hestia_Elementor_Compatibility
 */
class Hestia_Elementor_Compatibility extends Hestia_Abstract_Main {

	/**
	 * Initialize features.
	 */
	public function init() {
		add_action( 'after_switch_theme', array( $this, 'set_elementor_flag' ) );

		if ( ! $this->should_load_feature() ) {
			return;
		}

		add_action( 'elementor/frontend/after_enqueue_styles', array( $this, 'enqueue_elementor_styles' ) );
		add_action( 'wp_enqueue_scripts', array( $this, 'page_builder_enqueue' ) );

		add_action( 'wp_ajax_hestia_pagebuilder_hide_frontpage_section', array( $this, 'hestia_pagebuilder_hide_frontpage_section' ) );
		add_action( 'wp_ajax_hestia_elementor_deactivate_default_styles', array( $this, 'hestia_elementor_deactivate_default_styles' ) );

	}

	/**
	 * Section deactivation
	 */
	function hestia_pagebuilder_hide_frontpage_section() {
		$nonce = $_POST['nonce'];
		if ( ! wp_verify_nonce( $nonce, 'hestia-pagebuilder-nonce' ) ) {
			return;
		}
		$section = $_POST['section'];
		if ( ! empty( $section ) ) {
			if ( $section == 'products' ) {
				$theme_mod = esc_html( 'hestia_shop_hide' );
			} else {
				$theme_mod = esc_html( 'hestia_' . $section . '_hide' );
			}
			if ( ! empty( $theme_mod ) ) {
				set_theme_mod( $theme_mod, 1 );
			}
		}
		die();
	}

	/**
	 * Elementor default styles disabling.
	 */
	function hestia_elementor_deactivate_default_styles() {
		$nonce = $_POST['nonce'];
		if ( ! wp_verify_nonce( $nonce, 'hestia-elementor-notice-nonce' ) ) {
			return;
		}
		$reply = $_POST['reply'];
		if ( ! empty( $reply ) ) {
			if ( $reply == 'yes' ) {
				update_option( 'elementor_disable_color_schemes', 'yes' );
				update_option( 'elementor_disable_typography_schemes', 'yes' );
			}
			update_option( 'hestia_had_elementor', 'yes' );
		}
		die();
	}
	/**
	 * Set flag for elementor.
	 */
	public function set_elementor_flag() {
		if ( ! defined( 'ELEMENTOR_VERSION' ) ) {
			update_option( 'hestia_had_elementor', 'no' );
		}
	}

	/**
	 * Enqueue page builder scripts.
	 */
	public function page_builder_enqueue() {
		if ( ( $this->is_beaver_preview() || $this->is_elementor_preview() ) && is_front_page() ) {
			wp_enqueue_script( 'hestia-builder-integration', get_template_directory_uri() . '/assets/js/admin/hestia-pagebuilder.js', array(), HESTIA_VERSION );
			wp_localize_script(
				'hestia-builder-integration', 'hestiaBuilderIntegration', array(
					'ajaxurl'    => admin_url( 'admin-ajax.php' ),
					'nonce'      => wp_create_nonce( 'hestia-pagebuilder-nonce' ),
					'hideString' => esc_html__( 'Disable section', 'hestia' ),
				)
			);
		}

		$had_elementor = get_option( 'hestia_had_elementor' );
		// Ask user if he wants to disable default styling for plugin.
		if ( $had_elementor == 'no' && $this->is_elementor_preview() ) {
			wp_enqueue_script( 'hestia-elementor-notice', get_template_directory_uri() . '/assets/js/admin/hestia-elementor-notice.js', array(), HESTIA_VERSION );
			wp_localize_script(
				'hestia-elementor-notice', 'hestiaElementorNotice', array(
					'ajaxurl' => admin_url( 'admin-ajax.php' ),
					'nonce'   => wp_create_nonce( 'hestia-elementor-notice-nonce' ),
				)
			);
		}
	}

	/**
	 * Enqueue styles for elementor.
	 */
	public function enqueue_elementor_styles() {
		$disabled_color_schemes      = get_option( 'elementor_disable_color_schemes' );
		$disabled_typography_schemes = get_option( 'elementor_disable_typography_schemes' );

		if ( $disabled_color_schemes === 'yes' && $disabled_typography_schemes === 'yes' ) {
			wp_enqueue_style( 'hestia-elementor-style', get_template_directory_uri() . '/assets/css/page-builder-style.css', array(), HESTIA_VERSION );
		}
	}

	/**
	 * Utility to check if feature should be loaded.
	 *
	 * @return bool
	 */
	private function should_load_feature() {
		if ( ! defined( 'ELEMENTOR_VERSION' ) && ! defined( 'FL_BUILDER_VERSION' ) ) {
			return false;
		}

		return true;
	}

	/**
	 * Check if we're in Elementor Preview.
	 *
	 * @return bool
	 */
	function is_elementor_preview() {
		if ( class_exists( 'Elementor\Plugin' ) ) {
			if ( Elementor\Plugin::$instance->preview->is_preview_mode() == true ) {
				return true;
			}
		}

		return false;
	}

	/**
	 * Check if we're in Beaver Builder Preview.
	 *
	 * @return bool
	 */
	function is_beaver_preview() {
		if ( class_exists( 'FLBuilderModel' ) ) {
			if ( FLBuilderModel::is_builder_active() == true ) {
				return true;
			}
		}

		return false;
	}
}
woocommerce/functions.php000066600000033663151132121210011610 0ustar00<?php
/**
 * Functions for WooCommerce which only needs to be used when WooCommerce is active.
 *
 * @package Hestia
 * @since   Hestia 1.0
 */

// Get hooks file.
require_once( 'hooks.php' );

if ( ! function_exists( 'hestia_add_to_cart' ) ) :
	/**
	 * Custom add to cart button for WooCommerce.
	 *
	 * @since Hestia 1.0
	 */
	function hestia_add_to_cart() {
		global $product;

		if ( function_exists( 'method_exists' ) && method_exists( $product, 'get_type' ) ) {
			$prod_type = $product->get_type();
		} else {
			$prod_type = $product->product_type;
		}

		if ( function_exists( 'method_exists' ) && method_exists( $product, 'get_stock_status' ) ) {
			$prod_in_stock = $product->get_stock_status();
		} else {
			$prod_in_stock = $product->is_in_stock();
		}

		if ( $product ) {
			$args     = array();
			$defaults = array(
				'quantity' => 1,
				'class'    => implode(
					' ', array_filter(
						array(
							'button',
							'product_type_' . $prod_type,
							$product->is_purchasable() && $prod_in_stock ? 'add_to_cart_button' : '',
							$product->supports( 'ajax_add_to_cart' ) ? 'ajax_add_to_cart' : '',
						)
					)
				),
			);

			$args = apply_filters( 'woocommerce_loop_add_to_cart_args', wp_parse_args( $args, $defaults ), $product );

			wc_get_template( 'inc/compatibility/woocommerce/add-to-cart.php', $args );
		}
	}
endif;

/**
 * Refresh WooCommerce cart count instantly.
 *
 * @since Hestia 1.0
 */
function hestia_woocommerce_header_add_to_cart_fragment( $fragments ) {
	global $woocommerce;
	ob_start();
	?>

	<a class="cart-contents btn btn-white pull-right" href="<?php echo esc_url( wc_get_cart_url() ); ?>"
			title="<?php esc_attr_e( 'View your shopping cart', 'hestia' ); ?>">
		<i class="fa fa-shopping-cart"></i>
		<?php
		/* translators: %d is number of items */
		printf( _n( '%d item', '%d items', absint( $woocommerce->cart->cart_contents_count ), 'hestia' ), absint( $woocommerce->cart->cart_contents_count ) );
		echo ' - ';
		echo wp_kses(
			$woocommerce->cart->get_cart_total(), array(
				'span' => array(
					'class' => array(),
				),
			)
		);
		?>
	</a>
	<?php
	$fragments['a.cart-contents'] = ob_get_clean();

	return $fragments;
}

/**
 * Change the layout before the shop page main content
 */
function hestia_woocommerce_before_main_content() {

	do_action( 'hestia_before_woocommerce_wrapper' );

	$sidebar_layout = get_theme_mod( 'hestia_page_sidebar_layout', 'full-width' );
	$wrapper_class  = apply_filters( 'hestia_filter_woocommerce_content_classes', 'content-full col-md-12' );
	?>

	<div class="<?php echo hestia_layout(); ?>">
	<div class="blog-post">
	<div class="container">
	<?php if ( is_shop() || is_product_category() ) { ?>
		<div class="before-shop-main">
			<div class="row">
				<?php
				echo '<div class="col-xs-12 ';
				if ( is_active_sidebar( 'sidebar-woocommerce' ) && ! is_singular( 'product' ) && $sidebar_layout !== 'full-width' ) {
					echo 'col-sm-12';
				} else {
					echo 'col-sm-9';
				}
				echo ' col-md-9" >';
				do_action( 'hestia_woocommerce_custom_reposition_left_shop_elements' );
				?>
			</div>
			<?php
			$shop_ordering_class = 'col-xs-12 col-sm-3';

			if ( is_active_sidebar( 'sidebar-woocommerce' ) && ! is_singular( 'product' ) && $sidebar_layout !== 'full-width' ) {
				$shop_ordering_class = 'shop-sidebar-active col-xs-9 col-sm-9';
				?>
				<div class="col-xs-3 col-sm-3 col-md-3 row-sidebar-toggle">
					<span class="hestia-sidebar-open btn btn-border"><i class="fa fa-filter"
								aria-hidden="true"></i></span>
				</div>
				<?php
			}
			?>
			<div class="<?php echo esc_attr( $shop_ordering_class ); ?> col-md-3">
				<?php do_action( 'hestia_woocommerce_custom_reposition_right_shop_elements' ); ?>
			</div>
		</div>
		</div>
	<?php } ?>
	<article id="post-<?php the_ID(); ?>" class="section section-text">
	<div class="row">
	<?php
	if ( $sidebar_layout === 'sidebar-left' ) {
		hestia_shop_sidebar();
	}
	?>
	<div class="<?php echo esc_attr( $wrapper_class ); ?>">
	<?php
}

/**
 * Change the layout after the shop page main content
 */
function hestia_woocommerce_after_main_content() {
	$hestia_page_sidebar_layout = get_theme_mod( 'hestia_page_sidebar_layout', 'full-width' );
	?>
	</div>
	<?php
	if ( $hestia_page_sidebar_layout === 'sidebar-right' ) {
		hestia_shop_sidebar();
	}
	?>
	</div>
	</article>
	</div>
	</div>
	<?php
}

/**
 * Change the layout before each single product listing
 */
function hestia_woocommerce_before_shop_loop_item() {
	echo '<div class="card card-product">';
}

/**
 * Change the layout after each single product listing
 */
function hestia_woocommerce_after_shop_loop_item() {
	echo '</div>';
}

/**
 * Change the layout of the thumbnail on single product listing
 */
function hestia_woocommerce_template_loop_product_thumbnail() {
	$thumbnail = function_exists( 'woocommerce_get_product_thumbnail' ) ? woocommerce_get_product_thumbnail() : '';
	if ( empty( $thumbnail ) && function_exists( 'wc_placeholder_img' ) ) {
		$thumbnail = wc_placeholder_img();
	}
	if ( ! empty( $thumbnail ) ) {
		?>
		<div class="card-image">
			<a href="<?php echo esc_url( get_permalink() ); ?>" title="<?php the_title_attribute(); ?>">
				<?php echo wp_kses_post( $thumbnail ); ?>
			</a>
			<div class="ripple-container"></div>
		</div>
		<?php
	}
}

/**
 * Change the main content for single product listing
 */
function hestia_woocommerce_template_loop_product_title() {
	global $post;
	$current_product        = wc_get_product( get_the_ID() );
	?>
	<div class="content">
		<?php
		$product_categories = get_the_terms( $post->ID, 'product_cat' );
		$i                  = false;
		if ( ! empty( $product_categories ) ) {
			/**
			 * Show only the first $nb_of_cat words. If the value is modified in hestia_shop_category_words filter with
			 * something lower than 0 then it will display all categories.
			 */
			$categories_length = sizeof( $product_categories );
			$nb_of_cat         = apply_filters( 'hestia_shop_category_words', 2 );
			$nb_of_cat         = intval( $nb_of_cat );

			$index = 0;

			if ( $nb_of_cat !== 0 ) {
				echo '<h6 class="category">';
				foreach ( $product_categories as $product_category ) {
					if ( $index < $nb_of_cat || $nb_of_cat < 0 ) {
						$product_cat_id   = $product_category->term_id;
						$product_cat_name = $product_category->name;
						if ( ! empty( $product_cat_id ) && ! empty( $product_cat_name ) ) {
							if ( $i ) {
								echo ' , ';
							}
							echo '<a href="' . esc_url( get_term_link( $product_cat_id, 'product_cat' ) ) . '">' . esc_html( $product_cat_name ) . '</a>';
							$i = true;
						}
						$index ++;
					}
				}
				echo '</h6>';
			}
		}
		?>
		<h4 class="card-title">
			<?php
			/**
			 * Explode title in words by ' ' separator and show only the first 6 words. If the value is modified to -1 or lower in
			 * a function hooked at hestia_shop_title_words, then show the full title
			 */
			$title          = the_title( '', '', false );
			$title_in_words = explode( ' ', $title );
			$title_limit    = apply_filters( 'hestia_shop_title_words', - 1 );
			$title_limit    = intval( $title_limit );
			$limited_title  = $title_limit > - 1 ? hestia_limit_content( $title_in_words, $title_limit, ' ' ) : $title;
			?>
			<a class="shop-item-title-link" href="<?php the_permalink(); ?>"
					title="<?php the_title_attribute(); ?>"><?php echo esc_html( $limited_title ); ?></a>
		</h4>
		<?php
		if ( $post->post_excerpt ) :
			/**
			 * Explode the excerpt in words by ' ' separator and show only the first 60 words. If the value is modified to -1 or lower in
			 * a function hooked at hestia_shop_excerpt_words, then use the normal behavior from woocommece ( show post excerpt )
			 */
			$excerpt_in_words = explode( ' ', $post->post_excerpt );
			$excerpt_limit    = apply_filters( 'hestia_shop_excerpt_words', 60 );
			$excerpt_limit    = intval( $excerpt_limit );
			$limited_excerpt  = $excerpt_limit > - 1 ? hestia_limit_content( $excerpt_in_words, $excerpt_limit, ' ' ) : $post->post_excerpt;
			?>
			<div class="card-description"><?php echo wp_kses_post( apply_filters( 'woocommerce_short_description', $limited_excerpt ) ); ?></div>
		<?php endif; ?>
		<div class="footer">
			<?php
			$product_price = $current_product->get_price_html();
			if ( ! empty( $product_price ) ) {

				echo '<div class="price"><h4>';

				echo wp_kses(
					$product_price, array(
						'span' => array(
							'class' => array(),
						),
						'del'  => array(),
					)
				);

				echo '</h4></div>';

			}
			?>
			<div class="stats">
				<?php hestia_add_to_cart(); ?>
			</div>
		</div>
	</div>
	<?php
}

/**
 * Checkout page
 * Move the coupon fild and message info after the order table
 **/
function hestia_coupon_after_order_table_js() {
	wc_enqueue_js(
		'
		$( $( "div.woocommerce-info, .checkout_coupon" ).detach() ).appendTo( "#hestia-checkout-coupon" );
	'
	);
}

/**
 * Checkout page
 * Add the id hestia-checkout-coupon to be able to Move the coupon fild and message info after the order table
 **/
function hestia_coupon_after_order_table() {
	echo '<div id="hestia-checkout-coupon"></div><div style="clear:both"></div>';
}

/**
 * Function to display sidebar on shop.
 *
 * @since  1.1.24
 * @access public
 */
function hestia_shop_sidebar() {
	$hestia_page_sidebar_layout = get_theme_mod( 'hestia_page_sidebar_layout', 'full-width' );

	$class_to_add = '';
	if ( $hestia_page_sidebar_layout === 'sidebar-right' ) {
		$class_to_add = 'hestia-has-sidebar';
	}

	if ( is_active_sidebar( 'sidebar-woocommerce' ) && ! is_singular( 'product' ) ) {
		?>
		<div class="col-md-3 shop-sidebar-wrapper sidebar-toggle-container">
			<div class="row-sidebar-toggle">
				<span class="hestia-sidebar-close btn btn-border"><i class="fa fa-times" aria-hidden="true"></i></span>
			</div>
			<aside id="secondary" class="shop-sidebar card card-raised <?php echo esc_attr( $class_to_add ); ?>"
					role="complementary">
				<?php dynamic_sidebar( 'sidebar-woocommerce' ); ?>
			</aside><!-- .sidebar .widget-area -->
		</div>
		<?php
	} elseif ( is_customize_preview() && ! is_singular( 'product' ) ) {
		hestia_sidebar_placeholder( $class_to_add, 'sidebar-woocommerce' );
	}
}

/**
 * Remove title on shop main
 *
 * @return bool
 */
function hestia_woocommerce_hide_page_title() {
	return false;
}

/**
 * Reposition breadcrumb, sorting and results count - removing
 */
function hestia_woocommerce_remove_shop_elements() {
	remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20 );
	remove_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 );
	remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 );
	remove_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 );
}

/**
 * Reposition breadcrumb and results count - adding
 */
function hestia_woocommerce_reposition_left_shop_elements() {
	woocommerce_breadcrumb();
	woocommerce_result_count();
}

/**
 * Reposition ordering - adding
 */
function hestia_woocommerce_reposition_right_shop_elements() {
	woocommerce_catalog_ordering();
}

if ( ! function_exists( 'hestia_cart_link_after_primary_navigation' ) ) {
	/**
	 * Cart Link
	 * Displayed a link to the cart including the number of items present and the cart total.
	 *
	 * @since  1.0.0
	 */
	function hestia_cart_link_after_primary_navigation() {
		?>
		<a href="<?php echo esc_url( wc_get_cart_url() ); ?>" title="<?php esc_attr_e( 'View cart', 'hestia' ); ?>"
				class="nav-cart-icon">
			<i class="fa fa-shopping-cart"></i><?php echo trim( ( WC()->cart->get_cart_contents_count() > 0 ) ? '<span>' . WC()->cart->get_cart_contents_count() . '</span>' : '' ); ?></span>
		</a>
		<?php
	}
}

if ( ! function_exists( 'hestia_cart_link_fragment' ) ) {
	/**
	 * Cart Fragments
	 * Ensure cart contents update when products are added to the cart via AJAX
	 *
	 * @param  array $fragments Fragments to refresh via AJAX.
	 *
	 * @return array Fragments to refresh via AJAX.
	 */
	function hestia_cart_link_fragment( $fragments ) {
		global $woocommerce;
		ob_start();
		hestia_cart_link_after_primary_navigation();
		$fragments['.nav-cart-icon'] = ob_get_clean();

		return $fragments;
	}
}

if ( ! function_exists( 'hestia_always_show_live_cart' ) ) {
	/**
	 *  Force WC_Widget_Cart widget to show on cart and checkout pages
	 *  Used for the live cart in header
	 */
	function hestia_always_show_live_cart() {
		return false;
	}
}

/**
 * Add before cart totals code for card.
 */
function hestia_woocommerce_before_cart_totals() {
	echo '<div class="card card-raised"><div class="content">';
}

/**
 * Add after cart totals code for card.
 */
function hestia_woocommerce_after_cart_totals() {
	echo '</div></div>';
}


/**
 * Add compatibility with WooCommerce Product Images customizer controls.
 *
 * Because there are no filters in WooCommerce to change the default values of those controls,
 * we have to update those controls in order to have the same image size as it was until now.
 * This function runs only once to update those controls.
 *
 * Even if there were filters, woocommerce does update_options in their plugin so if we change
 * the defaults it's equal with 0.
 */
function hestia_woocommerce_product_images_compatibility() {
	$execute = get_option( 'hestia_update_woocommerce_customizer_controls', false );
	if ( $execute !== false ) {
		return;
	}

	update_option( 'woocommerce_thumbnail_cropping', 'custom' );
	update_option( 'woocommerce_thumbnail_cropping_custom_width', '23' );
	update_option( 'woocommerce_thumbnail_cropping_custom_height', '35' );

	if ( class_exists( 'WC_Regenerate_Images' ) ) {
		$regenerate_obj = new WC_Regenerate_Images();
		$regenerate_obj::init();
		if ( method_exists( $regenerate_obj, 'maybe_regenerate_images' ) ) {
			$regenerate_obj::maybe_regenerate_images();
		} elseif ( method_exists( $regenerate_obj, 'maybe_regenerate_images_option_update' ) ) {
			// Force woocommerce 3.3.1 to regenerate images
			$regenerate_obj::maybe_regenerate_images_option_update( 1, 2, '' );
		}
	}
	update_option( 'hestia_update_woocommerce_customizer_controls', true );
}

add_action( 'after_setup_theme', 'hestia_woocommerce_product_images_compatibility' );
woocommerce/hooks.php000066600000011334151132121210010712 0ustar00<?php
/**
 * Hooks for WooCommerce which only needs to be used when WooCommerce is active.
 *
 * @package Hestia
 * @since Hestia 1.0.2
 */

/**
 * Layout for the main content of shop page
 *
 * @see  hestia_woocommerce_before_main_content()
 * @see  hestia_woocommerce_after_main_content()
 */
remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10 );  /* Remove the sidebar */
add_action( 'woocommerce_before_main_content', 'hestia_woocommerce_before_main_content', 10 );
add_action( 'woocommerce_after_main_content', 'hestia_woocommerce_after_main_content', 9 );

/* Remove Related Products and move it below product.*/
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20 );
add_action( 'woocommerce_after_single_product', 'woocommerce_output_related_products', 20 );

/* Remove title on shop main */
add_filter( 'woocommerce_show_page_title', 'hestia_woocommerce_hide_page_title' );

/**
 * Layout for each product content on the shop page
 *
 * @see hestia_woocommerce_template_loop_product_thumbnail()
 * @see hestia_woocommerce_before_shop_loop_item()
 * @see hestia_woocommerce_after_shop_loop_item()
 * @see hestia_woocommerce_template_loop_product_title()
 */
add_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 20 );

remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10 ); /* Remove the default thumbnail */
add_action( 'woocommerce_before_shop_loop_item_title', 'hestia_woocommerce_template_loop_product_thumbnail', 10 );

remove_action( 'woocommerce_before_shop_loop_item', 'woocommerce_template_loop_product_link_open', 10 ); /* Remove unused link */
add_action( 'woocommerce_before_shop_loop_item', 'hestia_woocommerce_before_shop_loop_item', 10 );

remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_product_link_close', 5 ); /* Remove unused link */
add_action( 'woocommerce_after_shop_loop_item', 'hestia_woocommerce_after_shop_loop_item', 20 );

remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart' ); /* Remove default add to cart on single product */
remove_action( 'woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 10 ); /* Remove default product title on single product */
remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5 ); /* Remove default rating on single product */
remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 ); /* Remove default price on single product */
add_action( 'woocommerce_shop_loop_item_title', 'hestia_woocommerce_template_loop_product_title', 10 );

remove_action( 'woocommerce_before_single_product', 'wc_print_notices', 10 );
add_action( 'woocommerce_before_single_product_summary', 'wc_print_notices', 10 ); /* Move notices position */

/* Move breadcrumbs on the single page */
if ( is_single( 'product' ) ) {
	remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0 );
}
add_action( 'woocommerce_before_single_product_summary', 'woocommerce_breadcrumb', 10, 0 );


add_filter( 'woocommerce_add_to_cart_fragments', 'hestia_woocommerce_header_add_to_cart_fragment' ); /* Ensure cart contents update when products are added to the cart via AJAX ) */

/**
 * Checkout page
 *
 * @see hestia_coupon_after_order_table_js()
 * @see hestia_coupon_after_order_table()
 */
add_action( 'woocommerce_before_checkout_form', 'hestia_coupon_after_order_table_js' );
add_action( 'woocommerce_checkout_order_review', 'hestia_coupon_after_order_table' );

/**
 * Reposition breadcrumb, sorting and results count
 */
add_action( 'woocommerce_before_main_content', 'hestia_woocommerce_remove_shop_elements' );
add_action( 'hestia_woocommerce_custom_reposition_left_shop_elements', 'hestia_woocommerce_reposition_left_shop_elements' );
add_action( 'hestia_woocommerce_custom_reposition_right_shop_elements', 'hestia_woocommerce_reposition_right_shop_elements' );

/**
 * Remove category on single product
 */
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 );

/**
 * Ensure cart contents update when products are added to the cart via AJAX
 */
add_filter( 'woocommerce_add_to_cart_fragments', 'hestia_cart_link_fragment' );

/**
 * Reposition Cross Sells after Cart Totals
 */
remove_action( 'woocommerce_cart_collaterals', 'woocommerce_cross_sell_display' );
add_action( 'woocommerce_after_cart', 'woocommerce_cross_sell_display' );

/**
 * Add before and after cart totals code for card.
 */
add_action( 'woocommerce_before_cart_totals', 'hestia_woocommerce_before_cart_totals', 1 );
add_action( 'woocommerce_after_cart_totals', 'hestia_woocommerce_after_cart_totals', 1 );
woocommerce/add-to-cart.php000066600000001605151132121210011666 0ustar00<?php
/**
 * Custom add to cart for the homepage shop section.
 *
 * @package Hestia
 * @since Hestia 1.0
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

global $product;

if ( function_exists( 'method_exists' ) && method_exists( $product, 'get_id' ) ) {
	$prod_id = $product->get_id();
} else {
	$prod_id = $product->id;
}

echo apply_filters(
	'woocommerce_loop_add_to_cart_link',
	sprintf(
		'<a rel="nofollow" href="%1$s" data-quantity="%2$s" data-product_id="%3$s" data-product_sku="%4$s" class="%5$s btn btn-just-icon btn-simple btn-default" title="%6$s"><i rel="tooltip" data-original-title="%6$s" class="fa fa-cart-plus"></i></a>',
		esc_url( $product->add_to_cart_url() ),
		esc_attr( isset( $quantity ) ? $quantity : 1 ),
		esc_attr( $prod_id ),
		esc_attr( $product->get_sku() ),
		esc_attr( isset( $class ) ? $class : 'button' ),
		esc_attr( $product->add_to_cart_text() )
	),
	$product
);
max-mega-menu/functions.php000066600000007163151132121210011723 0ustar00<?php
/**
 * Functions for Max Mega Menu which only needs to be used when Max Mega Menu is active.
 *
 * @package Hestia
 * @since Hestia 1.0
 */
/**
 * Max Mega Menu Hestia Compatibility
 **/
function megamenu_add_theme_hestia_max_menu( $themes ) {
	$themes['hestia_max_menu'] = array(
		'title'                                    => 'Hestia',
		'menu_item_link_height'                    => '50px',
		'menu_item_align'                          => 'right',
		'container_background_from'                => 'rgba(255, 255, 255, 0)',
		'container_background_to'                  => 'rgba(255, 255, 255, 0)',
		'menu_item_background_hover_from'          => 'rgba(255, 255, 255, 0.1)',
		'menu_item_background_hover_to'            => 'rgba(255, 255, 255, 0.1)',
		'menu_item_link_font_size'                 => '12px',
		'menu_item_link_color'                     => '#555',
		'menu_item_link_color_hover'               => '#e91e63',
		'menu_item_highlight_current'              => 'off',
		'panel_background_from'                    => 'rgb(255, 255, 255)',
		'panel_background_to'                      => 'rgb(255, 255, 255)',
		'panel_header_font_size'                   => '12px',
		'panel_header_font_weight'                 => 'normal',
		'panel_header_border_color'                => '#555',
		'panel_font_size'                          => '12px',
		'panel_font_color'                         => 'rgb(49, 49, 49)',
		'panel_font_color_hover'                   => '#e91e63',
		'panel_font_family'                        => 'inherit',
		'panel_second_level_font_color'            => 'rgb(49, 49, 49)',
		'panel_second_level_font_color_hover'      => '#e91e63',
		'panel_second_level_text_transform'        => 'none',
		'panel_second_level_font'                  => 'inherit',
		'panel_second_level_font_size'             => '12px',
		'panel_second_level_font_weight'           => 'normal',
		'panel_second_level_font_weight_hover'     => 'normal',
		'panel_second_level_text_decoration'       => 'none',
		'panel_second_level_text_decoration_hover' => 'none',
		'panel_second_level_padding_left'          => '20px',
		'panel_second_level_border_color'          => '#555',
		'panel_third_level_font_color'             => 'rgb(49, 49, 49)',
		'panel_third_level_font_color_hover'       => '#e91e63',
		'panel_third_level_font'                   => 'inherit',
		'panel_third_level_font_size'              => '12px',
		'panel_third_level_padding_left'           => '20px',
		'flyout_background_from'                   => 'rgb(255, 255, 255)',
		'flyout_background_to'                     => 'rgb(255, 255, 255)',
		'flyout_background_hover_from'             => 'rgb(255, 255, 255)',
		'flyout_background_hover_to'               => 'rgb(255, 255, 255)',
		'flyout_link_size'                         => '12px',
		'flyout_link_color'                        => 'rgb(49, 49, 49)',
		'flyout_link_color_hover'                  => '#e91e63',
		'flyout_link_family'                       => 'inherit',
		'responsive_breakpoint'                    => '768px',
		'resets'                                   => 'on',
		'toggle_background_from'                   => '#222',
		'toggle_background_to'                     => '#222',
		'toggle_font_color'                        => 'rgb(102, 102, 102)',
		'mobile_background_from'                   => 'rgb(255, 255, 255)',
		'mobile_background_to'                     => 'rgb(255, 255, 255)',
		'mobile_menu_item_link_font_size'          => '12px',
		'mobile_menu_item_link_color'              => 'rgb(102, 102, 102)',
		'mobile_menu_item_link_text_align'         => 'left',
	);
	return $themes;
}
add_filter( 'megamenu_themes', 'megamenu_add_theme_hestia_max_menu' );
child-themes/customizer/class-hestia-child-compat-customizer.php000066600000004272151132121210021151 0ustar00<?php
/**
 * Customizer compatibility for Orfeo Child Theme
 *
 * @package Hestia
 */

/**
 * Class Hestia_Child_Compat_Customizer
 */
class Hestia_Child_Compat_Customizer extends Hestia_Register_Customizer_Controls {

	/**
	 * Run init only if Orfeo is installed
	 */
	public function init() {
		if ( wp_get_theme()->Name === 'Orfeo' || wp_get_theme()->Name === 'Orfeo Pro' ) {
			add_action( 'customize_register', array( $this, 'register_controls_callback' ), 100 );
		}
	}

	/**
	 * Implement abstract from parent.
	 */
	public function add_controls() {
	}

	/**
	 * Change controls from child-theme.
	 */
	public function change_controls() {
		$this->change_customizer_object( 'control', 'orfeo_big_title_second_button_text', 'section', 'sidebar-widgets-sidebar-big-title' );
		$this->change_customizer_object( 'control', 'orfeo_big_title_second_button_text', 'priority', 40 );
		$this->change_customizer_object( 'control', 'orfeo_big_title_second_button_link', 'section', 'sidebar-widgets-sidebar-big-title' );
		$this->change_customizer_object( 'control', 'orfeo_big_title_second_button_link', 'priority', 45 );
		$this->change_customizer_object(
			'control', 'hestia_slider_tabs', 'controls', array(
				'slider' => array(
					'hestia_slider_type' => array(
						'image'    => array(
							'hestia_big_title_background',
							'hestia_big_title_title',
							'hestia_big_title_text',
							'hestia_big_title_button_text',
							'hestia_big_title_button_link',
							'orfeo_big_title_second_button_text',
							'orfeo_big_title_second_button_link',
						),
						'parallax' => array(
							'hestia_parallax_layer1',
							'hestia_parallax_layer2',
							'hestia_big_title_title',
							'hestia_big_title_text',
							'hestia_big_title_button_text',
							'hestia_big_title_button_link',
							'orfeo_big_title_second_button_text',
							'orfeo_big_title_second_button_link',

						),
					),
				),
				'extra'  => array(
					'hestia_slider_alignment' => array(
						'left'   => array(
							'hestia_big_title_widgets_title',
							'widgets',
						),
						'center' => array(),
						'right'  => array(
							'hestia_big_title_widgets_title',
							'widgets',
						),
					),
				),
			)
		);

	}

}
child-themes/views/class-hestia-child-compat.php000066600000004653151132121210015703 0ustar00<?php
/**
 * Child theme compatibility.
 *
 * @package Hestia
 */

/**
 * Class Hestia_Child_Compat
 */
class Hestia_Child_Compat extends Hestia_Abstract_Main {
	/**
	 * Add all the hooks necessary.
	 */
	public function init() {

		if ( wp_get_theme()->Name === 'Orfeo' || wp_get_theme()->Name === 'Orfeo Pro' ) {
			add_action( 'wp_enqueue_scripts', array( $this, 'add_orfeo_inline_styles' ) );
		}
	}

	/**
	 * Add inline styles for Orfeo
	 */
	public function add_orfeo_inline_styles() {
		wp_add_inline_style( apply_filters( 'hestia_orfeo_inline_style_handle', 'hestia_style' ), $this->orfeo_inline_style() );
	}

	/**
	 * Orfeo inline style
	 */
	private function orfeo_inline_style() {

		$custom_css = '';

		/* When Home is Blog (Your lastest posts) make background color white */
		$custom_css .= '
			.home.blog .hestia-blogs {
				background-color: #fff !important;
			}
		';

		/* Limit notification width on WooCommerce Checkout Page */
		$custom_css .= '
			.woocommerce-checkout #hestia-checkout-coupon .woocommerce-message,
			.woocommerce-checkout #hestia-checkout-coupon .woocommerce-error {
				margin-left: auto;
				margin-right: auto;
			}
		';

		/**
		 * Remove box shadow from all buttons
		 * Add opacity 0.75 on buttons hover
		 */
		$custom_css .= '
			.btn,
			button,
			.button {
				box-shadow: none !important;
			}
			
			.btn:hover,
			button:hover,
			.button:hover {
				opacity: 0.75;
			}
		';

		/* Align button buttons in Big Title section */
		$custom_css .= '
			.carousel .buttons .btn-primary + .btn-right {
				margin-left: 15px;
			}		
			.carousel .buttons .btn,
			.carousel .buttons .btn-right {
				margin: 15px;
			}
		';

		/* Style Big Title Section because .header class is not its wrapper anymore */
		$custom_css .= '
			.carousel .hestia-big-title-content .hestia-title {
				font-weight: 800;
			}
			.carousel .hestia-big-title-content .sub-title {
				font-family: inherit;
				font-size: 19px;
				font-weight: 300;
				line-height: 26px;
				margin: 0 0 8px;
			}
			.carousel .hestia-big-title-content .buttons .btn,
			.carousel .hestia-big-title-content .buttons .btn-right {
				border-radius: 30px;
				font-family: inherit;
				font-size: 14px;
				font-weight: 600;
				line-height: 24px;
				padding: 11px 30px;
			}
			.carousel .hestia-big-title-content .buttons .btn-right {
				background-color: transparent;
				border: 2px solid #fff;
				padding: 9px 28px;
			}
		';

		return $custom_css;
	}

}
wc/_woocommerce-animation.scss000066600000000173151135441770012522 0ustar00/**
 * _animation.scss
 * Custom WooCommerce Animations.
 */
@keyframes spin {
	100% {
		transform: rotate( 360deg );
	}
}
wc/_woocommerce-main.scss000066600000023711151135441770011472 0ustar00/**
 * woocommerce.scss
 * Governs the general look and feel of WooCommerce sections of stores using themes that do not
 * integrate with WooCommerce specifically.
 */


/**
 * Global styles
 */

p.demo_store,
.woocommerce-store-notice {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    margin: 0;
    width: 100%;
    font-size: 1em;
    padding: 1em 0;
    text-align: center;
    background-color: $primary;
    color: $primarytext;
    z-index: 99998;
    box-shadow: 0 1px 1em rgba(0, 0, 0, 0.2);
    display: none;

    a {
        color: $primarytext;
        text-decoration: underline;
    }
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    height: 1px;
    overflow: hidden;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.admin-bar p.demo_store {
    top: 32px;
}

/**
 * Utility classes
 */
.clear {
    clear: both;
}

/**
 * Main WooCommerce styles
 */

/**
* Quantity input
 */
.input-qty-pm {
    border-radius: 1px;
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    border: 1px solid #E5E5E5;
    background: #f2f2f2;
    color: inherit;
    input, input[type="text"] {
        box-shadow: none !important;
        border-radius: 0px;
        border-top: none;
        border-bottom: none;
    }
    .input-pm-act {
        text-align: center;
        line-height: 2.2em;
        min-height: 2.6em;
        padding: 0px 0.2em;
        min-width: 1.5em;
        cursor: pointer;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        box-shadow: none;
        font-weight: 400;
        background: #f9f9f9;
        &:hover {
            background: #f0f0f0;
            color: inherit;
        }
    }
}


.woocommerce {
    .blockUI.blockOverlay {
        position: relative;
        z-index: 35 !important;
        @include loader();
    }

    .loader {
        @include loader();
    }

    small.note {
        display: block;
        color: $subtext;
        font-size: 0.857em;
        margin-top: 10px;
    }

    .woocommerce-breadcrumb {
        @include clearfix();
        margin: 0 0 1.5em;
        padding: 0;
        color: $subtext;
        a {
            color: $subtext;
        }
    }

    .quantity .qty {
        width: 3em;
        text-align: center;
    }


    nav.woocommerce-pagination {
        text-align: center;

        ul {
            display: inline-block;
            white-space: nowrap;
            padding: 0;
            clear: both;
            border: 1px solid darken( $secondary, 10% );
            border-right: 0;
            margin: 1px;

            li {
                border-right: 1px solid darken( $secondary, 10% );
                padding: 0;
                margin: 0;
                float: left;
                display: inline;
                overflow: hidden;

                a,
                span {
                    margin: 0;
                    text-decoration: none;
                    padding: 0;
                    line-height: 1;
                    font-size: 1em;
                    font-weight: normal;
                    padding: 0.5em;
                    min-width: 1em;
                    display: block;
                }

                span.current,
                a:hover,
                a:focus {
                    background: $secondary;
                    color: darken( $secondary, 40% );
                }
            }
        }
    }


    p.woocommerce-shipping-contents {
        margin: 0;
    }

}

.woocommerce-no-js {
    form.woocommerce-form-login,
    form.woocommerce-form-coupon {
        display: block !important;
    }
    .woocommerce-form-login-toggle,
    .woocommerce-form-coupon-toggle,
    .showcoupon {
        display: none !important;
    }
}

.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    padding: 1em 2em 1em 3.5em;
    margin: 0 auto 2em;
    position: relative;
    background-color: lighten($secondary, 5%);
    border-top: 3px solid $primary;
    color: $secondarytext;
    list-style: none outside;
    @include clearfix();
    width: auto;
    word-wrap: break-word;

    &::before {
        font-family: 'WooCommerce';
        content: '\e028';
        display: inline-block;
        position: absolute;
        top: 1em;
        left: 1.5em;
    }

    .button {
        float: right;
    }

    li {
        list-style: none outside !important; // Required for default theme compatibility
        padding-left: 0 !important; // Required for default theme compatibility
        margin-left: 0 !important; // Required for default theme compatibility
    }

}

.woocommerce-message {
    border-top-color: #8fae1b;
    &::before {
        content: '\e015';
        color: #8fae1b;
    }
}

.woocommerce-info {
    border-top-color: #1e85be;
    &::before {
        color: #1e85be;
    }
}

.woocommerce-error {
    border-top-color: #b81c23;
    &::before {
        content: '\e016';
        color: #b81c23;
    }
}




/**
 * Tables
 */
table.shop_attributes {
    border: 0;
    border-top: 1px dotted rgba(0, 0, 0, 0.1);
    margin-bottom: 1.618em;
    width: 100%;

    th {
        width: 150px;
        font-weight: 600;
        padding: 1em;
        border-top: 0;
        border-bottom: 1px dotted rgba(0, 0, 0, 0.1);
        margin: 0;
        line-height: 1.5;
    }

    td {
        font-style: italic;
        padding: 1em;
        border-top: 0;
        border-bottom: 1px dotted rgba(0, 0, 0, 0.1);
        margin: 0;
        line-height: 1.5;

        p {
            margin: 0;
            padding: 0px 0 10px 0px;
            &:last-child {
                padding-bottom: 0;
            }
        }
    }

    //tr:nth-child(even) td,
    //tr:nth-child(even) th {
    //    background: rgba(0, 0, 0, 0.025);
    //}

    tbody tr:nth-child(2n) td {
        background: #fafafa;
    }
}

table.shop_table {
    margin: 0 -1px 24px 0;
    text-align: left;
    width: 100%;
    border-collapse: separate;
    border-collapse: collapse;

    thead {
        tr {
            th {
                border-bottom: 2px solid $color_border;
                color: #252525;
            }
        }
    }

    tfoot {
        tr {
            th {
                color: #252525;
            }
        }
    }

    th {
        font-weight: 600;
        padding: 9px 12px;
        background: transparent;
    }

    td {
        border-top: 1px solid $color_border;
        padding: 10px 10px;
        vertical-align: middle;
        background: transparent;
        small {
            font-weight: normal;
        }
    }

    tr:nth-child(2n) {
        td {
            background: transparent;
        }
    }

    tbody:first-child tr:first-child {
        th,
        td {
            border-top: 0;
        }
    }

    tfoot {

        td,th {
            border-top: 1px solid $color_border;
            vertical-align: middle;
        }
        tr:first-of-type {
            td, th {
                border-width: 2px;
            }
        }
    }
}

table.my_account_orders {
    font-size: 0.85em;

    th,
    td {
        padding: 4px 8px;
        vertical-align: middle;
    }

    .button {
        white-space: nowrap;
    }

    .order-actions {
        text-align: right;

        .button {
            margin: 0.125em 0 0.125em 0.25em;
        }
    }
}

table.woocommerce-MyAccount-downloads {
    td,
    th {
        vertical-align: top;
        text-align: center;

        &:first-child {
            text-align: left;
        }
        &:last-child {
            text-align: left;
        }
        .woocommerce-MyAccount-downloads-file::before {
            content: '\2193';
            display: inline-block;
        }
    }
}

td.product-name {
    dl.variation, .wc-item-meta {
        list-style: none outside;

        dt, .wc-item-meta-label {
            float: left;
            clear: both;
            margin-right: .25em;
            display: inline-block;
            list-style: none outside;
        }

        dd {
            margin: 0;
        }

        p,
        &:last-child {
            margin-bottom: 0;
        }
    }

    p.backorder_notification {
        font-size: 0.83em;
    }
}

td.product-quantity {
    min-width: 80px;
}

/**
 * Right to left styles
 */
.rtl.woocommerce .price_label,
.rtl.woocommerce .price_label span {
    /* rtl:ignore */
    direction: ltr;
    unicode-bidi: embed;
}

/**
 * Account page
 */
.woocommerce-account {
    .woocommerce {
        @include clearfix();
    }

    .addresses .title {
        @include clearfix();

        h3 {
            float: left;
        }

        .edit {
            float: right;
        }
    }

    ol.commentlist.notes li.note {
        p.meta {
            font-weight: 600;
            margin-bottom: 0;
        }

        .description p:last-child {
            margin-bottom: 0;
        }
    }
    ul.digital-downloads {
        margin-left: 0;
        padding-left: 0;

        li {
            list-style: none;
            margin-left: 0;
            padding-left: 0;

            &::before {
                @include iconbefore( '\e00a' );
            }

            .count {
                float: right;
            }
        }
    }
}


.woocommerce-terms-and-conditions {
    border: 1px solid rgba(0,0,0,.2);
    box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
    background: rgba(0,0,0,.05);
}

.woocommerce-invalid {
    #terms {
        outline: 2px solid red;
        outline-offset: 2px;
    }
}

/**
 * Password strength meter
 */
.woocommerce-password-strength {
    text-align: center;
    font-weight: 600;
    padding: 3px 0.5em;
    font-size: 1em;

    &.strong {
        background-color: #c1e1b9;
        border-color: #83c373;
    }

    &.short {
        background-color: #f1adad;
        border-color: #e35b5b;
    }

    &.bad {
        background-color: #fbc5a9;
        border-color: #f78b53;
    }

    &.good {
        background-color: #ffe399;
        border-color: #ffc733;
    }
}

.woocommerce-password-hint {
    margin: 0.5em 0 0;
    display: block;
}


wc/_wc-widgets.scss000066600000014472151135441770010312 0ustar00/*
* General WC widgets
 */

.product_list_widget {
    list-style: none outside;
    padding: 0;
    margin: 0;
    .wc-product-name, .quantity {
        display: block;
    }
    .reviewer {
        font-size: 0.72em;
        position: relative;
        top: -4px;
        text-transform: uppercase;
    }
    li {
        margin: 0;
        list-style: none;
        position: relative;
        padding-left: 0px;
        display: block;
        padding-bottom: 12px;
        margin-bottom: 12px !important;
        border-bottom: 1px solid $color_border;
        &:last-child {
            border-bottom: none;
            margin-bottom: 0 !important;
            padding-bottom: 0 !important;
        }
        &.has_thumbnail {
            .widget-product-item {
                display: flex;
                align-items: flex-start;
            }
            .media-info {
                flex-basis: 60px;
            }

            .tex-info {
                flex-basis: calc( 100% - 60px );
                padding-left: 15px;
            }
        }

        a {
            display: block;
            line-height: 1.2;
            text-decoration: none;
            &:hover {
                text-decoration: none;
            }
        }
        .product-title {
            display: block;
        }
        .amount {
            font-size: 0.9em;
            margin-top: 4px;
        }

        img {
            width: 100%;
            height: auto;
            box-shadow: none;
            &:hover {
                opacity: 0.8;
            }
        }

        dl {
            margin: 0;
            padding-left: 1em;
            border-left: 2px solid rgba(0, 0, 0, 0.1);
            @include clearfix();

            dt,
            dd {
                display: inline-block;
                float: left;
                margin-bottom: 1em;
            }

            dt {
                font-weight: 700;
                padding: 0 0 0.25em;
                margin: 0 4px 0 0;
                clear: left;
            }

            dd {
                padding: 0 0 0.25em;

                p:last-child {
                    margin-bottom: 0;
                }
            }
        }

        .star-rating {
            float: none;
            margin: 5px 0px;
        }
        li {
            margin-bottom: 15px;
        }
    }
}

/*
* Widgets Search
 */
.widget_product_search {
    .search-field {
        margin-bottom: 5px;
    }
}
.woocommerce-product-search {
    position: relative;
    .search-field {
        width: 100%;
        display: block;
    }
    button[type="submit"] {
        position: absolute;
        top: 0px;
        right: 0px;
        bottom: 0px;
        padding: 9px 14px;
        margin-left: -46px;
        overflow: hidden;
        box-shadow: none;
        background: transparent;
        color: #aaaaaa;
        line-height: 0px;
        &:hover {
            svg #svg-search {
                fill: #444444;
            }
        }
        svg {
            width: 18px;
            height: 18px;
        }
    }
}


/**
* Layered nav widget
*/
.woocommerce-widget-layered-nav-list {
    margin: 0;
    padding: 0;
    border: 0;
    list-style: none outside;

    .woocommerce-widget-layered-nav-list__item {
        @include clearfix();
        padding: 0 0 1px;
        list-style: none;

        a,
        span {
            padding: 1px 0;
        }
        a {
            &:before {
                @include iconbefore( '\e039' );
                color: #c6c7ce;
                position: relative;
                top: 1px;
            }
        }
    }

    .woocommerce-widget-layered-nav-list__item--chosen a::before {
        @include iconbefore( '\e015' );
        color: #c6c7ce;
    }
}
.woocommerce-widget-layered-nav-dropdown__submit {
    margin-top: 1em;
}

.widget_layered_nav_filters ul {
    margin: 0;
    padding: 0;
    border: 0;
    list-style: none outside;
    overflow: hidden;
    zoom: 1;

    li {
        float: left;
        padding: 0 1em 1px 1px;
        list-style: none;

        a {
            text-decoration: none;

            &::before {
                @include iconbefore( '\e013' );
                color: $red;
                vertical-align: inherit;
                margin-right: .5em;
            }
        }
    }
}

/**
 * Price filter widget
 */
.widget_price_filter {
    .price_slider {
        margin-bottom: 1em;
    }

    .price_slider_amount {
        text-align: right;
        line-height: 2.4;
        font-size: 0.8751em;

        .from, .to {
            font-weight: bolder;
        }

        .button {
            font-size: 0.875em;
            float: left;
            background: $color_meta;
            min-height: auto;
        }
    }

    .ui-slider {
        position: relative;
        text-align: left;
        margin-left: 0.5em;
        margin-right: 0.5em;
    }

    .ui-slider .ui-slider-handle {
        position: absolute;
        z-index: 2;
        width: 1em;
        height: 1em;
        background-color: #FFF;
        border: 2px solid $color_meta;
        border-radius: 1em;
        cursor: ew-resize;
        outline: none;
        top: -0.3em;
        /* rtl:ignore */
        margin-left: -0.5em;
    }

    .ui-slider .ui-slider-range {
        position: absolute;
        z-index: 1;
        font-size: 0.7em;
        display: block;
        border: 0;
        border-radius: 1em;
        background-color: $color_meta;
    }

    .price_slider_wrapper .ui-widget-content {
        border-radius: 1em;
        background-color: $color_border;
        border: 0;
    }

    .ui-slider-horizontal {
        height: 0.5em;
    }

    .ui-slider-horizontal .ui-slider-range {
        top: 0;
        height: 100%;
    }

    .ui-slider-horizontal .ui-slider-range-min {
        left: -1px;
    }

    .ui-slider-horizontal .ui-slider-range-max {
        right: -1px;
    }
}

/**
 * Rating Filter Widget
 */
.widget_rating_filter ul {
    margin: 0;
    padding: 0;
    border: 0;
    list-style: none outside;

    li {
        @include clearfix();
        padding: 0 0 1px;
        list-style: none;

        a {
            padding: 1px 0;
            text-decoration: none;
        }

        .star-rating {
            float: none;
            display: inline-block;
        }
    }

    li.chosen a::before {
        @include iconbefore( '\e013' );
        color: $red;
    }
}wc/_wc-elements.scss000066600000003514151135441770010453 0ustar00/*
# Buttons
# Price amount
*/

.button.add_to_cart_button,
.button.alt,
.button.added_to_cart,
.button.checkout,
.button.product_type_grouped,
.button.product_type_external,
.button.product_type_variable {
	background: $color_secondary;
	position: relative;
	cursor: pointer;
	&.added {
		i {
			&::before {
				font-family: "FontAwesome";
				content: "\f00c";
			}
		}
	}
}

.products {
	.button.add_to_cart_button,
	.button.added_to_cart,
	.button.product_type_variable,
	.wc-product-contents .button {
		font-size: 0.8em;
		min-height: auto;
	}
}
.single_add_to_cart_button {
	font-size: 1.04em;
}

/* Remove Button */
a.remove {
	width: 20px;
	height: 20px;
	color: #888888;
	background: rgba(255, 255, 255, 0.5);
	border-radius: 100px;
	font-family: sans-serif !important;
	font-size: 16px !important;
	font-weight: normal;
	line-height: 18px !important;
	display: inline-block;
	text-align: center;
	box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.08);
	opacity: 0.7;
	&:hover {
		color: #333;
		opacity: 1;
		box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.26),
			0 0 0 1px rgba(0, 0, 0, 0.18);
		background-color: rgba(255, 255, 255, 0.99);
	}
}

a.remove2x {
	width: 30px;
	height: 30px;
	color: #888888;
	background: rgba(255, 255, 255, 0.5);
	border-radius: 100px;
	font-family: sans-serif !important;
	font-size: 24px !important;
	font-weight: normal;
	line-height: 26px !important;
	display: inline-block;
	text-align: center;
	box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.08);
	opacity: 0.7;
	&:hover {
		color: #333;
		opacity: 1;
		box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.26),
			0 0 0 1px rgba(0, 0, 0, 0.18);
		background-color: rgba(255, 255, 255, 0.99);
	}
}

/* Price */
.price {
	line-height: 1;
}

.site-content,
.cart-dropdown-box {
	span.amount,
	.price {
		font-weight: 500;
		color: #252525;
	}
}
wc/_wc-reviews.scss000066600000012553151135441770010326 0ustar00/**
* Reviews
*/
#reviews {
    margin-bottom: 1.41575em;
    .comment-reply-title {
        font-size: 1.4em;
        margin-bottom: 1em;
        line-height: 1.216;
        display: block;
    }
    h2 small {
        float: right;
        font-size: 15px;
        margin: 10px 0 0;
    }

    #comment {
        height: 75px;
    }

    .comment-form {
        margin-bottom: 0px;
    }

    #comments {
        .add_review {
            @include clearfix();
        }

        h2 {
            clear: none;
        }

        ol.commentlist {
            @include clearfix();
            margin: 0;
            width: 100%;
            background: none;
            list-style: none;

            li {
                padding: 0;
                margin: 0 0 20px;
                border: 0;
                position: relative;
                background: 0;
                border: 0;
                width: 100%;

                .meta {
                    color: $subtext;
                    font-size: 0.75em;
                }

                img.avatar {
                    float: left;
                    position: absolute;
                    top: 0;
                    left: 0;
                    width: 50px;
                    height: auto;
                    border: 1px solid $color_border;
                    margin: 0;
                    box-shadow: none;
                }

                .comment-text {
                    margin: 0 0 0 70px;
                    border: 1px solid $color_border;
                    border-radius: 1px;
                    padding: 1em 1em 0;
                    @include clearfix();

                    p {
                        margin: 0 0 1em;
                    }

                    p.meta {
                        font-size: 0.83em;
                        time {
                            text-transform: uppercase;
                            letter-spacing: 0.5px;
                            font-size: 0.8em;
                        }
                    }
                    .star-rating {
                        margin-bottom: 4px;
                    }
                }
            }

            ul.children {
                list-style: none outside;
                margin: 20px 0 0 50px;

                .star-rating {
                    display: none;
                }
            }

            #respond {
                border: 1px solid darken( $secondary, 3% );
                border-radius: 4px;
                padding: 1em 1em 0;
                margin: 20px 0 0 50px;
            }
        }

        .commentlist > li::before {
            content: '';
        }
    }

}

/* Review Form */
#review_form {
    padding: 1.6em 2em 2em;
    border: 2px solid $color_primary;
    .comment-reply-title {

    }
    #respond {
        p {
            margin: 0 0 15px;
            &.form-submit {
                margin-bottom: 0;
            }
        }
        .comment-form-author, .comment-form-email {
            width: 48%;
        }
        .comment-form-author {
            float: left;
            margin-right: 3.8823529412%;
        }
        .comment-form-email {
            float: right;
        }
        .form-submit {
            width: 100%;
        }
        .comment-subscription-form {
            margin-bottom: 0;
        }
        label {
            text-transform: uppercase;
            letter-spacing: 0.5px;
            font-size: 0.875em;
        }
    }
}

/**
 * Star ratings
 */
.comment-form-rating a, .star-rating{
    color: $color_secondary;
    &:hover, &:focus {
        color: $color_secondary;
    }
}
.star-rating {
    overflow: hidden;
    position: relative;
    height: 1em;
    line-height: 1;
    font-size: 0.857em;
    width: 5.4em;
    font-family: 'star';

    &::before {
        content: '\73\73\73\73\73';
        color: darken( $secondary, 10% );
        float: left;
        top: 0;
        left: 0;
        position: absolute;
    }

    span {
        overflow: hidden;
        float: left;
        top: 0;
        left: 0;
        position: absolute;
        padding-top: 1.5em;
    }

    span::before {
        content: '\53\53\53\53\53';
        top: 0;
        position: absolute;
        left: 0;
    }
}

.woocommerce-product-rating {
    @include clearfix();
    line-height: 2;
    display: block;

    .star-rating {
        margin: 0.5em 4px 0 0;
        float: left;
    }
}

.products .star-rating {
    display: inline-block;
    float: none;
}

.hreview-aggregate .star-rating {
    margin: 10px 0 0;
}

p.stars {
    a {
        position: relative;
        height: 1em;
        width: 1em;
        text-indent: -999em;
        display: inline-block;
        text-decoration: none;

        &::before {
            display: block;
            position: absolute;
            top: 0;
            left: 0;
            width: 1em;
            height: 1em;
            line-height: 1;
            font-family: 'WooCommerce';
            content: '\e021';
            text-indent: 0;
        }

        &:hover ~ a::before {
            content: '\e021';
        }
    }

    &:hover a::before {
        content: '\e020';
    }

    &.selected {
        a.active {
            &::before {
                content: '\e020';
            }

            ~ a::before {
                content: '\e021';
            }
        }

        a:not( .active )::before {
            content: '\e020';
        }
    }
}

wc/_wc-cart.scss000066600000013374151135441770007575 0ustar00// Mini cart
/**
 * Cart sidebar
 */

.widget {
	.woocommerce-mini-cart {
		.mini_cart_item {
			display: flex;
			&__thumb {
				width: 60px;
				flex-basis: 60px;
				img {
					width: 100%;
					display: block;
				}
			}

			&__info {
				flex-basis: calc(100% - 60px);
				width: calc(100% - 60px);
				padding: 0px 25px 0px 1em;
			}
		}
	}

	.cart_list {
		list-style: none outside;
		padding: 0;
		margin: 0;
		.wc-product-name,
		.quantity {
			display: block;
		}
		li {
			margin: 0 0 1em 0;
			list-style: none;
			position: relative;
			a.remove {
				position: absolute;
				right: 0px;
				top: 15px;
			}
			a {
				display: block;
			}
			a:not(.remove) {
				line-height: 1.35;
			}

			img {
				height: auto;
				box-shadow: none;
			}

			dl {
				margin: 0;
				padding-left: 1em;
				border-left: 2px solid rgba(0, 0, 0, 0.1);
				@include clearfix();

				dt,
				dd {
					display: inline-block;
					float: left;
				}

				dt {
					font-weight: 700;
					padding: 0 0 0.25em;
					margin: 0 4px 0 0;
					clear: left;
				}

				dd {
					padding: 0 0 0.25em;

					p:last-child {
						margin-bottom: 0;
					}
				}
			}
			.star-rating {
				float: none;
			}
		}
	}
}

.wc-mini-cart-footer {
	border-top: 1px solid $color_border;
	padding: 1.25em;
}

.widget-area {
	&.sidebar-inner {
		.widget_shopping_cart {
			.cart_list {
				margin-bottom: 1.25em;
			}
			.wc-mini-cart-footer {
				padding: 1.25em 0 0px;
			}
		}
	}

	.widget_shopping_cart {
		.quantity {
			text-transform: uppercase;
			display: block;
			margin-top: 7px;
		}
		.total {
			display: block;
			margin-top: 0px;
			margin-bottom: 1.1em;
			.amount {
				float: right;
				font-size: 110%;
				position: relative;
				top: -2px;
			}
		}
		.cart_list {
			&:after {
				content: none !important;
				display: none !important;
			}
		}

		.buttons {
			a {
				text-align: center;
				display: block;
				margin-bottom: 0.6em;
				font-size: 0.9em;
				min-height: auto;
				&:last-child {
					margin-bottom: 0px;
				}
			}
		}
	}
}

// Header Item: Shopping Cart
.item--wc_cart {
	position: relative;
	.cart-item-link {
		display: flex;
		align-items: center;
		font-weight: 600;
		font-size: 0.85em;
		> span {
			margin: 0 2px;
			&:first-child {
				margin-left: 0px;
			}
			&:last-child {
				margin-right: 0px;
			}
		}
		.tax_label {
			display: none;
		}
	}

	.cart-icon {
		display: inline-block;
		position: relative;
		font-size: 1.3em;
		i {
			width: 1.3em;
			height: 1.3em;
			display: block;
			position: relative;
			top: -1px;
			&:before {
				position: absolute;
				top: 50%;
				left: 50%;
				transform: translate(-50%, -50%);
			}
		}
		.cart-qty {
			position: absolute;
			top: -4px;
			right: 2px;
			left: auto;
			transform: translate(50%, 0%);
			font-size: 11px;
			min-width: 16px;
			min-height: 16px;
			line-height: 16px;
			display: block;
			text-align: center;
			.customify-wc-total-qty {
				color: #ffffff;
				box-shadow: 1px 1px 3px 0px rgba(0, 0, 0, 0.2);
				font-size: 11px;
				min-width: 16px;
				min-height: 16px;
				line-height: 16px;
				border-radius: 20px;
				background: $color_secondary;
				display: block;
				&.hide-qty {
					display: none;
				}
			}
		}
	}
	.cart-dropdown-box {
		position: absolute;
		text-align: left;
		top: 100%;
		right: 0px;
		left: auto;
		z-index: 30;
		min-width: 300px;
		padding: 10px 0 0;
		transition: all 0.3s ease;
		opacity: 0;
		height: 0;
		visibility: hidden;
		display: block;
		color: $color_text;
		transform: translateY(40px);
		.woocommerce-mini-cart {
			max-height: 300px;
			overflow: auto;
			display: block;
			padding: 1.25em;
			li {
				&:last-child {
					margin-bottom: 0;
				}
			}
		}
		.widget {
			border: 1px solid #eaecee;
			background: #ffffff;
			box-shadow: $boxshadow_dropdown;
			position: relative;
			&::before {
				border-top: 1px solid $color_border;
				border-left: 1px solid $color_border;
				background: #fff;
				content: "";
				display: block;
				position: absolute;
				width: 15px;
				height: 15px;
				transform: rotate(45deg);
				z-index: 27;
			}
		}
		// When cart empty
		.woocommerce-mini-cart__empty-message {
			padding: 1.25em;
		}
	}

	&:hover,
	&.cart-active {
		.cart-dropdown-box {
			opacity: 1;
			height: auto;
			overflow: initial;
			visibility: visible;
			display: block;
			transform: translateY(0px);
		}
	}
}

.item--wc_cart {
	&.d-align-right {
		.cart-dropdown-box {
			left: auto;
			right: -8px;
			.widget {
				&:before {
					top: -8px;
					right: 15px;
				}
			}
		}
	}
	&.d-align-left {
		.cart-dropdown-box {
			left: 0px;
			right: auto;
			.widget {
				&:before {
					top: -8px;
					left: 15px;
				}
			}
		}
	}

	@include for_device(mobile) {
		.wc-cart-mobile-hide {
			display: none !important;
		}
		.wc-cart-mobile-show {
			display: inline-block !important;
		}
	}

	@include for_device(tablet) {
		.wc-cart-tablet-hide {
			display: none;
		}
		.wc-cart-tablet-show {
			display: inline-block;
		}
	}

	@include for_device(desktop) {
		.wc-cart-desktop-hide {
			display: none;
		}
		.wc-cart-desktop-show {
			display: inline-block;
		}
	}
}

.header-menu-sidebar-inner {
	.cart-dropdown-box {
		display: none !important;
		visibility: hidden;
		height: 0px;
	}
}

// Hide cart on mobile
.cb-row--mobile {
	.cart-dropdown-box {
		@include for_device(mobile) {
			display: none !important;
		}
	}
}

.site-header {
	.builder-header-wc_cart-item {
		.widget_shopping_cart {
			.widgettitle {
				display: none;
			}
		}
	}
}

wc/_woocommerce-fonts.scss000066600000001565151135441770011702 0ustar00/**
 * _fonts.scss
 * Custom WooCommerce fonts.
 */
@font-face {
	font-family: 'star';
	src: url('../../fonts/WooCommerce/star.eot');
	src: url('../../fonts/WooCommerce/star.eot?#iefix') format('embedded-opentype'),
		url('../../fonts/WooCommerce/star.woff') format('woff'),
		url('../../fonts/WooCommerce/star.ttf') format('truetype'),
		url('../../fonts/WooCommerce/star.svg#star') format('svg');
	font-weight: normal;
	font-style: normal;
}

@font-face {
	font-family: 'WooCommerce';
	src: url('../../fonts/WooCommerce/WooCommerce.eot');
	src: url('../../fonts/WooCommerce/WooCommerce.eot?#iefix') format('embedded-opentype'),
		url('../../fonts/WooCommerce/WooCommerce.woff') format('woff'),
		url('../../fonts/WooCommerce/WooCommerce.ttf') format('truetype'),
		url('../../fonts/WooCommerce/WooCommerce.svg#WooCommerce') format('svg');
	font-weight: normal;
	font-style: normal;
}wc/_woocommerce-layout.scss000066600000014505151135441770012064 0ustar00/**
 * Applies layout to the default WooCommerce frontend design
 */

.woocommerce-cart, .woocommerce-checkout {
    .entry-header {
        text-align: center;
        .entry-title {
            font-size: 1.9em;
            text-transform: uppercase;
            @include for_device( mobile ) {
                font-size: 1.7em;
            }
        }
        margin: 0em 0 3em;
    }
}

/* Breadcrumb */
.woocommerce-breadcrumb {
    a {
        &:after {
            border-top: 1px solid currentColor;
            border-left: 1px solid currentColor;
            content: "";
            width: 5px;
            height: 5px;
            display: inline-block;
            transform: rotate(135deg);
            left: auto;
            position: relative;
            top: -1px;
            margin: 0px 10px;
        }
    }
}

// Before listing Products
.wc-catalog-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5em;
}

.wc-svg-btn {
    cursor: pointer;
    padding: 5px 5px 4px 5px;
    border: 1px solid $color_border;
    border-radius: 1px;
    line-height: 1;
    height: 2em;
    display: inline-flex;
    align-items: center;
    margin-right: 10px;
    svg {
        width: 1.2em;
        height: 1.2em;
        display: inline-block;
        fill: currentColor;
    }
    &.active {
        color: $color_primary;
        border-color: $color_primary;
    }
}


.wc-view-switcher, .woocommerce-ordering, .woocommerce-result-count {
    margin-bottom: 0;
    display: flex;
    align-items: center;
}

.wc-view-switcher {
    @include for_device( mobile ) {
        display: none;
    }
}

.woocommerce-ordering {
    margin-right: 0px;
    margin-left: 0px;
    select {
        padding: 0 2em 0 15px;
        border: 1px solid $color_border;
        border-radius: 0px;
        position: relative;
        height: 2.3em;
        font-size: 0.95em;
        @include for_device(mobile) {
            min-width: 150px;
        }
    }
}

// <img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCAzODYuMjU3IDM4Ni4yNTciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDM4Ni4yNTcgMzg2LjI1NzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjAsOTYuODc5IDE5My4xMjksMjg5LjM3OSAzODYuMjU3LDk2Ljg3OSAiIGZpbGw9IiMwMDAwMDAiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==" />

.woocommerce-result-count {
    margin-left: auto;
    margin-right: 1em;
    @include for_device(mobile) {
        display: none;
    }
}

.woocommerce, .woocommerce-page {

    .woocommerce-message,
    .woocommerce-error,
    .woocommerce-info {
        .button {
            float: right;
        }
    }

    /**
     * General layout styles
     */
    .col2-set {
        @include clearfix();
        width: 100%;

        .col-1 {
            float: left;
            width: 48%;
        }
        .col-2 {
            float: right;
            width: 48%;
        }
    }

    img {
        height: auto;
        max-width: 100%;
    }


    /**
     * Cart page
     */
    .woocommerce-cart-form {
        width: 60%;
        float: left;
        @include for_device( tablet ) {
            width: 100%;
            float: none;
        }
    }
    .cart-collaterals {
        width: 35%;
        float: right;
        @include for_device( tablet ) {
            width: 100%;
            float: none;
        }
    }

    table.cart,
    #content table.cart {
        img {
            height: auto;
        }
    }

    /**
   * Checkout Page
   */
    .woocommerce-checkout {
        .col2-set {
            .col-1,  .col-2 {
                float: none;
                width: 100%;
            }
        }
        #order_review_heading {
            display: none;
        }
        #customer_details {
            width: 55%;
            float: left;
            @include for_device( tablet ) {
                width: 100%;
                float: none;
            }
        }
        .woocommerce-checkout-review-order {
            width: 40%;
            float: right;
            @include for_device( tablet ) {
                width: 100%;
                float: none;
            }
        }
    }


    /**
     * Forms
     */
    form {
        .form-row {
            @include clearfix();

            label {
                display: block;

                &.checkbox {
                    display: inline;
                }
            }

            select {
                width: 100%;
            }

            .input-text {
                box-sizing: border-box;
                width: 100%;
            }
        }

        .form-row-first,
        .form-row-last {
            width: 47%;
            overflow: visible;
        }

        .form-row-first {
            float: left;

            /*rtl:raw:
            float: right;
            */
        }

        .form-row-last {
            float: right;
        }

        .form-row-wide {
            clear: both;
        }
    }

    #payment {
        .form-row {
            select {
                width: auto;
            }
        }

        .wc-terms-and-conditions, .terms {
            text-align: left;
            padding: 0 1em 0 0;
            float: left;
        }
    }

    .woocommerce-billing-fields,
    .woocommerce-shipping-fields {
        @include clearfix();
    }

    .woocommerce-terms-and-conditions {
        margin-bottom: 1.618em;
        padding: 1.618em;
    }

    /**
     * oEmbeds
     */
    .woocommerce-oembed {
        position: relative;
    }
}

.woocommerce-account {
    .woocommerce-MyAccount-navigation {
        float: left;
        width: 30%;
    }

    .woocommerce-MyAccount-content {
        float: right;
        width: 68%;
    }
}

/**
 * RTL styles.
 */
.rtl {
    .woocommerce, .woocommerce-page {
        .col2-set {
            .col-1 {
                float: right;
            }
            .col-2 {
                float: left;
            }
        }
    }
}
wc/_wc-cart-checkout.scss000066600000034140151135441770011372 0ustar00/**
 * Cart/checkout page
 */

// Heading
.cart-collaterals .cart_totals h2,
.woocommerce-checkout-review-order h3 {
    font-size: 1.2em;
    text-transform: uppercase;
    font-weight: 500;
    padding-bottom: 15px;
    margin-bottom: 0px;
}

.woocommerce-billing-fields h3 {
    font-size: 1.2em;
    text-transform: uppercase;
    font-weight: 500;
}

#ship-to-different-address {
    font-size: 1em;
    margin: 1.5em 0;
    text-transform: uppercase;
    font-weight: 500;
    span {
        position: relative;
        top: 1px;
        font-weight: 500;
        cursor: pointer;
    }
}

// Empty cart page
.cart-empty,
.return-to-shop {
    text-align: center;
}

// Sidebar Box style
.cart-collaterals,
.woocommerce-checkout-review-order, .group-highlight-box {
    background: #f9f9f9;
    box-shadow: 0 2px 2px 0 rgba(0,0,0,0.16), 0 0 0 1px rgba(0,0,0,0.08);
    padding: 1.8em 2em 2em 2em;
    border-radius: 2px;
    margin-top: 1em;
    @include for_device(mobile) {
        padding: 1em;
        form.cart .group_table td {
            padding-right: 0.5em;
        }
    }
    > * {
        &:last-child {
            margin-bottom: 0px;
        }
    }
}

form.woocommerce-checkout {
    @include clearfix;
    margin: 2em 0;
    @include for_device(tablet) {
        margin: 1em 0;
    }
}

.woocommerce-cart,
.woocommerce-checkout,
#add_payment_method {
    table.cart {
        .product-thumbnail {
            width: 100px;
        }
        .product-quantity {
            min-width: 8em;
        }
        img {
            width: 90px;
            box-shadow: none;
            display: block;
        }
        th,
        td {
            vertical-align: middle;
        }

        input {
            margin: 0;
            vertical-align: middle;
        }
        td.actions {
            padding: 15px 0px 15px 0px;
        }
        tr {
            th:first-of-type {
                padding-left: 0px;
            }
            th:last-of-type {
                padding-right: 0px;
                text-align: right;
            }

            td:first-of-type {
                padding-left: 1px;
            }
            td:last-of-type {
                padding-right: 0px;
                text-align: right;
            }
        }
    }

    .wc-proceed-to-checkout {
        @include clearfix;
        a.checkout-button {
            display: block;
            text-align: center;
            font-size: 1.25em;
        }
    }

    .cart-collaterals {
        .shipping_calculator {
            .button {
                width: 100%;
                float: none;
                display: block;
            }

            .shipping-calculator-button::after {
                @include iconafter( '\e019' );
            }
        }

        .cart_totals {
            p small {
                color: $subtext;
                font-size: 0.83em;
            }


            .discount td {
                color: $highlight;
            }

        }

        .cross-sells ul.products li.product {
            margin-top: 0;
        }
    }
    .checkout {
        .col-2 {
            h3#ship-to-different-address {
                float: left;
                clear: none;
            }

            .notes {
                clear: left;
            }

            .form-row-first {
                clear: left;
            }
        }

        .create-account small {
            font-size: 11px;
            color: $subtext;
            font-weight: normal;
        }

        div.shipping-address {
            padding: 0;
            clear: left;
            width: 100%;
        }

        .shipping_address {
            clear: both;
        }
    }

    #payment {

        ul.payment_methods {
            @include clearfix();
            text-align: left;
            margin: 0;
            list-style: none outside;

            > li {
                line-height: 2;
                text-align: left;
                margin: 0;
                font-weight: normal;
                border-bottom: 1px solid $color_border;
                padding-top: 1em;
                line-height: 1.2;
                position: relative;
                > label {
                    padding-left: 32px;
                    margin-bottom: 0.8em;
                    display: inline-block;
                    cursor: pointer;
                    font-weight: 500;
                    line-height: 1.2;
                    font-size: 1.05em;
                    position: relative;
                    top: -2px;
                }

                p {
                    padding: 0 2em 1.2em 32px;
                    line-height: 1.7;
                }

                img {
                    vertical-align: middle;
                    margin: -2px 0 0 0.5em;
                    padding: 0;
                    position: relative;
                    box-shadow: none;
                }

                img + img {
                    margin-left: 2px;
                }

                .input-radio {
                    position: absolute;
                    left: 0;
                }

                &.payment_method_paypal {

                    > label {
                        display: block;
                    }

                    img {
                        float: right;
                        max-height: 35px;
                        vertical-align: middle;
                        position: relative;
                        top: -5px;
                        margin-left: 15px;
                    }

                    .about_paypal {
                        float: right;
                        font-size: 0.8em;
                        border-bottom: 1px dotted currentColor;
                    }

                }

                &.payment_method_stripe {
                    img {
                        max-height: 15px;
                        margin: 2px -5px 0 !important;
                    }
                    input#payment_method_stripe {
                        top: auto !important;
                    }
                    p {
                        margin-bottom: 0;
                    }
                }

            }

            [class*="payment_method_stripe_"] {
            .input-radio {
                top: auto !important;
            }
        }

            li:not(.woocommerce-notice) {
                @include clearfix;
            }
        }

        div.payment_box {
            position: relative;
            box-sizing: border-box;
            width: 100%;
            font-size: 0.9em;
            border-radius: 2px;
            line-height: 1.5;

            input.input-text, textarea {
                border-color: darken( $secondary, 15% );
                border-top-color: darken( $secondary, 20% );
            }

            ::-webkit-input-placeholder {
                color: darken( $secondary, 20% );
            }

            :-moz-placeholder {
                color: darken( $secondary, 20% );
            }

            :-ms-input-placeholder {
                color: darken( $secondary, 20% );
            }

            .woocommerce-SavedPaymentMethods {
                list-style: none outside;
                margin: 0;
                .woocommerce-SavedPaymentMethods-token,
                .woocommerce-SavedPaymentMethods-new {
                    margin: 0 0 0.5em;
                    label {
                        cursor: pointer;
                    }
                }
                .woocommerce-SavedPaymentMethods-tokenInput {
                    vertical-align: middle;
                    margin: -3px 1em 0 0;
                    position: relative;
                }
            }

            .wc-credit-card-form {
                border: 0;
                padding: 0 2em 0em 32px;
                margin: 0;
            }
            .wc-credit-card-form-card-number,
            .wc-credit-card-form-card-expiry,
            .wc-credit-card-form-card-cvc {
                font-size: 1.5em;
                padding: 8px;
                background-repeat: no-repeat;
                background-position: right 0.618em center;
                background-size: 32px 20px;

                &.visa {
                    background-image: url('../../images/icons/credit-cards/visa.svg');
                }

                &.mastercard {
                    background-image: url('../../images/icons/credit-cards/mastercard.svg');
                }

                &.laser {
                    background-image: url('../../images/icons/credit-cards/laser.svg');
                }

                &.dinersclub {
                    background-image: url('../../images/icons/credit-cards/diners.svg');
                }

                &.maestro {
                    background-image: url('../../images/icons/credit-cards/maestro.svg');
                }

                &.jcb {
                    background-image: url('../../images/icons/credit-cards/jcb.svg');
                }

                &.amex {
                    background-image: url('../../images/icons/credit-cards/amex.svg');
                }
                &.discover {
                    background-image: url('../../images/icons/credit-cards/discover.svg');
                }
            }

            span.help {
                font-size: 0.857em;
                color: $subtext;
                font-weight: normal;
            }

            .form-row {
                margin: 0 0 0.5em;
            }

            p:last-child {
                margin-bottom: 0;
            }

        }

        .place-order {
            padding: 2em 0 0 0;
        }

    }
}


/* Minimal style for cart/checkout page */

// Messages
.woocommerce-form-coupon-toggle,
.woocommerce-form-login-toggle {
    .woocommerce-message,
    .woocommerce-info {
        max-width: 600px;
        margin: 1em auto 1em;
        border: 0px none;
        padding: 0px;
        background: none;
        text-align: center;
        &:before {
            display: inline-block;
            position: relative;
            top: auto;
            left: auto;
            font-size: 0.8em;
            margin-right: 0.4em;
        }
    }
}


.woocommerce-form-login-toggle {
    .woocommerce-info {
        &:before {
            content: '\e03a';
        }
    }
}
.woocommerce-form-coupon-toggle {
    .woocommerce-info {
        &:before {
            content: '\e600';
        }
    }
}


// Cart Collaterals Box.
.cart-collaterals {

    table {
        &.shop_table {
            background: none;
            border: none;
            th {
                width: 30%;
            }
            tr, td, th {
                background: none;
                //border: none;
            }
            th {
                padding-left: 0px;
            }
            td {
                text-align: right;
            }
        }
    }
}


// Login form
.woocommerce-page {

    .woocommerce-form-login {
        max-width: 500px;
        margin: 1em auto;
        .form-row {
            width: 100%;
            float: none;
            .button {
                width: 100%;
                text-align: center;
                display: block;
            }
        }

        .woocommerce-form__label-for-checkbox {
            display: inline-block;
            margin-top: 12px;
            input[type="checkbox"] {
                position: relative;
                margin-top: -1px;
            }
        }
        .lost_password {
            float: right;
            margin: -37px 0px 0px;
        }
    }

    // Coupon Form
    .actions {
        .button[type="submit"] {
            float: right;
        }
        .coupon {
            float: left;
            width: 50%;
        }
    }
    .woocommerce-form-coupon {
        max-width: 500px;
        margin: 2em auto;
    }
    .input-group-text-button, .coupon {
        position: relative;
        min-width: 50%;
        label {
            display: none;
        }
        .input-text {
            padding-right: 3em;
            width: 100%;
        }
        .button {
            position: absolute;
            top: 0px;
            right: 0px;
            width: 3em;
            height: 2.6em;
            overflow: hidden;
            display: block;
            background: transparent;
            border-color: transparent;
            &:hover {
                box-shadow: none;
                &:before {
                    color: #252525;
                }
            }
            &:before {
                font-family: "WooCommerce";
                content: "\e008";
                color: #CCCCCC;
                font-size: 17px;
                margin-right: 2em;
            }
        }
    }
}

.later-wc-version {
	.woocommerce-form-login {
		.lost_password {
			float: none;
			clear: both;
			text-align:right;
			margin-top: 0;
			padding: 0 3px;
		}
		.woocommerce-form-login__rememberme{
			margin-top: 5px;
			margin-bottom: 15px;
		}
	}
}
// Checkout Review Order Box.
.woocommerce-checkout-review-order {

    table {
        &.shop_table {
            tr, td, th {
                //border: none;
                padding-left: 0px;
            }

            tr {
                &.cart-subtotal td,
                .product-total {
                    text-align: right;
                }

            }

            tbody {
                tr {
                    .product-name {
                        width: 180px;
                    }
                    td {
                        border-top: 1px solid $color_border;
                    }
                    &:last-of-type td {
                        border-bottom: 1px solid $color_border;
                    }
                }
            }
            tfoot {
                tr {
                    &.shipping {
                         p {
                             margin-bottom: 0px;
                         }
                    }
                }
                tr:last-of-type {
                    th,td {
                        //border-bottom: 2px solid $color_border;
                    }
                }
                .order-total .amount {
                    font-size: 1.5em;
                }
            }
        }
    }
    #place_order {
        display: block;
        width: 100%;
    }
}

wc/_wc-order.scss000066600000003246151135441770007754 0ustar00/**
* Order page
*/
ul.order_details {
    @include clearfix();
    margin: 0 0 3em;
    list-style: none;

    li {
        float: left;
        margin-right: 2em;
        text-transform: uppercase;
        font-size: 0.715em;
        line-height: 1;
        border-right: 1px dashed darken( $secondary, 10% );
        padding-right: 2em;
        margin-left: 0;
        padding-left: 0;
        list-style-type: none;

        strong {
            display: block;
            font-size: 1.4em;
            text-transform: none;
            line-height: 1.5;
        }

        &:last-of-type {
            border: none;
        }
    }
}

.wc-bacs-bank-details-account-name {
    font-weight: bold;
}

.woocommerce-order-downloads,
.woocommerce-customer-details,
.woocommerce-order-details {
    margin-bottom: 2em;

    *:last-child {
        margin-bottom: 0;
    }
}
.woocommerce-customer-details {
    address {
        font-style: normal;
        margin-bottom: 0;
        border: 1px solid rgba(0, 0, 0, 0.1);
        border-bottom-width: 2px;
        border-right-width: 2px;
        text-align: left;
        width: 100%;
        border-radius: 5px;
        padding: 6px 12px;
    }
    .woocommerce-customer-details--phone,
    .woocommerce-customer-details--email {
        margin-bottom: 0;
        padding-left: 1.5em;
    }
    .woocommerce-customer-details--phone::before {
        @include iconbefore( '\e037' );
        margin-left: -1.5em;
        line-height: 1.75;
        position: absolute;
    }
    .woocommerce-customer-details--email::before {
        @include iconbefore( '\e02d' );
        margin-left: -1.5em;
        line-height: 1.75;
        position: absolute;
    }
}wc/_wc-forms.scss000066600000007427151135441770007774 0ustar00/**
* Forms
*/
form .form-row {
    padding: 3px;
    margin: 0 0 6px;

    [placeholder]:focus::-webkit-input-placeholder {
        transition: opacity 0.5s 0.5s ease;
        opacity: 0;
    }

    label {
        line-height: 2;
    }

    label.hidden {
        visibility: hidden;
    }

    label.inline {
        display: inline;
    }

    .woocommerce-input-wrapper {
        .description {
            background: #1e85be;
            color: #fff;
            border-radius: 3px;
            padding: 1em;
            margin: .5em 0 0;
            clear: both;
            display: none;
            position: relative;

            a {
                color: #fff;
                text-decoration: underline;
                border: 0;
                box-shadow: none;
            }

            &:before {
                left: 50%;
                top: 0%;
                margin-top: -4px;
                transform: translatex(-50%) rotate(180deg);
                content: "";
                position: absolute;
                border-width: 4px 6px 0 6px;
                border-style: solid;
                border-color: #1e85be transparent transparent transparent;
                z-index: 100;
                display: block;
            }
        }
    }

    select {
        cursor: pointer;
        margin: 0;
    }

    .required {
        color: red;
        font-weight: 700;
        border: 0 !important;
        text-decoration: none;
        visibility: hidden; // Only show optional by default.
    }

    .optional {
        visibility: visible;
    }

    .input-checkbox {
        display: inline;
        margin: -2px 8px 0 0;
        text-align: center;
        vertical-align: middle;
    }

    input.input-text,
    textarea {
        box-sizing: border-box;
        width: 100%;
        margin: 0;
        outline: 0;
        line-height: normal;
    }

    textarea {
        height: 4em;
        line-height: 1.5;
        display: block;
    }

    .select2-container {
        width: 100%;
        line-height: 2em;
    }

    &.woocommerce-invalid {
        label {
            color: $red;
        }
        .select2-container,
        input.input-text,
        select {
            border-color: $red;
        }
    }

    &.woocommerce-validated {
        .select2-container,
        input.input-text,
        select {
            border-color: $green;
        }
    }

    ::-webkit-input-placeholder {
        line-height: normal;
    }

    :-moz-placeholder {
        line-height: normal;
    }

    :-ms-input-placeholder {
        line-height: normal;
    }
}

form.login,
form.checkout_coupon,
form.register {
    padding: 20px;
    margin: 2em 0;
    text-align: left;
    border-radius: 1px;
}

form.checkout_coupon {
    border: 2px dashed #eaeaea;
}

ul#shipping_method {
    list-style: none outside;
    margin: 0;
    padding: 0;

    li {
        margin: 0;
        padding: 4px 0px;
        text-indent: -22px;
        list-style: none outside;
        input {
            margin: 3px 0.5ex;
        }
        label {
            display: inline;
        }
        &:first-child {
            padding-top: 0px;
        }
    }

    .amount {
        //font-weight: 700;
    }
}

/* Checkout form */
#customer_details {
    margin-bottom: 2em;
}

/* Shipping calculator form */
.woocommerce-shipping-calculator {
    margin-bottom: 0;

    .shipping-calculator-form {
        margin: 15px 0px;
    }

    p {
        margin-bottom: 0px;
    }

    .form-row {
        padding: 0;
        margin: 0 0 10px;
        font-size: 0.85em;
    }
    #calc_shipping_country_field {
        margin-bottom: 13px;
        text-align: left;
    }
    select {
        text-align: left;
    }
    button {
        font-size: 0.85em;
        display: block;
        width: 100%;
        min-height: auto;
    }
}wc/_wc-loop.scss000066600000010453151135441770007610 0ustar00/**
* Product loops
*/
.woocommerce {
    .woocommerce-loop-category__title {
        margin-top: 10px;
        padding: 0;
        font-size: 1em;
    }
    ul.products li.product {
        h3,
        .woocommerce-loop-product__title
        {
            padding: 0;
            margin: 0;
            font-size: 1.1em;
            line-height: 1.35;
        }

        a img {
            width: 100%;
            height: auto;
            display: block;
        }

        strong {
            display: block;
        }

        .price {
            display: inline-block;
            font-weight: normal;
            font-size: 0.857em;

            del {
                opacity: 0.5;
                display: inline-block;
            }

            ins {
                background: none;
                font-weight: 700;
                display: inline-block;
            }

            .from {
                font-size: 0.67em;
                margin: -2px 0 0 0;
                text-transform: uppercase;
                color: rgba(desaturate($highlight, 75%), 0.5);
            }
        }
    }

    ul.products {
        margin: 0 -1em 0;
        padding: 0;
        list-style: none outside;
        clear: both;
        li.product, > li{
            list-style: none outside;
            margin: 1em 0px;
        }
    }
}


.wc-product-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    &:last-child{ // only have child
        &:first-child {
            height: auto;
        }
    }
    > div {
        flex: 1;
        flex-grow: 1;
        flex-shrink: 1;
        flex-basis: auto;
    }
    .woocommerce-loop-product__desc p {
        &:last-child {
            margin-bottom: 0;
        }
    }
    .wc-product-contents {
        padding-top: 0.7em;
        padding-bottom: 0.7em;
        > * {
            margin-top: 0.7em;
            &:first-child {
                margin-top: 0px;
            }
            &:last-child {
                margin-bottom: 0;
            }
        }
    }

    .wc-product__part {

        &:last-child {
            margin-bottom: 0px;
        }
        .ajax_add_to_cart.added {
            display: none;
        }
    }

    .wc-product-media {
        position: relative;
        flex-shrink: initial;
        flex-grow: 0;
        text-align: center;
        margin: 0em;
        img {
            transition: all .3s ease;
            margin-bottom: 0px;
            object-fit: cover;
        }
        .secondary-image {
            position: absolute;
            z-index: 5;
            top: 0px;
            left: 0px;
            right: 0px;
            display: block;
            height: auto;
            opacity: 0;
        }
    }

    .wc-product__category,
    .wc-product__price,
    .wc-product__rating {
        line-height: 1;
    }
}

// Secondary image when hover if exist
.product-has-gallery {
    > .wc-product-inner {
        &:hover {
            img {
                opacity: 0;
            }
            .secondary-image {
                opacity: 1;
            }
        }
    }
}

.wc-loop-cats-separator {
    clear: both !important;;
    flex: none !important;
    display: block !important;
    width: 100%;
}

.wc-grid-view {
    .hide-in-grid {
        display: none;
    }
}

// List view
.wc-list-view {
    .hide-in-list {
        display: none;
    }
    .product {
        &.customify-col:not(.product-category) {
            width: 100%;
            flex: none;
            max-width: 999999px;
            .wc-product-inner {
                flex-direction: row;
                @include for_device(mobile) {
                    flex-direction: column;
                }
                .wc-product-media {
                    flex-basis: 32%;
                    margin-right: 2em;
                    @include for_device(mobile) {
                        flex-direction: column;
                        flex-basis: 100%;
                        margin-right: 0;
                    }
                }
                .wc-product-contents {
                    flex-basis: 68%;
                    @include for_device(mobile) {
                        flex-basis: 100%;
                    }
                    display: inline-block;
                    flex-direction: column;
                }
            }
        }
    }
}wc/_woocommerce-mixins.scss000066600000011612151135441770012052 0ustar00/**
 * Deprecated
 * Fallback for bourbon equivalent
 */
@mixin clearfix() {
	*zoom: 1;

	&::before,
	&::after {
		content: ' ';
		display: table;
	}

	&::after {
		clear: both;
	}
}

/**
 * Deprecated
 * Vendor prefix no longer required.
 */
@mixin border_radius($radius: 1px) {
	border-radius: $radius;
}

/**
 * Deprecated
 * Vendor prefix no longer required.
 */
@mixin border_radius_right($radius: 1px) {
	border-top-right-radius: $radius;
	border-bottom-right-radius: $radius;
}

/**
 * Deprecated
 * Vendor prefix no longer required.
 */
@mixin border_radius_left($radius: 1px) {
	border-top-left-radius: $radius;
	border-bottom-left-radius: $radius;
}

/**
 * Deprecated
 * Vendor prefix no longer required.
 */
@mixin border_radius_bottom($radius: 1px) {
	border-bottom-left-radius: $radius;
	border-bottom-right-radius: $radius;
}

/**
 * Deprecated
 * Vendor prefix no longer required.
 */
@mixin border_radius_top($radius: 1px) {
	border-top-left-radius: $radius;
	border-top-right-radius: $radius;
}

/**
 * Deprecated
 * Vendor prefix no longer required.
 */
@mixin opacity( $opacity: 0.75 ) {
	opacity: $opacity;
}

/**
 * Deprecated
 * Vendor prefix no longer required.
 */
@mixin box_shadow($shadow_x: 3px, $shadow_y: 3px, $shadow_rad: 3px, $shadow_in: 3px, $shadow_color: #888) {
	box-shadow: $shadow_x $shadow_y $shadow_rad $shadow_in $shadow_color;
}

/**
 * Deprecated
 * Vendor prefix no longer required.
 */
@mixin inset_box_shadow($shadow_x: 3px, $shadow_y: 3px, $shadow_rad: 3px, $shadow_in: 3px, $shadow_color: #888) {
	box-shadow: inset $shadow_x $shadow_y $shadow_rad $shadow_in $shadow_color;
}

/**
 * Deprecated
 * Vendor prefix no longer required.
 */
@mixin text_shadow($shadow_x: 3px, $shadow_y: 3px, $shadow_rad: 3px, $shadow_color: #fff) {
	text-shadow: $shadow_x $shadow_y $shadow_rad $shadow_color;
}

/**
 * Deprecated
 * Vendor prefix no longer required.
 */
@mixin vertical_gradient($from: #000, $to: #fff) {
	background-color: $from;
	background: -webkit-linear-gradient($from, $to);
}

/**
 * Deprecated
 * Vendor prefix no longer required.
 */
@mixin transition($selector: all, $animation: ease-in-out, $duration: 0.2s) {
	transition: $selector $animation $duration;
}

/**
 * Deprecated
 * Use bourbon mixin instead `@include transform(scale(1.5));`
 */
@mixin scale($ratio: 1.5) {
	-webkit-transform: scale($ratio);
	transform: scale($ratio);
}

/**
 * Deprecated
 * Use bourbon mixin instead `@include box-sizing(border-box);`
 */
@mixin borderbox() {
	box-sizing: border-box;
}

@mixin darkorlighttextshadow($a, $opacity: 0.8) {
	@if lightness($a) >= 65% {
		@include text_shadow(0, -1px, 0, rgba(0, 0, 0, $opacity));
	}
	@else {
		@include text_shadow(0, 1px, 0, rgba(255, 255, 255, $opacity));
	}
}

/**
 * Objects
 */
@mixin menu() {
	@include clearfix();

	li {
		display: inline-block;
	}
}

@mixin mediaright() {
	@include clearfix();

	img {
		float: right;
		height: auto;
	}
}

@mixin medialeft() {
	@include clearfix();

	img {
		float: right;
		height: auto;
	}
}

@mixin ir() {
	display: block;
	text-indent: -9999px;
	position: relative;
	height: 1em;
	width: 1em;
}

@mixin icon( $glyph: '\e001' ) {
	font-family: 'WooCommerce';
	speak: none;
	font-weight: normal;
	font-variant: normal;
	text-transform: none;
	line-height: 1;
	margin: 0;
	text-indent: 0;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	text-align: center;
	content: $glyph;
}

@mixin icon_dashicons( $glyph: '\f333' ) {
	font-family: 'Dashicons';
	speak: none;
	font-weight: normal;
	font-variant: normal;
	text-transform: none;
	line-height: 1;
	-webkit-font-smoothing: antialiased;
	margin: 0;
	text-indent: 0;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	text-align: center;
	content: $glyph;
}

@mixin iconbefore( $glyph: '\e001' ) {
	font-family: 'WooCommerce';
	speak: none;
	font-weight: normal;
	font-variant: normal;
	text-transform: none;
	line-height: 1;
	-webkit-font-smoothing: antialiased;
	margin-right: 0.418em;
	content: $glyph;
	text-decoration: none;
}

@mixin iconbeforedashicons( $glyph: '\f333' ) {
	font-family: 'Dashicons';
	speak: none;
	font-weight: normal;
	font-variant: normal;
	text-transform: none;
	line-height: 1;
	-webkit-font-smoothing: antialiased;
	content: $glyph;
	text-decoration: none;
}

@mixin iconafter( $glyph: '\e001' ) {
	font-family: 'WooCommerce';
	speak: none;
	font-weight: normal;
	font-variant: normal;
	text-transform: none;
	line-height: 1;
	-webkit-font-smoothing: antialiased;
	margin-left: 0.618em;
	content: $glyph;
	text-decoration: none;
}

@mixin loader() {
	&::before {
		height: 1em;
		width: 1em;
		display: block;
		position: absolute;
		top: 50%;
		left: 50%;
		margin-left: -0.5em;
		margin-top: -0.5em;
		content: '';
		animation: spin 1s ease-in-out infinite;
		background: url('../../images/woocommerce/icons/loader.svg') center center;
		background-size: cover;
		line-height: 1;
		text-align: center;
		font-size: 2em;
		color: rgba(#000, 0.75);
	}
}
wc/_woocommerce-vars.scss000066600000001636151135441770011523 0ustar00/**
 * WooCommerce CSS Variables
 */

$woocommerce:   	#a46497;
$green:         	#7ad03a;
$red:           	#a00;
$orange:        	#ffba00;
$blue:          	#2ea2cc;

$primary:           #a46497;                                    // Primary color for buttons (alt)
$primarytext:       desaturate(lighten($primary, 50%), 18%);    // Text on primary color bg

$secondary:         desaturate(lighten($primary, 40%), 21%);    // Secondary buttons
$secondarytext:     desaturate(darken($secondary, 60%), 21%);   // Text on secondary color bg

$highlight:         adjust-hue($primary, 150deg);               // Prices, In stock labels, sales flash
$highlightext:      desaturate(lighten($highlight, 50%), 18%);  // Text on highlight color bg

$contentbg:         #fff;                                       // Content BG - Tabs (active state)
$subtext:           #777;                                       // small, breadcrumbs etcwc/_wc-single-product.scss000066600000015753151135441770011606 0ustar00/*
# Product meta
# Product tabs
# Upsell + Related products section
*/

/**
* Nav Product - next - prev button
*/
.product_title-wrapper {
    position: relative;
}
.wc-product-nav {
    position: absolute;
    top: 0.5em; right: -5px;
    > a {
        margin: 0px 3px;
        display: inline-block;
        &:hover {
            .nav-thumbnail {
                z-index: 100;
                left: 50%;
                opacity: 1;
            }
        }
    }
    .nav-thumbnail {
        position: absolute;
        top: 100%;
        left: -999999px;
        width: 100px;
        display: block;
        transform: translateX( - 50% );
        transition: opacity .25s ease-in-out;
        z-index: -1;
        opacity: 0;
        img {
            display: block;
            margin-top: 10px;
            box-shadow: 1px 1px 10px rgba(0,0,0,.06);
        }
    }
}

.nav-in-title {
    .product_title {
        margin-right: 70px;
    }
}


/**
Product Slider
 */

.flex-direction-nav {
    list-style: none;
    margin: 0px !important;
    padding: 0px !important;
    .flex-prev,
    .flex-next {
        position: absolute;
        display: block;
        top: 50%;
        transform: translate(0, -50%);
        padding: 0;
        border: none;
        outline: none;
        z-index: 15;
        opacity: 0;
        transition: opacity 0.3s linear;
    }
    .flex-prev {
        left: 15px;
    }

    .flex-next {
        right: 15px;
    }
    .flex-disabled {
        .nav-btn {
            visibility: hidden;
        }
    }
}
.woocommerce-product-gallery:hover {
    .flex-direction-nav {
        .flex-prev,
        .flex-next {
            opacity: 1;
        }
    }
}
/**
* Product meta
 */
.product_meta {
    font-size: 0.875em;
    color: $color_meta;
    margin: 1.41575em 0px;
    > span {
        display: block;
        padding: 6px 0px;
        border-top: 1px dotted $color_border;
    }
}

/**
* Product tabs
*/

.woocommerce-tabs {
    clear: both;
    margin-bottom: 2em;
    ul.tabs {
        list-style: none;
        padding: 0;
        margin: 0 0 1.41575em;
        position: relative;
        li {
            position: relative;
            a {
                color: currentColor;
            }
        }
    }
    &.wc-tabs-horizontal {
        ul.tabs {
            border-bottom: 1px solid $color_border;
            li {
                border-bottom: 1px solid transparent;
                display: inline-block;
                position: relative;
                z-index: 0;
                padding: 0;
                margin: 0 1em -1px;
                &:first-child {
                    margin-left: 0px;
                }
                &:last-child {
                    margin-right: 0px;
                }
                a {
                    display: inline-block;
                    padding: 0.5em 0px;
                    font-size: 1.05em;
                }
                &.active {
                    z-index: 2;
                    border-bottom-color: $color_primary;
                    a {
                        color: $color_primary;
                        text-shadow: inherit;
                    }

                }

            }
        }
    } // wc-tabs-horizontal

    &.wc-tabs-vertical {

        .wc-tabs {
            width: 26%;
            margin-right: 4%;
            margin-bottom: 2em;
            float: left;
            @include for_device( mobile ) {
                width: 100%;
                margin-right: 0;
                margin-bottom: 2em;
            }
            li {
                border-bottom: 1px solid $color_border;
                &:first-child {
                    border-top: 1px solid $color_border;
                }
                &:after {
                    content: '';
                    width: .5em;
                    height: .5em;
                    display: block;
                    position: absolute;
                    top: 50%;
                    right: .8em;
                    left: auto;
                    opacity: 0;
                    transform: rotate(45deg) translateY( -50% );
                    border-top: 1px solid #111111;
                    border-right: 1px solid #111111;
                    transition: all .3s ease;
                }
                a {
                    display: block;
                    padding: 0.72em 0px;
                    color: currentColor;
                }
                &.active {
                    &:after {
                        opacity: 1;
                    }
                }

            }
        }
        .wc-tabs-contents {
            width: 70%;
            float: right;
            @include for_device( mobile ) {
                width: 100%;
            }
        }
    }

    .wc-tabs-contents {
        margin-bottom: 2em;
        .woocommerce-Tabs-panel--description {
            p:last-child {
                margin-bottom: 0px;
            }
        }
    }
}

/**
Section and Toggle
 */
.wc-tabs-sections, .wc-tabs-toggle {
    .woocommerce-Reviews-title {
        display: none;
    }
}

.wc-tabs-sections {
    .tab-section-heading {
        font-size: 1.4em;
        a {
            color: currentColor;
        }
    }
    .tab-section-content {
        margin-top: 0px;
        padding-top: 0px;
        margin-bottom: 2em;
    }
}

.wc-tabs-toggle {
    .tab-section-heading {
        border-bottom: 1px solid $color_border;
        font-size: 1.1em;
        font-weight: normal;
        display: block;
        padding: 0;
        margin: 0px;
        a {
            color: currentColor;
            display: block;
            padding: 0.9em 0px;
            position: relative;
        }

        a {
            &:before, &:after {
                content: "";
                display: block;
                background-color: $color_border;
                position: absolute;
                top: 50%;
                right: 0px;
                opacity: 1;
                transition: opacity 0.3s linear;
            }

            &:before{
                width: 13px;
                height: 2px;
                top: 50%;
                transform: translateY( - 50% );
            }

            &:after {
                width: 2px;
                height: 13px;
                top: 50%;
                right: 6px;
                transform: translate( 1px, -50% );
            }

            &.active {
                &:after{
                    opacity: 0;
                }
            }

        }
    }

    .tab-section.active {
        .tab-section-heading {
            a {
                &:after {
                    opacity: 0;
                }
            }
        }
    }
}
.tab-section-content {
    padding-top: 1em;
}



/* Upsell + Related products section */
.related.products, .upsells.products {
    margin-bottom: 2em;
    h2 {
        font-size: 1.4em;
        margin-bottom: 0px;
    }
}

/**
* WooCommerce related heading
 */
.woocommerce-Reviews-title,
.cross-sells h2,
.cart_totals h2,
.wc-tab > h2
{
    font-size: 1.4em;
    margin-bottom: 1em;
}


wc/_wc-product.scss000066600000021331151135441770010314 0ustar00/**
* Product page
*/
div.product {
    div.images {
        @include for_device(mobile) {
            order: 5;
        }
    }

    div.thumbnails {
        @include clearfix();

        a {
            float: left;
            width: 30.75%;
            margin-right: 3.8%;
            margin-bottom: 1em;
        }

        a.last {
            margin-right: 0;
        }

        a.first {
            clear: both;
        }

        &.columns-1 {
            a {
                width: 100%;
                margin-right: 0;
                float: none;
            }
        }

        &.columns-2 {
            a {
                width: 48%;
            }
        }

        &.columns-4 {
            a {
                width: 22.05%;
            }
        }

        &.columns-5 {
            a {
                width: 16.9%;
            }
        }
    }


    #reviews {
        .comment {
            @include mediaright();
        }
    }
}

.woocommerce-pagination {
    ul.page-numbers {
        @include menu();
    }
}

div.product {
    margin-bottom: 0;
    position: relative;

    .product_title {
        clear: none;
        margin-top: 0;
        padding: 0;
        font-size: 2em;
        line-height: 1.216;
        @include for_device( tablet ) {
            font-size: 1.9em;
        }
        @include for_device( mobile ) {
            font-size: 1.7em;
        }
    }

    span.price,
    p.price {
        font-size: 1.25em;
        margin-bottom: 0.875em;
        ins {
            background: inherit;
            font-weight: 500;
            display: inline-block;
        }

        del {
            opacity: 0.5;
            display: inline-block;
        }
    }

    .stock {
        color: $highlight;
    }

    .out-of-stock {
        color: red;
    }

    .woocommerce-product-rating {
        margin-bottom: 0.72em;
        .woocommerce-review-link {
            display: none;
        }
    }
    .wc-product-images {
        position: relative;
    }

    div.images {
        margin-bottom: 2em;

        img {
            display: block;
            width: 100%;
            height: auto;
            box-shadow: none;
        }

        div.thumbnails {
            padding-top: 1em;
        }

        &.woocommerce-product-gallery {
            position: relative;
        }

        .woocommerce-product-gallery__wrapper {
            transition: all cubic-bezier(0.795, -0.035, 0.000, 1.000) .5s;
            margin: 0;
            padding: 0;
        }

        .woocommerce-product-gallery__wrapper .zoomImg {
            background-color: #fff;
            opacity: 0;
        }

        .woocommerce-product-gallery__image:nth-child(n+2) {
            width: 25%;
            display: inline-block;
        }

        .woocommerce-product-gallery__trigger {
            position: absolute;
            top: 15px;
            right: 15px;
            font-size: 1em;
            z-index: 9;
            width: 36px;
            height: 36px;
            background: rgba(255,255,255,0.5);
            border-radius: 100%;
            box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.08);
            color: #888888;
            opacity: 0.6;
            display: inline-block;
            transition: all 0.3s linear;
            box-sizing: content-box;
            overflow: hidden;
            line-height: 10em;
            &:hover, &:focus {
                opacity: 1;
                box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.26), 0 0 0 1px rgba(0, 0, 0, 0.18);
                background-color: rgba(255,255,255,0.99);
            }

            &:before {
                content: "\e035";
                font-family: "WooCommerce";
                display: flex;
                height: 100%;
                width: 100%;
                justify-content: center;
                align-items: center;
                position: absolute;
                top: 50%;
                left: 50%;
                font-size: 1em;
                line-height: 0;
                transform: translate( -50%, -50%);
                box-sizing: content-box;
            }

            img {
                display: none !important;
            }
        }

        .flex-control-thumbs {
            overflow: hidden;
            zoom: 1;
            margin: 10px -10px 0px;
            padding: 0;
            li {
                width: 25%;
                float: left;
                margin: 0;
                padding: 10px;
                list-style: none;
                &:last-child {
                    margin-right: 0px;
                }

                img {
                    cursor: pointer;
                    opacity: .5;
                    margin: 0;

                    &.flex-active,
                    &:hover {
                        opacity: 1;
                    }
                }
            }
        }
    }

    .woocommerce-product-gallery--columns-3 {
        .flex-control-thumbs li:nth-child(3n+1) {
            clear: left;
        }
    }

    .woocommerce-product-gallery--columns-4 {
        .flex-control-thumbs li:nth-child(4n+1) {
            clear: left;
        }
    }

    .woocommerce-product-gallery--columns-5 {
        .flex-control-thumbs li:nth-child(5n+1) {
            clear: left;
        }
    }

    div.summary {
        margin-bottom: 2em;
    }

    div.social {
        text-align: right;
        margin: 0 0 1em;

        span {
            margin: 0 0 0 2px;

            span {
                margin: 0;
            }

            .stButton .chicklets {
                padding-left: 16px;
                width: 0;
            }
        }

        iframe {
            float: left;
            margin-top: 3px;
        }
    }



    p.cart {
        margin-bottom: 2em;
        @include clearfix();
    }

    form.cart {
        margin-bottom: 1.41575em;
        @include clearfix();

        div.quantity {
            float: left;
            margin: 0 1em 0em 0;
        }

        table {
            border-width: 0 0 1px;

            td {
                padding-left: 0;
            }

            div.quantity {
                float: none;
                margin: 0;
            }

            small.stock {
                display: block;
                float: none;
            }
        }

        .variations {
            margin-bottom: 1.41575em;
            border: 0;
            width: 100%;

            tr {
                margin-bottom: 0.72em;
                display: block;
                &:last-child {
                    margin-bottom: 0;
                }
            }

            td,
            th {
                border: 0;
                vertical-align: top;
                line-height: 2em;
            }

            label {
                font-weight: 500;
            }

            select {
                max-width: 100%;
                min-width: 50%;
                width: 150px;
                display: inline-block;
                margin-right: 1em;
                color: #444444;
            }
            td.label {
                padding-right: 1em;
            }
        }

        .woocommerce-variation-description p {
            margin-bottom: 1em;
        }

        .reset_variations {
            visibility: hidden;
            font-size: 0.83em;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .wc-no-matching-variations {
            display: none;
        }

        .button {
            vertical-align: middle;
            float: left;
        }

        .group_table {
            td.woocommerce-grouped-product-list-item__label {
                padding-right: 1em;
                padding-left: 1em;
            }

            td {
                vertical-align: top;
                //padding-bottom: 0.5em;
                border: 0;
            }

            td:first-child {
                width: 11em;
                text-align: center;
                .button.product_type_variable {
                    font-size: 0.7em;
                    min-height: auto;
                    margin-left: 1em;
                }
            }

            .wc-grouped-product-add-to-cart-checkbox {
                display: inline-block;
                width: auto;
                margin: 0 auto;
                transform:scale(1.5, 1.5);
            }
        }
    }
}

span.onsale {
    padding: 2px 8px;
    position: absolute;
    text-align: center;
    top: 1em;
    left: 1em;
    margin: 0;
    border-radius: 2px;
    background-color: $highlight;
    color: $highlightext;
    font-size: 0.72em;
    z-index: 9;
    display: flex;
    align-items: center ;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: bold;
    .amount {
        color: inherit !important;
    }
}woocommerce-smallscreen.scss000066600000005346151135441770012312 0ustar00/**
 * woocommerce-smallscreen.scss
 * Optimises the default WooCommerce frontend layout when viewed on smaller screens.
 */

/**
 * Imports
 */
@import '../utils/vars';
@import "../utils/mixins";

/**
 * Style begins
 */
.woocommerce,
.woocommerce-page {

	table.shop_table_responsive {
		thead {
			display: none;
		}

		tbody {
			tr:first-child {
				td:first-child {
					border-top: 0;
				}
			}

			th {
				display: none;
			}
		}

		tr {
			display: block;

			td {
				display: block;
				text-align: right !important; // Important to overwrite order status inline styling

				&.order-actions {
					text-align: left !important; // This must always align left on handheld
				}

				&::before {
					content: attr(data-title) ': ';
					font-weight: 700;
					float: left;
				}

				&.product-remove,
				&.actions {
					&::before {
						display: none;
					}
				}
			}
		}
	}

	table.my_account_orders {
		tr {
			td {
				&.order-actions {
					text-align: left;

					&::before {
						display: none;
					}

					.button {
						float: none;
						margin: 0.125em 0.25em 0.125em 0;
					}
				}
			}
		}
	}

	/**
	 * General layout
	 */
	.col2-set {
		.col-1,
		.col-2 {
			float: none;
			width: 100%;
		}
	}

	/**
	 * Products
	 */
	ul.products[class*='columns-'] {
		li.product {
			width: 48%;
			float: left;
			clear: both;
			margin: 0 0 2.992em;

			&:nth-child( 2n ) {
				float: right;
				clear: none !important; // This should never clear.
			}
		}
	}

	/**
	 * Product Details
	 */
	div.product,
	#content div.product {
		div.images,
		div.summary {
			float: none;
			width: 100%;
		}
	}

	/**
	 * Cart
	 */
	table.cart,
	#content table.cart {
		.product-thumbnail {
			display: none;
		}

		td.actions {
			text-align: left;

			.coupon {
				float: none;
				@include clearfix();
				padding-bottom: 0.5em;
				width: 100%;
			}
			> .button {
				width: 100%;
			}
		}
	}

	.cart-collaterals {
		.cart_totals,
		.shipping_calculator,
		.cross-sells {
			width: 100%;
			float: none;
			text-align: left;
		}
	}

	/**
	 * Checkout
	 */
	&.woocommerce-checkout {
		form.login {
			.form-row {
				width: 100%;
				float: none;
			}
		}
	}

	#payment {
		.terms {
			text-align: left;
			padding: 0;
		}

		#place_order {
			float: none;
			width: 100%;
			box-sizing: border-box;
			margin-bottom: 1em;
		}
	}

	/**
	 * Account
	 */
	.lost_reset_password {
		.form-row-first,
		.form-row-last {
			width: 100%;
			float: none;
			margin-right: 0;
		}
	}
}

.woocommerce-account {
	.woocommerce-MyAccount-navigation,
	.woocommerce-MyAccount-content {
		float: none;
		width: 100%;
	}
}

/**
 * Twenty Thirteen specific styles
 */
.single-product {
	.twentythirteen {
		.panel {
			padding-left: 20px !important;
			padding-right: 20px !important;
		}
	}
}
woocommerce.scss000066600000004243151135441770007777 0ustar00@import '../utils/vars';
@import "../utils/mixins";
@import 'wc/woocommerce-mixins';
@import 'wc/woocommerce-vars';
@import 'wc/woocommerce-animation';
@import 'wc/woocommerce-fonts';
@import "wc/woocommerce-layout";
@import "wc/woocommerce-main";
@import "wc/wc-loop";
@import "wc/wc-widgets";
@import "wc/wc-cart";
@import "wc/wc-single-product";
@import "wc/wc-elements";
@import "wc/wc-product";
@import "wc/wc-order";
@import "wc/wc-forms";
@import "wc/wc-reviews";
@import "wc/wc-cart-checkout";


/* Sale on badge */
.woocommerce span.onsale {
    padding: .202em .602em;
}

/* Single Product */
.single-product div.product table.variations td, .single-product div.product table.variations th {
    display: list-item;
    padding: 0;
    list-style: none;
    background-color: transparent;
}
.single-product div.product .single_variation .price {
    margin-bottom: 1em;
    display: block;
}

/* My account navigation & content */
.woocommerce-account {
    .woocommerce-MyAccount-navigation {
        width: 24%;
        ul {
            list-style: none;
            margin-left: 0px;
            li {
                a {
                    display: block;
                    padding: 10px 0px 11px;
                    border-bottom: 1px solid $color_border;
                }
                &.is-active {
                    a {
                        color: $color_link_hover;
                    }
                }
            }
        }
    }
    .woocommerce-MyAccount-content {
        width: 72%;
    }
}

.footer_payment_methods {
    display: inline-block;
    margin: 0px;
    padding: 0px;
    list-style: none;
    font-size: 25px;
    line-height: 0px;
    li {
         i:before {
             line-height: 0px;
         }
        line-height: 0px;
        &:last-child {
            margin-right: 0px;
        }
        &:first-child {
            margin-left: 0px;
        }
        display: inline-block;
    }
}
.woocommerce-pagination{
	.customify-infinity-loader{
		.customify-infinity-button.button{
			&.loading{
				&::after{
					content: none!important;
				}
			}
		}
	}
}woocommerce/woocommerce.php000066600000061726151143723330012135 0ustar00<?php

class Customify_WC {
	static $_instance;

	static function get_instance() {
		if ( is_null( self::$_instance ) ) {
			self::$_instance = new self();
		}

		return self::$_instance;
	}

	function is_active() {
		return Customify()->is_woocommerce_active();
	}

	function __construct() {
		if ( $this->is_active() ) {
			/**
			 * Filter shop layout
			 *
			 * @see Customify_WC::shop_layout
			 */
			add_filter( 'customify_get_layout', array( $this, 'shop_layout' ) );
			/**
			 * Filter special meta values for shop pages.
			 *
			 * @see Customify_WC::get_post_metadata
			 */
			add_filter( 'get_post_metadata', array( $this, 'get_post_metadata' ), 999, 4 );

			add_action( 'widgets_init', array( $this, 'register_sidebars' ) );
			add_filter( 'customify/customizer/config', array( $this, 'customize_shop_sidebars' ) );
			add_filter( 'customify/sidebar-id', array( $this, 'shop_sidebar_id' ), 15, 2 );

			add_filter( 'customify_is_header_display', array( $this, 'show_shop_header' ), 15 );
			add_filter( 'customify_is_footer_display', array( $this, 'show_shop_footer' ), 15 );
			add_filter( 'customify_site_content_class', array( $this, 'shop_content_layout' ), 15 );
			add_filter( 'customify_builder_row_display_get_post_id', array( $this, 'builder_row_get_id' ), 15 );

			add_filter( 'customify/titlebar/args', array( $this, 'titlebar_args' ) );
			add_filter( 'customify/titlebar/config', array( $this, 'titlebar_config' ), 15, 2 );
			add_filter( 'customify/titlebar/is-showing', array( $this, 'titlebar_is_showing' ), 15 );
			add_filter( 'customify/page-header/get-settings', array( $this, 'get_page_header_settings' ) );

			add_filter( 'customify/theme/js', array( $this, 'add_js' ) );

			/**
			 * Woocommerce_sidebar hook.
			 *
			 * @hooked woocommerce_get_sidebar - 10
			 */
			add_action( 'wp', array( $this, 'wp' ) );

			// Custom styling.
			add_filter( 'customify/styling/primary-color', array( $this, 'styling_primary' ) );
			add_filter( 'customify/styling/secondary-color', array( $this, 'styling_secondary' ) );
			add_filter( 'customify/styling/link-color', array( $this, 'styling_linkcolor' ) );
			add_filter( 'customify/styling/color-border', array( $this, 'styling_border_color' ) );
			add_filter( 'customify/styling/color-meta', array( $this, 'styling_meta_color' ) );

			// Shopping Cart.
			require_once get_template_directory() . '/inc/compatibility/woocommerce/config/header/cart.php';
			add_filter( 'woocommerce_add_to_cart_fragments', array( $this, 'cart_fragments' ) );
			add_filter( 'Customify_JS', array( $this, 'Customify_JS' ) );

			add_filter( 'woocommerce_get_script_data', array( $this, 'woocommerce_get_script_data' ), 15, 2 );

			// Load theme style.
			add_filter( 'woocommerce_enqueue_styles', array( $this, 'custom_styles' ) );

			// Add body class.
			add_filter( 'body_class', array( $this, 'body_class' ) );
			add_filter( 'post_class', array( $this, 'post_class' ), 190, 3 );
			add_filter( 'product_cat_class', array( $this, 'post_cat_class' ), 15 );

			// Change number repleate product.
			add_action( 'customify_wc_loop_start', array( $this, 'loop_start' ) );
			add_filter( 'woocommerce_output_related_products_args', array( $this, 'related_products_args' ) );
			add_filter( 'woocommerce_upsell_display_args', array( $this, 'updsell_products_args' ) );
			add_action( 'woocommerce_before_single_product', array( $this, 'maybe_disable_upsell' ), 1 );
			add_action( 'woocommerce_before_single_product', array( $this, 'maybe_disable_related' ), 1 );

			// Catalog config.
			require_once get_template_directory() . '/inc/compatibility/woocommerce/config/catalog.php';
			// Product catalog designer.
			require_once get_template_directory() . '/inc/compatibility/woocommerce/config/catalog-designer.php';
			// Single product config.
			require_once get_template_directory() . '/inc/compatibility/woocommerce/config/single-product.php';

			// Single product config.
			require_once get_template_directory() . '/inc/compatibility/woocommerce/config/cart.php';

			// Single colors config.
			require_once get_template_directory() . '/inc/compatibility/woocommerce/config/colors.php';
			// Template Hooks.
			require_once get_template_directory() . '/inc/compatibility/woocommerce/inc/template-hooks.php';

			// Overwrite Categories Walker.
			add_filter( 'woocommerce_product_categories_widget_args', array( $this, 'customify_wc_cat_list_args' ) );

			/**
			 * Move sale flash to new hook wc_product_images_after
			 *
			 * @since 0.2.3
			 */
			remove_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_sale_flash' );
			add_action( 'wc_product_images_after', 'woocommerce_show_product_sale_flash' );

			/**
			 * Move WC Product images to new hook woocommerce_single_product_media
			 * This hook created from theme.
			 */
			remove_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 );
			add_action( 'woocommerce_single_product_media', 'woocommerce_show_product_images', 20 );

			// New breadcrumb position.
			add_filter( 'woocommerce_breadcrumb_defaults', array( $this, 'woocommerce_breadcrumb_args' ) );

		}
	}

	function woocommerce_breadcrumb_args( $args ) {
		$args['delimiter']   = '';
		$args['wrap_before'] = '<nav class="woocommerce-breadcrumb text-uppercase text-xsmall link-meta">';
		$args['wrap_after']  = '</nav>';

		return $args;
	}


	/**
	 * Overwrite Categories Walker
	 *
	 * @see WC_Product_Cat_List_Walker
	 *
	 * @param array $args List args.
	 *
	 * @return mixed
	 */
	function customify_wc_cat_list_args( $args ) {
		require_once get_template_directory() . '/inc/compatibility/woocommerce/inc/class-wc-product-cat-list-walker.php';
		$args['walker'] = new Customify_WC_Product_Cat_List_Walker();

		return $args;
	}

	function woocommerce_get_script_data( $data, $handle ) {
		if ( 'woocommerce' == $handle ) {
			$data['qty_pm'] = apply_filters( 'customify_qty_add_plus_minus', 1 );
		}

		return $data;
	}

	/**
	 * Custom number layout
	 */
	function loop_start() {

		/**
		 * @see wc_set_loop_prop
		 */
		$name = wc_get_loop_prop( 'name' );

		wc_set_loop_prop( 'media_secondary', Customify()->get_setting( 'wc_cd_media_secondary' ) );

		if ( ! $name ) { // Main loop.
			wc_set_loop_prop( 'columns', get_option( 'woocommerce_catalog_columns' ) );
			wc_set_loop_prop( 'tablet_columns', get_theme_mod( 'woocommerce_catalog_tablet_columns' ) );
			wc_set_loop_prop( 'mobile_columns', Customify()->get_setting( 'woocommerce_catalog_mobile_columns' ) );

		} elseif ( 'related' == $name || 'up-sells' == $name || 'cross-sells' == $name ) {

			if ( 'up-sells' == $name ) {
				$columns = Customify()->get_setting( 'wc_single_product_upsell_columns', 'all' );
			} else {
				$columns = Customify()->get_setting( 'wc_single_product_related_columns', 'all' );
			}

			$columns = wp_parse_args(
				$columns,
				array(
					'desktop' => 3,
					'tablet'  => 3,
					'mobile'  => 1,
				)
			);

			if ( ! $columns ) {
				$columns['desktop'] = 3;
			}

			wc_set_loop_prop( 'columns', $columns['desktop'] );
			wc_set_loop_prop( 'tablet_columns', $columns['tablet'] );
			wc_set_loop_prop( 'mobile_columns', $columns['mobile'] );
		}

	}


	/**
	 * Custom number related products
	 *
	 * @param array $args Query args.
	 *
	 * @return mixed
	 */
	function related_products_args( $args ) {
		$args['posts_per_page'] = Customify()->get_setting( 'wc_single_product_related_number' );

		return $args;
	}

	function maybe_disable_related() {
		$n = Customify()->get_setting( 'wc_single_product_related_number' );
		if ( 0 == $n ) {
			remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20 );
		}
	}

	function maybe_disable_upsell() {
		$n = Customify()->get_setting( 'wc_single_product_upsell_number' );
		if ( 0 == $n ) {
			remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 );
		}
	}

	/**
	 * Custom number related products
	 *
	 * @param array $args WP Query args.
	 *
	 * @return mixed
	 */
	function updsell_products_args( $args ) {
		$args['posts_per_page'] = Customify()->get_setting( 'wc_single_product_upsell_number' );

		return $args;
	}

	function related_products_columns() {
		return 3;
	}

	function post_cat_class( $classes ) {
		$classes[] = 'customify-col';

		return $classes;
	}

	function post_class( $classes, $class, $post_id ) {

		global $post;
		if ( ! $post_id ) {
			if ( is_object( $post ) && property_exists( $post, 'ID' ) ) {
				$post_id = $post->ID;
			}
		}

		if ( ! $post_id || get_post_type( $post ) !== 'product' ) {
			return $classes;
		}

		global $product;

		if ( is_object( $product ) ) { // Do not add class if is single product.

			if ( isset( $GLOBALS['woocommerce_loop'] ) && ! empty( $GLOBALS['woocommerce_loop'] ) ) {
				if ( is_product() ) {
					if ( $GLOBALS['woocommerce_loop']['name'] ) {
						$classes[] = 'customify-col';
					}
				} else {
					$classes[] = 'customify-col';
				}
			}
		}

		if ( is_object( $product ) ) {
			$setting = wc_get_loop_prop( 'media_secondary' );
			if ( 'none' != $setting ) {
				$image_ids = $product->get_gallery_image_ids();
				if ( $image_ids ) {
					$classes[] = 'product-has-gallery';
				}
			}
		}

		return $classes;
	}

	function body_class( $classes ) {
		$classes['woocommerce'] = 'woocommerce';
		if ( version_compare( WC()->version, '3.6.0' ) >= 0 ) {
			$classes[] = 'later-wc-version';
		}

		return $classes;
	}

	/**
	 * Load load theme styling instead.
	 *
	 * @param array $enqueue_styles List enqueue styles.
	 *
	 * @return mixed
	 */
	function custom_styles( $enqueue_styles ) {
		$suffix                                        = Customify()->get_asset_suffix();
		$enqueue_styles['woocommerce-general']['src']  = esc_url( get_template_directory_uri() ) . '/assets/css/compatibility/woocommerce' . $suffix . '.css';
		$enqueue_styles['woocommerce-general']['deps'] = 'customify-style';

		if ( isset( $enqueue_styles['woocommerce-layout'] ) ) {
			unset( $enqueue_styles['woocommerce-layout'] ); // Remove the layout.
		}

		if ( isset( $enqueue_styles['woocommerce-smallscreen'] ) ) {
			$enqueue_styles['woocommerce-smallscreen']['deps'] = '';
			$enqueue_styles['woocommerce-smallscreen']['src']  = esc_url( get_template_directory_uri() ) . '/assets/css/compatibility/woocommerce-smallscreen' . $suffix . '.css';
			$b                                                 = $enqueue_styles['woocommerce-smallscreen'];
			unset( $enqueue_styles['woocommerce-smallscreen'] );
			$enqueue_styles['woocommerce-smallscreen'] = $b;
		}

		return $enqueue_styles;
	}

	/**
	 * Add more settings to Customify JS
	 *
	 * @param array $args JS settings.
	 *
	 * @return mixed
	 */
	function Customify_JS( $args ) {
		$args['wc_open_cart'] = false;
		if ( isset( $_REQUEST['add-to-cart'] ) && ! empty( $_REQUEST['add-to-cart'] ) ) {
			$args['wc_open_cart'] = true;
		}

		return $args;
	}

	/**
	 * Add more args for cart
	 *
	 * @see WC_AJAX::get_refreshed_fragments();
	 *
	 * @param array $cart_fragments
	 *
	 * @return array
	 */
	function cart_fragments( $cart_fragments = array() ) {
		$sub_total = WC()->cart->get_cart_subtotal();

		$cart_fragments['.customify-wc-sub-total'] = '<span class="customify-wc-sub-total">' . $sub_total . '</span>';
		$quantities                                = WC()->cart->get_cart_item_quantities();

		$qty   = array_sum( $quantities );
		$class = 'customify-wc-total-qty';
		if ( $qty <= 0 ) {
			$class .= ' hide-qty';
		}

		$cart_fragments['.customify-wc-total-qty'] = '<span class="' . $class . '">' . $qty . '</span>';

		return $cart_fragments;
	}

	function styling_primary( $selector ) {
		$selector .= ' 
        
        .wc-svg-btn.active,
        .woocommerce-tabs.wc-tabs-horizontal ul.tabs li.active,
        #review_form {
            border-color: {{value}};
        }
        
        .wc-svg-btn.active,
        .wc-single-tabs ul.tabs li.active a,
        .wc-single-tabs .tab-section.active .tab-section-heading a {
            color: {{value}};
        }';

		return $selector;
	}

	function styling_secondary( $selector ) {
		$selector .= ' 
        
        .add_to_cart_button
        {
            background-color: {{value}};
        }';

		return $selector;
	}

	function styling_linkcolor( $selector ) {
		$selector .= '
		 
		.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a,
        .woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
            color: {{value}};
        }';

		return $selector;
	}

	function styling_border_color( $selector ) {
		$selector .= '
		.widget_price_filter .price_slider_wrapper .ui-widget-content {
		    background-color: {{value}};
		}
		.product_list_widget li,
		#reviews #comments ol.commentlist li .comment-text,
		.woocommerce-tabs.wc-tabs-vertical .wc-tabs li,
		.product_meta > span,
		.woocommerce-tabs.wc-tabs-horizontal ul.tabs,
		.woocommerce-tabs.wc-tabs-vertical .wc-tabs li:first-child {
            border-color: {{value}};
        }';

		return $selector;
	}

	function styling_meta_color( $selector ) {
		$selector .= '
		.widget_price_filter .ui-slider .ui-slider-handle {
		    border-color: {{value}};
		}
		.wc-product-inner .wc-product__category a {
		    color: {{value}};
		}
		.widget_price_filter .ui-slider .ui-slider-range,
		.widget_price_filter .price_slider_amount .button {
            background-color: {{value}};
        }';

		return $selector;
	}

	function wp() {
		remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar' );
	}

	function add_css( $css_files ) {
		$suffix                          = Customify()->get_asset_suffix();
		$css_files['plugin-woocommerce'] = esc_url( get_template_directory_uri() ) . '/assets/css/compatibility/woocommerce' . $suffix . '.css';

		return $css_files;
	}

	function add_js( $js_files ) {
		$suffix                         = Customify()->get_asset_suffix();
		$js_files['plugin-woocommerce'] = array(
			'url' => esc_url( get_template_directory_uri() ) . '/assets/js/compatibility/woocommerce' . $suffix . '.js',
			'deps' => array( 'jquery' ),
		);

		return $js_files;
	}

	function get_shop_page_meta( $meta_key ) {
		return get_post_meta( wc_get_page_id( 'shop' ), $meta_key, true );
	}

	function is_shop_pages() {
		return ( is_shop() || is_product_category() || is_product_tag() || is_product() );
	}

	function builder_row_get_id( $id ) {
		if ( $this->is_shop_pages() ) {
			$id = wc_get_page_id( 'shop' );
		}

		return $id;
	}

	function shop_content_layout( $classes = array() ) {
		if ( $this->is_shop_pages() ) {
			$page_layout = $this->get_shop_page_meta( '_customify_content_layout' );
			if ( $page_layout ) {
				$classes['content_layout'] = 'content-' . sanitize_text_field( $page_layout );
			}
		}

		return $classes;
	}

	function show_shop_header( $show = true ) {
		if ( $this->is_shop_pages() ) {
			$disable = $this->get_shop_page_meta( '_customify_disable_header' );
			if ( $disable ) {
				$show = false;
			}
		}

		return $show;
	}

	function show_shop_footer( $show = true ) {
		if ( $this->is_shop_pages() ) {
			$rows    = array( 'main', 'bottom' );
			$count   = 0;
			$shop_id = wc_get_page_id( 'shop' );
			foreach ( $rows as $row_id ) {
				if ( ! customify_is_builder_row_display( 'footer', $row_id, $shop_id ) ) {
					$count ++;
				}
			}
			if ( $count >= count( $rows ) ) {
				$show = false;
			}
		}

		return $show;
	}

	function show_shop_title( $show = true ) {
		if ( $this->is_shop_pages() ) {
			$disable = $this->get_shop_page_meta( '_customify_disable_page_title' );
			if ( $disable ) {
				$show = false;
			}
		}

		if ( $this->titlebar_is_showing() ) {
			$show = false;
		}

		return apply_filters( 'customify_is_shop_title_display', $show );
	}

	/**
	 * Filter header settings pargs
	 *
	 * @TODO display category thumbnail as header cover if set.
	 *
	 * @param array $args
	 *
	 * @return mixed
	 */
	function get_page_header_settings( $args ) {
		if ( is_product_taxonomy() ) {
			global $wp_query;
			$cat          = $wp_query->get_queried_object();
			$thumbnail_id = get_term_meta( $cat->term_id, 'thumbnail_id', true );
			$image        = Customify()->get_media( $thumbnail_id, 'full' );
			if ( $image ) {
				$args['image'] = $image;
			}
		}

		return $args;
	}

	function titlebar_is_showing( $show = true ) {

		if ( is_shop() ) {
			// Do not show if page settings disable page title.
			if ( Customify_Breadcrumb::get_instance()->support_plugins_active() && ! Customify()->get_setting( 'titlebar_display_product' ) ) {
				$show = false;
			} else {
				$show = true;
			}
			if ( Customify()->is_using_post() ) {
				$breadcrumb_display = get_post_meta( wc_get_page_id( 'shop' ), '_customify_breadcrumb_display', true );
				if ( 'hide' == $breadcrumb_display ) {
					$show = false;
				} elseif ( 'show' == $breadcrumb_display ) {
					$show = true;
				}
			}
		} elseif ( is_product_taxonomy() ) {
			if ( Customify()->get_setting( 'titlebar_display_product_tax' ) ) {
				$show = true;
			} else {
				$show = false;
			}
		} elseif ( is_product() ) {
			if ( Customify()->get_setting( 'titlebar_display_product' ) ) {
				$show = true;
			} else {
				$show = false;
			}
		}

		return $show;
	}

	function titlebar_config( $config, $titlebar ) {
		$section = 'titlebar';

		$config[] = array(
			'name'           => "{$section}_display_product_tax",
			'type'           => 'checkbox',
			'default'        => 1,
			'section'        => $section,
			'checkbox_label' => __( 'Display on product taxonomies (categories/tags,..)', 'customify' ),
		);

		$config[] = array(
			'name'           => "{$section}_display_product",
			'type'           => 'checkbox',
			'default'        => 1,
			'section'        => $section,
			'checkbox_label' => __( 'Display on single product', 'customify' ),
		);

		return $config;
	}

	function titlebar_args( $args ) {
		if ( is_product_taxonomy() ) {
			$t             = get_queried_object();
			$args['title'] = $t->name;
		} elseif ( is_singular( 'product' ) ) {
			$args['title'] = get_the_title( wc_get_page_id( 'shop' ) );
			$args['tag']   = 'h2';
		}

		return $args;
	}

	function shop_sidebar_id( $id, $sidebar_type = null ) {
		if ( $this->is_shop_pages() ) {
			switch ( $sidebar_type ) {
				case 'secondary':
					return 'shop-sidebar-2';
				default:
					return 'shop-sidebar-1';
			}
		}

		return $id;
	}

	function customize_shop_sidebars( $configs = array() ) {
		return $configs;
	}

	function register_sidebars() {
		register_sidebar(
			array(
				'name'          => esc_html__( 'WooCommerce Primary Sidebar', 'customify' ),
				'id'            => 'shop-sidebar-1',
				'description'   => esc_html__( 'Add widgets here.', 'customify' ),
				'before_widget' => '<section id="%1$s" class="widget %2$s">',
				'after_widget'  => '</section>',
				'before_title'  => '<h4 class="widget-title">',
				'after_title'   => '</h4>',
			)
		);
		register_sidebar(
			array(
				'name'          => esc_html__( 'WooCommerce Secondary Sidebar', 'customify' ),
				'id'            => 'shop-sidebar-2',
				'description'   => esc_html__( 'Add widgets here.', 'customify' ),
				'before_widget' => '<section id="%1$s" class="widget %2$s">',
				'after_widget'  => '</section>',
				'before_title'  => '<h4 class="widget-title">',
				'after_title'   => '</h4>',
			)
		);
	}


	/**
	 * Filter meta key for shop pages
	 *
	 * @param string $value
	 * @param string $object_id
	 * @param string $meta_key
	 * @param bool   $single
	 *
	 * @return mixed
	 */
	function get_post_metadata( $value, $object_id, $meta_key, $single ) {
		$meta_keys = array(
			'_customify_page_header_display' => '',
			'_customify_breadcrumb_display'  => '',
		);

		if ( ! isset( $meta_keys[ $meta_key ] ) ) {
			return $value;
		}

		if ( wc_get_page_id( 'cart' ) == $object_id || wc_get_page_id( 'checkout' ) == $object_id ) {

			$meta_type = 'post';

			$meta_cache = wp_cache_get( $object_id, $meta_type . '_meta' );

			if ( ! $meta_cache ) {
				$meta_cache = update_meta_cache( $meta_type, array( $object_id ) );
				$meta_cache = $meta_cache[ $object_id ];
			}

			if ( ! $meta_key ) {
				return $value;
			}

			if ( isset( $meta_cache[ $meta_key ] ) ) {
				if ( $single ) {
					$value = maybe_unserialize( $meta_cache[ $meta_key ][0] );
				} else {
					$value = array_map( 'maybe_unserialize', $meta_cache[ $meta_key ] );
				}
			}

			if ( ! is_array( $value ) ) {
				$value = array( $value );
			}

			switch ( $meta_key ) {
				case '_customify_page_header_display':
					if ( empty( $value ) || 'default' == $value[0] || 'normal' == $value[0] || ! $value[0] ) {
						$value[0] = 'normal';
					}
					break;
				case '_customify_breadcrumb_display':
					if ( empty( $value ) || 'default' == $value[0] || ! $value[0] ) {
						$value[0] = 'hide';
					}
					break;

			}
		}

		return $value;
	}

	/**
	 * Special shop layout
	 *
	 * @param bool $layout
	 *
	 * @return string
	 */
	function shop_layout( $layout = false ) {
		if ( $this->is_shop_pages() ) {
			$default     = Customify()->get_setting( 'sidebar_layout' );
			$page        = Customify()->get_setting( 'page_sidebar_layout' );
			$page_id     = wc_get_page_id( 'shop' );
			$page_custom = get_post_meta( $page_id, '_customify_sidebar', true );
			if ( $page_custom ) {
				$layout = $page_custom;
			} elseif ( $page ) {
				$layout = $page;
			} else {
				$layout = $default;
			}
		}

		if ( is_product() ) {
			$product_sidebar = get_post_meta( get_the_ID(), '_customify_sidebar', true );
			if ( ! $product_sidebar ) {
				$product_custom = Customify()->get_setting( 'product_sidebar_layout' );
				if ( $product_custom && 'default' != $product_custom ) {
					$layout = $product_custom;
				}
			} else {
				$layout = $product_sidebar;
			}
		}

		return $layout;
	}
}

function Customify_WC() {
	return Customify_WC::get_instance();
}

if ( Customify()->is_woocommerce_active() ) {
	Customify_WC();
}

/**
 * Get default view for product catalog
 *
 * @return string
 */
function customify_get_default_catalog_view_mod() {
	$name    = wc_get_loop_prop( 'name' );
	$default = Customify()->get_setting( 'wc_cd_default_view' );
	if ( $name ) {
		return apply_filters( 'customify_get_default_catalog_view_mod', 'grid' );
	}

	$use_cookies = true;
	if ( is_customize_preview() ) {
		$use_cookies = false;
	}

	if ( ! Customify()->get_setting( 'wc_cd_show_view_mod' ) ) {
		$use_cookies = false;
	}

	if ( $use_cookies ) { // Do not use cookie in customize.
		$cookie_mod = ( isset( $_COOKIE['customify_wc_pl_view_mod'] ) && $_COOKIE['customify_wc_pl_view_mod'] ) ? sanitize_text_field( $_COOKIE['customify_wc_pl_view_mod'] ) : false; // WPCS: sanitization ok.
		if ( $cookie_mod ) {
			if ( 'grid' == $cookie_mod || 'list' == $cookie_mod ) {
				$default = $cookie_mod;
			}
		}
	}

	if ( ! $default ) {
		$default = 'grid';
	}

	return apply_filters( 'customify_get_default_catalog_view_mod', $default );
}


if ( ! function_exists( 'woocommerce_template_loop_product_link_open' ) ) {
	/**
	 * Insert the opening anchor tag for products in the loop.
	 *
	 * @param string $classs
	 */
	function woocommerce_template_loop_product_link_open( $classs = '' ) {
		global $product;

		$link = apply_filters( 'woocommerce_loop_product_link', get_the_permalink(), $product );

		echo '<a href="' . esc_url( $link ) . '" class="woocommerce-LoopProduct-link woocommerce-loop-product__link">';
	}
}

if ( ! function_exists( 'woocommerce_shop_loop_item_title' ) ) {
	/**
	 * Show the product title in the product loop. By default this is an H2.
	 * Overridden function `woocommerce_shop_loop_item_title`
	 */
	function woocommerce_template_loop_product_title() {
		echo '<h2 class="woocommerce-loop-product__title">';
		woocommerce_template_loop_product_link_open();
		echo get_the_title();
		woocommerce_template_loop_product_link_close();
		echo '</h2>';
	}
}

/**
 * Template pages
 */

if ( ! function_exists( 'woocommerce_content' ) ) {
	/**
	 * Output WooCommerce content.
	 *
	 * This function is only used in the optional 'woocommerce.php' template.
	 * which people can add to their themes to add basic woocommerce support.
	 * without hooks or modifying core templates.
	 */
	function woocommerce_content() {
		if ( is_singular( 'product' ) ) {
			while ( have_posts() ) :
				the_post();
				wc_get_template_part( 'content', 'single-product' );
			endwhile;
		} else {
			$view = customify_get_default_catalog_view_mod();
			?>
			<div class="woocommerce-listing wc-product-listing <?php echo esc_attr( 'wc-' . $view . '-view' ); ?>">
				<?php
				if ( Customify_WC()->show_shop_title() ) {
					if ( apply_filters( 'woocommerce_show_page_title', true ) ) : ?>
						<h1 class="page-title"><?php woocommerce_page_title(); ?></h1>
						<?php
					endif;
					do_action( 'woocommerce_archive_description' );
				}
				if ( have_posts() ) {
					do_action( 'woocommerce_before_shop_loop' );
					woocommerce_product_loop_start();
					while ( have_posts() ) :
						the_post();
						wc_get_template_part( 'content', 'product' );
						endwhile; // end of the loop.
					woocommerce_product_loop_end();
					do_action( 'woocommerce_after_shop_loop' );
				} elseif ( ! woocommerce_product_subcategories(
					array(
						'before' => woocommerce_product_loop_start( false ),
						'after'  => woocommerce_product_loop_end( false ),
					)
				) ) {
					do_action( 'woocommerce_no_products_found' );
				}
				?>
			</div>
			<?php
		}
	}
}
woocommerce/config/cart.php000066600000002611151143723330012000 0ustar00<?php

/**
 * Cart config
 *
 * Class Customify_WC_Cart.
 *
 * @since 0.2.2
 */
class Customify_WC_Cart {
	public function __construct() {
		add_filter( 'customify/customizer/config', array( $this, 'config' ), 100 );
		if ( is_admin() || is_customize_preview() ) {
			add_filter( 'Customify_Control_Args', array( $this, 'add_cart_url' ), 35 );
		}

		add_action( 'wp', array( $this, 'cart_hooks' ) );
	}

	public function cart_hooks() {
		if ( ! is_cart() ) {
			return;
		}

		$hide_cross_sell = Customify()->get_setting( 'wc_cart_page_hide_cross_sells' );
		if ( $hide_cross_sell ) {
			remove_action( 'woocommerce_cart_collaterals', 'woocommerce_cross_sell_display' );
			remove_action( 'woocommerce_after_cart_table', 'woocommerce_cross_sell_display' );
		}

	}

	public function add_cart_url( $args ) {
		$args['section_urls']['wc_cart_page'] = get_permalink( wc_get_page_id( 'cart' ) );

		return $args;
	}

	public function config( $configs ) {
		$section = 'wc_cart_page';

		$configs[] = array(
			'name'  => $section,
			'type'  => 'section',
			'panel' => 'woocommerce',
			'title' => __( 'Cart', 'customify' ),
		);

		$configs[] = array(
			'name'           => "{$section}_hide_cross_sells",
			'type'           => 'checkbox',
			'default'        => 1,
			'section'        => $section,
			'checkbox_label' => __( 'Hide cross-sells', 'customify' ),
		);

		return $configs;
	}
}

new Customify_WC_Cart();
woocommerce/config/colors.php000066600000004323151143723330012352 0ustar00<?php

class Customify_WC_Colors {
	function __construct() {
		add_filter( 'customify/customizer/config', array( $this, 'config' ), 100 );
	}

	function config( $configs ) {
		$section = 'global_styling';

		$configs[] = array(
			'name'    => "{$section}_shop_colors_heading",
			'type'    => 'heading',
			'section' => $section,
			'title'   => __( 'Shop Colors', 'customify' ),
		);

		$configs[] = array(
			'name'        => "{$section}_shop_primary",
			'type'        => 'color',
			'section'     => $section,
			'title'       => __( 'Shop Buttons', 'customify' ),
			'placeholder' => '#c3512f',
			'description' => __( 'Color for add to cart, checkout buttons. Default is Secondary Color.', 'customify' ),
			'css_format'  => apply_filters(
				'customify/styling/shop-buttons',
				'
					.woocommerce .button.add_to_cart_button, 
					.woocommerce .button.alt,
					.woocommerce .button.added_to_cart, 
					.woocommerce .button.checkout, 
					.woocommerce .button.product_type_variable,
					.item--wc_cart .cart-icon .cart-qty .customify-wc-total-qty
					{
					    background-color: {{value}};
					}'
			),
			'selector'    => 'format',
		);

		$configs[] = array(
			'name'        => "{$section}_shop_rating_stars",
			'type'        => 'color',
			'section'     => $section,
			'title'       => __( 'Rating Stars', 'customify' ),
			'description' => __( 'Color for rating stars, default is Secondary Color.', 'customify' ),
			'placeholder' => '#c3512f',
			'css_format'  => apply_filters(
				'customify/styling/shop-rating-stars',
				'
					.comment-form-rating a, 
					.star-rating,
					.comment-form-rating a:hover, 
					.comment-form-rating a:focus, 
					.star-rating:hover, 
					.star-rating:focus
					{
					    color: {{value}};
					}'
			),
			'selector'    => 'format',
		);

		$configs[] = array(
			'name'        => "{$section}_shop_onsale",
			'type'        => 'color',
			'section'     => $section,
			'title'       => __( 'On Sale', 'customify' ),
			'placeholder' => '#77a464',
			'css_format'  => apply_filters(
				'customify/styling/shop-onsale',
				'
					span.onsale
					{
					    background-color: {{value}};
					}'
			),
			'selector'    => 'format',
		);

		return $configs;
	}
}

new Customify_WC_Colors();
woocommerce/config/header/cart.php000066600000031740151143723330013235 0ustar00<?php

class Customify_Builder_Item_WC_Cart {
	/**
	 * @var string Item Id.
	 */
	public $id = 'wc_cart'; // Required.
	/**
	 * @var string Section ID.
	 */
	public $section = 'wc_cart'; // Optional.
	/**
	 * @var string Item Name.
	 */
	public $name = 'wc_cart'; // Optional.
	/**
	 * @var string|void Item label.
	 */
	public $label = ''; // Optional.
	/**
	 * @var int Priority.
	 */
	public $priority = 200;
	/**
	 * @var string Panel ID.
	 */
	public $panel = 'header_settings';

	/**
	 * Optional construct
	 *
	 * Customify_Builder_Item_HTML constructor.
	 */
	public function __construct() {
		$this->label = __( 'Shopping Cart', 'customify' );
	}

	/**
	 * Register Builder item
	 *
	 * @return array
	 */
	public function item() {
		return array(
			'name'    => $this->label,
			'id'      => $this->id,
			'col'     => 0,
			'width'   => '4',
			'section' => $this->section, // Customizer section to focus when click settings.
		);
	}

	/**
	 * Optional, Register customize section and panel.
	 *
	 * @return array
	 */
	function customize() {
		$fn     = array( $this, 'render' );
		$config = array(
			array(
				'name'     => $this->section,
				'type'     => 'section',
				'panel'    => $this->panel,
				'priority' => $this->priority,
				'title'    => $this->label,
			),

			array(
				'name'            => "{$this->name}_text",
				'type'            => 'text',
				'section'         => $this->section,
				'selector'        => '.builder-header-' . $this->id . '-item',
				'render_callback' => $fn,
				'title'           => __( 'Label', 'customify' ),
				'default'         => __( 'Cart', 'customify' ),
			),

			array(
				'name'            => "{$this->name}_icon",
				'type'            => 'icon',
				'section'         => $this->section,
				'selector'        => '.builder-header-' . $this->id . '-item',
				'render_callback' => $fn,
				'default'         => array(
					'icon' => 'fa fa-shopping-basket',
					'type' => 'font-awesome',
				),
				'title'           => __( 'Icon', 'customify' ),
			),

			array(
				'name'            => "{$this->name}_icon_position",
				'type'            => 'select',
				'section'         => $this->section,
				'selector'        => '.builder-header-' . $this->id . '-item',
				'render_callback' => $fn,
				'default'         => 'after',
				'choices'         => array(
					'before' => __( 'Before', 'customify' ),
					'after'  => __( 'After', 'customify' ),
				),
				'title'           => __( 'Icon Position', 'customify' ),
			),

			array(
				'name'            => "{$this->name}_link_to",
				'type'            => 'select',
				'section'         => $this->section,
				'selector'        => '.builder-header-' . $this->id . '-item',
				'render_callback' => $fn,
				'default'         => 'cart',
				'choices'         => array(
					'cart'     => __( 'Cart Page', 'customify' ),
					'checkout' => __( 'Checkout', 'customify' ),
				),
				'title'           => __( 'Link To', 'customify' ),
			),

			array(
				'name'            => "{$this->name}_show_label",
				'type'            => 'checkbox',
				'default'         => array(
					'desktop' => 1,
					'tablet'  => 1,
					'mobile'  => 0,
				),
				'section'         => $this->section,
				'selector'        => '.builder-header-' . $this->id . '-item',
				'render_callback' => $fn,
				'theme_supports'  => '',
				'label'           => __( 'Show Label', 'customify' ),
				'checkbox_label'  => __( 'Show Label', 'customify' ),
				'device_settings' => true,
			),

			array(
				'name'            => "{$this->name}_show_sub_total",
				'type'            => 'checkbox',
				'section'         => $this->section,
				'selector'        => '.builder-header-' . $this->id . '-item',
				'render_callback' => $fn,
				'theme_supports'  => '',
				'label'           => __( 'Sub Total', 'customify' ),
				'checkbox_label'  => __( 'Show Sub Total', 'customify' ),
				'device_settings' => true,
				'default'         => array(
					'desktop' => 1,
					'tablet'  => 1,
					'mobile'  => 0,
				),
			),

			array(
				'name'            => "{$this->name}_show_qty",
				'type'            => 'checkbox',
				'section'         => $this->section,
				'selector'        => '.builder-header-' . $this->id . '-item',
				'render_callback' => $fn,
				'default'         => 1,
				'label'           => __( 'Quantity', 'customify' ),
				'checkbox_label'  => __( 'Show Quantity', 'customify' ),
			),

			array(
				'name'            => "{$this->name}_sep",
				'type'            => 'text',
				'section'         => $this->section,
				'selector'        => '.builder-header-' . $this->id . '-item',
				'render_callback' => $fn,
				'title'           => __( 'Separator', 'customify' ),
				'default'         => __( '/', 'customify' ),
			),

			array(
				'name'       => "{$this->name}_label_styling",
				'type'       => 'styling',
				'section'    => $this->section,
				'title'      => __( 'Styling', 'customify' ),
				'selector'   => array(
					'normal' => '.builder-header-' . $this->id . '-item .cart-item-link',
					'hover'  => '.builder-header-' . $this->id . '-item:hover .cart-item-link',
				),
				'css_format' => 'styling',
				'default'    => array(),
				'fields'     => array(
					'normal_fields' => array(
						'link_color'    => false, // disable for special field.
						'margin'        => false,
						'bg_image'      => false,
						'bg_cover'      => false,
						'bg_position'   => false,
						'bg_repeat'     => false,
						'bg_attachment' => false,
					),
					'hover_fields'  => array(
						'link_color' => false, // disable for special field.
					),
				),
			),

			array(
				'name'       => "{$this->name}_typography",
				'type'       => 'typography',
				'section'    => $this->section,
				'title'      => __( 'Typography', 'customify' ),
				'selector'   => '.builder-header-' . $this->id . '-item',
				'css_format' => 'typography',
				'default'    => array(),
			),

			array(
				'name'    => "{$this->name}_icon_h",
				'type'    => 'heading',
				'section' => $this->section,
				'title'   => __( 'Icon Settings', 'customify' ),
			),

			array(
				'name'            => "{$this->name}_icon_size",
				'type'            => 'slider',
				'section'         => $this->section,
				'device_settings' => true,
				'max'             => 150,
				'title'           => __( 'Icon Size', 'customify' ),
				'selector'        => '.builder-header-' . $this->id . '-item .cart-icon i:before',
				'css_format'      => 'font-size: {{value}};',
				'default'         => array(),
			),

			array(
				'name'        => "{$this->name}_icon_styling",
				'type'        => 'styling',
				'section'     => $this->section,
				'title'       => __( 'Styling', 'customify' ),
				'description' => __( 'Advanced styling for cart icon', 'customify' ),
				'selector'    => array(
					'normal' => '.builder-header-' . $this->id . '-item .cart-item-link .cart-icon i',
					'hover'  => '.builder-header-' . $this->id . '-item:hover .cart-item-link .cart-icon i',
				),
				'css_format'  => 'styling',
				'default'     => array(),
				'fields'      => array(
					'normal_fields' => array(
						'link_color'    => false, // disable for special field.
						'bg_image'      => false,
						'bg_cover'      => false,
						'bg_position'   => false,
						'bg_repeat'     => false,
						'bg_attachment' => false,
					),
					'hover_fields'  => array(
						'link_color' => false, // disable for special field.
					),
				),
			),

			array(
				'name'        => "{$this->name}_qty_styling",
				'type'        => 'styling',
				'section'     => $this->section,
				'title'       => __( 'Quantity', 'customify' ),
				'description' => __( 'Advanced styling for cart quantity', 'customify' ),
				'selector'    => array(
					'normal' => '.builder-header-' . $this->id . '-item  .cart-icon .cart-qty .customify-wc-total-qty',
					'hover'  => '.builder-header-' . $this->id . '-item:hover .cart-icon .cart-qty .customify-wc-total-qty',
				),
				'css_format'  => 'styling',
				'default'     => array(),
				'fields'      => array(
					'normal_fields' => array(
						'link_color'    => false, // disable for special field.
						'bg_image'      => false,
						'bg_cover'      => false,
						'bg_position'   => false,
						'bg_repeat'     => false,
						'bg_attachment' => false,
					),
					'hover_fields'  => array(
						'link_color' => false, // disable for special field.
					),
				),
			),

			array(
				'name'    => "{$this->name}_d_h",
				'type'    => 'heading',
				'section' => $this->section,
				'title'   => __( 'Dropdown Settings', 'customify' ),
			),

			array(
				'name'            => "{$this->name}_d_align",
				'type'            => 'select',
				'section'         => $this->section,
				'title'           => __( 'Dropdown Alignment', 'customify' ),
				'selector'        => '.builder-header-' . $this->id . '-item',
				'render_callback' => $fn,
				'default'         => array(),
				'choices'         => array(
					'left'  => __( 'Left', 'customify' ),
					'right' => __( 'Right', 'customify' ),
				),
			),

			array(
				'name'            => "{$this->name}_d_width",
				'type'            => 'slider',
				'section'         => $this->section,
				'device_settings' => true,
				'min'             => 280,
				'max'             => 600,
				'title'           => __( 'Dropdown Width', 'customify' ),
				'selector'        => '.builder-header-' . $this->id . '-item  .cart-dropdown-box',
				'css_format'      => 'width: {{value}};',
				'default'         => array(),
			),

		);

		// Item Layout.
		return array_merge( $config, customify_header_layout_settings( $this->id, $this->section ) );
	}

	function array_to_class( $array, $prefix ) {
		if ( ! is_array( $array ) ) {
			return $prefix . '-' . $array;
		}
		$classes = array();
		$array   = array_reverse( $array );
		foreach ( $array as $k => $v ) {
			if ( 1 == $v ) {
				$v = 'show';
			} elseif ( 0 == $v ) {
				$v = 'hide';
			}
			$classes[] = "{$prefix}-{$k}-{$v}";
		}

		return join( ' ', $classes );
	}

	/**
	 * Optional. Render item content
	 */
	public function render() {
		$icon          = Customify()->get_setting( "{$this->name}_icon" );
		$icon_position = Customify()->get_setting( "{$this->name}_icon_position" );
		$text          = Customify()->get_setting( "{$this->name}_text" );

		$show_label     = Customify()->get_setting( "{$this->name}_show_label", 'all' );
		$show_sub_total = Customify()->get_setting( "{$this->name}_show_sub_total", 'all' );
		$show_qty       = Customify()->get_setting( "{$this->name}_show_qty" );
		$sep            = Customify()->get_setting( "{$this->name}_sep" );
		$link_to        = Customify()->get_setting( "{$this->name}_link_to" );

		$classes = array();

		$align = Customify()->get_setting( "{$this->name}_d_align" );
		if ( ! $align ) {
			$align = 'right';
		}
		$classes[] = $this->array_to_class( $align, 'd-align' );

		$label_classes    = $this->array_to_class( $show_label, 'wc-cart' );
		$subtotal_classes = $this->array_to_class( $show_sub_total, 'wc-cart' );

		$icon = wp_parse_args(
			$icon,
			array(
				'type' => '',
				'icon' => '',
			)
		);

		$icon_html = '';
		if ( $icon['icon'] ) {
			$icon_html = '<i class="' . esc_attr( $icon['icon'] ) . '"></i> ';
		}

		if ( $text ) {
			$text = '<span class="cart-text cart-label ' . esc_attr( $label_classes ) . '">' . sanitize_text_field( $text ) . '</span>';
		}

		$sub_total  = WC()->cart->get_cart_subtotal();
		$quantities = WC()->cart->get_cart_item_quantities();

		$html = $text;

		if ( $sep && $html ) {
			$html .= '<span class="cart-sep cart-label ' . esc_attr( $label_classes ) . '">' . sanitize_text_field( $sep ) . '</span>';
		}
		$html .= '<span class="cart-subtotal cart-label ' . esc_attr( $subtotal_classes ) . '"><span class="customify-wc-sub-total">' . $sub_total . '</span></span>';

		$qty   = array_sum( $quantities );
		$class = 'customify-wc-total-qty';
		if ( $qty <= 0 ) {
			$class .= ' hide-qty';
		}

		if ( $icon_html ) {
			$icon_html = '<span class="cart-icon">' . $icon_html;
			if ( $show_qty ) {
				$icon_html .= '<span class="cart-qty"><span class="' . $class . '">' . array_sum( $quantities ) . '</span></span>';
			}
			$icon_html .= '</span>';
		}

		if ( 'before' == $icon_position ) {
			$html = $icon_html . $html;
		} else {
			$html = $html . $icon_html;
		}

		$classes[] = 'builder-header-' . $this->id . '-item';
		$classes[] = 'item--' . $this->id;

		$link = '';
		if ( 'checkout' == $link_to ) {
			$link = get_permalink( wc_get_page_id( 'checkout' ) );
		} else {
			$link = get_permalink( wc_get_page_id( 'cart' ) );
		}

		echo '<div class="' . esc_attr( join( ' ', $classes ) ) . '">';

		echo '<a href="' . esc_url( $link ) . '" class="cart-item-link text-uppercase text-small link-meta">';
		echo $html; // WPCS: XSS OK.
		echo '</a>';

		add_filter( 'woocommerce_widget_cart_is_hidden', '__return_false', 999 );

		echo '<div class="cart-dropdown-box widget-area">';
		the_widget(
			'WC_Widget_Cart',
			array(
				'hide_if_empty' => 0,
			)
		);
		echo '</div>';

		remove_filter( 'woocommerce_widget_cart_is_hidden', '__return_false', 999 );

		echo '</div>';
	}
}

Customify_Customize_Layout_Builder()->register_item( 'header', new Customify_Builder_Item_WC_Cart() );
woocommerce/config/catalog.php000066600000001257151143723330012466 0ustar00<?php

class Customify_WC_Products {
	function __construct() {
		add_filter( 'customify/customizer/config', array( $this, 'config' ), 100 );
	}

	function config( $configs ) {
		$section = 'woocommerce_product_catalog';

		$configs[] = array(
			'name'    => 'woocommerce_catalog_tablet_columns',
			'type'    => 'text',
			'section' => $section,
			'label'   => __( 'Products per row on tablet', 'customify' ),
		);
		$configs[] = array(
			'name'    => 'woocommerce_catalog_mobile_columns',
			'type'    => 'text',
			'section' => $section,
			'default' => 1,
			'label'   => __( 'Products per row on mobile', 'customify' ),
		);

		return $configs;
	}
}

new Customify_WC_Products();
woocommerce/config/catalog-designer.php000066600000036736151143723330014276 0ustar00<?php

class Customify_WC_Catalog_Designer {

	private $configs = array();

	function __construct() {
		add_filter( 'customify/customizer/config', array( $this, 'config' ), 100 );
		if ( is_admin() || is_customize_preview() ) {
			add_filter( 'Customify_Control_Args', array( $this, 'add_catalog_url' ), 35 );
		}

		// Loop.
		add_action( 'customify_wc_product_loop', array( $this, 'render' ) );
	}

	/**
	 * Get callback function for item part
	 *
	 * @param string $item_id ID of builder item.
	 *
	 * @return string|object|boolean
	 */
	function callback( $item_id ) {
		$cb = apply_filters( 'customify/product-designer/part', false, $item_id, $this );
		if ( ! is_callable( $cb ) ) {
			$cb = array( $this, 'product__' . $item_id );
		}
		if ( is_callable( $cb ) ) {
			return $cb;
		}

		return false;
	}

	function render() {

		$items = Customify()->get_setting( 'wc_cd_positions' );

		$this->configs['excerpt_type']   = Customify()->get_setting( 'wc_cd_excerpt_type' );
		$this->configs['excerpt_length'] = Customify()->get_setting( 'wc_cd_excerpt_length' );

		$this->configs = apply_filters( 'customify_wc_catalog_designer/configs', $this->configs );

		$cb = $this->callback( 'media' );
		if ( $cb ) {
			call_user_func( $cb, array( null, $this ) );
		}

		echo '<div class="wc-product-contents">';

		/**
		 * Hook: woocommerce_before_shop_loop_item.
		 */
		do_action( 'woocommerce_before_shop_loop_item' );

		$html = '';

		/**
		 * Allow 3rg party to render items html
		 */
		$html = apply_filters( 'customify/product-designer/render_html', $html, $items, $this );

		if ( ! $html ) {
			foreach ( (array) $items as $item ) {
				$item = wp_parse_args(
					$item,
					array(
						'_key'         => '',
						'_visibility'  => '',
						'show_in_grid' => 1,
						'show_in_list' => 1,
					)
				);
				if ( 'hidden' !== $item['_visibility'] ) {

					$cb = $this->callback( $item['_key'] );

					if ( is_callable( $cb ) ) {
						$classes   = array();
						$classes[] = 'wc-product__part';
						$classes[] = 'wc-product__' . $item['_key'];

						if ( $item['show_in_grid'] ) {
							$classes[] = 'show-in-grid';
						} else {
							$classes[] = 'hide-in-grid';
						}
						if ( $item['show_in_list'] ) {
							$classes[] = 'show-in-list';
						} else {
							$classes[] = 'hide-in-list';
						}

						$item_html = '';
						ob_start();
						call_user_func( $cb, array( $item, $this ) );
						$item_html = ob_get_contents();
						ob_end_clean();

						if ( trim( $item_html ) != '' ) {
							$html .= '<div class="' . esc_attr( join( ' ', $classes ) ) . '">';
							$html .= $item_html;
							$html .= '</div>';
						}
					}
				}
			}
		}

		echo $html; // WPCS: XSS OK.

		/**
		 * Hook: woocommerce_after_shop_loop_item.
		 */
		do_action( 'woocommerce_after_shop_loop_item' );

		echo '</div>'; // End .wc-product-contents.

	}

	/**
	 * Preview url when section open
	 *
	 * @param array $args The section urls config.
	 *
	 * @return array
	 */
	function add_catalog_url( $args ) {
		$args['section_urls']['wc_catalog_designer'] = get_permalink( wc_get_page_id( 'shop' ) );

		return $args;
	}

	/**
	 * Get Default builder items for product designer
	 *
	 * @since 2.0.5
	 *
	 * @return array
	 */
	function get_default_items() {
		$items = array(
			array(
				'_key'         => 'category',
				'_visibility'  => '',
				'show_in_grid' => 1,
				'show_in_list' => 1,
				'title'        => __( 'Category', 'customify' ),
			),
			array(
				'_visibility'  => '',
				'_key'         => 'title',
				'title'        => __( 'Title', 'customify' ),
				'show_in_grid' => 1,
				'show_in_list' => 1,
			),
			array(
				'_key'         => 'rating',
				'_visibility'  => '',
				'show_in_grid' => 1,
				'show_in_list' => 1,
				'title'        => __( 'Rating', 'customify' ),
			),

			array(
				'_key'         => 'price',
				'_visibility'  => '',
				'show_in_grid' => 1,
				'show_in_list' => 1,
				'title'        => __( 'Price', 'customify' ),
			),
			array(
				'_key'         => 'description',
				'_visibility'  => '',
				'show_in_grid' => 0,
				'show_in_list' => 1,
				'title'        => __( 'Short Description', 'customify' ),
			),
			array(
				'_key'         => 'add_to_cart',
				'_visibility'  => '',
				'show_in_grid' => 1,
				'show_in_list' => 1,
				'title'        => __( 'Add To Cart', 'customify' ),
			),
		);

		return apply_filters( 'customify/product-designer/body-items', $items );
	}


	function config( $configs ) {

		$section = 'wc_catalog_designer';

		$configs[] = array(
			'name'     => $section,
			'type'     => 'section',
			'panel'    => 'woocommerce',
			'priority' => 10,
			'label'    => __( 'Product Catalog Designer', 'customify' ),
		);

		// Catalog header.
		$configs[] = array(
			'name'            => 'wc_cd_show_catalog_header',
			'type'            => 'checkbox',
			'section'         => $section,
			'default'         => 1,
			'priority'        => 10,
			'selector'        => '.wc-product-listing',
			'render_callback' => 'woocommerce_content',
			'label'           => __( 'Show Catalog Filtering Bar', 'customify' ),
		);

		// Show view mod.
		$configs[] = array(
			'name'            => 'wc_cd_show_view_mod',
			'type'            => 'checkbox',
			'section'         => $section,
			'default'         => 1,
			'selector'        => '.wc-product-listing',
			'render_callback' => 'woocommerce_content',
			'checkbox_label'  => __( 'Show Grid/List View Buttons', 'customify' ),
			'priority'        => 11,
		);

		$configs[] = array(
			'name'            => 'wc_cd_default_view',
			'type'            => 'select',
			'section'         => $section,
			'default'         => 'grid',
			'priority'        => 12,
			'choices'         => array(
				'grid' => __( 'Grid', 'customify' ),
				'list' => __( 'List', 'customify' ),
			),
			'selector'        => '.wc-product-listing',
			'render_callback' => 'woocommerce_content',
			'label'           => __( 'Default View Mod', 'customify' ),
		);

		$configs[] = array(
			'name'             => 'wc_cd_positions',
			'section'          => $section,
			'label'            => __( 'Outside Media Items & Positions', 'customify' ),
			'type'             => 'repeater',
			'live_title_field' => 'title',
			'addable'          => false,
			'priority'         => 15,
			'selector'         => '.wc-product-listing',
			'render_callback'  => 'woocommerce_content',
			'default'          => $this->get_default_items(),
			'fields'           => apply_filters(
				'customify/product-designer/body-field-config',
				array(
					array(
						'name' => '_key',
						'type' => 'hidden',
					),
					array(
						'name'  => 'title',
						'type'  => 'hidden',
						'label' => __( 'Title', 'customify' ),
					),
					array(
						'name'           => 'show_in_grid',
						'type'           => 'checkbox',
						'checkbox_label' => __( 'Show in grid view', 'customify' ),
					),
					array(
						'name'           => 'show_in_list',
						'type'           => 'checkbox',
						'checkbox_label' => __( 'Show in list view', 'customify' ),
					),
				)
			),
		);

		$configs[] = array(
			'name'     => 'wc_cd_excerpt_type',
			'type'     => 'select',
			'section'  => $section,
			'priority' => 17,
			'title'    => __( 'List view excerpt type', 'customify' ),
			'choices'  => array(
				'excerpt' => __( 'Product short description', 'customify' ),
				'content' => __( 'Full content', 'customify' ),
				'more'    => __( 'Strip by more tag', 'customify' ),
				'custom'  => __( 'Custom', 'customify' ),
			),
		);

		$configs[] = array(
			'name'     => 'wc_cd_excerpt_length',
			'type'     => 'text',
			'section'  => $section,
			'priority' => 17,
			'title'    => __( 'Custom list view excerpt length', 'customify' ),
			'required' => array( 'wc_cd_excerpt_type', '=', 'custom' ),
		);

		// Product Media.
		$configs[] = array(
			'name'     => 'wc_cd_memdia_h',
			'type'     => 'heading',
			'section'  => $section,
			'priority' => 25,
			'label'    => __( 'Product Media & Alignment', 'customify' ),
		);

		$configs[] = array(
			'name'            => 'wc_cd_list_media_width',
			'type'            => 'slider',
			'section'         => $section,
			'unit'            => '%',
			'max'             => 100,
			'device_settings' => true,
			'priority'        => 26,
			'selector'        => 'format',
			'css_format'      => '.woocommerce-listing.wc-list-view .product.customify-col:not(.product-category) .wc-product-inner .wc-product-media { flex-basis: {{value_no_unit}}%; } .woocommerce-listing.wc-list-view .product.customify-col:not(.product-category) .wc-product-inner .wc-product-contents{ flex-basis: calc(100% - {{value_no_unit}}%); }',
			'title'           => __( 'List View Media Width', 'customify' ),
		);

		$configs[] = array(
			'name'            => 'wc_cd_media_secondary',
			'type'            => 'select',
			'choices'         => array(
				'first' => __( 'Use first image of product gallery', 'customify' ),
				'last'  => __( 'Use last image of product gallery', 'customify' ),
				'none'  => __( 'Disable', 'customify' ),
			),
			'section'         => $section,
			'default'         => 'first',
			'priority'        => 27,
			'selector'        => '.wc-product-listing',
			'render_callback' => 'woocommerce_content',
			'description'     => __( 'This setting adds a hover effect that will reveal a secondary product thumbnail to product images on your product listings. This is ideal for displaying front and back images of products.', 'customify' ),
			'title'           => __( 'Secondary Thumbnail', 'customify' ),
		);

		$configs[] = array(
			'name'            => 'wc_cd_item_grid_align',
			'type'            => 'text_align_no_justify',
			'section'         => $section,
			'device_settings' => true,
			'priority'        => 28,
			'selector'        => '.wc-grid-view .wc-product-contents',
			'css_format'      => 'text-align: {{value}};',
			'title'           => __( 'Grid View - Content Alignment', 'customify' ),
		);

		$configs[] = array(
			'name'            => 'wc_cd_item_list_align',
			'type'            => 'text_align_no_justify',
			'section'         => $section,
			'device_settings' => true,
			'priority'        => 28,
			'selector'        => '.wc-list-view .wc-product-contents',
			'css_format'      => 'text-align: {{value}};',
			'title'           => __( 'List View - Content Alignment', 'customify' ),
		);

		// Product Sale Bubble.
		$configs[] = array(
			'name'     => 'wc_cd_sale_bubble_h',
			'type'     => 'heading',
			'section'  => $section,
			'priority' => 30,
			'label'    => __( 'Product Onsale Bubble', 'customify' ),
		);

		$configs[] = array(
			'name'            => 'wc_cd_sale_bubble_type',
			'type'            => 'select',
			'default'         => 'text',
			'priority'        => 31,
			'choices'         => array(
				'text'    => __( 'Text', 'customify' ),
				'percent' => __( 'Discount percent', 'customify' ),
				'value'   => __( 'Discount value', 'customify' ),
			),
			'selector'        => '.wc-product-listing',
			'render_callback' => 'woocommerce_content',
			'section'         => $section,
			'label'           => __( 'Display Type', 'customify' ),
		);

		$configs[] = array(
			'name'        => 'wc_cd_sale_bubble_styling',
			'type'        => 'styling',
			'section'     => $section,
			'priority'    => 32,
			'title'       => __( 'Styling', 'customify' ),
			'description' => __( 'Advanced styling for onsale button', 'customify' ),
			'selector'    => array(
				'normal' => '.woocommerce span.onsale',
			),
			'css_format'  => 'styling',
			'default'     => array(),
			'fields'      => array(
				'normal_fields' => array(
					'link_color'    => false, // disable for special field.
					'margin'        => false,
					'bg_image'      => false,
					'bg_cover'      => false,
					'bg_position'   => false,
					'bg_repeat'     => false,
					'bg_attachment' => false,
				),
				'hover_fields'  => false,
			),
		);

		return $configs;
	}

	function product__media() {
		echo '<div class="wc-product-media">';
		/**
		 * Hook: customify/wc-product/before-media
		 * hooked: woocommerce_template_loop_product_link_open - 10
		 */
		do_action( 'customify/wc-product/before-media' );
		woocommerce_show_product_loop_sale_flash();
		woocommerce_template_loop_product_thumbnail();
		customify_wc_secondary_product_thumbnail();
		do_action( 'customify_after_loop_product_media' );
		/**
		 * Hook: customify/wc-product/after-media
		 * hooked: woocommerce_template_loop_product_link_close - 10
		 */
		do_action( 'customify/wc-product/after-media' );
		echo '</div>';
	}

	function product__title() {

		/**
		 * Hook: woocommerce_before_shop_loop_item_title.
		 *
		 * @hooked woocommerce_show_product_loop_sale_flash - 10
		 * @hooked woocommerce_template_loop_product_thumbnail - 10
		 */
		do_action( 'woocommerce_before_shop_loop_item_title' );

		/**
		 * @see    woocommerce_shop_loop_item_title.
		 *
		 * @hooked woocommerce_template_loop_product_title - 10
		 */
		do_action( 'woocommerce_shop_loop_item_title' );

		/**
		 * Hook: woocommerce_after_shop_loop_item_title.
		 *
		 * @hooked woocommerce_template_loop_rating - 5
		 * @hooked woocommerce_template_loop_price - 10
		 */
		do_action( 'woocommerce_after_shop_loop_item_title' );

	}

	/**
	 * Trim the excerpt with custom length.
	 *
	 * @see wp_trim_excerpt
	 *
	 * @param string  $text           Text to trim.
	 * @param integer $excerpt_length Number word to trim.
	 *
	 * @return mixed|string
	 */
	function trim_excerpt( $text, $excerpt_length = null ) {
		$text = strip_shortcodes( $text );
		/** This filter is documented in wp-includes/post-template.php */
		$text = apply_filters( 'the_content', $text );
		$text = str_replace( ']]>', ']]&gt;', $text );

		if ( ! $excerpt_length ) {
			/**
			 * Filters the number of words in an excerpt.
			 *
			 * @since 2.7.0
			 *
			 * @param int $number The number of words. Default 55.
			 */
			$excerpt_length = apply_filters( 'excerpt_length', 55 );
		}
		$more_text    = ' &hellip;';
		$excerpt_more = apply_filters( 'excerpt_more', $more_text );

		$text = wp_trim_words( $text, $excerpt_length, $excerpt_more );

		return $text;
	}

	function product__description() {
		echo '<div class="woocommerce-loop-product__desc">';

		if ( 'excerpt' == $this->configs['excerpt_type'] ) {
			the_excerpt();
		} elseif ( 'more' == $this->configs['excerpt_type'] ) {
			the_content( '', true );
		} elseif ( 'content' == $this->configs['excerpt_type'] ) {
			the_content( '', false );
		} else {
			$text = '';
			global $post;
			if ( $post ) {
				if ( $post->post_excerpt ) {
					$text = $post->post_excerpt;
				} else {
					$text = $post->post_content;
				}
			}
			$excerpt = $this->trim_excerpt( $text, $this->configs['excerpt_length'] );
			if ( $excerpt ) {
				// WPCS: XSS OK.
				echo apply_filters( 'the_excerpt', $excerpt );
			} else {
				the_excerpt();
			}
		}

		echo '</div>';

	}

	function product__price() {
		woocommerce_template_loop_price();
	}

	function product__rating() {
		woocommerce_template_loop_rating();
	}

	function product__category() {
		global $post;

		$tax = 'product_cat';
		$num = 1;

		$terms = get_the_terms( $post, $tax );

		if ( is_wp_error( $terms ) ) {
			return $terms;
		}

		if ( empty( $terms ) ) {
			return false;
		}

		$links = array();

		foreach ( $terms as $term ) {
			$link = get_term_link( $term, $tax );
			if ( is_wp_error( $link ) ) {
				return $link;
			}
			$links[] = '<a class="text-uppercase text-xsmall link-meta" href="' . esc_url( $link ) . '" rel="tag">' . esc_html( $term->name ) . '</a>';
		}

		$categories_list = array_slice( $links, 0, $num );

		echo join( ' ', $categories_list );
	}

	function product__add_to_cart() {
		woocommerce_template_loop_add_to_cart();
	}

}

new Customify_WC_Catalog_Designer();
woocommerce/config/single-product.php000066600000024160151143723330014011 0ustar00<?php

/**
 * Class Customify_WC_Single_Product
 *
 * Single product settings
 */
class Customify_WC_Single_Product {
	function __construct() {
		add_filter( 'customify/customizer/config', array( $this, 'config' ), 100 );
		if ( is_admin() || is_customize_preview() ) {
			add_filter( 'Customify_Control_Args', array( $this, 'add_product_url' ), 35 );
		}

		add_action( 'wp', array( $this, 'single_product_hooks' ) );
	}

	/**
	 * Add more class if nav showing
	 *
	 * @param array $classes HTML classes.
	 *
	 * @return array
	 */
	function post_class( $classes ) {
		if ( Customify()->get_setting( 'wc_single_product_nav_show' ) ) {
			$classes[] = 'nav-in-title';
		}
		return $classes;
	}

	/**
	 * Get adjacent product
	 *
	 * @param bool   $in_same_term In same term.
	 * @param string $excluded_terms Exlclude terms.
	 * @param bool   $previous Previous.
	 * @param string $taxonomy Taxonomy.
	 *
	 * @return null|string|WP_Post
	 */
	public function get_adjacent_product( $in_same_term = false, $excluded_terms = '', $previous = true, $taxonomy = 'product_cat' ) {
		return get_adjacent_post( $in_same_term, $excluded_terms, $previous, $taxonomy );
	}

	/**
	 * Display prev - next button
	 */
	public function product_prev_next() {
		if ( ! Customify()->get_setting( 'wc_single_product_nav_show' ) ) {
			return;
		}
		$prev_post = $this->get_adjacent_product();
		$next_post = $this->get_adjacent_product( false, '', false );
		if ( $prev_post || $next_post ) {
			?>
			<div class="wc-product-nav">
				<?php if ( $prev_post ) { ?>
					<a href="<?php echo esc_url( get_permalink( $prev_post ) ); ?>" title="<?php the_title_attribute( array( 'post' => $prev_post ) ); ?>" class="prev-link">
						<span class="nav-btn nav-next"><?php echo apply_filters( 'customify_nav_prev_icon', '' ); ?></span>
						<?php if ( has_post_thumbnail( $prev_post ) ) { ?>
							<span class="nav-thumbnail">
								<?php
								echo get_the_post_thumbnail( $prev_post, 'woocommerce_thumbnail' );
								?>
							</span>
						<?php } ?>
					</a>
				<?php } ?>
				<?php if ( $next_post ) { ?>
					<a href="<?php echo esc_url( get_permalink( $next_post ) ); ?>" title="<?php the_title_attribute( array( 'post' => $next_post ) ); ?>" class="next-link">
						<span class="nav-btn nav-next">
						<?php echo apply_filters( 'customify_nav_next_icon', '' ); ?>
						</span>
						<?php if ( has_post_thumbnail( $next_post ) ) { ?>
							<span class="nav-thumbnail">
								<?php
								echo get_the_post_thumbnail( $next_post, 'woocommerce_thumbnail' );
								?>
							</span>
						<?php } ?>
					</a>
				<?php } ?>
			</div>
			<?php
		}
	}

	/**
	 * Hooks for single product
	 */
	function single_product_hooks() {
		if ( ! is_product() ) {
			return;
		}

		add_action( 'wc_after_single_product_title', array( $this, 'product_prev_next' ), 2 );
		add_filter( 'post_class', array( $this, 'post_class' ) );

		if ( Customify()->get_setting( 'wc_single_product_tab_hide_description' ) ) {
			add_filter( 'woocommerce_product_description_heading', '__return_false', 999 );
		}

		if ( Customify()->get_setting( 'wc_single_product_tab_hide_attr_heading' ) ) {
			add_filter( 'woocommerce_product_additional_information_heading', '__return_false', 999 );
		}

		$tab_type = Customify()->get_setting( 'wc_single_product_tab' );

		if ( 'section' == $tab_type || 'toggle' == $tab_type ) {
			add_filter( 'woocommerce_product_description_heading', '__return_false', 999 );
			add_filter( 'woocommerce_product_additional_information_heading', '__return_false', 999 );
		}

	}

	/**
	 * Add url to customize preview when section open
	 *
	 * @param array $args Args to add.
	 *
	 * @return mixed
	 */
	public function add_product_url( $args ) {

		$query = new WP_Query(
			array(
				'post_type'      => 'product',
				'posts_per_page' => 1,
				'orderby'        => 'rand',
			)
		);

		$products = $query->get_posts();
		if ( count( $products ) ) {
			$args['section_urls']['wc_single_product'] = get_permalink( $products[0] );
		}

		return $args;
	}

	/**
	 * Customize config
	 *
	 * @param array $configs Config args.
	 *
	 * @return array
	 */
	public function config( $configs ) {
		$section = 'wc_single_product';

		$configs[] = array(
			'name'     => $section,
			'type'     => 'section',
			'panel'    => 'woocommerce',
			'title'    => __( 'Single Product Page', 'customify' ),
			'priority' => 19,
		);

		$configs[] = array(
			'name'    => 'wc_single_layout_h',
			'type'    => 'heading',
			'section' => $section,
			'label'   => __( 'Layout', 'customify' ),
		);

		/*
		$configs[] = array(
			'name'    => 'wc_single_layout',
			'type'    => 'select',
			'section' => $section,
			'default' => 'default',
			'label'   => __( 'Layout', 'customify' ),
			'choices' => array(
				'default'    => __( 'Default', 'customify' ),
				'top-medium' => __( 'Top Gallery Boxed', 'customify' ),
				'top-full'   => __( 'Top Gallery Full Width', 'customify' ),
				'left-grid'  => __( 'Left Gallery Grid', 'customify' ),
			)
		);
		*/

		$configs[] = array(
			'name'             => 'wc_single_layout',
			'type'             => 'image_select',
			'section'          => $section,
			'title'            => __( 'Layout', 'customify' ),
			'default'          => 'default',

			'disabled_msg'     => __( 'This option is available in Customify Pro plugin only.', 'customify' ),
			'disabled_pro_msg' => __( 'Please activate module Single Product Layouts to use this layout.', 'customify' ),

			'choices'          => array(
				'default'    => array(
					'img'   => esc_url( get_template_directory_uri() ) . '/assets/images/customizer/wc-layout-default.svg',
					'label' => __( 'Default', 'customify' ),
				),
				'top-medium' => array(
					'img'     => esc_url( get_template_directory_uri() ) . '/assets/images/customizer/wc-layout-top-medium.svg',
					'label'   => __( 'Top Gallery Boxed', 'customify' ),
					'disable' => 1,
					'bubble'  => __( 'Pro', 'customify' ),
				),
				'top-full'   => array(
					'img'     => esc_url( get_template_directory_uri() ) . '/assets/images/customizer/wc-layout-top-full.svg',
					'label'   => __( 'Top Gallery Full Width', 'customify' ),
					'disable' => 1,
					'bubble'  => __( 'Pro', 'customify' ),
				),
				'left-grid'  => array(
					'img'     => esc_url( get_template_directory_uri() ) . '/assets/images/customizer/wc-layout-left-grid.svg',
					'label'   => __( 'Left Gallery Grid', 'customify' ),
					'disable' => 1,
					'bubble'  => __( 'Pro', 'customify' ),

				),
			),
		);

		$configs[] = array(
			'name'     => "{$section}_nav_heading",
			'type'     => 'heading',
			'section'  => $section,
			'title'    => __( 'Product Navigation', 'customify' ),
			'priority' => 39,
		);

		$configs[] = array(
			'name'           => "{$section}_nav_show",
			'type'           => 'checkbox',
			'default'        => 1,
			'section'        => $section,
			'checkbox_label' => __( 'Show Product Navigation', 'customify' ),
			'priority'       => 39,
		);

		$configs[] = array(
			'name'     => "{$section}_tab_heading",
			'type'     => 'heading',
			'section'  => $section,
			'title'    => __( 'Product Tabs', 'customify' ),
			'priority' => 40,
		);

		$configs[] = array(
			'name'     => "{$section}_tab",
			'type'     => 'select',
			'default'  => 'horizontal',
			'section'  => $section,
			'label'    => __( 'Tab Layout', 'customify' ),
			'choices'  => array(
				'horizontal' => __( 'Horizontal', 'customify' ),
				'vertical'   => __( 'Vertical', 'customify' ),
				'toggle'     => __( 'Toggle', 'customify' ),
				'sections'   => __( 'Sections', 'customify' ),
			),
			'priority' => 45,
		);

		$configs[] = array(
			'name'           => "{$section}_tab_hide_description",
			'type'           => 'checkbox',
			'default'        => 1,
			'section'        => $section,
			'checkbox_label' => __( 'Hide product description heading', 'customify' ),
			'priority'       => 46,
		);

		$configs[] = array(
			'name'           => "{$section}_tab_hide_attr_heading",
			'type'           => 'checkbox',
			'default'        => 1,
			'section'        => $section,
			'checkbox_label' => __( 'Hide product additional information heading', 'customify' ),
			'priority'       => 47,
		);

		$configs[] = array(
			'name'           => "{$section}_tab_hide_review_heading",
			'type'           => 'checkbox',
			'default'        => 0,
			'section'        => $section,
			'checkbox_label' => __( 'Hide product review heading', 'customify' ),
			'selector'       => '.woocommerce-Reviews-title',
			'css_format'     => 'display: none;',
			'priority'       => 48,
		);

		$configs[] = array(
			'name'     => "{$section}_upsell_heading",
			'type'     => 'heading',
			'section'  => $section,
			'title'    => __( 'Upsell Products', 'customify' ),
			'priority' => 60,
		);

		$configs[] = array(
			'name'     => "{$section}_upsell_number",
			'type'     => 'text',
			'default'  => 3,
			'section'  => $section,
			'label'    => __( 'Number of upsell products', 'customify' ),
			'priority' => 65,
		);

		$configs[] = array(
			'name'            => "{$section}_upsell_columns",
			'type'            => 'text',
			'device_settings' => true,
			'section'         => $section,
			'label'           => __( 'Upsell products per row', 'customify' ),
			'priority'        => 66,
		);

		$configs[] = array(
			'name'     => "{$section}_related_heading",
			'type'     => 'heading',
			'section'  => $section,
			'title'    => __( 'Related Products', 'customify' ),
			'priority' => 70,
		);

		$configs[] = array(
			'name'     => "{$section}_related_number",
			'type'     => 'text',
			'default'  => 3,
			'section'  => $section,
			'label'    => __( 'Number of related products', 'customify' ),
			'priority' => 75,
		);

		$configs[] = array(
			'name'            => "{$section}_related_columns",
			'type'            => 'text',
			'device_settings' => true,
			'section'         => $section,
			'label'           => __( 'Related products per row', 'customify' ),
			'priority'        => 76,
		);

		$configs[] = array(
			'name'           => 'wc_single_layout_breadcrumb',
			'type'           => 'checkbox',
			'section'        => $section,
			'default'        => 1,
			'checkbox_label' => __( 'Show shop breadcrumb', 'customify' ),
		);

		return $configs;
	}
}

new Customify_WC_Single_Product();
woocommerce/inc/template-hooks.php000066600000017414151143723330013316 0ustar00<?php
/**
 * Reset default WC action hooks.
 */
function customify_wc_reset_default_hooks() {
	remove_action( 'woocommerce_before_shop_loop_item', 'woocommerce_template_loop_product_link_open', 10 );

	remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 10 );
	remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10 );

	remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5 );
	remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 );

	remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_product_link_close', 5 );
	remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );

	if ( Customify()->get_setting( 'wc_single_layout_breadcrumb' ) ) {
		add_action( 'woocommerce_single_product_summary_before', 'woocommerce_breadcrumb', 5 );
	}
	add_action( 'customify/wc-product/before-media', 'woocommerce_template_loop_product_link_open', 10 );
	add_action( 'customify/wc-product/after-media', 'woocommerce_template_loop_product_link_close', 10 );
}

add_action( 'wp', 'customify_wc_reset_default_hooks' );


/**
 * Display secondary thumbnail.
 */
function customify_wc_secondary_product_thumbnail() {
	$setting = wc_get_loop_prop( 'media_secondary' );
	if ( 'none' == $setting ) {
		return;
	}
	global $product;
	$image_ids = $product->get_gallery_image_ids();
	if ( count( $image_ids ) ) {
		$secondary_img_id = 'last' == $setting ? end( $image_ids ) : reset( $image_ids );
		$size             = 'shop_catalog';
		$classes          = 'attachment-' . $size . ' secondary-image image-transition';
		echo wp_get_attachment_image( $secondary_img_id, $size, false, array( 'class' => $classes ) );
	}
}


/**
 * Change before shop loop.
 */
remove_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 );
remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 );

/**
 * Add view mod buttons to before shop loop.
 */
add_action( 'woocommerce_before_shop_loop', 'customify_wc_catalog_header', 15 );

/**
 * Custom shop header.
 *
 * @return bool
 */
function customify_wc_catalog_header() {
	// Do not show shop header when display categories.
	$d = false;
	if ( is_product_category() || is_product_tag() || is_product_taxonomy() ) {
		$d = get_option( 'woocommerce_category_archive_display' );
	} else {
		$d = get_option( 'woocommerce_shop_page_display' );
	}

	if ( $d && 'subcategories' == $d ) {
		return;
	}

	if ( ! Customify()->get_setting( 'wc_cd_show_catalog_header' ) ) {
		return false;
	}
	echo '<div class="wc-catalog-header">';
	customify_wc_catalog_view_mod();
	woocommerce_result_count();
	woocommerce_catalog_ordering();
	echo '</div>';
}

/**
 * Display switcher mod view
 *
 * @return string
 */
function customify_wc_catalog_view_mod() {
	if ( ! Customify()->get_setting( 'wc_cd_show_view_mod' ) ) {
		return '';
	}

	$default = customify_get_default_catalog_view_mod();
	?>
	<div class="wc-view-switcher">
		<span class="wc-view-mod wc-svg-btn wc-grid-view <?php echo ( 'grid' == $default ) ? 'active' : ''; ?>" data-mod="grid">
			<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 187.733 187.733" xml:space="preserve"><g><g><path d="M85.333,0H3.413C1.529,0,0,1.529,0,3.413v81.92c0,1.884,1.529,3.413,3.413,3.413h81.92c1.886,0,3.413-1.529,3.413-3.413V3.413C88.747,1.529,87.219,0,85.333,0z M81.92,81.92H6.827V6.827H81.92V81.92z" /></g></g><g><g><path d="M184.32,0H102.4c-1.886,0-3.413,1.529-3.413,3.413v81.92c0,1.884,1.527,3.413,3.413,3.413h81.92c1.886,0,3.413-1.529,3.413-3.413V3.413C187.733,1.529,186.206,0,184.32,0z M180.907,81.92h-75.093V6.827h75.093V81.92z" /></g></g><g><g><path d="M85.333,98.987H3.413C1.529,98.987,0,100.516,0,102.4v81.92c0,1.884,1.529,3.413,3.413,3.413h81.92c1.886,0,3.413-1.529,3.413-3.413V102.4C88.747,100.516,87.219,98.987,85.333,98.987z M81.92,180.907H6.827v-75.093H81.92V180.907z" /></g></g><g><g><path d="M184.32,98.987H102.4c-1.886,0-3.413,1.529-3.413,3.413v81.92c0,1.884,1.527,3.413,3.413,3.413h81.92c1.886,0,3.413-1.529,3.413-3.413V102.4C187.733,100.516,186.206,98.987,184.32,98.987z M180.907,180.907h-75.093v-75.093h75.093V180.907z" /></g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g></svg>
		</span>
		<span class="wc-view-mod wc-svg-btn wc-list-view <?php echo ( 'list' == $default ) ? 'active' : ''; ?>" data-mod="list">
			<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 490.1 490.1" xml:space="preserve"><g><g><path d="M32.1,141.15h76.7c17.7,0,32.1-14.4,32.1-32.1v-76.7c0-17.7-14.4-32.1-32.1-32.1H32.1C14.4,0.25,0,14.65,0,32.35v76.7C0,126.75,14.4,141.15,32.1,141.15z M24.5,32.35c0-4.2,3.4-7.6,7.6-7.6h76.7c4.2,0,7.6,3.4,7.6,7.6v76.7c0,4.2-3.4,7.6-7.6,7.6H32.1c-4.2,0-7.6-3.4-7.6-7.6V32.35z" /><path d="M0,283.45c0,17.7,14.4,32.1,32.1,32.1h76.7c17.7,0,32.1-14.4,32.1-32.1v-76.7c0-17.7-14.4-32.1-32.1-32.1H32.1c-17.7,0-32.1,14.4-32.1,32.1V283.45z M24.5,206.65c0-4.2,3.4-7.6,7.6-7.6h76.7c4.2,0,7.6,3.4,7.6,7.6v76.7c0,4.2-3.4,7.6-7.6,7.6H32.1c-4.2,0-7.6-3.4-7.6-7.6V206.65z" /><path d="M0,457.75c0,17.7,14.4,32.1,32.1,32.1h76.7c17.7,0,32.1-14.4,32.1-32.1v-76.7c0-17.7-14.4-32.1-32.1-32.1H32.1c-17.7,0-32.1,14.4-32.1,32.1V457.75z M24.5,381.05c0-4.2,3.4-7.6,7.6-7.6h76.7c4.2,0,7.6,3.4,7.6,7.6v76.7c0,4.2-3.4,7.6-7.6,7.6H32.1c-4.2,0-7.6-3.4-7.6-7.6V381.05z" /><path d="M477.8,31.75H202.3c-6.8,0-12.3,5.5-12.3,12.3c0,6.8,5.5,12.3,12.3,12.3h275.5c6.8,0,12.3-5.5,12.3-12.3C490.1,37.25,484.6,31.75,477.8,31.75z" /><path d="M477.8,85.15H202.3c-6.8,0-12.3,5.5-12.3,12.3s5.5,12.3,12.3,12.3h275.5c6.8,0,12.3-5.5,12.3-12.3C490,90.65,484.6,85.15,477.8,85.15z" /><path d="M477.8,206.05H202.3c-6.8,0-12.3,5.5-12.3,12.3s5.5,12.3,12.3,12.3h275.5c6.8,0,12.3-5.5,12.3-12.3C490,211.55,484.6,206.05,477.8,206.05z" /><path d="M477.8,259.55H202.3c-6.8,0-12.3,5.5-12.3,12.3s5.5,12.3,12.3,12.3h275.5c6.8,0,12.3-5.5,12.3-12.3C490,265.05,484.6,259.55,477.8,259.55z" /><path d="M477.8,380.45H202.3c-6.8,0-12.3,5.5-12.3,12.3s5.5,12.3,12.3,12.3h275.5c6.8,0,12.3-5.5,12.3-12.3C490,385.95,484.6,380.45,477.8,380.45z" /><path d="M490,446.15c0-6.8-5.5-12.3-12.3-12.3H202.3c-6.8,0-12.3,5.5-12.3,12.3s5.5,12.3,12.3,12.3h275.5C484.6,458.35,490,452.85,490,446.15z" /></g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g></svg>
		</span>
	</div>
	<?php
}

/**
 * Loop Layout.
 */
add_action( 'woocommerce_before_subcategory', 'customify_wc_before_shop_loop_item', 1 );
add_action( 'woocommerce_after_subcategory', 'customify_wc_after_shop_loop_item', 9999 );
add_filter( 'woocommerce_after_output_product_categories', 'customify_wc_after_output_product_categories' );

function customify_wc_before_shop_loop_item() {
	echo '<div class="wc-product-inner">';
}

/**
 * After loop layout
 */
function customify_wc_after_shop_loop_item() {
	echo '</div>';
}

/**
 * Add separator between product categories and products
 *
 * @param string $html HTML to add.
 *
 * @return string
 */
function customify_wc_after_output_product_categories( $html ) {
	if ( wc_get_loop_prop( 'is_shortcode' ) && ! WC_Template_Loader::in_content_filter() ) {
		return $html;
	}

	return '<li class="wc-loop-cats-separator"></li>';
}


/**
 * Cart page
 */

remove_action( 'woocommerce_cart_collaterals', 'woocommerce_cross_sell_display' );
add_action( 'woocommerce_after_cart_table', 'woocommerce_cross_sell_display' );

/**
 * Checkout Page. Add custom heading.
 */
function customify_your_order_heading() {
	?>
	<h3 class="order_review_heading"><?php _e( 'Your order', 'customify' ); ?></h3>
	<?php
}

add_action( 'woocommerce_checkout_order_review', 'customify_your_order_heading', 1 );
woocommerce/inc/class-wc-product-cat-list-walker.php000066600000003110151143723330016541 0ustar00<?php
/**
 * WC_Product_Cat_List_Walker class
 *
 * @package WooCommerce/Classes/Walkers
 * @version 3.4.0
 */

defined( 'ABSPATH' ) || exit;


/**
 * Product cat list walker class.
 *
 * @see WC_Product_Cat_List_Walker
 */
class Customify_WC_Product_Cat_List_Walker extends WC_Product_Cat_List_Walker {

	/**
	 * Start the element output.
	 *
	 * @see   Walker::start_el()
	 * @since 2.1.0
	 *
	 * @param string  $output            Passed by reference. Used to append additional content.
	 * @param object  $cat               Category.
	 * @param int     $depth             Depth of category in reference to parents.
	 * @param array   $args              Arguments.
	 * @param integer $current_object_id Current object ID.
	 */
	public function start_el( &$output, $cat, $depth = 0, $args = array(), $current_object_id = 0 ) {
		$cat_id = intval( $cat->term_id );

		$output .= '<li class="cat-item cat-item-' . $cat_id;

		if ( $args['current_category'] === $cat_id ) {
			$output .= ' current-cat';
		}

		if ( $args['has_children'] && $args['hierarchical'] && ( empty( $args['max_depth'] ) || $args['max_depth'] > $depth + 1 ) ) {
			$output .= ' cat-parent';
		}

		if ( $args['current_category_ancestors'] && $args['current_category'] && in_array( $cat_id, $args['current_category_ancestors'], true ) ) {
			$output .= ' current-cat-parent';
		}

		$output .= '"><a href="' . get_term_link( $cat_id, $this->tree_type ) . '">' . apply_filters( 'list_product_cats', $cat->name, $cat ) . '</a>';

		if ( $args['show_count'] ) {
			$output .= ' <span class="count">' . $cat->count . '</span>';
		}
	}

}


breadcrumb.php000066600000026200151143723330007371 0ustar00<?php

class Customify_Breadcrumb {
	public static $is_transparent = null;
	public static $_instance = null;
	public static $_settings = null;

	public static function get_instance() {
		if ( is_null( self::$_instance ) ) {
			self::$_instance = new self();
			add_filter( 'customify/customizer/config', array( self::$_instance, 'config' ) );
			add_filter( 'wpseo_breadcrumb_separator', '__return_null' );
			add_filter( 'wpseo_breadcrumb_single_link', array( self::$_instance, 'yoat_seo_link_link' ) );
			if ( ! is_admin() ) {
				add_action( 'wp_head', array( self::$_instance, 'display' ) );
			}
		}

		return self::$_instance;
	}

	function yoat_seo_link_link( $link ) {
		return '<li>' . $link . '</li>';
	}

	public function display() {
		// Display position.
		$display_pos = Customify()->get_setting( 'breadcrumb_display_pos' );
		switch ( $display_pos ) {
			case 'after_header': // Below header.
				if ( function_exists( 'Customify_Pro' ) && Customify_Pro()->is_enabled_module( 'Customify_Pro_Module_Header_Transparent' ) ) {
					if ( has_action( 'customify/page-cover/before' ) ) {
						add_action( 'customify/page-cover/before', array( self::$_instance, 'render' ), 10 );
					} else {
						add_action( 'customify/site-start', array( self::$_instance, 'render' ), 10 );
					}
				} else {
					add_action( 'customify/site-start', array( self::$_instance, 'render' ), 15 );
				}
				break;
			case 'before_content':
				add_action( 'customify/site-start', array( self::$_instance, 'render' ), 65 );
				break;
			case 'inside':
				add_action( 'customify/page-cover/after', array( self::$_instance, 'render' ), 55 );
				add_action( 'customify/titlebar/after', array( self::$_instance, 'render' ), 55 );
				break;
			default:
				add_action( 'customify/site-start', array( self::$_instance, 'render' ), 55 );
				break;
		}
	}

	/**
	 * Check Support plugin activate
	 *
	 * Current support plugin: breadcrumb-navxt
	 *
	 * @return bool
	 */
	public function support_plugins_active() {
		$activated = false;
		if ( function_exists( 'bcn_display' ) ) {
			$activated = true;
		}

		if ( ! $activated && defined( 'WPSEO_FILE' ) ) {
			$options = get_option( 'wpseo_titles' );
			if ( is_array( $options ) && isset( $options['breadcrumbs-enable'] ) && $options['breadcrumbs-enable'] ) {
				$activated = true;
			}
		}

		return $activated;
	}

	public function config( $configs ) {
		$section  = 'breadcrumb';
		$selector = '#page-breadcrumb';
		$panel    = 'compatibility_panel';
		$config   = array();
		$config[] = array(
			'name'        => $section,
			'type'        => 'section',
			'panel'       => $panel,
			'title'       => __( 'Breadcrumb', 'customify' ),
			'description' => '',
		);

		if ( ! $this->support_plugins_active() ) {
			$desc     = __( 'Customify theme support <a target="_blank" href="https://wordpress.org/plugins/breadcrumb-navxt/">Breadcrumb NavXT</a> or <a href="https://wordpress.org/plugins/wordpress-seo/" target="_blank">Yoast SEO</a> breadcrumb plugin. All settings will be displayed after you installed and activated it.', 'customify' );
			$config[] = array(
				'name'        => "{$section}_display_pos",
				'type'        => 'custom_html',
				'section'     => $section,
				'description' => $desc,
			);

		} else {

			$config[] = array(
				'name'    => "{$section}_display_pos",
				'type'    => 'select',
				'section' => $section,
				'default' => 'below_titlebar',
				'title'   => __( 'Display Position', 'customify' ),
				'choices' => apply_filters(
					'customify/breadcrumb/config/positions',
					array(
						'after_header'   => __( 'After header', 'customify' ),
						'inside'         => __( 'Inside cover/titlebar', 'customify' ),
						'before_content' => __( 'Before site main', 'customify' ),
					)
				),
			);

			$display_fields = array(
				array(
					'name'           => 'index',
					'type'           => 'checkbox',
					'checkbox_label' => __( 'Hide on index', 'customify' ),
				),
				array(
					'name'           => 'category',
					'type'           => 'checkbox',
					'checkbox_label' => __( 'Hide on categories', 'customify' ),
				),
				array(
					'name'           => 'search',
					'type'           => 'checkbox',
					'checkbox_label' => __( 'Hide on search', 'customify' ),
				),
				array(
					'name'           => 'archive',
					'type'           => 'checkbox',
					'checkbox_label' => __( 'Hide on archive', 'customify' ),
				),
				array(
					'name'           => 'page',
					'type'           => 'checkbox',
					'checkbox_label' => __( 'Hide on single page', 'customify' ),
				),
				array(
					'name'           => 'post',
					'type'           => 'checkbox',
					'checkbox_label' => __( 'Hide on single post', 'customify' ),
				),
				array(
					'name'           => 'singular',
					'type'           => 'checkbox',
					'checkbox_label' => __( 'Hide on singular', 'customify' ),
				),
				array(
					'name'           => 'page_404',
					'type'           => 'checkbox',
					'checkbox_label' => __( 'Hide on 404 page', 'customify' ),
				),

			);

			if ( Customify()->is_woocommerce_active() ) {
				$display_fields[] = array(
					'name'           => 'product',
					'type'           => 'checkbox',
					'checkbox_label' => __( 'Hide on product page', 'customify' ),
				);
				$display_fields[] = array(
					'name'           => 'product_cat',
					'type'           => 'checkbox',
					'checkbox_label' => __( 'Hide on product category', 'customify' ),
				);
				$display_fields[] = array(
					'name'           => 'product_tag',
					'type'           => 'checkbox',
					'checkbox_label' => __( 'Hide on product tag', 'customify' ),
				);

			}

			$config[] = array(
				'name'        => "{$section}_display_pages",
				'type'        => 'modal',
				'section'     => $section,
				'label'       => __( 'Display', 'customify' ),
				'description' => __( 'Settings display for special pages.', 'customify' ),
				'default'     => array(),
				'fields'      => array(
					'tabs'           => array(
						'display' => __( 'Display', 'customify' ),
					),
					'display_fields' => $display_fields,
				),
			);

			$config[] = array(
				'name'        => $section . '_typo',
				'type'        => 'typography',
				'section'     => $section,
				'title'       => __( 'Typography', 'customify' ),
				'description' => __( 'Typography for breadcrumb', 'customify' ),
				'selector'    => "{$selector}",
				'css_format'  => 'typography',
			);

			$config[] = array(
				'name'        => $section . '_styling',
				'type'        => 'styling',
				'section'     => $section,
				'title'       => __( 'Styling', 'customify' ),
				'description' => __( 'Styling for breadcrumb', 'customify' ),
				'selector'    => array(
					'normal'            => "{$selector}, #page-titlebar {$selector}, #page-cover {$selector}",
					'normal_box_shadow' => "{$selector}, #page-titlebar {$selector} .page-breadcrumb-list, #page-cover {$selector} .page-breadcrumb-list",
					'normal_text_color' => "{$selector}, #page-titlebar {$selector} .page-breadcrumb-list, #page-cover {$selector} .page-breadcrumb-list",
					'normal_link_color' => "{$selector} a, #page-titlebar {$selector} .page-breadcrumb-list a, #page-cover {$selector} .page-breadcrumb-list a",
					'hover_link_color'  => "{$selector} a:hover, #page-titlebar {$selector} .page-breadcrumb-list a:hover, #page-cover {$selector} .page-breadcrumb-list a:hover",
				),
				'css_format'  => 'styling',
				'fields'      => array(
					'normal_fields' => array(
						'margin' => false, // Disable for special field.
					),
					'hover_fields'  => array(
						'text_color'     => false,
						'padding'        => false,
						'bg_color'       => false,
						'bg_heading'     => false,
						'bg_cover'       => false,
						'bg_image'       => false,
						'bg_repeat'      => false,
						'border_heading' => false,
						'border_color'   => false,
						'border_radius'  => false,
						'border_width'   => false,
						'border_style'   => false,
						'box_shadow'     => false,
					), // Disable hover tab and all fields inside.
				),
			);
		}

		return array_merge( $configs, $config );
	}

	public function is_showing() {
		if ( ! $this->support_plugins_active() ) {
			return false;
		}

		$display = Customify()->get_setting_tab( 'breadcrumb_display_pages', 'display' );
		$display = wp_parse_args(
			$display,
			array(
				'index'       => '',
				'category'    => '',
				'search'      => '',
				'archive'     => '',
				'page'        => '',
				'post'        => '',
				'singular'    => '',
				'product'     => '',
				'product_cat' => '',
				'product_tag' => '',
				'page_404'    => '',
			)
		);

		$hide = false;

		if ( is_front_page() && is_home() ) { // Index page.
			// Default homepage.
			$hide = $display['index'];
		} elseif ( is_front_page() ) {
			// Static homepage.
			$hide = $display['page'];
		} elseif ( is_home() ) {
			// Blog page.
			$hide = $display['page'];
		} elseif ( is_category() ) {
			// Category.
			$hide = $display['category'];
		} elseif ( is_page() ) {
			// Single page.
			$hide = $display['page'];
		} elseif ( is_single() ) {
			// Single post.
			$hide = $display['post'];
		} elseif ( is_singular() ) {
			// Single custom post type.
			$hide = $display['singular'];
		} elseif ( is_404() ) {
			// Page not found.
			$hide = $display['page_404'];
		} elseif ( is_search() ) {
			// Search result.
			$hide = $display['search'];
		} elseif ( is_archive() ) {
			$hide = $display['archive'];
		}

		// WooCommerce Settings.
		if ( Customify()->is_woocommerce_active() ) {
			if ( is_product() ) {
				$hide = $display['product'];
			} elseif ( is_product_category() ) {
				$hide = $display['product_cat'];
			} elseif ( is_product_tag() ) {
				$hide = $display['product_tag'];
			} elseif ( is_shop() ) {
				$hide = $display['page'];
			}
		}

		if ( Customify()->is_using_post() ) {
			$post_id            = Customify()->get_current_post_id();
			$breadcrumb_display = get_post_meta( $post_id, '_customify_breadcrumb_display', true );
			if ( $breadcrumb_display && 'default' != $breadcrumb_display ) {
				if ( 'hide' == $breadcrumb_display ) {
					$hide = 1;
				} else {
					$hide = 0;
				}
			}
		}

		return apply_filters( 'customify/breadcrumb/is-showing', ( ! $hide ) );
	}

	/**
	 * Display below header cover
	 *
	 * @return bool|string
	 */
	public function render() {
		if ( ! $this->is_showing() ) {
			return '';
		}
		$list = '';
		if ( function_exists( 'bcn_display_list' ) ) {
			$list = bcn_display_list( true );
		} elseif ( function_exists( 'yoast_breadcrumb' ) ) {
			$list = yoast_breadcrumb( '', '', false );
		}

		if ( $list ) {
			$pos       = sanitize_text_field( Customify()->get_setting( 'breadcrumb_display_pos' ) );
			$layout    = Customify()->get_setting_tab( 'page_header_layout' );
			$classes   = array( 'page-breadcrumb' );
			$classes[] = 'breadcrumb--' . $pos;
			$classes[] = $layout;
			$classes[] = 'text-uppercase text-xsmall link-meta';

			?>
			<div id="page-breadcrumb" class="page-header--item <?php echo esc_attr( join( ' ', $classes ) ); ?>">
				<div class="page-breadcrumb-inner customify-container">
					<ul class="page-breadcrumb-list">
						<?php
						// WPCS: XSS OK.
						echo wp_kses_post( $list );
						?>
					</ul>
				</div>
			</div>
			<?php
		}
	}

}

Customify_Breadcrumb::get_instance();
elementor.php000066600000001252151143723330007255 0ustar00<?php
function customify_is_e_theme_location( $location ) {
	$is_exist = function_exists( 'elementor_theme_do_location' );
	if ( $is_exist ) {
		return elementor_theme_do_location( $location );
	}
	return false;
}

if ( defined( 'ELEMENTOR_VERSION' ) ) {
	add_action( 'elementor/theme/register_locations', 'customify_elementor_register_locations' );
	/**
	 * Register Elementor theme location
	 *
	 * @param \ElementorPro\Modules\ThemeBuilder\Classes\Locations_Manager $elementor_locations_manager Elementor location manager.
	 */
	function customify_elementor_register_locations( $elementor_locations_manager ) {
		$elementor_locations_manager->register_all_core_location();
	}
}