/* 产品布局修复 CSS */

/* 修复产品网格布局错位问题 */
.pc5Section4 .row.cust-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.pc5Section4 .col-sm-6.col-md-4 {
    display: flex;
    flex-direction: column;
    padding: 0 15px;
    margin-bottom: 30px;
}

/* 产品盒子样式 */
.c1ProductBox {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
}

.c1ProductBox:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* 产品图片容器 */
.c1ProductImg {
    position: relative;
    width: 100%;
    height: 300px;
    background: #fff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 重置图片的HTML属性，使用CSS控制 */
.c1ProductImg img {
    width: auto !important;
    height: auto !important;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
    display: block;
}

.c1ProductImg:hover img {
    transform: scale(1.05);
}

/* 额外的图片显示保障 */
.c1ProductImg a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* 确保图片在所有情况下都完整显示 */
.c1ProductImg img {
    border: none;
    outline: none;
    vertical-align: middle;
}

/* 防止图片被拉伸变形 */
.c1ProductImg img[width],
.c1ProductImg img[height] {
    width: auto !important;
    height: auto !important;
}

/* 最强制的图片显示规则 - 覆盖所有其他样式 */
.pc5Section4 .c1ProductImg img,
.c1ProductBox .c1ProductImg img,
div.c1ProductImg img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    display: block !important;
    margin: 0 !important;
}

/* 为了确保在所有浏览器中正确显示 */
.c1ProductImg {
    line-height: 0;
}

.c1ProductImg img {
    vertical-align: top;
}

/* 产品内容区域 */
.c1ProductContent {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* 产品标题 */
.c1ProductTitle {
    margin-bottom: 10px;
    min-height: 48px; /* 确保标题区域高度一致 */
    display: flex;
    align-items: center;
}

.c1ProductTitle a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.c1ProductTitle a:hover {
    color: #0052a8;
}

/* 产品描述文本 */
.c1ProductText {
    flex-grow: 1;
    margin-bottom: 20px;
}

.c1ProductText p {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 产品按钮 */
.c1ProductBtn {
    margin-top: auto;
}

.c1ProductBtn a {
    display: inline-block;
    background: #0052a8;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
}

.c1ProductBtn a:hover {
    background: #003d7a;
    color: #fff;
}

/* 清除浮动修复 */
.clearfix.visible-sm {
    display: none !important;
}

/* 响应式设计 */
@media (max-width: 991px) and (min-width: 768px) {
    .pc5Section4 .col-sm-6.col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (min-width: 992px) {
    .pc5Section4 .col-sm-6.col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

@media (max-width: 767px) {
    .pc5Section4 .col-sm-6.col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .c1ProductImg {
        height: 350px;
    }
    
    .c1ProductImg img {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
        object-fit: contain !important;
    }
}

/* 确保容器正确对齐 */
.pc5Section4 .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 标题样式 */
.pc5Section4 h2 {
    color: #333;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 50px;
}

/* 添加一些间距 */
.paddTop70 {
    padding-top: 70px;
}

.paddBottom30 {
    padding-bottom: 30px;
}

.paddBottom10 {
    padding-bottom: 10px;
}

/* 移除aspect-ratio，使用固定高度确保图片完整显示 */

/* 终极图片显示修复 - 最高优先级 */
#pc5Section4 .c1ProductImg img,
.pc5Section4 .c1ProductBox .c1ProductImg img,
.pc5Section4 .col-sm-6.col-md-4 .c1ProductImg img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    flex-shrink: 0 !important;
}

/* 确保容器不会限制图片 */
#pc5Section4 .c1ProductImg,
.pc5Section4 .c1ProductBox .c1ProductImg,
.pc5Section4 .col-sm-6.col-md-4 .c1ProductImg {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    position: relative !important;
    height: 300px !important;
}
