:root {
    --Black: #030408;
    --Grey-1: #3F3F40;
    --Grey-2: #AFAFB0;
    --Grey-5: #F0F0F2;
    --Gray-8: #485154;
    --Light: #FFF;
    --Font-Bae: "Poppins", sans-serif;
}

body {
    background-color: #F0F0F2;
}

.magma {
    width: 100%;
    font-family: "Poppins", sans-serif;
}

.magma__container {
    max-width: 1320px;
    margin: 0 auto;
    padding-bottom: 60px;
}

/* ===================== INDEX ===================== */

.magma-index__logo {
    padding-top: 50px;
    text-align: center;
}

.magma-index__logo-img {
    width: 292px;
    height: 93px;
    aspect-ratio: 292 / 93;
    object-fit: contain;
}

.magma-index__line {
    border-bottom: 1px solid var(--Black);
}

/* Filtros */
.magma-filters {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 8px;
    margin-top: 60px;
}

.magma-filters__label {
    color: var(--Black);
    font-family: Poppins;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 26px;
    letter-spacing: 0.64px;
    white-space: nowrap;
}

.magma-select {
    position: relative;
    flex: 1 0 0;
    height: 52px;
    border: 1px solid var(--Grey-2);
    background: var(--Light);
    box-sizing: border-box;
}

.magma-select select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 13px 56px 13px 12px;
    color: var(--Black);
    font-family: Poppins;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 26px;
    letter-spacing: 0.64px;
    cursor: pointer;
    box-sizing: border-box;
}

.magma-select__icon {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 32px;
    height: 32px;
    pointer-events: none;
}

.magma-filters__clear {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--Grey-1);
    font-family: Poppins;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 26px;
    letter-spacing: 0.64px;
    white-space: nowrap;
}

.magma-filters__clear:hover {
    color: var(--Black);
}

.magma-filters__clear svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* Grilla de cards */
.magma-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px 13px;
    justify-content: center;
    margin-top: 60px;
}

.magma-grid__empty {
    width: 100%;
    text-align: center;
    font-family: Poppins;
    font-size: 16px;
    font-weight: 400;
    color: var(--Grey-1);
    padding: 60px 0;
}

.magma-card {
    position: relative;
    display: block;
    width: 305px;
    height: 273px;
    flex-shrink: 0;
    text-decoration: none;
}

.magma-card__img {
    position: absolute;
    top: 0;
    left: 0;
    width: 305px;
    height: 192px;
    background-color: lightgray;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    transition: filter 0.4s ease-in-out;
}

.magma-card:hover .magma-card__img {
    filter: brightness(0.85);
}

.magma-card__text {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 305px;
    height: 81px;
    display: flex;
    padding: 8px 16px;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 8px;
    flex-shrink: 0;
    background: var(--Light);
    box-sizing: border-box;
}

.magma-card__title {
    align-self: stretch;
    color: var(--Grey-1);
    font-family: var(--Font-Bae);
    font-size: 18px;
    font-style: normal;
    font-weight: 400;
    line-height: 22px;
    letter-spacing: 0.72px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.magma-card__linea {
    width: 157px;
    color: var(--Grey-2);
    font-family: var(--Font-Bae);
    font-size: 15px;
    font-style: normal;
    font-weight: 400;
    line-height: 22px;
    letter-spacing: 0.6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===================== SHOW ===================== */

.magma-show {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 60px;
}
.magma-show > .detail-gallery {
    flex: 0 1 714px;
    width: 714px;
    max-width: 100%;
}
.magma-show__previews {
    width: 80px;
    max-height: 584px;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.25) transparent;
    -webkit-overflow-scrolling: touch;
}

.magma-show__previews::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.magma-show__previews::-webkit-scrollbar-track {
    background: transparent;
}

.magma-show__previews::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.magma-show__preview {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    object-fit: cover;
    object-position: center;
    cursor: pointer;
    box-sizing: border-box;
}

.magma-show__main-wrap {
    margin-left: 16px;
}

.magma-show__main {
    display: block;
    width: 618px;
    height: 584px;
    object-fit: cover;
    object-position: center;
}

.magma-show__info {
    width: 501px;
    margin-left: 31px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.magma-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    color: var(--Gray-8);
    font-family: Poppins;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 22px;
    letter-spacing: 0.56px;
}

.magma-breadcrumb a {
    color: var(--Gray-8);
    text-decoration: none;
}

.magma-breadcrumb a:hover {
    text-decoration: underline;
}

.magma-breadcrumb__sep {
    margin: 0 8px;
}

.magma-show__title-line {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--Black);
    align-self: stretch;
    margin-top: 20px;
}

.magma-show__title-line h1 {
    margin: 0;
    color: var(--Black);
    font-family: var(--Font-Bae);
    font-size: 46px;
    font-style: normal;
    font-weight: 400;
    line-height: 110%;
    letter-spacing: 3.68px;
}

.magma-show__descripcion {
    width: 495px;
    margin-top: 20px;
    color: var(--Grey-1);
    font-family: Poppins;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 26px;
    letter-spacing: 0.64px;
}

.magma-show__descripcion p {
    margin: 0;
}

.magma-select--show {
    width: 501px;
    height: 52px;
    flex-shrink: 0;
    margin-top: 20px;
}

.magma-show__btn {
    width: 128px;
    margin-top: 248px;
    padding: 10px 0;
    text-align: center;
    font-size: 14px;
    border: 1px solid var(--Black);
    border-radius: 0;
    background: var(--Black);
    color: #FFF !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.magma-show__btn:hover {
    color: var(--Black) !important;
    background: var(--Light);
    border: 1px solid var(--Black);
}

/* ===================== RELACIONADOS ===================== */

.magma-related {
    width: 100%;
    background: var(--Grey-5);
    padding: 90px 0;
    margin-top: 60px;
}

.magma-related__inner {
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 60px;
    padding: 0 8px;
}

.magma-related__title {
    align-self: stretch;
    display: flex;
    height: 59px;
    padding-bottom: 8px;
    align-items: center;
    gap: 4px;
    border-bottom: 1px solid var(--Black);
    box-sizing: border-box;
}

.magma-related__title h2 {
    margin: 0;
    color: var(--Black);
    font-family: var(--Font-Bae);
    font-size: 46px;
    font-style: normal;
    font-weight: 400;
    line-height: 110%;
    letter-spacing: 3.68px;
}

.magma-related .magma-grid {
    margin-top: 0;
    gap: 60px;
}

/* ===================== RESPONSIVE ===================== */

@media (max-width: 1365.98px) {
    .magma__container {
        padding-left: 24px;
        padding-right: 24px;
    }

    .magma-filters {
        flex-wrap: wrap;
    }

    .magma-select {
        flex: 1 1 240px;
    }

    .magma-show {
        flex-wrap: wrap;
        padding-top: 40px;
    }

    .magma-show__previews {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        width: 100%;
        max-width: none;
        max-height: none;
        padding-bottom: 8px;
    }

    .magma-show__main-wrap {
        margin-left: 0;
        width: 100%;
    }

    .magma-show__main {
        width: 100%;
        max-width: 618px;
        height: auto;
        aspect-ratio: 618 / 584;
    }

    .magma-show__info {
        margin-left: 0;
        width: 100%;
        max-width: 501px;
        height: auto;
        position: static;
    }

    .magma-show__descripcion {
        width: 100%;
        max-width: 495px;
    }

    .magma-show__btn {
        margin-top: 40px;
        margin-left: 0;
    }

    .magma-related {
        padding: 60px 24px;
    }

    .magma-related .magma-grid {
        gap: 40px;
    }
}

@media (max-width: 991.98px) {
    .magma-show > .detail-gallery {
        flex: 1 1 100%;
        width: 100%;
    }
}

@media (max-width: 767.98px) {
    .magma-index__logo-img {
        width: 232px;
        height: auto;
        aspect-ratio: 292 / 93;
    }

    .magma-select--show {
        width: 100%;
        height: auto;
        flex: 0 0 auto;
    }

    .magma-select--show select {
        height: auto;
    }

    .magma-related__inner {
        padding: 0;
    }

    .magma-related__title {
        height: auto;
        min-height: 52px;
        padding: 0 4px 8px;
    }

    .magma-related__title h2 {
        font-size: 30px;
        letter-spacing: 1.8px;
        max-width: 100%;
    }
}
