/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 莫兰迪色系变量 - 默认棕色主题 */
:root {
    --primary-color: #A08B7A;      /* 莫兰迪棕色 */
    --secondary-color: #D4B5A0;    /* 莫兰迪米色 */
    --accent-color: #E8D5C4;       /* 莫兰迪浅米色 */
    --text-primary: #5A4A3A;       /* 深棕色文字 */
    --text-secondary: #8B7355;     /* 中棕色文字 */
    --text-light: #C8B5A0;         /* 浅棕色文字 */
    --background-light: #F5F0EB;   /* 浅背景色 */
    --white: #FFFFFF;
    --shadow: rgba(160, 139, 122, 0.1);
}

/* 莫兰迪浅绿色系主题 */
[data-theme="green"] {
    --primary-color: #8FA68E;      /* 莫兰迪浅绿色 */
    --secondary-color: #B5C5B4;    /* 莫兰迪浅绿米色 */
    --accent-color: #D5E0D4;       /* 莫兰迪极浅绿色 */
    --text-primary: #3A4A3A;       /* 深绿色文字 */
    --text-secondary: #5A6B5A;     /* 中绿色文字 */
    --text-light: #A0B5A0;         /* 浅绿色文字 */
    --background-light: #EBF0EB;   /* 浅绿背景色 */
    --white: #FFFFFF;
    --shadow: rgba(143, 166, 142, 0.1);
}

/* 基础样式 */
body {
    font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--white);
}

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

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 20px var(--shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 600;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: 0.3s;
}

/* 首页英雄区 */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--background-light) 0%, var(--accent-color) 100%);
    padding-top: 80px;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    animation: fadeInLeft 1s ease-out;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    letter-spacing: 2px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    display: flex;
    justify-content: center;
    animation: fadeInRight 1s ease-out;
}

.hero-placeholder {
    max-width: 100%;
    height: auto;
}

.hero-placeholder img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    transition: transform 0.3s ease;
}

.hero-placeholder img:hover {
    transform: scale(1.02);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
}

/* 通用区块样式 */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* 关于我们 */
.about {
    padding: 6rem 0;
    background: var(--white);
}

.about-content {
    display: grid;
    gap: 3rem;
}

.about-text {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.about-item {
    text-align: center;
    padding: 2rem;
    background: var(--background-light);
    border-radius: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px var(--shadow);
}

.about-icon {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.about-item h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.about-item p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* 产品展示 */
.products {
    padding: 6rem 0;
    background: var(--background-light);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}

.product-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px var(--shadow);
}

.product-image {
    width: 100%;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-color);
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    transition: transform 0.3s ease;
}

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

.product-info {
    padding: 2rem;
}

.product-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.product-description {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.feature-tag {
    background: var(--accent-color);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* 联系我们 */
.contact {
    padding: 6rem 0;
    background: var(--white);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--background-light);
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateX(10px);
}

.contact-details h4 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.contact-details p {
    color: var(--text-secondary);
}

/* 表单样式 */
.form {
    background: var(--background-light);
    padding: 2rem;
    border-radius: 20px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--accent-color);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--white);
    color: var(--text-primary);
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* 页脚 */
.footer {
    background: var(--text-primary);
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-info p {
    color: var(--text-light);
}

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

/* 动画 */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px var(--shadow);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .about-text {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .hero-container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .about-item,
    .form {
        padding: 1.5rem;
    }
    
    .product-info {
        padding: 1.5rem;
    }
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 选中文本样式 */
::selection {
    background: var(--primary-color);
    color: var(--white);
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-primary);
}

/* 主题切换按钮 */
.theme-toggle {
    position: relative;
    background: none;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-color);
    transition: all 0.3s ease;
    margin-left: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.theme-toggle-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-toggle-icon {
    transform: rotate(180deg);
}

/* 移动端主题切换按钮调整 */
@media (max-width: 768px) {
    .theme-toggle {
        margin-left: 0;
        margin-top: 1rem;
        justify-content: center;
    }
    
    .nav-menu .theme-toggle {
        margin: 1rem auto 0;
        width: fit-content;
    }
}