/* 全局样式 */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	background: #f5f5f5;
	max-width: 900px;
	margin: 0 auto;
	color: #333;
	line-height: 1.5;
	font-size: 14px !important;
}

/* 清除浮动 */
.clearfix::after {
	content: "";
	display: table;
	clear: both;
}

/* 顶部搜索栏 */
.search-header {
	width: 100%;
	max-width: 900px;
	padding: 10px;
	margin: 0 auto;
	position: fixed;
	top: 0;
	z-index: 9999;
	background-image: url('/PUBLIC/home/img/back.jpg');  
	background-size: cover;
	box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.search-form {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
}
.search-input {
	flex: 1;
	min-width: 0;
	position: relative;
}
.search-input input[type="text"] {
	width: 100%;
	height: 36px;
	font-family: '微软雅黑';
	color: #333;
	text-indent: 8px;
	border-radius: 18px;
	border: 1px solid #bfbfbf;
	padding-right: 45px;
	box-sizing: border-box;
	background: rgba(255,255,255,0.9);
}
.search-input input[type="submit"] {
	background: #02c88d url('/PUBLIC/home/img/xx.png')   no-repeat center;
	background-size: 48px;
	height: 36px;
	width: 45px;
	border: none;
	text-indent: -9999px;
	position: absolute;
	right: 0;
	top: 0;
	color: #fff;
	cursor: pointer;
	border-radius: 0 18px 18px 0;
}
.search-options {
	width: 30%;
	min-width: 120px;
	display: flex;
	align-items: center;
	gap: 5px;
	white-space: nowrap;
	justify-content: center;
	background: rgba(255,255,255,0.9);
	padding: 5px;
	border-radius: 18px;
}
.search-options label {
	display: flex;
	align-items: center;
	gap: 3px;
	font-size: 14px;
}

/* 主内容容器 */
.main-container {
	display: flex;
	max-width: 900px;
	margin: 0 auto;
	padding-top: 60px;
	position: relative;
	gap: 10px;
}

/* 侧边分类栏 - 修改为在900px范围内 */
.category-sidebar {
	width: 160px;
	height: calc(100vh - 120px);
	overflow-y: auto;
	background: white;
	z-index: 999;
	border-right: 1px solid #e5e5e5;
	position: sticky;
	top: 60px;
	left: 0;
}
.category-sidebar li {
	width: 100%;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-bottom: 1px solid #e5e5e5;
}
.category-sidebar li a {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	color: #333;
}
.category-sidebar li .span {
	color: #02c88d;
	font-weight: bold;
}

/* 商品列表主容器 */
.product-main {
	flex: 1;
	padding: 10px;
	margin-bottom: 60px;
}

/* 商品列表 - 使用网格布局 */
.product-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr); /* PC端4列 */
	gap: 15px;
}

/* 商品项 */
.product-item {
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
	transition: transform 0.2s;
}
.product-item:hover {
	transform: translateY(-3px);
}
.product-item a {
	text-decoration: none;
	color: inherit;
	display: block;
	height: 100%;
}

/* 商品图片容器 */
.product-image-container {
	position: relative;
	width: 100%;
	padding-top: 100%; /* 1:1宽高比 */
	overflow: hidden;
}
.product-image {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	background: #f5f5f5;
}

/* 商品信息 */
.product-info {
	padding: 10px;
}
.product-name {
	margin-top: 5px;
	height: 36px;
	line-height: 18px;
	font-size: 14px;
	font-weight: 600;
	color: #333;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
}
.product-price {
	margin-top: 8px;
	line-height: 18px;
	font-size: 16px;
	color: #f5222d;
	font-weight: 600;
}
.original-price {
	text-decoration: line-through;
	font-size: 12px;
	color: #999;
	margin-left: 5px;
}

/* 无商品提示 */
.no-products {
	background-color: #fff;
	width: 100%;
	height: 45px;
	display: grid;
	place-items: center;
	text-align: center;
	font-weight: 600;
	font-size: 16px;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
	grid-column: 1 / -1;
}

/* 分页样式 */
.pagination-container {
	margin-top: 20px;
	background: #fff;
	padding: 15px;
	border-radius: 8px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.pager-summary {
	font-size: 14px;
	color: #666;
}
.pager-summary em {
	font-style: normal;
	color: #02c88d;
	font-weight: bold;
}
.pagination {
	display: flex;
	list-style: none;
	gap: 5px;
}
.pagination li a {
	display: block;
	padding: 5px 10px;
	background: #f5f5f5;
	border-radius: 4px;
	text-decoration: none;
	color: #333;
	font-size: 14px;
}
.pagination li.active   a,
.pagination li a:hover {
	background: #02c88d;
	color: white;
}

/* 底部导航栏 */
.bottom-nav {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background: white;
	box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
	max-width: 900px;
	margin: 0 auto;
	z-index: 100;
	padding: 8px 0 5px;
}
.nav-list {
	display: flex;
	justify-content: space-around;
	list-style: none;
	padding: 0;
	margin: 0;
}
.nav-item {
	text-align: center;
}
.nav-item a {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-decoration: none;
	color: #666;
}
.nav-icon {
	width: 24px;
	height: 24px;
	margin-bottom: 2px;
}
.nav-text {
	font-size: 12px;
	line-height: 1.2;
}
.nav-item.active   a {
	color: #02c88d;
}

/* 加载动画 */
.site-welcome {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(255,255,255,0.9);
	z-index: 9999;
	display: flex;
	justify-content: center;
	align-items: center;
}
.loading {
	width: 40px;
	height: 40px;
	border: 3px solid #02c88d;
	border-radius: 50%;
	border-top-color: transparent;
	animation: spin 1s linear infinite;
}
@keyframes spin {
	to { transform: rotate(360deg); }
}

/* 响应式设计 - 调整商品列表列数 */
@media (max-width: 768px) {
	.main-container {
		flex-direction: column;
	}
	
	.category-sidebar {
		width: 100%;
		height: auto;
		position: relative;
		top: 0;
		display: flex;
		flex-wrap: wrap;
		border-right: none;
		border-bottom: 1px solid #e5e5e5;
	}
	
	.category-sidebar li {
		width: auto;
		flex: 1;
		height: 30px;
		min-width: 80px;
		border-bottom: none;
		border-right: 1px solid #e5e5e5;
	}
	
	.product-grid {
		grid-template-columns: repeat(2, 1fr); /* 手机端2列 */
	}
}