/* =========================================================
   MOTOGRAPHIX V9
   MODEL CARDS
   ========================================================= */


/* =========================================================
   LISTA Y SECCIONES DE MARCA
   ========================================================= */

.mgx-catalog-brands-list {
    width: 100%;
}

.mgx-catalog-brand-section {
    width: 100%;
    margin-top: 54px;
}


/* =========================================================
   ENCABEZADO DE MARCA
   ========================================================= */

.mgx-catalog-brand-heading {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.mgx-catalog-brand-heading h2 {
    margin: 0;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 22px;
    line-height: 1;
    font-weight: 900;
    text-transform: uppercase;
}

.mgx-catalog-brand-heading h2 span {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: #e30613;
}

.mgx-catalog-brand-heading::after {
    content: "";
    order: 2;
    flex: 1 1 auto;
    height: 1px;
    background: rgba(255,255,255,.22);
}

.mgx-catalog-brand-heading small {
    order: 3;
    flex: 0 0 auto;
    min-height: 28px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(227,6,19,.85);
    border-radius: 999px;
    background: #050505;
    color: #ffffff;
    font-size: 10px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: .8px;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 0 0 1px rgba(227,6,19,.08);
}


/* =========================================================
   GRID
   ========================================================= */

.mgx-catalog-model-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}


/* =========================================================
   TARJETA — COVER 900x1200 = 3:4
   ========================================================= */

.mgx-model-card {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    margin: 0;
    overflow: hidden;
    border-radius: 18px;
    background: #000000;
    border: 1px solid rgba(255,255,255,.10);
    box-sizing: border-box;
    cursor: pointer;
    isolation: isolate;
    transition:
        transform .28s ease,
        border-color .28s ease,
        box-shadow .28s ease;
}

@media (hover: hover) and (pointer: fine) {
    .mgx-model-card:hover {
        transform: translateY(-5px);
        border-color: rgba(227,6,19,.65);
        box-shadow: 0 18px 45px rgba(0,0,0,.50);
    }
}


/* =========================================================
   ENLACE
   ========================================================= */

.mgx-model-card-link {
    position: relative;
    width: 100%;
    height: 100%;
    display: block;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
}


/* =========================================================
   MARCA DE AGUA VERTICAL
   ========================================================= */

.mgx-model-card-link::after {
    content: "";
    position: absolute;
    top: 19%;
    right: 2.5%;
    bottom: 18%;
    width: 12%;
    z-index: 4;
    pointer-events: none;
    background-image: url("../images/mgx-vertical.webp");
    background-repeat: no-repeat;
    background-position: center right;
    background-size: contain;
    opacity: .40;
}


/* =========================================================
   COVER
   ========================================================= */

.mgx-model-card-image {
    position: absolute;
    top: 6px;
    left: 0;
    right: 0;
    bottom: -6px;
    width: 100%;
    height: auto;
    overflow: hidden;
    z-index: 1;
}

.mgx-model-card-cover {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    transition:
        transform .45s ease,
        filter .30s ease;
}

@media (hover: hover) and (pointer: fine) {
    .mgx-model-card:hover .mgx-model-card-cover {
        transform: scale(1.025);
    }
}

.mgx-model-card-no-cover {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111111;
    color: #666666;
    font-size: 11px;
    font-weight: 800;
}


/* =========================================================
   FRANJA SUPERIOR
   ========================================================= */

.mgx-model-card-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 5;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px 12px;
    box-sizing: border-box;
    background: rgba(255,255,255,.97);
    border-radius: 17px 17px 0 0;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    transition:
        min-height .25s ease,
        padding .25s ease;
}


/* =========================================================
   TÍTULO
   ========================================================= */

.mgx-model-card-title {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    color: #050505;
    font-family: "Poppins", Arial, sans-serif;
    font-size: clamp(11px, 1vw, 16px);
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: 0;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.mgx-model-card-title--long {
    font-size: clamp(10px, .85vw, 14px);
}

.mgx-model-card-title--xlong {
    font-size: clamp(9px, .75vw, 12px);
}


/* =========================================================
   ACCIÓN INFERIOR
   ========================================================= */

.mgx-model-card-action {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 6;
    padding: 52px 10px 10px;
    box-sizing: border-box;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0) 0%,
        rgba(0,0,0,.12) 28%,
        rgba(0,0,0,.68) 100%
    );
    opacity: 0;
    transform: translateY(22px);
    pointer-events: none;
    transition:
        opacity .28s ease,
        transform .28s ease;
}

.mgx-model-card-button {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    box-sizing: border-box;
    border-radius: 999px;
    background: #e30613;
    color: #ffffff;
    font-family: "Poppins", Arial, sans-serif;
    font-size: 10px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: .6px;
    text-transform: uppercase;
    box-shadow: 0 8px 22px rgba(227,6,19,.32);
    transition:
        background .22s ease,
        transform .22s ease,
        box-shadow .22s ease;
}

.mgx-model-card-button i {
    font-size: 9px;
    transition: transform .22s ease;
}


/* =========================================================
   DESKTOP — HOVER
   ========================================================= */

@media (hover: hover) and (pointer: fine) {

    .mgx-model-card:hover .mgx-model-card-action {
        opacity: 1;
        transform: translateY(0);
    }

    .mgx-model-card:hover .mgx-model-card-button {
        background: #f10b19;
        box-shadow: 0 10px 26px rgba(227,6,19,.42);
    }

    .mgx-model-card:hover .mgx-model-card-button i {
        transform: translateX(3px);
    }
}


/* =========================================================
   TABLET HORIZONTAL
   ========================================================= */

@media (max-width: 1200px) and (min-width: 900px) {

    .mgx-catalog-model-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}


/* =========================================================
   MOBILE / TABLET VERTICAL
   ========================================================= */

@media (max-width: 899px) {

    .mgx-catalog-brand-section {
        margin-top: 40px;
    }

    .mgx-catalog-brand-heading {
        gap: 12px;
        margin-bottom: 14px;
    }

    .mgx-catalog-brand-heading h2 {
        font-size: 17px;
    }

    .mgx-catalog-brand-heading small {
        min-height: 28px;
        padding: 0 10px;
        font-size: 9px;
        letter-spacing: .6px;
    }

    .mgx-catalog-model-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .mgx-model-card {
        border-radius: 14px;
    }

    .mgx-model-card-top {
        min-height: 40px;
        padding: 7px 8px;
        border-radius: 13px 13px 0 0;
    }

    .mgx-model-card-title {
        font-size: clamp(10px, 2.9vw, 13px);
        font-weight: 800;
        letter-spacing: .05px;
        line-height: 1;
    }

    .mgx-model-card-title--long {
        font-size: clamp(9px, 2.6vw, 11.5px);
        font-weight: 800;
    }

    .mgx-model-card-title--xlong {
        font-size: clamp(8px, 2.3vw, 10.5px);
        font-weight: 800;
    }

    .mgx-model-card-action {
        padding: 42px 7px 7px;
        transform: translateY(16px);
    }

    .mgx-model-card-button {
        min-height: 35px;
        padding: 0 10px;
        font-size: 8px;
        gap: 5px;
    }

    .mgx-model-card-button i {
        font-size: 7px;
    }

    .mgx-model-card.mgx-card-visible .mgx-model-card-action {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================================
   DESKTOP — ENCABEZADO DE MARCA
   ========================================================= */

@media (min-width: 900px) {

    .mgx-catalog-brand-heading {
        gap: 16px;
    }

    .mgx-catalog-brand-heading::after {
        background: rgba(255,255,255,.26);
    }

    .mgx-catalog-brand-heading small {
        min-height: 30px;
        padding: 0 14px;
        font-size: 10px;
    }
}


/* =========================================================
   MÓVILES PEQUEÑOS
   ========================================================= */

@media (max-width: 420px) {

    .mgx-catalog-model-grid {
        gap: 8px;
    }

    .mgx-model-card-top {
        min-height: 37px;
        padding: 6px 7px;
    }

    .mgx-model-card-title {
        font-size: clamp(9.5px, 2.85vw, 12px);
        font-weight: 800;
    }

    .mgx-model-card-title--long {
        font-size: clamp(8.5px, 2.55vw, 11px);
        font-weight: 800;
    }

    .mgx-model-card-title--xlong {
        font-size: clamp(7.8px, 2.25vw, 10px);
        font-weight: 800;
    }

    .mgx-model-card-button {
        min-height: 33px;
        font-size: 7.5px;
    }
}

/* =========================================================
   PODIO — TOP 3
   ========================================================= */

.mgx-model-card-trend-position {
    position: absolute;

    top: 64px;
    left: 10px;

    z-index: 8;

    min-width: 48px;
    height: 30px;

    padding: 0 11px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    box-sizing: border-box;

    border-radius: 999px;

    color: #111111;

    font-family:
        "Poppins",
        Arial,
        sans-serif;

    font-size: 11px;
    line-height: 1;

    font-weight: 500;

    box-shadow:
        0 7px 20px
        rgba(
            0,
            0,
            0,
            .32
        );

    pointer-events: none;
}


.mgx-model-card-trend-position i {
    font-size: 10px;
}


.mgx-model-card-trend-position strong {
    font: inherit;
}


/* =========================================================
   TOP 1 — ORO
   ========================================================= */

.mgx-model-card-trend-position--1 {
    background:
        linear-gradient(
            135deg,
            #fff3a6 0%,
            #f4c542 42%,
            #c99100 100%
        );

    border:
        1px solid
        rgba(
            255,
            230,
            120,
            .85
        );
}


/* =========================================================
   TOP 2 — PLATA
   ========================================================= */

.mgx-model-card-trend-position--2 {
    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #d9d9d9 45%,
            #9d9d9d 100%
        );

    border:
        1px solid
        rgba(
            255,
            255,
            255,
            .80
        );
}


/* =========================================================
   TOP 3 — BRONCE
   ========================================================= */

.mgx-model-card-trend-position--3 {
    background:
        linear-gradient(
            135deg,
            #f3c08a 0%,
            #c98245 45%,
            #8f4d22 100%
        );

    border:
        1px solid
        rgba(
            244,
            185,
            125,
            .80
        );
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 899px) {

    .mgx-model-card-trend-position {
        top: 50px;
        left: 7px;

        min-width: 42px;
        height: 26px;

        padding:
            0
            9px;

        gap: 5px;

        font-size: 9px;
    }


    .mgx-model-card-trend-position i {
        font-size: 8px;
    }

}