/*******************************************************************************************
*   ___  _          ______                     _ _                _                        *
*  / _ \| |         | ___ \                   | (_)              | |              © 2023   *
* / /_\ | | _____  _| |_/ /_ __ __ _ _ __   __| |_ _ __   __ _   | |_ ___  __ _ _ __ ___   *
* |  _  | |/ _ \ \/ / ___ \ '__/ _` | '_ \ / _` | | '_ \ / _` |  | __/ _ \/ _` | '_ ` _ \  *
* | | | | |  __/>  <| |_/ / | | (_| | | | | (_| | | | | | (_| |  | ||  __/ (_| | | | | | | *
* \_| |_/_|\___/_/\_\____/|_|  \__,_|_| |_|\__,_|_|_| |_|\__, |  \___\___|\__,_|_| |_| |_| *
*                                                         __/ |                            *
*                                                        |___/                             *
* ---------------------------------------------------------------------------------------- *
* This is commercial software, only users who have purchased a valid license and accept    *
* to the terms of the License Agreement can install and use this program.                  *
* ---------------------------------------------------------------------------------------- *
* website: https://cs-cart.alexbranding.com                                                *
*   email: info@alexbranding.com                                                           *
*******************************************************************************************/

@circle-size: 42px;

.ab-fn-parent {
    position: relative;
    &, * {
        .box-sizing(border-box);
    }
    .ab-fn-first-level-item, .ab-fn-second-level-item {
        display: flex;
        flex-wrap: wrap;
        -webkit-box-align: end;
        align-items: flex-end;
        -webkit-box-pack: center;
        justify-content: center;
        position: relative;
        text-align: center;
        min-height: 125px;

        .ab-fn-image-wrap {
            display: flex;
            justify-content: center;
            align-items: center;

            position: relative;
            margin: 10px auto 0 auto;
            max-width: 100%;
            min-height: 100px;
            &.ab-fn-no-image-wrapper {
                .ab-fn-no-image {
                    display: block;
                    height: 0;
                    padding: 50% 0;
                    background: darken(@content_bg, 3%);
                    i {
                        color: @base10;
                    }
                }
            }
            .ab-fn-no-image, img {
                max-width: 100%;

            }
            img {
                .transition(all 150ms);
                &:hover {
                    transform: scale(1.07);
                }
            }
        }
        &:not(.ab-fn-common-item-link) .ab-fn-item-header {
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            display: -webkit-box;
            text-overflow: ellipsis;
            overflow: hidden;
            min-height: 50px;
            max-height: 50px;
            margin-top: 10px;
            word-wrap: break-word;
            .hyphens(auto);
            font-size: 14px;
            color: @font;
        }
        .ab-fn-label {
            display: inline-block;
            position: relative;
            -ms-word-wrap: break-word;
            word-wrap: break-word;
            text-transform: uppercase;
            bottom: 1px;
            padding: 0 5px;
            height: 12px;
            margin-left: 5px;
            font-size: 9px;
            font-weight: bold;
            line-height: 12px;
            .border-radius(8px)
        }
        &:hover {
            .ab-fn-item-header {
                color: @links;
            }
        }
        &.ab-fn-common-item-link {
            -webkit-box-align: center;
            align-items: center;
            flex-direction: column;
            .ab-fn-arrow-more {
                position: relative;
                display: inline-block;
                margin-top: 10px;
                width: @circle-size;
                height: @circle-size;
                border: 2px solid @links;
                .border-radius(50%);
                .transition(0.4s ease);
                i {
                    position: absolute;
                    display: inline-block;
                    top: 50%;
                    left: 50%;
                    transform: translate(-50%, -50%);
                    width: 42%;
                    height: 2px;
                    background: @links;
                    .transition(0.4s ease);
                    &:after, &:before {
                        content: '';
                        position: absolute;
                        display: block;
                        right: 0;
                        height: 2px;
                        width: 51%;
                        background: @links;
                        .transition(0.4s ease);
                    }
                    &:before {
                        top: -3px;
                        transform: rotate(45deg);
                    }
                    &:after {
                        bottom: -3px;
                        transform: rotate(315deg);
                    }
                }
                &:hover {
                    border-color: lighten(@links, 15%);
                    i {
                        background: lighten(@links, 15%);
                        &:before, &:after {
                            background: lighten(@links, 15%);
                        }
                    }
                }
            }
            .ab-fn-item-header {
                padding: 0;
                min-height: auto;
            }
        }
    }
    .ab-fn-second-level {
        display: none !important;
        flex-wrap: wrap;
        padding: 10px 0;
        border: 1px solid @base5;
        border-top: 0;
        .transition(0.4s ease);

        .owl-wrapper-outer {
            .owl-wrapper {
                display: flex !important;
            }
        }
        .ab-fn-delimeter-plus {
            position: relative;
            bottom: 20px;
            width: @circle-size;
            height: @circle-size;
            display: inline-block;
            border: 2px solid @links;
            .border-radius(50%);
            .transition(0.4s ease);
            &:before, &:after {
                content: '';
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
                background: @links;
                .border-radius(2px);
                .transition(0.4s ease);
            }
            &:before {
                width: 50%;
                height: 2px;
            }
            &:after {
                height: 50%;
                width: 2px;
            }
            &:hover {
                border-color: lighten(@links, 15%);
                &:before, &:after {
                    background: lighten(@links, 15%);
                }
            }
        }
        &.active {
            display: flex !important;
        }
        div.delimeter-block {
            display: none;
            cursor: pointer;
            -webkit-box-align: center;
            align-items: center;
            flex-wrap: wrap;
            .ab-fn-item-header {
                display: flex;
                flex-direction: column;
                -webkit-box-align: center;
                align-items: center;
                max-width: 70%;
                margin: 0 auto 10px auto;
                color: lighten(@font, 45%);
            }
        }
        div.delimeter-block[data-delimeter="1"] {
            display: inline-flex;
        }
    }
    .owl-item {
        display: flex;
        flex-wrap: wrap;
        & > div, & > a.ab-fn-second-level-item {
            width: 100% !important;
            display: flex;
        }
    }
    .ab-fn-common-link {
        margin: 25px 0;
        text-align: center;
        .ab-fn-common-text-link {
            font-size: 17px;
            i {
                position: relative;
                left: 8px;
                top: 3px;
                .transition(0.3s ease);
            }
            &:hover {
                i {
                    color: @secondary_button;
                }
            }
        }
    }

    .owl-carousel.owl-theme .owl-controls {
        .owl-buttons {
            .ab-fn-hidden {
                display: none;
            }
        }
    }
    .owl-theme .owl-controls {
        margin-top: 0;
    }
    .owl-item:last-child {
        .ab-fn-first-level-item {
            border-right: none;
        }
    }
}
.ab-fn-first-level-item {
    padding-top: 10px;
    padding-bottom: 9px;
    border-bottom: 1px solid @base10;
    margin: unset;

    &.active {
        padding-bottom: 7px;
        border-bottom: 3px solid @links;
        background: @content_bg;
        .ab-fn-item-header {
            color: @links;
            text-decoration: none;
        }
    }
}
.ab-fn-scrollbar {
    position: absolute;
    z-index: 1;
    top: 1px;
    width: 100%;
    height: 1px;
    .ab-fn-scrollbar-plate {
        position: absolute;
        left: 0;
        min-width: 20px;
        height: 2px;
        background: rgba(0,0,0,0.1);
        .transition(0.6s ease);
    }
    .ab-fn-scroll-scrolled, .ab-fn-scroll-common {
        position: absolute;
        top: -15px;
        font-size: 8px;
        color: darken(@base5, 10%);
    }
    .ab-fn-scroll-scrolled {
        left: 0;
    }
    .ab-fn-scroll-common {
        right: 0;
    }
}
.ab-fn-first-level {
    display: flex;
    flex-wrap: wrap;
    border: 1px solid @base5;
    border-bottom: 0;
    &.one_level {
        border-bottom: 1px solid @base5;
        .ab-fn-first-level-item {
            background: @content_bg;
            margin: 0;
            padding-bottom: 0;
            border: 0 none;
            .ab-fn-fl-content, .ab-fn-sl-content {
                padding: 0 15px 15px;
            }
            &.active {
                &:before, &:after {
                    display: none;
                }
                .ab-fn-item-header {
                    color: @links;
                }
            }
        }
    }
}
a.ab-fn-second-level-item {
    cursor: pointer;
    .ab-fn-item-header {
        color: @links !important;
        font-weight: normal !important;
    }
    &:hover .ab-fn-item-header {
        text-decoration: underline;
    }
    &:not(.delimeter-0) {
        display: none;
    }
}
.ab-fn-fl-content, .ab-fn-sl-content {
    max-width: 100%;
    padding: 0 15px 1px;
}
.ab__fn_grid {
    .ab-fn-first-level-item {
        border-bottom: 1px solid @base5;
        box-sizing: content-box;
    }
}
.ab-fn-first-level .ab-fn-second-level {
    .box-sizing(content-box);
}
.ab-fn-clipped {
    max-height: 220px;
    overflow: hidden;

    +.ab-fn-second-level.active {
        padding-block: unset;
        border-bottom-color: transparent;
    }
}

@media screen and (max-width: 576px) {
    .ab-fn-parent {
        .ab-fn-first-level-item, .ab-fn-second-level-item {
            min-height: auto;
            margin-top: 0;
            &:not(.ab-fn-common-item-link) {
                .ab-fn-item-header {
                    margin: 5px 0;
                    font-size: 12px;
                    min-height: 42px;
                    max-height: 42px;
                    hyphens: auto;
                }
            }
            .ab-fn-label {
                padding: 0 4px;
                height: 12px;
                font-size: 8px;
                line-height: 14px;
                position: absolute;
                top: 20px;
                right: 2px;
            }
        }
        .ab-fn-image-wrap:not(.ab-fn-no-image-wrapper) {
            img:not(.abt-ut2-lazy-loaded) ~ .ab-fn-img-loader {
                &:before {
                    width: @circle-size;
                    height: @circle-size;
                }
            }
        }
        .ab-fn-second-level-item {
            &.ab-fn-common-item-link {
                flex-direction: column;
                justify-content: center;
                .ab-fn-arrow-more {
                    width: 32px;
                    height: 32px;
                    margin-top: 5px;
                }
            }
            .ab-fn-delimeter-plus {
                width: @circle-size;
                height: @circle-size;
            }
        }
    }
    .ab-fn-no-second-lvl {
        padding: 0 0 10px;
    }
}

@keyframes abFnRotateIndicator {
    0% {
        .rotate(0deg);
    }
    100% {
        .rotate(360deg);
    }
}
@-webkit-keyframes abFnRotateIndicator {
    0% {
        .rotate(0deg);
    }
    100% {
        .rotate(360deg);
    }
}
@-moz-keyframes abFnRotateIndicator {
    0% {
        .rotate(0deg);
    }
    100% {
        .rotate(360deg);
    }
}
@-o-keyframes abFnRotateIndicator {
    0% {
        .rotate(0deg);
    }
    100% {
        .rotate(360deg);
    }
}
@-ms-keyframes abFnRotateIndicator {
    0% {
        .rotate(0deg);
    }
    100% {
        .rotate(360deg);
    }
}