/* ===== 基础重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    padding-bottom: 70px; /* 为移动端底部导航留空间 */
}

/* ===== 容器 ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ===== 头部 ===== */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    flex: 0 0 auto;
}

.header h1 {
    font-size: 26px;
    margin: 0;
}

.header h1 a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.header h1 a:hover {
    opacity: 0.8;
}

/* ===== 用户菜单 ===== */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.header-right .welcome-text {
    font-size: 14px;
    opacity: 0.9;
}

.header-right .username-label {
    font-weight: bold;
}

.header-right .nav-link {
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background 0.3s;
    font-size: 14px;
    position: relative;
}

.header-right .nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
}

.cart-badge {
    background: #ff4757;
    color: white;
    border-radius: 50%;
    padding: 2px 7px;
    font-size: 12px;
    margin-left: 4px;
    display: inline-block;
    min-width: 20px;
    text-align: center;
}

/* ===== 移动端菜单切换 ===== */
.menu-toggle {
    display: none;
    background: transparent;
    border: 2px solid white;
    border-radius: 6px;
    color: white;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #333;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

/* ===== 导航 ===== */
.nav {
    background-color: #fff;
    border-bottom: 3px solid #667eea;
    position: sticky;
    top: 62px;
    z-index: 999;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.nav ul li {
    display: inline-block;
}

.nav ul li a {
    display: block;
    padding: 14px 24px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    font-size: 15px;
}

.nav ul li a:hover {
    background-color: #667eea;
    color: white;
}

/* ===== 横幅 ===== */
.banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.banner h2 {
    font-size: 36px;
    margin-bottom: 15px;
    animation: fadeInUp 0.8s ease;
}

.banner p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 25px;
}

.banner-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    background: white;
    color: #667eea;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: white;
    color: #667eea;
}

/* ===== 主要内容 ===== */
.main {
    padding: 30px 0;
}

.section {
    margin-bottom: 50px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section h3 {
    font-size: 24px;
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 3px solid #667eea;
}

.view-more {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.view-more:hover {
    color: #764ba2;
}

/* ===== 产品列表 ===== */
.product-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.product-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.product-item a {
    text-decoration: none;
    color: #333;
    display: block;
}

.product-image {
    overflow: hidden;
    background: #f5f5f5;
    padding: 10px;
}

.product-item img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    transition: transform 0.3s;
}

.product-item:hover img {
    transform: scale(1.05);
}

.product-info {
    padding: 15px;
}

.product-item h4 {
    font-size: 15px;
    margin: 0 0 8px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-item .price {
    color: #e74c3c;
    font-size: 20px;
    font-weight: bold;
    margin: 5px 0;
}

.product-item .original-price {
    color: #999;
    text-decoration: line-through;
    font-size: 14px;
    margin: 5px 0;
}

.product-item .stock {
    color: #666;
    font-size: 13px;
    margin: 5px 0;
}

.product-tags {
    display: flex;
    gap: 5px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.tag {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
}

.tag.hot {
    background: #ff4757;
    color: white;
}

.tag.new {
    background: #2ed573;
    color: white;
}

/* ===== 特色服务 ===== */
.features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 40px;
    padding: 30px 0;
    border-top: 1px solid #e0e0e0;
}

.feature-item {
    text-align: center;
    padding: 20px;
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.feature-item h4 {
    font-size: 16px;
    margin: 10px 0 5px 0;
}

.feature-item p {
    color: #666;
    font-size: 14px;
}

/* ===== 页脚 ===== */
.footer {
    background: #2c3e50;
    color: white;
    padding: 40px 0 20px 0;
    margin-top: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 15px;
}

.footer-section p {
    margin: 8px 0;
    opacity: 0.8;
}

.footer-section a {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 5px 0;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 14px;
    opacity: 0.7;
}

/* ===== 移动端底部导航 ===== */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e0e0e0;
    padding: 8px 0;
    z-index: 2000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    justify-content: space-around;
    align-items: center;
}

.mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #999;
    font-size: 11px;
    padding: 4px 12px;
    position: relative;
    min-width: 50px;
}

.mobile-bottom-nav a.active {
    color: #667eea;
}

.mobile-bottom-nav .nav-icon {
    font-size: 22px;
    margin-bottom: 2px;
}

.mobile-bottom-nav .nav-label {
    font-size: 10px;
}

.mobile-bottom-nav .badge {
    position: absolute;
    top: 0;
    right: 4px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    padding: 1px 6px;
    font-size: 10px;
    min-width: 18px;
    text-align: center;
}

/* ===== 动画 ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 工具类 ===== */
.text-center { text-align: center; }
.text-muted { color: #999; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.clearfix { clear: both; }

/* 响应式样式在 Responsive.css 中 */