/* --- 基础重置 --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== 全局容器 ===== */
/* 固定导航条 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 90px;
    background: #fff;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.nav-container {
    max-width: calc(100% / 15 * 11);
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
}

/* 主要内容区（避开固定导航条） */
.main-content {
    margin-top: 100px;  /* 导航条高度 90px + 10px 缓冲 */
    width: 100%;
}

.section-container {
    max-width: calc(100% / 15 * 11);
    margin: 0 auto;
    padding: 0;
}

/* 页脚 */
.footer {
    width: 100%;
    background: #000000;
    padding: 0 0 40px 0;
}

.footer-container {
    max-width: calc(100% / 15 * 11);
    margin: 0 auto;
    padding: 0;
}

/* 定义字体源 - 修正版 */
@font-face {
    font-family: 'PingFang';
    src: url('../font/PingFang-ExtraLight-2.ttf') format('truetype');
    font-weight: 200;
    /* ExtraLight 对应较轻的字重 */
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PingFang';
    src: url('../font/PingFang-Heavy-2.ttf') format('truetype');
    font-weight: bold;
    /* Heavy 对应粗体 */
    font-style: normal;
    font-display: swap;
}

body {
    font-family: 'PingFang', "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
    font-family: 'PingFang', "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    /* 让字体在 Mac/iOS 上更丝滑 */
    background-color: #fff;
    color: #000;
    font-family: "PingFang", serif;
    overflow-y: auto;
    height: auto;
    line-height: 1.6;
    padding-top: 10px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}
.logo-wrapper{
    height: 30px;
    width: auto;
}
/* 关键：内页图标初始为黑色 */
.invert-target {
    filter: invert(1);
    transition: filter 0.4s ease;
}

/* --- 顶部导航条 (100% 宽背景，80% 内容) --- */
/* --- 动态深色页头逻辑 --- */

/* 当 body 带有 .dark-theme 类时，改变页头的表现 */
body.dark-theme .navbar {
    background-color: #000;
    /* 背景变黑 */
}

/* 强制该模式下的文字和图标颜色 */
body.dark-theme .nav-links a,
body.dark-theme .divider {
    color: #fff !important;
}

/* 关键：让图标从黑色反转回白色 */
body.dark-theme .invert-target {
    filter: invert(0) !important;
    /* 首页或内页默认反转了，这里强制回位成白色原始图 */
}

/* 处理滚动时的透明度 */
body.dark-theme .scrolled {
    background-color: rgba(0, 0, 0, 0.5) !important;
    /* 关键：0.7 的透明度 */
    backdrop-filter: blur(5px);
    /* 毛玻璃模糊程度 */
    -webkit-backdrop-filter: blur(15px);
    /* 兼容 Safari 浏览器 */
}

/* 当处于深色主题页面时，下拉菜单也变黑 */
body.dark-theme .mega-menu {
    background-color: #000 !important;
}

/* 下拉菜单内的文字颜色 */
body.dark-theme .mega-menu a,
body.dark-theme .mega-menu h4,
body.dark-theme .mega-menu li {
    color: #fff !important;
}

/* 下拉菜单内的分割线或装饰 */
body.dark-theme .mega-menu .menu-divider {
    background-color: #111;
}

/* 鼠标悬停在选项上时的效果 */
body.dark-theme .mega-menu a:hover {
    color: #bbb !important;
    /* 悬停时稍微变暗一点，增加交互感 */
}
#mainNavbar{
    width: 100%;
}
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 1000;
    transition: background 0.4s;
    /* background: transparent; */
    background-color: #fff;
}

.navbar.menu-open {
    background: #fff;
    border-bottom: 1px solid #eee;
}

/* 内页菜单打开时图标颜色切换 */
.navbar.menu-open .invert-target {
    filter: invert(1);
}

.nav-inner {

    /* width: 80%; */
    height: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 修复 icon 间距：使用 gap 是最稳妥的 */
.icon-group {
    display: flex !important;
    /* 强制 flex 布局 */
    gap: 20px !important;
    /* 强制 20px 间距 */
    align-items: center;
}

/* 搜索覆盖层基础样式 */
.search-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    /* 默认隐藏 */
    background: #fff;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 1100;
    display: flex;
    align-items: center;
}

/* 深色模式下的搜索栏 */
body.dark-theme .search-overlay {
    background: #111;
}

/* 激活状态 */
.search-overlay.active {
    height: 80px;
    /* 与导航栏同高 */
}

.search-inner {
    width: 80%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 10px 0;
}

.search-inner form {
    flex: 1;
    display: flex;
    align-items: center;
}

.search-inner form input {
    flex: 1;
}

.search-inner form button {
    margin-left: 10px;
}

.search-close {
    margin-left: 15px;
    margin-right: 10px;
}

#searchInput {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-size: 18px;
    letter-spacing: 2px;
    color: #000;
    font-family: "Optima", serif;
}

body.dark-theme #searchInput {
    color: #fff;
}

.search-close {
    cursor: pointer;
    padding: 10px;
    font-size: 20px;
    color: #999;
}

.nav-left {
    flex: 0 0 40%;
    display: flex;
    align-items: center;
}

.nav-center {
    flex: 0 0 20%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-right {
    flex: 0 0 40%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
}

/* 导航链接下划线 */
.nav-links {
    display: flex;
    gap: 25px;
    margin-left: 20px;
}

.nav-links a {
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1.5px;
    background: currentColor;
    transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active-link::after {
    width: 100%;
}

.nav-img {
    height: 30px;
    width: auto;
}

.brand-img {
    height: 10px;
    width: auto;
}

.divider {
    margin: 0 15px;
    color: rgb(0, 0, 0);
}

.menu-open .divider {
    color: rgba(0, 0, 0, 0.1);
}

/* 导航图标尺寸 */
.nav-icon {
    width: 20px;
    height: 20px;
    display: block;
}

/* 悬停效果（可选） */
.icon-group a:hover .nav-icon {
    opacity: 0.8;
}



/* --- Mega Menu (100% 全宽下拉) --- */
.mega-menu {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    height: 0;
    background: #fff;
    overflow: hidden;
    transition: height 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}

.menu-open .mega-menu {
    height: 480px;
    border-top: 1px solid #f0f0f0;
}

.mega-container {
    width: 80%;
    margin: 0 auto;
    display: flex;
    padding: 60px 0;
    color: #000;
}

.mega-sidebar {
    flex: 0 0 250px;
}

.mega-sidebar ul {
    list-style: none;
}

.mega-sidebar li {
    margin-bottom: 15px;
}

/* 修复侧边栏悬停效果 */
.mega-sidebar a {
    display: block;
    padding: 5px 0;
    color: #999;
    font-size: 13px;
    transition: all 0.3s ease;
}

.mega-sidebar a:hover {
    color: #000;
    transform: translateX(10px);
    /* 悬停时向右滑动 */
}

.mega-content {
    flex: 1;
    display: flex;
    gap: 20px;
}

.watch-item {
    flex: 1;
    text-align: center;
}

.watch-item .img-zoom-wrapper {
    width: 100%;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.watch-item img {
    width: 70%;
    height: auto;
    object-fit: contain;
    transition: 0.6s;
}

.watch-item:hover img {
    transform: scale(1.1);
}

.watch-item span {
    display: block;
    margin-top: 15px;
    font-size: 10px;
    color: #7b7b7b;
}

/* --- Watches Dropdown Menu --- */
.dropdown-menu {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    height: 0;
    background: #fff;
    overflow: hidden;
    transition: height 0.5s cubic-bezier(0.65, 0, 0.35, 1);
    z-index: 999;
}

.dropdown-menu .mega-container {
    width: 80%;
    margin: 0 auto;
    display: flex;
    padding: 40px 0;
    color: #000;
}

.menu-open .dropdown-menu {
    height: 400px;
    /* border-top: 1px solid #f0f0f0; */
}

/* 移动端logo链接样式 */
.mobile-logo-link {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0;
    margin: 0;
}

.mobile-logo-link img {
    display: block;
}

.dropdown-menu .dropdown-left {
    flex: 0 0 250px;
}

.dropdown-menu .dropdown-left ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown-menu .dropdown-left li {
    margin-bottom: 15px;
}

.dropdown-menu .dropdown-left a {
    display: block;
    padding: 5px 0;
    color: #999;
    font-size: 13px;
    transition: all 0.3s ease;
}

.dropdown-menu .dropdown-left a:hover {
    color: #000;
    transform: translateX(10px);
}

.dropdown-menu .dropdown-right {
    flex: 1;
}

.dropdown-menu .dropdown-right h4 {
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: normal;
    color: #333;
}

.dropdown-menu .recommend-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.dropdown-menu .recommend-item {
    position: relative;
    aspect-ratio: 6 / 9;
    max-height: 360px;
    overflow: hidden;
}

.dropdown-menu .recommend-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.dropdown-menu .recommend-item:hover img {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .dropdown-menu .recommend-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 深色主题下的下拉菜单 */
body.dark-theme .dropdown-menu {
    background-color: #000 !important;
}

body.dark-theme .dropdown-menu a,
body.dark-theme .dropdown-menu h4,
body.dark-theme .dropdown-menu span {
    color: #fff !important;
}

body.dark-theme .dropdown-menu .recommend-item .price {
    color: #fff !important;
}

/* 默认隐藏移动端 */
.mobile-nav-wrapper {
    display: none;
}

/* 移动端导航样式 */
/* 默认显示桌面端，隐藏移动端 */
.desktop-nav {
    display: flex;
}
.mobile-header {
    display: none;
}

@media (max-width: 768px) {
    /* 隐藏桌面端 */
    .desktop-nav-wrapper {
        display: none !important;
    }
    
    /* 确保其他桌面端元素也被隐藏 */
    .nav-center,
    .nav-right {
        display: none !important;
    }
    
    /* 显示移动端 */
    .mobile-nav-wrapper {
        display: block;
        width: 100%;
    }
    
    .mobile-header {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 10px 15px;
        background: rgba(0, 0, 0, 0.9);
        backdrop-filter: blur(5px);
        position: sticky;
        top: 0;
        z-index: 100;
        width: 100%;
        min-height: 60px;
    }
    
    .hamburger {
        position: absolute;
        left: 15px;
        font-size: 24px;
        background: none;
        border: none;
        color: #fff;
        cursor: pointer;
        padding: 5px;
    }
    
    /* 确保移动端logo显示正确 */
    .mobile-header .invert-target {
        filter: invert(0) !important;
    }
    
    .mobile-menu {
        position: absolute;
        top: 60px;
        left: 0;
        width: 250px;
        background: rgba(0, 0, 0, 0.9);
        backdrop-filter: blur(5px);
        border-radius: 0 0 10px 0;
        z-index: 99;
    }
    
    .mobile-menu.hidden {
        display: none;
    }
    
    .mobile-menu-item {
        display: flex;
        align-items: center;
        padding: 15px 20px;
        color: #fff;
        text-decoration: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        transition: background 0.3s;
    }
    
    .mobile-menu-item i {
        width: 30px;
        font-size: 18px;
        margin-right: 15px;
    }
    
    .mobile-menu-item:hover {
        background: rgba(255, 255, 255, 0.1);
    }
    
    /* 搜索浮层样式 */
    .mobile-search-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(5px);
        z-index: 2000;
        display: flex;
        flex-direction: column;
    }

    .mobile-search-overlay.hidden {
        display: none;
    }

    .search-header {
        display: flex;
        align-items: center;
        padding: 15px;
        background: rgba(255, 255, 255, 0.1);
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    .close-search {
        width: 40px;
        height: 40px;
        background: none;
        border: none;
        color: #fff;
        font-size: 20px;
        cursor: pointer;
        margin-right: 10px;
    }

    .search-form {
        flex: 1;
        display: flex;
        align-items: center;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 8px;
        padding: 0 10px;
    }

    .search-form input {
        flex: 1;
        height: 40px;
        background: none;
        border: none;
        color: #fff;
        font-size: 16px;
        padding: 0 5px;
    }

    .search-form input::placeholder {
        color: rgba(255, 255, 255, 0.6);
    }

    .search-form button {
        width: 40px;
        height: 40px;
        background: none;
        border: none;
        color: #fff;
        font-size: 18px;
        cursor: pointer;
    }
}

/* --- 通用页脚 Footer (完整备份版) --- */
.site-footer {
    background: #000;
    color: #fff;
    padding: 60px 0 30px;
    width: 100%;
    margin-top: 60px;
}

.footer-top-brand {
    text-align: center;
    font-size: 18px;
    letter-spacing: 4px;
    padding-bottom: 40px;
    border-bottom: 1px solid #333;
    margin-bottom: 60px;
}

.footer-inner {
    width: 85%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
}

.footer-brand-icon {
    width: 60px;
    height: auto;
}

.footer-links-container {
    display: flex;
    gap: 60px;
}

.footer-col h4 {
    font-size: 11px;
    letter-spacing: 1.5px;
    margin-bottom: 25px;
    font-weight: normal;
}

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

.footer-col li {
    margin-bottom: 12px;
}

.footer-col a {
    font-size: 10px;
    color: #888;
}

.footer-col a:hover {
    color: #fff;
}

.footer-legal {
    width: 85%;
    margin: 60px auto 0;
    padding-top: 30px;
    display: flex;
    justify-content: center;
    gap: 30px;
    border-top: 1px solid #222;
}

.footer-legal a {
    font-size: 10px;
    color: #555;
}


/* --- 移动端页头与菜单终极修复 (类名对齐版) --- */


/* 移动端页脚响应式控制 */
@media (max-width: 768px) {
    .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }
    
    .footer-links-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .footer-legal {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .site-footer {
        padding: 40px 0 20px;
        margin-top: 40px;
    }
    
    .footer-top-brand {
        padding-bottom: 30px;
        margin-bottom: 40px;
    }
}

/* 文章页面折叠/展开样式 */
.article-full-content {
    display: none;
    margin-top: 30px;
}

.article-item.expanded {
    flex-direction: column;
    align-items: center;
}

.article-item.expanded .article-info {
    flex: 0 0 100%;
    padding-right: 0;
    text-align: center;
}

.article-item.expanded .article-desc {
    display: none;
}

.article-item.expanded .article-media {
    display: none;
}

.article-item.expanded .article-full-content {
    display: block;
    width: 100%;
    margin-top: 30px;
}

.article-item.expanded .article-title {
            text-align: center;
        }

/* 产品详情页样式 */
.product-specs {
    width: 100%;
    margin: 30px 0;
    padding: 20px;
    background: rgb(249, 249, 249,0);
    border-radius: 8px;
}

.product-specs h3 {
    margin-bottom: 15px;
    font-size: 18px;
    color: #ffffff;
}

.specs-table {
    width: 100%;
}

.specs-table th {
    width: 30%;
    padding: 10px;
    text-align: left;
    font-weight: 600;
}

.specs-table td {
    width: 70%;
    padding: 10px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .specs-table {
        display: block;
        overflow-x: auto;
    }
}



/* 会员地址编辑页面样式 */
/* 全局样式 */
.address-container {
    max-width: 600px;
    margin: 120px auto 60px;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 标题 */
.address-container h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

/* 会员选项卡 */
.member-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.member-tabs a {
    padding: 10px 20px;
    text-decoration: none;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.member-tabs a:hover {
    color: #2196f3;
}

.member-tabs a.active {
    color: #2196f3;
    border-bottom-color: #2196f3;
}

/* 消息提示 */
.message {
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.message.error {
    background-color: #ffebee;
    color: #c62828;
}

.message.success {
    background-color: #e8f5e8;
    color: #2e7d32;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* 复选框 */
.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    width: auto;
}

/* 按钮 */
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: #2196f3;
    color: white;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn:hover {
    opacity: 0.8;
}

/* 表单说明 */
.form-note {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* 会员地址列表页面样式 */
/* 地址列表 */
.address-list {
    margin-bottom: 30px;
}

.address-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    position: relative;
}

.address-card.default {
    border-color: #2196f3;
    background-color: #f0f7ff;
}

.default-label {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #2196f3;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.address-info {
    margin-bottom: 15px;
}

.address-info h3 {
    margin-bottom: 5px;
    color: #2c3e50;
}

.address-details {
    color: #666;
    line-height: 1.5;
}

/* 操作按钮 */
.address-actions {
    display: flex;
    gap: 10px;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

/* 新增地址按钮 */
.add-address-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

.add-address-btn:hover {
    background-color: #218838;
}

/* 空地址提示 */
.empty-address {
    text-align: center;
    padding: 40px 0;
    color: #666;
}

/* 会员中心页面样式 */
/* 账户信息卡片 */
.account-card {
    background-color: #f0f7ff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #2196f3;
}

.account-card h2 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 20px;
}

.info-item {
    margin-bottom: 10px;
}

.info-label {
    font-weight: bold;
    color: #555;
}

/* 开发中提示 */
.under-development {
    background-color: #fff3cd;
    color: #856404;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: center;
    font-weight: bold;
    font-size: 18px;
    border: 1px solid #ffeeba;
}

/* 按钮容器 */
.btn-container {
    text-align: center;
}

/* 登录页面样式 */
/* 注册链接 */
.register-link {
    text-align: center;
    margin-top: 20px;
}

.register-link a {
    color: #2196f3;
    text-decoration: none;
}

.register-link a:hover {
    text-decoration: underline;
}

/* ===== 移动端适配 ===== */
/* 移动端：取消 11/15 约束，内容占满 */
@media (max-width: 768px) {
    .nav-container,
    .section-container,
    .footer-container {
        max-width: 100%;
    }
    .nav-container {
        align-items: flex-start;
    }
    .main-content {
        margin-top: 90px;  /* 移动端导航条高度不变 */
    }
    
    /* 首页特殊处理 */
    .home-main-content,
    .home-section-container {
        max-width: 100%;
        padding: 0;
        margin-top: 0;
    }
}