﻿* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: -apple-system, "PingFang SC", "Helvetica Neue", sans-serif;
}

body {
	background: #f5f5f5;
	color: #333;
}

a {
	text-decoration: none;
	color: inherit;
}

/* ======= 顶部导航 ======= */
.header {
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(10px);
	position: sticky;
	top: 0;
	z-index: 1000;
	border-bottom: 1px solid #e5e5e5;
}

.header-inner {
	max-width: 1400px;
	margin: 0 auto;
	padding: 15px 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 40px;
}

.logo-wrap {
	display: flex;
	flex-direction: column;
	justify-content: center;
	white-space: nowrap;
}

.logo {
	font-size: 24px;
	font-weight: 900;
	color: #000;
	letter-spacing: 1.5px;
	line-height: 1.2;
}

.logo-slogan {
	font-size: 11px;
	color: #888;
	letter-spacing: 2.5px;
	text-transform: uppercase;
	font-family: monospace;
	margin-top: 2px;
}

/* 搜索与分类行 */
.search-row {
	display: flex;
	align-items: center;
	flex: 1;
	max-width: 600px;
	margin-left: auto;
	gap: 12px;
}

.search-box {
	display: flex;
	flex: 1;
	border: 2px solid #e5e5e5;
	border-radius: 30px;
	overflow: hidden;
	transition: border-color 0.3s;
	background: #fff;
}

.search-box:focus-within {
	border-color: #000;
}

.search-box input {
	flex: 1;
	padding: 10px 20px;
	border: none;
	outline: none;
	font-size: 14px;
	background: transparent;
}

.search-box button {
	padding: 0 30px;
	background: #000;
	color: #fff;
	border: none;
	cursor: pointer;
	font-size: 14px;
	font-weight: bold;
	transition: background 0.3s;
}

.search-box button:hover {
	background: #333;
}

/* ======= 电脑端悬浮分类 ======= */
.hover-category-wrap {
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 20px;
	position: relative;
}

.hover-category-btn {
	display: inline-block;
	background: #c82423;
	color: #fff;
	padding: 10px 24px;
	font-size: 15px;
	font-weight: bold;
	border-radius: 8px 8px 0 0;
	cursor: pointer;
}

.hover-category-panel {
	display: none;
	position: absolute;
	top: 100%;
	left: 20px;
	background: #fff;
	width: 900px;
	max-width: 90vw;
	border-radius: 0 8px 8px 8px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
	padding: 20px;
	z-index: 999;
	border: 1px solid #eee;
}

.hover-category-wrap:hover .hover-category-panel {
	display: block;
}

.hover-category-panel .category-list {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
	list-style: none;
}

.hover-category-panel .category-list li {
	padding: 10px;
	font-size: 14px;
	color: #555;
	cursor: pointer;
	border-radius: 6px;
	transition: all 0.2s;
}

.hover-category-panel .category-list li:hover {
	background: #f7f7f7;
	color: #c82423;
}

.hover-category-panel .category-list li.active {
	background: #fff0f0;
	color: #c82423;
	font-weight: bold;
}

/* ======= 手机端分类 ======= */
.mobile-category-btn {
	display: none;
}

.mobile-cat-drawer {
	display: none;
}

/* ======= 主体布局 ======= */
.main-container {
	max-width: 1400px;
	margin: 24px auto;
	padding: 0 20px;
}

.content {
	width: 100%;
}

/* ======= 轮播图 ======= */
.banner-wrap {
	width: 100%;
	background: #f4f4f4;
	border-radius: 12px;
	overflow: hidden;
	margin-bottom: 24px;
	position: relative;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.banner-slider {
	display: flex;
	height: 100%;
	width: 100%;
	transition: transform 0.4s ease;
}

.banner-slider img {
	width: 100%;
	height: 100%;
	flex-shrink: 0;
	object-fit: cover;
}

.banner-slider a {
	display: flex;
	width: 100%;
	height: 100%;
	flex-shrink: 0;
	justify-content: center;
}

/* ======= 商品列表头 ======= */
.goods-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	padding: 0 4px;
}

.goods-header h2 {
	font-size: 22px;
	font-weight: 800;
	color: #000;
	letter-spacing: 1px;
}

.sort-box select {
	padding: 6px 12px;
	border: 1px solid #e5e5e5;
	border-radius: 16px;
	font-size: 13px;
	outline: none;
	background: #fff;
	cursor: pointer;
	color: #555;
	transition: border-color 0.3s;
}

.sort-box select:hover {
	border-color: #000;
}

/* ======= 商品网格 ======= */
.goods-grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 16px;
}

.card {
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	cursor: pointer;
	display: block;
	transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.card-img {
	width: 100%;
	aspect-ratio: 1/1;
	background: #f7f7f7;
	overflow: hidden;
	position: relative;
}

.card-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s;
}

.card:hover .card-img img {
	transform: scale(1.05);
}

.no-img {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ccc;
	font-size: 13px;
}

.card-info {
	padding: 12px;
}

.card-sku {
	font-size: 13px;
	color: #888;
	margin-bottom: 6px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.card-price {
	font-size: 18px;
	font-weight: 900;
	color: #c82423;
}

/* ======= 分页/备案 ======= */
.pagination {
	display: flex;
	justify-content: center;
	gap: 6px;
	margin: 50px 0 20px;
}

.page-btn {
	padding: 8px 16px;
	border: 1px solid #e5e5e5;
	background: #fff;
	border-radius: 8px;
	cursor: pointer;
	font-size: 14px;
	color: #555;
	transition: all 0.2s;
}

.page-btn:hover {
	background: #f0f0f0;
	border-color: #ccc;
}

.page-btn.active {
	background: #000;
	color: #fff;
	border-color: #000;
}

.page-btn:disabled {
	cursor: not-allowed;
	opacity: 0.4;
}

.footer {
	text-align: center;
	padding: 40px 20px;
	background: #fff;
	color: #999;
	font-size: 13px;
	border-top: 1px solid #e5e5e5;
	margin-top: 60px;
}

.footer a {
	color: #999;
	text-decoration: none;
}

/* ======= 返回顶部 ======= */
.back-top {
	position: fixed;
	right: 30px;
	bottom: 50px;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.7);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	cursor: pointer;
	z-index: 9999;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s, background 0.3s;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.back-top.show {
	opacity: 1;
	pointer-events: auto;
}

.back-top:hover {
	background: #000;
}

/* ======= 手机端适配 ======= */
@media (max-width: 992px) {
	.header-inner {
		flex-direction: column;
		gap: 12px;
		padding: 12px 15px;
		align-items: stretch;
	}

	.logo-wrap {
		align-items: center;
	}

	/* 👇 分类按钮和搜索框同一排 */
	.search-row {
		max-width: 100%;
		margin-left: 0;
		gap: 8px;
	}

	/* 手机端分类按钮 */
	.mobile-category-btn {
		display: flex;
		align-items: center;
		justify-content: center;
		background: #fff;
		padding: 0 16px;
		font-size: 14px;
		font-weight: bold;
		color: #333;
		border: 2px solid #e5e5e5;
		border-radius: 30px;
		cursor: pointer;
		white-space: nowrap;
		height: 40px;
	}

	.search-box {
		border-radius: 30px;
		height: 40px;
	}

	.search-box input {
		padding: 8px 12px;
	}

	.search-box button {
		padding: 0 16px;
		border-radius: 0 20px 20px 0;
	}

	.hover-category-wrap {
		display: none;
	}

	/* 手机端抽屉弹窗 */
	.mobile-cat-drawer {
		display: none;
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		z-index: 2000;
	}

	.mobile-cat-drawer.active {
		display: block;
	}

	.drawer-mask {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		background: rgba(0, 0, 0, 0.5);
	}

	.drawer-panel {
		position: absolute;
		bottom: 0;
		left: 0;
		width: 100%;
		background: #fff;
		border-radius: 16px 16px 0 0;
		padding: 20px;
		max-height: 70vh;
		overflow-y: auto;
		transform: translateY(100%);
		transition: transform 0.3s ease;
	}

	.mobile-cat-drawer.active .drawer-panel {
		transform: translateY(0);
	}

	.drawer-title {
		font-size: 16px;
		font-weight: bold;
		margin-bottom: 16px;
		text-align: center;
		color: #000;
	}

	.mobile-cat-drawer .category-list {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		gap: 10px;
		list-style: none;
		padding: 0;
	}

	.mobile-cat-drawer .category-list li {
		padding: 10px;
		text-align: center;
		font-size: 14px;
		background: #f5f5f5;
		border-radius: 8px;
		color: #555;
		cursor: pointer;
	}

	.mobile-cat-drawer .category-list li.active {
		background: #fff0f0;
		color: #c82423;
		font-weight: bold;
	}

	.main-container {
		padding: 0 12px;
		margin: 12px auto;
	}

	.goods-header {
		margin: 12px 0 10px;
	}

	.goods-header h2 {
		font-size: 18px;
	}

	.sort-box select {
		padding: 4px 10px;
		font-size: 12px;
	}

	.goods-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}

	.card-info {
		padding: 10px;
	}

	.card-sku {
		font-size: 12px;
		margin-bottom: 4px;
	}

	.card-price {
		font-size: 16px;
	}

	.banner-wrap {
		border-radius: 8px;
		margin-bottom: 12px;
	}

	/* 手机端返回顶部按钮稍微小一点，位置调整 */
	.back-top {
		right: 15px;
		bottom: 30px;
		width: 40px;
		height: 40px;
		font-size: 18px;
	}
}