/* 产品图片显示修复样式 */

/* 修复产品列表页面的图片显示问题 */
.products_main .product_image {
    height: 40rem !important;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    padding: 15px;
    margin-bottom: 15px;
}

.products_main .product_image img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    transition: transform 0.3s ease;
}

/* 悬停效果 */
.products_main .product_item:hover .product_image img {
    transform: scale(1.05) !important;
}

/* 确保图片容器有明确的尺寸 */
.products_list .product_image {
    width: 40rem;
    max-height: 40rem;
    margin: 3rem auto;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .products_main .product_image {
        height: 180px !important;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .products_main .product_image {
        height: 160px !important;
        padding: 8px;
    }
}

/* 图片加载失败时的样式 */
.products_main .product_image img[alt*="图片加载失败"],
.products_main .product_image img[src=""],
.products_main .product_image img:not([src]) {
    background: #f0f0f0;
    border: 2px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
}

/* 移除了图片加载中的占位符，不需要loading效果 */

/* 确保产品卡片的整体布局 */
.products_main .product_item {
    background: #ffffff;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0);
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.products_main .product_item:hover {
    box-shadow: 0 2px 8px rgb(152 180 245 / 19%);
}

.products_main .product_item:hover * {
    color: #0A5DCB !important;
}

.products_main .product_item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* 产品信息区域 */
.products_main .product_info {
    padding: 2rem;
}

.products_main .product_title {
    font-size: 2rem;
    font-weight: 400;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.6;
    text-align: center;
    font-family: sans-serif;
}

.products_main .product_desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
}

.products_main .product_btn {
    /* display: inline-block; */
    /* background: #007bff; */
    /* color: white; */
    /* padding: 8px 16px; */
    /* border-radius: 4px; */
    /* text-decoration: none; */
    /* font-size: 14px; */
    /* transition: background 0.3s ease; */
}

.products_main .product_btn:hover {
    background: #0056b3;
    color: white;
    text-decoration: none;
}

/* 调试样式 - 可以临时启用来检查问题 */
/*
.products_main .product_image {
    border: 2px solid red !important;
}

.products_main .product_image img {
    border: 2px solid blue !important;
}
*/
