/* ============================================================
   AUTOMART V45.4.2
   MOBILE BRAND LOGO — EXACT DESKTOP PARITY

   IMPORTANT:
   Do not override SVG fill/stroke/color.
   Those are owned by V39.6.2 brand-specific classes.
   ============================================================ */

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

    /* ========================================================
       BRAND GRID
       ======================================================== */

    .am-v452-mobile-market-panel
    .am-v452-brand-grid {

        display:grid !important;

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

        gap:9px !important;
    }


    /* ========================================================
       CARD
       ======================================================== */

    .am-v452-mobile-market-panel
    .am-v452-brand-grid
    > .am-v454-mobile-brand-card {

        min-width:0 !important;

        min-height:88px !important;

        display:flex !important;

        flex-direction:column !important;

        align-items:center !important;

        justify-content:center !important;

        gap:6px !important;

        padding:
            8px
            !important;

        border:
            1px solid
            #dde6e2
            !important;

        border-radius:
            12px
            !important;

        background:
            #ffffff
            !important;

        color:
            #172334
            !important;

        text-decoration:none !important;

        overflow:hidden !important;

        box-shadow:
            0 2px 9px
            rgba(17,39,28,.025)
            !important;
    }


    /* ========================================================
       EXACT DESKTOP BRAND MEDIA WRAPPER

       Retain:
       .am-mega-v3962__brand-media
       .am-mega-v3962__brand-media--toyota
       .am-mega-v3962__brand-media--nissan
       etc.

       Those classes provide the real desktop logo rendering.
       ======================================================== */

    .am-v454-mobile-brand-card
    .am-v4542-exact-desktop-brand {

        width:76px !important;

        height:42px !important;

        min-width:76px !important;

        min-height:42px !important;

        max-width:76px !important;

        max-height:42px !important;

        display:flex !important;

        align-items:center !important;

        justify-content:center !important;

        margin:0 !important;

        padding:0 !important;

        border:0 !important;

        background:transparent !important;

        box-shadow:none !important;

        overflow:visible !important;
    }


    /*
     * SIZING ONLY.
     *
     * Intentionally no fill/stroke/color rules here.
     * Desktop V39.6.2 remains logo-color authority.
     */

    .am-v454-mobile-brand-card
    .am-v4542-exact-desktop-brand
    svg {

        display:block !important;

        width:auto !important;

        height:auto !important;

        max-width:68px !important;

        max-height:37px !important;

        margin:auto !important;
    }


    .am-v454-mobile-brand-card
    .am-v4542-exact-desktop-brand
    img {

        display:block !important;

        width:auto !important;

        height:auto !important;

        max-width:68px !important;

        max-height:37px !important;

        margin:auto !important;

        object-fit:contain !important;

        object-position:center !important;
    }


    /* ========================================================
       LABEL
       ======================================================== */

    .am-v454-mobile-brand-card
    > strong {

        width:100% !important;

        margin:0 !important;

        color:#172334 !important;

        overflow:hidden !important;

        text-align:center !important;

        text-overflow:ellipsis !important;

        white-space:normal !important;

        font-size:10px !important;

        line-height:1.18 !important;

        font-weight:800 !important;
    }


    /* ========================================================
       OLD V45.2 INITIAL BADGES MUST NEVER RETURN
       ======================================================== */

    .am-v454-mobile-brand-card
    .am-v452-brand-mark,

    .am-v452-brand-grid
    .am-v452-brand-mark {

        display:none !important;

        visibility:hidden !important;

        width:0 !important;

        height:0 !important;

        margin:0 !important;

        padding:0 !important;

        border:0 !important;
    }


    /* ========================================================
       SMALL PHONE
       ======================================================== */

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

        .am-v452-mobile-market-panel
        .am-v452-brand-grid
        > .am-v454-mobile-brand-card {

            min-height:83px !important;
        }


        .am-v454-mobile-brand-card
        .am-v4542-exact-desktop-brand {

            width:68px !important;

            height:38px !important;

            min-width:68px !important;

            min-height:38px !important;
        }


        .am-v454-mobile-brand-card
        .am-v4542-exact-desktop-brand
        svg,

        .am-v454-mobile-brand-card
        .am-v4542-exact-desktop-brand
        img {

            max-width:61px !important;

            max-height:33px !important;
        }

    }

}
