/*
	冻结样式：device_single 的 Hero 区块。
	来源：echomachinery.com device 详情页内联 <style>（2026-08-17 归档）。
	
	Device 页有自己独立的一份样式，不加载 machine-hero.css。
	data-astro-cid-* 属性是对标站 Astro 的作用域选择器，保留不删。
*/

.detail-hero {
	padding-bottom: 48px;
}

.hero-layout {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--space-7);
	align-items: start;
}

/* 画廊容器 */
.hero-gallery[data-astro-cid-bkr7dduh] {
	position: sticky;
	top: 120px;
}

.gallery-main[data-astro-cid-bkr7dduh] {
	border-radius: var(--radius);
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background: #fff;
}

.gallery-main[data-astro-cid-bkr7dduh] img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

/* 画廊缩略图条 */
.gallery-thumbs[data-astro-cid-bkr7dduh] {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
	max-height: 138px;
	overflow-y: auto;
	overflow-x: hidden;
	scrollbar-width: thin;
	scrollbar-color: var(--gray-border) transparent;
	padding-right: 4px;
	width: 100%;
}

.gallery-thumbs[data-astro-cid-bkr7dduh]::-webkit-scrollbar {
	width: 4px;
}

.gallery-thumbs[data-astro-cid-bkr7dduh]::-webkit-scrollbar-thumb {
	background: var(--gray-border);
	border-radius: 4px;
}

.gallery-thumbs[data-astro-cid-bkr7dduh] img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 4px;
	cursor: pointer;
	border: 2px solid transparent;
	opacity: 0.5;
	transition: all var(--transition);
	flex-shrink: 0;
}

.gallery-thumbs[data-astro-cid-bkr7dduh] img:hover,
.gallery-thumbs[data-astro-cid-bkr7dduh] img.active {
	opacity: 1;
	border-color: var(--red);
}

/* 右侧信息栏 */
.hero-info {
	display: flex;
	flex-direction: column;
}

.detail-hero .card-tag {
	font-size: 12px;
	letter-spacing: 1.5px;
	margin-bottom: 12px;
}

.detail-hero h1 {
	font-size: clamp(28px, 5vw, 48px);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.02em;
	margin: var(--space-2) 0;
}

.hero-subtitle {
	font-size: 16px;
	color: var(--text-secondary);
	margin-top: 12px;
	margin-bottom: 16px;
	line-height: 1.6;
}

/* 页内导航 */
.page-nav {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
	margin-bottom: var(--space-5);
	padding-bottom: var(--space-5);
	border-bottom: 1px solid var(--border-light);
}

.page-nav a {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 6px 14px;
	background: var(--surface-alt);
	border-radius: var(--radius-sm);
	transition: all var(--dur);
	color: var(--text);
}

.page-nav a:hover {
	background: var(--brand);
	color: #fff;
}

/* 简介文字 */
.detail-hero .hero-info > .prose {
	margin-top: 0;
}

/* 结构图样式 */
.ms-main-img {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 0 auto var(--space-4);
	border-radius: var(--radius);
}

.ms-desc {
	font-size: 14px;
	color: var(--text-secondary);
	text-align: center;
	line-height: 1.7;
}

/* 视频区块（从 machine-hero.css 复制，device 页面也需要） */
.detail-video {
	aspect-ratio: 16 / 9;
	border-radius: var(--radius-lg);
	overflow: hidden;
	max-width: 900px;
	margin: 0 auto;
}
.detail-video iframe {
	width: 100%;
	height: 100%;
	border: 0;
}
.video-poster {
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
	background-color: #1a1a1a;
}

/* 响应式 */
@media (max-width: 768px) {
	.hero-layout {
		grid-template-columns: 1fr;
		gap: var(--space-6);
	}
	.hero-gallery[data-astro-cid-bkr7dduh] {
		position: static;
	}
}
