* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --text-color: #2d3748;
    --text-light: #718096;
    --border-radius: 12px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-hover: 0 8px 15px rgba(0, 0, 0, 0.12);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--text-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--bg-color);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    font-size: 3em;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.subtitle {
    color: var(--text-light);
    font-size: 1.1em;
}

/* 搜索栏样式 */
.search-section {
    margin-bottom: 40px;
}

.search-box {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

#searchInput {
    flex: 1;
    padding: 15px 20px;
    border: none;
    font-size: 1em;
    outline: none;
}

#searchBtn {
    padding: 15px 30px;
    border: none;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 1.2em;
    cursor: pointer;
    transition: opacity 0.3s;
}

#searchBtn:hover {
    opacity: 0.9;
}

/* 分类标题 */
.section-title {
    font-size: 1.8em;
    margin-bottom: 25px;
    color: var(--text-color);
}

/* 导航容器 */
.nav-section {
    margin-bottom: 50px;
}

.nav-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* 导航分类卡片 */
.nav-category {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.nav-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.category-title {
    font-size: 1.3em;
    margin-bottom: 15px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links {
    list-style: none;
}

.nav-links li {
    margin-bottom: 10px;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s;
    gap: 8px;
}

.nav-links a:hover {
    background: var(--bg-color);
    color: var(--primary-color);
    transform: translateX(5px);
}

.link-icon {
    font-size: 1.2em;
}

/* 商品展示区域 */
.products-section {
    margin-bottom: 40px;
}

.products-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

/* 商品卡片 */
.product-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4em;
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--text-color);
}

.product-desc {
    color: var(--text-light);
    font-size: 0.9em;
    margin-bottom: 15px;
    line-height: 1.5;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--primary-color);
}

.product-btn {
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    transition: opacity 0.3s;
}

.product-btn:hover {
    opacity: 0.9;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 30px 0;
    color: var(--text-light);
    border-top: 1px solid #e2e8f0;
    margin-top: 40px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    .logo {
        font-size: 2em;
    }

    .nav-container,
    .products-container {
        grid-template-columns: 1fr;
    }

    .search-box {
        flex-direction: column;
    }

    #searchBtn {
        padding: 12px;
    }
}

/* 搜索高亮 */
.highlight {
    background-color: #fef08a;
    padding: 2px 4px;
    border-radius: 3px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state p {
    font-size: 1.2em;
    margin-top: 10px;
}
