/* 禁止选中文字 */
body {
  -webkit-user-select: none; /* Safari */
  -ms-user-select: none;     /* IE 10+ */
  user-select: none;         /* 标准语法 */
}

/* 禁止图片拖拽 */
img {
  -webkit-user-drag: none;
}
ul, ol {
    list-style: none;
    padding: 0;
    margin: 0;
}
a {
    text-decoration: none; /* 取消下划线 */
    color: #FFF;
    cursor: pointer;
}
dl, ol, ul {
    margin-top: 0;
}
#header {
    position: fixed;
    top: 0px;
    width: 100vw;
    z-index: 999;
    padding: 22px 0;
    transition: all .3s ease-in-out;
}
.main-menu-wrapper {
    display: flex;
    gap: 130px;
}
.is-scrolled {
    transition: all .3s ease-in-out;
    background-color: #1a338d;
}
.main-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 66px;
    max-width: 1580px;
    margin: 0 auto;
}
.main-header-logo img {
    width: 200px;
    height: auto;
}
.main-header-right {
    display: flex;
    align-items: center;
    gap: 170px;
}
.main-menu-list {
    display: flex;
    align-items: center;
    gap: 62px;
}
.main-menu-list span {
    text-wrap: nowrap;
}
.main-menu-list a{
    position: relative;
    /*opacity: 0.7;*/
    text-decoration: none;
}
.main-menu-list .current a{
    opacity: 1;
}
.menu_item_a:after {
    position: absolute;
    content: "";
    width: 30px;
    height: 4px;
    background-color: #E5021A;
    bottom: -16px;
    left: 50%;
    border-radius: 2px;
    
    transform: translateX(-50%) scaleX(0);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0; 
}
.main-menu-list li:hover a {
    opacity: 1;
}
.main-menu-list li:hover a:after {
    opacity: 1;
    transform: translateX(-50%) scaleX(1);
}

.main-menu-list .current a:after {
    opacity: 1;
    transform: translateX(-50%) scaleX(1);
}
.main-header-other input{
    all: initial;
    border-radius: 50px;
    width: calc(300px - 36px);
    padding: 8px 18px;
    border: 2px solid #FFF;
    padding-left: 38px;
    color: #FFF;
}
.main-header-other input {
    
    /* 图标大小 */
}
/* 1. 父级菜单项设置相对定位 */
.main-menu-list > li {
    position: relative;
    display: inline-block; /* 或者 flex，根据你的布局定 */
    padding: 15px 20px;
}

/* 2. 默认隐藏二级菜单 */
.main-menu-list .yiji {
    display: none;          /* 初始状态隐藏 */
    position: absolute;     /* 绝对定位 */
    top: 100%;             /* 紧贴父级底部 */
    left: 0;
    min-width: 180px;      /* 设置最小宽度 */
    background-color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 999999;
    padding: 10px 0;
    list-style: none;
    border-top: 2px solid #E5021A; /* 可选：顶部装饰线 */
}
.product-mega-wrapper {
    display: none;
    position: absolute;
    top: calc(100% - 24px);
    left: 0;
    background-color: rgba(255, 255, 255, 0.95);
    width: 100%;
    padding-bottom: 2rem;
    z-index: 99999;
}
#dynamic-product-img {
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: block;
}

/* 鼠标悬停在文字上时，文字也可以加点高亮效果 */
.product-category-link:hover .product-title {
    font-weight: bold;
}
.head_product_content {
    display: flex;
    width: calc(100% - 12%);
    padding: 0 6%;
}
.product-mega-wrapper a {
    color: #000 !important;
}
.head_product_title {
    width: 33%;
    margin-top: 30px;
}
.head_product_title font {
    font-size: 50px;
    line-height: 85px;
    font-weight: 600;
    color: #1a338d;
}
.head_product_title p {
    font-size: 18px;
    line-height: 30px;
}
.head_product_title img {
    width: 90%;
    margin-top: 15px;
}
.head_product_img {
    width: 33%;
    margin-top: 30px;
    height: 370px;
    display: flex;
    justify-content: center;
}
.head_product_img img{
    height: 100%;
    object-fit: cover;
    
}
.product-grid-container {
    width: 33%;
    margin-top: 30px;
    border-left: 1px solid #A8A8A8;
    padding-left: 50px;
}
.product-item-card a {
    width: 90%;
    font-size: 16px;
    line-height: 3;
    padding-left: 20px;
    border-radius: 5px;
    display: block;
}
.product-item-card:hover a {
    background-color: #E5021A;
    color: #FFF !important;
}

/* 3. 鼠标经过父级时显示二级菜单 */
.main-menu-list li:hover > .yiji,
.main-menu-list li:hover > .product-mega-wrapper{
    display: block;
    animation: fadeInDown 0.3s ease; /* 可选：添加进入动画 */
}
/* 4. 二级菜单里的列表样式 */
.yiji li {
    width: 100%;
}

.yiji li a {
    display: block;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    transition: background 0.3s;
}

.yiji li a:hover {
    background-color: #f8f9fa;
    color: #E5021A;
}

/* 简单的淡入效果动画 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* 针对现代浏览器 (Chrome, Firefox, Edge, Safari) */
.main-header-other input::placeholder {
    color: rgba(255, 255, 255, 0.7);             /* 颜色 */
    font-size: 14px;         /* 字号 */
    font-weight: normal;     /* 字重 */
    opacity: 1;              /* Firefox 默认有透明度，设为1可以保证颜色准确 */
}

/* 针对较旧版本的 Webkit 内核 (Chrome, Safari, Opera) */
.main-header-other input::-webkit-input-placeholder {
    color: rgba(255, 255, 255, 0.7);             /* 颜色 */
}

/* 针对 IE 10-11 */
.main-header-other input:-ms-input-placeholder {
    color: rgba(255, 255, 255, 0.7);             /* 颜色 */
}

/* 针对 Firefox 4-18 */
.main-header-other input:-moz-placeholder {
    color: rgba(255, 255, 255, 0.7);             /* 颜色 */
}
@media screen and (max-width: 999px) {
    .main-header-logo img{
        width: 120px;
    }
    #adminbuy_cn_img {
        margin-top: 80px;
    }
    #header{
        background-color: #1a338d;
    }
}
@media screen and (max-width: 999px) {
    .main-header-content {
        justify-content: space-between;
        padding: 0 28px;
    }
    .main-menu-wrapper {
        display: none;
    }
}

/* --- PC端专属样式 --- */
@media screen and (min-width: 1000px) {
    .pc-menu-wrapper { display: flex; align-items: center; gap: 130px; }
    .main-menu-list { display: flex; align-items: center; gap: 62px; }
    .main-menu-list a { 
        position: relative; 
        /*opacity: 0.7; */
        color: #fff; transition: 0.3s; }
    .menu_item_a:after {
        position: absolute; content: ""; width: 30px; height: 4px; background: #E5021A;
        bottom: -16px; left: 50%; transform: translateX(-50%) scaleX(0);
        transition: 0.3s; opacity: 0; border-radius: 2px;
    }
    .main-menu-list li:hover a { opacity: 1; }
    .main-menu-list li:hover a:after { opacity: 1; transform: translateX(-50%) scaleX(1); }
    
    .mobile-menu-toggle, #menuDialog { display: none !important; } /* PC端强制隐藏手机组件 */
}

/* --- 手机端专属样式 --- */
@media screen and (max-width: 999px) {
    .pc-menu-wrapper { display: none; } /* 手机端隐藏PC菜单 */
    
    .mobile-menu-toggle { display: flex; flex-direction: column; gap: 5px; cursor: pointer; }
    .mobile-menu-toggle span { width: 25px; height: 3px; background: #fff; }

    #menuDialog {
        border: none; padding: 0; width: 100vw;  margin: 0 0 0 auto;
        max-width: none;
        height: auto; 
        min-height: 100vh;
        background: #1a338d; color: #fff;
        transform: translateX(100%); transition: transform 0.3s ease-in-out;
        display: block; visibility: hidden;
    }
    .mobile-menu-list-li {
        padding: 0 34px;
    }
    .mobile_menu_title {
        display: flex;
        justify-content: space-between;
    }
    .mobile_menu_title p {
        width: 0;
        height: 0;
        /* 左右边框透明，底边框着色 */
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-top: 8px solid #fff; 
        
        display: inline-block;
        transition: transform 0.3s ease;
        vertical-align: middle;
        transform: rotate(270deg);
    }
    
    /* 激活状态：倒转过来 */
    .mobile_menu_title.active p {
        transform: rotate(359deg);
        transition: transform 0.3s ease;
    }
    /* 隐藏子菜单 */
    .sub-menu {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out; /* 动画过渡 */
    }
    
    /* 激活状态 */
    .sub-menu.is-open {
        max-height: 500px; /* 设置一个足够大的高度 */
        opacity: 1;
    }
    
    .sub-menu li {
        padding: 8px 22px;
    }
    
    #menuDialog[open] { transform: translateX(0); visibility: visible; }
    #menuDialog::backdrop { background: rgba(0,0,0,0.5); backdrop-filter: blur(3px); }

    .dialog-inner { padding: 80px 0;width: 100%; }
    .mobile-menu-list li { margin-bottom: 25px; }
    .mobile-menu-list a { color: #fff; font-size: 18px;margin-bottom: 4px; }
    .close-menu-btn { position: absolute; top: 20px; right: 20px; background: none; border: none; color: #fff; font-size: 32px; }
    .sub-menu li {
        margin-bottom: 4px;
    }
    .sub-menu li a {
        font-size: 16px;
    }
}

.main-header-other {
    position: relative;
}
/* 搜索框通用样式 */
.main-header-other input {
    border-radius: 50px; border: 2px solid #FFF; padding: 8px 18px 8px 38px;
    color: #FFF; background: transparent;
    width: 160px;
}
.main-header-other img {
    position: absolute;
    width: 16px;
    height: 16px;
    top: 15px;
    left: 17px;
}



