/* ========== common.css - 页头页尾一体化样式（主色调 #df3031） ========== */

/* ----- 重置与基础 ----- */
* {
    box-sizing: border-box;
}
body, div, span, h1, h2, h3, h4, h5, h6, p, ul, li, a, img, header, footer, nav, section {
    margin: 0;
    padding: 0;
    border: 0;
    font: inherit;
    vertical-align: baseline;
}
body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    color: #333;
    background: #fff;
}
ul, ol {
    list-style: none;
}
a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}
a:hover {
    color: #df3031;
}
img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}
.clearfix::after {
    content: "";
    display: block;
    clear: both;
}
.container-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}
.line {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}
/* 栅格系统（简化版，仅保留 x1~x12） */
.x1, .x2, .x3, .x4, .x5, .x6, .x7, .x8, .x9, .x10, .x11, .x12 {
    float: left;
    padding: 0 15px;
    min-height: 1px;
}
.x1 { width: 8.333%; }
.x2 { width: 16.666%; }
.x3 { width: 25%; }
.x4 { width: 33.333%; }
.x5 { width: 41.666%; }
.x6 { width: 50%; }
.x7 { width: 58.333%; }
.x8 { width: 66.666%; }
.x9 { width: 75%; }
.x10 { width: 83.333%; }
.x11 { width: 91.666%; }
.x12 { width: 100%; }

/* 辅助类 */
.text-center { text-align: center; }
.text-right { text-align: right; }
.float-left { float: left; }
.float-right { float: right; }
.bg-main { background-color: #df3031 !important; }
.bg-yellow { background-color: #df3031 !important; }
.text-white { color: #fff; }
.text-gray { color: #888; }
.radius-circle { border-radius: 50%; }
.margin-small-left { margin-left: 5px; }
.margin-small-right { margin-right: 5px; }
.margin-big-bottom { margin-bottom: 20px; }
.padding { padding: 10px; }
.hidden-l { display: none; }
.hidden-s { display: none; }

/* ----- 页头 PC 样式 ----- */
#pc-header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    position: relative;
    z-index: 100;
}
#pc-header .navbar {
    padding: 0;
}
#pc-header .logo {
    padding: 15px 0;
}
#pc-header .logo img {
    max-height: 50px;
    width: auto;
}
/* 主导航菜单 */
#pc-header .nav-menu {
    display: flex;
    justify-content: center;
}
#pc-header .nav-menu > li {
    position: relative;
    margin: 0 2px;
}
#pc-header .nav-menu > li > a {
    display: block;
    padding: 0 20px;
    line-height: 80px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    transition: all 0.3s;
}
#pc-header .nav-menu > li.active > a,
#pc-header .nav-menu > li > a:hover {
    color: #df3031;
}
/* 下拉菜单 */
#pc-header .nav-menu li ul {
    position: absolute;
    top: 80px;
    left: 0;
    min-width: 160px;
    background: #fff;
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    border-radius: 0 0 6px 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s;
    z-index: 999;
    padding: 5px 0;
}
#pc-header .nav-menu li:hover ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
#pc-header .nav-menu li ul li a {
    display: block;
    padding: 8px 20px;
    font-size: 14px;
    color: #555;
    white-space: nowrap;
    transition: all 0.2s;
}
#pc-header .nav-menu li ul li a:hover {
    background: #f5f5f5;
    color: #df3031;
}

/* 右侧图标区 */
#pc-header .log-in {
    position: absolute;
    top: 24px;
    right: 100px;
}
#pc-header .shopBar {
    position: absolute;
    top: 24px;
    right: 60px;
}
#pc-header .searchBar {
    position: absolute;
    top: 24px;
    right: 20px;
}
#pc-header .log-in .button-group a,
#pc-header .shopBar a,
#pc-header .searchBar a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #f5f5f5;
    border-radius: 50%;
    color: #666;
    font-size: 18px;
    transition: all 0.3s;
}
#pc-header .log-in .button-group a:hover,
#pc-header .shopBar a:hover,
#pc-header .searchBar a:hover {
    background: #df3031;
    color: #fff;
}
/* 登录后用户头像 */
.log-in a.user-head {
    width: 36px;
    height: 36px;
    overflow: hidden;
    border-radius: 50%;
}
.log-in a.user-head img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* 登录下拉菜单 */
.log-in .drop-menu {
    position: absolute;
    top: 45px;
    right: 0;
    background: #fff;
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    border-radius: 6px;
    padding: 8px 0;
    min-width: 120px;
    display: none;
    z-index: 1000;
}
.log-in .button-group:hover .drop-menu {
    display: block;
}
.log-in .drop-menu li a {
    display: block;
    padding: 8px 20px;
    color: #333;
    font-size: 14px;
    white-space: nowrap;
    background: #fff;
    width: auto;
    height: auto;
    line-height: normal;
    border-radius: 0;
}
.log-in .drop-menu li a:hover {
    background: #f5f5f5;
    color: #df3031;
}

/* ----- 搜索弹窗 ----- */
.searchBar-m {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}
.searchBar-m.active {
    display: block;
}
.searchBar-m .mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
}
.searchBar-m .mask-ico {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    z-index: 10;
}
.searchBar-m .form-group {
    position: absolute;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -35%);
    width: 600px;
    max-width: 90%;
    z-index: 11;
}
.searchBar-m .form-group input {
    width: 100%;
    height: 60px;
    padding: 0 100px 0 25px;
    font-size: 18px;
    border: none;
    border-radius: 40px;
    outline: none;
    background: #fff;
}
.searchBar-m .form-group button {
    position: absolute;
    right: 5px;
    top: 5px;
    width: 90px;
    height: 50px;
    background: #df3031;
    color: #fff;
    border: none;
    border-radius: 40px;
    font-size: 16px;
    cursor: pointer;
}

/* ----- 页脚样式（恢复原有灰黑风格，兼容原 float 栅格） ----- */
footer.bg-main {
    background: #1a1f2b;      /* 保持深灰色背景 */
    color: #aab2c0;
    padding-top: 40px;
}
footer .container-layout {
    overflow: hidden;          /* 清除内部浮动 */
}
footer .container-layout > ul {
    overflow: hidden;
}
footer .float-left {
    float: left;               /* 保持原 float 布局 */
    padding: 0 15px;
    box-sizing: border-box;
}
footer h3 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
}
footer h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 2px;
    background: #df3031;       /* 主色点缀 */
}
footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
footer ul li {
    margin-bottom: 8px;
}
footer ul li a {
    color: #aab2c0;
    font-size: 14px;
    line-height: 1.8;
    transition: color 0.3s;
}
footer ul li a:hover {
    color: #df3031;
}

/* 联系方式区域 */
footer .contact .media {
    display: flex;
    margin-bottom: 20px;
}
footer .contact .media .float-left {
    width: 40px;
    height: 40px;
    line-height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    text-align: center;
    margin-right: 15px;
    color: #df3031;
    font-size: 18px;
    padding: 0;
}
footer .contact .media-body {
    flex: 1;
}
footer .contact .media-body p {
    margin: 0;
    color: #aab2c0;
}
footer .contact .media-body a {
    color: #fff;
    font-size: 20px;
    font-weight: 500;
}

/* 二维码区域 */
footer .qr {
    text-align: center;
}
footer .qr img {
    width: 120px;
    border-radius: 8px;
    border: 3px solid rgba(255,255,255,0.2);
}
footer .qr p {
    margin-top: 8px;
}

/* 友情链接 */
footer .flink {
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin: 20px 0;
}
footer .flink a {
    display: inline-block;
    margin-right: 20px;
    margin-bottom: 10px;
    color: #aab2c0;
}

/* 版权区域 */
footer .copyright {
    padding: 20px 0;
    color: #6c757d;
    font-size: 14px;
    overflow: hidden;
}
footer .copyright .x8,
footer .copyright .x4 {
    float: left;
}
footer .copyright a {
    color: #6c757d;
}

/* 页脚响应式适配 */
@media screen and (max-width: 992px) {
    footer .float-left {
        width: 33.33% !important;
        margin-bottom: 30px;
    }
    footer .item-5 {
        clear: left;
    }
}

@media screen and (max-width: 768px) {
    footer .float-left {
        width: 50% !important;
    }
    footer .item-5,
    footer .item-6 {
        width: 100% !important;
    }
    footer .qr {
        text-align: left;
    }
}

@media screen and (max-width: 480px) {
    footer .float-left {
        width: 100% !important;
    }
}

/* ========== 响应式设计 ========== */
/* 移动端菜单按钮 */
.mobile-nav-toggle {
    display: none;
    font-size: 28px;
    color: #333;
    cursor: pointer;
    padding: 5px 15px;
    position: absolute;
    right: 15px;
    top: 20px;
    z-index: 101;
}

@media screen and (max-width: 992px) {
    .container-layout {
        padding: 0 20px;
    }
    #pc-header .x2.logo { width: 50%; }
    #pc-header .x9 { width: 0; }
    #pc-header .nav-menu > li > a {
        padding: 0 10px;
        font-size: 15px;
    }
    footer .float-left {
        width: 33.33% !important;
        margin-bottom: 30px;
    }
}

@media screen and (max-width: 768px) {
    /* 移动端导航 */
    #pc-header .x9 {
        position: static;
        width: 100%;
    }
    #pc-header .nav-menu {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: #fff;
        box-shadow: 0 6px 12px rgba(0,0,0,0.1);
        flex-direction: column;
        padding: 10px 0;
        z-index: 99;
    }
    #pc-header .nav-menu.active {
        display: flex;
    }
    #pc-header .nav-menu > li {
        margin: 0;
    }
    #pc-header .nav-menu > li > a {
        line-height: 50px;
        padding: 0 25px;
        border-bottom: 1px solid #f0f0f0;
    }
    #pc-header .nav-menu li ul {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        display: none;
        background: #f9f9f9;
        border-radius: 0;
    }
    #pc-header .nav-menu li:hover ul {
        display: block;
    }
    #pc-header .nav-menu li ul li a {
        padding-left: 40px;
    }
    .mobile-nav-toggle {
        display: block;
    }
    /* 调整logo和右侧图标 */
    #pc-header .x2.logo {
        width: 70%;
    }
    #pc-header .log-in {
        right: 80px;
        top: 18px;
    }
    #pc-header .shopBar {
        right: 50px;
        top: 18px;
    }
    #pc-header .searchBar {
        right: 15px;
        top: 18px;
    }
    /* 页脚 */
    footer .float-left {
        width: 50% !important;
    }
    footer .item-5, footer .item-6 {
        width: 100% !important;
        text-align: left;
    }
    footer .qr {
        text-align: center;
    }
}

@media screen and (max-width: 480px) {
    footer .float-left {
        width: 100% !important;
    }
    #log .dialog {
        min-width: 300px !important;
        width: 95%;
    }
}

/* 工具类补充 */
.show { display: block !important; }
.hidden { display: none !important; }
@media (min-width: 769px) {
    .hidden-s { display: none !important; }
    .show-s { display: block !important; }
}
@media (max-width: 768px) {
    .hidden-l { display: none !important; }
    .show-l { display: block !important; }
}