
/* 全局变量 - 清新文艺风格 */
:root {
    --primary-color: #ff6b6b; /* 活力红 */
    --secondary-color: #4ecdc4; /* 清新绿 */
    --bg-color: #f7f9fc;
    --text-main: #2d3436;
    --text-light: #636e72;
    --white: #ffffff;
    --border-radius: 12px;
    --shadow: 0 4px 15px rgba(0,0,0,0.05);
    --font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 顶部导航 */
.main-header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-main);
}

.logo-icon {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.top-nav a {
    margin: 0 15px;
    font-weight: 500;
    color: var(--text-light);
}

.top-nav a:hover {
    color: var(--primary-color);
}

.user-actions {
    display: flex;
    gap: 15px;
}

.btn-outline {
    padding: 8px 20px;
    border: 1px solid var(--text-light);
    border-radius: 20px;
    font-size: 0.9rem;
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-solid {
    padding: 8px 20px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 20px;
    font-size: 0.9rem;
}

.btn-solid:hover {
    background: #ff5252;
}

/* 英雄区域 */
.hero-banner {
    padding: 60px 0;
    background: linear-gradient(135deg, #fff5f5 0%, #f0fffe 100%);
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.hero-text {
    flex: 1;
}

.badge {
    display: inline-block;
    background: var(--secondary-color);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-bottom: 15px;
    font-weight: bold;
}

.hero-text h2 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text-main);
}

.hero-text p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.btn-primary {
    padding: 12px 30px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: var(--border-radius);
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 107, 107, 0.4);
}

.btn-secondary {
    padding: 12px 30px;
    background: var(--white);
    color: var(--text-main);
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-weight: bold;
}

.btn-secondary:hover {
    border-color: var(--text-main);
}

.hero-visual {
    flex: 1;
}

.hero-visual img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

/* 分类导航 */
.category-section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--secondary-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.cat-card {
    background: var(--white);
    padding: 30px 20px;
    text-align: center;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    border: 1px solid transparent;
}

.cat-card:hover {
    transform: translateY(-5px);
    border-color: var(--secondary-color);
}

.cat-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.cat-card h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.cat-card p {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* 热门商品 */
.products-section {
    padding: 60px 0;
    background: var(--white);
}

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

.view-all {
    color: var(--primary-color);
    font-weight: bold;
}

.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.product-item {
    background: var(--bg-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.product-item:hover {
    box-shadow: var(--shadow);
}

.prod-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.prod-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-item:hover .prod-image img {
    transform: scale(1.1);
}

.tag {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--white);
}

.tag.hot { background: var(--primary-color); }
.tag.new { background: var(--secondary-color); }

.prod-details {
    padding: 20px;
}

.prod-details h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.spec {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 15px;
}

.price-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.add-cart {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    background: var(--text-main);
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.3s;
}

.add-cart:hover {
    background: var(--primary-color);
}

/* 品牌理念 */
.info-section {
    padding: 80px 0;
    background: #fff5f5;
}

.info-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.info-img img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.info-text h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.info-text p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.benefit-list li {
    margin-bottom: 10px;
    font-weight: 500;
}

.btn-text {
    display: inline-block;
    margin-top: 20px;
    color: var(--primary-color);
    font-weight: bold;
    border-bottom: 2px solid var(--primary-color);
}

/* 页脚 */
.site-footer {
    background: var(--text-main);
    color: #aaa;
    padding: 60px 0 20px;
}

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

.footer-col h4 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a:hover {
    color: var(--white);
}

.social-links {
    display: flex;
    gap: 15px;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    font-size: 0.85rem;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .header-flex {
        flex-direction: column;
        height: auto;
        padding: 15px 0;
        gap: 15px;
    }

    .top-nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .info-layout {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}
