/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 全局样式 */
body {
    font-family: 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 字体设置 */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #2c3e50;
}

h1 {
    font-size: 2.5rem;
    line-height: 1.2;
}

h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #e67e22;
    color: white;
}

.btn-primary:hover {
    background-color: #d35400;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-secondary {
    background-color: #3498db;
    color: white;
}

.btn-secondary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-link {
    color: #e67e22;
    background: none;
    padding: 0;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: underline;
}

.btn-link:hover {
    color: #d35400;
    text-decoration: none;
}

/* 头部导航 */
#main-header {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    text-decoration: none;
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: #e67e22;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #e67e22;
}

/* 下拉菜单 */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 4px;
    padding: 10px 0;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
    padding: 0;
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.dropdown-menu a:hover {
    background-color: #f5f5f5;
    color: #e67e22;
}

/* 搜索框 */
.search-box {
    display: flex;
    margin-left: 20px;
}

.search-box input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    border-color: #e67e22;
}

.search-box button {
    background-color: #e67e22;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-box button:hover {
    background-color: #d35400;
}

/* 用户菜单 */
.user-menu {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.user-icon,
.cart-icon {
    color: #333;
    font-size: 1.2rem;
    margin-left: 15px;
    transition: color 0.3s ease;
}

.user-icon:hover,
.cart-icon:hover {
    color: #e67e22;
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
}

/* 移动端导航菜单 */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background-color: white;
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    z-index: 1100;
    transition: right 0.3s ease;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.close-menu {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
}

.mobile-nav-links {
    list-style: none;
    padding: 20px;
}

.mobile-nav-links li {
    margin-bottom: 15px;
}

.mobile-nav-links a {
    display: block;
    padding: 10px 0;
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.mobile-dropdown-menu {
    padding-left: 20px;
    margin-top: 10px;
    display: none;
}

.mobile-dropdown.active .mobile-dropdown-menu {
    display: block;
}

.mobile-search-box {
    margin-top: 20px;
    display: flex;
}

.mobile-search-box input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
}

.mobile-search-box button {
    background-color: #e67e22;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

/* 英雄区域 */
.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://trae-api-cn.mchost.guru/api/ide/v1/text_to_image?prompt=luxury%20lifestyle%20scene%20with%20modern%20design&image_size=landscape_16_9');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 150px 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    color: white;
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* 分类区域 */
.categories-section {
    padding: 100px 0;
    background-color: white;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title p {
    color: #7f8c8d;
    font-size: 1.1rem;
    margin-top: 10px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.category-card {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 40px 30px;
    text-align: center;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    background-color: #fff;
}

.category-icon {
    width: 80px;
    height: 80px;
    background-color: #e67e22;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    transition: all 0.3s ease;
}

.category-card:hover .category-icon {
    background-color: #d35400;
    transform: scale(1.1);
}

.category-card h3 {
    margin-bottom: 10px;
}

.category-card p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* 精选内容 */
.featured-section {
    padding: 100px 0;
    background-color: #f9f9f9;
}

.featured-slider {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.slider-item {
    display: flex;
    height: 500px;
}

.slider-item img {
    width: 60%;
    object-fit: cover;
}

.slider-content {
    width: 40%;
    background-color: white;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.category-tag {
    display: inline-block;
    background-color: #e67e22;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.slider-content h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.slider-content p {
    color: #7f8c8d;
    margin-bottom: 30px;
    flex-grow: 1;
}

/* 最新文章 */
.latest-section {
    padding: 100px 0;
    background-color: white;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.article-card {
    background-color: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-content {
    padding: 20px;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    margin: 15px 0;
    font-size: 0.8rem;
    color: #7f8c8d;
}

.article-meta span {
    margin-right: 15px;
    margin-bottom: 5px;
}

.load-more {
    text-align: center;
    margin-top: 40px;
}

/* 热门专题 */
.topics-section {
    padding: 100px 0;
    background-color: #f9f9f9;
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.topic-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    color: #333;
}

.topic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.topic-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.topic-content {
    padding: 20px;
}

.topic-content h3 {
    margin-bottom: 10px;
}

.topic-content p {
    color: #e67e22;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.topic-description {
    color: #7f8c8d;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* 推荐产品 */
.products-section {
    padding: 100px 0;
    background-color: white;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.product-card {
    background-color: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-content {
    padding: 20px;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #e67e22;
    margin: 10px 0;
}

.view-all-products {
    text-align: center;
    margin-top: 40px;
}

/* 会员权益 */
.membership-section {
    padding: 100px 0;
    background-color: #f9f9f9;
}

.membership-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.membership-card {
    background-color: white;
    border-radius: 8px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.membership-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.membership-card.featured {
    border: 2px solid #e67e22;
    transform: scale(1.05);
}

.membership-level {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #2c3e50;
}

.membership-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: #e67e22;
    margin-bottom: 30px;
}

.membership-benefits {
    list-style: none;
    margin-bottom: 30px;
}

.membership-benefits li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.membership-benefits i {
    color: #27ae60;
    margin-right: 10px;
}

/* 订阅区域 */
.newsletter-section {
    padding: 100px 0;
    background-color: #2c3e50;
    color: white;
    text-align: center;
}

.newsletter-section h2 {
    color: white;
    margin-bottom: 20px;
}

.newsletter-section p {
    margin-bottom: 30px;
    opacity: 0.9;
}

.newsletter-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
}

.newsletter-form input {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
    outline: none;
}

.newsletter-form button {
    background-color: #e67e22;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 0 4px 4px 0;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.newsletter-form button:hover {
    background-color: #d35400;
}

/* 页脚 */
#main-footer {
    background-color: #1a252f;
    color: white;
    padding: 80px 0 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-section p {
    color: rgba(255,255,255,0.7);
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    color: white;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: #e67e22;
    transform: translateY(-3px);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #e67e22;
}

.newsletter-subscribe h4 {
    margin-bottom: 15px;
    font-size: 1rem;
}

.newsletter-subscribe form {
    display: flex;
}

.newsletter-subscribe input {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 4px 0 0 4px;
    outline: none;
}

.newsletter-subscribe button {
    background-color: #e67e22;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.newsletter-subscribe button:hover {
    background-color: #d35400;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 40px;
    text-align: center;
    color: rgba(255,255,255,0.7);
}

/* 回到顶部按钮 */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #e67e22;
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

#back-to-top.active {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    background-color: #d35400;
    transform: translateY(-5px);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .slider-item {
        flex-direction: column;
        height: auto;
    }
    
    .slider-item img,
    .slider-content {
        width: 100%;
    }
    
    .slider-content {
        padding: 40px;
    }
}

@media (max-width: 768px) {
    .nav-links,
    .search-box,
    .user-menu {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .hero {
        padding: 100px 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .categories-section,
    .featured-section,
    .latest-section,
    .topics-section,
    .products-section,
    .membership-section,
    .newsletter-section {
        padding: 60px 0;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .membership-card.featured {
        transform: none;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form input {
        border-radius: 4px;
        margin-bottom: 10px;
    }
    
    .newsletter-form button {
        border-radius: 4px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .section-title h2 {
        font-size: 1.5rem;
    }
    
    .slider-content {
        padding: 20px;
    }
    
    .membership-card {
        padding: 30px 20px;
    }
}

/* ===== 移动端优化 ===== */

/* 触摸优化 */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* 允许文本选择的元素 */
input, textarea, select {
    -webkit-user-select: auto;
    user-select: auto;
}

/* 移动端触摸区域优化 */
.btn,
a,
button,
.search-box button,
.nav-links a,
.category-card,
.article-card,
.topic-card,
.product-card,
.membership-card,
.payment-method,
.close-menu,
.menu-toggle,
#back-to-top {
    min-height: 44px;
    min-width: 44px;
    padding: 12px 16px;
}

/* 移动端按钮样式优化 */
@media (max-width: 768px) {
    .btn {
        padding: 14px 24px;
        font-size: 1rem;
        border-radius: 8px;
    }
    
    .btn-primary {
        width: 100%;
        max-width: 300px;
    }
}

/* 移动端字体优化 */
@media (max-width: 768px) {
    html {
        font-size: 16px;
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    
    body {
        line-height: 1.7;
    }
    
    p {
        font-size: 1rem;
        margin-bottom: 1.2rem;
    }
}

/* 移动端布局优化 */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 0 10px;
    }
    
    /* 防止水平滚动 */
    body {
        overflow-x: hidden;
    }
    
    /* 图片响应式优化 */
    img {
        max-width: 100%;
        height: auto;
        display: block;
    }
    
    /* 网格布局在移动端单列显示 */
    .categories-grid,
    .articles-grid,
    .topics-grid,
    .products-grid,
    .membership-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* 分类卡片优化 */
    .category-card {
        padding: 30px 20px;
    }
    
    .category-icon {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
    
    /* 文章卡片优化 */
    .article-card img,
    .topic-card img,
    .product-card img {
        height: 180px;
    }
    
    .article-content,
    .topic-content,
    .product-content {
        padding: 15px;
    }
    
    /* 精选内容滑动优化 */
    .featured-slider {
        border-radius: 0;
    }
    
    .slider-item {
        flex-direction: column;
    }
    
    .slider-item img {
        width: 100%;
        height: 250px;
    }
    
    .slider-content {
        width: 100%;
        padding: 30px 20px;
    }
    
    /* 移动端菜单优化 */
    .mobile-menu {
        width: 85%;
        max-width: 320px;
    }
    
    .mobile-nav-links a {
        padding: 15px 0;
        font-size: 1.1rem;
    }
    
    /* 搜索框优化 */
    .mobile-search-box {
        margin-top: 30px;
    }
    
    .mobile-search-box input {
        padding: 14px;
        font-size: 1rem;
    }
    
    .mobile-search-box button {
        padding: 14px 18px;
    }
    
    /* 页脚优化 */
    .footer-content {
        gap: 30px;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-section ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px 20px;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* 回到顶部按钮优化 */
    #back-to-top {
        width: 56px;
        height: 56px;
        bottom: 20px;
        right: 20px;
        font-size: 1.5rem;
    }
    
    /* 支付模态框移动端优化 */
    .payment-modal-content {
        padding: 20px;
        margin: 10px;
        max-width: 100%;
        width: calc(100% - 20px);
    }
    
    .payment-methods {
        flex-direction: column;
        gap: 15px;
    }
    
    .payment-method {
        padding: 20px;
        flex-direction: row;
        justify-content: center;
        gap: 15px;
    }
    
    .payment-method i {
        font-size: 2rem;
    }
    
    /* 会员卡片移动端优化 */
    .membership-card.featured {
        transform: none;
        border-width: 3px;
    }
    
    .popular-badge {
        top: -12px;
        font-size: 0.85rem;
        padding: 6px 16px;
    }
    
    .membership-price-options {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    
    .option-item {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
    
    /* 折扣提示优化 */
    .discount-notice {
        font-size: 0.95rem;
        padding: 12px;
        background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
        color: white;
        border-radius: 8px;
        margin: 20px auto;
        max-width: 90%;
    }
    
    /* 英雄区域移动端优化 */
    .hero {
        padding: 80px 0;
        background-attachment: scroll;
    }
    
    .hero h1 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: 25px;
        padding: 0 15px;
    }
    
    /* 间距优化 */
    .categories-section,
    .featured-section,
    .latest-section,
    .topics-section,
    .products-section,
    .membership-section,
    .newsletter-section {
        padding: 50px 0;
    }
    
    .section-title {
        margin-bottom: 40px;
    }
    
    /* 订阅表单移动端优化 */
    .newsletter-form {
        padding: 0 15px;
    }
    
    .newsletter-form input,
    .newsletter-form button {
        padding: 14px 20px;
        font-size: 1rem;
    }
}

/* 超小屏幕优化 */
@media (max-width: 360px) {
    html {
        font-size: 15px;
    }
    
    .hero h1 {
        font-size: 1.6rem;
    }
    
    .section-title h2 {
        font-size: 1.4rem;
    }
    
    .logo-text {
        font-size: 1.5rem;
    }
    
    .membership-price {
        font-size: 1.6rem;
    }
}

/* 平板设备优化 */
@media (min-width: 769px) and (max-width: 1024px) {
    .categories-grid,
    .articles-grid,
    .topics-grid,
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .membership-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .membership-cards .membership-card:last-child {
        grid-column: 1 / -1;
        max-width: 400px;
        margin: 0 auto;
    }
}

/* 性能优化 */
/* 图片加载优化通过HTML属性实现: loading="lazy" decoding="async" */

/* 防止移动端双击缩放 */
@media (max-width: 768px) {
    a, button {
        touch-action: manipulation;
    }
}

/* 移动端滚动优化 */
@media (max-width: 768px) {
    html {
        scroll-behavior: smooth;
    }
    
    * {
        -webkit-overflow-scrolling: touch;
    }
}

/* 安全区域适配（iOS刘海屏） */
@supports (padding: max(0px)) {
    @media (max-width: 768px) {
        body {
            padding-top: env(safe-area-inset-top);
            padding-bottom: env(safe-area-inset-bottom);
            padding-left: env(safe-area-inset-left);
            padding-right: env(safe-area-inset-right);
        }
        
        #main-header {
            padding-top: env(safe-area-inset-top);
        }
        
        #back-to-top {
            bottom: calc(20px + env(safe-area-inset-bottom));
            right: calc(20px + env(safe-area-inset-right));
        }
    }
}

/* 广告区域样式 */
.ad-section {
    padding: 40px 0;
    background-color: #f9f9f9;
}

.ad-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.ad-container ins {
    display: block;
    margin: 0 auto;
}

/* 社交媒体分享按钮样式 */
.share-buttons {
    margin-bottom: 30px;
}

.share-buttons h3 {
    margin-bottom: 15px;
    font-size: 16px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    margin-right: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.share-btn:nth-child(2) {
    background-color: #07C160;
    color: white;
}

.share-btn:nth-child(3) {
    background-color: #E6162D;
    color: white;
}

.share-btn:nth-child(4) {
    background-color: #12B7F5;
    color: white;
}

.share-btn:nth-child(5) {
    background-color: #0077B5;
    color: white;
}

.share-btn:nth-child(6) {
    background-color: #1DA1F2;
    color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .share-btn {
        display: block;
        width: 100%;
        margin-right: 0;
        text-align: center;
    }
}

/* 购物车样式 */
.cart-section {
    padding: 80px 0;
    background-color: #ffffff;
}

.cart-content {
    display: flex;
    gap: 30px;
}

.cart-items {
    flex: 1;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.cart-table th,
.cart-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e5e5e5;
}

.cart-table th {
    background-color: #f9f9f9;
    font-weight: 600;
}

.cart-item-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-item-info img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.item-details h3 {
    margin-bottom: 5px;
    font-size: 16px;
}

.item-details p {
    color: #666;
    font-size: 14px;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #e5e5e5;
    background-color: #f9f9f9;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-control input {
    width: 60px;
    height: 30px;
    text-align: center;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}

.remove-btn {
    background: none;
    border: none;
    color: #ff6b6b;
    cursor: pointer;
    font-size: 16px;
}

.cart-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.cart-summary {
    width: 350px;
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
}

.cart-summary h3 {
    margin-bottom: 20px;
    font-size: 18px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e5e5;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #333;
    font-weight: 600;
    font-size: 18px;
}

.coupon-section {
    margin: 20px 0;
}

.coupon-section h4 {
    margin-bottom: 10px;
    font-size: 14px;
}

.coupon-section input {
    width: 70%;
    padding: 10px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    margin-right: 10px;
}

.checkout-section {
    margin-top: 20px;
}

/* 推荐产品样式 */
.recommended-section {
    padding: 80px 0;
    background-color: #f9f9f9;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .cart-content {
        flex-direction: column;
    }
    
    .cart-summary {
        width: 100%;
    }
    
    .cart-item-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .cart-table th,
    .cart-table td {
        padding: 10px;
    }
    
    .coupon-section input {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .coupon-section button {
        width: 100%;
    }
}