/* custom.css - 自定义样式 */
/* index.htm优化性能的基础样式 */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}
img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
    border-style: none;
}
.tab-normal .media-body h2 a {
    display: -webkit-box;
    -webkit-line-clamp: 1; /* 限制显示2行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 2.6em; /* 2行文字的高度 */
    line-height: 2.6em; /* 行高 */
}
/* 产品推荐样式 - 最终调整 */
.product-recommend {
    background: linear-gradient(135deg, #66A2FB 50%, #00DCE0 50%);
    padding: 10px 0; /* 上下30px，左右0 */
    margin-top: -11px; /* 上移10px减少与轮播的间距 */
}

/* 轮播广告与产品推荐之间的间距调整 */
.layout.bg-gray + .product-recommend {
    margin-top: -33px; /* 进一步减少与轮播的间距 */
}

.tab-normal .item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    margin-bottom: 15px;
}
.tab-normal .item:hover {
    transform: translateY(-5px);
}
.tab-normal .item img {
    border-radius: 12px 12px 0 0;
}
.tab-normal .media-body {
    padding: 15px;
    border-radius: 0 0 12px 12px;
    background: #fff;
}

/* 调整产品推荐内部间距 */
.product-recommend .blank-middle {
    margin: 0px 0; /* 减少内部空白区域 */
}
.product-recommend .blank-large {
    margin: 10px 0; /* 底部间距适当减小 */
}
/* 新闻动态图片优化 */
.img-new-h {
    width: 100%;
    height: 400px;
    object-fit: cover;
    object-position: center;
    border-radius: 12px;
    overflow: hidden;
}  
.home-news-l, 
.home-news-r {
    padding-left: 30px;
    padding-right: 30px;
}
.img-new-h {
    width: 100%;
    height: 360px;
    object-fit: cover;
    object-position: center;
}
.img-new-w {
    width: 100%;
    height: 120px;
    object-fit: cover;
    object-position: center;
}

/* 轮播广告样式优化 */
.slides .owl-carousel {
    overflow: hidden;
}
.slides .item {
    position: relative;
    padding-top: 32%; /* 600/1920×100% 保持比例 */
}
.slides .item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: opacity 0.5s ease;
    opacity: 0;
}
.slides .item img.loaded {
    opacity: 1;
}
.slides {
    margin-top: -4px; /* 新增上边距 */
    overflow: hidden;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .slides {
        margin-top: 13px;
    }
}
/* 病理技术解决方案样式 */
.solution-bg {
    background: linear-gradient(135deg, #6e8efb 0%, #a777e3 100%);
    padding: 60px 0;
}
.solution {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}
.x4 {
    padding: 0 10px 20px;
    width: 33.33%;  /* 3列布局 */
    box-sizing: border-box;
}
.solution-item {
    background: transparent !important;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: none !important;
    transition: transform 0.3s;
    height: 100%;
}
.solution-link {
    display: block;
    height: 100%;
    background: transparent !important;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: none !important;
    transition: all 0.3s ease;
}
.solution-link:hover {
    transform: translateY(-5px);
}
.square-img-container {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    background: transparent;
    overflow: hidden;
}
.square-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.solution-link:hover .square-img {
    transform: scale(1.05);
}
.solution-content {
    padding: 20px;
    text-align: center;
    background: white !important;
    border-radius: 0 0 8px 8px;
    margin-top: -5px;
}
.solution-title {
    color: #333 !important;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.solution-desc {
    color: #666 !important;
    font-size: 14px;
    line-height: 1.5;
    height: 42px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 15px;
}
.solution-more {
    display: inline-block;
    color: white !important;
    background: linear-gradient(135deg, #6e8efb, #a777e3) !important;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s;
}
.solution-link:hover .solution-more {
    background: linear-gradient(135deg, #5d7de8, #9a6ad8) !important;
}
/* 响应式调整 */
@media (max-width: 768px) {
    .img-new-h {
        height: 240px;
    }
    .img-new-w {
        height: 100px;
    }
    .solution-bg {
        padding: 30px 0;
    }
    .x4 {
        width: 50%;
    }
    .product-title {
        font-size: 14px;
    }
    .product-img-container {
        padding: 8px 8px 0 8px;
    }
    .product-title-container {
        padding: 12px;
    }
}
@media (max-width: 480px) {
    .x4 {
        width: 100%;
    padding: 0 10px 15px;
    }
    .solution-title {
        font-size: 16px;
    }
    .solution-desc {
        font-size: 13px;
    }
}



/* 主容器样式 */
.layout.bg-gray {
    background: #f8f8f8;
    padding: 4px 0 12px;
}

/* ===== 导航菜单 ===== */
.nav-container {
    background: #fff;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    display: flex;
    justify-content: center;
}

.nav-tree {
    display: inline-flex;
    padding: 0;
    margin: 0 auto;
    list-style: none;
    max-width: 100%;
    flex-wrap: nowrap;
}

.nav-tree > li {
    position: relative;
    flex-shrink: 0;
}

.nav-tree > li > a {
    display: inline-flex;
    align-items: center;
    padding: 0 22px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 16px;
    letter-spacing: 1px;
    height: 60px;
    white-space: nowrap;
}

.nav-tree > li > a:hover,
.nav-tree > li > a.active {
    color: #e74c3c;
}

.nav-tree > li > ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    z-index: 100;
    padding: 5px 0;
    border-radius: 8px;
    margin-top: 5px;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    pointer-events: none;
}

.nav-tree > li:hover > ul {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

/* ===== 产品列表 ===== */
.product-list {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -12px;
    justify-content: flex-start;
}

.product-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    width: calc(33.333% - 24px);
    margin: 0 12px 24px;
    background: #fff;
    position: relative;
}

/* 安全添加的悬浮效果（不影响原有布局） */
.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.product-image {
    width: 100%;
    padding-top: 100%;
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
    margin-bottom: 12px;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* 安全添加的图片悬浮效果 */
.product-card:hover .product-image img {
    transform: scale(1.02);
}

.product-content {
    padding: 0 16px 16px;
}

.product-title {
    font-size: 16px;
    line-height: 1.5;
    color: #111;
    margin-bottom: 12px;
    height: 72px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    font-weight: 600;
}

.price-info {
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.text-price {
    color: #ff4d4f;
    font-weight: bold;
    font-size: 18px;
}

.product-views {
    color: #999;
    font-size: 14px;
    display: flex;
    align-items: center;
}

/* ===== 分页样式 ===== */
.pagination-wrapper {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    width: 100%;
}

.pagination {
    display: inline-flex;
    list-style: none;
    padding: 0;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    background: #fff;
    flex-wrap: nowrap;
}

.pagination li {
    margin: 0;
    display: flex;
}

.pagination li a,
.pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    color: #555;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    background: #fff;
    border: 1px solid #eaeaea;
    border-right: none;
    transition: all 0.3s;
}

.pagination li:first-child a,
.pagination li:first-child span {
    border-radius: 8px 0 0 8px;
    padding-left: 18px;
}

.pagination li:last-child a,
.pagination li:last-child span {
    border-radius: 0 8px 8px 0;
    border-right: 1px solid #eaeaea;
    padding-right: 18px;
}

.pagination li a:hover {
    background: #f8f8f8;
    color: #1890ff;
}

.pagination li.active span,
.pagination li.active a {
    background: #1890ff;
    color: #fff;
    border-color: #1890ff;
    font-weight: 600;
}

/* ===== 响应式设计 ===== */
@media (max-width: 1200px) {
    .nav-tree > li > a {
        padding: 0 18px;
        font-size: 15px;
    }
}

@media (max-width: 992px) {
    .nav-container {
        justify-content: flex-start;
        overflow-x: auto;
        padding: 0 15px;
    }
    .product-card {
        width: calc(50% - 24px);
    }
    .pagination li a,
    .pagination li span {
        min-width: 38px;
        padding: 0 12px;
    }
}

@media (max-width: 768px) {
    .nav-tree > li > a {
        padding: 0 15px;
        height: 52px;
    }
}

@media (max-width: 576px) {
    .product-card {
        width: calc(100% - 24px);
    }
    .product-title {
        height: auto;
        -webkit-line-clamp: 2;
    }
    .pagination li a,
    .pagination li span {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 14px;
    }
}


