/* XGG-P39 | XGV backup 2026-10-27 | only the Home 'Tuyến xe ghép' tab.
   Existing category page, vehicle and service cards are intentionally untouched.
   Load last in layouts.transport to win the XG bundled CSS cascade. */

/* 4 cards per row on wide PC = 8 published route cards fill 2 equal rows. */
body.transport-native.qnvf23g-home #vf23h3-panel-routes .home_price_full_grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 16px !important;
    align-items: stretch !important;
    grid-auto-flow: row !important;
}
body.transport-native.qnvf23g-home #vf23h3-panel-routes .trp02-card {
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
}
body.transport-native.qnvf23g-home #vf23h3-panel-routes .trp02-card .home_price_card_inner {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 0 !important;
}

/* True 12:9 / 4:3 DISPLAY WINDOW. 'contain' shows the entire supplied designed
   image, including text near its edges, instead of cropping its top and bottom. */
body.transport-native.qnvf23g-home #vf23h3-panel-routes .trp02-card .home_price_card_media {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 12 / 9 !important;
    overflow: hidden !important;
    background: var(--xgp38-h-EEF4F8,#eef4f8) !important;
    padding: 0 !important;
    margin: 0 !important;
    flex: 0 0 auto !important;
}
body.transport-native.qnvf23g-home #vf23h3-panel-routes .trp02-card .home_price_card_media img {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    max-height: 100% !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: center !important;
    transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
body.transport-native.qnvf23g-home #vf23h3-panel-routes .trp02-card .trp02-card-badge {
    z-index: 4 !important;
}

/* Every card gets an equal-height text zone. Price and CTA are fixed to the
   bottom edge even if title wraps to two lines on one card but only one elsewhere. */
body.transport-native.qnvf23g-home #vf23h3-panel-routes .trp02-card .home_price_card_body {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    min-width: 0 !important;
    min-height: 0 !important;
    gap: 0 !important;
    padding: 12px 13px 14px !important;
}
body.transport-native.qnvf23g-home #vf23h3-panel-routes .trp02-card .home_price_car_name {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    overflow: hidden !important;
    line-height: 1.35 !important;
    min-height: 2.7em !important;
    max-height: 2.7em !important;
    margin: 0 0 7px !important;
}
body.transport-native.qnvf23g-home #vf23h3-panel-routes .trp02-card .home_price_slogan {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    overflow: hidden !important;
    min-height: 2.84em !important;
    max-height: 2.84em !important;
    line-height: 1.42 !important;
    margin: 0 0 10px !important;
}
body.transport-native.qnvf23g-home #vf23h3-panel-routes .trp02-card .trp02-card-info {
    display: flex !important;
    align-items: baseline !important;
    flex-wrap: wrap !important;
    column-gap: 5px !important;
    row-gap: 2px !important;
    margin: auto 0 0 !important;
    padding: 9px 0 0 !important;
    min-height: 0 !important;
    border-top: 1px solid var(--xgp38-h-E6EEF5,#e6eef5) !important;
}
body.transport-native.qnvf23g-home #vf23h3-panel-routes .trp02-card .home_price_actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) !important;
    margin: 10px 0 0 !important;
    gap: 7px !important;
    align-items: stretch !important;
}
body.transport-native.qnvf23g-home #vf23h3-panel-routes .trp02-card .home_price_action_btn {
    min-width: 0 !important;
    min-height: 38px !important;
    height: auto !important;
}

@media (max-width: 1100px) {
    body.transport-native.qnvf23g-home #vf23h3-panel-routes .home_price_full_grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 13px !important;
    }
}
@media (max-width: 767px) {
    body.transport-native.qnvf23g-home #vf23h3-panel-routes .home_price_full_grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }
    body.transport-native.qnvf23g-home #vf23h3-panel-routes .trp02-card .home_price_card_body {
        padding: 10px 9px 12px !important;
    }
    body.transport-native.qnvf23g-home #vf23h3-panel-routes .trp02-card .home_price_car_name {
        min-height: 2.7em !important;
        max-height: 2.7em !important;
    }
    body.transport-native.qnvf23g-home #vf23h3-panel-routes .trp02-card .home_price_slogan {
        min-height: 2.7em !important;
        max-height: 2.7em !important;
        line-height: 1.35 !important;
        margin-bottom: 8px !important;
    }
    body.transport-native.qnvf23g-home #vf23h3-panel-routes .trp02-card .trp02-card-info {
        padding-top: 7px !important;
    }
    body.transport-native.qnvf23g-home #vf23h3-panel-routes .trp02-card .home_price_actions {
        grid-template-columns: 1fr !important;
        gap: 6px !important;
        margin-top: 8px !important;
    }
    body.transport-native.qnvf23g-home #vf23h3-panel-routes .trp02-card .home_price_action_btn {
        min-height: 36px !important;
        height: 36px !important;
        padding: 3px 2px !important;
        font-size: 10px !important;
        line-height: 1.1 !important;
        white-space: nowrap !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    /* Parent showroom shell already has the 12px mobile gutter. Avoid shrinking again. */
    body.transport-native.qnvf23g-home #vf23h3-panel-routes > .wt2-container.tr-shell {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    body.transport-native.qnvf23g-home #vf23h3-panel-routes .trp02-card .home_price_actions {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 5px !important;
    }
}
@media (prefers-reduced-motion: reduce) {
    body.transport-native.qnvf23g-home #vf23h3-panel-routes .trp02-card .home_price_card_inner {
        transition: none !important;
    }
}
