/* 首页布局 */
.home-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 左侧边栏 */
.sidebar {
    position: fixed;
    left: 50px;
    top: 140px; /* 确保与顶部导航不重叠 */
    width: 200px;
    background: #fff;
    z-index: 100;
    padding-top: 20px; /* 添加内边距以避免重叠 */
    max-height: calc(100vh - 160px);
    overflow-y: auto;
}

/* Logo区域 */
/* .logo {
    /* 删除所有相关样式 */
} */

/* 确保样式优先级 */
body .logo {
    /* 删除所有相关样式 */
}

/* 产品分类 */
.category-menu {
    margin-top: 100px; /* 为logo留出空间 */
}

.category-menu h3 {
    margin: 0;
    padding: 10px 0;
    font-size: 16px;
}

.category-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-menu li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.category-menu a {
    color: #333;
    text-decoration: none;
}

/* 主内容区域 */
.main-content {
    margin-left: 300px;
    margin-top: 140px;
    margin-right: 50px;
    width: calc(100% + 600px); /* 480px + 120px */
    padding-left: 30px;
}

/* 搜索框和导航区域 */
.top-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 15px 0;
    background: transparent !important;
}

.search-box {
    flex: 0 0 400px;
    background: transparent !important;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 20px;
    background: transparent !important;
}

/* 首页轮播图样式 */
.home-banner {
    margin-bottom: 40px;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.home-banner .carousel {
    width: 100%;
}

.home-banner .carousel-inner {
    width: 100%;
}

.home-banner .carousel-item {
    width: 100%;
}

.home-banner img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* 覆盖bootstrap默认样式 */
.carousel-inner {
    margin-left: 0 !important;
    width: 100% !important;
}

.carousel {
    margin-left: 0 !important;
    width: 100% !important;
}

/* 首页产品展示区域 */
.home-section {
    margin-bottom: 40px;
}

.home-section-title {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

/* 首页产品列表 */
.home-product-list {
    display: flex;
    flex-wrap: wrap;
    margin: -10px;  /* 抵消子元素的margin */
}

.home-product-item {
    flex: 0 0 25%;  /* 4列布局 */
    padding: 10px;
    box-sizing: border-box;
}

.home-product-inner {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 15px;
    height: 100%;
    transition: all 0.3s ease;
}

.home-product-inner:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.home-product-img {
    position: relative;
    padding-top: 100%;  /* 1:1 比例 */
    overflow: hidden;
    margin-bottom: 10px;
}

.home-product-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-product-title {
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
}

.home-product-desc {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    height: 44px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 首页新闻列表 */
.home-news-section {
    margin: 30px auto;
    max-width: 100%; /* 确保不超过父容器宽度 */
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.home-news-block {
    flex: 1;
    min-width: 300px; /* 最小宽度 */
    max-width: calc(50% - 15px); /* 最大宽度为父容器的一半减去间距的一半 */
}

.home-news-title {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
    position: relative;
}

.home-news-more {
    position: absolute;
    right: 0;
    top: 5px;
    font-size: 14px;
    color: #666;
    text-decoration: none;
}

.home-news-more:hover {
    color: #007bff;
}

.home-news-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-news-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.home-news-item:last-child {
    border-bottom: none;
}

.home-news-card {
    background: #fff;
    padding: 10px 0;
    transition: all 0.3s ease;
}

.home-news-card:hover {
    background: #f8f9fa;
}

.home-news-link {
    text-decoration: none;
    color: #333;
    display: block;
}

.home-news-link:hover {
    color: #007bff;
}

.home-news-date {
    color: #999;
    font-size: 12px;
    margin-top: 5px;
}

.home-news-content {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-top: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 响应式布局 */
@media (max-width: 992px) {
    .home-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        padding-right: 0;
        margin-bottom: 20px;
    }
    
    .logo {
        width: auto;
        text-align: center;
    }
    
    .main-content {
        padding-left: 0;
    }
    
    .home-product-item {
        flex: 0 0 33.333%;  /* 3列布局 */
    }
    
    .home-news-block {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .home-news-section {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .home-product-item {
        flex: 0 0 50%;  /* 2列布局 */
    }
    
    .home-section-title {
        font-size: 20px;
    }
    
    .home-news-title {
        font-size: 18px;
    }
    
    .home-news-section {
        margin: 20px auto;
    }
}

@media (max-width: 576px) {
    .home-product-item {
        flex: 0 0 100%;  /* 1列布局 */
    }
    
    .home-section {
        margin-bottom: 30px;
    }
}

/* 清除浮动 */
.clearfix::after {
    content: '';
    display: table;
    clear: both;
}

/* 新闻动态区域 */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding-right: 15px;
    padding-left: 15px;
    position: relative;
    width: 100%;
}

/* 新闻标题区域 */
.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 2px solid #007bff;
    margin-bottom: 25px;
    position: relative;
}

.news-title {
    font-size: 18px;
    color: #333;
    margin: 0 0 10px 0;
    font-weight: 500;
    text-align: left; /* 确保左对齐 */
}

.news-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: #007bff;
    border-radius: 2px;
}

.news-more {
    font-size: 14px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 6px 12px;
    border-radius: 4px;
    background: #f8f9fa;
}

.news-more:hover {
    color: #007bff;
    background: #e9ecef;
}

/* 新闻列表样式 */
.news-list {
    margin: 0;
    padding: 0;
    margin-left: 30px; /* 整体向右移动30px */
}

.news-item-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.news-item-link:hover {
    text-decoration: none;  /* 去掉鼠标悬停时的下划线 */
}

.news-item {
    display: flex;
    padding: 15px; /* 减小内边距 */
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 15px; /* 减小底部间距 */
    transition: all 0.3s ease;
    background: #fff;
}

.news-item:hover {
    background-color: #f9f9f9;
}

.news-item-left {
    flex: 0 0 200px;
    margin-right: 20px;
}

.news-item-left img {
    width: 100%;
    height: 150px; /* 从90px增加到150px */
    object-fit: cover;
    border-radius: 4px;
}

.news-item-right {
    flex: 1;
    text-align: left; /* 确保内容左对齐 */
}

.news-specs {
    margin-bottom: 10px;
}

.news-specs span {
    display: inline-block;
    margin-right: 20px;
    color: #666;
    font-size: 14px;
}

.news-desc {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 30px;
    }
    
    .news-header {
        margin-bottom: 20px;
    }
    
    .news-title {
        font-size: 20px;
    }
    
    .news-item {
        padding: 12px 15px;
    }
}

/* 清除浮动 */
.clearfix::after {
    content: '';
    display: table;
    clear: both;
}

/* 主导航样式 */
.main-nav {
    background: #fff;
    border-bottom: 1px solid #eee;
    height: 60px;
    line-height: 60px;
}

.main-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    height: 100%;
    white-space: nowrap; /* 防止换行 */
}

.main-nav-list {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
    height: 100%;
    flex-wrap: nowrap; /* 防止换行 */
}

.main-nav-item {
    margin: 0;
    padding: 0;
    height: 100%;
    display: flex;
    align-items: center;
}

.main-nav-link {
    color: #333;
    font-size: 15px;
    text-decoration: none;
    padding: 0 25px; /* 增加间距 */
    height: 100%;
    display: flex;
    align-items: center;
    border-right: 1px solid #eee;
    transition: color 0.3s ease;
    white-space: nowrap; /* 防止文字换行 */
}

.main-nav-item:last-child .main-nav-link {
    border-right: none;
}

.main-nav-link:hover,
.main-nav-link.active {
    color: #007bff;
}

/* 响应式处理 */
@media (max-width: 768px) {
    .main-nav-container {
        overflow-x: auto; /* 在小屏幕上允许横向滚动 */
        -webkit-overflow-scrolling: touch;
    }
    
    .main-nav-link {
        padding: 0 20px;
    }
}

/* 保持其他样式不变 */

/* 内容区域 */
.content-area {
    background: #fff;
}

/* 首页特定样式 */
.home-container {
    position: relative;
}

/* 首页左侧分类菜单 */
.home-category {
    margin-top: 100px;
}

.home-category h3 {
    font-size: 16px;
    margin: 0 0 15px 0;
}

/* 顶部区域包装器 */
.header-wrapper {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-top: 50px; /* 整体向下移动 */
}

/* 搜索框区域 */
.home-search {
    position: absolute;
    left: 370px;
    width: 820px;
    margin-top: 70px; /* 原来20px + 50px */
}

/* 导航区域 */
.header-nav {
    position: absolute;
    left: 1240px;
    margin-top: 70px; /* 与搜索框保持一致 */
}

.nav-list {
    display: flex;
    gap: 40px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    position: relative;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 5px 0;
}

/* 导航项悬停效果 */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #4a90e2;
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #4a90e2;
}

.nav-link:hover::after {
    width: 100%;
}

/* 当前页面激活状态 */
.nav-link.active {
    color: #4a90e2;
}

.nav-link.active::after {
    width: 100%;
}

/* 确保样式优先级 */
body .sidebar {
    position: fixed !important;
    top: 140px !important;
}

/* 首页导航 */
.home-nav {
    display: flex;
    gap: 20px;
}

.home-nav .nav-link {
    font-size: 15px;
}

/* 首页登录按钮 */
.home-login {
    margin-left: auto;
}

/* 首页内容区域 */
.home-content {
    margin-top: 20px;
}

/* 顶部头部区域样式 */
.top-header {
    position: relative;
    width: 100%;
    background: #fff;
    z-index: 100;
}

/* 登录框样式 */
.login-box {
    position: absolute;
    right: 50px; /* 距离右边距离 */
    margin-top: 70px; /* 与搜索框和导航对齐 */
}

.login-btn {
    display: inline-block;
    padding: 6px 20px;
    border: 1px solid #4a90e2;
    border-radius: 4px;
    color: #4a90e2;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.login-btn:hover {
    background: #4a90e2;
    color: #fff;
}

/* 确保样式优先级 */
body .login-box {
    position: absolute !important;
    right: 50px !important;
    margin-top: 70px !important;
}

/* 搜索框输入框样式 */
.search-input {
    width: 100%;
    height: 40px;
    padding: 0 120px 0 15px; /* 右侧留出按钮的空间 */
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none; /* 移除输入框聚焦时的默认边框 */
}

.search-input:focus {
    border-color: #4a90e2; /* 输入框聚焦时的边框颜色 */
}

/* 搜索按钮新样式 */
.search-btn {
    position: absolute;
    right: 0;
    top: 0;
    width: 100px; /* 固定按钮宽度 */
    height: 100%;
    background: #4a90e2; /* 按钮背景色 */
    color: #fff; /* 按钮文字颜色 */
    border: none;
    border-radius: 0 4px 4px 0;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease; /* 添加过渡效果 */
}

.search-btn:hover {
    background: #357abd; /* 鼠标悬停时的背景色 */
}

/* 确保样式优先级 */
body .home-search {
    position: absolute !important;
    left: 370px !important;
    transform: none !important;
    width: 820px !important;
    margin-top: 70px !important;
}

body .search-btn:hover {
    background: #357abd !important;
}

/* 固定顶部导航区域 */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    height: 120px;
}

/* 主内容区域 - 调整上边距 */
.main-content {
    margin-top: 20px;
}

/* 左侧导航样式 */
.sidebar .nav-list {
    display: block;
    padding: 0;
    margin: 0;
    list-style: none;
}

.sidebar .nav-link {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s ease;
    border-bottom: 1px solid #eee;
    white-space: nowrap; /* 确保文字不换行 */
    overflow: hidden; /* 隐藏溢出部分 */
    text-overflow: ellipsis; /* 添加省略号 */
}

.sidebar .nav-link:hover {
    background: #f5f5f5;
    color: #4a90e2;
}

.sidebar .nav-link.active {
    background: #4a90e2;
    color: #fff;
}

/* 确保样式优先级 */
body .header-nav {
    position: absolute !important;
    left: 1240px !important;
    margin-top: 70px !important;
}

/* 向左偏移的内容 */
.shifted-content {
    margin-left: 0px;
    width: calc(100% + 600px); /* 480px + 120px */
    overflow: hidden;
}

/* 保持其他样式不变 */
.main-content {
    margin-left: 300px;
    margin-top: 140px;
    margin-right: 50px;
}

/* 其他样式保持不变... */

/* 导航按钮样式 */
.category-prev,
.category-next {
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.3);
    border-radius: 50%;
}

.category-prev:after,
.category-next:after {
    font-size: 20px;
    color: #fff;
}

/* 产品列表样式 */
.product-list {
    margin-top: 20px;
}

.product-item {
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
        margin-bottom: 20px;
    transition: all 0.3s ease;
    background: #fff;
}

.product-item:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.product-item-link {
    text-decoration: none;
    color: inherit;
}

.product-img {
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img img {
    max-width: 100%;
    height: auto;
}

.product-info {
    padding: 0 20px;
}

.product-title {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 500;
}

.product-specs {
    margin-bottom: 10px;
}

.product-specs span {
    display: inline-block;
    margin-right: 20px;
    color: #666;
    font-size: 14px;
}

.product-desc {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* 分页样式 */
.pagination-wrapper {
    margin-top: 30px;
    text-align: center;
    padding: 20px 0;
}

.custom-pagination {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.page-item {
    padding: 8px 15px;
    border: 1px solid #eee;
    border-radius: 4px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
}

.page-item:hover {
    background: #f5f5f5;
    color: #4a90e2;
}

.page-status {
    color: #666;
    margin-left: 15px;
}

/* 当前页样式 */
.page-item.active {
    background: #4a90e2;
    color: #fff;
    border-color: #4a90e2;
}

/* 列表页特定的容器样式 */
.newslist-shifted-content {
    margin-left: 0px;
    width: calc(100% + 600px); /* 480px + 120px */
    overflow: hidden;
}

/* 列表页主内容区域 */
.newslist-main-content {
    margin-left: 300px;
    margin-top: 140px;
    margin-right: 50px;
    width: calc(100% + 600px); /* 480px + 120px */
    padding-left: 30px;
}

.newslist-content {
    margin-top: 20px;
}

/* 主包装容器 */
.main-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
}

/* 容器样式 */
.container {
    max-width: none;
    padding: 0;
    width: 100%;
    position: relative;
}

/* 内容盒子 */
.content-box {
    margin-left: 440px; /* 与首页保持一致 */
    margin-top: 140px;
    margin-right: 50px;
    position: relative;
}

/* 新闻列表样式 */
.news-list {
    width: 100%;
    max-width: 1310px;
}

.news-item {
    display: flex;
    padding: 15px; /* 减小内边距 */
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 15px; /* 减小底部间距 */
    transition: all 0.3s ease;
    background: #fff;
}

.news-item:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.news-item-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.news-item-left {
    flex: 0 0 200px;
    margin-right: 20px;
}

.news-item-left img {
    width: 100%;
    height: 150px; /* 从90px增加到150px */
    object-fit: cover;
    border-radius: 4px;
}

.news-item-right {
    flex: 1;
}

.news-title {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 500;
}

.news-specs {
    margin-bottom: 10px;
}

.news-specs span {
    display: inline-block;
    margin-right: 20px;
    color: #666;
    font-size: 14px;
}

.news-desc {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* 分页样式 */
.pagination-wrapper {
    margin-top: 30px;
    text-align: center;
    padding: 20px 0;
}

.custom-pagination {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.page-item {
    padding: 8px 15px;
    border: 1px solid #eee;
    border-radius: 4px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
}

.page-item:hover {
    background: #f5f5f5;
    color: #4a90e2;
}

.page-status {
    color: #666;
    margin-left: 15px;
}

/* 自定义滚动条样式 */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: block;
}

.nav-list li {
    border-bottom: 1px solid #eee;
}

.nav-link {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
} 