.single-product {

	.woocommerce-breadcrumb {
		@include s-r-8(padding-bottom);
	}

	div.product {
		position: relative;
		max-width: var(--global--wide-content-width);

		@include breakpoint(sm) {
			display: grid;
			grid-template-columns: repeat(12, 1fr);
			column-gap: 2rem;
		}

		@include breakpoint(lg) {
			column-gap: 3rem;
		}
	}

	.woocommerce-product-gallery {
		opacity: 1 !important;
		position: relative;
		grid-column-start: 1;
		grid-column-end: 13;
		@include s-r-9(padding-bottom);

		&__trigger {
			position: absolute;
			top: 1rem;
			right: 1rem;
			z-index: 10;
			font-size: 0;
			background: #ffffff;
			border-radius: var(--global--border-radius-l);
			display: block;
			width: 3rem;
			height: 3rem;

			&::before,
			&::after {
				content: "";
				position: absolute;
				display: block;
				background: var(--wp--preset--color--font-primary);
				z-index: 9;
			}

			&::after {
				height: 1px;
				margin-top: -1px;
				top: 50%;
				left: 12px;
				right: 12px;
			}

			&::before {
				width: 1px;
				margin-left: -1px;
				left: 50%;
				top: 12px;
				bottom: 12px;
			}
		}

		@include breakpoint(sm) {
			grid-column-end: 8;
		}

		@include breakpoint(md) {
			grid-column-end: 9;
		}

		.flex-control-nav {
			display: flex;
			justify-content: flex-start;
			@include s-r-4(padding-top);

			li {
				&::marker {
					content: "";
				}

				img {
					max-width: 96px;
					@include s-r-4(margin-right);
				}
			}
		}
	}

	.onsale {
		top: 1rem;
		left: 1rem;
	}

	// Product details with Add to Cart button
	.entry-summary {
		position: relative;

		@include breakpoint(sm) {
			grid-column-start: 8;
			grid-column-end: 13;
		}

		@include breakpoint(md) {
			grid-column-start: 9;
		}

		.product_title {
			@include s-r-6(padding-bottom);
		}

		.woocommerce-product-details__short-description {
			@include s-r-9(padding-bottom);
		}

		.woocommerce-product-rating {
			@include s-r-6(padding-bottom);
		}

		.woocommerce-review-link {
			@include s-r-1(margin-left);
		}

		.price {
			@include s-r-6(padding-bottom);
			line-height: var(--global--line-height-reset);
		}

		.cart {
			@include s-r-9(padding-bottom);

			&:not(.grouped_form):not(.variations_form) {
				display: flex;
				align-content: stretch;
			}

			.quantity:not(.hidden) {
				@include s-r-4(padding-right);
				line-height: var(--global--line-height-reset);

				.qty {
					max-width: 96px;
				}
			}

			.single_add_to_cart_button {
				flex-grow: 2;
			}

			.woocommerce-variation-add-to-cart {
				display: flex;
			}

			.variations {
				margin: 0;

				td,
				tr {
					display: block;
					padding: 0;
					border: 0;
				}

				td {
					padding: 0;
				}

				tr {
					@include s-r-6(padding-bottom);
				}

				select {
					width: 100%;
					max-height: 3.75rem;
					line-height: var(--global--line-height-reset);
					background: var(--global--color--form-background);

					&:active,
					&:focus {
						outline: none;
					}
				}

				.reset_variations {
					display: none;
					font-size: var(--wp--preset--font-size--text-xs) !important;
				}
			}

			.woocommerce-variation-description p {
				padding: 0;
			}

			.woocommerce-variation-price {
				@include s-r-6(padding-top);
				@include s-r-6(padding-bottom);
				display: block;
				font-size: var(--wp--preset--font-size--text-xl) !important;
			}
		}

		// Grouped product
		.grouped_form {

			.single_add_to_cart_button {
				width: 100%;
				@include s-r-2(margin-top);
			}

			.woocommerce-grouped-product-list {
				tr,
				td {
					border: none;
					width: 1%;
					white-space: nowrap;
					padding: 0;

					a {
						color: var(--wp--preset--color--font-secondary);
						font-size: var(--wp--preset--font-size--text-m) !important;
					}
				}

				td {
					@include s-r-4(padding-bottom);
				}
			}
		}

		.product_meta {

			.sku_wrapper,
			.posted_in,
			.tagged_as {
				display: block;
				@include s-r-2(padding-bottom);
			}
		}

		.woocommerce-grouped-product-list {
			width: 100%;
		}
	}

	// Variable Products
	.single_variation_wrap {
		width: 100%;
	}

	// Product description tabs
	.wc-tabs-wrapper {
		grid-column-start: 1;
		grid-column-end: 13;
		@include s-r-9(padding-top);
		@include s-r-12(padding-bottom);
		display: grid;
		grid-template-columns: repeat(12, 1fr);
		column-gap: 2rem;

		@include breakpoint(lg) {
			column-gap: 3rem;
		}

		.wc-tabs {
			list-style: none;
			font-size: var(--wp--preset--font-size--text-l) !important;
			grid-column-start: 1;
			grid-column-end: 13;

			li {
				@include s-r-6(padding-bottom);
			}

			@include breakpoint(sm) {
				grid-column-end: 5;
			}
		}

		.woocommerce-Tabs-panel {
			max-width: var(--global--default-content-width);
			grid-column-start: 1;
			grid-column-end: 13;

			@include breakpoint(sm) {
				grid-column-start: 5;
				grid-column-end: 13;
			}

			@include breakpoint(lg) {
				grid-column-end: 12;
			}
		}

		.woocommerce-Tabs-panel--description {

			p {
				padding-bottom: 0;
			}
		}

		.woocommerce-Tabs-panel--additional_information h2,
		.woocommerce-Tabs-panel--description h2,
		h2.woocommerce-Reviews-title {
			display: none;
		}

		#review_form {
			@include s-r-12(padding-top);

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

		.comment-reply-title {
			line-height: var(--global--line-height-reset);
		}

		.woocommerce-noreviews {
			padding: 0;
		}

		.comment-form-comment {
			line-height: 1;
		}

		.comment-respond {
			margin-left: 0;
			margin-right: 0;
		}

		.commentlist {
			padding: 0;

			.review {

				.avatar {
					display: none;
				}

				&::marker {
					content: "";
				}

				&:not(:last-child) {
					@include s-r-9(padding-bottom);
				}
			}
		}

		.comment-text {

			.woocommerce-review__author {
				display: block;
				@include s-r-1(padding-bottom);
			}

			.woocommerce-review__dash {
				display: none;
			}

			.meta {
				margin-bottom: 0;
				font-size: var(--wp--preset--font-size--text-xs) !important;
				line-height: var(--global--line-height-reset);
			}

			.description p {
				font-size: var(--wp--preset--font-size--text-m) !important;
			}

			.description {
				@include s-r-2(padding-top);

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

			.meta {
				@include s-r-2(padding-bottom);

				.woocommerce-review__author {
					font-weight: normal;
				}
			}

		}

		// Review Ratings
		.comment-form-rating {
			@include s-r-6(padding-top);

			.stars {
				@include s-r-1(padding-top);
				padding-bottom: 0;

				span {
					display: inline;
				}

				a {
					@include s-r-2(margin-right);
					text-decoration: none;
					display: inline;
					transition: none;
					font-size: 0;
					opacity: .4;
					color: var(--global--color--star-rating);
					margin: 0;

					&:before {
						display: inline-block;
						content: '\2605';
						line-height: 1;
						font-size: 24px;
					}
				}
			}

			#rating {
				max-height: 3.75rem;
			}
		}
	}

	.star-rating {
		position: relative;
		display: inline;
		font-size: 13px;
		line-height: 1;
	}

	.star-rating span {
		overflow: hidden;
		float: left;
		top: 0;
		left: 0;
		position: absolute;
		color: #2c2d33;
	}

	.stars a,
	.stars.selected a.active~a {
		opacity: .4;
	}

	.stars.selected a.active,
	.stars.selected a:not(.active) {
		opacity: 1;
	}

	.star-rating:before,
	.wc-block-review-list-item__rating>.wc-block-review-list-item__rating__stars:before {
		content: '\2605\2605\2605\2605\2605';
		color: var(--global--color--star-rating);
		letter-spacing: 0;
		@include s-r-1(padding-bottom);
		opacity: .4;
		font-size: 13px;
		line-height: 1;
	}

	.star-rating span {
		font-size: 0;
		overflow: hidden;
		display: inline;
		position: absolute;
		left: 0;
		top: 2px;
		z-index: 1;
	}

	.star-rating span {

		&::before {
			content: '\2605\2605\2605\2605\2605';
			color: var(--global--color--star-rating);
			letter-spacing: 0;
			opacity: 1;
			font-size: 13px;
			line-height: 1;
		}

		span {
			display: none;
		}
	}

	// Related products
	.related.products {
		grid-column-start: 1;
		grid-column-end: 13;

		h2:not(.woocommerce-loop-product__title) {
			font-size: var(--wp--preset--font-size--text-l) !important;
			@include s-r-9(padding-bottom);
		}

		ul {
			list-style: none;
		}
	}

	.custom-product-page-link {
		position: absolute;
		right: 0;

		@include breakpoint(sm) {
			top: 4px;
		}

		@include breakpoint(md) {
			top: 8px;
		}
	}
}

.woocommerce-cart,
.woocommerce-checkout {
	.custom-product-page-link {
		display: none;
	}
}
