/**
 * 产品卡片样式 2
 * - 产品区：标题 +「浏览所有产品」| 测量筛选 | 卡片网格
 * - 卡片视觉与公共样式 1（.pc-card）一致：外框 330×500，图区高 205，文字块 295
 */

/* 产品区：标题 + 浏览所有产品 | 筛选 | 卡片网格 */
.hh-products-section {
    padding: 32px 0 72px 0;
    background-color: #ffffff;
}

.hh-products-inner {
    max-width: 1480px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.hh-products-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 26px 0 18px 0;
    margin-bottom: 18px;
}

.hh-products-title {
    font-size: 44px;
    font-family: "HarmonyOS Sans SC Light";
    font-weight: normal;
    color: #132A3E;
    margin: 0;
}

.hh-products-browse {
    font-size: 18px;
    color: #00A1E9;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hh-products-browse:hover {
    text-decoration: underline;
}

.hh-products-arrow {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid currentColor;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
}

.hh-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
}

.hh-filter-btn {
    padding: 8px 14px;
    font-size: 16px;
    color: #132A3E;
    background-color: #ffffff;
    border: 1px solid #000000;
    border-radius: 0;
    cursor: pointer;
}

.hh-filter-btn:hover,
.hh-filter-btn.active {
    color: #ffffff;
    background-color: #00233d;
    border-color: #00233d;
}

.hh-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 330px);
    gap: 12px;
    justify-content: center;
    margin: 0;
    padding: 0;
}

/*
 * ========== 产品卡区五档 ==========
 * Phone≤767 | Small 768–1024 | Mid 1025–1439 | Large 1440–1679 | XLarge≥1680
 */

@media screen and (max-width: 1679px) {
    .hh-products-title {
        font-size: max(var(--kyd-text-sm-min, 14px), calc(44px * var(--kyd-text-scale, 1)));
    }
    .hh-products-browse {
        font-size: max(var(--kyd-text-sm-min, 14px), calc(18px * var(--kyd-text-scale, 1)));
    }
    .hh-filter-btn {
        font-size: max(var(--kyd-text-sm-min, 14px), calc(16px * var(--kyd-text-scale, 1)));
    }
    .hh-product-name {
        font-size: max(var(--kyd-text-sm-min, 14px), calc(23px * var(--kyd-text-scale, 1)));
    }
    .hh-product-desc {
        font-size: max(var(--kyd-text-sm-min, 14px), calc(17px * var(--kyd-text-scale, 1)));
    }
}

@media screen and (min-width: 1025px) and (max-width: 1439px) {
    .hh-products-inner {
        max-width: min(96vw, 1360px);
    }
    .hh-products-grid {
        grid-template-columns: repeat(2, minmax(0, 330px));
        justify-content: center;
        justify-items: center;
    }
    .hh-product-card {
        width: 100%;
        max-width: 330px;
        height: auto;
        min-height: 460px;
    }
    .hh-product-img {
        width: 100%;
    }
}

@media screen and (min-width: 768px) and (max-width: 1024px) {
    .hh-products-grid {
        grid-template-columns: repeat(2, minmax(0, 330px));
        justify-content: center;
        justify-items: center;
    }
    .hh-product-card {
        width: 100%;
        max-width: 330px;
        height: auto;
        min-height: 460px;
    }
    .hh-product-img {
        width: 100%;
    }
}

@media screen and (max-width: 767px) {
    .hh-products-section {
        padding-top: 24px;
    }
    .hh-products-inner {
        padding-left: 16px;
        padding-right: 16px;
    }
    .hh-products-grid {
        grid-template-columns: minmax(0, 330px);
        justify-content: center;
        justify-items: center;
    }
    .hh-product-card {
        width: 100%;
        max-width: 330px;
        height: auto;
        min-height: 500px;
        margin-left: auto;
        margin-right: auto;
    }
    .hh-product-body {
        height: auto;
        min-height: 295px;
    }
    .hh-product-img {
        width: 100%;
        max-width: 330px;
        margin: 0;
    }
}

/* 卡片：对齐公共样式 1 .pc-card */
.hh-product-card {
    width: 330px;
    height: 500px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.hh-product-img {
    width: 330px;
    height: 205px;
    flex-shrink: 0;
    overflow: hidden;
}

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

.hh-product-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 卡片左上角的产品类型标签，栏目产品区不展示 */
.hh-product-tag {
    display: none;
}

.hh-product-body {
    flex: none;
    height: 295px;
    min-height: 0;
    padding: 28px 8px 0;
    display: flex;
    flex-direction: column;
    text-align: left;
    overflow: hidden;
    background-color: #ffffff;
    box-sizing: border-box;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.hh-product-name {
    font-size: 23px;
    font-weight: 400;
    line-height: 1.4;
    margin: 0 0 18px 0;
    padding: 0;
    color: #4a4a4a;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    transition: color 0.2s ease;
}

.hh-product-name a {
    color: inherit;
    text-decoration: none;
}

.hh-product-desc {
    font-size: 17px;
    line-height: 1.6;
    color: #222222;
    margin: 0;
    padding: 0;
    flex: none;
    max-height: calc(1.6em * 6);
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 6;
    line-clamp: 6;
    overflow-wrap: break-word;
    opacity: 1;
    transition: color 0.2s ease;
}

/* 悬停：仅文字块（对齐样式 1） */
.hh-product-body:hover {
    background-color: #00233d;
}

.hh-product-body:hover .hh-product-name,
.hh-product-body:hover .hh-product-name a,
.hh-product-body:hover .hh-product-desc {
    color: #ffffff;
}

.hh-products-loading,
.hh-list-empty {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 24px 0;
    text-align: center;
    font-size: 16px;
}

.hh-products-loading {
    color: #132a3e;
}

.hh-list-empty {
    color: #666666;
}

