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

/* 使用rem进行响应式设计 */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 12px;
    }
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #fff;
    background-color: #0d0d0d; /* 更暗的背景颜色 */
    overflow-x: hidden;
}

.container {
    width: 75rem;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* 滚动显示动画 */
.reveal-section {
    opacity: 0;
    transform: translateY(3.125rem);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-section.active {
    opacity: 1;
    transform: translateY(0);
}

/* 移动端菜单按钮样式 */
.mobile-menu-toggle {
    display: none;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 999;
}

/* 头部导航样式 */
.header {
    background-color: transparent;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    padding: 1.25rem 0;
}

.header.scrolled {
    background-color: rgba(26, 26, 26, 0.98);
    box-shadow: 0 0.125rem 0.625rem rgba(0, 0, 0, 0.3);
    padding: 0.625rem 0;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo img {
    max-height: 3.125rem;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

.main-nav {
    display: flex;
    align-items: center;
}

.main-nav > ul {
    list-style: none;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin: 0;
    padding: 0;
}

.main-nav > ul > li {
    position: relative;
    margin-left: 40px;
    transition: transform 0.3s ease;
}

.main-nav > ul > li:hover {
    transform: translateY(-2px);
}

.main-nav > ul > li > a {
    text-decoration: none;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
    padding: 8px 15px;
    border-radius: 4px;
    display: inline-block;
    position: relative;
}

.main-nav > ul > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #8c6e4a;
    transition: width 0.3s ease;
}

.main-nav > ul > li:hover > a {
    color: #fff;
    background-color: rgba(140, 110, 74, 0.8);
    box-shadow: 0 4px 15px rgba(140, 110, 74, 0.3);
}

.main-nav > ul > li:hover > a::after {
    width: 100%;
}

.main-nav .active > a {
    color: #fff;
    background-color: rgba(140, 110, 74, 0.8);
    box-shadow: 0 4px 15px rgba(140, 110, 74, 0.3);
}

/* 下拉菜单 */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 94px;
    min-width: 94px;
    background-color: rgba(26, 26, 26, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    border-radius: 4px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.main-nav > ul > li:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
    padding: 0;
}

.dropdown-menu li a {
    font-size: 14px;
    display: block;
    padding: 12px 15px;
    color: #ccc;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    text-decoration: none;
}

.dropdown-menu li a:hover {
    background-color: rgba(140, 110, 74, 0.2);
    color: #fff;
    border-left-color: #8c6e4a;
    padding-left: 20px;
}

/* 防伪查询样式 */
.anti-counterfeit {
    position: relative;
}

.anti-counterfeit:hover .qrcode-hover {
    display: block;
}

.qrcode-hover {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    background-color: #fff;
    padding: 5px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 999;
    display: none;
    margin-top: 5px;
}

.qrcode-hover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 页脚样式 */
.footer {
    background-color: #0d0d0d;
    color: #fff;
    padding: 3.75rem 0 1.25rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    max-width: 75rem;
    margin: 0 auto;
    padding: 0 1.25rem;
    margin-bottom: 1.25rem;
    padding-bottom: 2.5rem;
}

/* 设置footer-column宽度比例 */
.footer-column {
    padding: 0 0.9375rem;
}

.footer-column:first-child, .footer-column:nth-child(2) {
    flex: 0 0 25%;
    max-width: 25%;
}

.footer-column.footer-contact {
    flex: 0 0 50%;
    max-width: 50%;
}

.footer-column h3 {
    font-size: 1.125rem;
    color: #8c6e4a;
    margin-bottom: 1.5625rem;
    position: relative;
    padding-bottom: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.footer-column h3:hover {
    color: #fff;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 2.5rem;
    height: 0.125rem;
    background-color: #8c6e4a;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 0.75rem;
    transition: transform 0.3s ease;
}

.footer-column li:hover {
    transform: translateX(0.3125rem);
}

.footer-column a {
    text-decoration: none;
    color: #aaa;
    transition: color 0.3s ease;
    display: inline-block;
    position: relative;
}

.footer-column a:hover {
    color: #8c6e4a;
}

.footer-column a::after {
    content: '';
    position: absolute;
    bottom: -0.125rem;
    left: 0;
    width: 0;
    height: 0.0625rem;
    background-color: #8c6e4a;
    transition: width 0.3s ease;
}

.footer-column a:hover::after {
    width: 100%;
}

/* 页脚下拉菜单样式 - 明确的footer标记 */
.footer-dropdown {
    position: relative;
}

.footer-dropdown h3 {
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-dropdown h3:hover {
    color: #fff;
}

.footer-arrow {
    transition: transform 0.3s ease;
    display: inline-block;
}

.footer-dropdown.active .footer-arrow {
    transform: rotate(180deg);
}

/* 关键：修复footer-dropdown-menu的可见性和定位，并与footer-column样式保持一致 */
.footer-dropdown-menu {
    /* position: absolute;
    top: 100%;
    left: 0;
    background-color: #0a0a0a;
    border: 1px solid #333;
    border-radius: 0.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    padding: 0.9375rem;
    z-index: 100;
    min-width: 12.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.625rem);
    transition: all 0.3s ease; */
}

.footer-dropdown-menu li {
    margin-bottom: 0.75rem;
    transition: transform 0.3s ease;
}

.footer-dropdown-menu li:last-child {
    margin-bottom: 0;
}

.footer-dropdown-menu li:hover {
    transform: translateX(0.3125rem);
}

.footer-dropdown-menu li a {
    /* text-decoration: none;
    color: #aaa;
    transition: color 0.3s ease;
    display: inline-block;
    position: relative;
    font-size: 0.875rem; */
}

.footer-dropdown-menu li a:hover {
    color: #8c6e4a;
}

.footer-dropdown-menu li a::after {
    content: '';
    position: absolute;
    bottom: -0.125rem;
    left: 0;
    width: 0;
    height: 0.0625rem;
    background-color: #8c6e4a;
    transition: width 0.3s ease;
}

.footer-dropdown-menu li a:hover::after {
    width: 100%;
}

.footer-dropdown-menu li.active a {
    color: #8c6e4a;
}

.footer-dropdown.active .footer-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 页脚分隔线样式 - 宽度设为100% */
.footer-divider {
    width: 100%;
    height: 1px;
    background-color: #333;
    margin: 1rem 0;
}

/* 横向排列的联系方式样式 */
.contact-info-horizontal {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-item-horizontal {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.75rem;
    border-radius: 0.5rem;
    flex: 1;
    max-width: 150px;
    min-width: 120px;
}

.contact-item-horizontal:hover {
    background-color: rgba(140, 110, 74, 0.1);
    transform: translateY(-0.25rem);
}

.contact-item-horizontal .qrcode {
    width: 8rem;
    height: 8rem;
    background-color: #fff;
    border-radius: 0.5rem;
    padding: 0.5rem;
    margin-bottom: 0.875rem;
    transition: transform 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.contact-item-horizontal:hover .qrcode {
    transform: scale(1.05);
}

.contact-item-horizontal .qrcode-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.contact-item-horizontal span {
    color: #fff;
    font-size: 1rem;
    text-align: center;
    transition: color 0.3s ease;
}

.contact-item-horizontal:hover span {
    color: #8c6e4a;
}

/* 页脚备案号新样式 */
.footer-bottom {
    text-align: center;
    /* padding-top: 1.25rem; */
}

.footer-bottom p {
    color: #666;
    font-size: 0.875rem;
    margin: 0.5rem 0;
    line-height: 1.5;
}

.footer-bottom p:nth-child(3) {
    color: #8c6e4a;
    font-size: 1rem;
    font-weight: 500;
    margin: 1rem 0 0.5rem;
}

.footer-bottom p:nth-child(4) {
    font-size: 0.8125rem;
    color: #555;
}

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

::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #8c6e4a;
    border-radius: 4px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: #d4b171;
}

::-webkit-scrollbar-corner {
    background: #1a1a1a;
}

/* 返回顶部按钮样式 */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background-color: #8c6e4a;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(140, 110, 74, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.back-to-top:hover {
    background-color: #6a5337;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(140, 110, 74, 0.5);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 移动菜单按钮样式 */
.mobile-menu-toggle {
    display: none;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1000;
    transition: color 0.3s ease;
}

.mobile-menu-toggle:hover {
    color: #8c6e4a;
}

/* 手机端专用导航菜单样式 */
.mobile-nav-container {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 50%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
}

.mobile-nav-container.open {
    display: block;
    opacity: 1;
    visibility: visible;
}

.mobile-nav {
    width: 100%;
    height: 100%;
    padding: 60px 15px 20px;
    overflow-y: auto;
    box-sizing: border-box;
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav > ul > li {
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav > ul > li > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 10px;
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.mobile-nav > ul > li > a:hover {
    color: #8c6e4a;
}

.mobile-nav > ul > li.active > a {
    color: #8c6e4a;
}

/* 手机端下拉菜单样式 */
.mobile-dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: rgba(26, 26, 26, 0.5);
}

.mobile-dropdown.active .mobile-dropdown-menu {
    max-height: 500px;
}

.mobile-dropdown-menu li {
    margin-bottom: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.mobile-dropdown-menu li:last-child {
    border-bottom: none !important;
}

.mobile-dropdown-menu li a {
    display: block;
    padding: 12px 30px;
    color: #ddd;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.mobile-dropdown-menu li a:hover {
    color: #8c6e4a;
}

.mobile-dropdown-menu li.active a {
    color: #8c6e4a;
}

/* 手机端防伪查询二维码 */
.mobile-anti-counterfeit {
    position: relative;
}

.mobile-qrcode-hover {
    position: absolute;
    top: 100%;
    left: 0;
    width: 120px;
    height: 120px;
    background-color: #fff;
    padding: 5px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: none;
}

.mobile-anti-counterfeit:hover .mobile-qrcode-hover {
    display: block;
}

.mobile-qrcode-hover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 移动端响应式 */
@media (max-width: 992px) {
    /* 隐藏PC端导航 */
    .main-nav {
        display: none;
    }
    
    /* 保留移动菜单按钮 */
    .mobile-menu-toggle {
        display: block;
    }
}

/* 响应式设计 - 移动设备菜单 */
@media (max-width: 992px) {
    /* 显示移动菜单按钮 */
    .mobile-menu-toggle {
        display: block;
    }
    
    /* 默认隐藏导航菜单 */
    .main-nav {
        position: fixed;
        top: 0;
        right: -300px;
        width: 280px;
        height: 100vh;
        background-color: rgba(13, 13, 13, 0.98);
        z-index: 999;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 3rem 1.5rem 2rem;
        transition: right 0.3s ease;
        overflow-y: auto;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
    }
    
    /* 导航菜单激活状态 - 显示 */
    .main-nav.active {
        right: 0;
    }
    
    /* 移动菜单列表样式 */
    .main-nav > ul {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    
    .main-nav > ul > li {
        margin: 0 0 1rem 0;
        width: 100%;
    }
    
    .main-nav > ul > li > a {
        width: 100%;
        padding: 12px 15px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    /* 下拉菜单样式调整 */
    .dropdown-menu {
        position: static !important;
        width: 100% !important;
        min-width: auto !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        background-color: rgba(26, 26, 26, 0.8) !important;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .dropdown.active .dropdown-menu {
        max-height: 300px;
    }
    
    /* 下拉菜单项样式 */
    .main-nav .dropdown-menu li {
        margin-bottom: 0.5rem;
    }
    
    .main-nav .dropdown-menu li a {
        color: #ddd;
        font-size: 0.9rem;
        padding: 0.5rem 0;
    }
    
    /* 额外的响应式样式 */
    .header .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    /* 防止其他样式覆盖 */
    body.menu-open {
        overflow: hidden;
    }
    
    .contact-info-horizontal {
        justify-content: center;
        gap: 1.5rem;
    }
    
    .contact-item-horizontal {
        flex: 1;
        max-width: 120px;
        min-width: 100px;
    }
    
    .contact-item-horizontal .qrcode {
        width: 6rem;
        height: 6rem;
    }
    
    .contact-item-horizontal span {
        font-size: 0.875rem;
    }
    
    .footer-column.dropdown .dropdown-menu {
        position: static;
        width: 100%;
        background-color: transparent;
        box-shadow: none;
        border: none;
        margin-top: 0.5rem;
        max-height: 0;
        overflow: hidden;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: max-height 0.3s ease;
    }
    
    .footer-column.dropdown.active .dropdown-menu {
        max-height: 300px;
    }
    
    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.25rem;
    }
}