/* Property Gallery Component */

.property-gallery-section {
	padding: 2rem 0;
	background-color: var(--k-0);
	position: relative;
}

/* Carousel */
.property-gallery-carousel {
	border-radius: 0.5rem;
	overflow: hidden;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	cursor: pointer;
	transition: box-shadow 0.3s ease;
}

.property-gallery-carousel:hover {
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* Photo Count Badge */
.gallery-photo-count {
	position: absolute;
	top: 3rem;
	right: 2rem;
	background-color: rgba(0, 0, 0, 0.7);
	color: var(--k-0);
	padding: 0.5rem 1rem;
	border-radius: 2rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--font-primary);
	font-size: 0.875rem;
	font-weight: 600;
	pointer-events: none;
	z-index: 10;
}

.gallery-photo-count svg {
	flex-shrink: 0;
}

/* Gallery Images */
.property-gallery-image {
	width: 100%;
	height: 400px;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}

.property-gallery-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
	color: var(--k-40);
}

.property-gallery-placeholder svg {
	opacity: 0.5;
}

.property-gallery-placeholder span {
	font-family: var(--font-primary);
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--k-50);
}

/* Carousel Controls */
.carousel-control-prev,
.carousel-control-next {
	width: 50px;
	opacity: 0.8;
	transition: opacity 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover,
.carousel-control-prev:focus,
.carousel-control-next:focus {
	opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
	width: 2.5rem;
	height: 2.5rem;
	background-color: rgba(0, 0, 0, 0.5);
	border-radius: 50%;
}

/* Responsive */
@media (max-width: 767px) {
	.property-gallery-section {
		padding: 1.5rem 0;
	}

	.property-gallery-image {
		height: 300px;
	}

	.property-gallery-placeholder svg {
		width: 60px;
		height: 60px;
	}

	.property-gallery-placeholder span {
		font-size: 1rem;
	}
}

@media (min-width: 768px) {
	.property-gallery-image {
		height: 500px;
	}
}

@media (min-width: 992px) {
	.property-gallery-image {
		height: 600px;
	}
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
	.carousel-control-prev,
	.carousel-control-next,
	.property-gallery-carousel {
		transition: none;
	}
}

/* ===== Lightbox Modal ===== */
.gallery-lightbox {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.95);
	z-index: 9999;
	overflow: hidden;
}

/* Lightbox Header */
.lightbox-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 60px;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 1rem;
	z-index: 10000;
}

.lightbox-close {
	background: none;
	border: none;
	color: var(--k-0);
	cursor: pointer;
	padding: 0.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color 0.2s ease;
}

.lightbox-close:hover,
.lightbox-close:focus {
	color: var(--era-red);
}

.lightbox-counter {
	font-family: var(--font-primary);
	font-size: 1rem;
	font-weight: 600;
	color: var(--k-0);
	background-color: rgba(0, 0, 0, 0.5);
	padding: 0.5rem 1rem;
	border-radius: 2rem;
}

/* Lightbox Content - Stacked Full Width Images */
.lightbox-content {
	height: 100vh;
	overflow-y: auto;
	padding: 60px 0 0;
	scroll-behavior: smooth;
	scroll-snap-type: y proximity;
}

/* Image Wrapper - Each image takes full viewport */
.lightbox-image-wrapper {
	width: 100%;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: #000;
	scroll-snap-align: start;
	padding: 0;
}

/* Full Width Image */
.lightbox-image-full {
	width: 100%;
	height: auto;
	max-width: 100%;
	display: block;
	object-fit: contain;
	max-height: 100vh;
}

/* Lazy Loading State */
.lightbox-image-full.lazy-load {
	background: linear-gradient(90deg, #1a1a1a 0%, #2a2a2a 50%, #1a1a1a 100%);
	background-size: 200% 100%;
	animation: loading 1.5s infinite;
	min-height: 60vh;
}

@keyframes loading {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

/* Responsive Lightbox */
@media (max-width: 767px) {
	.lightbox-header {
		height: 50px;
	}

	.lightbox-content {
		padding: 50px 0 0;
	}

	.lightbox-close svg {
		width: 24px;
		height: 24px;
	}

	.lightbox-counter {
		font-size: 0.875rem;
		padding: 0.375rem 0.75rem;
	}

	.lightbox-image-wrapper {
		padding: 0;
	}

	.lightbox-image-full {
		max-height: 100vh;
	}

	.gallery-photo-count {
		top: 2rem;
		right: 1rem;
		font-size: 0.75rem;
		padding: 0.375rem 0.75rem;
	}

	.gallery-photo-count svg {
		width: 14px;
		height: 14px;
	}
}

/* Lightbox Accessibility */
.lightbox-close:focus-visible {
	outline: 2px solid var(--era-red);
	outline-offset: 2px;
}

/* Reduced Motion for Lightbox */
@media (prefers-reduced-motion: reduce) {
	.lightbox-content {
		scroll-behavior: auto;
	}

	.lightbox-close {
		transition: none;
	}
}
