.jdpg-wrap {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 24px 60px;
	box-sizing: border-box;
	font-size: 14px;
	color: #111;
}

.jdpg-tabs {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 32px;
	margin: 0 0 40px;
	padding: 0 0 14px;
	border-bottom: 1px solid #e5e5e5;
}

.jdpg-tabs a {
	position: relative;
	display: inline-block;
	padding: 6px 0;
	color: #555;
	font-size: 15px;
	font-weight: 500;
	text-decoration: none;
	transition: color .16s ease;
}

.jdpg-tabs a:hover,
.jdpg-tabs a:focus {
	color: #111;
}

.jdpg-tabs a.is-active {
	color: #e44;
}

.jdpg-tabs a.is-active::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: -15px;
	height: 2px;
	background: #e44;
}

.jdpg-grid {
	display: grid;
	grid-template-columns: repeat(var(--jdpg-cols, 4), minmax(0, 1fr));
	gap: 14px;
}

.jdpg-item {
	margin: 0;
	padding: 0;
	text-align: center;
}

.jdpg-thumb {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	margin: 0;
	border: 0;
	border-radius: 0;
	padding: 0;
	background: #f0f0f0;
	overflow: hidden;
	cursor: zoom-in;
	box-shadow: none;
}

.jdpg-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .22s ease, opacity .22s ease;
}

.jdpg-thumb:hover img,
.jdpg-thumb:focus img {
	transform: scale(1.05);
	opacity: .92;
}

.jdpg-no-image {
	display: block;
	width: 100%;
	height: 100%;
	background: #e5e5e5;
}

.jdpg-item figcaption {
	margin: 10px 0 0;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.4;
	color: #333;
}

.jdpg-empty {
	grid-column: 1 / -1;
	text-align: center;
	color: #777;
}

.jdpg-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 52px 0 0;
}

.jdpg-pagination a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	box-sizing: border-box;
	border: 1px solid #ddd;
	padding: 0 10px;
	color: #333;
	background: #fff;
	font-size: 14px;
	line-height: 1;
	text-decoration: none;
	border-radius: 4px;
	transition: background .14s ease, color .14s ease;
}

.jdpg-pagination a.is-current,
.jdpg-pagination a:hover,
.jdpg-pagination a:focus {
	background: #111;
	color: #fff;
	border-color: #111;
}

.jdpg-lightbox[hidden] {
	display: none;
}

.jdpg-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	box-sizing: border-box;
}

.jdpg-lightbox-bg {
	position: absolute;
	inset: 0;
	border: 0;
	background: rgba(0, 0, 0, .78);
	cursor: zoom-out;
}

.jdpg-lightbox-body {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: min(92vw, 1000px);
	max-height: 90vh;
	padding: 28px 28px 18px;
	background: #fff;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
	border-radius: 6px;
}

.jdpg-lightbox-body img {
	display: block;
	width: auto;
	max-width: 100%;
	max-height: calc(90vh - 100px);
	object-fit: contain;
	border-radius: 4px;
}

.jdpg-lightbox-body p {
	margin: 12px 0 0;
	font-size: 14px;
	color: #333;
	text-align: center;
}

.jdpg-lightbox-x {
	position: absolute;
	top: 8px;
	right: 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: 0;
	padding: 0;
	background: transparent;
	color: #333;
	font-size: 26px;
	font-weight: 300;
	line-height: 1;
	cursor: pointer;
}

html.jdpg-lightbox-open {
	overflow: hidden;
}

@media (max-width: 900px) {
	.jdpg-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 10px;
	}

	.jdpg-tabs {
		gap: 20px;
		margin-bottom: 30px;
	}
}

@media (max-width: 600px) {
	.jdpg-wrap {
		padding: 28px 14px 44px;
	}

	.jdpg-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
	}

	.jdpg-tabs {
		gap: 16px;
	}

	.jdpg-tabs a {
		font-size: 13px;
	}

	.jdpg-lightbox {
		padding: 14px;
	}

	.jdpg-lightbox-body {
		padding: 36px 14px 14px;
		max-width: 96vw;
	}
}
