@charset "utf-8";
/* ==========================================================================
   首页 · 产品列表
   布局: 居中标题 → 左侧"产品类目"(3 个类目) + 右侧产品卡片列表
   ========================================================================== */

.page-main {
    background: var(--page);
    padding-bottom: 8px;
}

.page-title {
    padding: 40px 0 6px;
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: 1px;
}

.page-title::after {
    content: "";
    display: block;
    width: 44px;
    height: 3px;
    margin: 12px auto 0;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--brand), #7aa6ff);
}

.page-subtitle {
    padding: 10px 0 30px;
    text-align: center;
    font-size: 14px;
    color: var(--ink-3);
}

/* ------------------------------------------------------------------ 两栏 */
.catalog {
    display: grid;
    grid-template-columns: 208px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    padding-bottom: 40px;
}

/* 左侧类目 */
.cat-nav {
    position: sticky;
    top: 84px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 0 10px;
    box-shadow: 0 2px 8px rgba(24, 60, 120, .04);
}

.cat-nav .cat-title {
    padding: 0 18px 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-3);
    letter-spacing: 2px;
}

.cat-nav .cat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 11px 18px;
    border-left: 3px solid transparent;
    font-size: 14px;
    color: var(--ink-2);
    cursor: pointer;
    transition: all .16s;
}

.cat-nav .cat-item .num {
    font-size: 12px;
    color: var(--ink-3);
    font-family: "SFMono-Regular", Consolas, monospace;
}

.cat-nav .cat-item:hover {
    color: var(--brand);
    background: #f8faff;
}

.cat-nav .cat-item.active {
    color: var(--brand);
    background: var(--brand-light);
    border-left-color: var(--brand);
    font-weight: 600;
}

.cat-nav .cat-item.active .num {
    color: var(--brand);
}

.cat-nav .cat-side-tip {
    margin: 12px 14px 2px;
    padding: 12px 12px;
    border-radius: 8px;
    background: #f7faff;
    border: 1px dashed var(--brand-line);
    font-size: 12px;
    color: var(--ink-2);
    line-height: 1.7;
}

.cat-nav .cat-side-tip a {
    font-weight: 600;
}

/* 右侧产品区 */
.cat-panel {
    min-width: 0;
}

.cat-block {
    scroll-margin-top: 84px;
}

.cat-block + .cat-block {
    margin-top: 34px;
}

.cat-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 14px;
}

.cat-head .bar {
    width: 4px;
    height: 18px;
    border-radius: 2px;
    background: var(--brand);
}

.cat-head h2 {
    font-size: 19px;
    font-weight: 700;
    color: var(--ink);
}

.cat-head .count {
    font-size: 13px;
    color: var(--ink-3);
}

.cat-head .more {
    margin-left: auto;
    font-size: 13px;
    color: var(--brand);
}

/* 产品卡片 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.product-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 20px 18px;
    transition: box-shadow .2s, border-color .2s, transform .2s;
}

.product-card:hover {
    border-color: var(--brand-line);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.product-name {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.4;
}

.product-badge {
    height: 18px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    border-radius: 3px;
    background: #fff3e8;
    border: 1px solid #ffd8b5;
    color: var(--cta-2);
    font-size: 11px;
    font-weight: 500;
}

.product-summary {
    margin-top: 8px;
    min-height: 22px;
    font-size: 13px;
    color: var(--ink-2);
    line-height: 1.7;
}

.product-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
}

.price {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.price-item {
    display: flex;
    align-items: baseline;
    gap: 2px;
    color: var(--cta-2);
}

.price-item .num {
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    font-family: "DIN Alternate", "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
}

.price-item .unit {
    font-size: 12px;
    color: var(--ink-3);
}

.price-item.year .num {
    font-size: 16px;
    color: var(--ink);
}

.price-item.year .unit {
    font-size: 12px;
}

.btn-subscribe {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 34px;
    padding: 0 16px;
    border-radius: 17px;
    background: linear-gradient(135deg, var(--cta), var(--cta-2));
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 6px 14px rgba(245, 112, 10, .22);
    transition: all .18s;
}

.btn-subscribe:hover {
    color: #fff;
    filter: brightness(1.04);
    transform: translateY(-1px);
}

.btn-subscribe i {
    font-style: normal;
    font-size: 12px;
    opacity: .9;
}

/* 骨架屏 */
.skeleton {
    height: 132px;
    border-radius: var(--radius);
    background: linear-gradient(90deg, #fff 25%, #f3f7fd 37%, #fff 63%);
    background-size: 400% 100%;
    animation: skeleton-loading 1.3s ease infinite;
    border: 1px solid var(--line);
}

@keyframes skeleton-loading {
    0% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0 50%;
    }
}

/* ------------------------------------------------------------------ 小屏 */
@media (max-width: 860px) {
    .page-title {
        padding-top: 26px;
        font-size: 22px;
    }

    .page-subtitle {
        padding-bottom: 20px;
        font-size: 13px;
    }

    .catalog {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .cat-nav {
        position: static;
        padding: 8px;
        border-radius: 10px;
        overflow: hidden;
    }

    .cat-nav .cat-title,
    .cat-nav .cat-side-tip {
        display: none;
    }

    /* 小屏把三个类目变成一排可横滑的标签 */
    .cat-nav #cat-list {
        display: flex;
        align-items: center;
        gap: 8px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .cat-nav #cat-list::-webkit-scrollbar {
        display: none;
    }

    .cat-nav .cat-item {
        flex: 0 0 auto;
        padding: 7px 14px;
        border-left: 0;
        border-radius: 16px;
        background: #f5f8fd;
        white-space: nowrap;
    }

    .cat-nav .cat-item .num {
        display: none;
    }

    .cat-nav .cat-item.active {
        background: var(--brand-light);
    }

    .product-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .product-card {
        padding: 16px 16px 14px;
    }

    .price-item .num {
        font-size: 18px;
    }
}

/* 窄屏手机: 价格与按钮放不下时, 按钮换到下一行右对齐 */
@media (max-width: 600px) {
    .product-foot {
        flex-wrap: wrap;
    }

    .btn-subscribe {
        margin-left: auto;
    }

    .price {
        gap: 12px;
    }
}
