/* ==========================================================================
   Single Product Layout — horizontal row (gallery left, summary right)
   ========================================================================== */

.single-product div.product {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
	align-items: start;
}

.single-product div.product div.images,
.single-product .woocommerce-product-gallery {
	grid-column: 1;
	width: 100%;
	max-width: 100%;
	float: none;
	margin: 0;
	padding: 0;
}

.single-product div.product div.summary,
.single-product .summary.entry-summary {
	grid-column: 2;
	width: 100%;
	max-width: 100%;
	float: none;
	margin: 0;
	padding-top: 0;
	text-align: left;
}

.single-product .product_title,
.single-product h1.product_title,
.single-product .summary.entry-summary h1 {
	font-size: clamp(28px, 4vw, 60px);
	line-height: 0.95;
	letter-spacing: -0.012em;
	margin: 0 0 20px 0;
	text-wrap: balance;
}

.single-product div.product::before,
.single-product div.product::after,
.single-product div.product div.summary::before,
.single-product div.product div.summary::after {
	display: none;
	content: none;
}

/* ==========================================================================
   Product Gallery — Main image + thumbnail rail
   ========================================================================== */

.kh-gallery {
	opacity: 1 !important;
}

/* --- Main image area --- */
.kh-gallery__main {
	width: 100%;
	margin: 0;
	padding: 0;
	background: transparent;
}

.kh-gallery__main a {
	display: block;
	pointer-events: none;
	cursor: default;
}

.kh-gallery__main img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: contain;
	object-position: center center;
	margin: 0 auto;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	background: transparent;
}

/* --- Thumbnail rail --- */
.kh-gallery__thumbs {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: center;
	margin-top: 20px;
	padding: 0;
}

.kh-gallery__thumb {
	flex: 0 0 auto;
	width: 64px;
	height: 64px;
	padding: 0 !important;
	margin: 0 !important;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 8px !important;
	background: transparent;
	overflow: hidden;
	cursor: pointer;
	opacity: 0.5;
	transition: opacity 0.2s ease, border-color 0.2s ease;
}

.woocommerce div.product div.images .kh-gallery__thumb img {
	width: 100% !important;
	height: 100% !important;
}

.kh-gallery__thumb:hover {
	opacity: 0.8;
	border-color: rgba(255, 255, 255, 0.25);
}

.kh-gallery__thumb.is-active {
	opacity: 1;
	border-color: rgba(255, 255, 255, 0.4);
}

.kh-gallery__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
	margin: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
}

/* --- Hide default WC gallery styling artifacts --- */
.kh-gallery .woocommerce-product-gallery__wrapper {
	margin: 0;
	padding: 0;
}

/* ==========================================================================
   Mobile — collapse to single column
   ========================================================================== */
@media (max-width: 991px) {
	.single-product div.product {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.single-product div.product div.summary,
	.single-product .summary.entry-summary {
		grid-column: 1;
	}

	.kh-gallery__thumbs {
		gap: 6px;
		margin-top: 12px;
	}

	.kh-gallery__thumb {
		width: 56px;
		height: 56px;
		border-radius: 6px;
	}
}
