/* Lightbox/Gallery Styles */

.modal-gallery {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: rgba(0, 0, 0, 0.9);
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	animation: fadeIn var(--transition-normal);
}

.modal-gallery.active {
	display: flex;
}

.modal-gallery .modal-image {
	max-width: 90%;
	max-height: 90%;
	object-fit: contain;
	border-radius: var(--border-radius);
	animation: zoomIn var(--transition-normal);
}

.modal-gallery .modal-close {
	position: absolute;
	top: 20px;
	right: 20px;
	background: rgba(255, 255, 255, 0.1);
	border: none;
	color: white;
	font-size: 2.5rem;
	cursor: pointer;
	padding: 10px 20px;
	border-radius: 50%;
	transition: background var(--transition-fast);
}

.modal-gallery .modal-close:hover {
	background: rgba(255, 255, 255, 0.2);
}

.modal-gallery .modal-prev,
.modal-gallery .modal-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255, 255, 255, 0.1);
	border: none;
	color: white;
	font-size: 2rem;
	cursor: pointer;
	padding: 15px 20px;
	transition: background var(--transition-fast);
	z-index: 1001;
}

.modal-gallery .modal-prev:hover,
.modal-gallery .modal-next:hover {
	background: rgba(255, 255, 255, 0.2);
}

.modal-gallery .modal-prev {
	left: 20px;
}

.modal-gallery .modal-next {
	right: 20px;
}

/* Car Gallery */

.car-gallery-thumbnails {
	display: flex;
	gap: var(--spacing-sm);
	margin-top: var(--spacing-md);
	overflow-x: auto;
	padding-bottom: var(--spacing-sm);
}

.gallery-thumbnail {
	width: 80px;
	height: 80px;
	border: 2px solid transparent;
	border-radius: var(--border-radius);
	cursor: pointer;
	overflow: hidden;
	transition: all var(--transition-fast);
	flex-shrink: 0;
}

.gallery-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gallery-thumbnail:hover,
.gallery-thumbnail.active {
	border-color: var(--color-primary);
	transform: scale(1.05);
}

.gallery-more {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--color-light);
	position: relative;
}

.more-count {
	font-weight: 700;
	color: var(--color-dark);
}

/* Animations */

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes zoomIn {
	from {
		transform: scale(0.8);
		opacity: 0;
	}
	to {
		transform: scale(1);
		opacity: 1;
	}
}

/* Mobile */

@media (max-width: 768px) {
	.modal-gallery .modal-close {
		top: 10px;
		right: 10px;
		font-size: 1.8rem;
		padding: 8px 15px;
	}

	.modal-gallery .modal-prev,
	.modal-gallery .modal-next {
		font-size: 1.5rem;
		padding: 10px 15px;
	}

	.modal-gallery .modal-prev {
		left: 10px;
	}

	.modal-gallery .modal-next {
		right: 10px;
	}

	.gallery-thumbnail {
		width: 60px;
		height: 60px;
	}
}
