@import url('https://fonts.googleapis.com/css2?family=Viga&display=swap');

* {
    box-sizing: border-box;
}

body {
    background: linear-gradient(to bottom, #271E58, #271E58, #F94C4C) no-repeat;
    background-size: contain;
    min-height: 100vh;
    font-family: "Viga", sans-serif;
}

.mainPage {
    background-color: #FFF;
    padding: 30px 38px;
    -webkit-border-radius: 20px;
    -moz-border-radius: 20px;
    -ms-border-radius: 20px;
    -o-border-radius: 20px;
    border-radius: 20px;
}

.mainPage {
    overflow: hidden;

    .containerPage:has(.effectPanel.active) {
        &>*:not(.effectPanel.active):not(.sectionCategory) {
            height: 0;
            opacity: 0;
            pointer-events: none;
        }
    }
}

.mainPage {
    .containerPage {
        position: relative;

        .containerSwiper {
            width: 100%;
            margin-inline: auto;
            position: relative;
            padding-inline: 40px;
            display: flex;
            align-items: center;
            gap: 20px;

            .custom-arrows {
                top: 50%;
                left: 50%;
                width: 100%;
                height: 60px;
                display: flex;
                align-items: center;
                position: absolute;
                width: 100%;
                justify-content: flex-end;
                transform: translate(-50%, -50%);
                -webkit-transform: translate(-50%, -50%);
                -moz-transform: translate(-50%, -50%);
                -ms-transform: translate(-50%, -50%);
                -o-transform: translate(-50%, -50%);

                .custom-arrow {
                    cursor: pointer;
                    width: 35px;
                    height: 35px;
                    color: #271E58;
                    border-radius: 10px;
                    display: flex;
                    flex-wrap: wrap;
                    align-items: center;
                    justify-content: center;
                    position: absolute;
                    top: 30%;
                    transform: translateY(-50%);
                    -webkit-transform: translateY(-50%);
                    -moz-transform: translateY(-50%);
                    -ms-transform: translateY(-50%);
                    -o-transform: translateY(-50%);
                    border-radius: 50%;
                    -webkit-border-radius: 50%;
                    -moz-border-radius: 50%;
                    -ms-border-radius: 50%;
                    -o-border-radius: 50%;
                    transition: .5s all ease;
                    -webkit-transition: .5s all ease;
                    -moz-transition: .5s all ease;
                    -ms-transition: .5s all ease;
                    -o-transition: .5s all ease;

                    &.swiper-button-disabled {
                        opacity: 0;
                        pointer-events: none;
                    }

                    svg {
                        width: 15px;
                        height: 15px;
                    }
                }

                .custom-arrows__next_sub,
                .custom-arrows__next {
                    right: 0;
                    transform: translateY(-50%);
                    -webkit-transform: translateY(-50%);
                    -moz-transform: translateY(-50%);
                    -ms-transform: translateY(-50%);
                    -o-transform: translateY(-50%);
                }

                .custom-arrows__prev_sub,
                .custom-arrows__prev {
                    left: 0;
                }
            }


            .swiper {
                width: 100%;

                .swiper-slide {
                    max-width: 85px;
                    padding-block: 20px;

                }
            }
        }

        .sectionCategory {
            position: relative;

            .headerCategory {
                display: flex;
                align-items: center;
                justify-content: space-between;
                font-weight: normal;
                color: #271D56;
                margin-bottom: 18px;

                .titleSection {
                    font-size: clamp(18px, 3.4vw, 20px);
                    margin: 0;
                }

                .viewAll {
                    font-size: clamp(16px, 3.4vw, 17px);
                    color: #271D56;
                    -webkit-transition: .2s all ease;
                    -moz-transition: .2s all ease;
                    -ms-transition: .2s all ease;
                    -o-transition: .2s all ease;
                    transition: .2s all ease;
                    text-decoration: underline;
                    cursor: pointer;

                    &:hover {
                        scale: 1.1;
                    }
                }
            }

            .container-slider {
                position: relative;
                display: grid;
                padding-inline: 40px;
            }

            .containerSlide {
                color: #271D56;
                max-width: 85px;
                text-decoration: none;
                -webkit-transition: .5s all ease;
                -moz-transition: .5s all ease;
                -ms-transition: .5s all ease;
                -o-transition: .5s all ease;
                transition: .5s all ease;
                cursor: pointer;
                &.selected-category{
                    opacity: .4;
                }
                .containerImage {
                    padding: 4px;
                    width: 80px;
                    height: 80px;
                    border: 1px solid #A1A1A1;
                    -webkit-border-radius: 50%;
                    -moz-border-radius: 50%;
                    -ms-border-radius: 50%;
                    -o-border-radius: 50%;
                    border-radius: 50%;
                    overflow: hidden;

                    img {
                        border-radius: 50%;
                        -webkit-border-radius: 50%;
                        -moz-border-radius: 50%;
                        -ms-border-radius: 50%;
                        -o-border-radius: 50%;
                        height: 100%;
                        width: 100%;
                        object-fit: cover;
                        -webkit-transition: .5s all ease;
                        -moz-transition: .5s all ease;
                        -ms-transition: .5s all ease;
                        -o-transition: .5s all ease;
                        transition: .5s all ease;
                    }

                }

                .titleSlideCategory {
                    text-align: center;
                    font-size: 13px;
                    font-weight: normal;
                    text-overflow: ellipsis;
                    white-space: nowrap;
                    overflow: hidden;
                    line-clamp: 1;
                }

                &:hover {
                    .containerImage {
                        img {
                            scale: 1.1;
                        }
                    }
                }
            }

            .subMenu_back {
                display: flex;
                align-items: center;
                margin-top: -50px;
                .containerSlide {
                    position: relative;
                    display: flex;
                    align-items: center;
                    width: 120px;
                    gap: 4px;

                    .containerImage {
                        display: flex;
                        align-items: center;
                        height: 32px;
                        width: auto;
                        border: none;

                        .backArrow {
                            box-shadow: none;
                            border: none;
                        }
                    }

                    .titleSlideCategory {

                        font-weight: 400;
                        font-size: 22px;
                        line-height: 100%;
                    }

                    &::before {
                        position: absolute;
                        content: "";
                        top: 50%;
                        right: -24px;
                        height: 50px;
                        width: 2px;
                        background: #A1A1A1;
                        translate: 0 -50%;
                    }
                }

            }

            .subCategory {
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                background-color: #FFF;
                z-index: 10;
                pointer-events: none;
                opacity: 0;
                transition: .5s all ease-in-out;
                -webkit-transition: .5s all ease-in-out;
                -moz-transition: .5s all ease-in-out;
                -ms-transition: .5s all ease-in-out;
                -o-transition: .5s all ease-in-out;

                &.active {
                    pointer-events: all;
                    opacity: 1;

                }



                .containerSwiper {
                    padding: 0 40px;
                    overflow: hidden;
                }

                .containerContent {
                    display: flex;
                    padding-inline-start: 8px;
                    gap: 54px;
                }
            }
        }

        .bannerPage {
            background: #1A1C29;
            -webkit-border-radius: 22px;
            -moz-border-radius: 22px;
            -ms-border-radius: 22px;
            -o-border-radius: 22px;
            border-radius: 22px;
            overflow: hidden;
            display: flex;
            justify-content: center;
            position: relative;
            height: 219px;
            img,
            video {
                width: fit-content;
                max-height: 100%
            }
            .swiper {
                width: 100%;
                height: 100%;

                .swiper-slide {
                    overflow: hidden;
                    display: flex;
                    justify-content: center;
                    .containerImage{
                        width: 100%;
                        height: 100%;
                    }
                }
            }

        }

        .swiper-pagination-bullet {
            background-color: rgb(255, 255, 255, .5);

            &.swiper-pagination-bullet-active {
                background-color: #FFF;
            }
        }

        .sectionGallery {
            display: grid;
            margin-block: 18px;
            grid-template-columns: repeat(5,1fr);
            grid-auto-flow: dense;
            gap: 9px 6px;

            .containerImage {
                overflow: hidden;
                border-radius: 17px;
                -webkit-border-radius: 17px;
                -moz-border-radius: 17px;
                -ms-border-radius: 17px;
                -o-border-radius: 17px;
                position: relative;

                .linkProduct {
                    position: absolute;
                    top: 0;
                    left: 0;
                    width: 100%;
                    height: 100%;
                    z-index: 100;

                }

                &>img {
                    height: 100%;
                    width: 100%;
                    object-fit: cover;
                    transition: .5s all ease;
                    -webkit-transition: .5s all ease;
                    -moz-transition: .5s all ease;
                    -ms-transition: .5s all ease;
                    -o-transition: .5s all ease;
                }

                .detailsProduct {
                    position: absolute;
                    top: 0;
                    left: 0;
                    height: 100%;
                    width: 100%;
                    display: flex;
                    flex-direction: column;
                    padding: 16px;
                    justify-content: space-between;
                    opacity: 0;
                    transition: .5s all ease-in-out;
                    -webkit-transition: .5s all ease-in-out;
                    -moz-transition: .5s all ease-in-out;
                    -ms-transition: .5s all ease-in-out;
                    -o-transition: .5s all ease-in-out;
                    color: #FFF;
                    gap: 8px;

                    .shopName,
                    .price,
                    .productName {
                        margin: 0;
                    }

                    .productName {
                        font-size: clamp(17px, 3.4vw, 20.85px);
                        font-weight: 400;
                        line-height: 28.02px;
                    }

                    .shopName {
                        font-size: 15.85px;
                        font-weight: 400;
                        line-height: 21.3px;
                    }

                    .price {
                        font-size: clamp(20px, 3.4vw, 27.12px);
                        font-weight: 400;
                        line-height: 36.45px;

                    }

                    .containerImg {
                        flex: 1;
                        display: flex;
                        justify-content: center;
                        align-items: center;

                        a {
                            z-index: 101;

                            width: calc(100% - 20px);
                            max-width: 124px;
                            height: calc(100% - 20px);
                            max-height: 80px;

                            img {
                                width: 100%;
                                height: 100%;
                                transition: .5s all ease;
                                -webkit-transition: .5s all ease;
                                -moz-transition: .5s all ease;
                                -ms-transition: .5s all ease;
                                -o-transition: .5s all ease;
                            }

                            img:hover {
                                filter: none;
                                -webkit-filter: none;
                                cursor: pointer;

                            }
                        }
                    }
                }

                &:hover {
                    .detailsProduct {
                        opacity: 1;
                    }

                    &>img {
                        filter: grayscale(10) brightness(.6) brightness(1.1);
                        -webkit-filter: grayscale(10) brightness(.6) brightness(1.1);
                    }
                }

                &.biggerImage {
                    grid-column: span 2;
                    grid-row: span 2;
                }
            }
        }

        .effectPanel {
            z-index: 112;
            transition: .5s all ease-in-out;
            -webkit-transition: .5s all ease-in-out;
            -moz-transition: .5s all ease-in-out;
            -ms-transition: .5s all ease-in-out;
            -o-transition: .5s all ease-in-out;
            opacity: 0;
            pointer-events: none;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            position: absolute;

            &.active {
                position: relative;
                pointer-events: all;
                opacity: 1;
            }
        }



        .listCategory {
            padding: 0;
            display: flex;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 34px 40px;
            place-content: center;

            li {
                display: flex;
                flex-direction: column;
                align-items: center;
                max-width: 150px;
                flex: 1;
                position: relative;
                text-align: center;

                a {
                    position: absolute;
                    top: 0;
                    left: 0;
                    width: 100%;
                    height: 100%;
                    z-index: 1;
                }

                .containerImage {
                    width: 130px;
                    height: 130px;
                    border-radius: 50%;
                    -webkit-border-radius: 50%;
                    -moz-border-radius: 50%;
                    -ms-border-radius: 50%;
                    -o-border-radius: 50%;
                    overflow: hidden;
                    border: 1.5px solid #A1A1A1;
                    padding: 6px;
                    cursor: pointer;

                    &:hover {
                        img {
                            scale: 1.2;
                        }
                    }

                    img {
                        height: 100%;
                        width: 100%;
                        object-fit: cover;
                        transition: .5s all ease;
                        -webkit-transition: .5s all ease;
                        -moz-transition: .5s all ease;
                        -ms-transition: .5s all ease;
                        -o-transition: .5s all ease;
                        border-radius: 50%;
                        -webkit-border-radius: 50%;
                        -moz-border-radius: 50%;
                        -ms-border-radius: 50%;
                        -o-border-radius: 50%;
                    }
                }
            }
        }

        .subCategoryPanel {
            background-color: #FFF;

            .containerCategory {
                display: flex;
                align-items: flex-start;
                gap: 24px;

                .navMenu {
                    flex: 1;

                    .backToCategory {
                        display: flex;
                        align-items: center;
                        font-size: clamp(18px, 2.4vw, 22.21px);
                        font-weight: 400;
                        line-height: 29.85px;
                        color: #271D56;
                        gap: 4px;
                        margin-bottom: 78px;
                        cursor: pointer;
                    }

                    .categoryType {
                        display: flex;
                        align-items: center;
                        text-wrap: nowrap;
                        gap: 12px;

                        .containerImage {
                            width: 130px;
                            height: 130px;
                            border-radius: 50%;
                            -webkit-border-radius: 50%;
                            -moz-border-radius: 50%;
                            -ms-border-radius: 50%;
                            -o-border-radius: 50%;
                            overflow: hidden;
                            border: 1.5px solid #A1A1A1;
                            padding: 6px;
                            margin-inline-end: -40px;
                            z-index: 10;
                            background-color: #FFF;

                            img {
                                height: 100%;
                                object-fit: cover;
                                transition: .5s all ease;
                                -webkit-transition: .5s all ease;
                                -moz-transition: .5s all ease;
                                -ms-transition: .5s all ease;
                                -o-transition: .5s all ease;
                                border-radius: 50%;
                                -webkit-border-radius: 50%;
                                -moz-border-radius: 50%;
                                -ms-border-radius: 50%;
                                -o-border-radius: 50%;
                            }
                        }
                    }
                }

                .contentMenu {
                    overflow: hidden;
                    max-width: 100%;

                    .banner {
                        position: relative;
                        margin-bottom: 40px;
                        .swiper-slide {
                            display: flex;
                            align-items: center;

                            .containerImage {
                                height: fit-content;
                                border-radius: 30px;
                                -webkit-border-radius: 30px;
                                -moz-border-radius: 30px;
                                -ms-border-radius: 30px;
                                -o-border-radius: 30px;
                                overflow: hidden;
                                display: flex;
                                img {
                                    object-fit: cover;
                                    width: 100%;
                                    height: 100%;
                                }
                            }
                        }
                    }
                }

                .listCategory {
                    place-content: flex-start;
                }
            }
        }

        .categoryPanel {
            background-color: #FFF;

            .containerCategory {
                text-align: center;

                .header-panel {
                    position: relative;
                }

                .titlePanel {
                    font-size: clamp(18px, 3.4vw, 32px);
                    font-weight: 400;
                    line-height: 43.01px;
                    color: #271D56;
                }

                .backToHome {
                    display: flex;
                    align-items: center;
                    font-size: clamp(18px, 2.4vw, 22.21px);
                    font-weight: 400;
                    line-height: 29.85px;
                    color: #271D56;
                    gap: 4px;
                    cursor: pointer;
                    position: absolute;
                    top: 50%;
                    left: 0;
                    translate: 0 -50%;
                }
                .listCategory{
                    padding-inline: 140px;
                }
            }
        }

        &:has(.categoryPanel.active) .sectionCategory {
            display: none;
        }
    }
}

@media (max-width:1200px) {
    .mainPage {
        padding: 30px 10px;

        .containerPage {
            .sectionCategory {

                .containerSwiper {
                    padding: 0 40px;
                    max-width: 100%;
                }
            }

            .sectionGallery {
                padding-inline: 20px;
                grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            }
        }
    }
}

@media (max-width:992px) {
    .mainPage {
        .containerPage {
            .sectionGallery {
                padding: 0;
                grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            }

            .categoryPanel {
                .containerCategory {
                    
                    .listCategory {
                        padding-inline: 20px;
                        gap: 20px;

                        li {
                            .containerImage {
                                height: 100px;
                                width: 100px;
                                border-radius: 50%;

                                img {
                                    height: 100%;
                                    width: 100%;
                                    object-fit: cover;
                                }
                            }
                        }
                    }
                }
            }

            .subCategoryPanel {
                .containerCategory {
                    flex-direction: column;
                    align-items: stretch;

                    .navMenu {
                        display: flex;
                        justify-content: space-between;
                        align-items: center;
                        flex: 1;

                        .backToCategory {
                            margin-bottom: 0;
                        }

                        .categoryType {
                            h2 {
                                font-size: clamp(20px, 3.4vw, 32px);
                                font-weight: 400;
                                line-height: 43.01px;

                            }

                            .containerImage {
                                margin: 0;
                                height: 80px;
                                width: 80px;
                            }
                        }
                    }

                    .listCategory {
                        gap: 20px;

                        li {
                            .containerImage {
                                height: 100px;
                                width: 100px;
                            }
                        }
                    }
                }
            }
        }
    }
}

@media (max-width:558px) {
    .mainPage {
        .containerPage {
            .custom-arrows {
                .custom-arrow {
                    width: 30px;
                    height: 30px;
                }
            }

            .sectionGallery {
                .containerImage {
                    &.biggerImage {
                        grid-column: span 1;
                        grid-row: span 1;
                    }
                }

            }

            .sectionCategory {
                .subCategory {
                    .containerContent {
                        gap: 20px;

                        .containerSlide {
                            &::before {
                                right: -10px;
                            }
                        }
                    }
                }
            }
        }
    }
}

html[dir="rtl"] .mainPage {
    .containerPage {
        .sectionCategory {
            .containerSwiper {
                .custom-arrows {
                    top: 40%;

                    .custom-arrow {
                        rotate: 180deg;
                        transform: rotate(180deg) translate(0);
                        -webkit-transform: rotate(180deg) translate(0);
                        -moz-transform: rotate(180deg) translate(0);
                        -ms-transform: rotate(180deg) translate(0);
                        -o-transform: rotate(180deg) translate(0);

                        &.custom-arrows__prev_sub,
                        &.custom-arrows__prev {
                            left: initial;
                            right: 0;
                            scale: -1;
                        }

                        &.custom-arrows__next_sub,
                        &.custom-arrows__next {
                            right: initial;
                            left: 0;
                        }
                    }
                }
            }
        }

        .subCategoryPanel {
            .containerCategory {
                .navMenu {
                    .backToCategory {
                        img {
                            scale: -1;
                        }
                    }
                }
            }
        }

        .sectionCategory {
            .subCategory {
                .containerContent {
                    .containerSlide {
                        &::before {
                            left: -24px;
                            right: initial;
                        }
                    }
                }
            }
        }

        @media (max-width: 558px) {
            .sectionCategory {
                .subCategory {
                    .containerContent {
                        .containerSlide {
                            &::before {
                                left: -10px;
                                right: initial;
                            }
                        }
                    }
                }
            }
        }
    }
}



.mainPage .containerPage .sectionCategory .subCategoryFirst .subMenu_back {
    margin-top: 0px;
}