/* ========== 产品列表页特有样式 ========== */

/* 页面Banner（含搜索框） */
.page-banner {
    background: linear-gradient(135deg, #1a5aaa 0%, #0e3d6e 100%);
    padding: 40px 0;
    color: #fff;
    text-align: center;
}
.page-banner h1 {
    font-size: 36px;
    margin-bottom: 8px;
}
.page-banner p {
    font-size: 16px;
    opacity: 0.8;
}
.breadcrumb {
    margin-top: 15px;
    font-size: 14px;
}
.breadcrumb a {
    color: #fff;
    text-decoration: none;
}
.breadcrumb span {
    margin: 0 8px;
}

/* 搜索框样式 */
.search-area {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}
.search-box {
    display: flex;
    width: 420px;
    border-radius: 50px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.search-box form {
    display: flex;
    width: 100%;
    margin: 0;
    padding: 0;
}
.search-box input {
    flex: 1;
    border: none;
    padding: 14px 20px;
    font-size: 14px;
    outline: none;
    color: #333;
}
.search-box input::placeholder {
    color: #999;
    font-size: 14px;
}
.search-box button {
    width: 60px;
    background: #1a5aaa;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.search-box button:hover {
    background: #0e4a8a;
}
.search-box button svg {
    width: 20px;
    height: 20px;
    stroke: #fff;
}
@media (max-width: 768px) {
    .search-box { width: 90%; max-width: 360px; }
    .search-box input { padding: 12px 16px; }
    .search-box button { width: 50px; }
}

/* 主要内容区 */
.main-content {
    padding: 50px 0;
}
.product-layout {
    display: flex;
    gap: 40px;
}

/* 左侧分类导航 */
.left-nav {
    width: 280px;
    flex-shrink: 0;
    background: #162940;
    border-radius: 12px;
    overflow: hidden;
    color: #fff;
    max-height: 800px;
    display: flex;
    flex-direction: column;
}
.nav-title {
    background: #1a5aaa;
    text-align: center;
    padding: 20px 0;
}
.nav-title .en {
    font-size: 28px;
    letter-spacing: 2px;
}
.nav-title .cn {
    font-size: 18px;
    margin-top: 5px;
}
.nav-list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    list-style: none;
}
.nav-list::-webkit-scrollbar {
    width: 4px;
}
.nav-list::-webkit-scrollbar-track {
    background: #253858;
}
.nav-list::-webkit-scrollbar-thumb {
    background: #1a5aaa;
    border-radius: 4px;
}
.nav-item {
    border-bottom: 1px solid #253858;
}
.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    transition: background 0.2s;
}
.nav-header:hover {
    background: #1e3a5f;
}
.nav-name {
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
}
.nav-name:hover {
    color: #40a9ff;
}
.nav-arrow {
    font-size: 12px;
    transition: transform 0.2s;
}
.nav-item.open .nav-arrow {
    transform: rotate(180deg);
}
.nav-child {
    list-style: none;
    background: linear-gradient(to bottom, rgba(30,58,95,0.9), #0f2a40);
    display: none;
    padding: 0;
    margin: 0;
}
.nav-child li {
    display: block;
    width: 100%;
    padding: 10px 20px 10px 45px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
    box-sizing: border-box;
}
.nav-child li a {
    color: #ccc;
    text-decoration: none;
    display: block;
}
.nav-child li a:hover {
    color: #40a9ff;
}
.nav-child li:hover {
    background: #254677;
}
.nav-child li.active a {
    color: #40a9ff;
}
.nav-child li.active {
    background: #254677;
}
.nav-item.active > .nav-header {
    background: #1e3a5f;
}
.nav-item.active > .nav-header .nav-name {
    color: #40a9ff;
}
.phone-contact {
    padding: 20px;
    text-align: center;
    border-top: 1px solid #253858;
}
.phone-contact .title {
    font-size: 14px;
    color: #fff;
}
.phone-contact .number {
    font-size: 20px;
    font-weight: bold;
    color: #fff;
}

/* 右侧产品列表 */
.product-right {
    flex: 1;
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}
.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.12);
}
.product-img {
    aspect-ratio: 1 / 1;
    overflow: hidden;
}
.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.product-card:hover .product-img img {
    transform: scale(1.05);
}
.product-info {
    padding: 12px;
    text-align: center;
}
.product-desc {
    font-size: 12px;
    color: #999;
    margin-bottom: 4px;
}
.product-name {
    font-size: 14px;
    font-weight: 600;
}
.product-name a {
    text-decoration: none;
    color: #1f2937;
}
.product-name a:hover {
    color: #1a5aaa;
}

/* 分页样式 */
.pagination {
    margin-top: 40px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}
.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    background: #fff;
    border-radius: 8px;
    text-decoration: none;
    color: #4a5568;
    font-size: 14px;
    border: 1px solid #e2edf7;
    transition: all 0.2s;
    cursor: pointer;
}
.pagination a.active,
.pagination span.active {
    background: #1a5aaa;
    color: #fff;
    border-color: #1a5aaa;
    box-shadow: 0 2px 6px rgba(26,90,170,0.2);
}
.pagination a:hover:not(.disabled):not(.active) {
    background: #ecf5fd;
    border-color: #b9d3f2;
    color: #1a5aaa;
}
.pagination a.disabled,
.pagination span.disabled {
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
    background: #f8fafc;
}

/* 响应式适配 */
@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 768px) {
    .product-layout {
        flex-direction: column;
    }
    .left-nav {
        width: 100%;
        max-height: none;
    }
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}
/* ========== 强制修复分页样式（解决缓存/覆盖问题） ========== */
#pagination a,
#pagination span {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    background: #fff !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    color: #4a5568 !important;
    font-size: 14px;
    border: 1px solid #e2edf7 !important;
    transition: all 0.2s;
    cursor: pointer;
}

#pagination a.active,
#pagination span.active {
    background: #1a5aaa !important;
    color: #fff !important;
    border-color: #1a5aaa !important;
    box-shadow: 0 2px 6px rgba(26,90,170,0.2);
}

#pagination a:hover:not(.disabled):not(.active) {
    background: #ecf5fd !important;
    border-color: #b9d3f2 !important;
    color: #1a5aaa !important;
}

#pagination a.disabled,
#pagination span.disabled {
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
    background: #f8fafc !important;
}
/* 强制修复左侧导航悬停时字体为白色（蓝底白字） */
.left-nav .nav-header:hover .nav-name,
.left-nav .nav-child li:hover a,
.left-nav .nav-child li a:hover,
.left-nav .nav-item .nav-child li a:hover {
    color: #ffffff !important;
}

/* 确保一级菜单悬停也是白字 */
.left-nav .nav-item .nav-header:hover .nav-name {
    color: #ffffff !important;
}

/* 二级菜单默认浅灰，悬停白字 */
.left-nav .nav-child li a {
    color: #cccccc !important;
}
.left-nav .nav-child li a:hover {
    color: #ffffff !important;
}
/* 产品中心 - 过渡模块面包屑链接悬停颜色保持白色 */
.product-detail-banner .breadcrumb a:hover {
    color: #fff !important;
    text-decoration: underline;
}