// Product name

.cart-mini,
.cart_item {

	a {
		&.woo-product-name {
			color: inherit;

			@include inline-flex;
			@include headings-typo(h6);

			line-height: 1.35;
		}
	}
}

// Product categories

.woo-category {
	font-size: $font-size-caption;
	line-height: 1.35;
}

// Product price

.woo-price,
.amount {
	font-weight: 600;
	font-size: $font-size-caption;

	@include sm-screen {

		font-size: 0.88em;
	}
}

// Subtotal

.product-subtotal {
	margin: 0;

    .quantity {
        font-size: $font-size-caption;
        white-space: nowrap;
    }
}

.quantity {
	position: relative;
	width: 5rem;

	input {
		
		&::-webkit-outer-spin-button,
		&::-webkit-inner-spin-button {
		    -webkit-appearance: none;
		    margin: 0;
		}

		&[type=number] {
			text-align: center;
			padding: 0 !important;
			margin: 0;
			min-height: $button-small-height;
			background-color: $color-neutral-8;
			font-size: $font-size-caption;
		    -moz-appearance:textfield;
		}

		&:focus {
		  	outline: 0;
		}
	}

	&-nav {
		position: absolute;
		width: 100%;
		left: 0;
		top: 0;
		height: 100%;

		@include flex;
		@include flex-just(space-between);
	}

	&-button {

		svg {
			transform: scale(0.7);
		}
		
		&.button {
			height: 100%;
			min-height: unset;
			width: $button-small-height;
			cursor: pointer;
			padding: 0;
			user-select: none;
			position: relative;

			@include transition;
			@include border-radius;

			&:not(:hover) {

				svg {
					opacity: 0.75;
				}
			}

			&:hover {
				background-color: $color-neutral-15;
			}
		}
	}
}

// Product row

.cart_item:not(tr),
.mini_cart_item {
	padding: 0.85rem 0 !important;
	border-bottom: 1px solid $color-border;

	&:first-child {
    	padding-top: 0 !important;
    }

    &:last-of-type {
    	padding-bottom: 0 !important;
    	border-bottom: none;
    }

    @include flex;
    @include align-items(center);
    @include flex-just(space-between);
    @include clearfix;

    > * {
    	margin-right: 1rem;
    }

    .product-subtotal {
    	margin-right: 0;
    }

    // Thumbnail

	.product-thumbnail {
		position: relative;

	   	img {

	        @include metro-img(4.25rem);
	    }

	    // Remove icon button

	    .remove {
	        background-color: rgba($color-black, 0.5);
	        opacity: 0;
	        z-index: 1;
	        
	        @include centered;
	        @include transition(opacity);
	    }
	}

	// Name

	.product-name {
		padding-right: 0.75rem;
        line-height: 1.35;
        flex-grow: 2;
	}

	// Quantity holder

	.product-quantity-holder {
		margin-right: 0;

		@include flex;
	    @include align-items(center);

	    @include md-screen {

		    @include flex-just(space-between);

	    	.product-quantity {
	    		margin: 0 0.75rem;
	    	}
	    }

	    @include sm-screen {

	    	@include flex-direction(column);
	    	@include align-items(flex-end);

	    	.product-quantity {
	    		margin: 0.25rem 0;
	    	}
	    }
	}

	&:hover {

        .remove {
            opacity: 1;
        }
    }
}

// Form row

.woocommerce-input-wrapper,
.password-input {
	display: block;
}

// Related and upsells

.woo-related,
.woo-upsells {

	@include spacer4x(margin-top);

	.woo-products {
		margin-top: -$grid-spacer;
	}
}

// Related and recommended

.woo-related,
.woo-c_recommended {
	
	@include spacer4x(margin-bottom);
}

// Cross Sells

.cross-sells {

	@include spacer3x(margin-top);

	> .title {

		+ * {
			margin-top: -$grid-spacer;
		}
	}

	@include md-screen {

		.columns-3 {

			li {
				width: calc(100% / 2);
			}
		}
	}

	// Product grid styles overrides

	.woo-products {

		.product-item {

			.icon-button {
				height: $circle-small;
				min-width: $circle-small;
				width: $circle-small;
			}

			.clb-slider-nav-btn {
				padding: 1rem;
			}

			.button-quickview,
			.tag {
			    left: 1rem;
			    top: 1rem;
	    	}

			.clb-slider-nav-btn {
			    padding: 1rem;
			}

			.woo-product-name {
			    font-size: 1rem;
			}

			.product-item-buttons {
			    padding: 1rem;

			    .button-group {
				    padding: 0;
				}
			}

			&.card {

				&:not(.-with-overlay):not(.-image-only).-contained {

					.card-details {
						padding-bottom: 1rem;
					    padding-left: 1rem;
					    padding-right: 1rem;
					}
				}


				&:not(.-with-overlay):not(.-image-only) {

					.card-details {
						padding-top: 1rem;
					}
				}   
			}

			.button-group {

				&:nth-child(2) {
					display: none;
				}
			}
		}
	}
}

.woocommerce-additional-fields {

	h3 {
		font-size: 1.55rem;

		@include spacer2x(margin-top);

		@include sm-screen {

			font-size: 1.35rem; ;
		}
	}
}

// Form Row

.form-row {

	&:not(.place-order) {
		padding-bottom: 1rem;
	}

	em {
		font-style: normal;
		color: $color-grey;
		font-size: $font-size-small;
		line-height: 1.5;
		margin-top: 0.5rem;
		display: block;
	}
}

// Notifications

.woocommerce-notices-wrapper {

	.woocommerce-info {
		margin-bottom: 1rem;
	}
}

// Sidebar

.woo-sidebar {

	// Boxed

	&.-boxed {
		
		background-color: $color-neutral-6;

		@include spacer2x;
		@include border-radius;
	}

	@include sm-screen {

		margin: $grid-spacer 0 0 0;
	}

	// Table

	tr {
		font-size: $font-size-small;
		vertical-align: top;

		&:first-child {

			th, 
			td {
				border: none;
			}
		}

		&:last-child {

			th, 
			td {
				border: none;
			}
		}

		th {
			font-weight: normal;
			font-size: 0.96em;
		}

		th,
		td {

			&:first-child {

				width: 52%;
				padding-right: 1.5rem;
			}
		}

		&.order-total {

			.amount {
				font-size: $font-size-large;
			}
		}
	}

	ul {

		@include unlist;

		margin: 0.25rem 0;
	}

	.button {
		width: 100%;
		margin-top: 1rem;
		text-transform: capitalize;

		+ .ppc-button-wrapper {
			margin-top: 1rem;
		}
	}

	// Shipping

	.woocommerce-shipping-calculator {

		.shipping-calculator-button {
			font-weight: 600;
		}

		.shipping-calculator-form {
			margin: 1rem 0;
		}

		p {

			&.form-row {
				margin: 0;
			}

			&:last-of-type {

				&, 
				> .button {
					margin: 0;
				}
			}
		}
	}

	// Payment methods

	.woocommerce-checkout-payment {
		border-top: 1px solid $color-border;
		padding-top: 1.25rem;
	}

	.payment_methods {

		@include unlist;

		a {
			font-size: $font-size-caption;
		}

		// PayPal

		.form-row {
			margin: 0;
			padding-bottom: 0.5rem;

			input {
				min-height: $button-small-height;
				font-size: $font-size-extra-small;
			}
		}
	}

	// Privacy Policy

	.woocommerce-privacy-policy-text {
		border-top: 1px solid $color-border;
		margin-top: 1rem;

		+ .form-row {
			margin-bottom: 0;
		}
	}

	.woocommerce-privacy-policy-text,
	.woocommerce-form__label-for-checkbox,
	.payment_box > p,
	.woocommerce-notice {
		font-size: $font-size-caption;
		color: $color-grey;

		a {
			font-weight: bold;
		}
	}

	// My Account

	.woocommerce-MyAccount-navigation {

		li {
			padding: 0.15rem 0;

			a {
				font-weight: normal;
				font-size: $font-size-small;
			}

			&.is-active {

				a {
					font-weight: 600;
				}
			}
		}
	}
}

// Add to wishlist override

.yith-wcwl-add-to-wishlist {
    margin-top: initial;
}

.woocommerce {

	// Hide PayPal bottom iframe

	&-checkout {

		> iframe {
			position: fixed !important;
		}
	}

	// Alerts

	.alert {

		a {
			font-weight: 600;
		}
	}

	// Wishlist standard alert

	#yith-wcwl-popup-message {
		margin: unset !important;
		top: unset;
	    font-weight: unset;
	    line-height: unset;
	    background-color: lighten($color-success, 50%);
		color: $color-success;
	    position: fixed;
		transform: translateX(-50%);
	    padding: 0.5rem 1rem;

	    @include spacer(bottom);
		@include box-shadow(false, 0px, 5px, 10px, 0px, $color-neutral-6);
	}
}