/* =========================================================
   Product Hero — gallery (left) + info (right)
   Desktop: vertical thumbs + main image.
   Mobile (≤1023px): main image + horizontal thumbs below.
   ========================================================= */

.product-hero-section {
	padding-block: var(--space-5);
}

.product-hero-section__inner {
	display: grid;
	grid-template-columns: minmax(0, 361fr) minmax(0, 265fr);
	gap: 18px;
	align-items: start;
}

.product-gallery {
	display: grid;
	grid-template-columns: 120px minmax(0, 1fr);
	gap: 16px;
	width: 100%;
	align-items: stretch;
}

/* ---- Thumb column ---- */

.product-gallery__thumbs-col {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-height: calc(100% + 20px);
	height: 0;
	overflow: hidden;
}

.product-gallery__thumbs-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 100%;
	height: 32px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	color: #4c4d4f;
}

.product-gallery__thumbs-nav:focus-visible {
	outline: 2px solid var(--color-text);
	outline-offset: 2px;
}

.product-gallery__thumbs-nav.swiper-button-disabled {
	opacity: 0.35;
	cursor: default;
	pointer-events: none;
}

.product-gallery__thumbs-nav-icon {
	display: block;
	width: 15px;
	height: 8px;
}

.product-gallery__thumbs-nav-icon svg {
	display: block;
	width: 100%;
	height: 100%;
}

.product-gallery__thumbs-nav--next .product-gallery__thumbs-nav-icon {
	transform: rotate(180deg);
}

.product-gallery-thumbs {
	flex: 1;
	min-height: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
}

.product-gallery-thumbs .swiper-slide {
	width: 100%;
	height: 120px !important;
	cursor: pointer;
	opacity: 0.45;
	transition: opacity 0.2s ease;
}

.product-gallery-thumbs .swiper-slide-thumb-active {
	opacity: 1;
}

.product-gallery__thumb {
	position: relative;
	width: 100%;
	height: 100%;
	overflow: hidden;
	border-radius: 8px;
	border: 1px solid transparent;
}

.product-gallery-thumbs .swiper-slide-thumb-active .product-gallery__thumb {
	border-color: transparent;
}

.product-gallery__thumb-img {
	position: absolute;
	top: 0;
	left: 0;
	display: block;
	width: 100% !important;
	max-width: none !important;
	height: 100% !important;
	max-height: none !important;
	object-fit: cover;
	object-position: center;
}

/* ---- Main image column ---- */

.product-gallery__main-col {
	position: relative;
	aspect-ratio: 1;
	width: 100%;
	max-height: 657px;
	min-width: 0;
	overflow: hidden;
	border-radius: 8px;
}

.product-gallery__main-nav {
	display: none;
	position: absolute;
	top: 50%;
	z-index: 2;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 9999px;
	background: transparent;
	color: #4c4d4f;
	cursor: pointer;
	transform: translateY( -50% );
}

.product-gallery__main-nav--prev {
	left: 4px;
}

.product-gallery__main-nav--next {
	right: 4px;
}

.product-gallery__main-nav:focus-visible {
	outline: 2px solid var(--color-text);
	outline-offset: 2px;
}

.product-gallery__main-nav.swiper-button-disabled {
	opacity: 0.35;
	cursor: default;
	pointer-events: none;
}

.product-gallery__main-nav-icon {
	display: block;
	width: 10px;
	height: 16px;
}

.product-gallery__main-nav-icon svg {
	display: block;
	width: 10px;
	height: 16px;
}

.product-gallery__main-nav-icon--next {
	transform: scaleX( -1 );
}

.product-gallery-main {
	height: 100%;
	border-radius: 8px;
	overflow: hidden;
}

.product-gallery-main .swiper-wrapper {
	height: 100% !important;
}

.product-gallery-main .swiper-slide {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	background: var(--color-bg);
	border-radius: 8px;
	overflow: hidden;
}

.product-gallery__main-img {
	display: block;
	width: 100%;
	height: 100%;
	max-height: none;
	object-fit: contain;
	object-position: center;
	border-radius: 8px;
}

@media (max-width: 1023px) {
	.product-hero-section__inner {
		display: flex;
		flex-direction: column;
		align-items: stretch;
	}

	.product-gallery {
		order: 2;
		display: flex;
		flex-direction: column;
		aspect-ratio: auto;
		max-height: none;
		gap: 0;
	}

	.product-gallery__main-col {
		order: 1;
		aspect-ratio: auto;
		width: 100%;
		height: 388px;
		max-height: none;
		overflow: hidden;
		border-radius: 8px;
	}

	.product-gallery__main-nav {
		display: flex;
	}

	.product-gallery__main-nav--prev {
		left: -6px;
	}

	.product-gallery__main-nav--next {
		right: -6px;
	}

	.product-gallery-main {
		height: 100%;
		border-radius: 8px;
		overflow: hidden;
	}

	.product-gallery-main .swiper-slide {
		height: 100%;
		align-items: stretch;
		border-radius: 8px;
		overflow: hidden;
	}

	.product-gallery__main-img {
		width: 100%;
		height: 100%;
		max-height: none;
		object-fit: cover;
		object-position: center;
		border-radius: 8px;
	}

	.product-gallery__thumbs-col {
		order: 2;
		flex-direction: row;
		align-items: stretch;
		width: 100%;
		height: auto;
		min-height: 0;
		padding-block: 8px 32px;
		overflow: visible;
	}

	.product-gallery__thumbs-nav {
		display: none;
	}

	.product-gallery-thumbs {
		flex: 1;
		width: 100%;
		height: auto;
		min-height: 0;
		overflow: hidden;
	}

	.product-gallery-thumbs .swiper-wrapper {
		align-items: center;
	}

	.product-gallery-thumbs .swiper-slide {
		flex-shrink: 0;
		width: 80px !important;
		height: 80px !important;
		opacity: 1;
	}

	.product-gallery__thumb {
		border-color: #e5e7eb;
		box-shadow: 0 20px 25px -5px rgba( 0, 0, 0, 0.1 ), 0 8px 10px -6px rgba( 0, 0, 0, 0.1 );
	}

	.product-gallery-thumbs .swiper-slide-thumb-active .product-gallery__thumb {
		border-color: transparent;
		box-shadow: 0 20px 25px -5px rgba( 0, 0, 0, 0.1 ), 0 8px 10px -6px rgba( 0, 0, 0, 0.1 );
	}
}

@media (max-width: 389px) {
	.product-gallery-thumbs .swiper-slide {
		width: 70px !important;
		height: 70px !important;
	}
}
