/* Independent product gallery slider - live-site style horizontal slide */

.single-product div.product .tsc-cpg {
	float: left;
	width: 54%;
	margin: 0 5% 48px 0;
	box-sizing: border-box;
}

.tsc-cpg-main-wrap {
	position: relative;
	overflow: hidden;
	background: #fff;
}

.tsc-cpg-main {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #fff;
}

/*
 * The reference site uses the classic WooCommerce/FlexSlider-style motion:
 * images move horizontally rather than cross-fading.
 */
.tsc-cpg-track {
	display: flex;
	width: 100%;
	height: 100%;
	transform: translate3d(0, 0, 0);
	transition: transform 500ms ease;
	will-change: transform;
}

.tsc-cpg-slide {
	position: relative;
	flex: 0 0 100%;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	text-decoration: none;
}

.tsc-cpg-main-image,
.tsc-cpg-slide img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	object-fit: contain;
	margin: 0 !important;
}

/* Navigation arrows */
.tsc-cpg-arrow {
	position: absolute;
	top: 50%;
	z-index: 5;
	transform: translateY(-50%);
	width: 42px;
	height: 42px;
	border: 0;
	border-radius: 50%;
	background: rgba(255,255,255,.92);
	color: #222;
	font-size: 21px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0,0,0,.14);
	opacity: 0;
	transition: opacity .2s ease;
}

.tsc-cpg-main-wrap:hover .tsc-cpg-arrow,
.tsc-cpg:focus-within .tsc-cpg-arrow {
	opacity: 1;
}

.tsc-cpg-arrow[disabled] {
	opacity: 0 !important;
	pointer-events: none;
}

.tsc-cpg-prev {
	left: 14px;
}

.tsc-cpg-next {
	right: 14px;
}

/* Thumbnail strip */
.tsc-cpg-thumbs {
	display: flex;
	gap: 10px;
	margin-top: 12px;
	padding-bottom: 4px;
	overflow-x: auto;
	scroll-behavior: smooth;
	scrollbar-width: thin;
}

.tsc-cpg-thumb {
	flex: 0 0 78px;
	width: 78px;
	height: 78px;
	padding: 0;
	border: 2px solid transparent;
	background: #fff;
	cursor: pointer;
	overflow: hidden;
	opacity: .55;
	transition: opacity .2s ease, border-color .2s ease;
}

.tsc-cpg-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tsc-cpg-thumb:hover,
.tsc-cpg-thumb.is-active {
	opacity: 1;
	border-color: #222;
}

.tsc-cpg--empty .tsc-cpg-main {
	aspect-ratio: 1 / 1;
}

.tsc-cpg--empty img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

/* Product summary on the right */
@media (min-width: 992px) {
	.single-product div.product .summary,
	.single-product div.product .summary.entry-summary {
		float: right !important;
		clear: none !important;
		width: 41% !important;
		margin: 0 0 48px !important;
	}

	.single-product div.product .woocommerce-tabs,
	.single-product div.product .related.products {
		clear: both !important;
		width: 100% !important;
	}
}

@media (max-width: 991px) {
	.single-product div.product .tsc-cpg,
	.single-product div.product .summary,
	.single-product div.product .summary.entry-summary {
		float: none !important;
		clear: both !important;
		width: 100% !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}

	.single-product div.product .tsc-cpg {
		margin-bottom: 30px;
	}
}

@media (max-width: 600px) {
	.tsc-cpg-thumb {
		flex-basis: 64px;
		width: 64px;
		height: 64px;
	}

	.tsc-cpg-arrow {
		width: 36px;
		height: 36px;
		opacity: 1;
	}
}

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
	.tsc-cpg-track,
	.tsc-cpg-thumbs {
		scroll-behavior: auto;
		transition: none !important;
	}
}
