/**
 * Tour detail page gallery — classic hero + thumbnails + lightbox.
 * Scoped under .tour-detail-gallery only.
 */

.tour-detail-gallery {
	--tdg-purple: #7048e8;
	padding: 20px 0 8px;
	background: var(--color-white, #fff);
}

/* ── Hero + thumbnails (classic layout) ── */

.tour-detail-gallery .tour-album__main {
	position: relative;
	width: 100%;
	max-width: 100%;
	height: min(52vw, 68vh, 640px);
	min-height: 280px;
	border-radius: var(--radius-lg, 16px);
	overflow: hidden;
	box-shadow: var(--shadow-card, 0 8px 24px rgba(54, 32, 100, 0.08));
	background: var(--color-gray-100, #f3f0f8);
}

.tour-detail-gallery .tour-album__hero-hit {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	cursor: zoom-in;
	background: transparent;
}

.tour-detail-gallery .tour-album__hero-image {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center;
	transition: opacity 0.35s ease, transform 0.35s ease;
}

.tour-detail-gallery .tour-album__hero-hit:hover .tour-album__hero-image,
.tour-detail-gallery .tour-album__hero-hit:focus-visible .tour-album__hero-image {
	transform: scale(1.02);
}

.tour-detail-gallery .tour-album__slider {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 14px;
}

.tour-detail-gallery .tour-album__thumbs {
	display: flex;
	flex-wrap: nowrap;
	gap: 12px;
	flex: 1;
	min-width: 0;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	padding: 4px 2px 8px;
}

.tour-detail-gallery .tour-album__thumbs::-webkit-scrollbar {
	display: none;
}

.tour-detail-gallery .tour-album__thumb {
	position: relative;
	flex: 0 0 clamp(140px, 18vw, 200px);
	display: block;
	width: clamp(140px, 18vw, 200px);
	padding: 0;
	border: 2px solid transparent;
	border-radius: var(--radius-md, 12px);
	overflow: hidden;
	background: var(--color-gray-100, #f3f0f8);
	cursor: pointer;
	aspect-ratio: 4 / 3;
	scroll-snap-align: start;
	box-shadow: var(--shadow-soft, 0 4px 12px rgba(54, 32, 100, 0.06));
	transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.tour-detail-gallery .tour-album__thumb-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tour-detail-gallery .tour-album__thumb:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-hover, 0 8px 20px rgba(54, 32, 100, 0.1));
}

.tour-detail-gallery .tour-album__thumb.is-active {
	border-color: var(--tdg-purple);
	box-shadow: 0 0 0 3px rgba(112, 72, 232, 0.15);
}

.tour-detail-gallery .tour-album__nav {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border: 1px solid var(--color-gray-200, #e8e4f0);
	border-radius: 50%;
	background: #fff;
	color: var(--color-heading, #19152f);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	box-shadow: var(--shadow-soft, 0 4px 12px rgba(54, 32, 100, 0.06));
	transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.tour-detail-gallery .tour-album__nav:hover:not(:disabled),
.tour-detail-gallery .tour-album__nav:focus-visible:not(:disabled) {
	background: var(--tdg-purple);
	border-color: var(--tdg-purple);
	color: #fff;
	transform: scale(1.04);
}

.tour-detail-gallery .tour-album__nav:disabled {
	opacity: 0.35;
	cursor: default;
}

.tour-detail-gallery .tour-album__slider:not(.is-scrollable) .tour-album__nav {
	display: none;
}

/* ── Lightbox ── */

.tour-detail-gallery .tour-gallery-lightbox {
	position: fixed;
	inset: 0;
	z-index: 10050;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.tour-detail-gallery .tour-gallery-lightbox[hidden] {
	display: none !important;
}

body.tour-gallery-lightbox-open {
	overflow: hidden;
}

.tour-detail-gallery .tour-gallery-lightbox__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 8, 20, 0.92);
	cursor: pointer;
}

.tour-detail-gallery .tour-gallery-lightbox__close {
	position: absolute;
	top: 18px;
	right: 18px;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	transition: background 0.22s ease, transform 0.22s ease;
}

.tour-detail-gallery .tour-gallery-lightbox__close:hover,
.tour-detail-gallery .tour-gallery-lightbox__close:focus-visible {
	background: rgba(255, 255, 255, 0.28);
	transform: scale(1.04);
}

.tour-detail-gallery .tour-gallery-lightbox__nav {
	position: absolute;
	top: 50%;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
	transform: translateY(-50%);
	transition: background 0.22s ease, color 0.22s ease;
}

.tour-detail-gallery .tour-gallery-lightbox__nav:hover,
.tour-detail-gallery .tour-gallery-lightbox__nav:focus-visible {
	background: #fff;
	color: var(--tdg-purple);
}

.tour-detail-gallery .tour-gallery-lightbox__nav--prev {
	left: max(12px, 2vw);
}

.tour-detail-gallery .tour-gallery-lightbox__nav--next {
	right: max(12px, 2vw);
}

.tour-detail-gallery .tour-gallery-lightbox__stage {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: min(88vw, 1400px);
	max-height: 90vh;
	pointer-events: none;
}

.tour-detail-gallery .tour-gallery-lightbox__image {
	display: block;
	width: auto;
	max-width: min(88vw, 1400px);
	max-height: 82vh;
	height: auto;
	object-fit: contain;
	object-position: center;
	border-radius: 8px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.tour-detail-gallery .tour-gallery-lightbox__counter {
	margin: 14px 0 0;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	text-align: center;
}

.tour-detail-gallery .tour-gallery-lightbox__caption {
	margin: 6px 0 0;
	max-width: min(88vw, 900px);
	color: rgba(255, 255, 255, 0.82);
	font-size: 14px;
	line-height: 1.5;
	text-align: center;
}

.tour-detail-gallery .tour-gallery-lightbox__caption[hidden] {
	display: none;
}

@media (max-width: 991px) {
	.tour-detail-gallery .tour-album__main {
		height: min(48vw, 360px);
		min-height: 200px;
	}

	.tour-detail-gallery .tour-album__thumb {
		flex-basis: clamp(88px, 20vw, 120px);
		width: clamp(88px, 20vw, 120px);
	}
}

@media (max-width: 575px) {
	.tour-detail-gallery {
		padding-top: 8px;
		padding-bottom: 0;
	}

	.tour-detail-gallery .tour-album__main {
		height: min(42vw, 200px);
		min-height: 148px;
		border-radius: 10px;
	}

	.tour-detail-gallery .tour-album__slider {
		gap: 4px;
		margin-top: 8px;
	}

	.tour-detail-gallery .tour-album__nav {
		width: 28px;
		height: 28px;
		font-size: 1rem;
	}

	.tour-detail-gallery .tour-album__thumbs {
		gap: 6px;
	}

	.tour-detail-gallery .tour-album__thumb {
		flex-basis: 64px;
		width: 64px;
		border-radius: 8px;
	}

	.tour-detail-gallery .tour-gallery-lightbox {
		padding: 12px;
	}

	.tour-detail-gallery .tour-gallery-lightbox__nav {
		width: 44px;
		height: 44px;
		font-size: 1.6rem;
	}

	.tour-detail-gallery .tour-gallery-lightbox__close {
		top: 12px;
		right: 12px;
	}
}
