.sg-category-tabs { width: 100%; }
.sg-category-tabs * { box-sizing: border-box; }

/* =========================
   Tabs 顶部导航
========================= */
.sg-tabs-nav {
	display: flex; justify-content: center; align-items: center;
	flex-wrap: wrap; gap: 20px; width: 100%; max-width: 100%;
	min-height: 80px; margin: 0 auto 30px; padding: 14px; border-radius: 40px;
}
.sg-tab-button {
	margin: 0; padding: 12px 24px; color: #333; line-height: 1.4;
	font-size: 16px; white-space: nowrap; text-transform: capitalize;
	background: #f5f5f5; border: none; border-radius: 40px;
	cursor: pointer; transition: all 0.3s ease;
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.sg-tab-button:hover, .sg-tab-button.active { background: var(--theme-palette-color-1); color: #fff; }
.sg-tab-icon { width: 30px; height: 30px; display: block; object-fit: contain; transition: all 0.3s ease; }
.sg-tab-button.active img.sg-tab-icon, .sg-tab-button:hover img.sg-tab-icon { filter: brightness(0) invert(1); }

/* =========================
   内容区与滑块
========================= */
.sg-tabs-content { width: 100%; min-height: auto; padding-bottom: 20px; }
.sg-tab-pane { display: none; }
.sg-tab-pane.active { display: block; }

.sg-products-slider { width: 100%; position: relative; }
.sg-products-viewport {
	overflow: hidden; width: calc(100% + 10px);
	margin: 0 -5px; padding: 10px 5px;
}
.sg-products-track {
	display: flex; flex-wrap: nowrap; gap: 0;
	transition: transform 0.45s ease; will-change: transform;
}

/* 核心：JS 动态生成的网格页面 */
.sg-slide-page {
	flex: 0 0 100%; width: 100%;
	display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}

/* =========================
   产品卡片
========================= */
.sg-product-card {
	width: 100%; display: flex; flex-direction: column;
	border-radius: 15px; background-color: #ffffff;
	box-shadow: 0 0 5px rgba(0, 0, 0, 0.1); margin: 0;
}
.sg-product-link {
	display: flex; flex-direction: column; flex: 1; height: 100%;
	text-decoration: none; color: inherit;
}
.sg-product-image-wrap {
	position: relative; width: 100%; aspect-ratio: 1 / 1;
	overflow: hidden; background: #f5f5f5;
	border-top-right-radius: 15px; border-top-left-radius: 15px;
}
.sg-product-image-wrap img {
	position: absolute; inset: 0; width: 100%; height: 100%;
	object-fit: cover; display: block; transition: all .3s;
}
.sg-product-card:hover .sg-product-image-wrap img { transform: scale(1.05); }
.sg-product-content { padding: 25px 0 0; }
.sg-product-title {
	margin: 0; font-size: 20px; line-height: 1.5; color: #353535;
	font-weight: 500; text-transform: capitalize; text-align: center;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
	overflow: hidden; height: 3em; transition: all .3s;
}
.sg-product-card:hover .sg-product-title { color: var(--theme-palette-color-1); }

/* =========================
   箭头与分页
========================= */
.sg-slider-nav-btn {
	position: absolute; top: calc(50% - 20px); transform: translateY(-50%);
	width: 44px; height: 44px; background: #ffffff; border: 1px solid #eaeaea;
	border-radius: 50%; display: flex; align-items: center; justify-content: center;
	cursor: pointer; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08); z-index: 10;
	transition: all 0.3s ease; color: #666;
}
.sg-slider-nav-btn:hover {
	background: var(--theme-palette-color-1); color: #ffffff;
	border-color: var(--theme-palette-color-1); transform: translateY(-50%) scale(1.05);
}
.sg-slider-nav-btn svg { width: 20px; height: 20px; }
.sg-slider-prev { left: -22px; }
.sg-slider-next { right: -22px; }

.sg-products-pagination {
	display: flex; justify-content: center; align-items: center;
	gap: 8px; margin-top: 24px; min-height: 12px;
}
.sg-products-pagination:empty { display: none; }
.sg-products-dot {
	width: 10px; height: 10px; border: 0; padding: 0; margin: 0;
	border-radius: 50%; background: rgba(0, 140, 214, 0.25);
	cursor: pointer; transition: all 0.3s ease;
}
.sg-products-dot.is-active {
	width: 30px; height: 8px; border-radius: 4px;
	background: var(--theme-palette-color-1); transform: scale(1.15);
}
.sg-products-empty { width: 100%; padding: 20px; text-align: center; background: #fff; border-radius: 16px; color: #666; min-height: 120px; }

/* =========================
   响应式媒体查询
========================= */
@media screen and (max-width: 1599px) { .sg-tabs-content { width: 80%; margin: 0 auto; } }
@media screen and (max-width: 1380px) { .sg-tabs-nav { width: 63%; } .sg-tabs-content { width: 80%; margin: 0 auto; } }
@media screen and (max-width: 1299px) { .sg-tabs-nav { width: 65%; } .sg-tabs-content { width: 80%; margin: 0 auto; } }
@media screen and (max-width: 1160px) { .sg-tabs-nav { width: 75%; } }

@media screen and (max-width: 1199px) {
	.sg-slide-page { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}
@media screen and (max-width: 991px) {
	.sg-tabs-nav { gap: 10px; padding: 12px; margin-bottom: 24px; min-height: 68px; border-radius: 18px; }
	.sg-tab-button { padding: 11px 20px; font-size: 15px; border-radius: 14px; }
	.sg-slide-page { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}
@media screen and (max-width: 767px) {
	.sg-tabs-nav { display: grid; grid-template-columns: repeat(2, 1fr); width: 100%; padding: 12px; gap: 8px; margin-bottom: 24px; border-radius: 16px; }
	.sg-tab-button { width: 100%; padding: 10px 12px; font-size: 14px; border-radius: 12px; white-space: normal; min-height: 44px; }
	.sg-slide-page { grid-template-columns: repeat(1, 1fr); gap: 16px; }
	.sg-slider-prev { left: 5px; } .sg-slider-next { right: 5px; }
}
@media screen and (max-width: 480px) {
	.sg-tabs-nav { padding: 10px; gap: 8px; margin-bottom: 20px; }
	.sg-tab-button { padding: 12px 10px; font-size: 14px; }
	.sg-product-content { padding: 12px 0 0; min-height: 60px; }
}
