/*
Theme Name: Custom Theme 438
Theme URI: https://example.com/991
Description: Crazy uncle
Author: Studio 39
Author URI: http://www.huitheme.com
Version: 2025.11
*/

/* =========================================================
   全局标准色卡库 (一键换肤)
   ========================================================= */
:root {
    --theme-primary: #ec4899; 
    --theme-primary-hover: #db2777; 
    --theme-primary-light: rgba(249, 115, 22, 0.1); 
    --bg-page: #f5f6f7; 
    --border-light: #e5e5e5;
    --border-dashed: #f0f0f0;
    --text-main: #333333;
    --text-muted: #888888;
}

/* ==========================================
   全站基础重置 & 主题色应用
   ========================================== */
body { background-color: var(--bg-page); color: var(--text-main); font-family: -apple-system, BlinkMacSystemFont, "Microsoft YaHei", Arial, sans-serif; margin: 0; line-height: 1.5; }
.site-container { max-width: 1200px; margin: 0 auto; }
a { text-decoration: none; transition: all 0.2s; color: inherit; }

/* 顶部深色小导航条 */
.top-bar { background-color: #f8f9fa; border-bottom: 1px solid var(--border-light); color: var(--text-muted); font-size: 12px; padding: 6px 0; }
.top-bar .site-container { display: flex; justify-content: space-between; align-items: center; }
.top-bar a { color: var(--text-muted); margin-right: 20px; }
.top-bar a:hover { color: var(--theme-primary); }

/* 中间白底：Logo 与 搜索框 */
.header-mid { background-color: #ffffff; padding: 7px 0; }
.header-mid .site-container { display: flex; justify-content: space-between; align-items: center; }
.logo-area { display: flex; align-items: center; }
.logo-area img { height: 45px; margin-right: 12px; }
.logo-area h1 { font-size: 26px; color: var(--text-main); font-weight: 900; margin: 0; font-style: italic; letter-spacing: -1px; }

/* 搜索框 */
.search-area { width: 480px; }
.search-tabs { display: flex; list-style: none; margin: 0 0 0 2px; padding: 0; }
.search-tabs li { padding: 4px 16px; font-size: 13px; color: #666; background-color: #f5f5f5; border-radius: 4px 4px 0 0; margin-right: 4px; cursor: pointer; transition: 0.2s; }
.search-tabs li.active { background-color: var(--theme-primary); color: #ffffff; font-weight: bold; }
.search-box { display: flex; border: 2px solid var(--theme-primary); border-radius: 0 4px 4px 4px; height: 40px; overflow: hidden; background: #fff; }
.search-box input { flex: 1; border: none; padding: 0 15px; font-size: 14px; outline: none; }
.search-box button { background-color: var(--theme-primary); border: none; width: 60px; color: white; cursor: pointer; display: flex; justify-content: center; align-items: center; }
.search-box button:hover { background-color: var(--theme-primary-hover); }
.search-box button svg { width: 18px; height: 18px; fill: currentColor; }

/* 第一排主导航 */
.header-nav-bar { background-color: var(--theme-primary); width: 100%; border-bottom: 2px solid var(--theme-primary-hover); }
.header-nav-bar .site-container { display: flex; align-items: center; }
.header-menu-ul { display: flex; list-style: none; margin: 0; padding: 0; }
.header-menu-ul > li { position: relative; }
.header-menu-ul > li > a { display: block; padding: 10px 24px; color: #ffffff; font-size: 16px; font-weight: 700; }
.header-menu-ul > li > a:hover, .header-menu-ul > li.current-menu-item > a { background-color: rgba(0,0,0,0.15); }

/* 下拉菜单 */
.header-menu-ul .sub-menu { display: none; position: absolute; top: 100%; left: 0; background-color: #ffffff; min-width: 130px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); border-top: 2px solid var(--theme-primary); padding: 5px 0; z-index: 999; }
.header-menu-ul li:hover > .sub-menu { display: block; }
.header-menu-ul .sub-menu li { list-style: none; }
.header-menu-ul .sub-menu li a { display: block; padding: 10px 20px; color: var(--text-main); font-size: 14px; border-bottom: 1px solid #f5f5f5; text-align: center;}
.header-menu-ul .sub-menu li a:hover { color: var(--theme-primary); background-color: #fcfaff; font-weight: bold;}

/* 第二排副导航 */
.header-subnav-bar { background-color: #f8f9fa; border-bottom: 1px solid var(--border-light); width: 100%; }
.header-subnav-bar .site-container { display: flex; align-items: center; }
.header-sub-ul { display: flex; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.header-sub-ul > li { position: relative; }
.header-sub-ul > li > a { display: block; padding: 10px 18px; color: #555; font-size: 14px; font-weight: 500; }
.header-sub-ul > li > a:hover, .header-sub-ul > li.current-menu-item > a { color: var(--theme-primary); font-weight: bold; background: #fff; }
.mobile-menu-btn { display: none; background: none; border: none; color: var(--theme-primary); font-size: 32px; padding: 0; cursor: pointer; }

/* 手机端完美自适应 */
/* 手机端完美自适应 */
@media (max-width: 768px) {
    .top-bar, .search-area, .header-nav-bar { display: none; }
    .header-mid { padding: 15px 0; border-bottom: 1px solid #eee;}
    .logo-area { padding-left: 15px !important; }
    .mobile-menu-btn { display: block; }
    .header-subnav-bar { background: #fff; padding: 8px 0; border-bottom: none; box-shadow: 0 2px 4px rgba(0,0,0,0.02);}
    .header-subnav-bar .site-container { padding: 0 10px; }
.header-subnav-bar { 
    overflow: hidden; /* 锁死父级容器，防止意外被撑破导致页面可左右晃动 */
}
.header-sub-ul { 
    flex-wrap: nowrap; 
    overflow-x: auto; 
    padding-bottom: 2px; 
    gap: 8px; 
    align-items: center; 
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain; /* 💡核心修复：阻止横向滑动的事件冒泡到页面本身 */
}
    .header-sub-ul::-webkit-scrollbar { display: none; }
    .header-sub-ul > li { flex-shrink: 0; }
    .header-sub-ul > li > a { padding: 4px 12px; font-size: 14px; border-radius: 20px; color: #555; display: inline-block; background: transparent; font-weight: normal;}
    .header-sub-ul > li.current-menu-item > a, .header-sub-ul > li.is-pill > a { background-color: var(--theme-primary) !important; color: #fff !important; font-weight: bold; border-color: var(--theme-primary); }
}
.banner-section { margin-top: 15px; }
.banner-section img { width: 100%; border-radius: 6px; display: block; }

/* 完美复刻竞品页脚 UI */
.custom-site-footer { background-color: #31445b; color: #ffffff; padding: 40px 0; margin-top: 30px; text-align: center; border-top: 2px solid #1d2a3a;}
.footer-links-row { display: flex; justify-content: center; align-items: center; margin-bottom: 20px; font-size: 15px; }
.links-label { color: #fff; margin-right: 15px; font-weight: normal; }
.links-grid { display: flex; gap: 20px; }
.links-grid a { color: var(--theme-primary); text-decoration: none; font-weight: normal; transition: color 0.2s;}
.links-grid a:hover { text-decoration: underline; }
.footer-disclaimer { font-size: 13px; color: #a0acbc; margin-bottom: 15px; line-height: 1.8; max-width: 900px; margin-left: auto; margin-right: auto; }
.footer-copyright { font-size: 13px; color: #a0acbc; }
@media (max-width: 768px) {
    .custom-site-footer { padding: 30px 15px; }
    .footer-links-row { flex-direction: column; align-items: center; margin-bottom: 25px; }
    .links-label { margin-bottom: 12px; margin-right: 0; font-size: 16px; font-weight: bold;}
    .links-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 30px; width: 100%; max-width: 260px; margin: 0 auto;}
    .links-grid a { text-align: center; display: block; background: rgba(0,0,0,0.15); padding: 8px 0; border-radius: 4px;}
}


/* ==========================================
   移动端侧滑菜单 (精致网格 + 可滑动修复版)
   ========================================== */
/* 1. 将整个侧边栏设为弹性容器，高度占满屏幕 */
#mobile_right_nav { background-color: #f5f6f7 !important; border-left: none !important; display: flex; flex-direction: column; height: 100%; }

/* 2. 固定头部标题，不参与滑动 */
#mobile_right_nav > .p-4:nth-child(1) { flex-shrink: 0; }

/* 3. 核心修复：让菜单区域自动占满剩余空间，并开启垂直滑动！ */
#mobile_right_nav > .p-4:nth-child(2) { 
    flex: 1; 
    overflow-y: auto; 
    -webkit-overflow-scrolling: touch; /* 开启苹果手机丝滑滚动 */
    padding: 12px 15px 40px !important; /* 底部多留点白，防误触 */
}

/* 4. 一级菜单作为标题区块（整体缩小留白和字号，变得精致） */
#sjcldnav > ul { list-style: none; padding: 0; margin: 0; }
#sjcldnav > ul > li { background: #fff; padding: 12px; margin-bottom: 10px; border-radius: 6px; box-shadow: 0 1px 4px rgba(0,0,0,0.03); }
#sjcldnav > ul > li > a { display: block; font-size: 14px; font-weight: bold; color: #333; margin-bottom: 12px; border-left: 3px solid var(--theme-primary); padding-left: 8px; line-height: 1.1;}

/* 5. 二级菜单转为 2 列网格按钮（调小字体，按钮变得紧凑小巧） */
#sjcldnav > ul > li > ul.sub-menu { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
#sjcldnav > ul > li > ul.sub-menu > li > a { display: block; text-align: center; padding: 7px 4px; background: #f9f9fa; border: 1px solid #eaeaea; border-radius: 4px; font-size: 12px; color: #666; transition: 0.2s; }

/* 选中/悬停状态，保持主题色搭配 */
#sjcldnav > ul > li > ul.sub-menu > li > a:hover,
#sjcldnav > ul > li > ul.sub-menu > li.current-menu-item > a { border-color: var(--theme-primary); color: var(--theme-primary); background: #fffaf7; font-weight: bold;}

/* 隐藏可能存在的更深层级，防止乱排 */
#sjcldnav > ul > li > ul.sub-menu > li > ul { display: none; }