/* ---------- Gallery list (all galleries) ---------- */
.pgm-wrap {
	max-width: 1200px;
	margin: 0 auto;
}

.pgm-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 20px;
}

.pgm-filters select {
	padding: 6px 10px;
}

.pgm-gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 20px;
}

.pgm-gallery-card {
	display: block;
	text-decoration: none;
	color: inherit;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
	background: #fff;
}

.pgm-gallery-card:hover {
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
	transform: translateY(-2px);
}

.pgm-gallery-card-thumb img {
	width: 100%;
	height: 180px;
	object-fit: cover;
	display: block;
}

.pgm-no-thumb {
	width: 100%;
	height: 180px;
	background: #f0f0f0;
}

.pgm-gallery-card-body {
	padding: 12px 14px;
}

.pgm-gallery-card-body h3 {
	margin: 0 0 6px;
	font-size: 16px;
}

.pgm-gallery-meta {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	font-size: 13px;
	color: #555;
	margin: 0 0 4px;
}

.pgm-gallery-count {
	font-size: 12px;
	color: #888;
	margin: 0;
}

.pgm-pagination {
	margin-top: 24px;
	display: flex;
	gap: 6px;
	justify-content: center;
}

/* ---------- Authors grid ---------- */
.pgm-authors-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

@media (max-width: 900px) {
	.pgm-authors-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 16px;
	}
}

@media (max-width: 600px) {
	.pgm-authors-grid {
		grid-template-columns: repeat(1, 1fr);
		gap: 16px;
	}
}

.pgm-author-card {
	display: block;
	text-decoration: none;
	color: inherit;
	border: 1px solid #e2e2e2;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.pgm-author-card:hover {
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
	transform: translateY(-3px);
}

.pgm-author-card-thumb {
	overflow: hidden;
}

.pgm-author-card-thumb img {
	width: 100%;
	height: 240px;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.pgm-author-card:hover .pgm-author-card-thumb img {
	transform: scale(1.05);
}

.pgm-author-card-body {
	padding: 14px 16px;
	text-align: center;
}

.pgm-author-card-body h3 {
	margin: 0 0 4px;
	font-size: 18px;
}

.pgm-back-to-authors {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-bottom: 16px;
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	color: #2271b1;
}

.pgm-back-to-authors:hover {
	text-decoration: underline;
}

/* ---------- Year tabs (single author page) ---------- */
.pgm-author-tabs {
	display: flex;
	flex-wrap: nowrap;
	gap: 8px;
	margin-bottom: 16px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	padding-bottom: 4px;
}

.pgm-year-tab {
	flex: 0 0 auto;
	padding: 9px 20px;
	border: 1px solid #c3c4c7;
	border-radius: 999px;
	background: #fff;
	color: #333;
	font-size: 14px;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.pgm-year-tab:hover {
	border-color: #2271b1;
	color: #2271b1;
}

.pgm-year-tab.active {
	background: #2271b1;
	border-color: #2271b1;
	color: #fff;
	font-weight: 600;
}

.pgm-loading-placeholder {
	list-style: none;
	padding: 40px;
	text-align: center;
	color: #888;
	grid-column: 1 / -1;
}

/* ---------- Single gallery ---------- */
.pgm-single-gallery {
	max-width: 1200px;
	margin: 20px auto 0;
}

.pgm-gallery-info {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	font-size: 14px;
	margin-bottom: 14px;
	color: #444;
}

.pgm-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
	padding: 10px 14px;
	background: #f6f7f7;
	border: 1px solid #e2e2e2;
	border-radius: 6px;
	margin-bottom: 12px;
	position: sticky;
	top: 0;
	z-index: 5;
}

.pgm-selected-count {
	font-weight: 600;
}

.pgm-btn {
	padding: 8px 14px;
	border-radius: 4px;
	border: 1px solid transparent;
	cursor: pointer;
	font-size: 14px;
}

.pgm-btn-primary {
	background: #2271b1;
	color: #fff;
}

.pgm-btn-primary:disabled {
	background: #a7c5df;
	cursor: not-allowed;
}

.pgm-btn-secondary {
	background: #fff;
	border-color: #c3c4c7;
	color: #333;
}

.pgm-btn-secondary:disabled {
	color: #999;
	cursor: not-allowed;
}

.pgm-email-form {
	display: flex;
	gap: 8px;
	align-items: center;
	margin-bottom: 12px;
}

.pgm-email-form input[type="email"] {
	padding: 7px 10px;
	min-width: 240px;
}

.pgm-status-message {
	font-size: 13px;
	color: #2271b1;
	margin-bottom: 10px;
	min-height: 18px;
}

.pgm-photo-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 10px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.pgm-photo-item {
	position: relative;
	border-radius: 6px;
	overflow: hidden;
	background: #f0f0f0;
}

.pgm-photo-item img {
	width: 100%;
	height: 160px;
	object-fit: cover;
	display: block;
}

.pgm-photo-select {
	position: absolute;
	top: 6px;
	left: 6px;
	z-index: 2;
	background: rgba(255, 255, 255, 0.85);
	border-radius: 4px;
	padding: 2px;
}

.pgm-single-download {
	position: absolute;
	bottom: 6px;
	right: 6px;
	z-index: 2;
	background: rgba(0, 0, 0, 0.65);
	color: #fff;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	font-size: 14px;
}

.pgm-single-download:hover {
	background: #2271b1;
}

.pgm-load-more-wrap {
	text-align: center;
	margin: 24px 0;
}

/* ---------- Lightbox slider ---------- */
.pgm-lightbox {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.92);
	z-index: 9999;
	align-items: center;
	justify-content: center;
	cursor: zoom-out;
}

.pgm-lightbox.pgm-lightbox-active {
	display: flex;
}

.pgm-lightbox img {
	max-width: 86%;
	max-height: 86%;
	box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
	cursor: default;
}

.pgm-lightbox-close {
	position: absolute;
	top: 20px;
	right: 30px;
	color: #fff;
	font-size: 34px;
	cursor: pointer;
	line-height: 1;
	z-index: 2;
}

.pgm-lightbox-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	border: none;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	font-size: 20px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease;
	z-index: 2;
}

.pgm-lightbox-nav:hover {
	background: rgba(255, 255, 255, 0.3);
}

.pgm-lightbox-prev {
	left: 20px;
}

.pgm-lightbox-next {
	right: 20px;
}

.pgm-lightbox-download {
	position: absolute;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%);
	background: #2271b1;
	color: #fff;
	padding: 10px 20px;
	border-radius: 6px;
	text-decoration: none;
	font-size: 14px;
	z-index: 2;
}

.pgm-lightbox-download:hover {
	background: #1a5a8c;
	color: #fff;
}

.pgm-lightbox-counter {
	position: absolute;
	top: 24px;
	left: 30px;
	color: #fff;
	font-size: 14px;
	opacity: 0.85;
	z-index: 2;
}

@media (max-width: 600px) {
	.pgm-lightbox-nav {
		width: 38px;
		height: 38px;
		font-size: 16px;
	}
	.pgm-lightbox-prev {
		left: 8px;
	}
	.pgm-lightbox-next {
		right: 8px;
	}
	.pgm-lightbox-download {
		bottom: 14px;
		padding: 8px 16px;
	}
}

@media (max-width: 600px) {
	.pgm-toolbar {
		flex-direction: column;
		align-items: flex-start;
	}
	.pgm-email-form {
		flex-wrap: wrap;
	}
	.pgm-email-form input[type="email"] {
		min-width: 0;
		flex: 1 1 100%;
	}
	.pgm-photo-grid {
		grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
		gap: 8px;
	}
	.pgm-photo-item img {
		height: 120px;
	}
	.pgm-authors-grid {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
		gap: 12px;
	}
	.pgm-author-card-thumb img {
		height: 140px;
	}
	.pgm-author-tabs {
		flex-wrap: nowrap;
		padding-bottom: 4px;
	}
	.pgm-year-tab {
		padding: 7px 14px;
		font-size: 13px;
	}
}
