/* --- Best Sellers Section (新设计) --- */

/* 分类标签容器 */
.category-tabs-wrapper {
	display: flex;
	justify-content: center;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	padding-bottom: 10px;
	margin-bottom: 20px;
}

.category-tabs-wrapper::-webkit-scrollbar {
	display: none;
}

/* 分类标签 */
.category-tab {
	position: relative;
	color: #888;
	font-weight: 600;
	padding: 0 15px 8px;
	cursor: pointer;
	white-space: nowrap;
	flex-shrink: 0;
	transition: color 0.3s;
	border: none;
	background: none;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.category-tab::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 50%;
	width: 0;
	height: 2px;
	background-color: var(--brand-berry);
	transition: all 0.3s ease;
	transform: translateX(-50%);
}

.category-tab.active {
	color: var(--brand-black);
}

.category-tab.active::after {
	width: 60%;
}

/* 产品卡片容器 */
.product-card-container {
	cursor: pointer;
	transition: transform 0.3s ease;
}

/* 彩色背景容器 */
.product-img-wrapper {
	position: relative;
	aspect-ratio: 1 / 1.1;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	transition: all 0.4s ease;
	padding: 20px;
}

/* 浅色背景 */
.bg-pastel-blue {
	background-color: #DFF1F6;
}

.bg-pastel-pink {
	background-color: #F8E8EB;
}

.bg-pastel-green {
	background-color: #E2F1E9;
}

.bg-pastel-gray {
	background-color: #E6E8EA;
}

/* 产品主图 */
.product-main-image {
	width: 100%;
	height: auto;
	object-fit: cover;
	border-radius: 4px;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
	transform: scale(0.92);
	transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease;
	background: white;
}

/* 悬停效果 */
.product-card-container:hover .product-main-image {
	transform: scale(1.05);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

/* 销售标签 */
.sale-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	background-color: #c0392b;
	color: white;
	font-size: 10px;
	font-weight: 700;
	padding: 4px 8px;
	border-radius: 3px;
	z-index: 20;
	letter-spacing: 0.5px;
}

/* 左下角缩略图 */
.inset-preview {
	position: absolute;
	bottom: 15px;
	left: 15px;
	width: 40px;
	height: 40px;
	background: white;
	padding: 2px;
	border-radius: 2px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
	transform: rotate(-5deg);
	z-index: 10;
	opacity: 0.9;
	transition: opacity 0.3s;
}

.product-card-container:hover .inset-preview {
	opacity: 0;
}

/* 产品信息 */
.product-info {
	padding-top: 16px;
	text-align: center;
}

.stars {
	color: var(--brand-gold);
	font-size: 12px;
}

/* 筛选动画 */
.product-item {
	transition: opacity 0.4s ease, transform 0.4s ease;
}

.product-item.hidden-item {
	display: none;
	opacity: 0;
}

.product-item.fade-in {
	animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Best Sellers 区域 */
#best-sellers {
	padding-top: 16px;
	padding-bottom: 32px;
}

#best-sellers h2 {
	font-size: 32px;
	font-weight: 700;
	margin-bottom: 8px;
	color: var(--brand-black);
}

#best-sellers > .text-center > p {
	color: #888;
	font-size: 14px;
	margin-bottom: 24px;
}

/* 产品网格 */
#product-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 32px;
	margin-bottom: 40px;
}

/* Show More 按钮 */
.show-more-btn {
	display: inline-block;
	padding: 16px 48px;
	background-color: #2c3e50;
	color: white;
	font-weight: 700;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	border-radius: 50px;
	border: none;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	text-decoration: none;
}

.show-more-btn:hover {
	background-color: #1a252f;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
	transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 1024px) {
	#product-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 24px;
	}

	#best-sellers h2 {
		font-size: 28px;
	}
}

@media (max-width: 768px) {
	#product-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 16px;
	}

	#best-sellers h2 {
		font-size: 24px;
	}

	.category-tab {
		font-size: 12px;
		padding: 0 12px 6px;
	}

	.product-img-wrapper {
		padding: 16px;
	}

	.show-more-btn {
		padding: 14px 40px;
		font-size: 12px;
	}
}

@media (max-width: 640px) {
	#product-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}

	#best-sellers {
		padding-top: 12px;
		padding-bottom: 24px;
	}

	#best-sellers h2 {
		font-size: 20px;
		margin-bottom: 4px;
	}

	#best-sellers > .text-center > p {
		font-size: 12px;
		margin-bottom: 16px;
	}

	.category-tab {
		font-size: 11px;
		padding: 0 10px 4px;
	}

	.product-img-wrapper {
		padding: 12px;
	}

	.show-more-btn {
		padding: 12px 32px;
		font-size: 11px;
	}
}
