/* 全局样式 */
:root {
    --primary-color: #2c5f2d; /* 深绿色 */
    --secondary-color: #c19a6b; /* 卡其色 */
    --dark-color: #333333; /* 黑色 */
    --light-color: #f8f9fa;
    --gray-color: #6c757d;
    --border-color: #dee2e6;
    --shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --nav-h: 70px; /* 吸顶页眉高度，供吸顶子栏(如产品筛选)对齐用；各断点在 responsive.css 覆盖 */
}

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

/* 固定全站基准字号：不显式声明时，Chrome 会对内容较多的页面做“文字自动放大”，
   导致不同页面基准字号在 16px/18px 间浮动、页眉文字忽大忽小。此处一次性钉死，
   所有页面（含页眉/页脚）字号完全一致；如需整体放大，只改这一处即可。 */
html {
    font-size: 16px;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
    /* 强制所有页面都显示竖向滚动条：这样"内容不足一屏"的短页面（如娱乐休闲/登录）
       与长页面拥有完全相同的可用宽度，居中页眉不会再因有无滚动条而左右跳动。 */
    overflow-y: scroll;
}

body {
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #fff;
    /* 页眉改为视口固定定位（见 .navbar），此处预留顶部留白，
       防止内容被固定页眉遮挡；JS 会按真实页眉高度精确同步（见 site-nav.js）。 */
    padding-top: 70px;
}

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

/* 链接样式 */
a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: #1e3f1e;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    font-weight: bold;
    transition: var(--transition);
}

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

.btn.primary-btn:hover {
    background-color: #1e3f1e;
}

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

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

/* 标题样式 */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
    position: relative;
}

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

/* 导航栏样式：固定在视口顶部。相对视口（而非可变的内容区）定位，
   保证所有页面无论长短、有无滚动条，页眉位置完全一致。 */
.navbar {
    background-color: white;
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

/* 移动端汉堡按钮：桌面端默认隐藏，避免占位撑高页眉（窄屏由 responsive.css 显示） */
.mobile-menu-toggle {
    display: none;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

.logo span {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-menu ul {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 20px;
}

.nav-menu a {
    font-size: 16px;
    font-weight: 500;
    color: var(--dark-color);
    padding: 5px 10px;
    border-radius: 4px;
    transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
    background-color: rgba(44, 95, 45, 0.1);
}

/* 购物车样式 */
.cart-link {
    position: relative;
}

.cart-icon {
    font-size: 1.2rem;
}

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

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

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.footer-logo {
    text-align: center;
    margin-bottom: 20px;
}

.footer-logo img {
    height: 50px;
    margin-bottom: 10px;
}

.footer-logo h3 {
    color: white;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.link-group {
    flex: 1;
    min-width: 200px;
}

.link-group h4 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-size: 19px;
}

.link-group ul {
    list-style: none;
}

.link-group li {
    margin-bottom: 8px;
}

.link-group a {
    color: #ccc;
    transition: var(--transition);
}

.link-group a:hover {
    color: white;
    padding-left: 5px;
}

.footer-contact p {
    margin-bottom: 8px;
    color: #ccc;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #555;
    font-size: 14px;
}

.footer-bottom p {
    margin-bottom: 10px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-links a {
    color: #ccc;
    font-weight: bold;
}

.social-links a:hover {
    color: white;
}

/* 旧版响应式设计已被移动到 responsive.css 文件中 */
/* 此处保留少量全局通用响应式调整，其他详细调整请参考 responsive.css */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

/* 辅助工具类 */
.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-30 {
    margin-bottom: 30px;
}

.mb-40 {
    margin-bottom: 40px;
}

.mt-20 {
    margin-top: 20px;
}

.mt-30 {
    margin-top: 30px;
}

.mt-40 {
    margin-top: 40px;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 卡片样式 */
.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

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

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(44, 95, 45, 0.2);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}
/* 导航 LOGO 旁宣传语 */
.logo .slogan {
    font-size: 12px;
    color: #7f8c8d;
    margin-left: 10px;
    white-space: nowrap;
    letter-spacing: 1px;
}

/* 页脚 LOGO 下宣传语 */
.footer-logo .tagline {
    color: #c9d6c9;
    font-size: 13px;
    margin: 6px 0 0;
    letter-spacing: 1px;
}
