/*==============================*/
/*=====----- TEMPLATE -----=====*/
/*==============================*/

.custom-marquee {
    --side-padding: 20px;
    --header-placement: 30px auto auto calc(var(--side-padding) * -1);

    position: relative;
    max-width: 1420px;
    padding: 0 var(--side-padding);
    margin: 0 auto var(--widget-margin-bottom);
    color: var(--black);
}

.custom-marquee .template-header {
    position: absolute;
    inset: var(--header-placement);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    color: var(--white);
}

.custom-marquee .template-title {
    padding: 15px 15px 8px;
    background: var(--black);
    font-family: var(--alternate);
    font-weight: var(--font-weight-thin);
    font-size: 30px;
    line-height: 1;
    color: inherit;
    text-transform: uppercase;
}

.custom-marquee .template-title b {
    font-weight: var(--font-weight-demi);
}

.custom-marquee .brand-new-flag {
    display: block;
    padding: 9px 15px;
    background: var(--red);
    font-family: var(--avenir-heavy-1);
    font-weight: normal;
    font-size: 12px;
    line-height: 1;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--white);
}

.custom-marquee .slide.promoted .brand-new-flag.solo {
    position: absolute;
    inset: var(--header-placement);
}

.custom-marquee .slides {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
}

/*============================*/
/*=====----- SLIDES -----=====*/
/*============================*/

.custom-marquee .slide,
.custom-marquee .img-cont,
.custom-marquee .slide-img {
    position: relative;
    z-index: 1;
}

.custom-marquee .img-cont a {
    padding: 0;
}

.custom-marquee .slide-img {
    width: 100%;
}

.custom-marquee .category-flag {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--avenir-heavy-1);
    font-weight: normal;
    line-height: 1;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #888888;
}

.custom-marquee .category-flag::before {
    display: block;
    width: 16px;
    height: 2px;
    background: #888888;
    content: '';
}

.custom-marquee .slide-title {
    font-family: var(--avenir-black-1);
    font-weight: normal;
    color: inherit;
}

/*----- promoted slide -----*/

.custom-marquee .slide.promoted .content-section {
    position: absolute;
    inset: auto auto 0 0;
    z-index: 2;
    transform: translateY(51%);
    width: 81.79%;
    max-width: 460px;
    padding: 24px;
    background: var(--white);
}

.custom-marquee .slide.promoted .category-flag {
    margin-bottom: 12px;
    font-size: 14px;
}

.custom-marquee .slide.promoted .slide-title {
    font-size: 24px;
    line-height: 1.25;
}

/*----- minor slide -----*/

.custom-marquee .slide.minor {
    border-left: 1px solid #CCCCCC;
}

.custom-marquee .slide.minor .content-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 13px 24px 12px;
}

.custom-marquee .slide.minor .brand-new-flag {
    padding: 8px 10px 6px;
    margin-bottom: 10px;
}

.custom-marquee .slide.minor .category-flag {
    margin-bottom: 10px;
    font-size: 12px;
}

.custom-marquee .slide.minor .slide-title {
    font-size: 16px;
    line-height: 1.375;
}

/*===================================*/
/*=====----- MEDIA QUERIES -----=====*/
/*===================================*/

@media (min-width: 40em) {
    .custom-marquee .slides {
        grid-template: auto / repeat(3, minmax(0, 1fr));
    }

    .custom-marquee .slide.promoted {
        grid-column: span 3;
    }
}

@media (min-width: 75em) {
    .custom-marquee {
        --side-padding: 30px;
    }

    .custom-marquee .template-title {
        padding: 20px 28px 10px 28px;
        font-size: 40px;
    }

    .custom-marquee .slides {
        grid-template:
            'promoted promoted promoted promoted' auto
            '. minor1 minor2 minor3' auto / calc((100% / 3) - 18px) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
        gap: 20px;
    }

    /*----- promoted slide -----*/

    .custom-marquee .slide.promoted {
        grid-area: promoted;
    }

    .custom-marquee .slide.promoted .content-section {
        width: calc(100% / 3);
        max-width: none;
        padding: 38px;
    }

    .custom-marquee .slide.promoted .brand-new-flag {
        padding: 11px 20px 8px;
        font-size: 14px;
    }

    .custom-marquee .slide.promoted .category-flag {
        margin-bottom: 15px;
        font-size: 16px;
    }

    .custom-marquee .slide.promoted .slide-title {
        font-size: 32px;
        line-height: 1.1875;
    }

    /*----- minor slides -----*/

    .custom-marquee .slide.minor:nth-child(2) {
        grid-area: minor1;
    }
    
    .custom-marquee .slide.minor:nth-child(3) {
        grid-area: minor2;
    }
    
    .custom-marquee .slide.minor:last-child {
        grid-area: minor3;
    }

    .custom-marquee .slide.minor .content-section {
        padding-bottom: 0;
    }

    .custom-marquee .slide.minor .slide-title {
        font-size: 18px;
        line-height: calc(4/3);
    }
}