@charset "utf-8";

/* 智采 AI 顶部下拉菜单：使用独立类名，避免覆盖官网原有导航下拉样式。 */
#nav li.ai-nav-item {
    width: 120px;
    z-index: 120;
}

#nav li.ai-nav-item > .ai-nav-trigger {
    position: relative;
    white-space: nowrap;
}

/* 下拉箭头使用 CSS 绘制，避免额外引入图标字体造成旧浏览器兼容问题。 */
.ai-nav-arrow {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin: -4px 0 0 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    vertical-align: middle;
    transform: rotate(45deg);
    transition: transform .2s ease;
}

#nav li.ai-nav-item:hover .ai-nav-arrow,
#nav li.ai-nav-item.ai-menu-open .ai-nav-arrow {
    transform: rotate(225deg);
    margin-top: 4px;
}

.ai-menu-panel {
    display: none;
    position: absolute;
    z-index: 130;
    width: 380px;
    padding: 10px 0 0;
    background: #fff;
    border: 1px solid #edf1f5;
    border-radius: 3px;
    box-shadow: 0 8px 24px rgba(25, 55, 85, .18);
    text-align: left;
}

.ai-menu-panel-top {
    top: 105px;
    right: 0;
}

#nav li.ai-nav-item:hover > .ai-menu-panel,
#nav li.ai-nav-item.ai-menu-open > .ai-menu-panel {
    display: block;
}

.ai-menu-list {
    max-height: 410px;
    overflow-y: auto;
    padding: 0 10px;
}

.ai-menu-item {
    display: flex;
    align-items: center;
    min-height: 54px;
    padding: 8px 8px;
    border-bottom: 1px solid #f2f4f7;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s ease, transform .2s ease;
}

/* 官网原有 #nav li a 会把所有导航链接设置成 105px 高并居中，必须在动态菜单内覆盖，确保每项横向排列。 */
#nav li.ai-nav-item .ai-menu-item {
    display: flex;
    width: auto;
    height: auto;
    min-height: 58px;
    padding: 9px 10px;
    align-items: center;
    line-height: 1.35;
    text-align: left;
    font-size: 14px;
    font-weight: normal;
}

.ai-menu-item:last-child {
    border-bottom: 0;
}

.ai-menu-item:hover {
    background: #f5fbff;
    color: #168fd1;
    transform: translateX(2px);
}

.ai-menu-item-disabled,
.ai-menu-item-disabled:hover {
    color: #9aa3ad;
    background: #e6e9ed;
    cursor: not-allowed;
    transform: none;
}

.ai-menu-item-icon {
    display: inline-flex;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    margin-right: 10px;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background-color: #eaf7ff;
    color: #238dcc;
    font-size: 16px;
    font-style: normal;
    font-weight: bold;
}

.ai-menu-item:nth-child(3n + 2) .ai-menu-item-icon {
    background-color: #eaf9ee;
    color: #39a665;
}

.ai-menu-item:nth-child(3n + 3) .ai-menu-item-icon {
    background-color: #f1edff;
    color: #7355c9;
}

/* 远端图标若返回图片地址则按统一尺寸显示，缺少地址时展示本地图标兜底字符。 */
.ai-menu-item-icon-image {
    display: block;
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.ai-menu-item-icon-fallback {
    display: block;
    line-height: 30px;
    text-align: center;
}

.ai-menu-item-content {
    min-width: 0;
    flex: 1;
}

.ai-menu-item-title {
    display: block;
    overflow: hidden;
    color: inherit;
    font-size: 14px;
    line-height: 22px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-menu-item-description {
    display: block;
    overflow: hidden;
    color: #a0a8b2;
    font-size: 12px;
    line-height: 20px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 同样覆盖官网导航链接的高度和行高，底部“查看更多”保持正常的单行页脚样式。 */
#nav li.ai-nav-item .ai-menu-more {
    display: block;
    width: auto;
    height: auto;
    padding: 10px 18px 12px;
    line-height: 20px;
    text-align: right;
    font-size: 13px;
    font-weight: normal;
}

.ai-menu-more {
    display: block;
    padding: 10px 18px 12px;
    border-top: 1px solid #f0f2f5;
    color: #168fd1;
    font-size: 13px;
    line-height: 20px;
    text-align: right;
}

.ai-menu-more:hover {
    color: #f08a24;
}

.ai-menu-loading,
.ai-menu-empty {
    padding: 24px 18px;
    color: #9aa3ad;
    font-size: 13px;
    text-align: center;
}

@media (max-width: 1280px) {
    .ai-menu-panel-top {
        right: -80px;
    }
}


/* ========== 首页大图底部“智采AI”悬浮菜单 ========== */
/* 该按钮同时承担大图切换，使用独立类名，避免影响原有 bigNum 样式。 */
.bigNum li.big-num-ai-item {
    position: relative;
    /* 去掉默认左侧留白，改为内部 flex 布局，让 logo 图标与文字自行排列。 */
    padding-left: 0;
}

/* 链接撑满整块区域，保证可点击；采用 flex 布局：logo 图标在左、文字在右。
   文字颜色/字号/字重与右侧按钮保持一致（14px 加粗白色）。 */
.bigNum li.big-num-ai-item .big-num-ai-trigger {
    display: flex;
    align-items: center;
    height: 100%;
    color: #fff;
    font-weight: bold;
    font-size: 14px;
    line-height: 50px;
    text-decoration: none;
    white-space: nowrap;
}

/* logo 图标：外层盒子固定为 50×50，图片在盒子内水平/垂直居中。
   用户已手工将图片限制为最大 30×30，这里让其在盒子内等比、居中显示。 */
.big-num-ai-icon-box {
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.big-num-ai-icon {
    display: block;
    width: auto;
    height: auto;
    max-width: 26px;
    max-height: 26px;
    object-fit: contain;
}
/* 文字与箭头容器，保持左对齐排版。 */
.big-num-ai-text {
    flex: 0 0 auto;
}

/* 悬浮或键盘展开时显示下拉面板（与顶部菜单保持一致的交互）。 */
.big-num-ai-item:hover > .ai-menu-panel,
.big-num-ai-item.ai-menu-open > .ai-menu-panel {
    display: block;
}

/* 大图底部按钮的箭头在悬浮时上翻。 */
.big-num-ai-item:hover .ai-nav-arrow,
.big-num-ai-item.ai-menu-open .ai-nav-arrow {
    transform: rotate(225deg);
    margin-top: 4px;
}

/* 面板浮在按钮下方，与顶部菜单保持一致；使用 fixed 定位以避开 bigFocusImg 的 overflow:hidden 裁切，
   使其能向下弹出而不被裁掉，位置由 JS 在弹出时按按钮实际坐标计算。 */
.ai-menu-panel-bignum {
    position: fixed;
    top: 0;
    right: auto;
    bottom: auto;
    left: 50%;
    transform: translateX(-50%);
}

/* 首页大图可视高度有限，收紧菜单列表的可滚动高度，避免面板底部超出屏幕。 */
.ai-menu-panel-bignum .ai-menu-list {
    max-height: 320px;
}

