/**
 * 产品画廊（Product Gallery）
 * 对应 meizhuan/course-detail.html 主图 + 缩略图区块
 */

.gt-pgal {
	width: 100%;
	box-sizing: border-box;
}

.gt-pgal-wrap {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

/* ---------- 主图 ---------- */
.gt-pgal-main {
	position: relative;
	aspect-ratio: 4 / 5;
	background: #f3f4f6;
	overflow: hidden;
	display: block;
}

.gt-pgal-main > img {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover;
	display: block;
	transition: opacity 0.4s ease, transform 0.5s ease;
}

.gt-pgal-main.is-switching > img {
	opacity: 0;
}

/* 左上徽章 */
.gt-pgal-badge {
	position: absolute;
	top: 1rem;
	left: 1rem;
	z-index: 10;
	background: #000;
	color: #fff;
	font-size: 10px;
	line-height: 1;
	padding: 0.35rem 0.75rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	white-space: nowrap;
}

/* 左下图片说明 */
.gt-pgal-caption {
	position: absolute;
	bottom: 1rem;
	left: 1rem;
	z-index: 10;
	background: rgba(0, 0, 0, 0.6);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	color: #fff;
	font-size: 0.75rem;
	line-height: 1.4;
	padding: 0.35rem 0.75rem;
	letter-spacing: 0.15em;
	max-width: calc(100% - 2rem);
	word-break: break-word;
}

/* ---------- 主图左右导航箭头 ---------- */
.gt-pgal-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 15;
	width: 2.75rem;
	height: 2.75rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.9);
	color: #111827;
	border: 0;
	padding: 0;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.gt-pgal-nav:hover,
.gt-pgal-nav:focus,
.gt-pgal-nav:focus-visible,
.gt-pgal-nav:active {
	background: #000 !important;
	color: #fff !important;
	border: 0 !important;
	outline: none !important;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
}

.gt-pgal-nav,
.gt-pgal-nav:visited {
	color: #111827 !important;
	background: rgba(255, 255, 255, 0.9) !important;
}

.gt-pgal-nav svg {
	stroke: currentColor;
}

.gt-pgal-nav--prev { left: 0.75rem; }
.gt-pgal-nav--next { right: 0.75rem; }

.gt-pgal-nav svg {
	display: block;
}

/* ---------- 缩略图 ---------- */
.gt-pgal-thumbs {
	display: grid;
	gap: 1rem;
}

.gt-pgal-thumbs.cols-3 { grid-template-columns: repeat(3, 1fr); }
.gt-pgal-thumbs.cols-4 { grid-template-columns: repeat(4, 1fr); }
.gt-pgal-thumbs.cols-5 { grid-template-columns: repeat(5, 1fr); }
.gt-pgal-thumbs.cols-6 { grid-template-columns: repeat(6, 1fr); }

.gt-pgal-thumb {
	position: relative;
	aspect-ratio: 1 / 1;
	background: #f3f4f6;
	overflow: hidden;
	cursor: pointer;
	border: 2px solid transparent;
	opacity: 0.6;
	transition: opacity 0.25s ease, border-color 0.25s ease;
	padding: 0;
	margin: 0;
}

.gt-pgal-thumb:hover {
	opacity: 1;
}

.gt-pgal-thumb.is-active {
	opacity: 1 !important;
	border-color: #000;
}

.gt-pgal-thumb > img {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover;
	display: block;
	transition: transform 0.5s ease;
}

.gt-pgal-thumb:hover > img {
	transform: scale(1.1);
}

/* ---------- 空状态 ---------- */
.gt-pgal-empty {
	padding: 3rem 1rem;
	text-align: center;
	color: #9ca3af;
	background: #f9fafb;
	font-size: 0.875rem;
	letter-spacing: 0.1em;
}
