/* ===== 驱动下载页 ===== */
body.page-driver {
    background: #ffffff;
}

.driver-page {
    position: relative;
    color: var(--text-primary);
}

/* ----- 背景层（绝对定位垫底） ----- */
.driver-page__bg {
    position: absolute;
    top: 0;
    left: 50%;
    z-index: 0;
    width: 100%;
    max-width: var(--hero-max-width);
    transform: translateX(-50%);
    pointer-events: none;
}

.driver-page__bg-image {
    display: block;
    width: 100%;
    height: auto;
}

/* ----- hero（略低于背景图高度，内容垂直居中） ----- */
.driver-hero {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    height: calc(560 * var(--rpx));
}

.driver-hero__copy {
    width: 100%;
}

.driver-hero__title {
    margin: 0;
    font-size: calc(58 * var(--fpx));
    font-weight: 600;
    line-height: calc(68 / 58);
}

.driver-hero__lead {
    margin: calc(44 * var(--rpx)) 0 0;
    font-size: calc(24 * var(--fpx));
    font-weight: 600;
    line-height: calc(36 / 24);
}

.driver-hero__license {
    margin: calc(8 * var(--rpx)) 0 0;
    font-size: calc(16 * var(--fpx));
    line-height: calc(24 / 16);
}

.driver-hero__license-text {
    color: var(--text-primary);
}

.driver-hero__license-link {
    color: var(--brand-red);
    text-decoration: none;
}

.driver-hero__license-link:hover {
    text-decoration: underline;
}

/* ----- 主体（自然流式叠在背景下部） ----- */
.driver-body {
    position: relative;
    z-index: 1;
    padding-bottom: calc(80 * var(--rpx));
}

.driver-filters {
    display: flex;
    flex-direction: column;
    gap: calc(20 * var(--rpx));
}

.driver-filter {
    display: grid;
    grid-template-columns: calc(120 * var(--rpx)) minmax(0, 1fr);
    align-items: center;
}

.driver-filter__label {
    font-size: calc(16 * var(--fpx));
    line-height: calc(24 / 16);
    color: var(--text-primary);
}

.driver-filter__pills {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: calc(10 * var(--rpx));
}

.driver-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: calc(40 * var(--rpx));
    padding: calc(8 * var(--rpx)) calc(20 * var(--rpx));
    border-radius: calc(300 * var(--rpx));
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
    font-size: calc(16 * var(--fpx));
    line-height: calc(24 / 16);
    color: var(--text-primary);
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.driver-pill:hover {
    background: #f5f6f7;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.16);
    color: var(--brand-red);
}

.driver-pill.is-active {
    background: var(--brand-red);
    color: #f8f8f8;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.driver-pill.is-active:hover {
    background: var(--brand-red);
    color: #f8f8f8;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.driver-filter__rule {
    grid-column: 1 / -1;
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
}

/* ----- download cards ----- */
.driver-cards {
    display: flex;
    flex-direction: column;
    gap: calc(20 * var(--rpx));
    margin-top: calc(42 * var(--rpx));
}

.driver-card[hidden],
.driver-pill[hidden] {
    display: none;
}

.driver-cards__empty {
    margin: calc(24 * var(--rpx)) 0;
    text-align: center;
    font-size: calc(16 * var(--fpx));
    line-height: calc(24 / 16);
    color: var(--text-secondary, #666);
}

.driver-card {
    position: relative;
    min-height: calc(280 * var(--rpx));
    padding: calc(40 * var(--rpx)) calc(150 * var(--rpx)) calc(40 * var(--rpx)) calc(40 * var(--rpx));
    border-radius: calc(10 * var(--rpx));
    background: #fafcfd;
    box-shadow: none;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.driver-card:hover {
    background: #ffffff;
    box-shadow: 0 calc(5 * var(--rpx)) calc(15 * var(--rpx)) rgba(0, 12, 36, 0.1);
}

.driver-card__arch {
    position: absolute;
    top: calc(40 * var(--rpx));
    left: calc(40 * var(--rpx));
    width: 5em;
    height: 5em;
    font-size: calc(16 * var(--fpx));
}

.driver-card__arch-bg {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.driver-card__arch-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.125em;
    padding: 0.625em 0.6875em;
    font-size: 1em;
    font-weight: 600;
    line-height: 1.1;
    color: #f8f8f8;
    text-align: left;
    pointer-events: none;
}

.driver-card__title {
    margin: calc(23 * var(--rpx)) 0 0 calc(110 * var(--rpx));
    font-size: calc(20 * var(--fpx));
    font-weight: 600;
    line-height: calc(34 / 20);
    color: var(--text-primary);
}

.driver-card__meta {
    margin: calc(45 * var(--rpx)) 0 0 calc(110 * var(--rpx));
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: calc(29 * var(--rpx));
    row-gap: calc(10 * var(--rpx));
    font-size: calc(16 * var(--fpx));
    line-height: calc(30 / 16);
}

.driver-card__meta-row {
    display: contents;
}

.driver-card__meta dt,
.driver-card__meta dd {
    margin: 0;
    color: rgba(51, 51, 51, 0.6);
    white-space: nowrap;
}

.driver-card__meta dd {
    white-space: normal;
    word-break: break-all;
}

.driver-card__rule {
    position: absolute;
    left: calc(150 * var(--rpx));
    right: calc(60 * var(--rpx));
    top: calc(120 * var(--rpx));
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
}

.driver-card__actions {
    position: absolute;
    right: calc(60 * var(--rpx));
    bottom: calc(58 * var(--rpx));
    display: flex;
    align-items: flex-start;
    gap: calc(60 * var(--rpx));
}

.driver-card__action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc(4 * var(--rpx));
    min-width: calc(56 * var(--rpx));
    text-decoration: none;
    color: inherit;
}

.driver-card__action-icon {
    display: block;
    flex-shrink: 0;
    width: calc(30 * var(--rpx));
    height: calc(30 * var(--rpx));
    line-height: 0;
    overflow: visible;
}

.driver-card__action-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    vertical-align: top;
}

.driver-card__action-text {
    font-size: calc(16 * var(--fpx));
    line-height: calc(34 / 16);
    color: var(--text-primary);
    white-space: nowrap;
}

/* ===== @828 mobile ===== */
@media (max-width: 828px) {
    .driver-page {
        display: flex;
        flex-direction: column;
    }

    .driver-page__bg {
        position: relative;
        top: auto;
        left: auto;
        order: -1;
        z-index: 0;
        width: 100%;
        max-width: none;
        height: calc(500 * var(--rpx));
        overflow: hidden;
        transform: none;
        flex-shrink: 0;
    }

    .driver-page__bg-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    .driver-hero {
        position: relative;
        z-index: 1;
        display: block;
        height: auto;
        min-height: 0;
        padding: 0 0 calc(48 * var(--rpx));
    }

    .driver-hero__copy {
        position: relative;
        z-index: 1;
        margin-top: calc(-200 * var(--rpx));
    }

    .driver-hero__title {
        font-size: calc(36 * var(--fpx));
    }

    .driver-hero__lead {
        margin-top: calc(24 * var(--rpx));
        font-size: calc(18 * var(--fpx));
    }

    .driver-filter {
        grid-template-columns: 1fr;
        row-gap: calc(12 * var(--rpx));
    }

    .driver-card {
        min-height: 0;
        padding: calc(24 * var(--rpx));
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        column-gap: calc(16 * var(--rpx));
        grid-template-areas:
            "arch title"
            "meta meta"
            "rule rule"
            "actions actions";
    }

    .driver-card__arch {
        grid-area: arch;
        position: relative;
        top: auto;
        left: auto;
        font-size: calc(12.8 * var(--fpx));
    }

    .driver-card__title {
        grid-area: title;
        margin: 0;
        align-self: center;
    }

    .driver-card__meta {
        grid-area: meta;
        margin: calc(16 * var(--rpx)) 0 0;
    }

    .driver-card__rule {
        grid-area: rule;
        position: static;
        left: auto;
        right: auto;
        top: auto;
        margin-top: calc(20 * var(--rpx));
    }

    .driver-card__actions {
        grid-area: actions;
        position: static;
        right: auto;
        bottom: auto;
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: calc(24 * var(--rpx));
        margin-top: calc(20 * var(--rpx));
    }

    .driver-card__action {
        min-width: calc(64 * var(--rpx));
    }

    .driver-card__action-icon {
        width: calc(40 * var(--rpx));
        height: calc(40 * var(--rpx));
    }
}

