@import '../colors';


.back-button {
    position: fixed;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: rgba(white, 0.5);
    border: 0px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;

    ion-icon {
        color: white;
        font-size: 20px;
    }
}

.upfold {
    height: 40vh;
    background-color: rgba($blue-grey, 0.1);
    padding: 20px 5%;
    color: $blue-grey;
    position: relative;

    .bg-image {
        position: absolute;
        right: 0;
        top: 0;
        width: 50%;
        height: 100%;
        object-position: left;
        object-fit: cover;
        opacity: 0.1;
    }

    p {
        margin: 0;
        font-size: 0.8rem;        
    }

    h2 {
        margin: 30px 0px 5px 0px;
        font-size: 1.8rem;
    }

    h4 {
        margin: 0px;
        font-size: 1.2rem;
    }

    figure {
        position: absolute;
        right: 0;
        bottom: 34px;
        width: 60%;
        display: block;
        height: 100%;

        img {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: contain;
            object-position: bottom;
        }
    }

}

.container {
    height: 60vh;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    background-color: #f3f3f3;
    position: relative;
    overflow: visible; 
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-container {
    width: 90%;
    margin: 0 auto;
    overflow: auto;

    h2 {
        font-size: 1.2rem;
        color: $light-grey;
        margin: 0;
        position: sticky;
        left: 0;
    }
}

.segments {
    position: absolute;
    top: -35px;
    right: 0;
    height: 70px;
    display: flex;
    align-items: stretch;
    background-color: $dark-blue;
    box-shadow: 0px 0px 5px $dark-blue;
    overflow: hidden;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;

    button {
        font-size: 1rem;        
        border: 0px solid white;
        width: 100px;
        color: white;
        background-color: transparent;
        position: relative;

        &.active {
            color: $pink;
            font-weight: 500;

            &::before {
                content: '';
                position: absolute;
                left: 45px;
                bottom: 15px;
                width: 5px;
                height: 5px;
                background-color: $pink;
                border-radius: 50%;
            }
        }
    }
}

.product-list {
    white-space: nowrap;
    overflow: auto;
    display: inline-block;
    list-style: none;
    margin: 0;
    padding: 30px 10px;

    li {
        display: inline-block;
        width: 40vw;
        box-shadow: 0px 5px 10px rgba($blue-grey, 0.5);
        border-radius: 10px;
        overflow: hidden;
        margin-right: 30px;
        background-color: white;

        figure {
            background-color: rgba($blue-grey, 0.1);
            display: block;

            img {
                width: 100%;
                height: 100%;
                display: block;
            }
        }

        label {
            display: block;
            color: $light-grey;
            font-size: 1rem;
            text-align: center;
            margin: 10px 0;
            padding: 0 20px;
            white-space: nowrap;
            text-overflow: ellipsis;
            width: 100%;
            overflow: hidden;
        }

        p {
            padding: 0 10px;
            text-align: center;
            margin: 10px 0;
            font-size: 1rem;
            font-weight: 500;
            color: $dark-blue;
        }
    }
}

.categories {
    height: 60px;
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;

    button {
        color: $dark-blue;
        border: none;
        border-radius: 30px;
        height: 40px;
        background-color: transparent;
        font-size: 0.8rem;
        width: 100px;
        font-weight: 500;
        display: flex;
        align-items: center;
        justify-content: center;

        &.active {
            background-color: $green;
            color: white;
        }
    }
}