/*******************woocommerce-order************/

.woocommerce-order-received {
	.woocommerce-order {
		padding: 80px 0;
	}

	.woocommerce-notice.woocommerce-notice--success.woocommerce-thankyou-order-received {
		text-align: center;
	    margin-bottom: 80px;
	    font-size: 32px;
	}
}

.products {
	margin-bottom: 30px;
}

.shop {
	padding-top: 70px;
	padding-bottom: 70px;
}

.woocommerce-cart-mini {
	float: right;
	font-size: 12px;

	i {
		font-size: 20px;
		width: 45px;
		height: 45px;
		line-height: 45px;
		text-align: center;
		border-radius: 50%;
		display: inline-block;
		vertical-align: middle;
		@extend %color-primary;
		@extend %bg-title;

		~ span {
			margin-left: 5px;
		}
	}

	~ .woocommerce-ordering {
		margin-right: 20px;
	}
}


.woocommerce {

	a.button, input#submit, button.button, input.button, .button {
		border-radius: 0;
		line-height: 48px;
		height: 48px;
		min-width: 150px;
		text-align: center;
		padding: 0 38px !important;
		transition: all 0.3s ease;
		@extend %font-title;
		@extend %color-title;

		&.alt {
			@extend %color-title;
			@extend %bg-primary;

			&:hover {
				@extend %color-white;
				@extend %bg-black;
			}
		}
	}

	// Product Item
	div.product, div.products {
		p.price, span.price {
			display: block;
			font-size: 20px;
			line-height: 1;
			@extend %color-title;
			@extend %font-title;
			
			del {
				font-size: 12px;
				color: #9a9b9c;

				~ ins {
					margin-left: 7px;
				}
			}

			ins {
				text-decoration: none;

				~ del {
					margin-left: 7px;
				}
			}
		}
	}

	.product-item {
		position: relative;
		margin-bottom: 30px;

		.product__media {
			position: relative;
			z-index: 1;
			margin-bottom: 15px;

			img {
				width: 100%;
			}

			span.onsale {
				top: 10px;
				left: 10px;
				position: absolute;
			}

			.product_type_grouped {
				position: absolute;
				padding: 0 !important;
				margin: 0;
				background-color: transparent !important;
				font-weight: normal;
			    line-height: 1;
			    height: auto;
			    opacity: 0;
			    visibility: hidden;
				@extend %color-white;
				@extend %centered;

				&:hover {
					@extend %color-primary;
				}
			}

			.add_to_cart_button {
				font-size: 14px;
				padding: 0 !important;
				font-weight: normal;
				background-color: transparent;
				position: absolute;
				height: auto;
				min-width: auto;
				line-height: normal;
				min-height: 27px;
				min-width: 40px;
				text-align: center;
				@extend %centered;
				@extend %color-white;
				@extend %hidden-opacity;

				&:after {
					display: inline-block;
					vertical-align: middle !important;
				}

				&:before {
					font-size: 20px;
					font-family: 'ElegantIcons';
					content: "\e013";
					margin-right: 5px;
					position: relative;
					top: 2px;
					background-image: none !important;
					color: inherit;
				}

				&.loading {
					font-size: 0;

					&:before {
						font-size: 0;
					}

					&:after {
						font-size: 14px;
					}
				}

				&:hover {
					background-color: transparent;
					@extend %color-primary;
				}
			}

			.added_to_cart {
				display: none;
			}

			&:before {
				content: '';
				background-color: rgba(34,34,34,0.6);
				@extend %transition-all-03s-ease;
				@extend %hidden-opacity;
				@extend %absolute-box;
			}
		}

		.product__title {
			font-size: 14px;
			margin-top: 0;
			margin-bottom: 13px;
			text-align: center;
		}

		.price {
			text-align: center;
		}

		&:hover {

			.product__media {

				&:before, .add_to_cart_button,
				.product_type_grouped {
					@extend %visible-opacity;
				}
			}
		}
	}

	span.onsale {
		min-width: 50px;
		display: inline-block;
		height: 50px;
		border-radius: 50%;
		line-height: 50px;
		text-align: center;
		padding: 0 5px;
		font-size: 14px;
		font-weight: normal;
		@extend %bg-primary;
		@extend %color-title;
	}

	.shop-top {
		margin-bottom: 25px;
		@extend .clearfix;

		.woocommerce-result-count,
		.woocommerce-ordering {
			float: none;
		}

		.woocommerce-ordering {
			float: none;
			display: none;

			select {
				width: 100%;
			}
		}
		
		@media (min-width: 480px) {
			// justify-content: space-between;
			// align-items: center;
			// display: flex;

			.woocommerce-result-count {
				float: left;
				margin-top: 10px;
			}

			.woocommerce-ordering {
				float: right;
				display: block;

				select {
					width: auto;
					-webkit-appearance: menulist;
				}
			}
		}
	}

	// Rating Star
	.star-rating {
		@extend %color-primary;
	}

	// Single
	div.product {
		margin-left: -15px;
		margin-right: -15px;
		@extend .clearfix;

		> span.onsale {
			top: 10px;
			left: 10px;
		}

		div.summary {
			margin-bottom: 70px;
		}

		div.images {
			margin-bottom: 30px;

			.woocommerce-product-gallery__trigger {
				top: 10px;
    			right: 25px;
    			background-color: #efefef;

    			&:before {
    				border-color: #ccc;
    			}

    			&:after {
    				background-color: #ccc;
    			}
			}

			.flex-control-thumbs li {
				width: 100%;
			}
		}

		div.images, div.summary {
			width: 100%;
			float: none;
			padding-left: 15px;
			padding-right: 15px;

			@media (min-width: 768px) {
				float: left;
				width: 50%;
				margin-bottom: 45px;
			}
		}

		.woocommerce-main-image {

			img {
				width: 100%;
			}
		}

		.images {
			position: relative;
		}

		.thumbnails {
			overflow: hidden;
			position: absolute;
			bottom: 0;
			right: 20px;
			left: 20px;

			a {
				float: left;
				width: 20%;
				padding-left: 5px;
				padding-right: 5px;
				margin-bottom: 10px;

				img {
					width: 100%;
				}
			}
		}

		.product_title {
			font-size: 22px;
			margin-top: 20px;
			margin-bottom: 12px;
		}

		.summary {

			p {
				margin-bottom: 35px;
			}

			.price {
				margin-bottom: 25px;
			}
		}

		.woocommerce-product-rating {
			margin-bottom: 27px;

			.star-rating {
				line-height: 1;
				display: inline-block;
				vertical-align: middle;
				font-size: 14px;
				margin-right: 10px;
				@extend %color-primary;
			}

			.woocommerce-review-link {
				text-decoration: underline;
			}
		}

		.product_meta {
			color: #9a9b9c;
			margin-bottom: 15px;

			> span {
				display: block;
				// font-weight: bold;
				margin-bottom: 5px;
				// @extend %font-title;
				@extend %color-title;

				a {
					@extend %font-title;

					&:hover {
						@extend %color-primary;
					}
				}

				* {
					font-weight: normal;
					@extend %color-base;
				}
			}
		}

		.product_share {
			color: #9a9b9c;

			span { 
				display: block;
				margin-bottom: 2px;
				@extend %color-title;
			}

			a {
				font-size: 16px;
				margin-right: 20px;
			}
		}

		form.cart {
			margin-bottom: 40px;

			div.quantity {
				width: 70px;
				margin-right: 20px;
				float: left;

				.input-text {
					width: 100%;
					padding-left: 0;
					padding-right: 0;
				}
			}

			.variations { 
				margin-bottom: 30px;

				select {
					width: auto;
				}

				td {
					display: table-cell;
					margin: 0;
				}

				label {
					font-weight: normal;
					margin-bottom: 0;
					text-transform: capitalize;
				}
			}
		}
	}

	div.product .woocommerce-tabs {
		clear: both;
		padding: 0;
		max-width: 800px;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 70px;
		border-width: 0;
		padding-left: 15px;
		padding-right: 15px;

		ul.wc-tabs { 
			text-align: center;
			padding: 0;
			margin: 0;

			&:before {
				content: '';
			    position: absolute;
			    left: 0;
			    right: 0;
			    bottom: 0;
			    display: block;
			    border-bottom: 1px solid $color-gray-4;
			}

			li {
				float: none;
				background-color: transparent;
				border-radius: 0;
				border-width: 0;
				margin: 0;
				padding: 0;
				display: inline-block;
				border-bottom: 1px solid transparent;

				&:after, &:before {
					content: none;
				}

				&.active {
					margin: 0;
					@extend %border-bottom-primary;
					background-color: transparent;

					a {
						@extend %color-title;
					}
				}

				a {
				    display: block;
					padding: 0 20px 10px 20px;
					font-size: 16px;
					@extend %color-title;
				}
			}
		}	
	}

	div.product .woocommerce-tabs .panel {
		border-width: 0;
		padding: 30px 0;
		margin-bottom: 0;

		p:last-child {
			margin-bottom: 0;
		}
	}

	// Review
	#reviews { 

		#comments { 
			margin-bottom: 40px;

			h2 {
				font-size: 20px;
		    	margin-bottom: 20px;
		    	margin-top: 20px;	
	    	}
    	}
    	
	}

	#reviews #comments ol.commentlist li img.avatar {
		border-width: 0;
		padding: 0;
		width: 50px;
		border-radius: 3px;
	}

	#reviews #comments ol.commentlist .star-rating {
		top: 2px;
	}

	#reviews #comments ol.commentlist li .comment-text p.meta .woocommerce-review__author {
		font-size: 14px;
		@extend %color-title;
		@extend %font-title;
	}

	#reviews #comments ol.commentlist li .comment-text {
		margin-left: 65px;
		border-color: #f1f1f1;
		padding: 15px;
	}

	#reviews #comments ol.commentlist li .comment-text .description p:last-child {
		margin-bottom: 0;
	}

 	#reviews #comment {
		height: 130px;
 	}

	#review_form #respond { 

		.comment-reply-title {
			font-weight: bold;
			font-size: 20px;
			margin-bottom: 30px;
			display: block;
			@extend %color-title;
			@extend %font-title;
		}

		.stars {
			margin-bottom: 0;
			@extend %color-primary;
		}

		.comment-form-rating,
		.comment-form-comment,
		.form-submit {
			padding-left: 15px;
			padding-right: 15px;
			margin-bottom: 20px;
		}

		.form-submit {
			margin-bottom: 0;
			margin-top: 15px;

			input#submit {
				border-radius: 0;
				@extend %color-title;
				@extend %bg-primary;
			}
		}
	}
	
	// Related
	.related, .upsells {
		padding-left: 15px;
		padding-right: 15px;

		> h2 {
			margin-top: 0;
			margin-bottom: 22px;
			font-size: 22px;
		}

		~ .related {
			margin-top: 40px;
		}
	}

	.related {
		margin-bottom: 0;

		.products  {
			margin-bottom: 0;
		}
	}
	
	// Cart
	table.shop_table {
		width: 100%;
		border-radius: 0;
		border: 1px solid #eeeeee;
		margin-bottom: 30px;

		th {
			font-weight: 600;
			@extend %color-title;
			@extend %font-title;
		}

		th, td {
			padding: 15px 20px;
			border-top: 1px solid #eee;
		}

		label {
			font-weight: normal;
			@extend %font-title;
		}

		td.product-remove {
			width: 75px;
			text-align: center;

			.remove {
				display: inline-block;
				width: 20px;
				height: 20px;
				text-indent: -99999px;
				position: relative;

				&:before {
					content: '\51';
					font-size: 18px;
					text-indent: 0;
					font-family: 'ElegantIcons';
					@extend %centered;
					@extend %color-subprimary;
				}

				&:hover {
					background-color: transparent;
				}
			}
		}

		td.product-thumbnail {
			width: 130px;
		}

		.quantity {
			width: 50px;

			input {
				padding: 0;
				text-align: center;
			}
		}

		.amount {
			font-weight: 600;
			font-size: 16px;
			@extend %color-title;
			@extend %font-title;
		}

		td.product-name {
			font-size: 16px;
			font-weight: 600;
			@extend %font-title;
			@extend %color-title;
		}

		td.actions {
		
			> .button {
				float: right;
				@extend %bg-primary;

				&:hover {
					@extend %bg-title;
				}
			}

			.coupon {
				float: left;

				label {
					display: none;
				}

				.button {
					vertical-align: middle;
				}

				.input-text {
					display: inline-block;
					width: 45%;
					vertical-align: middle;
					@media (max-width: 600px) {
						width: 100%;
					}

					~ .button {
						margin-left: 10px;
						@media (max-width: 600px) {
							width: 100%;
							margin-left: 0;
							margin-top: 10px;
							float: none;
						}
					}
				}
			}
		}
	}

	table.cart {
		margin-bottom: 45px;

		thead {
			background-color: #eee;
		}
	}

	.cart-collaterals {

		.cross-sells , .cart_totals {

			> h2 {
				font-size: 22px;
				margin-bottom: 20px;
				margin-top: 0;
			}
		}

		.cross-sells {
			width: 100%;
			float: none;
			@media (min-width: 768px) {
				float: left;
	    		width: 48%;
			}
		}

		.cart_totals {
			width: 100%;
			float: none;
			@media (min-width: 768px) {
				float: right;
	    		width: 48%;
			}

    		table.shop_table  {
    			th {
    				border-right: 1px solid #eee;
    			}
    		}

    		.wc-proceed-to-checkout {
    			text-align: right;

    			.checkout-button {
				    height: 54px;
				    line-height: 54px;
    			}
    		}

    		.button {
				@extend %bg-primary;

				&:hover {
					@extend %bg-title;
				}
    		}
		}
	}

	.cart-empty, .return-to-shop {
		text-align: center;
	}

	table.shop_table_responsive tr td {
		&:after {
			content: '';
			display: block;
			clear: both;
		}

		.quantity {
			float: right;
		}
	}


	// Payment
	#payment {
		background-color: #f1f1f1;
		border-radius: 0;

		ul.payment_methods {
			border-bottom-color: 1px solid #e4e4e4;
		}
	}

	.select2-container {

		.select2-selection--single {
			padding-left: 15px;
			padding-right: 15px;
			height: 48px;
			border-radius: 0;
			border-color: #b4b4b4;

			.select2-selection__rendered {
				line-height: 46px;
				padding-left: 0;
				font-size: 16px;
				@extend %color-title;
			}

			.select2-selection__arrow {
				top: 12px;
			}
		}
	}
	
	form.checkout_coupon,
	form.login,
	form.register {
		border-radius: 0;
	}

	// Login
	form.login label.woocommerce-form__label-for-checkbox {
		display: block;
		margin-top: 10px;
		font-weight: normal;
	}

	// Checkout Form
	form.woocommerce-checkout {
		.create-account .woocommerce-form__label {
			display: block;
			font-weight: normal;
			padding-left: 20px;

			.woocommerce-form__input-checkbox {
				margin: 0;
				left: 0;
				top: 8px;
			}
		}
	}
}

.woocommerce-account {

	.header-page {
		margin-bottom: 0;
	}

	&:not(.logged-in) {
	
		.header-page + .page-content {
			padding-top: 60px;
		}
		
		h2 {
			margin-top: 0;
			text-align: center;
			font-size: 26px;
		}

		.woocommerce-form-login {
			max-width: 500px;
			margin-left: auto;
			margin-right: auto;
		}
	}

	.woocommerce-MyAccount-content,
	.woocommerce-MyAccount-navigation {
		float: none;
		width: 100%;
	}

	.woocommerce-MyAccount-navigation {
		position: relative;
		z-index: 0;

		&:after {
			content: '';
			position: absolute;
			height: 2px;
			left:0;
			right: 0;
			bottom: 0;
			z-index: -1;
			background-color: $color-gray-2;
		}

		ul {
			padding: 0;
			margin: 0;
			list-style: none;

			li {
				display: inline-block;
			    margin-right: 30px;

			    &:last-child {
			    	margin-right: 0;
			    }

				a {
					line-height: 68px;
					border-bottom: 2px solid transparent;
					font-size: 14px;
    				display: block;
    				@extend %font-title;
				}

				&.is-active a {
					@extend %color-primary;
					@extend %border-bottom-primary;
				}
			}
		}
	}

	.woocommerce-MyAccount-content {
		padding-top: 70px;
	}
}

@media (max-width: 767px) {
	.woocommerce { 

		div.product { 
			
			.images, .summary {
				width: 100%;	
			}

			.images {
				margin-bottom: 30px;
			}

			.product_title {
				margin-top: 0;
			}
		}
	}
}

.woocommerce .product-item .product__media .product_type_simple.ajax_add_to_cart:not(.add_to_cart_button) {
    top: 50%;
    left: 40%;
    position: absolute;
    font-size: 14px;
    padding: 0!important;
    font-weight: 400;
    background-color: transparent;
    color: #fff;
    height: auto;
    line-height: normal;
    min-height: 27px;
    min-width: 40px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
}

.woocommerce .product-item:hover .product__media .product_type_simple:not(.add_to_cart_button){
    visibility: visible;
    opacity: 1;
}
