/* =========================================================
   MOTOGRAPHIX V9
   MODEL PAGE
   ========================================================= */

.mgx-model-page {
    width: 100%;
    min-height: 100vh;
    padding: 36px 0 120px;
    background: #000000;
    color: #ffffff;
}


/* =========================================================
   HEADER
   ========================================================= */

.mgx-model-header {
    width: min(1400px, calc(100% - 48px));
    margin: 0 auto 24px;
    text-align: center;
}

.mgx-model-kicker {
    display: block;
    margin-bottom: 10px;
    color: #e30613;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.mgx-model-header h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(34px, 4vw, 58px);
    line-height: .96;
    font-weight: 900;
    letter-spacing: -1px;
    text-transform: uppercase;
}

.mgx-model-header p {
    margin: 12px 0 0;
    color: #8b8b8b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.mgx-model-header p strong {
    color: #ffffff;
    font-weight: 900;
}


/* =========================================================
   GALERÍA
   ========================================================= */

.mgx-model-gallery {
    width: 90%;
    margin: 0 auto;
    display: grid;
    grid-template-columns:
        repeat(
            5,
            minmax(0, 1fr)
        );
    gap: 14px;
}


/* =========================================================
   TARJETA DE DISEÑO
   ========================================================= */

.mgx-model-gallery-item {
    position: relative;
    isolation: isolate;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 24px;
    background: #000000;
    border: 1.5px solid rgba(227, 6, 19, .78);
    box-sizing: border-box;
    text-decoration: none;
    transition:
        transform .28s ease,
        border-color .28s ease,
        box-shadow .28s ease;
}


/* =========================================================
   IMAGEN
   ENFOQUE DESDE MEDIA MOTO HACIA ADELANTE
   ========================================================= */

.mgx-model-gallery-item img {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 88% center;
    transform: scale(1.24);
    transform-origin: center center;
    transition: transform .38s ease;
}


/* =========================================================
   LOGO VERTICAL MOTOGRAPHIX
   SOBRE LA IMAGEN
   ========================================================= */

.mgx-model-gallery-item::after {
    content: "";

    position: absolute;

    top: 4%;
    right: 2%;
    bottom: 4%;

    width: 17%;

    z-index: 0;

    pointer-events: none;

    background-image:
        url("../images/mgx-vertical.webp");

    background-repeat:
        no-repeat;

    background-position:
        center right;

    background-size:
        contain;

    opacity: .48;
}


/* =========================================================
   FRANJA INFERIOR — CÓDIGO / PRECIO
   ========================================================= */

.mgx-model-gallery-meta {
    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    z-index: 4;

    min-height: 30px;

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 10px;

    padding: 0 10px;

    box-sizing: border-box;

    background: rgba(8, 8, 8, .94);

    border-top:
        1px solid
        rgba(255,255,255,.08);
}


/* CÓDIGO */

.mgx-model-gallery-code {
    min-width: 0;

    overflow: hidden;

    color: #ffffff;

    font-size: 9px;
    font-weight: 800;

    letter-spacing: .5px;

    white-space: nowrap;
    text-overflow: ellipsis;
}


/* PRECIO DESDE */

.mgx-model-gallery-price {
    flex: 0 0 auto;

    display: inline-flex;
    align-items: center;

    gap: 6px;

    white-space: nowrap;
}

.mgx-model-gallery-price-label {
    color: rgba(255,255,255,.72);

    font-size: 8px;
    font-weight: 800;

    letter-spacing: .45px;
}

.mgx-model-gallery-price-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 20px;

    padding: 0 9px;

    border-radius: 999px;

    background: #e30613;
    color: #ffffff;

    font-size: 9px;
    font-weight: 900;

    line-height: 1;
}


/* =========================================================
   HOVER
   ========================================================= */

@media (hover: hover) and (pointer: fine) {

    .mgx-model-gallery-item:hover {
        transform: translateY(-4px);
        border-color: #e30613;
        box-shadow:
            0 16px 36px
            rgba(0, 0, 0, .42);
    }

    .mgx-model-gallery-item:hover img {
        transform: scale(1.28);
    }

}


/* =========================================================
   GALERÍA VACÍA
   ========================================================= */

.mgx-model-gallery-empty {
    width: min(700px, calc(100% - 40px));
    min-height: 220px;
    margin: 30px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed rgba(255,255,255,.12);
    border-radius: 18px;
    color: #777777;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}


/* =========================================================
   PAGINACIÓN
   ========================================================= */

.mgx-gallery-pagination {
    width: 100%;
    margin-top: 22px;
    margin-bottom: 36px;

    display: none;

    align-items: center;
    justify-content: center;

    gap: 7px;
}

.mgx-gallery-pagination.is-visible {
    display: flex;
}


/* =========================================================
   BOTONES GENERALES
   ========================================================= */

.mgx-gallery-page-button {
    min-width: 36px;
    height: 36px;

    padding: 0 12px;

    border: 1px solid rgba(255,255,255,.12);

    border-radius: 999px;

    background: #111111;
    color: #ffffff;

    font-size: 10px;
    font-weight: 800;

    cursor: pointer;

    transition:
        background .2s ease,
        border-color .2s ease,
        transform .2s ease,
        opacity .2s ease;
}


/* =========================================================
   NÚMEROS
   ========================================================= */

.mgx-gallery-page-button:not(.mgx-gallery-page-prev):not(.mgx-gallery-page-next):not(.is-active) {
    background: #111111;
    border-color: rgba(255,255,255,.12);
}

.mgx-gallery-page-button:not(.mgx-gallery-page-prev):not(.mgx-gallery-page-next):not(.is-active):hover {
    background: #1d1d1d;
    border-color: rgba(255,255,255,.25);
}


/* =========================================================
   PÁGINA ACTIVA
   ========================================================= */

.mgx-gallery-page-button.is-active {
    background: #e30613;
    border-color: #e30613;
    color: #ffffff;
}


/* =========================================================
   SOLO FLECHAS
   ========================================================= */

.mgx-gallery-page-prev,
.mgx-gallery-page-next {
    background: #e30613;
    border-color: #e30613;
    color: #ffffff;
}

.mgx-gallery-page-prev:hover,
.mgx-gallery-page-next:hover {
    background: #ff1726;
    border-color: #ff1726;

    transform: scale(1.05);
}


/* =========================================================
   DESACTIVADO
   ========================================================= */

.mgx-gallery-page-button:disabled {
    opacity: .35;
    cursor: default;
    transform: none;
}


/* =========================================================
   VER MÁS DISEÑOS
   CONTADOR + EFECTO DE EXPANSIÓN
   ========================================================= */

.mgx-gallery-load-more {
    position: relative;

    isolation: isolate;
    overflow: visible;

    width: min(360px, calc(100vw - 44px));
    min-width: 300px;
    min-height: 60px;

    padding:
        8px
        50px
        8px
        24px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 14px;

    box-sizing: border-box;

    border:
        1px solid
        rgba(255,255,255,.18);

    border-radius: 999px;

    background:
        linear-gradient(
            180deg,
            #171717 0%,
            #0d0d0d 100%
        );

    color: #ffffff;

    font-family: inherit;

    cursor: pointer;

    box-shadow:
        0 14px 34px
        rgba(0,0,0,.38),
        inset 0 1px 0
        rgba(255,255,255,.035);

    transition:
        transform .24s ease,
        border-color .24s ease,
        background .24s ease,
        box-shadow .24s ease;
}


/* ---------------------------------------------------------
   ONDAS INFINITAS DE TODA LA CÁPSULA
   --------------------------------------------------------- */

.mgx-gallery-load-more::before,
.mgx-gallery-load-more::after {
    content: "";

    position: absolute;
    inset: 0;

    z-index: -1;

    border:
        1px solid
        rgba(255,255,255,.22);

    border-radius: inherit;

    pointer-events: none;

    animation:
        mgxLoadMoreExpansion
        2.4s
        cubic-bezier(.20,.62,.35,1)
        infinite;
}

.mgx-gallery-load-more::after {
    border-color:
        rgba(255,255,255,.13);

    animation-delay: 1.2s;
}


@keyframes mgxLoadMoreExpansion {

    0% {
        transform:
            scale(1);

        opacity: .52;
    }

    72% {
        transform:
            scale(1.065, 1.18);

        opacity: 0;
    }

    100% {
        transform:
            scale(1.065, 1.18);

        opacity: 0;
    }

}


/* ---------------------------------------------------------
   TEXTO
   --------------------------------------------------------- */

.mgx-load-more-label {
    position: relative;
    z-index: 2;

    color: #ffffff;

    font-size: 13px;
    font-weight: 900;

    line-height: 1;

    letter-spacing: .45px;

    white-space: nowrap;
}


/* ---------------------------------------------------------
   CONTADOR ROJO
   --------------------------------------------------------- */

.mgx-load-more-counter {
    position: relative;
    z-index: 2;

    min-width: 58px;
    height: 32px;

    margin: 0;

    padding:
        0
        11px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;

    border-radius: 999px;

    background: #e30613;
    color: #ffffff;

    font-size: 12px;
    font-weight: 900;

    line-height: 1;

    letter-spacing: .2px;

    box-shadow:
        0 6px 16px
        rgba(227,6,19,.26);
}


/* ---------------------------------------------------------
   FLECHA
   --------------------------------------------------------- */

.mgx-gallery-load-more > i {
    position: absolute;

    top: 50%;
    right: 21px;

    z-index: 2;

    color:
        rgba(255,255,255,.72);

    font-size: 13px;

    transform:
        translateY(-50%);

    animation:
        mgxLoadMoreArrow
        1.6s
        ease-in-out
        infinite;
}


@keyframes mgxLoadMoreArrow {

    0%,
    100% {
        transform:
            translateY(-58%);
    }

    50% {
        transform:
            translateY(-25%);
    }

}


/* ---------------------------------------------------------
   INTERACCIÓN
   --------------------------------------------------------- */

@media (hover: hover) and (pointer: fine) {

    .mgx-gallery-load-more:hover {
        transform:
            translateY(-3px);

        border-color:
            rgba(255,255,255,.32);

        background:
            linear-gradient(
                180deg,
                #1c1c1c 0%,
                #101010 100%
            );

        box-shadow:
            0 17px 40px
            rgba(0,0,0,.44),
            0 0 0 1px
            rgba(255,255,255,.025);
    }

}

.mgx-gallery-load-more:active {
    transform:
        scale(.985);
}


/* ---------------------------------------------------------
   MÓVIL PEQUEÑO
   --------------------------------------------------------- */

@media (max-width: 480px) {

    .mgx-gallery-load-more {
        width:
            calc(100vw - 42px);

        min-width: 0;
        min-height: 60px;

        gap: 12px;

        padding:
            8px
            46px
            8px
            18px;
    }

    .mgx-load-more-label {
        font-size: 12px;
    }

    .mgx-load-more-counter {
        min-width: 54px;
        height: 30px;

        padding:
            0
            9px;

        font-size: 11px;
    }

    .mgx-gallery-load-more > i {
        right: 18px;
    }

}


/* ---------------------------------------------------------
   ACCESIBILIDAD
   --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

    .mgx-gallery-load-more::before,
    .mgx-gallery-load-more::after,
    .mgx-gallery-load-more > i {
        animation: none !important;
    }

}

/* =========================================================
   BARRA FLOTANTE
   ========================================================= */

.mgx-model-floating-bar {
    position: fixed;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    z-index: 9000;

    min-height: 58px;
    width: min(620px, 72vw);

    display: grid;
    grid-template-columns:
        46px
        minmax(0, 1fr)
        auto;

    align-items: center;
    gap: 8px;

    padding: 6px;

    box-sizing: border-box;

    background: #ffffff;

    border:
        1px solid
        rgba(0,0,0,.10);

    border-radius: 999px;

    box-shadow:
        0 15px 45px
        rgba(0,0,0,.45);
}


/* =========================================================
   BOTÓN ATRÁS
   ========================================================= */

.mgx-model-bar-back {
    width: 46px;
    height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #ff0000;
    color: #ffffff;

    text-decoration: none;

    transition:
        transform .2s ease,
        background .2s ease;
}

@media (hover: hover) and (pointer: fine) {

    .mgx-model-bar-back:hover {
        background: #9e000b;
        transform: translateX(-2px);
    }

}


/* =========================================================
   NOMBRE
   ========================================================= */

.mgx-model-bar-name {
    min-width: 0;
    overflow: hidden;

    color: #111111;

    font-size: 12px;
    font-weight: 900;

    letter-spacing: .5px;

    white-space: nowrap;
    text-overflow: ellipsis;

    text-align: center;
}


/* =========================================================
   ACCIONES
   ========================================================= */

.mgx-model-bar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mgx-model-bar-button {
    width: 46px;
    height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;

    border-radius: 50%;

    background: #111111;
    color: #ffffff;

    text-decoration: none;

    cursor: pointer;

    transition:
        transform .2s ease,
        background .2s ease;
}

.mgx-model-whatsapp-button {
    background: #e30613;
}

@media (hover: hover) and (pointer: fine) {

    .mgx-model-bar-button:hover {
        transform: translateY(-1px);
        background: #e30613;
    }

}


/* =========================================================
   PANEL COLORES
   ========================================================= */

.mgx-model-colors-panel {
    position: fixed;

    left: 50%;
    bottom: 92px;

    transform:
        translateX(-50%)
        translateY(12px);

    z-index: 9998;

    width: min(620px, 72vw);
    max-height: 65vh;

    padding: 18px;

    box-sizing: border-box;

    overflow: hidden;

    background:
        rgba(
            18,
            18,
            18,
            .98
        );

    border:
        1px solid
        rgba(
            255,
            255,
            255,
            .10
        );

    border-radius: 22px;

    box-shadow:
        0 24px 60px
        rgba(
            0,
            0,
            0,
            .55
        );

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity .22s ease,
        transform .22s ease,
        visibility .22s ease;
}

.mgx-model-colors-panel.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform:
        translateX(-50%)
        translateY(0);
}


/* =========================================================
   HEADER COLORES
   ========================================================= */

.mgx-model-colors-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 14px;

    color: #ffffff;

    font-size: 11px;
    font-weight: 900;

    letter-spacing: 1px;

    text-transform: uppercase;
}

.mgx-model-colors-close {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;

    border-radius: 50%;

    background:
        rgba(
            255,
            255,
            255,
            .08
        );

    color: #ffffff;

    cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {

    .mgx-model-colors-close:hover {
        background: #e30613;
    }

}


/* =========================================================
   LISTA COLORES
   ========================================================= */

.mgx-model-colors-list {
    display: grid;

    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );

    gap: 8px;

    max-height:
        calc(
            65vh - 70px
        );

    overflow-y: auto;
}


/* =========================================================
   OPCIÓN COLOR
   ========================================================= */

.mgx-model-color-option {
    min-height: 42px;

    display: flex;

    align-items: center;

    gap: 8px;

    padding:
        0
        12px;

    border:
        1px solid
        rgba(
            255,
            255,
            255,
            .10
        );

    border-radius: 999px;

    background:
        rgba(
            255,
            255,
            255,
            .05
        );

    color: #dddddd;

    font-size: 10px;
    font-weight: 800;

    cursor: pointer;
}

.mgx-model-color-option.is-active {
    background:
        rgba(
            227,
            6,
            19,
            .18
        );

    border-color: #e30613;

    color: #ffffff;
}


/* =========================================================
   CONTADOR DE DISEÑOS POR COLOR
   ========================================================= */

.mgx-model-color-name {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.mgx-model-color-count {
    flex: 0 0 auto;

    min-width: 28px;
    height: 22px;

    margin-left: auto;

    padding:
        0
        7px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;

    border:
        1px solid
        rgba(
            255,
            255,
            255,
            .12
        );

    border-radius: 999px;

    background:
        rgba(
            255,
            255,
            255,
            .08
        );

    color: #ffffff;

    font-size: 9px;
    font-weight: 900;
    line-height: 1;
}

.mgx-model-color-option.is-active
.mgx-model-color-count {
    border-color:
        rgba(
            227,
            6,
            19,
            .95
        );

    background: #e30613;
}



/* =========================================================
   PUNTO COLOR
   ========================================================= */

.mgx-model-color-dot {
    width: 14px;
    height: 14px;

    flex: 0 0 14px;

    border-radius: 50%;

    background: #777777;

    border:
        1px solid
        rgba(
            255,
            255,
            255,
            .35
        );
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1200px) {

    .mgx-model-gallery {
        grid-template-columns:
            repeat(
                4,
                minmax(0, 1fr)
            );
    }

}


/* =========================================================
   MOBILE / TABLET VERTICAL
   ========================================================= */

@media (max-width: 899px) {

    .mgx-model-page {
        padding:
            28px
            0
            105px;
    }

    .mgx-model-header {
        width:
            calc(
                100% - 24px
            );

        margin-bottom: 18px;
    }

    .mgx-model-kicker {
        font-size: 10px;
        letter-spacing: 1.4px;
    }

    .mgx-model-header h1 {
        font-size: 30px;
    }

    .mgx-model-header p {
        font-size: 10px;
    }

    .mgx-model-gallery {
        width:
            calc(
                100% - 24px
            );

        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );

        gap: 10px;
    }

    .mgx-model-gallery-item {
        border-radius: 18px;
    }

    .mgx-model-gallery-item img {
        object-position: 72% center;
        transform: scale(1.22);
    }

    .mgx-model-gallery-item::after {
        top: 6%;
        right: 2%;
        bottom: 6%;
        width: 16%;
        opacity: .28;
    }


.mgx-model-gallery-meta {
   min-height: 32px;
padding: 0 11px;
}

.mgx-model-gallery-code,
.mgx-model-gallery-price {
    font-size: 8px;
}

    
    .mgx-model-floating-bar {
        left: 12px;
        right: 12px;
        bottom: 12px;

        transform: none;

        width: auto;

        min-height: 56px;
    }

    .mgx-model-bar-back,
    .mgx-model-bar-button {
        width: 44px;
        height: 44px;
    }

    .mgx-model-bar-name {
        font-size: 11px;
    }

    .mgx-model-colors-panel {
        left: 12px;
        right: 12px;
        bottom: 80px;

        transform:
            translateY(12px);

        width: auto;

        max-height: 65vh;

        padding: 14px;
    }

    .mgx-model-colors-panel.is-open {
        transform:
            translateY(0);
    }

    .mgx-model-colors-list {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

}


/* =========================================================
   MÓVILES PEQUEÑOS
   ========================================================= */

@media (max-width: 420px) {

    .mgx-model-header h1 {
        font-size: 27px;
    }

    .mgx-model-gallery {
        width:
            calc(
                100% - 16px
            );

        gap: 8px;
    }

    .mgx-model-floating-bar {
        left: 8px;
        right: 8px;
        bottom: 8px;
    }

    .mgx-model-colors-panel {
        left: 8px;
        right: 8px;
        bottom: 74px;
    }

}

/* =========================================================
   PRECIO TARJETAS — AJUSTE RESPONSIVE FINAL
   ========================================================= */

@media (max-width: 899px) {

    .mgx-model-gallery-price {
        gap: 4px;
    }

    .mgx-model-gallery-price-label {
        font-size: 7px;
    }

    .mgx-model-gallery-price-pill {
        min-height: 18px;
        padding: 0 7px;
        font-size: 8px;
    }

}

@media (max-width: 420px) {

    .mgx-model-gallery-meta {
        padding-left: 8px;
        padding-right: 8px;
        gap: 5px;
    }

    .mgx-model-gallery-price {
        gap: 3px;
    }

    .mgx-model-gallery-price-label {
        font-size: 6.5px;
    }

    .mgx-model-gallery-price-pill {
        min-height: 17px;
        padding: 0 6px;
        font-size: 7.5px;
    }

}

