/* ================= 左侧分类栏 ================= */
.sidebar {width: 250px;background-color: #fff;border-right: 1px solid #e9ecef;padding:0 0 60px 0;position: relative;z-index:999}
.sidebar h2{background:var(--primary);color:white;display: flex;justify-content: center;align-items: center;line-height:1;padding:18px 0 12px 0;font-weight:400;font-size:30px;}
/* 一级分类列表 */
.category-list {list-style: none;}
.category-item {position: relative;margin-bottom:2px;}
/* 一级分类按钮样式 */
.category-title {display: block;padding:15px 14px;font-size:16px;line-height:1.2;color: #333;cursor: pointer;transition: all 0.2s ease;border-left:6px solid transparent;font-weight:500}
/* 一级分类悬停效果 */
.category-item:hover > .category-title {background-color: #f0f2f5;color:var(--secondary);border-left-color:var(--secondary);}
/* ================= 二级分类（悬停弹出） ================= */
.sub-category {position: absolute;left: 100%; /* 贴在一级分类右侧 */
    top: -50%;width:350px;background:white;border:1px solid #e9ecef;border-left: none;box-shadow: 4px 0 12px rgba(0,0,0,0.08);list-style: none;
    padding:15px 20px;display: none; /* 默认隐藏 */
    z-index:99999 !important;}
/* 悬停一级分类时显示二级 */
.category-item:hover .sub-category {display: block;z-index:99999 !important;}
/* 二级分类项样式 */
.sub-category li {padding: 12px 0;font-size: 15px;line-height:1.4;color: #666;cursor: pointer;transition: all 0.2s;border-bottom:1px solid #eeeeee;}
.sub-category li:last-child{border-bottom:0;}
.sub-category li:hover {color:var(--secondary);background-color: #f8f9fa;}
.sub-category li i{margin-right:12px;}
.sub-category li a{color:#333333;display:flex;justify-content:left;flex-wrap:nowrap;align-items:center;font-weight: 500}
.sub-category li:hover a{color:var(--secondary);}

/* ================= 右侧产品展示区 ================= */
.main-content {flex: 1; /* 占满剩余宽度 */padding:60px 40px;}
/* 九宫格网格布局 */
.product-grid {position: relative;z-index: 1;display: grid;grid-template-columns: repeat(3, 1fr); /* 强制3列 */gap: 40px; /* 卡片间距 */}
/* 产品卡片样式 */
.product-card {background-color: #fff;border: 1px solid #e9ecef;border-radius: 8px;overflow: hidden;cursor: pointer;transition: all 0.3s ease;}
/* 卡片悬停效果 */
.product-card:hover {transform: translateY(-6px);box-shadow: 0 8px 20px rgba(0,0,0,0.1);border-color:var(--primary);}
/* 产品图片 */
.product-card img {width:auto;max-width:100%;max-height:260px;height:auto;object-fit: cover; /* 保持比例裁剪 */
    background-color: #f5f5f5;}
/* 产品名称 */
.product-name {padding: 16px;text-align: center;font-size:16px;color: #333;line-height: 1.3;}














/* 产品展示区域 */
.products-section {padding: 60px 0;background-color: white; }
.products-container {display: flex;gap: 30px;}
        
/* 左侧分类列表 */
.categories-sidebar {flex: 0 0 250px;border-radius:8px;height:fit-content;position:sticky;top:1rem;z-index: 999;}
.categories-title {font-size:1.3rem;background-color:var(--primary);color: var(--white);line-height:1;
    border-bottom: 2px solid var(--light-green);padding:1.4rem 0;display: flex;justify-content: center;align-items: center;
}
.categories-list {list-style:none;}
.category-item {background-color:var(--gray-light);border-bottom:1px solid var(--white);}
.category-link {display:block;padding:.8rem 1rem;color: #555;text-decoration: none;transition:all 800ms;font-weight:400;line-height:1.4;}
.category-link:hover, .category-link.active {background-color: var(--light-green);color: var(--white);font-weight:700;}
.category-link i{margin-right:1rem;}
/*.category-item2 {background-color:var(--white);border-bottom:1px solid var(--gray-light);}
.category-link2 {display:block;padding:.6rem 2rem;color: #555;text-decoration: none;transition:all 800ms;font-weight:400;
    line-height:1.4;font-size:.96rem;}
.category-link2:hover, .category-link.active {background-color: var(--light-green);color: var(--white);font-weight:400;}
.category-link2 i{margin-right:1rem;}*/

@media (max-width: 768px) {.categories-sidebar{display:none;}}
        
/* 右侧产品网格 */
.products-grid {flex: 1 1 100%; width: 980px;}
.products-header {display: flex;justify-content: space-between;align-items: center;margin-bottom: 30px;}
.products-grid .products-title {font-size:30px;font-weight:400;color:#333333;border-bottom:1px solid #dddddd;line-height:1;display:block;width:100%;padding:15px 0;}
.products-grid .products-title i{margin-right:1rem;color:var(--primary);}
.view-options {display: flex;gap: 10px;}
.view-btn {width: 40px;height: 40px;display: flex;align-items: center;justify-content: center;border-radius: 4px;background-color: var(--gray-light);color: #666;cursor: pointer;transition: all 0.3s;}
.view-btn.active, .view-btn:hover {background-color: var(--primary-green);color: white;}
        
/* 产品网格布局 */
.grid-container {display: grid;grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));gap: 30px;}
.product-card {background-color: white;border-radius: 8px;overflow: hidden;box-shadow: 0 0 15px rgba(0,0,0,0.15);transition: all 0.3s;}
.product-card:hover {transform: translateY(-5px);box-shadow: 0 0 20px rgba(0,0,0,0.2);}
.product-image {max-height:250px;overflow:hidden;display:flex;justify-content:center;align-items:center;}
.product-image img {width:auto;height:auto;max-width: 100%;max-height: 100%;object-fit: cover;transition: transform 0.5s;}
.product-card:hover .product-image img {transform: scale(1.05);}
.product-badge {position: absolute;top: 15px;right: 15px;background-color: var(--primary-green);color: white;padding: 5px 10px;border-radius: 20px;font-size: 0.8rem;font-weight: 500;}
.products-grid .product-content {padding:0 0 20px 0;}
.products-grid .product-title {text-align:center;font-size:16px;color:#333333;margin:10px 0 20px 0;font-weight:400;line-height: 1.2;padding:0 15px;}
.product-desc {color: #666;font-size: 0.9rem;margin-bottom: 15px;line-height: 1.5;}
.products-grid .product-actions {display: flex;justify-content:center;}
.detail-btn, .inquiry-btn {padding: 5px 20px;border-radius: 4px;font-size: 0.9rem;font-weight: 500;cursor: pointer;transition: all 0.3s;box-sizing:border-box;}
.detail-btn {background-color: transparent;color: var(--primary);border: 1px solid var(--primary-blue);}
.detail-btn:hover {background-color: var(--primary-green);color: white;border: 1px solid var(--primary-green);}
.inquiry-btn {background-color: var(--primary-green);color: white;border: none;}
.inquiry-btn:hover {background-color: var(--dark-green);}
        
/* 分页控件 */
.pagination {display: flex;justify-content: center;margin-top: 50px;gap: 10px;}
.page-btn {width: 40px;height: 40px;display: flex;align-items: center;justify-content: center;border-radius: 50%;background-color: white;color: var(--gray-dark);border: 1px solid #ddd;cursor: pointer;transition: all 0.3s;}
.page-btn.active, .page-btn:hover {background-color: var(--primary-green);color: white;border-color: var(--primary-green);}
        
/* 产品筛选 */
.product-filters {background-color: white;border-radius: 8px;box-shadow: 0 5px 15px rgba(0,0,0,0.05);padding: 20px;margin-bottom: 30px;}
.filter-title {font-size: 1.1rem;color: var(--gray-dark);margin-bottom: 15px;}
.filter-options {display: flex;flex-wrap: wrap;gap: 10px;}
.filter-btn {padding: 8px 15px;background-color: var(--gray-light);color: #666;border: none;border-radius: 20px;cursor: pointer;transition: all 0.3s;}
.filter-btn.active, .filter-btn:hover {background-color: var(--primary-green);color: white;}
        
/* 响应式设计 */
@media (max-width: 992px) {
    .products-container {flex-direction: column;}
.categories-sidebar {flex: 1;position: static;margin-bottom: 30px;}
}
@media (max-width: 768px) {
    .products-section{padding:5vw 0;}
    .grid-container {grid-template-columns: repeat(auto-fill, minmax(46%, 1fr));margin-bottom:8vw;}
    .products-grid{width:100%;}
    .products-grid .products-title{font-size:5vw;border:0;}
    .product-card{}
    .product-image{}
    .products-grid .product-content{padding-bottom:0;}
    .products-grid .product-title{font-size:3vw;line-height:1.5;margin:1vw 0;}
    .products-grid .product-actions{display:none;}
}




































    .product-detail {margin-left:2rem;}
    /* 产品展示区 */
    .product-detail-content {display: flex;justify-content: left;gap: 50px;}
    #products-grid .product-detail-content {display:block;width:100%;margin-bottom:10px;}

    /* 图片区域 */
    .product-detail-images {border: 1px solid #dddddd;border-radius: 8px;overflow: hidden;flex:1 1 480px;padding:10px;width: 480px;}
    /*.product-detail-images .Swiper,.product-detail-images .swiper-wrapper,.product-detail-images .swiper-slide{position:static !important;transform: none !important;}*/
    .product-detail-images .mySwiper2 {width:100%;max-height:350px;}
    .product-detail-images .mySwiper2 .swiper-slide{cursor: zoom-in;}
    .product-detail-images .mySwiper2 .swiper-slide img {display:block;width:auto;height:auto;max-width:100%;max-height:350px;object-fit:cover;margin:auto;border-radius: 8px;}
    .product-detail-images .mySwiper {box-sizing: border-box;padding: 10px 0;}
    .product-detail-images .mySwiper .swiper-slide {width: 25%;opacity: 0.4;cursor:pointer;}
    .product-detail-images .mySwiper .swiper-slide-thumb-active {opacity:1;}
    .product-detail-images .mySwiper .swiper-slide img {display:block;width:auto;height:auto;max-width:100%;object-fit:cover;border-radius: 5px;max-height:82px;margin:auto;}

    /* 产品信息区域 */
    .product-detail-info {padding: 10px;flex:1 1 500px;text-align:left;}
    .product-detail-name {font-size: 24px;margin-bottom: 15px;line-height: 1.3;}
    .product-detail-no {color: #666;font-size: 14px;margin-bottom: 20px;padding-bottom: 15px;border-bottom: 1px dashed #eee;}
    .product-detail-price {font-size: 24px;color: #172B4D;margin: 20px 0;font-weight:300;}
    .product-detail-price a{color: #172B4D;}
    .product-detail-price a:hover{color: #007aff;}
    /* 规格参数 */
    .specs-title {font-size:1.2rem;line-height:1;margin:30px 0;padding:.8rem 1rem .8rem 1rem;border-left:.5rem solid #2f80ed;background-color:var(--gray-light);}
    .specs-table {width: 100%;border-collapse: collapse;margin-bottom: 30px;}
    .specs-table tr {border-bottom: 1px solid #dddddd;}
    .specs-table td {padding: 12px 10px;}
    .specs-table td:first-child {width: 30%;color: #666;background: #f9f9f9;}
    /* 详细介绍 */
    .detail-section {margin:50px 0;}
    .detail-title {font-size:24px;font-weight:500;color:#333333;line-height:2;text-align:left;border-bottom:3px solid #2f80ed;}
    .detail-content {word-wrap:break-word;cursor:text;font-size: 16px;padding:15px;}
    .detail-content img{max-width:100%;}
    .detail-content p {margin:5px 0;}
    .detail-content hr {margin:15px 0;border:1px solid #ddd;}
    .detail-content h1,.detail-content h2,.detail-content h3,.detail-content h4,.detail-content h5,.detail-content h6{font-weight:500;}

        /* 表格样式优化 */
    .detail-content table {width: 100%;border-collapse: collapse;margin: 30px 0;box-shadow: 0 2px 10px rgba(0,0,0,0.05);overflow: hidden;border-radius: 6px;}
    .detail-content th, 
    .detail-content td {padding: 15px 20px;text-align: left;border-bottom: 1px solid #dddddd;}
    .detail-content th {background-color: var(--light-blue);color: var(--gray-dark);font-weight: 600;}
    .detail-content tr:hover {background-color: var(--light);}
    .detail-content tr:last-child td {border-bottom: none;}

.detail-content table,
.detail-content table td,
.detail-content table th {
  border: 1px solid #000 !important; /* 1px 实线 黑色 !important 强制生效 */
  border-collapse: collapse; /* 关键：合并边框，消除间隙 */
}


/* 响应式设计优化 */
@media (max-width: 992px) {
    .product-detail-price{font-size:5vw}
    /* 详细内容区域样式 */
    .detail-content{padding:5vw 0 !important;}
    .detail-content .section-title {text-align: center;margin-bottom: 50px;padding-bottom: 20px;position: relative;}
    .detail-content .section-title p {font-size:3.6vw;color: var(--gray-600);max-width:1200px;margin: 0 auto;}
}





    /* 无产品提示 */
    .no-product {text-align: center;padding: 100px 0;color: #999;}
    .no-product button {margin-top: 20px;padding: 8px 20px;background: #2f80ed;color: white;border: none;border-radius: 4px;cursor: pointer;}

    .product-detail{}
    .product-detail .btn a{color:white;display:inline-block;margin:auto;font-weight:500;text-align:center;
    background-color:var(--primary-green);;padding:8px 20px;text-decoration: none;
    border-radius: 4px;}
    .product-detail .btn a:hover{background-color: var(--primary);}

    @media (max-width: 768px) {
        .product-detail-detail {margin-left:0;}
        .product-detail-content {grid-template-columns: 1fr;}
        .product-detail-detail .btn{display:none;}
        .products-section{padding-bottom:0;}
        .promore{display: none;}


        .product-detail{margin:0;}
        .product-detail-content{display:block;gap:0;}
        .product-detail-images{width:100% !important;}
        .product-detail-name{font-size:4vw;font-weight:500;line-height:1.5;}

        .specs-title{font-size:4vw;font-weight:500;}

        .detail-section{width:100%;margin:0;padding:0;}
        .detail-content{padding:3vw !important;font-size:3.6vw;line-height:1.4;text-align: start;}
        .detail-section p{font-size:3.6vw;line-height:1.4;text-align: start;}

  table {
    width: 100% !important;min-width:100% !important;
    display: block !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch !important; /* 苹果流畅滑动 */
    border-radius:0;
  }

    }


/* 让表格内容不被挤压变形 */
td, th {
  /*white-space: nowrap !important;*/
  padding: 8px 6px !important;
}






















/* Swiper 区域样式 */
.swiper-section {position:relative;min-width:1200px;max-width:1600px;margin:auto;padding:30px 0 80px 0;}
.swiper-section .swiper-container {width:100%;overflow:hidden;width:90%;margin:auto;padding:0 0 15px 0;}
#productsSwiper .swiper-wrapper {display: flex;transition: transform 0.3s ease-out;}
#productsSwiper .swiper-slide {flex-shrink: 0;margin-right: 20px;}
#productsSwiper .product-card {border-radius: 8px;overflow: hidden;box-shadow: 0 0 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;text-decoration: none; /* 继承自a标签的样式 */display: block; /* 确保a标签作为块级元素显示 */}
#productsSwiper .product-card:hover {box-shadow: 0 0 20px rgba(0,0,0,0.1); /* 悬停效果 */
    transform: translateY(-2px);}
#productsSwiper .product-image-container {display:flex;justify-content:center;align-items:center;}
#productsSwiper .product-image {width:auto;height:auto;max-width: 100%;max-height: 100%;object-fit: cover;
    transition: transform 0.5s ease;}
#productsSwiper .product-card:hover .product-image {transform: scale(1.05); /* 图片悬停放大效果 */}
#productsSwiper .product-content {padding: 15px;text-align: center;}
#productsSwiper .product-title {font-size: 15px;line-height:1.4;font-weight:400;color: #333;margin: 0 0 20px 0;text-align: center;}
#productsSwiper .product-description {display:none;font-size: 13px;color: #666;margin: 0 0 10px 0;line-height: 1.4;}
#productsSwiper .product-price {font-size: 15px;color: #165DFF;font-weight: 600;}
#productsSwiper .swiper-button-prev,#productsSwiper .swiper-button-next {}
#productsSwiper .swiper-button-prev {left: -15px;}
#productsSwiper .swiper-button-next {right: -15px;}

@media (max-width: 768px) {
.swiper-section{max-width:90vw !important;margin:auto;min-width:320px !important;}
.swiper-section .swiper-container{padding:0;}
#productsSwiper .product-image-container{height:auto;}
.recommended-products {width:90%;margin:5vw auto;}
.categories-container{display:none !important;}
}
