/* 顶部导航结构基础样式 */
.header-navbar, .header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.topnav-logo {
    display: flex;
    align-items: center;
}

.logo-title {
    margin-left: 10px;
}

.nav-link {
    color: white;
    text-decoration: none;
    margin-left: 10px;
    font-size: 1.1rem;
}

.nav-link:hover {
    color: #ff0000;
}

.menu-icon {
    display: none;
    font-size: 30px;
    cursor: pointer;
    position: absolute;
    right: 10px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
}

/* ✅ 分类+搜索统一背景容器样式 */
.search-bar-wrapper {
    background-color: transparent; /* 或者删除背景 */
    margin-left: 2px;
    margin-right: 2px;
}

.search-bar-wrapper .container {
    background-color: #f8f9fa;
    border-radius: 5px;
    padding: 10px 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}



.search-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

/* ✅ 分类下拉 */
.category-box {
    flex-shrink: 0;
    max-width: 280px;
}

.category-box select {
 /*   width: 100%;*/
    height: 38px;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 14px;
    border: 1px solid #ced4da;
    background-color: #fff;
}

/* ✅ 搜索框靠右 */
.search-box {
    flex-grow: 1;
    max-width: 420px;
    position: relative;
}

.search-box input {
    width: 100%;
    height: 38px;
    border-radius: 6px;
    border: 1px solid #ced4da;
    padding: 6px 36px 6px 10px;
    font-size: 14px;
}

.search-box .uil-search {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    pointer-events: none;
}


/* ✅ PC端风格切换 + 会员中心 下拉菜单样式（宽度一致 + 美化） */
.dropdown-menu[aria-labelledby="templateDropdown"],
.dropdown-menu[aria-labelledby="dropdownMenuButton"] {
    min-width: 100% !important;
    width: auto;
    text-align: center;
    border-radius: 2px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    border: none;
    background-color: #fff;
    z-index: 1000;
}

/* ✅ 移动端风格切换下拉菜单（保持简洁，宽度一致） */
.dropdown-menu[aria-labelledby="templateDropdownMobile"] {
    min-width: 100% !important;
    width: auto;
    text-align: center;
}

/* 菜单项样式优化 */
.dropdown-menu a.dropdown-item {
    padding: 10px 20px;
    font-size: 14px;
    transition: background-color 0.2s, color 0.2s;
}

/* 悬停高亮 */
.dropdown-menu a.dropdown-item:hover {
    background-color: #f0f0f5;
    color: #007bff;
}
/* ✅ 移动端支持垂直排布 */
@media (max-width: 768px) {
    .menu-icon {
        display: block;
        color: white;
    }
.category-box select {
    width: 100%;
}    
    .mobile-nav {
        display: none;
        position: absolute;
        top: 60px;
        right: 0;
        background-color: #393D49;
        flex-direction: column;
        z-index: 1000;
        width: auto;
    }

    .mobile-nav.show {
        display: flex;
    }

    .mobile-nav a {
        color: white;
        padding: 10px;
        text-align: center;
        border-bottom: 1px solid #575757;
        text-decoration: none;
        white-space: nowrap;
    }

    .mobile-nav a:hover {
        background-color: #575757;
    }

    .topnav-logo {
        flex-grow: 1;
        justify-content: center;
        display: flex;
        order: 1;
    }

    .menu-icon {
        order: 2;
    }

    .search-bar-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .category-box,
    .search-box {
        width: 100%;
        max-width: none;
    }

    .search-box {
        margin-top: 10px;
    }
}
