/*
	DESTOON 响应式模板样式
	参考 w.xinchuangba.com 风格
*/
/* 全局样式 */
* {
	word-break: break-all;
	font-family: "Microsoft Yahei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
	-webkit-text-size-adjust: none;
	box-sizing: border-box;
}

body {
	margin: 0;
	padding: 0;
	font-size: 14px;
	color: #333;
	background: #f5f5f5;
	line-height: 1.6;
}

a {
	color: #333;
	text-decoration: none;
	transition: color 0.3s;
}

a:hover {
	color: #1890ff;
}

img {
	max-width: 100%;
	height: auto;
	border: none;
}

ul, ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* 容器 */
.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 15px;
	width: 100%;
}

/* 顶部栏 */
.top-bar {
	background: #2c3e50;
	color: #fff;
	padding: 8px 0;
	font-size: 12px;
}

.top-bar .container {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.top-bar ul {
	display: flex;
	gap: 15px;
}

.top-bar a {
	color: #fff;
	opacity: 0.9;
}

.top-bar a:hover {
	opacity: 1;
	color: #1890ff;
}

/* 头部主区域 */
.header-main {
	background: #fff;
	padding: 20px 0;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.header-main .container {
	display: flex;
	align-items: center;
	gap: 30px;
}

.logo-section {
	flex-shrink: 0;
}

.logo img {
	max-height: 60px;
	width: auto;
}

/* 搜索区域 */
.search-section {
	flex: 1;
	position: relative;
}

.search-box {
	position: relative;
	display: flex;
	align-items: center;
}

.search-box input {
	flex: 1;
	height: 40px;
	padding: 0 15px;
	border: 2px solid #1890ff;
	border-right: none;
	border-radius: 20px 0 0 20px;
	font-size: 14px;
	outline: none;
}

.search-module {
	position: relative;
	width: 120px;
	height: 40px;
	background: #f5f5f5;
	border: 2px solid #1890ff;
	border-left: none;
	border-right: none;
}

.search-module input {
	width: 100%;
	height: 100%;
	border: none;
	background: transparent;
	padding: 0 30px 0 10px;
	cursor: pointer;
	font-size: 14px;
}

.search-btn {
	height: 40px;
	padding: 0 30px;
	background: #1890ff;
	color: #fff;
	border: 2px solid #1890ff;
	border-radius: 0 20px 20px 0;
	cursor: pointer;
	font-size: 14px;
	transition: background 0.3s;
}

.search-btn:hover {
	background: #40a9ff;
}

.search-hot {
	margin-top: 8px;
	font-size: 12px;
	color: #999;
}

.search-hot a {
	color: #999;
	margin-right: 10px;
}

.search-hot a:hover {
	color: #1890ff;
}

/* 购物车 */
.cart-section {
	flex-shrink: 0;
}

.cart-link {
	display: flex;
	align-items: center;
	gap: 5px;
	padding: 10px 20px;
	background: #f5f5f5;
	border-radius: 20px;
	color: #333;
	font-size: 14px;
}

.cart-count {
	background: #ff4d4f;
	color: #fff;
	padding: 2px 6px;
	border-radius: 10px;
	font-size: 12px;
}

/* 导航菜单 */
.nav-main {
	background: #1890ff;
}

.nav-main .container {
	position: relative;
}

.nav-menu {
	display: flex;
	align-items: center;
}

.nav-menu li {
	position: relative;
}

.nav-menu a {
	display: block;
	padding: 15px 25px;
	color: #fff;
	font-size: 16px;
	transition: background 0.3s;
}

.nav-menu li.active a,
.nav-menu a:hover {
	background: rgba(255,255,255,0.1);
}

.mobile-menu-toggle {
	display: none;
	flex-direction: column;
	gap: 4px;
	cursor: pointer;
	padding: 10px;
}

.mobile-menu-toggle span {
	width: 25px;
	height: 3px;
	background: #fff;
	border-radius: 2px;
}

/* 主要内容区域 */
.main-content {
	padding: 20px 0;
}

.section-block {
	margin-bottom: 30px;
}

.section-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	padding-bottom: 10px;
	border-bottom: 2px solid #1890ff;
}

.section-header h2 {
	margin: 0;
	font-size: 24px;
	color: #333;
	font-weight: 600;
}

.section-nav {
	font-size: 14px;
	color: #666;
}

.section-nav a {
	color: #666;
	margin: 0 5px;
}

.section-nav a:hover {
	color: #1890ff;
}

/* 轮播图区域 */
.banner-section {
	margin-bottom: 30px;
}

.banner-main {
	display: flex;
	gap: 15px;
}

.banner-slider {
	flex: 1;
	height: 400px;
	overflow: hidden;
	border-radius: 8px;
}

.banner-ads {
	width: 240px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.banner-ad-item {
	flex: 1;
	border-radius: 8px;
	overflow: hidden;
}

/* 分类导航 */
.category-section {
	background: #fff;
	padding: 20px 0;
	margin-bottom: 30px;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.category-list {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
}

.category-item {
	position: relative;
	flex: 1;
	min-width: 150px;
}

.category-main {
	display: block;
	padding: 10px 15px;
	background: #f5f5f5;
	border-radius: 4px;
	font-weight: 600;
}

.category-main:hover {
	background: #1890ff;
	color: #fff;
}

.category-dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 4px;
	padding: 10px;
	display: none;
	z-index: 100;
	box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.category-item:hover .category-dropdown {
	display: block;
}

/* 产品网格 */
.product-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 20px;
}

.product-item {
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	transition: transform 0.3s, box-shadow 0.3s;
}

.product-item:hover {
	transform: translateY(-5px);
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.product-img {
	display: block;
	width: 100%;
	height: 200px;
	overflow: hidden;
}

.product-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.product-info {
	padding: 15px;
}

.product-info h4 {
	margin: 0 0 10px 0;
	font-size: 14px;
	height: 40px;
	overflow: hidden;
}

.product-info h4 a {
	color: #333;
}

.product-price {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.price {
	color: #ff4d4f;
	font-size: 18px;
	font-weight: 600;
}

.sales {
	color: #999;
	font-size: 12px;
}

/* 内容布局 */
.content-layout {
	display: flex;
	gap: 20px;
}

.content-main {
	flex: 1;
	background: #fff;
	padding: 20px;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.content-sidebar {
	width: 300px;
	flex-shrink: 0;
}

.side-block {
	background: #fff;
	padding: 20px;
	margin-bottom: 20px;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.side-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
	padding-bottom: 10px;
	border-bottom: 1px solid #e8e8e8;
}

.side-header h3 {
	margin: 0;
	font-size: 16px;
	color: #333;
}

.side-content ul li {
	padding: 8px 0;
	border-bottom: 1px solid #f5f5f5;
}

.side-content ul li:last-child {
	border-bottom: none;
}

/* 面包屑 */
.breadcrumb {
	padding: 15px 0;
	font-size: 14px;
	color: #666;
}

.breadcrumb a {
	color: #666;
}

.breadcrumb i {
	margin: 0 8px;
	color: #999;
}

/* 按钮 */
.btn {
	display: inline-block;
	padding: 8px 20px;
	background: #fff;
	border: 1px solid #d9d9d9;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	transition: all 0.3s;
}

.btn:hover {
	border-color: #1890ff;
	color: #1890ff;
}

.btn-primary {
	background: #1890ff;
	color: #fff;
	border-color: #1890ff;
}

.btn-primary:hover {
	background: #40a9ff;
	border-color: #40a9ff;
	color: #fff;
}

/* 页脚 */
.footer-main {
	background: #2c3e50;
	color: #fff;
	padding: 40px 0 20px;
	margin-top: 50px;
}

.footer-links {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 30px;
	margin-bottom: 30px;
}

.footer-section h4 {
	margin: 0 0 15px 0;
	font-size: 16px;
}

.footer-section ul li {
	padding: 5px 0;
}

.footer-section a {
	color: rgba(255,255,255,0.8);
}

.footer-section a:hover {
	color: #1890ff;
}

.footer-bottom {
	text-align: center;
	padding-top: 20px;
	border-top: 1px solid rgba(255,255,255,0.1);
	color: rgba(255,255,255,0.6);
	font-size: 12px;
}

/* 返回顶部 */
.back2top {
	position: fixed;
	right: 30px;
	bottom: 30px;
	width: 50px;
	height: 50px;
	background: #1890ff;
	border-radius: 50%;
	cursor: pointer;
	display: none;
	z-index: 999;
}

.back2top a {
	display: block;
	width: 100%;
	height: 100%;
	background: url('arrow-up.png') center no-repeat;
}

/* 表单样式 */
.form-section {
	background: #fff;
	padding: 30px;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.form-item {
	margin-bottom: 20px;
}

.form-item label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	color: #333;
}

.form-item .required {
	color: #ff4d4f;
	margin-right: 5px;
}

.form-item input[type="text"],
.form-item input[type="email"],
.form-item input[type="tel"],
.form-item select,
.form-item textarea {
	width: 100%;
	padding: 10px;
	border: 1px solid #d9d9d9;
	border-radius: 4px;
	font-size: 14px;
	transition: border-color 0.3s;
}

.form-item input:focus,
.form-item select:focus,
.form-item textarea:focus {
	border-color: #1890ff;
	outline: none;
}

.form-item textarea {
	resize: vertical;
	min-height: 120px;
}

.form-tip {
	display: block;
	margin-top: 5px;
	color: #999;
	font-size: 12px;
}

.form-error {
	display: block;
	margin-top: 5px;
	color: #ff4d4f;
	font-size: 12px;
}

.empty-state {
	padding: 60px 20px;
	text-align: center;
	color: #999;
}

.empty-state p {
	font-size: 16px;
}

/* 响应式设计 */
@media (max-width: 768px) {
	.container {
		padding: 0 10px;
	}

	.header-main .container {
		flex-direction: column;
		gap: 15px;
	}

	.search-section {
		width: 100%;
	}

	.nav-menu {
		display: none;
		flex-direction: column;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: #1890ff;
		z-index: 100;
	}

	.nav-menu.active {
		display: flex;
	}

	.mobile-menu-toggle {
		display: flex;
	}

	.banner-main {
		flex-direction: column;
	}

	.banner-ads {
		width: 100%;
		flex-direction: row;
	}

	.banner-ad-item {
		flex: 1;
	}

	.content-layout {
		flex-direction: column;
	}

	.content-sidebar {
		width: 100%;
	}

	.product-grid {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
		gap: 15px;
	}

	.footer-links {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 480px) {
	.top-bar .container {
		flex-direction: column;
		gap: 10px;
	}

	.product-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.section-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}
}

