@import "base/_variables.scss";
@import "base/_mixins.scss";


/*-------------------------------------------------------*/
/* WooCommerce
/*-------------------------------------------------------*/
.woocommerce {
	.col-1, .col-2 {
		max-width: none;
		padding: 0;
	}

	ul.products::before {
		content: none;
	}

	ul.products li.product .button {
		margin-top: .5em;
	}

	a.added_to_cart {
		display: block;
	}

	&-account .woocommerce a,
	&-account .woocommerce li a,
	ul.products li.product a,
	.woocommerce-cart-form a:hover,
	.cart-collaterals a:hover,
	.woocommerce-form-coupon-toggle a:hover,
	.woocommerce-MyAccount-content a:hover,
	.woocommerce-MyAccount-navigation-link a:hover {
		text-decoration: none;
	}
}


/* Mini Cart
-------------------------------------------------------*/
.everse-menu-cart {
	position: relative;

	&__count {
		background-color: $primary-color;
		color: #fff;
		display: block;
		text-align: center;
		border-radius: 50%;
		font-size: 0.625rem;
		line-height: 14px;		
		width: 14px;
		height: 14px;
		position: absolute;
		top: 0;
		right: -6px;
	}

	&__url {
		color: $nav-links-color;
	}

	&__dropdown {
		padding: 24px;
		min-width: 300px;
		margin-top: 23px;
		right: -10px;
		left: auto;
	}

  &__dropdown::before {
    content: '';
    display: block;
    width: 100%;
    position: absolute;
    top: -23px;
    left: 0;
    height: 23px;
  }

  &:hover .everse-menu-cart__dropdown {
    visibility: visible;
    opacity: 1;
  }
}



/* Result Count / Ordering
-------------------------------------------------------*/
.woocommerce {
	.woocommerce-result-count {
		margin: 1em 0;
	}

	.woocommerce-ordering {
		margin: 0 0 1em;

		select {
			vertical-align: top;
		}

		@include bp-md-down {
			float: none;
		}
	}
}


/*-------------------------------------------------------*/
/* Archives
/*-------------------------------------------------------*/
.woocommerce {

	ul.products {
		list-style: none;
		display: -webkit-box;
		display: -ms-flexbox;
		display: flex;
		-ms-flex-wrap: wrap;
		flex-wrap: wrap;
		margin-bottom: 0;
		margin-right: -10px;
		margin-left: -10px;

		&:before,
		&:after {
			display: none;	
		}

		li.product {
			display: inline-block;
			-webkit-box-flex: 0;
			-ms-flex: 0 0 50%;
			flex: 0 0 50%;
			max-width: 50%;
			position: relative;
			overflow: hidden;
			width: 100%;
			float: none;
			clear: none;					
			min-height: 1px;
			margin-right: 0;
			margin-bottom: 60px;
			padding-right: 10px;
			padding-left: 10px;
		}

		@include bp-md-up {
			&.columns-3 li.product {
				-webkit-box-flex: 0;
				-ms-flex: 0 0 33.33333%;
				flex: 0 0 33.33333%;
				max-width: 33.33333%;
			}
		}

		@include bp-md-up {
			&.columns-4 li.product {
				-webkit-box-flex: 0;
				-ms-flex: 0 0 25%;
				flex: 0 0 25%;
				max-width: 25%;
			}
		}
	}


	// Responsive
	@include bp-md-up {
		.columns-3 .product {
			-ms-flex: 0 0 33.33333%;
			flex: 0 0 33.33333%;
			max-width: 33.33333%;		
		}

		.columns-2 .product {
			-ms-flex: 0 0 50%;
			flex: 0 0 50%;
			max-width: 50%;
		}

		&-result-count {
			float: left;
		}

		&-ordering {
			float: right;
			margin-bottom: 16px;
		}
	}

	@include bp-md-down {
		.woocommerce-ordering {
			float: none;
		}
	}
	
}


/*-------------------------------------------------------*/
/* Grid / Products
/*-------------------------------------------------------*/
.woocommerce .product,
.everse-product-outer {
	position: relative;
}

.everse-product__body {
	padding-top: 18px;
}

.everse-product-outer .woocommerce-loop-product__link {
	position: absolute !important;
	display: block;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
}

.woocommerce {
	.everse-product-outer__image-holder img {
		width: 100%;
		height: auto;
		display: block;
		margin: 0;
		box-shadow: none;
	}

	ul.products li.product a.woocommerce-loop-product__link {
		display: block;
		position: relative;
	}

	ul.products .everse-product__body .button {
		padding: 14px 24px;
	}
}

/* Price
/*-------------------------------------------------------*/
.woocommerce {
	ul.products li.product .price {
		color: $text-color;
		font-size: 1rem;
	}

	ul.products li.product .price del {
		margin-right: 8px;
	}
}

.price ins {
	text-decoration: none;
}


/* Onsale
-------------------------------------------------------*/
.woocommerce {
	span.onsale {
		left: 10px !important;
		top: 10px !important;
		right: auto !important;
		margin: 0 !important;
		padding: 6px 12px;
		font-size: .625rem;
		min-height: auto;
		line-height: 1;
		border-radius: 50px;
		background-color: $primary-color;
		text-transform: uppercase;
	}
}


/* Pagination
-------------------------------------------------------*/
.woocommerce-pagination {
	margin-top: 48px;
	text-align: center;
}

.woocommerce nav.woocommerce-pagination ul {
	border: 0;
	margin: 0;

	li {
		border: 0;
		overflow: visible;
	}
}

/* Breadcrumbs
/*-------------------------------------------------------*/
.woocommerce .woocommerce-breadcrumb,
.woocommerce-page .woocommerce-breadcrumb {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
}



/*-------------------------------------------------------*/
/* Single Product
/*-------------------------------------------------------*/
.single-product {	
	.woocommerce-breadcrumb {
		justify-content: flex-start;
		margin-bottom: 24px;
	}

	.single_add_to_cart_button {
		min-height: 56px;
	}
}

@include bp-lg-up {

	.woocommerce #content div.product div.images,
	.woocommerce div.product div.images,
	.woocommerce-page #content div.product div.images,
	.woocommerce-page div.product div.images {
		max-width: 610px;
		width: 50%;
		float: left;
	}

	.woocommerce #content div.product div.summary,
	.woocommerce div.product div.summary,
	.woocommerce-page #content div.product div.summary,
	.woocommerce-page div.product div.summary {
		width: 50%;
		float: right;
		padding-left: 38px;
	}

	.woocommerce .product .woocommerce-tabs {
		clear: both;
	}
}


/* Slider
/*-------------------------------------------------------*/
.woocommerce-product-gallery__image {
	overflow: hidden;
}

.woocommerce {
	div.product div.images {
		margin-bottom: 4em;
	}

	div.product div.images .flex-control-thumbs li img {
		backface-visibility: hidden;
		overflow: hidden;
	}

	div.product div.images .flex-control-thumbs {
		margin: 16px -8px 0 -8px;
	}

	div.product div.images .flex-control-thumbs li {
		padding: 0 8px;
		margin-bottom: 16px;
	}
}


/* Summary
/*-------------------------------------------------------*/
.woocommerce {
	div.product .product_title {
		font-size: 2.25rem;
	}

	div.product p.price,
	div.product span.price {
		color: $heading-color;
		font-size: 1.375rem;
	}

	.quantity .qty {
		line-height: 46px;
		padding-right: 0;
		width: 4rem;
	}

	div.product form.cart div.quantity {
		margin-right: 10px;
	}

	div.product form.cart .group_table td.woocommerce-grouped-product-list-item__label label {
		margin-bottom: 0;
	}

	.product_meta > span {
		display: block;
		font-size: .875rem;
		padding-bottom: 4px;
	}
}


// Variations
.woocommerce {
	div.product form.cart {
		margin-top: 34px;
	}

	div.product form.cart .variations {
		position: relative;
	}

	div.product form.cart .variations td.value {
		padding-right: 0;
	}

	div.product form.cart .reset_variations {
		position: absolute;
		right: 0;
		top: -30px;
		color: $text-color;
		opacity: 0.9;

		&:hover {
			color: $primary-color;
		}
	}

	div.product form.cart .variations select {
		margin-bottom: 0;
	}

	.woocommerce-variation.single_variation {
		margin-bottom: 24px;
	}

}


/* Description Tabs
/*-------------------------------------------------------*/
.woocommerce {

	div.product .woocommerce-tabs .panel {
		margin: 0 0 3.75em;
		padding: 34px;
		border-radius: 0 0 5px 5px;
		border: 1px solid $border-color;
		border-top: 0;
	}

	.woocommerce-tabs .panel h2 {
		font-size: 1rem;
	}

	div.product .woocommerce-tabs ul.tabs {
		padding: 0;
		margin: 0;
	}

	div.product .woocommerce-tabs ul.tabs li {
		background-color: $bg-light;
		border: 1px solid $border-color;
		margin: 0;
		padding: 0 20px;
		float: left;

		&:not(:first-child) {
			margin-left: -2px;
		}
	}

	div.product .woocommerce-tabs ul.tabs li a {
		font-weight: 600;
		font-size: 0.9375rem;
		padding: 16px 0;
		color: $text-color;

		&:hover {
			color: $heading-color;
		}
	}

	div.product .woocommerce-tabs ul.tabs li.active a {
		color: $heading-color;
	}

	div.product .woocommerce-tabs ul.tabs::before {
		border-color: $border-color;
	}

	div.product .woocommerce-tabs ul.tabs li:before,
	div.product .woocommerce-tabs ul.tabs li:after {
		display: none;
	}

	table.shop_attributes td {
		font-style: normal;
		padding: 8px;
	}

	table.shop_attributes td p {
		padding: 0;
	}

	table.shop_attributes tr:nth-child(even) td,
	table.shop_attributes tr:nth-child(even) th {
		background-color: $bg-light;
	}

}


/* Rating
/*-------------------------------------------------------*/
.woocommerce {
	.star-rating,
	p.stars a {
		color: #fbdb75;
	}

	.products .star-rating {
		display: inline-block;
		margin: 0 0 .5em;
	}

	ul.products li.product .star-rating {
		font-size: .857em;
	}

	.woocommerce-product-rating a {
		color: $text-color;
		font-size: .75rem;
	}

	.widget_rating_filter ul li .star-rating {
		top: 2px;
	}

	#review_form #respond .form-submit input {
		width: auto;
	}

	#reviews #comments ol.commentlist {
		padding-left: 0;
	}

	#reviews #comments h2 {
		margin-bottom: 16px;
	}

	#reviews #comments ol.commentlist li .comment-text {
		border-color: $border-color;
	}

	#reviews #comments ol.commentlist li .meta {
		color: $heading-color;
	}

	.star-rating::before {
		color: #c5c5c5;
	}
}


/* Buttons
/*-------------------------------------------------------*/
.woocommerce #respond input#submit.alt,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce .coupon button.button,
.woocommerce .woocommerce-mini-cart__buttons > a:first-child {
	display: inline-block;
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.1;
	background-color: $primary-color;
	color: #fff;
	padding: 20px 24px;
	border: 0;
	vertical-align: middle;
	@include transition ($transition-all);

	&:hover {
		text-decoration: none;
		background-color: $bg-dark;
		color: #fff;
	}
}

.woocommerce table.shop_table .actions>button.button:disabled {
	padding: 20px 24px;
}

.woocommerce button.button.alt.disabled,
.woocommerce button.button.alt.disabled:hover {
	background-color: $bg-dark;
}

.woocommerce table.shop_table .actions > button.button:disabled,
.woocommerce .woocommerce-mini-cart__buttons > a:first-child,
.woocommerce .coupon button.button {
	background-color: $bg-light;
	color: $heading-color;
}

@include bp-md-down {
	.woocommerce #content table.cart td.actions .coupon .button.alt,
	.woocommerce #content table.cart td.actions .coupon .input-text+.button,
	.woocommerce table.cart td.actions .coupon .button.alt,
	.woocommerce table.cart td.actions .coupon .input-text+.button,
	.woocommerce-page #content table.cart td.actions .coupon .button.alt,
	.woocommerce-page #content table.cart td.actions .coupon .input-text+.button,
	.woocommerce-page table.cart td.actions .coupon .button.alt,
	.woocommerce-page table.cart td.actions .coupon .input-text+.button {
		float: none;
		width: 100%;
	}
}

/* Notifications
/*-------------------------------------------------------*/
.woocommerce-error,
.woocommerce-info,
.woocommerce-message {
	border-top: 0;
	padding-left: 3.5em !important;
	background-color: $bg-light;
	color: $heading-color;
}


/* Related / Upsell Products
/*-------------------------------------------------------*/
.related.products > h2,
.upsells.products > h2 {
	font-size: 1.375rem;
	margin-bottom: 40px;
}


/*-------------------------------------------------------*/
/* Cart Page
/*-------------------------------------------------------*/
.woocommerce-cart-form {
	margin-bottom: 64px;
}

.woocommerce table.shop_table {
	border-radius: 0;
	border: 1px solid $border-color;
	border-collapse: collapse;
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
	border: 0;
	border-bottom: 1px solid $border-color;
}

.woocommerce table.shop_table th {
	background-color: $bg-light;
}

.woocommerce table.shop_table td {
	padding: 16px 12px;
}

.woocommerce table.shop_table .product-name a {
	color: $text-color;
	font-size: 0.875rem;

	&:hover {
		color: $primary-color;
	}
}

.woocommerce table.shop_table tbody tr:last-child td,
.woocommerce table.shop_table tbody tr:last-child th {
	border-bottom: 0;
	background-color: #fff;
}

.woocommerce table.shop_table td.actions {
	padding: 32px 24px;
}

#add_payment_method table.cart img,
.woocommerce-cart table.cart img,
.woocommerce-checkout table.cart img {
	width: 48px;
}

.woocommerce a.remove {
	font-weight: 400 !important;
	color: lighten( $text-color, 30% ) !important;
	font-size: 1.3rem;

	&:hover {
		color: $heading-color !important;
		background-color: transparent;
	}
}

@include bp-md-up {
	.woocommerce table.shop_table .product-remove {
		width: 5%;
	}
}


#add_payment_method table.cart td.actions .coupon .input-text,
.woocommerce-cart #content table.cart td.actions .coupon .input-text,
.woocommerce-checkout table.cart td.actions .coupon .input-text {
	padding: 6px 12px 5px;
	border: 1px solid $border-color;
	width: 160px;

	&:focus {
		border-color: $primary-color;
	}

	@include bp-md-down {
		width: 100%;
		margin-bottom: 8px;
	}
}


// Cart Totals
.woocommerce .cart-collaterals .cart_totals,
.woocommerce-page .cart-collaterals .cart_totals {
	float: none;
}

.cart_totals > h2 {
	margin-bottom: 24px;
}

#add_payment_method .cart-collaterals .cart_totals tr td,
#add_payment_method .cart-collaterals .cart_totals tr th,
.woocommerce-cart .cart-collaterals .cart_totals tr td,
.woocommerce-cart .cart-collaterals .cart_totals tr th,
.woocommerce-checkout .cart-collaterals .cart_totals tr td,
.woocommerce-checkout .cart-collaterals .cart_totals tr th {
	border-top: 0;
}

.woocommerce .cart_totals table.shop_table td {
	padding: 12px;
}

.woocommerce .cart_totals table.shop_table tr th {
	font-weight: 400;
}

.woocommerce form .form-row {
	padding: 6px 0;
}

.shipping-calculator-button {
	&::after {
		display: none;
	}
}


/*-------------------------------------------------------*/
/* Checkout Page
/*-------------------------------------------------------*/
.woocommerce form.checkout_coupon,
.woocommerce form.login,
.woocommerce form.register {
	border: 1px solid $border-color;
	border-radius: 0;
}

.woocommerce form .form-row label {
	line-height: 1;
}

form.woocommerce-checkout h3 {
	margin-bottom: 28px;
	margin-top: 28px;
}


#add_payment_method #payment,
.woocommerce-cart #payment,
.woocommerce-checkout #payment {
	background-color: $bg-light;
	border: 1px solid $border-color;
	border-radius: 0;
}

#add_payment_method #payment div.payment_box,
.woocommerce-cart #payment div.payment_box,
.woocommerce-checkout #payment div.payment_box {
	background-color: $border-color;

	&:before {
		border-bottom-color: $border-color;
	}
}

#add_payment_method #payment ul.payment_methods,
.woocommerce-cart #payment ul.payment_methods,
.woocommerce-checkout #payment ul.payment_methods {
	border-bottom-color: $border-color;
}

.woocommerce table.shop_table tbody th,
.woocommerce table.shop_table tfoot td,
.woocommerce table.shop_table tfoot th {
	border-top-color: $border-color;
	font-weight: 400;
}

.woocommerce-checkout table.shop_table .product-quantity {
	font-weight: 400;
	color: $text-color;
}


.checkout_coupon.woocommerce-form-coupon .form-row {
	width: auto;
	float: left;

	.input-text {
		width: 350px;
	}

	&.form-row-first {
		margin-right: 5px;
	}

	@include bp-sm-down {
		float: none;

		&.form-row-first {
			margin-right: 0;
		}

		.input-text {
			width: 100%
		}
	}
}

#add_payment_method #payment div.payment_box,
.woocommerce-cart #payment div.payment_box,
.woocommerce-checkout #payment div.payment_box {
	color: $heading-color;
}


/*-------------------------------------------------------*/
/* My Account / Orders / Login / Lost Password Pages
/*-------------------------------------------------------*/
.woocommerce .login .button {
	margin-right: 14px;
}

@include bp-md-up {
	.woocommerce-account .woocommerce-MyAccount-content {
		width: 65%;
	}
}

.woocommerce-MyAccount-navigation {
	margin-bottom: 34px;

	ul {
		list-style: none;
		padding-left: 0;
	}

	li {
		padding-bottom: 6px;
	}

	&-link.is-active a {
		color: $primary-color;
	}
}

.woocommerce-Input + span > em {
	font-size: 13px;
	color: $meta-color;
}


/*-------------------------------------------------------*/
/* Widgets
/*-------------------------------------------------------*/
.sidebar .widget_product_categories li,
.woocommerce .widget_rating_filter ul li,
.woocommerce .woocommerce-widget-layered-nav-list .woocommerce-widget-layered-nav-list__item,
.woocommerce-MyAccount-navigation li {
	padding: 10px 0;
	border-bottom: 1px solid $border-color;

	&:last-child {
		padding-bottom: 0;
		border-bottom: 0;
	}
}


/* Products / Top Rated Products / Recent Reviews / Shopping Cart
/*-------------------------------------------------------*/
.widget_products,
.widget_top_rated_products,
.widget_recent_reviews,
.widget_shopping_cart,
.widget_recently_viewed_products {
	
	.product_list_widget a {
		color: $heading-color;

		&:hover {
			color: $primary-color;
		}
	}

	.product-title {
		display: inline-block;
		font-weight: 600;
	}
}


/* Mini Cart 
/*-------------------------------------------------------*/
.woocommerce-mini-cart-item a {
	color: $heading-color;
}

.woocommerce ul.cart_list li,
.woocommerce ul.product_list_widget li {
	position: relative;
	overflow: hidden;
	list-style: none;
	padding: 10px 0 10px 84px;
	min-height: 86px;
	vertical-align: top;
	line-height: 1.3;
}

.woocommerce ul.cart_list li img,
.woocommerce ul.product_list_widget li img {
	float: none;
	margin-left: 0;
	margin-right: 8px;
	position: absolute;
	left: 0;
	width: 68px;
	margin-bottom: 10px;
}

.woocommerce-mini-cart-item a.remove {
	position: absolute;
	top: 10px !important;
	right: 0px;
	left: auto !important;
	z-index: 9;
}

.woocommerce ul.product_list_widget .woocommerce-mini-cart-item,
.woocommerce .widget_shopping_cart .cart_list li,
.woocommerce.widget_shopping_cart .cart_list li {
	padding: 10px 20px 10px 75px;
}

ul.product_list_widget li a:not(.remove) {
	margin-bottom: 5px;
	display: block;
	padding: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.3;
}

.woocommerce-mini-cart__total {
	margin-bottom: 5px;
}

.woocommerce-mini-cart__buttons {
	margin: 0;
}

.woocommerce-mini-cart__buttons.buttons > .button,
.woocommerce-page .widget_shopping_cart_content .buttons .wc-forward {
  width: 100%;
	margin-top: 10px;
	margin-bottom: 0;
	text-align: center;
}

.woocommerce-mini-cart__total,
.woocommerce .widget_shopping_cart .total,
.woocommerce.widget_shopping_cart .total {
	border-top: 1px solid $border-color;
	padding: 8px 0;
}

ul.product_list_widget li+li {
  border-top: 1px solid $border-color;
}

.woocommerce ul.cart_list li .star-rating,
.woocommerce ul.product_list_widget li .star-rating {
	margin: .5em 0;
}

.product_list_widget {
	.reviewer,
	.amount {
		font-size: 0.875rem;
	}

	del {
		margin-right: 5px;
	}

	ins {
		text-decoration: none;
	}
}


/* Widget Product Search 
/*-------------------------------------------------------*/
.woocommerce-product-search {
	position: relative;

	.search-field {
		margin-bottom: 0;
	}

	button[type=submit] {
		font-size: 0;
		font-weight: 400;

		&::after {
			font-size: 1.125rem;
			content: '\e905';
		}
	}
}


/* Widget Product Categories /  Widget Products by Attribute
/*-------------------------------------------------------*/
.widget_product_categories,
.widget_rating_filter,
.woocommerce-widget-layered-nav-list,
.woocommerce-MyAccount-navigation {
	li a {
		color: $heading-color;

		&:hover {
			color: $primary-color;
		}
	}
}


/* Widget Price Filter 
/*-------------------------------------------------------*/
.woocommerce .widget_price_filter .price_slider_wrapper .ui-widget-content {
	background-color: $border-color;
}

.woocommerce .widget_price_filter .ui-slider .ui-slider-range,
.woocommerce .widget_price_filter .ui-slider .ui-slider-handle {
	background-color: $primary-color;
}

.woocommerce .widget_price_filter .ui-slider-horizontal {
	height: 4px;
	margin: 0;
	margin-bottom: 24px;
}

.woocommerce .widget_price_filter .ui-slider .ui-slider-handle {
	cursor: pointer;
	top: -6px;
	margin-left: 0;
}

.woocommerce .widget_price_filter .ui-slider .ui-slider-handle:last-of-type {
  @include transform( translateX(-100%) );
}

.woocommerce .widget_price_filter .price_slider_amount {
	line-height: 2.8;
}

.woocommerce .widget_price_filter .price_slider_amount .button {
	font-size: .9375rem;
	height: 32px;
	line-height: 32px;
	min-height: 32px;
	padding: 0 18px;
}


/* Widget Products by Attribute 
/*-------------------------------------------------------*/
.widget_layered_nav {
	a {
		float: left;
	}

	.count {
		float: right;
	}
}