/* JJR Gallery Groups - Grid & Lightbox */
.jjr-gallery {
	--jjr-gg-gap: 16px;
	--jjr-gg-overlay: rgba(0, 0, 0, 0.9);
	--jjr-gg-accent: #f0c44a;
}

.jjr-gg-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: var(--jjr-gg-gap);
}

.jjr-gg-item {
	position: relative;
	cursor: pointer;
	border-radius: 6px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	transition: transform 0.2s, box-shadow 0.2s;
}

.jjr-gg-item:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.jjr-gg-item img {
	display: block;
	width: 100%;
	height: 180px;
	object-fit: cover;
	vertical-align: middle;
}

.jjr-gg-item-title {
	display: block;
	padding: 8px 10px;
	font-size: 0.9rem;
	line-height: 1.3;
	color: #333;
	background: #fff;
}

/* Lightbox */
.jjr-gg-lightbox {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: var(--jjr-gg-overlay);
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

.jjr-gg-lightbox.is-open {
	display: flex;
}

.jjr-gg-lightbox-content {
	position: relative;
	max-width: 90vw;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.jjr-gg-lightbox-content img {
	max-width: 100%;
	max-height: calc(90vh - 60px);
	width: auto;
	height: auto;
	object-fit: contain;
}

.jjr-gg-lightbox-title {
	color: #fff;
	font-size: 1rem;
	margin-top: 12px;
	text-align: center;
	max-width: 100%;
}

.jjr-gg-close,
.jjr-gg-prev,
.jjr-gg-next {
	position: absolute;
	background: rgba(255, 255, 255, 0.2);
	border: none;
	color: #fff;
	font-size: 1.5rem;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	cursor: pointer;
	transition: background 0.2s;
	z-index: 1;
}

.jjr-gg-close:hover,
.jjr-gg-prev:hover,
.jjr-gg-next:hover {
	background: rgba(255, 255, 255, 0.35);
}

.jjr-gg-close {
	top: 20px;
	right: 20px;
	font-size: 2rem;
	line-height: 1;
	padding: 0;
}

.jjr-gg-prev {
	left: 20px;
	top: 50%;
	transform: translateY(-50%);
}

.jjr-gg-next {
	right: 20px;
	top: 50%;
	transform: translateY(-50%);
}

/* Responsive */
@media (max-width: 600px) {
	.jjr-gg-grid {
		grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
		gap: 10px;
	}

	.jjr-gg-item img {
		height: 140px;
	}

	.jjr-gg-prev,
	.jjr-gg-next {
		width: 40px;
		height: 40px;
		font-size: 1.2rem;
		left: 8px;
		right: 8px;
	}

	.jjr-gg-close {
		top: 10px;
		right: 10px;
		width: 40px;
		height: 40px;
		font-size: 1.5rem;
	}
}
