/**
 * 顶部搜索栏吸顶
 * @author  VeryQ
 * @date    2026-11-20
 */

/* 吸顶态：只改定位与间距，不动内部布局 */
.nav-search.is-sticky {
    /* 加 !important 覆盖系统 common.js 写入的内联 position（resize 时会被改成 relative） */
    position: fixed !important;
    top: 0 !important;
    left: 0;
    width: 100%;
    height: 5.9rem;
    box-sizing: border-box;
    z-index: 1100;
    background: #FFFFFF;
    padding: 0.8rem 0;
    margin: 0;
    box-shadow: 0 0.2rem 1rem rgba(0, 0, 0, 0.08);
}

/* 只缩 logo 图片高度，宽度与 margin 各断点原样继承，保证搜索框位置与顶部一致 */
.nav-search.is-sticky .logo-big {
    height: 3.6rem;
}
.nav-search.is-sticky .logo-big img {
    height: 100%;
    width: auto;
    max-width: 100%;
}

/* 隐藏热词，进一步降高 */
.nav-search.is-sticky .search-hot-keywords {
    display: none;
}

/* 吸附占位，避免内容跳动 */
.nav-search-placeholder {
    width: 100%;
}

/* 小屏（641-1024）：只缩小 logo，不影响吸顶开关 */
@media only screen and (max-width: 1024px) {
    .nav-search.is-sticky .logo-big {
        height: 3rem;
    }
}

/* 说明：吸顶开关只由 JS 的 scroll 逻辑控制，此处不做宽度断点干预
   <641px 时 .nav-search 被系统 am-hide-sm-only 隐藏，JS 检测到高度为 0 会自动跳过 */
