/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c2c2c;
    --secondary-color: #f5f5f5;
    --accent-color: #000000;
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --hover-color: #f8f8f8;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: all 0.3s ease;
}

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

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

/* 导航栏 */
.header {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
}

.logo h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 2px;
}

.logo-subtitle {
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--text-light);
    text-transform: uppercase;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 400;
    font-size: 15px;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.lang-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-family);
}

.lang-btn:hover {
    background: var(--hover-color);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.cart-btn {
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.cart-btn:hover {
    opacity: 0.7;
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

/* 主页横幅 */
.hero {
    background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
    padding: 120px 20px;
    text-align: center;
}

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

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary-color);
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-light);
    margin-bottom: 40px;
    font-weight: 300;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    text-decoration: none;
    border-radius: 0;
    font-weight: 500;
    font-size: 15px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: var(--font-family);
}

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

.btn-primary:hover {
    background: #333333;
    transform: translateY(-2px);
}

/* 产品分类 */
.categories {
    padding: 80px 20px;
    background: white;
}

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

.category-card {
    text-align: center;
    padding: 0;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    background: white;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.category-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.category-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--secondary-color);
    margin-bottom: 0;
}

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

.category-card:hover .category-image img {
    transform: scale(1.1);
}

.category-card h3 {
    padding: 20px 20px 10px 20px;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 0;
    color: var(--primary-color);
}

.category-card p {
    padding: 0 20px 20px 20px;
    color: var(--text-light);
    font-size: 14px;
    margin: 0;
}

.category-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary-color);
}

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

/* 产品展示 */
.products {
    padding: 80px 20px;
    background: var(--secondary-color);
}

.section-title {
    font-size: 36px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 60px;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

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

.product-card {
    background: white;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

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

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

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

.product-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.product-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.product-description {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 15px;
    flex-grow: 1;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.product-price {
    font-size: 20px;
    font-weight: 600;
    color: var(--accent-color);
}

.add-to-cart-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    font-family: var(--font-family);
}

.add-to-cart-btn:hover {
    background: #333333;
}

/* 关于我们 */
.about {
    padding: 80px 20px;
    background: white;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 20px;
}

/* 联系我们 */
.contact {
    padding: 80px 20px;
    background: var(--secondary-color);
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 800px;
    margin: 0 auto;
}

.contact-item {
    text-align: center;
}

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

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

/* 购物车侧边栏 */
.cart-sidebar {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 2000;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    padding: 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h2 {
    font-size: 24px;
    font-weight: 600;
}

.close-cart {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: var(--text-light);
    line-height: 1;
    transition: var(--transition);
}

.close-cart:hover {
    color: var(--accent-color);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.empty-cart {
    text-align: center;
    color: var(--text-light);
    padding: 40px 20px;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

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

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 14px;
}

.cart-item-price {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 10px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    background: var(--secondary-color);
    border: none;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 18px;
    transition: var(--transition);
}

.quantity-btn:hover {
    background: var(--border-color);
}

.quantity {
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.remove-item {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 12px;
    text-decoration: underline;
    transition: var(--transition);
}

.remove-item:hover {
    color: var(--accent-color);
}

.cart-footer {
    padding: 30px;
    border-top: 1px solid var(--border-color);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
}

.total-price {
    font-size: 24px;
    color: var(--accent-color);
}

.checkout-btn {
    width: 100%;
    text-align: center;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1500;
    display: none;
    opacity: 0;
    transition: var(--transition);
}

.cart-overlay.show {
    display: block;
    opacity: 1;
}

/* 产品详情模态框 */
.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.product-modal.show {
    display: flex;
}

.modal-content {
    background: white;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 40px;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: var(--text-light);
    line-height: 1;
    transition: var(--transition);
    z-index: 1;
}

.close-modal:hover {
    color: var(--accent-color);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

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

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

.modal-info h2 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.modal-category {
    font-size: 14px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.modal-price {
    font-size: 28px;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 30px;
}

.modal-description {
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 30px;
}

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

/* 页脚 */
.footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 40px 20px;
}

.footer p {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
}

/* 移动端底部导航栏 */
.mobile-nav {
    display: none;
}

@media (max-width: 768px) {
    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        border-top: 1px solid var(--border-color);
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        z-index: 1000;
        padding: 8px 0;
        justify-content: space-around;
        align-items: center;
    }

    .mobile-nav-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        text-decoration: none;
        color: var(--text-light);
        font-size: 10px;
        padding: 6px 4px;
        border: none;
        background: none;
        cursor: pointer;
        transition: var(--transition);
        position: relative;
        flex: 1;
        font-family: var(--font-family);
        min-width: 0;
    }

    .cart-nav-btn {
        position: relative;
    }

    .mobile-nav-link svg {
        stroke: currentColor;
        width: 18px;
        height: 18px;
    }

    .mobile-nav-link.active {
        color: var(--accent-color);
    }

    .mobile-nav-link:active {
        opacity: 0.7;
    }

    .mobile-cart-count {
        position: absolute;
        top: 0;
        right: 8px;
        background: var(--accent-color);
        color: white;
        border-radius: 50%;
        width: 18px;
        height: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 10px;
        font-weight: 600;
    }

    .mobile-cart-count:empty {
        display: none;
    }

    /* 为底部导航栏留出空间 */
    body {
        padding-bottom: 70px;
    }

    .footer {
        margin-bottom: 70px;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .header-actions {
        display: none;
    }

    .header-content {
        padding: 15px 0;
    }

    .logo h1 {
        font-size: 20px;
        line-height: 1.3;
        word-break: keep-all;
    }

    .logo-subtitle {
        font-size: 14px;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

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

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

    .cart-sidebar {
        width: 100%;
        right: -100%;
    }

    .modal-body {
        grid-template-columns: 1fr;
    }

    .modal-image {
        height: 300px;
    }
}

/* 更小的移动设备 */
@media (max-width: 480px) {
    .logo h1 {
        font-size: 20px;
    }

    .logo-subtitle {
        font-size: 14px;
    }
}

