/* =========================================================
   MOTOGRAPHIX V9
   CATÁLOGO
   ========================================================= */


/* =========================================================
   PÁGINA
   ========================================================= */

.mgx-catalog-page {
    width: 100%;
    min-height: 100vh;
    padding: 48px 0 110px;
    background: #000000;
    color: #ffffff;
}

.mgx-catalog-container {
    width: min(1500px, calc(100% - 48px));
    margin: 0 auto;
}


/* =========================================================
   HEADER
   ========================================================= */

.mgx-catalog-header {
    max-width: 900px;
    margin: 0 auto 24px;
    text-align: center;
}

.mgx-catalog-kicker {
    display: block;
    margin-bottom: 10px;
    color: #e30613;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.7px;
    text-transform: uppercase;
}

.mgx-catalog-header h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(40px, 5vw, 64px);
    font-weight: 900;
    line-height: .95;
    letter-spacing: -1.5px;
    text-transform: uppercase;
}

.mgx-catalog-header p {
    max-width: 650px;
    margin: 14px auto 0;
    color: rgba(255,255,255,.58);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.6;
}


/* =========================================================
   BUSCADOR
   ========================================================= */

.mgx-catalog-search-wrap {
    position: relative;
    z-index: 50;
    display: flex;
    justify-content: center;
    margin-bottom: 38px;
}

.mgx-catalog-search {
    width: min(720px, 100%);
    min-height: 52px;
    padding: 5px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    box-sizing: border-box;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,.10);
    border-radius: 999px;
    box-shadow: 0 14px 40px rgba(0,0,0,.30);
}

.mgx-catalog-search-box {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 16px;
}

.mgx-catalog-search-box i {
    flex: 0 0 auto;
    color: #666666;
    font-size: 13px;
}

.mgx-catalog-search-box input {
    width: 100%;
    min-width: 0;
    height: 42px;
    padding: 0;
    background: transparent;
    color: #111111;
    border: 0;
    outline: 0;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
}

.mgx-catalog-search-box input::placeholder {
    color: #777777;
}


/* =========================================================
   BOTÓN MARCAS
   ========================================================= */

.mgx-catalog-brands-button {
    min-width: 132px;
    height: 42px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(
        135deg,
        #ff1825 0%,
        #e30613 55%,
        #c8000c 100%
    );
    color: #ffffff;
    border: 0;
    border-radius: 999px;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .5px;
    white-space: nowrap;
    cursor: pointer;
    transition:
        transform .2s ease,
        filter .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}

@media (hover: hover) and (pointer: fine) {
    .mgx-catalog-brands-button:hover {
        transform: translateY(-1px);
        filter: brightness(1.06);
        box-shadow: 0 8px 24px rgba(227,6,19,.24);
    }
}


/* =========================================================
   SECCIONES
   ========================================================= */

.mgx-catalog-section {
    margin-top: 32px;
}

.mgx-catalog-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.mgx-catalog-section-heading h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: .7px;
    text-transform: uppercase;
}

.mgx-catalog-section-heading h2 span {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    background: #e30613;
    border-radius: 999px;
}

.mgx-catalog-section-heading small {
    padding: 6px 11px;
    background: #ffffff;
    color: #111111;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .5px;
}


/* =========================================================
   TENDENCIAS
   ========================================================= */

.mgx-trending-carousel {
    position: relative;
    width: 100%;
}

.mgx-trending-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 0 2px 8px;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.mgx-trending-track::-webkit-scrollbar {
    display: none;
}

.mgx-trending-track .mgx-model-card {
    flex: 0 0 calc(20% - 10px);
    width: calc(20% - 10px);
    max-width: calc(20% - 10px);
    min-width: 0;
    scroll-snap-align: start;
}


/* =========================================================
   FLECHAS TENDENCIAS
   ========================================================= */

.mgx-trending-arrow {
    position: absolute;
    top: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    background: rgba(10,10,10,.94);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 999px;
    cursor: pointer;
    z-index: 20;
    box-shadow: 0 8px 24px rgba(0,0,0,.45);
    transition:
        background .2s ease,
        border-color .2s ease,
        transform .2s ease,
        opacity .2s ease;
}

.mgx-trending-prev {
    left: -22px;
}

.mgx-trending-next {
    right: -22px;
}

@media (hover: hover) and (pointer: fine) {
    .mgx-trending-arrow:hover {
        background: #e30613;
        border-color: #e30613;
        transform: translateY(-50%) scale(1.05);
    }
}


/* =========================================================
   CATÁLOGO VACÍO
   ========================================================= */

.mgx-catalog-empty {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: #0a0a0a;
    border: 1px dashed rgba(255,255,255,.12);
    border-radius: 20px;
    color: #777777;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}


/* =========================================================
   POPUP MARCAS — BASE
   ========================================================= */

.mgx-brands-popup {
    position: fixed;
    z-index: 9998;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity .25s ease,
        visibility .25s ease;
}

.mgx-brands-popup.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mgx-brands-popup-panel {
    overflow: hidden;
    background: rgba(20,20,20,.98);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(0,0,0,.55);
    transition: transform .25s ease;
}

.mgx-brands-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 26px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.mgx-brands-popup-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.mgx-brands-popup-close {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.07);
    color: #ffffff;
    font-size: 17px;
    cursor: pointer;
    transition:
        background .2s ease,
        transform .2s ease;
}

@media (hover: hover) and (pointer: fine) {
    .mgx-brands-popup-close:hover {
        background: #e30613;
        transform: rotate(90deg);
    }
}

.mgx-brands-popup-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 22px;
    overflow-y: auto;
    box-sizing: border-box;
}

.mgx-brands-popup-item {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 0 18px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 14px;
    background: #111111;
    color: #ffffff;
    cursor: pointer;
    transition:
        background .2s ease,
        border-color .2s ease,
        transform .2s ease;
}

.mgx-brands-popup-item span {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.mgx-brands-popup-item small {
    min-width: 30px;
    height: 30px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border-radius: 999px;
    background: rgba(227,6,19,.16);
    border: 1px solid rgba(227,6,19,.65);
    color: #ffffff;
    font-size: 10px;
    font-weight: 900;
}

@media (hover: hover) and (pointer: fine) {
    .mgx-brands-popup-item:hover {
        background: #e30613;
        border-color: #e30613;
        transform: translateY(-2px);
    }

    .mgx-brands-popup-item:hover small {
        background: #ffffff;
        border-color: #ffffff;
        color: #e30613;
    }
}

.mgx-brands-popup-item.active {
    background: #e30613;
    border-color: #e30613;
}

.mgx-brands-popup-item.active small {
    background: #ffffff;
    border-color: #ffffff;
    color: #e30613;
}

.mgx-brands-popup-grid::-webkit-scrollbar {
    width: 6px;
}

.mgx-brands-popup-grid::-webkit-scrollbar-track {
    background: transparent;
}

.mgx-brands-popup-grid::-webkit-scrollbar-thumb {
    background: #e30613;
    border-radius: 999px;
}


/* =========================================================
   DESKTOP
   ========================================================= */

@media (min-width: 900px) {

    .mgx-catalog-page .mgx-catalog-container {
        width: 90%;
        max-width: none;
        margin-left: auto;
        margin-right: auto;
    }

    .mgx-catalog-search-wrap {
        position: fixed;
        left: 50%;
        bottom: 22px;
        transform: translateX(-50%);
        width: min(760px, 72vw);
        z-index: 9000;
        margin: 0;
        padding: 0;
    }

    .mgx-catalog-search {
        width: 100%;
        min-height: 58px;
        padding: 6px;
        gap: 8px;
        box-shadow: 0 15px 45px rgba(0,0,0,.50);
    }

    .mgx-catalog-search-box {
        height: 46px;
        gap: 12px;
        padding: 0 18px;
    }

    .mgx-catalog-search-box i {
        font-size: 15px;
    }

    .mgx-catalog-search-box input {
        font-size: 14px;
        font-weight: 600;
    }

    .mgx-catalog-brands-button {
        min-width: 145px;
        height: 46px;
        padding: 0 18px;
        gap: 9px;
        font-size: 11px;
        letter-spacing: .6px;
    }

    .mgx-brands-popup {
        left: 50%;
        bottom: 94px;
        transform: translateX(-50%);
        width: min(760px, 72vw);
        background: transparent;
    }

    .mgx-brands-popup-panel {
        width: 100%;
        max-height: 70vh;
        margin: 0;
        transform: translateY(14px) scale(.98);
        transform-origin: center bottom;
    }

    .mgx-brands-popup.is-open .mgx-brands-popup-panel {
        transform: translateY(0) scale(1);
    }

    .mgx-brands-popup-grid {
        max-height: calc(70vh - 90px);
    }
}


/* =========================================================
   MOBILE / TABLET VERTICAL
   ========================================================= */

@media (max-width: 899px) {

    .mgx-catalog-page {
        padding: 28px 0 110px;
    }

    .mgx-catalog-container {
        width: calc(100% - 24px);
    }

    .mgx-catalog-header {
        margin-bottom: 22px;
    }

    .mgx-catalog-kicker {
        font-size: 10px;
        letter-spacing: 1.4px;
    }

    .mgx-catalog-header h1 {
        font-size: 34px;
        line-height: .98;
        letter-spacing: -.8px;
    }

    .mgx-catalog-header p {
        font-size: 13px;
        line-height: 1.55;
    }

    .mgx-catalog-search-wrap {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 12px;
        z-index: 9000;
        margin: 0;
    }

    .mgx-catalog-search {
        width: 100%;
        min-height: 56px;
        padding: 6px;
        gap: 7px;
        box-shadow: 0 12px 36px rgba(0,0,0,.45);
    }

    .mgx-catalog-search-box {
        padding: 0 12px;
    }

    .mgx-catalog-search-box input {
        font-size: 13px;
    }

    .mgx-catalog-brands-button {
        width: auto;
        min-width: 108px;
        height: 44px;
        padding: 0 14px;
        gap: 7px;
        font-size: 11px;
    }

    .mgx-catalog-brands-button span,
    .mgx-catalog-brands-button .fa-chevron-down {
        display: inline;
    }

    .mgx-catalog-brands-button .fa-chevron-down {
        font-size: 9px;
    }

    .mgx-catalog-section {
        margin-top: 26px;
    }

    .mgx-catalog-section-heading {
        margin-bottom: 14px;
    }

    .mgx-catalog-section-heading h2 {
        font-size: 13px;
    }

    .mgx-catalog-section-heading small {
        display: none;
    }

    .mgx-trending-track {
        gap: 10px;
    }

    .mgx-trending-track .mgx-model-card {
        flex: 0 0 calc(50% - 5px);
        width: calc(50% - 5px);
        max-width: calc(50% - 5px);
    }

    .mgx-trending-arrow {
        width: 38px;
        height: 38px;
        font-size: 12px;
        background: rgba(0,0,0,.90);
        border: 1px solid rgba(255,255,255,.20);
        box-shadow: 0 6px 20px rgba(0,0,0,.48);
    }

    .mgx-trending-prev {
        left: -8px;
    }

    .mgx-trending-next {
        right: -8px;
    }

    .mgx-catalog-empty {
        min-height: 180px;
        padding: 22px;
        border-radius: 16px;
        font-size: 12px;
    }

    .mgx-brands-popup {
        left: 12px;
        right: 12px;
        bottom: 82px;
        background: transparent;
    }

    .mgx-brands-popup-panel {
        width: 100%;
        max-height: 72vh;
        margin: 0;
        border-radius: 22px;
        transform: translateY(14px) scale(.98);
        transform-origin: center bottom;
    }

    .mgx-brands-popup.is-open .mgx-brands-popup-panel {
        transform: translateY(0) scale(1);
    }

    .mgx-brands-popup-header {
        padding: 18px;
    }

    .mgx-brands-popup-header h3 {
        font-size: 13px;
        letter-spacing: 1px;
    }

    .mgx-brands-popup-close {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
        font-size: 15px;
    }

    .mgx-brands-popup-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
        padding: 14px;
        max-height: calc(72vh - 74px);
    }

    .mgx-brands-popup-item {
        min-height: 52px;
        padding: 0 13px;
        border-radius: 12px;
    }

    .mgx-brands-popup-item span {
        font-size: 10px;
    }

    .mgx-brands-popup-item small {
        min-width: 27px;
        height: 27px;
        font-size: 9px;
    }
}


/* =========================================================
   MÓVILES PEQUEÑOS
   ========================================================= */

@media (max-width: 480px) {

    .mgx-catalog-page {
        padding-top: 24px;
    }

    .mgx-catalog-header h1 {
        font-size: 31px;
    }

    .mgx-catalog-search-wrap {
        left: 8px;
        right: 8px;
        bottom: 8px;
    }

    .mgx-catalog-search {
        min-height: 54px;
        padding: 5px;
    }

    .mgx-catalog-brands-button {
        min-width: 100px;
        height: 44px;
        padding: 0 12px;
        font-size: 10px;
    }

    .mgx-brands-popup {
        left: 8px;
        right: 8px;
        bottom: 74px;
    }
}