/* 商城产品卡片（250×480，图片区 220×180）— 首页热销 / 搜索列表共用 */
.ky-goods-grid {
    display: grid;
    grid-template-columns: repeat(4, 250px);
    gap: 20px;
    justify-content: start;
    box-sizing: border-box;
}

/* 2026-09-09 P0-1：型号置顶（IoTMart 风格） */
.ky-hot-card-model {
    margin: 0 0 4px;
    color: #0f3a8a;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.4px;
    line-height: 1.2;
    text-transform: uppercase;
}

/* 2026-09-09 P0-2：商品卡 CTA 矩阵 */
.ky-card-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.ky-card-cta__btn {
    flex: 1 1 auto;
    min-width: 0;
    padding: 6px 10px;
    border: 1px solid #0f3a8a;
    color: #0f3a8a;
    background: #fff;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}

.ky-card-cta__btn:hover {
    background: #0f3a8a;
    color: #fff;
}

.ky-card-cta__btn--primary {
    background: #0f3a8a;
    color: #fff;
}

.ky-card-cta__btn--primary:hover {
    background: #0a2a6b;
    color: #fff;
}

.ky-hot-card {
    width: 250px;
    height: 480px;
    background: #fff;
    border: 1px solid #e2e6ea;
    box-sizing: border-box;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.ky-hot-card:hover {
    border-color: #c5ccd3;
    box-shadow: 0 8px 24px rgba(0, 35, 61, 0.08);
}

/* 首页/搜索：整卡可点，链接包住图+文 */
.ky-hot-card-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 15px 15px 20px;
    box-sizing: border-box;
    color: inherit;
    text-decoration: none;
}

/*
 * 产品页（含 CTA）：图与正文拆开，避免按钮嵌套在 <a> 里。
 * 原先仍给媒体链接 height:100%，会把白卡片撑满，简介/优点掉到卡外。
 */
.ky-hot-card.ky-hot-card--split {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: auto;
    min-height: 480px;
    padding: 15px 15px 20px;
}

.ky-hot-card.ky-hot-card--split > .ky-hot-card-link {
    height: auto;
    flex: 0 0 auto;
    padding: 0;
}

.ky-hot-card.ky-hot-card--split > .ky-hot-card-body {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
}

.ky-hot-card.ky-hot-card--split .ky-hot-card-body > .ky-hot-card-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: auto;
    padding: 0;
}

.ky-hot-card.ky-hot-card--split .ky-hot-card-cta,
.ky-hot-card.ky-hot-card--split .ky-card-cta {
    width: 100%;
    flex-shrink: 0;
}

.ky-hot-card-media {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 220px;
    height: 180px;
    padding: 12px;
    background: #eef1f4;
    box-sizing: border-box;
}

.ky-hot-card-media img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.ky-hot-card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    flex: 1;
    min-height: 0;
    padding: 10px 0 0;
    box-sizing: border-box;
}

/* 固定占位：标题 2 行 */
.ky-hot-card-name {
    margin: 0 0 18px;
    width: 100%;
    height: 41px;
    min-height: 41px;
    flex-shrink: 0;
    font-family: var(--ky-font-regular);
    font-size: 14px;
    font-weight: 400;
    font-synthesis: none;
    color: #00233d;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 固定占位：简介 1 行 */
.ky-hot-card-intro {
    margin: 0 0 25px;
    width: 100%;
    height: 21px;
    min-height: 21px;
    flex-shrink: 0;
    font-family: var(--ky-font-light);
    font-size: 14px;
    font-weight: 400;
    font-synthesis: none;
    line-height: 1.5;
    color: #6b7c8f;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 固定占位：优点 3 行 */
.ky-hot-card-features {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    width: 100%;
    height: 79px;
    min-height: 79px;
    flex-shrink: 0;
    text-align: left;
    overflow: hidden;
}

.ky-hot-card-features li {
    position: relative;
    margin: 0 0 8px;
    padding-left: 20px;
    height: 21px;
    font-family: var(--ky-font-light);
    font-size: 14px;
    font-weight: 400;
    font-synthesis: none;
    line-height: 21px;
    color: #6b7c8f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ky-hot-card-features li:last-child {
    margin-bottom: 0;
}

.ky-hot-card-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: #132a3e;
    font-size: 14px;
    font-weight: 700;
    line-height: 21px;
}

/* 价格贴底 */
.ky-hot-card-price {
    margin: auto 0 0;
    width: 100%;
    height: 21px;
    min-height: 21px;
    flex-shrink: 0;
    font-family: var(--ky-font-light);
    font-size: 14px;
    font-weight: 400;
    font-synthesis: none;
    color: #6b7c8f;
    line-height: 21px;
}

.ky-hot-card-price.is-config {
    color: #9aa5b1;
}

@media (max-width: 1100px) {
    .ky-goods-grid {
        grid-template-columns: repeat(2, 250px);
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .ky-goods-grid {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .ky-hot-card {
        width: min(250px, 100%);
        height: 480px;
        min-height: 480px;
    }

    .ky-hot-card.ky-hot-card--split {
        height: auto;
        min-height: 480px;
    }
}
