/* 产品网格容器 */
.hy-product-grid {
    display: grid;
    gap: 60px; /* 增加卡片间距以匹配新阴影 */
    width: 100%;
}
.hy-product-grid.hy-columns-1 { grid-template-columns: repeat(1, 1fr); }
.hy-product-grid.hy-columns-2 { grid-template-columns: repeat(2, 1fr); }
.hy-product-grid.hy-columns-3 { grid-template-columns: repeat(3, 1fr); }
.hy-product-grid.hy-columns-4 { grid-template-columns: repeat(4, 1fr); }

/* 单个产品卡片 */
.hy-product-item {
    background: #fff;
    border-radius: 10px !important; /* 圆角 */
    border: none !important; /* 去掉边框 */
    overflow: hidden; /* 确保子元素圆角生效 */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* 你指定的阴影效果 */
    box-shadow: -10px 10px 20px 10px rgba(0, 0, 0, .1);
    display: flex;
    flex-direction: column; /* 垂直布局：图片在上，内容在下 */
    height: 100%; /* 让卡片撑满高度 */
}
.hy-product-item:hover {
    transform: translateY(-5px); /* 悬停时轻微上浮 */
    box-shadow: -15px 15px 30px 15px rgba(0, 0, 0, .15); /* 悬停时阴影加深 */
}

/* 图片区域 */
/* 图片容器 - 关键：强制16:9比例 */
.hy-product-image {
    position: relative;
    width: 100%;
    padding-top: 60%; /* 这就是16:9的比例计算 (9 / 16 = 0.5625 = 56.25%) */
    overflow: hidden;
    border-radius: 10px 10px 0 0 !important; /* 保持上方的圆角 */
    flex-shrink: 0; /* 防止容器被压缩 */
}

/* 图片本身 - 关键：填充整个容器并智能裁剪 */
.hy-product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100% !important;
    object-fit: cover; /* 核心属性：保持图片比例并裁剪以填满容器 */
    display: block;
    border-radius: 0 !important; /* 移除图片自身的圆角，让容器控制 */
}

/* 内容区域 - 核心 */
.hy-product-content {
    flex-grow: 1; /* 占据剩余空间 */
    padding: 20px;
    position: relative; /* 为右下角的More链接提供定位基准 */
    border-style: solid;
    border-width: 10px 0 0 0; /* 仅上边框，宽度10px */
    /* border-color 在PHP中动态内联设置 */
    display: flex;
    flex-direction: column;
}

/* 产品标题 */
.hy-product-title {
    font-size: 1.2em;
    font-weight: bold;
    margin: 0 0 10px 0; /* 与描述拉开距离 */
    color: #333;
    line-height: 1.4;
}

/* 产品短描述 */
.hy-product-short-desc {
    color: #666;
    line-height: 1.6;
    margin-top: 30px;
    margin-bottom: 40px; /* 为More链接留出底部空间 */
    flex-grow: 1; /* 描述文字部分自动撑开，将More推到最下 */
}

/* More链接 */
.hy-product-more-link {
    align-self: flex-end; /* 靠右 */
    margin-top: auto; /* 确保它被推到最底部 */
    color: #1f1f1f;
    text-decoration: underline !important;
    font-size: 1.0em;
    font-weight: 800;
}
.hy-product-more-link:hover {
    color: #000;
}

/* 主题色指示器（如果你还保留之前那个横条的话） */
.hy-product-color-indicator {
    height: 3px;
    border-radius: 0 0 10px 10px; /* 底部圆角，与卡片匹配 */
}

/* 响应式调整：小屏幕下减少列数和阴影 */
@media (max-width: 768px) {
    .hy-product-grid.hy-columns-3,
    .hy-product-grid.hy-columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .hy-product-item {
        box-shadow: -5px 5px 15px 5px rgba(0, 0, 0, .1);
    }
}
@media (max-width: 480px) {
    .hy-product-grid.hy-columns-2,
    .hy-product-grid.hy-columns-3,
    .hy-product-grid.hy-columns-4 {
        grid-template-columns: 1fr;
    }
}