/* ============================================================
   AUTOMART V43.6.1
   DESKTOP VEHICLE DETAIL HERO FINAL ALIGNMENT

   Fixes only:
   - remove old Year / Listing row
   - align seller card with gallery top
   - keep title/condition above gallery
   ============================================================ */

@media screen and (min-width:1024px) {

    /* ========================================================
       REMOVE EVERY REMNANT OF OLD SUMMARY TOP
       ======================================================== */

    .vehicle-detail-page
    .vehicle-summary
    .am-v426-summary-top,

    .vehicle-detail-page
    .vehicle-summary
    .am-v426-listing-id,

    .vehicle-detail-page
    .vehicle-summary
    > .am-v426-condition {

        display:none !important;

        visibility:hidden !important;
        opacity:0 !important;

        width:0 !important;
        height:0 !important;

        min-width:0 !important;
        min-height:0 !important;

        max-width:0 !important;
        max-height:0 !important;

        margin:0 !important;
        padding:0 !important;

        overflow:hidden !important;

        position:absolute !important;

        pointer-events:none !important;
    }


    /* ========================================================
       RIGHT COLUMN STARTS EXACTLY AT GALLERY TOP
       ======================================================== */

    .vehicle-detail-page
    .reference-detail-grid {

        align-items:start !important;
    }


    .vehicle-detail-page
    .vehicle-summary {

        display:flex !important;

        flex-direction:column !important;

        justify-content:flex-start !important;
        align-items:stretch !important;

        align-self:start !important;

        gap:10px !important;

        width:330px !important;

        min-width:330px !important;
        max-width:330px !important;

        min-height:0 !important;
        height:auto !important;

        margin:0 !important;
        padding:0 !important;

        position:relative !important;

        top:0 !important;

        transform:none !important;
    }


    /* ========================================================
       SELLER CARD = FIRST VISIBLE ITEM
       ======================================================== */

    .vehicle-detail-page
    .vehicle-summary
    > .seller-profile-card {

        order:1 !important;

        position:relative !important;

        top:0 !important;

        width:100% !important;

        margin:0 !important;

        transform:none !important;

        align-self:start !important;
    }


    /* ========================================================
       CONTACT BUTTONS DIRECTLY BELOW SELLER
       ======================================================== */

    .vehicle-detail-page
    .vehicle-summary
    > .contact-row {

        order:2 !important;

        position:relative !important;

        top:auto !important;
        bottom:auto !important;
        left:auto !important;
        right:auto !important;

        width:100% !important;

        margin:0 !important;

        transform:none !important;
    }


    /* ========================================================
       OLD SUMMARY INFORMATION REMAINS CANCELLED
       ======================================================== */

    .vehicle-detail-page
    .vehicle-summary
    > .title-actions,

    .vehicle-detail-page
    .vehicle-summary
    > .am-v426-summary-description,

    .vehicle-detail-page
    .vehicle-summary
    > .am-v426-quick-facts,

    .vehicle-detail-page
    .vehicle-summary
    > .summary-location,

    .vehicle-detail-page
    .vehicle-summary
    > .summary-meta {

        display:none !important;
    }


    /* ========================================================
       NEW TITLE ROW
       TITLE LEFT / CONDITION FAR RIGHT
       ======================================================== */

    .vehicle-detail-page
    .am-v436-desktop-title-row {

        display:grid !important;

        grid-template-columns:
            minmax(0,1fr)
            auto
            !important;

        align-items:center !important;

        column-gap:24px !important;

        width:100% !important;
    }


    .vehicle-detail-page
    .am-v436-desktop-title-right {

        justify-self:end !important;

        margin:0 !important;
        padding:0 !important;
    }


    .vehicle-detail-page
    .am-v436-desktop-condition {

        margin:0 !important;

        white-space:nowrap !important;
    }


    /* ========================================================
       DO NOT CHANGE BELOW-GALLERY INFORMATION
       ======================================================== */

    .vehicle-detail-page
    .am-v436-desktop-meta {

        position:relative !important;

        clear:both !important;
    }

}


/* ============================================================
   MOBILE/TABLET UNTOUCHED
   ============================================================ */

@media screen and (max-width:1023px) {

    .vehicle-detail-page
    .vehicle-summary
    .am-v426-summary-top {

        display:flex;
    }

}
