/* Main container */
.sub_category_container{
    padding: 80px 100px;
}

/* Page title */
.sub_category_title{
    display: flex;
    justify-content: center;
    position: relative;
}

/* Go back button */
.go_back_btn{
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    font-weight: 500;
    border: none;
    background-color: inherit;
    cursor: pointer;
    font-family: "Poppins";
}

/* Go back button */
.go_back_btn:hover{
    color: var(--purple1);
}

/* Go back button icon */
.go_back_btn:hover::before{
    content: url("/wp-content/themes/lenkijoje-pigiau/assets/icons/left_swing_icon_purple.png");
}

/* Go back button icon */
.go_back_btn::before{
    content: url("/wp-content/themes/lenkijoje-pigiau/assets/icons/left_swing_icon_white.png");
    padding-right: 10px;
}

/* Page title text */
.sub_category_title .h2 {
    width: fit-content;
    border-bottom: 2px solid var(--purple1);
    border-image: linear-gradient(to right, transparent 25%, var(--purple1) 25%, var(--purple1) 75%, transparent 75%) 100% 1;
    padding-bottom: 10px;
}

/* List of all sub categories */
.sub_category_list{
    display: flex;
    flex-wrap: wrap;
    --cols: 5;
    --gap: 20px;
    gap: var(--gap);
    margin: 40px 0px 0px 0px;
}

/* All sub categories (hidden on mobile) */
.sub_categories_page{
    display: flex;
}

/* All sub categories (hidden on mobile) */
.sub_categories_page_mobile{
    display: none;
}

/* sub category item */
.sub_category_item{
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    width: calc(100% / var(--cols) - var(--gap) / var(--cols) * (var(--cols) - 1));
    border: 1px solid transparent;
    box-shadow: none;
    transition: box-shadow 0.3s ease; 
}

/* sub category title */
.category_item span{
    font-size: 16px;
    font-weight: 500;
}

/* "show more" button */
.show_all_sub_categories_btn{
    display: none;
}

/* Sub category link */
.sub_category_link{
    width: 100%;
    height: 170px;
    overflow: hidden;
}

/* Sub category link */
.sub_category_link img{
    height: 100%;
    width: 100%;
    object-fit: cover;
    border-radius: 5px;
}

/* Category item */
.sub_category_item:hover{
    border: 1px solid var(--grey2);
    box-shadow: 0px 0px 10px 0px rgba(23, 28, 36, 0.2);
    border-radius: 5px;
    transition: box-shadow 0.3s ease; 
}

/* Category title */
.sub_category_item h3{
    padding-bottom: 15px;
    font-weight: 500;
    font-size: 16px;
    text-align: center;
}

@media screen and (max-width: 1200px){

    /* List of sub categories */
    .sub_category_list{
        --cols: 4;
    }

}

@media screen and (max-width: 1100px){

    /* Main page container */
    .sub_category_container{
        padding: 80px 50px;
    }
}

@media screen and (max-width: 1000px){
    
    /* List of sub categories */
    .sub_category_list{
        --cols: 3;
    }
}

@media screen and (max-width: 900px){
    
    /* List of sub categories */
    .sub_category_list{
        --cols: 2;
    }
}

@media screen and (max-width: 767px){
    
    /* List of  sub categories */
    .sub_category_list{
        --cols: 1;
        gap:35px;
        margin: 30px 0px 0px 0px;
    }

    /* Sub category container */
    .sub_category_container{
        padding: 50px 20px;
    }

    /* Title text */
    .sub_category_title .h2{
        font-size: 18px;
        line-height: 20px;
    }

    /* "show more" button */
    .show_all_sub_categories_btn{
        display: flex;
        justify-content: center;
    }

    /* "show more" button text */
    .show_all_sub_categories_btn a{
        width: 80%;
        display: flex;
        justify-content: center;
        margin-top: 30px;
    }

    /* All sub categories (hidden on mobile) */
    .sub_categories_page_mobile{
        display: flex;
        justify-content: center;
    }

    /* DESKTOP sub categories div */
    .sub_categories_page{
        display: none;
    }

    /* "show more" button */
    .show_all_sub_categories_btn{
        display: flex;
    }

    /* Sub category item */
    .sub_category_item{
        opacity: 1;
        transition: opacity 0.5s ease;
        width: 80%;
        border: none;
    }

    /* Hidden sub category */
    .hidden_sub_category, .hidden_sub_category *{
        /* opacity: 0;
        pointer-events: none;
        visibility: hidden;
        max-height: 0px;
        transform: translateX(-100%);
        overflow: hidden;
        margin-left: -9999; */
        display: none;
    }

    .sub_category_item:hover{
        border: none;
        box-shadow: none;
        border-radius: 0px;
        transition: none;
    }

    .sub_category_item h3{
        padding-bottom: 0px
    }

    .sub_category_link{
        height: 240px;
    }

    .go_back_btn{
        display: none;
    }

}

@media screen and (max-width: 479px){

    /* "show more" button text */
    .show_all_sub_categories_btn a{
        width: 100%;
    }

    .sub_category_item{
        width: 100%;
    }

    .sub_category_link{
        height: 150px;
    }

}