.tp-bv-wrap,
.tp-bv-wrap * {
    box-sizing: border-box;
}

.tp-bv-wrap {
    width: 100%;
    max-width: 820px;          /* 限制最大宽度，让卡片更紧凑收窄 */
    margin: 0 auto 20px auto;  /* 去除顶部外边距，水平居中 */
    container-type: inline-size;
}

.tp-bv-card {
    --bv-dark: #18212d;
    --bv-blue: #39b9e5;
    --bv-blue-dark: #179dcc;
    --bv-blue-light: #eef9fd;
    --bv-gold: #c58b2b;

    --text: #222b36;
    --text-secondary: #626c77;
    --text-light: #8b949d;
    --border: #e1e6ea;

    position: relative;

    display: grid;
    grid-template-columns: 160px minmax(200px, 1fr) 140px;
    gap: 16px;                 /* 减小栏间距，原 22px */

    align-items: center;

    width: 100%;
    padding: 14px 18px;        /* 压缩上下内边距，原 22px */

    background: #ffffff;

    border: 1px solid var(--border);
    border-radius: 14px;

    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.02),
        0 8px 20px rgba(25, 35, 45, 0.05);

    overflow: hidden;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "PingFang SC",
        "Microsoft YaHei",
        Arial,
        sans-serif;
}


/* 顶部装饰线 */

.tp-bv-card::before {
    content: "";

    position: absolute;
    top: 0;
    left: 0;
    right: 0;

    height: 3px;

    background: linear-gradient(
        90deg,
        var(--bv-gold) 0%,
        var(--bv-gold) 22%,
        var(--bv-blue) 22%,
        var(--bv-blue) 100%
    );
}


/* =========================================================
   左侧品牌
   ========================================================= */

.tp-bv-brand {
    min-width: 0;
}

.tp-bv-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 6px;

    margin-bottom: 8px;        /* 紧凑布局，原 10px */
}

.tp-bv-rating {
    display: flex;
    align-items: center;
    gap: 6px;

    white-space: nowrap;
}

.tp-bv-rating-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    height: 26px;
    min-width: 34px;

    padding: 0 6px;

    color: #ffffff;
    background: var(--bv-gold);

    border-radius: 6px;

    font-size: 14px;
    line-height: 1;
    font-weight: 700;
}

.tp-bv-rating-text {
    color: var(--text-light);

    font-size: 11px;
    line-height: 1.2;
}

.tp-bv-ad {
    display: inline-block;

    padding: 3px 6px;

    color: #8a929a;
    background: #fafafa;

    border: 1px solid #e2e6e9;
    border-radius: 4px;

    font-size: 10px;
    line-height: 1;

    white-space: nowrap;
}


/* =========================================================
   SVG Logo
   ========================================================= */

.tp-bv-logo {
    display: block;

    width: 100%;
    max-width: 160px;

    overflow: hidden;

    background: var(--bv-dark);

    border-radius: 8px;
}

.tp-bv-logo svg {
    display: block;

    width: 100%;
    height: auto;

    margin: 0;
    padding: 0;
}


/* =========================================================
   中间内容
   ========================================================= */

.tp-bv-content {
    min-width: 0;
}

.tp-bv-title {
    margin: 0 0 4px !important; /* 紧凑标题间距，原 8px */
    padding: 0 !important;

    color: #243b80 !important;

    font-size: 18px !important; /* 字体略微协调缩小，原 20px */
    line-height: 1.3 !important;
    font-weight: 700 !important;
}

.tp-bv-desc {
    margin: 0 0 8px !important; /* 紧凑描述间距，原 13px */
    padding: 0 !important;

    color: var(--text-secondary) !important;

    font-size: 13px !important;
    line-height: 1.5 !important;
}


/* =========================================================
   优惠区
   ========================================================= */

.tp-bv-offer {
    position: relative;

    padding: 7px 10px 7px 12px; /* 压缩优惠区上下留白，原 11px */

    background: var(--bv-blue-light);

    border: 1px solid #d3ebf4;
    border-radius: 7px;
}

.tp-bv-offer::before {
    content: "";

    position: absolute;

    top: 6px;
    bottom: 6px;
    left: 0;

    width: 3px;

    background: var(--bv-blue);

    border-radius: 0 3px 3px 0;
}

.tp-bv-offer-label {
    display: block;

    margin-bottom: 2px;

    color: #238dae;

    font-size: 10px;
    line-height: 1.2;
    font-weight: 700;
}

.tp-bv-offer-main {
    color: #293540;

    font-size: 13px;
    line-height: 1.35;
    font-weight: 700;
}

.tp-bv-offer-note {
    margin-top: 2px;

    color: #7d8790;

    font-size: 10px;
    line-height: 1.3;
}


/* =========================================================
   按钮区域
   ========================================================= */

.tp-bv-actions {
    display: flex;
    flex-direction: column;

    gap: 8px;                  /* 减小按钮间距，原 10px */

    min-width: 0;
}

.tp-bv-primary {
    display: flex !important;
    align-items: center;
    justify-content: center;

    gap: 6px;

    width: 100%;
    min-height: 40px;          /* 略微压缩按钮高度，原 46px */

    padding: 8px 10px !important;

    color: #073d57 !important;
    background: var(--bv-blue) !important;

    border: 1px solid var(--bv-blue) !important;
    border-radius: 8px !important;

    box-shadow: 0 3px 10px rgba(57, 185, 229, 0.2);

    text-decoration: none !important;

    font-size: 13.5px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;

    white-space: nowrap;

    transition: 0.2s ease;
}

.tp-bv-primary:hover {
    color: #ffffff !important;
    background: var(--bv-dark) !important;

    border-color: var(--bv-dark) !important;
}

.tp-bv-secondary {
    display: flex !important;
    align-items: center;
    justify-content: center;

    gap: 5px;

    width: 100%;
    min-height: 34px;          /* 略微压缩高度，原 38px */

    padding: 6px 8px !important;

    color: #28417f !important;
    background: #ffffff !important;

    border: 1px solid #dce2e7 !important;
    border-radius: 7px !important;

    text-decoration: none !important;

    font-size: 12px !important;
    line-height: 1.2 !important;
    font-weight: 600 !important;

    white-space: nowrap;
}

.tp-bv-secondary:hover {
    background: #f7fafb !important;
    border-color: #bac4cc !important;
}

.tp-bv-legal {
    text-align: center;

    color: #929ba3;

    font-size: 9px;
    line-height: 1.2;
}


/* =========================================================
   容器查询响应式 (宽度 ≤ 700px / 520px / 380px)
   ========================================================= */

@container (max-width: 700px) {

    .tp-bv-card {
        grid-template-columns: 140px minmax(0, 1fr);
        gap: 14px;
        padding: 14px;
    }

    .tp-bv-logo {
        max-width: 140px;
    }

    .tp-bv-actions {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px 10px;
    }

    .tp-bv-legal {
        grid-column: 1 / -1;
    }
}

@container (max-width: 520px) {

    .tp-bv-card {
        display: block;
        padding: 14px;
        border-radius: 12px;
    }

    .tp-bv-brand {
        margin-bottom: 12px;
    }

    .tp-bv-logo {
        width: 160px;
        max-width: 100%;
    }

    .tp-bv-content {
        margin-bottom: 12px;
    }

    .tp-bv-title {
        font-size: 17px !important;
    }

    .tp-bv-desc {
        font-size: 13px !important;
    }

    .tp-bv-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .tp-bv-legal {
        grid-column: 1 / -1;
    }
}

@container (max-width: 380px) {

    .tp-bv-actions {
        display: flex;
        flex-direction: column;
    }

    .tp-bv-logo {
        width: 150px;
    }
}


/* =========================================================
   旧浏览器 Fallback
   ========================================================= */

@media (max-width: 820px) {

    @supports not (container-type: inline-size) {

        .tp-bv-card {
            grid-template-columns: 140px minmax(0, 1fr);
        }

        .tp-bv-actions {
            grid-column: 1 / -1;
            display: grid;
            grid-template-columns: 1fr 1fr;
        }

        .tp-bv-legal {
            grid-column: 1 / -1;
        }
    }
}

@media (max-width: 560px) {

    @supports not (container-type: inline-size) {

        .tp-bv-card {
            display: block;
        }

        .tp-bv-brand,
        .tp-bv-content {
            margin-bottom: 12px;
        }

        .tp-bv-actions {
            display: flex;
            flex-direction: column;
        }
    }
}