/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
# Woocommerce Part
--------------------------------------------------------------*/
@import "../sass/variables-site/variables-site";
@import "../sass/mixins/mixins-master";
@import "../sass/grid/variables";
@import "../sass/grid/breakpoints";
@import "../sass/grid/mixins";
/*--------------------------------------------------------------
# Woocommerce Part
--------------------------------------------------------------*/
@import "wootheme/woocommerce-theme";
@import "wootheme/tm-quick-view";

/*--------------------------------------------------------------
# Woocommerce Rating
--------------------------------------------------------------*/
.woocommerce .product .star-rating,
.woocommerce .star-rating,
.woocommerce .stars {
	width: 8em;
	height: 10px;

	&::before,
	span::before {
		content: '\ea85\ea85\ea85\ea85\ea85';
		letter-spacing: 5.5px;
		@include nucleo-mini-icon;
		line-height: 1.2;
	}
}

/*--------------------------------------------------------------
# Quick View
--------------------------------------------------------------*/
.products .product {
	.block_product_thumbnail {
		@include media-breakpoint-down(xs) {
			display: block;
		}
		a {
			display: block;
			position: relative;
			&::before {
				content: '';
				position: absolute;
				top: 0;
				right: 0;
				bottom: 0;
				left: 0;
				border-radius: $border__radius;
				opacity: 0;
				@include transition(.3s ease all);
				z-index: 1;
			}
		}
	}
	&.product-list {
		.block_product_thumbnail:hover {
			a::before {
				opacity: 1;
			}
			.tm-quick-view {
				top: 50%;
				opacity: 1;
				visibility: visible;
			}
		}
	}
	&:not(.product-list) {
		&:hover {
			.block_product_thumbnail a::before {
				opacity: 1;
			}
			.tm-quick-view {
				top: 50%;
				opacity: 1;
				visibility: visible;
			}
		}
	}
}

#main button.tm-wc-ajax-load-more-button.loading {
	&::after {
		@include nucleo-mini-icon;
		content: '\eea3';
		top: 30%;
		right: 15px;
		@include translate(0, -50%);
	}
}

/*--------------------------------------------------------------
# Quick View Popup
--------------------------------------------------------------*/
.tm-quick-view-popup {
	&__content {
		padding: 40px 20px !important;
	}
	button.quick-view-close {
		@include media-breakpoint-down(xs) {
			right: 8px !important;
		}
	}
	.quick-view-buttons {
		position: relative;
		border: none;
		opacity: .65;
		top: 0;
		padding: 0;
		width: 90px;
		height: 110px;
		&:focus {
			outline: none;
		}
		&::before,
		&::after {
			content: '';
			border: none;
			width: 50px;
			height: 1px;
			margin: 0;
			position: absolute;
			top: 50%;
			transition: .3s;
			background-color: #fff;
			@include media-breakpoint-down(xs) {
				width: 25px;
				background-color: #fff;
			}
		}

		&.quick-view-prev {
			&::before,
			&::after {
				margin-left: 25px;
				left: 20px;
				transform-origin: 0 center;
				@include media-breakpoint-down(xs) {
					left: -25px;
				}
			}
			&::before {
				margin-left: 25px;
				transform: rotate(-45deg);
			}
			&::after {
				transform: rotate(45deg);
			}
		}
		&.quick-view-next {
			&::before,
			&::after {
				right: 20px;
				left: auto;
				transform-origin: 100% center;
				@include media-breakpoint-down(xs) {
					right: 0;
				}
			}
			&::before {
				transform: rotate(45deg);
			}
			&::after {
				transform: rotate(-45deg);
			}
		}
	}
}

/*--------------------------------------------------------------
# Single Product
--------------------------------------------------------------*/

.woocommerce.single-product {
	div.product div.woocommerce-tabs {
		padding-top: 32px;
	}
	div.woocommerce-tabs {
		.woocommerce-Tabs-panel--additional_information {
			table.shop_attributes {
				tbody {
					tr {
						th {
							width: auto;
							border-right: 1px solid $color__background-hr;
							@include media-breakpoint-up(sm) {
								width: 260px;
							}
						}
						th, td {
							padding: 5px 15px 5px 34px;
						}
						td {
							font-style: normal;
							a {
								text-decoration: none;
							}
						}
					}
				}
			}
		}
		.woocommerce-Tabs-panel {
			#review_form #respond p {
				&.comment-form-author {
					margin-right: 15px;
				}
				&.comment-form-email {
					margin-left: 15px;
				}
			}
			#commentform {
				grid-column-gap: 0;
				grid-template-columns: repeat(2, 1fr);

				p {
					&.form-submit #submit {
						border-radius: $border__radius;
						font-size: .86rem;
						letter-spacing: .6px;
						font-weight: 500;
					}
					&.comment-form-email {
						@include media-breakpoint-down(lg) {
							margin-left: 0 !important;
						}
					}
					&.comment-form-author {
						@include media-breakpoint-down(lg) {
							margin-right: 0 !important;
						}
					}
					textarea, input {
						padding-left: 25px;
					}
					i {
						display: none;
					}
				}
			}

			.comment-form-rating {
				.stars {
					&::before {
						display: none;
					}
					span {
						margin-left: 8px;
						line-height: 1.2;
						a {
							&:not(.active)::before {
								color: $woo_yellow;
							}
							&.active::before {
								color: $woo_yellow;
							}
							&.active ~ a::before {
								color: $woo_grey;
							}
							&::before {
								content: '\ea85';
								letter-spacing: 5.5px;
								@include nucleo-mini-icon;
								line-height: 1.2;
							}
							& + a {
								margin-left: 3px;
							}
						}
						&::before {
							display: none;
						}
					}
				}
			}
		}
		.wc-tab ul > li::before {
			@include nucleo-mini-icon;
		}
		.wc-tab.panel {
			padding-top: 35px;
			margin-bottom: 3em;
			h2 {
				font-size: 12px;
				font-weight: 600;
				font-family: inherit;
				text-transform: uppercase;
			}
		}
		ul.tabs {
			overflow: visible;
			padding: 0 4px;
			&::before {
				border: none;
			}
			li {
				margin: 0;
				padding: 8px 25px;
				border: 1px solid;
				position: relative;
				border-bottom: none;
				@include media-breakpoint-down(sm) {
					padding: 5px;
				}
				@include media-breakpoint-down(xs) {
					width: 100%;
					text-align: center;
					&::before {
						display: none;
					}
				}
				&::before {
					border-width: 0;
					box-shadow: none;
				}
				a {
					font-size: 12px;
					font-weight: 600;
					text-transform: uppercase;
					letter-spacing: 1px;
				}
				&::before {
					width: 0;
				}
				&.active {
					border-bottom: none;
					&::before {
						content: '';
						position: absolute;
						bottom: -15px;
						left: 0;
						right: 0;
						height: 30px;
						background: #fff;
						width: 98%;
						border: none;
					}
				}
			}
		}
	}
	.woocommerce-Reviews {
		.woocommerce-Reviews-title {
			margin-bottom: 8px;
		}
		ol.commentlist {
			li.comment {
				.comment_container {
					width: 100%;
					border-bottom: 1px dashed $color__background-hr;
					img {
						margin-top: 10px;
					}
					.star-rating {
						left: auto;
						right: 0;
						top: 5px;
						@include media-breakpoint-down(xs) {
							top: 0;
						}
					}
				}
				.description {
					margin-top: 15px;
				}
				.comment-text .meta {
					.woocommerce-review__author {
						font-size: 16px !important;
					}
					.woocommerce-review__dash {
						display: none;
					}
					.woocommerce-review__published-date {
						display: block;
					}
				}
				.children {
					margin-left: 0 !important;
				}
			}
		}
	}
	.single_product_wrapper {
		.images {
			div.enlarge {
				top: 10px;
				right: 10px;
				left: auto;
				border: 1px solid $color__background-hr;
				border-radius: $border__radius;
				height: 45px;
				width: 45px;
				@include transition(.3s ease all);

				i {
					width: 100%;
					text-align: center;

					&::before {
						content: '\ea64';
						@include nucleo-mini-icon;
						@include font-size(1);
						line-height: 45px;
					}
				}
			}
		}
		.entry-summary {
			span.featured,
			span.onsale,
			span.new,
			span.onsale {
				left: auto;
				top: auto;
				width: auto;
				display: inline-block;
				vertical-align: middle;
				position: relative;
				align-self: flex-start;
			}
			.product_title {
				margin-bottom: 2px;
			}
			.woocommerce-product-rating {
				.woocommerce-review-link {
					margin-top: 3px;
					margin-left: 0;
				}
			}
			.variations_form {
				margin-bottom: 23px;
			}
			.wishlist_compare_button_block {
				button.button.btn {
					margin-left: 0;
				}
			}
			.woocommerce-variation-add-to-cart.variations_button {
				> .button {
					padding: 13px 26px 13px 50px;
				}
				.quantity {
					margin: 0;
					display: flex;
					border: 1px solid $color__background-sidebar-hr;
					border-radius: $border__radius;
					margin-right: 10px;
					@include media-breakpoint-down(sm) {
						margin-bottom: 20px;
					}

					input {
						margin-right: 0;
						height: 40px;
						order: 2;
						border: none;
						box-shadow: none;
						padding-left: 10px;
						padding-right: 0;
					}
					span {
						position: relative;
						top: auto;
						bottom: auto;
						left: auto;
						right: auto;
						padding: 12px 21px;
						border: none;
						width: 40px;
						height: 40px;
						margin-right: 0;

						&::before {
							position: absolute;
							top: 50%;
							left: 50%;
							@include translate(-50%, -50%);
							@include nucleo-mini-icon();
							@include font-size(0.625);
							@include transition(.3s ease all);
						}
						&.tm-qty-minus {
							order: 1;
							margin-right: 0;

							&::before {
								content: '\ea5b';
							}
						}
						&.tm-qty-plus {
							order: 2;

							&::before {
								content: '\ea5a';
							}
						}
					}
				}
			}
			.price {
				margin-bottom: 6px;
			}
			* + .product_meta {
				padding-top: 13px;

				&__footer {
					padding-top: 0;
				}
			}
			.product_meta {
				font-size: 11px;
				font-weight: 700;

				span {
					margin-bottom: 0;

					> * {
						font-weight: 400;
					}
				}
			}
		}
	}
}

/*--------------------------------------------------------------
# Wishlist Page
--------------------------------------------------------------*/
.woocommerce.tm-woowishlist {
	padding: 0;
	.tm-woowishlist-item {
		align-items: center;
		> * {
			@include media-breakpoint-down(xs) {
				width: 100%;
				text-align: center;
				margin-right: 0;
			}
		}
		.wrap_elements {
			@include media-breakpoint-down(xs) {
				align-items: center;
			}
		}
		@include media-breakpoint-down(xs) {
			flex-wrap: wrap;
		}
		.tm-woocomerce-list__product-title a {
			text-transform: uppercase;
		}
		.stock {
			font-size: 12px;
			font-weight: 400;
			border-radius: $border__radius;
			padding: 3px;
		}
		.tm-woowishlist-remove {
			position: relative;
			top: auto;
			right: auto;
			padding-right: 40px;
			@include media-breakpoint-down(xs) {
				padding-right: 0;
				padding-bottom: 15px;
			}
			&::before {
				@include nucleo-mini-icon;
				content: '\ea5d';
				@include font-size(1);
			}
		}
	}
}

/*--------------------------------------------------------------
# Checkout Page
--------------------------------------------------------------*/
.woocommerce-checkout .woocommerce {
	.woocommerce-error {
		margin-bottom: 20px;
		background: $color__background-screen;
		border-radius: 0;
		&::before {
			@include nucleo-mini-icon;
			content: '\ea68';
		}
		li {
			color: $color__not-valid;
		}
	}
	.woocommerce-info {
		text-transform: uppercase;
		font-size: 22px;
		letter-spacing: 0.4px;
		margin-bottom: 14px !important;
	}
	.checkout.woocommerce-checkout {
		label {
			padding-left: 0;
		}
		h3 {
			font-size: 22px;
			letter-spacing: 0.4px;
		}
	}
	.woocommerce-form-login {
		label {
			padding-left: 0;
		}
		> p:first-child {
			margin-bottom: 8px;
		}
		.form-row {
			&.form-row-last {
				margin-bottom: 20px;
			}
			.button {
				border-radius: $border__radius;
				padding: 12px 30px;
			}
		}
		.lost_password {
			padding-top: 9px;
			margin-bottom: 10px;
			a {
				text-decoration: none;
				text-transform: uppercase;
				font-weight: 500;
				font-size: 12px;
				letter-spacing: 0.6px;
			}
		}
	}
	form.place-order {
		.button {
			font-size: 12px;
			border-radius: $border__radius;
			padding: 13px 35px;
		}
	}
	.checkout_coupon {
		padding-bottom: 0;
		.form-row.form-row-first {
			position: relative;
			&::before {
				content: '\ebc8';
				@include nucleo-mini-icon;
				position: absolute;
				top: 50%;
				left: 20px;
				@include translate(0, -50%);
				color: lighten($woo_grey, 5%);
			}
		}
		.input-text {
			padding-left: 40px;
		}
		.button {
			font-size: 12px;
			border-radius: $border__radius;
			padding: 16.5px 28px;
		}
	}
	table.woocommerce-checkout-review-order-table.shop_table {
		thead tr th {
			padding: 10px 0;
			font-weight: 700;
			@include font-size(1);
			&.product-total {
				text-align: center;
			}
		}
		tbody tr td {
			.mini_cart_item_title {
				font-weight: 700 !important;
			}
			&.product-total {
				width: 175px;
				text-align: center;
				span {
					font-size: 16px;
					text-transform: uppercase;
				}
			}
		}
		tfoot tr {
			&.order-total,
			&.cart-subtotal {
				text-transform: uppercase;
				letter-spacing: 0.6px;
				td {
					text-align: center;
				}
			}
			&.shipping {
				th {
					text-transform: uppercase;
					font-size: 16px;
				}
			}
			.woocommerce-Price-amount {
				font-weight: 500;
			}
			&:first-child {
				> *,
				.woocommerce-Price-amount {
					font-size: 16px;
				}
			}
			&:last-child {
				> *,
				.woocommerce-Price-amount {
					padding-top: 30px;
					padding-bottom: 30px;
					font-size: 16px;
				}
			}
		}
	}
}

/*--------------------------------------------------------------
# Compare Page
--------------------------------------------------------------*/
.woocommerce.tm-woocompare-list {
	.tm-woocompare-wrapper {
		.tablesaw-advance {
			.tablesaw-nav-btn {
				&::after {
					@include nucleo-mini-icon;
					@include font-size(1);
				}
				&.right::after {
					content: '\e94c';
				}
				&.left::after {
					content: '\e94b';
				}
			}
		}
		table.tm-woocompare-table {
			tr {
				border-right: none !important;
				th {
					.tm-woocompare-remove {
						right: auto;
						&::before {
							content: '\ea5d';
							@include nucleo-mini-icon;
							@include font-size(1);
						}
					}
				}
			}
			tbody {
				tr {
					&:nth-child(3) {
						border-bottom: 1px solid $color__background-hr;
					}
					td {
						.price {
							padding-bottom: 15px;
						}
					}
				}
			}
		}
	}
}

/*--------------------------------------------------------------
# Cart Page
--------------------------------------------------------------*/
.woocommerce-cart {
	.woocommerce {
		.cart-collaterals {
			padding-bottom: 0;
			padding-top: 4px;
		}
		div.cart_totals {
			table.shop_table.shop_table_responsive {
				margin-top: 0;
				tbody {
					tr {
						width: 100%;
						display: block;
						&.cart-subtotal,
						&.shipping,
						&.order-total {
							border-bottom: 1px solid $wooborder_color;
							margin: 0;
							padding: 0;
							@include media-breakpoint-down(sm) {
								border-bottom: none;
							}
							th,
							td {
								width: 49%;
								display: inline-block;
								@include media-breakpoint-down(sm) {
									width: 100%;
									display: block;
								}
							}
							th {
								text-align: left;
							}
							td {
								text-align: right;
								padding: 5px 0;
								border-left: 1px solid $wooborder_color;
								@include media-breakpoint-down(sm) {
									border-left: none;
								}
							}
						}
						&.shipping {
							ul#shipping_method {
								li {
									text-align: right;
								}
							}
							.woocommerce-shipping-calculator {
								padding-left: 5px;
							}
						}
					}
				}
			}
			.wc-proceed-to-checkout {
				padding-bottom: 0;

				.checkout-button {
					font-size: 12px;
					border-radius: $border__radius;
					position: relative;
					padding: 17px 35px;
					margin-bottom: 0;

					&::before {
						content: '\ea20';
						@include nucleo-mini-icon;
						position: relative;
						left: -5px;
					}
				}
			}
		}
		table.shop_table.shop_table_responsive {
			@include media-breakpoint-down(sm) {
				border: none;
			}
			tr.cart-subtotal {
				margin-bottom: 16px;

				th,
				.woocommerce-Price-amount {
					text-transform: uppercase;
				}
			}
			tr.order-total {
				th,
				.woocommerce-Price-amount {
					text-transform: uppercase;
				}
			}

			tr.cart-subtotal,
			tr.order-total {
				padding: 0;
			}

			thead {
				tr th {
					padding: 9px 0;
					font-weight: 700;
					@include font-size(1);

					&:first-child {
						text-align: left;
					}
				}
			}
			tbody {
				tr.cart_item {
					@include media-breakpoint-down(sm) {
						padding-bottom: 20px;
					}
				}
				tr td {
					padding: 40px 10px 40px 0;

					@include media-breakpoint-down(sm) {
						padding: 10px;
						border-right: none;
					}
					&.product-thumbnail {
						width: 100px;
						max-width: 100px;
					}
					&.product-name {
						padding-left: 30px;

						@include media-breakpoint-down(sm) {
							padding-left: 10px;
						}
					}
					.woocommerce-Price-amount {
						font-size: 16px;
					}
					.remove {
						top: 47%;

						&::before {
							content: '\ea5d';
							@include nucleo-mini-icon;
							@include font-size(1);
						}
						@include media-breakpoint-down(sm) {
							left: 50%;
							transform: translateX(-50%);
						}
					}
					&.actions {
						padding: 40px 10px 10px 10px;
						position: relative;

						.input-text#coupon_code {
							padding: 14px 30px 15px 41px;
							border: 1px solid darken($color__background-hr, 5%);
						}
						.button,
						.header-btn {
							font-size: 12px;
							border-radius: $border__radius;
							padding: 18px 28px;
						}
						.input-button-with-icon {
							.btn {
								padding-left: 55px;
							}
						}
						.header-btn {
							position: relative;
						}
						.shopping_tag {
							position: absolute;
							left: 13px;

							top: 18px;
							&::before {
								content: '\ebc8';
								@include nucleo-mini-icon;
							}
						}
					}
				}
			}
		}
	}
}
