/* 全局样式 */
:root {
    --primary-color: #7bc34a;
    --secondary-color: #e4f8d7;
    --text-color: #333;
    --light-text: #666;
    --white: #fff;
    --light-bg: #f9fff5;
    --dark-bg: #282c35;
    --border-radius: 4px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.primary-btn {
    background-color: var(--primary-color);
    color: var(--white);
}

.primary-btn:hover {
    background-color: #69af39;
}

.secondary-btn {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.secondary-btn:hover {
    background-color: #d2f0c0;
}

.cart-btn {
    background-color: var(--white);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    width: 40px;
    height: 40px;
    padding: 0;
    line-height: 40px;
    text-align: center;
}

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

.section-title {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    font-size: 28px;
    color: var(--text-color);
}

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

/* 头部样式 */
header {
    background-color: var(--white);
    box-shadow: var(--box-shadow);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
}

.logo i {
    color: var(--primary-color);
    font-size: 24px;
    margin-right: 10px;
}

.logo h1 {
    font-size: 18px;
    font-weight: 600;
}

.contact {
    font-size: 14px;
    color: var(--light-text);
}

nav ul {
    display: flex;
    gap: 20px;
}

nav a {
    padding: 8px 12px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

nav a:hover, nav a.active {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.login-btn {
    background-color: var(--primary-color);
    color: var(--white);
}

.login-btn:hover {
    background-color: #69af39;
}

/* 响应式导航样式 */
.toggle-nav {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--primary-color);
    cursor: pointer;
    display: none;
}

nav.hidden {
    display: none;
}

/* Hero区域样式 */
.hero {
    background: linear-gradient(135deg, #e4f8d7 0%, #c2e7a5 100%);
    padding: 80px 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h2 {
    font-size: 32px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--light-text);
}

.hero .small-text {
    font-size: 14px;
    margin-bottom: 30px;
}

/* 产品分类样式 */
.product-categories {
    padding: 60px 0;
}

.category-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.category {
    display: flex;
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.category-info, .category-image {
    flex: 1;
}

.category-info {
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.category-info h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.category-info ul {
    margin-bottom: auto;
}

.category-info li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.category-info li i {
    color: var(--primary-color);
    font-size: 10px;
    margin-right: 10px;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category.reverse {
    flex-direction: row-reverse;
}

.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* 热门产品样式 */
.hot-products {
    background-color: var(--white);
    padding: 60px 0;
}

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

.product-card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.product-card:hover, .product-card.hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-image {
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img, .product-card.hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.price {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 20px;
    margin-bottom: 15px;
}

/* 联系我们样式 */
.contact-us {
    padding: 60px 0;
    text-align: center;
    background-color: var(--secondary-color);
}

.contact-us p {
    font-size: 24px;
    margin-bottom: 20px;
}

/* 页脚样式 */
footer {
    background-color: var(--dark-bg);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.footer-logo {
    flex: 1;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.footer-logo i {
    font-size: 30px;
    color: var(--primary-color);
    margin-right: 10px;
}

.footer-logo span {
    font-size: 24px;
    font-weight: 600;
}

.footer-columns {
    flex: 3;
    display: flex;
    flex-wrap: wrap;
}

.footer-column {
    flex: 1;
    min-width: 150px;
    margin-bottom: 20px;
}

.footer-column h4 {
    margin-bottom: 15px;
    color: var(--primary-color);
    cursor: pointer;
}

.footer-column ul {
    transition: var(--transition);
}

.footer-column ul.show {
    display: block;
}

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

.footer-column a {
    color: #aaa;
    transition: var(--transition);
}

.footer-column a:hover {
    color: var(--primary-color);
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.social-icons a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-icons a:hover {
    background-color: var(--primary-color);
}

.qr-code {
    width: 100px;
    margin-top: 15px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    color: #888;
}

.footer-bottom a {
    color: #aaa;
}

.footer-bottom img {
    height: 15px;
    vertical-align: middle;
}

/* 聊天图标 */
.chat-icon {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 99;
    transition: var(--transition);
}

.chat-icon:hover {
    transform: scale(1.1);
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: #69af39;
}

/* 响应式样式 */
@media (max-width: 992px) {
    header .container {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .toggle-nav {
        display: block;
        position: absolute;
        top: 15px;
        right: 15px;
    }
    
    nav {
        width: 100%;
    }
    
    nav ul {
        flex-direction: column;
        width: 100%;
        padding: 10px 0;
    }
    
    nav ul li {
        width: 100%;
    }
    
    nav ul li a {
        display: block;
        padding: 10px;
    }
    
    .category {
        flex-direction: column;
    }
    
    .category.reverse {
        flex-direction: column;
    }
    
    .category-image {
        height: 250px;
    }
    
    .footer-top {
        flex-direction: column;
    }
    
    .footer-columns {
        flex-direction: column;
    }
    
    .footer-column ul {
        display: none;
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero h2 {
        font-size: 28px;
    }
    
    .hero p {
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h2 {
        font-size: 26px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .chat-icon, .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
} 