/* 重置默认样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    color: #333;
}

/* 容器基础样式 */
.container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 搜索框基础样式 */
.top-header {
    position: relative;
    width: 100%;
    background: #fff;
    z-index: 100;
}

.home-search {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    margin-top: 20px;
}

/* 左侧边栏基础样式 */
.sidebar {
    position: fixed;
    left: 50px;
    top: -20px;
    width: 320px;
    background: #fff;
    z-index: 100;
}

.sidebar .nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: block;
    width: 100%;
}

.sidebar .nav-link {
    display: block;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    box-sizing: border-box;
    border-bottom: 1px solid #eee;
}

.sidebar .nav-link:hover {
    background: #f5f5f5;
    color: #4a90e2;
}

.sidebar .nav-link.active {
    background: #4a90e2;
    color: #fff;
}

/* Logo基础样式 */
.logo {
    position: fixed;
    left: 0;
    top: 20px;
    width: 200px;
    height: 80px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    z-index: 1001;
    background: #fff;
}

.logo img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 主内容区域基础样式 */
.main-content {
    margin-top: 0;
    margin-left: 220px;
    padding: 20px;
}

/* 通用搜索框样式 */
.search-box {
    position: relative;
    left: 40px;
    top: -20px;
    flex: 1;
    margin-right: 20px;
}

/* 搜索框和按钮容器 */
.search-input-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 560px;
    gap: 0;
}

/* 搜索框输入框样式 */
.search-input {
    width: 490px;
    height: 40px !important;
    padding: 0 15px;
    border: 2px solid #4a90e2;
    border-radius: 4px;
    font-size: 16px;
    outline: none;
    background: #fff;
}

/* 搜索按钮样式 */
.search-btn {
    width: 70px;
    height: 40px !important;
    background: #4a90e2;
    color: #fff;
    border: 2px solid #4a90e2;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: -70px;
    top: 0;
}

.search-btn:hover {
    background: #357abd;
    border-color: #357abd;
}

/* 确保样式优先级 */
body .home-search {
    position: absolute !important;
    left: -200px !important;
    top: calc(50% - 40px) !important;
    transform: translateY(-50%) !important;
    width: 940px !important;
    height: 60px !important;
}

/* 通用导航样式 */
.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* 导航链接样式 */
.nav-link {
    color: #333;
    text-decoration: none;
    padding: 0 15px;
    font-size: 14px;
    transition: color 0.3s ease;
    -webkit-tap-highlight-color: transparent; /* 移除移动端点击高亮 */
    outline: none; /* 移除点击时的轮廓 */
    user-select: none; /* 防止文本被选中 */
}

.nav-link:hover,
.nav-link:active,
.nav-link:focus,
.nav-link.active {
    color: #4a90e2;
    background: transparent !important; /* 确保背景始终透明 */
    outline: none; /* 移除焦点轮廓 */
}

/* 移除所有可能的默认样式 */
.nav-link,
.nav-link:hover,
.nav-link:active,
.nav-link:focus,
.nav-link.active {
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    outline: none !important;
    background: transparent !important;
}

/* 通用按钮样式 */
.btn {
    padding: 8px 20px;
    border-radius: 4px;
    border: 1px solid #e5e5e5;
    background: #fff;
    cursor: pointer;
}

/* 只保留全局通用样式 */
.container-fluid {
    padding: 0 15px;
}

/* 移除所有首页相关样式 */

/* 顶部导航样式 */
.header-nav {
    position: absolute;
    right: 200px;
    top: calc(50% - 60px);
    transform: translateY(-50%);
}

.header-nav .nav-list {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.header-nav .nav-link {
    color: #333;
    text-decoration: none;
    font-size: 15px;
    padding: 8px 12px;
    transition: color 0.3s ease;
}

.header-nav .nav-link:hover,
.header-nav .nav-link.active {
    color: #4a90e2;
}

/* 固定顶部导航区域 */
.fixed-header {
    position: fixed;
    top: 40px;
    left: 0;
    width: 100%;
    background: #fff;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 头部包装器样式 */
.header-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 导航菜单样式 */
.header-nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: #333;
    text-decoration: none;
    padding: 0 15px;
    font-size: 14px;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #4a90e2;
}

/* 登录框样式 */
.login-box {
    position: absolute;
    right: 50px;
    top: calc(50% - 60px);
    transform: translateY(-50%);
}

/* 响应式布局 */
@media (max-width: 1200px) {
    .search-box {
        flex: 0 0 350px;
        margin-left: 180px;
    }
}

@media (max-width: 992px) {
    .search-box {
        flex: 0 0 300px;
        margin-left: 160px;
    }
    
    .nav-list {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
        padding: 0 15px;
    }
    
    .logo {
        position: static;
        transform: none;
        margin-right: auto;
    }
    
    .search-box {
        order: 2;
        flex: 1;
        margin: 15px 0;
        margin-left: 0;
    }
    
    .nav-list {
        order: 3;
        width: 100%;
        justify-content: space-between;
        margin: 15px 0;
        margin-left: 0;
    }
    
    .login-box {
        order: 4;
        margin-right: 0;
    }
}

/* 全局重置所有可能的背景色 */
body, 
html, 
.container,
.container-fluid,
.row,
.col,
.col-*,
.btn,
.nav,
.navbar,
.card,
.search-btn,
.top-nav,
.nav-container,
.search-box,
.nav-list,
.login-box,
.login-btn,
.main-content,
.sidebar,
.content-area,
[class^="bg-"],  /* 匹配所有以bg-开头的类 */
[class*=" bg-"] { /* 匹配所有包含bg-的类 */
    background: transparent !important;
    background-color: transparent !important;
}

/* 移除所有bootstrap的背景色类 */
.bg-primary,
.bg-secondary,
.bg-success,
.bg-danger,
.bg-warning,
.bg-info,
.bg-light,
.bg-dark,
.bg-white,
.bg-transparent {
    background: transparent !important;
    background-color: transparent !important;
}

/* 移除所有按钮的背景色 */
.btn,
.btn-primary,
.btn-secondary,
.btn-success,
.btn-danger,
.btn-warning,
.btn-info,
.btn-light,
.btn-dark {
    background: transparent !important;
    background-color: transparent !important;
    border-color: transparent !important;
}

/* 产品分类样式 */
.category-menu {
    margin-top: 20px;
}

/* 顶部导航区域 */
.top-section {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 20px;
    background: #fff;
    padding: 15px;
    border-radius: 4px;
}

/* 确保所有背景是透明的 */
.logo,
.sidebar,
.category-menu,
.main-content {
    background: transparent !important;
}

/* 删除或注释掉这些样式 */
/*.search-input {
    width: 100%;
    padding: 8px 15px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}*/ 

/* 页面整体布局 */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

/* 主要内容区域 */
.main-wrapper {
    flex: 1; /* 占用所有剩余空间 */
    min-height: calc(100vh - 220px); /* 减去头部和底部的高度 */
}

/* 底部样式 */
.footer {
    padding: 20px 0;
    text-align: center;
    background: #fff;
    border-top: 1px solid #eee;
    width: 100%;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.copyright, .email {
    font-size: 13px;
    color: #666;
    margin: 0;
    padding: 5px 0;
    line-height: 1.5;
    text-align: center;
}

/* 导航菜单样式 */
.header-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.header-nav .nav-list {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.header-nav .nav-link {
    color: #333;
    text-decoration: none;
    font-size: 15px;
    padding: 8px 12px;
    transition: color 0.3s ease;
}

.header-nav .nav-link:hover,
.header-nav .nav-link.active {
    color: #4a90e2;
}

/* 确保搜索框样式优先级 */
body .search-input-group {
    width: 560px !important;
    gap: 0 !important;
}

body .search-input {
    height: 40px !important; /* 从120px改为40px */
}

body .search-btn {
    right: -70px !important;
}

/* 确保样式优先级 */
body .sidebar {
    position: fixed !important;
    top: 140px !important;
    width: 320px !important; /* 添加高优先级样式 */
} 