/* ====== 页面标题 ====== */
.page-header {
	background: linear-gradient(135deg, #2c3e50, #34495e);
	color: #fff;
	padding: 60px 0;
	text-align: center
}

.page-header h1 {
	font-size: 42px;
	margin-bottom: 15px
}

.page-header p {
	font-size: 18px;
	opacity: .9
}

/* ====== 材料库布局 ====== */
.materials-layout {
	display: grid;
	grid-template-columns: 260px 1fr;
	gap: 30px;
	padding: 40px 0
}

/* ====== 左侧分类导航 ====== */
.category-nav {
	background: #fff;
	border-radius: 10px;
	padding: 20px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
	position: sticky;
	top: 100px;
	height: fit-content
}

.nav-title {
	font-size: 18px;
	color: #2c3e50;
	margin-bottom: 20px;
	padding-bottom: 15px;
	border-bottom: 2px solid #e74c3c;
	font-weight: bold
}

.category-list {
	list-style: none
}

.category-item {
	margin-bottom: 10px
}

.category-header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 15px;
	border-radius: 8px;
	cursor: pointer;
	transition: all .3s ease;
	font-weight: 500
}

.category-header:hover {
	background: #f8f9fa
}

.category-header.active {
	background: #e74c3c;
	color: #fff
}

.category-icon {
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px
}

.category-name {
	flex: 1
}

.category-arrow {
	transition: transform .3s ease
}

.category-header.active .category-arrow {
	transform: rotate(90deg)
}

.brand-list {
	display: none;
	list-style: none;
	padding-left: 35px;
	margin-top: 5px
}

.brand-list.show {
	display: block;
	animation: fadeIn .3s ease
}

.brand-item {
	padding: 8px 12px;
	border-radius: 6px;
	cursor: pointer;
	transition: all .3s ease;
	font-size: 14px;
	color: #666;
	display: flex;
	align-items: center;
	gap: 8px
}

.brand-item:hover {
	background: #f0f0f0;
	color: #e74c3c
}

.brand-item.active {
	background: #f8f9fa;
	color: #e74c3c;
	font-weight: 500
}

.brand-item::before {
	content: '';
	width: 4px;
	height: 4px;
	background: #999;
	border-radius: 50%
}

.brand-item.active::before {
	background: #e74c3c
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(-10px)
	}

	to {
		opacity: 1;
		transform: translateY(0)
	}
}

/* ====== 右侧内容区 ====== */
.content-area {
	background: #fff;
	border-radius: 10px;
	padding: 30px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
	min-height: 600px
}

/* 品牌头部 */
.brand-header {
	display: flex;
	align-items: center;
	gap: 30px;
	margin-bottom: 30px;
	padding-bottom: 25px;
	border-bottom: 1px solid #eee
}

.brand-logo {
	width: 120px;
	height: 80px;
	background: #f8f9fa;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	color: #999
}

.brand-info {
	flex: 1
}

.brand-name {
	font-size: 28px;
	color: #2c3e50;
	margin-bottom: 8px
}

.brand-desc {
	color: #666;
	font-size: 14px;
	line-height: 1.6
}

.brand-tags {
	display: flex;
	gap: 10px;
	margin-top: 12px
}

.brand-tag {
	padding: 5px 12px;
	background: #f8f9fa;
	border-radius: 15px;
	font-size: 12px;
	color: #666
}

/* 筛选栏 - 标签样式 */
.filter-bar {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 25px;
	padding: 15px;
	background-color: #f9f9f9;
	border-radius: 8px;
}

.filter-label {
	color: #333;
	font-size: 14px;
	font-weight: 500;
	margin-right: 10px;
}

.filter-tag {
	padding: 8px 18px;
	border-radius: 20px;
	background: #fff;
	border: 1px solid #ddd;
	cursor: pointer;
	font-size: 14px;
	transition: all 0.3s ease;
}

.filter-tag:hover {
	border-color: #e74c3c;
	color: #e74c3c;
}

.filter-tag.active {
	background: #e74c3c;
	color: #fff;
	border-color: #e74c3c;
}

/* 产品网格 */
.products-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 25px
}

.product-card {
	background: #fff;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
	transition: all .3s ease;
	border: 1px solid #f0f0f0
}

.product-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 25px rgba(0, 0, 0, .12);
	border-color: #e74c3c
}

/* ========== 关键：图片不变形 ========== */
.product-img {
	height: 200px;
	background: #f5f5f5;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	overflow: hidden
}

.product-img img {
	width: auto !important;
	height: auto !important;
	max-width: 100% !important;
	max-height: 100% !important;
	object-fit: contain !important;
	object-position: center !important;
	border: none !important;
	outline: none !important;
}

.product-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 5px 12px;
	background: #e74c3c;
	color: #fff;
	border-radius: 15px;
	font-size: 12px
}

.product-info {
	padding: 15px
}

.product-name {
	font-size: 16px;
	color: #2c3e50;
	margin-bottom: 8px;
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis
}

.product-model {
	font-size: 13px;
	color: #999;
	margin-bottom: 10px
}

.product-specs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 12px
}

.product-spec {
	padding: 4px 10px;
	background: #f8f9fa;
	border-radius: 4px;
	font-size: 12px;
	color: #666
}

.product-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-top: 12px;
	border-top: 1px solid #f0f0f0;
}

.product-price {
	font-size: 18px;
	color: #e74c3c;
	font-weight: bold
}

.product-price small {
	font-size: 12px;
	color: #999;
	font-weight: normal
}

.product-btn {
	padding: 6px 15px;
	background: #e74c3c;
	color: #fff;
	border-radius: 15px;
	font-size: 12px;
	transition: all .3s ease
}

.product-btn:hover {
	background: #c0392b
}

/* 空状态 */
.empty-state {
	text-align: center;
	padding: 80px 20px;
	color: #999
}

/* ====== 分页 ====== */
.pagination {
	display: flex;
	justify-content: center;
	gap: 10px;
	padding: 30px 0
}

.page-btn {
	padding: 10px 15px;
	border: 1px solid #ddd;
	background: #fff;
	color: #666;
	border-radius: 6px;
	cursor: pointer;
	transition: all .3s ease;
	text-decoration: none;
	font-size: 14px
}

.page-btn:hover,
.page-btn.active {
	background: #e74c3c;
	color: #fff;
	border-color: #e74c3c
}