/* 基础重置与字体 */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600&family=Inter:wght@300;400;500&display=swap');

:root {
    --bg-color: #fbfbfb;
    --text-main: #111111;
    --text-light: #666666;
    --accent: #C19A6B; /* 香槟金/浅焦糖色 */
    --border-color: #eaeaea;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-sans); background-color: var(--bg-color); color: var(--text-main); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* 导航栏 (完美居中对齐) */
header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 20px 5%; 
    border-bottom: 1px solid var(--border-color); 
    background: #fff; 
    position: sticky; 
    top: 0; 
    z-index: 100; 
}
.logo { 
    flex: 1; 
    font-family: var(--font-serif); 
    font-size: 28px; 
    letter-spacing: 2px; 
    font-weight: 600; 
}
nav { 
    flex: 2; 
    display: flex; 
    justify-content: center; 
}
nav ul { display: flex; gap: 50px; }
nav ul li a { font-size: 14px; text-transform: uppercase; letter-spacing: 1px; transition: color 0.3s; }
nav ul li a:hover { color: var(--accent); }

/* 右侧隐形占位，用来平衡左边的 Logo，让中间的导航绝对居中 */
header::after {
    content: '';
    flex: 1;
}

/* 首屏 Hero 区 (背景图由 JS 动态注入) */
.hero { 
    height: 80vh; 
    background-color: #111; 
    background-position: center; 
    background-size: cover; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    text-align: center; 
    color: #fff; 
    position: relative; 
}
.hero::before { 
    content: ''; 
    position: absolute; 
    top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.4); 
}
.hero-content { position: relative; z-index: 1; padding: 0 20px;}
.hero h1 { font-family: var(--font-serif); font-size: 56px; margin-bottom: 15px; letter-spacing: 2px; }
.hero p { font-size: 18px; margin-bottom: 30px; letter-spacing: 1px; }
.btn { display: inline-block; padding: 12px 35px; border: 1px solid #fff; color: #fff; text-transform: uppercase; letter-spacing: 2px; font-size: 13px; transition: 0.3s; }
.btn:hover { background: #fff; color: var(--text-main); }

/* 分类入口 */
.category-section { display: flex; gap: 30px; padding: 80px 5%; justify-content: center; }
.cat-card { flex: 1; display: flex; background: #EFEBE5; height: 350px; overflow: hidden; max-width: 600px; }
.cat-card.reverse { background: #F4F4F4; }
.cat-text { flex: 1; padding: 40px; display: flex; flex-direction: column; justify-content: center; }
.cat-text .subtitle { font-size: 12px; letter-spacing: 2px; color: var(--text-light); margin-bottom: 10px; white-space: pre-line; }
.cat-text h3 { font-size: 24px; font-family: var(--font-serif); margin-bottom: 30px; }
.cat-text .shop-now { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; border-bottom: 1px solid var(--text-main); padding-bottom: 2px; align-self: flex-start; }
.cat-img { flex: 1; overflow: hidden; }
.cat-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.cat-card:hover .cat-img img { transform: scale(1.05); }

/* 热门商品 */
.products-section { padding: 0 5% 80px; }
.product-category { margin-bottom: 60px; }
.category-title { font-size: 20px; font-family: var(--font-serif); border-bottom: 1px solid var(--border-color); padding-bottom: 10px; margin-bottom: 30px; }
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.product-card { text-align: center; }
.product-img { background: #f0f0f0; height: 300px; overflow: hidden; margin-bottom: 15px; }
.product-img img { width: 100%; height: 100%; object-fit: cover; transition: 0.3s; }
.product-card:hover .product-img img { transform: scale(1.05); }
.product-name { font-size: 15px; font-weight: 500; margin-bottom: 5px; }
.product-price { font-size: 14px; color: var(--text-light); margin-bottom: 15px; }
.buy-btn { display: inline-block; padding: 8px 20px; background: var(--text-main); color: #fff; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; transition: 0.3s; width: 100%; max-width: 150px; }
.buy-btn:hover { background: var(--accent); }

/* 品牌故事 */
.brand-story { text-align: center; padding: 80px 20%; background: #fff; border-top: 1px solid var(--border-color); }
.brand-story h2 { font-family: var(--font-serif); font-size: 32px; margin-bottom: 20px; }
.brand-story p { color: var(--text-light); font-size: 15px; line-height: 1.8; }

/* 服务保障专区 */
.service-bar { display: flex; justify-content: space-around; align-items: center; padding: 30px 5%; margin: 80px 5%; border: 1px solid var(--border-color); border-radius: 8px; background: #fff; }
.service-item { display: flex; align-items: center; gap: 15px; }
.service-icon { font-size: 28px; color: var(--text-light); }
.service-text h4 { font-size: 14px; font-weight: 500; margin-bottom: 2px; }
.service-text p { font-size: 12px; color: var(--text-light); }

/* 分类页面专属顶部筛选区 */
.page-header { text-align: center; padding: 60px 5% 40px; background: #fff; border-bottom: 1px solid var(--border-color); }
.page-header h1 { font-family: var(--font-serif); font-size: 36px; margin-bottom: 20px; }
.filter-bar { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.filter-btn { padding: 8px 24px; border: 1px solid var(--border-color); background: transparent; font-size: 13px; cursor: pointer; text-transform: uppercase; letter-spacing: 1px; transition: 0.3s; }
.filter-btn:hover, .filter-btn.active { border-color: var(--text-main); background: var(--text-main); color: #fff; }

/* 面包屑导航 */
.breadcrumb { padding: 20px 5%; font-size: 12px; color: var(--text-light); }
.breadcrumb a { color: var(--text-light); }
.breadcrumb span { color: var(--text-main); }

/* 页脚 */
footer { background: #111; color: #fff; padding: 60px 5% 20px; }
.footer-content { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px; margin-bottom: 40px; }
.footer-col { flex: 1; min-width: 200px; }
.footer-col h4 { font-size: 16px; margin-bottom: 20px; font-family: var(--font-serif); letter-spacing: 1px; }
.footer-col p { font-size: 13px; color: #aaa; margin-bottom: 10px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { font-size: 13px; color: #aaa; transition: 0.3s; }
.footer-col ul li a:hover { color: var(--accent); }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid #333; font-size: 12px; color: #777; }

/* 悬浮 WhatsApp (右侧中间) */
.float-wa { 
    position: fixed; right: 20px; top: 50%; transform: translateY(-50%); 
    background: #25D366; color: #fff; width: 60px; height: 60px; border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; font-size: 30px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.2); z-index: 1000; transition: 0.3s; 
}
.float-wa:hover { transform: translateY(-50%) scale(1.1); }
.float-tooltip { position: absolute; right: 70px; background: #fff; color: #111; padding: 8px 12px; border-radius: 4px; font-size: 12px; white-space: nowrap; box-shadow: 0 2px 5px rgba(0,0,0,0.1); opacity: 0; visibility: hidden; transition: 0.3s; }
.float-wa:hover .float-tooltip { opacity: 1; visibility: visible; }

/* =========================================
   移动端专属响应式适配 (重点修复区域)
   ========================================= */
@media (max-width: 768px) {
    /* 1. 导航栏：强制一行显示，自动缩小字号适应屏幕 */
    header { flex-direction: column; gap: 10px; padding: 15px 2%; }
    header::after { display: none; } 
    .logo { flex: none; font-size: 24px; }
    nav { flex: none; width: 100%; }
    nav ul { 
        flex-wrap: nowrap; /* 强制不换行 */
        justify-content: center; 
        gap: 12px; /* 减小间距 */
        width: 100%;
    }
    nav ul li a { 
        font-size: 11px; /* 字体改小，防止挤出去 */
        letter-spacing: 0.5px;
    }
    
    /* 2. 首屏大图 */
    .hero { 
        height: 60vw; 
        min-height: 350px; 
        max-height: 500px; 
    }
    .hero h1 { font-size: 32px; }
    .hero p { font-size: 14px; padding: 0 10px; }

    /* 3. 分类入口图 */
    .category-section { flex-direction: column; padding: 40px 5%; gap: 20px; }
    .cat-card { 
        width: 100%; 
        height: 150px; 
        flex-direction: row; 
    }
    .cat-card.reverse { flex-direction: row; } 
    .cat-text { padding: 20px; flex: 1.2; justify-content: center; }
    .cat-text .subtitle { font-size: 10px; margin-bottom: 5px; }
    .cat-text h3 { font-size: 18px; margin-bottom: 15px; }
    .cat-text .shop-now { font-size: 10px; }
    .cat-img { flex: 1.5; height: 100%; }

    /* 4. 商品网格 */
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .product-img { height: 180px; } 
    .product-name { font-size: 13px; margin-top: 5px; }
    .product-price { font-size: 12px; margin-bottom: 8px; }
    .buy-btn { font-size: 11px; padding: 6px 10px; max-width: 100%; }
    
    /* 5. 分类页标题与标签 */
    .page-header { padding: 30px 5% 20px; }
    .page-header h1 { font-size: 24px; margin-bottom: 15px; }
    .filter-bar { gap: 8px; }
    .filter-btn { padding: 6px 12px; font-size: 11px; }

    /* =========================================
       重点修复 2 & 3：文字靠左对齐，告别错落感
       ========================================= */
       
    /* Our Story (品牌故事) 靠左对齐 */
    .brand-story { 
        padding: 40px 8%; 
        text-align: left; /* 强制左对齐 */
    }
    .brand-story h2 { 
        font-size: 24px; 
        text-align: center; /* 标题保持居中，如果想让标题也靠左，可以改成 left */
    }
    .brand-story p { 
        font-size: 14px; 
        text-align: left; 
    }

    /* 服务保障专区 (Global Shipping 等) 靠左对齐 */
    .service-bar { 
        flex-direction: column; 
        gap: 20px; 
        margin: 40px 5%; 
        padding: 20px; 
        align-items: flex-start; /* 让整个区块内容靠左排布 */
    }
    .service-item { 
        width: 100%; 
        text-align: left; /* 文字靠左 */
    }

    /* 其他全局适配 */
    .footer-content { flex-direction: column; gap: 30px; }
    
    /* 悬浮按钮到底部 */
    .float-wa { top: auto; bottom: 30px; transform: none; width: 50px; height: 50px; font-size: 25px;}
    .float-wa:hover { transform: translateY(-5px); }
}