/** CATEGORY LIST **/
.ecb-categorylist {
    .btn {
        margin: .5rem;
    }
}

/** CATEGORY SLIDER **/
.ecb-categoryslider {
    position: relative;

    .featured-products__title {
        font-size: 1.25rem;
        font-weight: 600;
    }


    .featured-products__slider {
        align-items: stretch;

        .product-slider__item {
            height: auto;

            .product-miniature-body {
                flex: 1;
                display: flex;
                flex-direction: column;

                .product-miniature__description {
                    flex: 1;
                }
            }
        }
    }

    .product-slider__item {
        .product-miniature {
            max-width: 265px;
            margin: 0 auto;
        }
    }

    .featured-products__navigation {
        position: absolute;
        top: 50%;
        left: 0;
        width: calc(100% + 32px);
        justify-content: space-between;
        margin: 0 -16px !important;

        .swiper-button-custom {
            width: 32px;
            height: 32px;
            padding: 5px;
            background: #f0f0f0;
            border-radius: 25px;
            box-shadow: 0 10px 30px rgba(50, 56, 66, .2);

            .material-icons {
                color: #192025;
            }

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

    &.masonry {
        .product-miniature {
            background: none;

            .product-miniature__thumb {
                border-radius: var(--br-default);

                .product-flags {
                    display: none !important;
                }
            }

            .product-miniature-body {
                display: none;
            }
        }
    }
}

/** SELLER LIST **/
.ecb-sellerlist {
    max-width: 300px;
    margin: 0 auto;

    .seller-list {
        display: flex;
        flex-wrap: wrap;

    }

    .seller-card {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        background: #ffffff;
        border-radius: 2rem;
        padding: 2rem;

        .seller-card__shop-image {
            width: 100%;
            margin-bottom: 2rem;
        }

        .seller-card__shop-url {
            font-size: 1.5rem;
            text-align: center;
            color: #192025;
        }
    }

    @media (min-width: 768px) {
        max-width: none;
    }

    @media (min-width: 992px) {
        .seller-list {
            justify-content: space-around;
        }

        .seller-card {
            height: 100%;

            .seller-card__shop-url {
                font-size: 2rem;
            }
        }
    }
}

/** HOME CONTENT **/
.ecb-homecontent {
    background: #ffffff;
    border-radius: 2rem;
    padding: 3rem 2rem 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: start;

    .ecb-homecontent__title {
        font-size: 2rem;
        font-weight: 400;
        margin-bottom: 2rem;
    }

    .ecb-homecontent__text {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .ecb-homecontent__image {
        margin-top: 50px;
    }

    @media (min-width: 992px) {
        padding: 6rem 5rem 3rem;

        .ecb-homecontent__title {
            font-size: 3rem;
        }

        .ecb-homecontent__text {
            font-size: 1.5rem;
        }
    }
}

/** TOPBAR **/
.ecb-topbar {
    font-size: .75rem;
    font-weight: 500;
    text-align: center;
    color: var(--color-white);

    &:has(.swiper) {

        .swiper-button-prev,
        .swiper-button-next {
            color: var(--color-white);
            height: 15px;
            width: 15px;
            margin: 0;
            transform: translateY(-50%);
        }

        .swiper-button-prev {
            left: 2rem;
        }

        .swiper-button-next {
            right: 2rem;
        }
    }
}

/** CATEGORY CARDS + CUSTOM CARDS **/
.ecb-category-cards,
.ecb-custom-cards {
    ul {
        flex-wrap: wrap;

        li {
            flex-basis: 50%;
            padding: .5rem;

            &:nth-child(5) {
                flex-basis: 100%;
            }
        }
    }

    .category-card,
    .custom-card {
        aspect-ratio: 4/3;

        .card-img-top {
            &::after {
                transition: .3s;
                content: '';
                display: block;
                background: rgb(from var(--color-primary) r g b / .8);
                position: absolute;
                top: 0;
                left: 0;
                height: 100%;
                width: 100%;
            }

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

        .card-body {
            font-size: .875rem;
        }

        .card-title {
            transform: translateY(50%);
        }

        .card-link {
            transition: .3s;
            position: absolute;
            transform: translateY(100%);
            font-size: 1rem;
        }

        &:hover {
            .card-img-top::after {
                background: rgb(from var(--color-black) r g b / .2);
            }

            .card-link {
                transform: none;
            }
        }

        li:nth-child(5) & {
            aspect-ratio: 4/1.60;
        }
    }

    @media (min-width: 768px) {
        ul {
            flex-wrap: nowrap;

            li {
                flex: 1;
                padding: 1rem;

                &.last-item {
                    flex: 2;
                }

            }

            &:has(li:nth-child(5)) {
                li {
                    padding: .5rem;
                }
            }
        }

        .category-card,
        .custom-card {
            aspect-ratio: 1/1;

            ul li.last-item & {
                aspect-ratio: 2/1;
            }
        }
    }

    @media (min-width: 992px) {
        .category-card,
        .custom-card {
            .card-body {
                font-size: 1.125rem;
            }
        }
    }
}

/** IMAGE AND TEXT **/
.ecb-image-and-text {
    margin-top: 2rem;

    .ecb-image-and-text__image {
        overflow: hidden;
    }

    &.image--side-left,
    &.image--side-right {
        .ecb-image-and-text__text {
            background-color: var(--color-chablis);
        }
    }

    &.image--side-left {
        .ecb-image-and-text__text {
            order: -1;
        }
    }

    .ecb-image-and-text__text,
    .ecb-image-and-text__image {
        flex: 1 50%;
    }

    &.image--back-left,
    &.image--back-right {
        position: relative;
        padding: 2rem 10% 10rem;

        .ecb-image-and-text__text {
            background-color: var(--color-white);
            position: relative;
            z-index: 2;
            width: 100%;
        }

        .ecb-image-and-text__image {
            position: absolute;
            height: 100%;
            width: 100%;
            top: 0;
            left: 0;

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

    @media (min-width: 768px) {
        &.image--side-left,
        &.image--side-right {
            .ecb-image-and-text__image {
                img {
                    width: 100%;
                    height: 100%;
                    object-fit: cover;
                }

            }
        }

        &.image--side-left {
            .ecb-image-and-text__text {
                order: 2;
            }
        }

        &.image--back-left,
        &.image--back-right {
            .ecb-image-and-text__text {
                width: 70%;
            }
        }

        &.image--back-left {
            .ecb-image-and-text__text {
                margin-left: auto;
            }
        }
    }

    @media (min-width: 992px) {

        &.image--back-left,
        &.image--back-right {
            .ecb-image-and-text__text {
                width: 50%;
            }
        }
    }
}

/*** CMS HEADER ***/
.ecb_cms-header {
    height: 200px;
    position: relative;
    text-align: center;
    color: var(--color-white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    & > * {
        position: relative;
        z-index: 2;
    }

    &::before {
        content: '';
        display: block;
        position: absolute;
        height: 100%;
        width: 100%;
        left: 0;
        bottom: 0;
        background: rgba(0,0,0,.3);
        z-index: 2;
    }

    .ecb_cms-header__image {
        position: absolute;
        left: 0;
        bottom: 0;
        z-index: 1;
    }

    .ecb_cms-header__title {
        color: inherit !important;
        text-transform: uppercase;
    }

    .ecb_cms-header__intro {
        max-width: 60%;
        line-height: 1.2;
    }
}