/* 产品展示区域基础样式 */
.product {
    padding: 30px 0;
    background-color: #f9f9f9;
}

.product .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 产品列表样式 */
.product-both {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    margin-left: -15px;
    margin-right: -15px;
}

.product-both li {
    padding: 0 15px;
    margin-bottom: 30px;
    box-sizing: border-box;
}

/* 产品卡片容器 */
.product-con {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-con:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

/* 产品名称样式 */
.product-name {
    padding: 12px 15px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 图片容器 - 核心自适应样式 */
.product-cl-img {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 比例，可根据需要调整 */
    overflow: hidden;
    flex-grow: 1;
}

.product-cl-img a {
    display: block;
    height: 100%;
}

/* 图片自适应处理 */
.product-cl-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保持比例并填充容器，裁剪多余部分 */
    transition: transform 0.5s ease;
}

.product-con:hover .product-cl-img img {
    transform: scale(1.05); /* 悬停时轻微放大 */
}

/* 响应式调整 - 针对不同屏幕尺寸优化 */
@media (max-width: 991px) {
    /* 中等屏幕下的调整 */
    .product-name {
        font-size: 15px;
    }
}

@media (max-width: 767px) {
    /* 小屏幕下的调整 */
    .product {
        padding: 20px 0;
    }
    
    .product-both li {
        margin-bottom: 20px;
    }
    
    .product-name {
        padding: 10px 12px;
        font-size: 14px;
    }
}

/* 确保图片在极小型设备上正常显示 */
@media (max-width: 575px) {
    .product-cl-img {
        padding-top: 80%; /* 稍微调整比例适应小屏幕 */
    }
}
