/**
 * 产品网格小部件 - 样式
 *
 * 图片 + 标题 + Badge 网格，每列等宽，图片悬停微放大。
 */

/* 网格容器 ----------------------------------------------------------- */
.hbc-pg__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	column-gap: 24px;
	row-gap: 48px;
	width: 100%;
	/* 上下 100px 外边距，与相邻小部件保持安全距离 */
	margin-top: 100px;
	margin-bottom: 100px;
	/* 创建独立堆叠上下文，避免与相邻小部件 z-index 冲突 */
	position: relative;
	z-index: 1;
	isolation: isolate;
}

/* 每个产品项 --------------------------------------------------------- */
.hbc-pg__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	position: relative;
	z-index: 1;
}

/* 图片链接包裹 ------------------------------------------------------- */
.hbc-pg__image-link {
	display: block;
	width: 100%;
	text-decoration: none;
}

/* 图片容器（固定宽高比，overflow hidden 实现 zoom 裁剪） ------------- */
.hbc-pg__image-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background-color: #ffffff;
}

/* 图片本体 ----------------------------------------------------------- */
.hbc-pg__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform 0.35s ease;
}

/* 悬停放大（默认开启，可在控件中关闭） */
.hbc-pg__item:hover .hbc-pg__image {
	transform: scale(1.06);
}

/* 标题 --------------------------------------------------------------- */
.hbc-pg__title {
	width: 100%;
	margin-top: 16px;
	margin-bottom: 0;
	padding: 0;
	font-size: 14px;
	font-weight: 600;
	color: #111111;
	text-align: center;
	line-height: 1.4;
}

/* Badge 容器（居中） ------------------------------------------------- */
.hbc-pg__badge-wrap {
	display: flex;
	justify-content: center;
	margin-top: 10px;
}

/* Badge 标签 --------------------------------------------------------- */
.hbc-pg__badge {
	display: inline-block;
	padding: 4px 10px;
	background-color: #e02020;
	color: #ffffff;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	border-radius: 2px;
	line-height: 1.4;
}

/* 响应式：平板 (≤1024px) -------------------------------------------- */
@media (max-width: 1024px) {
	.hbc-pg__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* 响应式：手机 (≤768px) --------------------------------------------- */
@media (max-width: 768px) {
	.hbc-pg__grid {
		grid-template-columns: repeat(2, 1fr);
		column-gap: 16px;
		row-gap: 32px;
	}

	.hbc-pg__title {
		font-size: 12px;
	}
}
