
/* ==================================================
   CLEARANCE SALE
   Clean & Consolidated Stylesheet
================================================== */


/* 1. MAIN CAROUSEL
-------------------------------------------------- */
#clearance-products {
    display: block;
    width: 100%;
    margin: 30px 0;
}

#clearance-products .nProductsCarousel {
    position: relative;
    height: auto !important;
    min-height: 0;
}

/* 2. PRODUCT SCROLLER
-------------------------------------------------- */

#clearance-products .nProductsCarousel__inner {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch;

    height: auto;
    overflow-x: auto;
    overflow-y: hidden;

    scrollbar-width: none;
    scroll-behavior: auto;
}

#clearance-products .nProductsCarousel__inner::-webkit-scrollbar {
    display: none;
}

/* Five products visible on desktop */

#clearance-products .nProductsCarousel__inner > * {
    flex: 0 0 calc((100% - 80px) / 5) !important;
    width: calc((100% - 80px) / 5) !important;
    max-width: calc((100% - 80px) / 5) !important;
    min-width: 0;
    height: auto;
}


/* 3. EDGE GRADIENT
-------------------------------------------------- */

#clearance-products .nProductsCarousel::before,
#clearance-products .nProductsCarousel::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 65px;
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#clearance-products .nProductsCarousel::before {
    left: 0;
    background: linear-gradient(
        to right,
        #fff 0%,
        rgba(255,255,255,0) 100%
    );
}

#clearance-products .nProductsCarousel::after {
    right: 0;
    background: linear-gradient(
        to left,
        #fff 0%,
        rgba(255,255,255,0) 100%
    );
}

/* Show gradient according to scroll position */

#clearance-products .nProductsCarousel.show__prev::before {
    opacity: 1;
}

#clearance-products .nProductsCarousel.show__next::after {
    opacity: 1;
}


/* 4. NAVIGATION ARROWS
-------------------------------------------------- */

#clearance-products .nProductsCarousel__nav {
    position: absolute !important;
    top: 50% !important;
    bottom: auto !important;
    z-index: 10;

    width: 54px;
    height: 54px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.06);

    box-shadow: 0 4px 20px rgba(0,0,0,0.12);

    cursor: pointer;
    opacity: 0;
    visibility: hidden;

    transform: translateY(-50%) !important;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease,
        transform 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;
}

/* Arrow positions */

#clearance-products .nProductsCarousel__prev {
    left: 12px !important;
    right: auto !important;
}

#clearance-products .nProductsCarousel__next {
    right: 12px !important;
    left: auto !important;
}

/* Show arrows */

#clearance-products .nProductsCarousel.show__prev
.nProductsCarousel__prev,
#clearance-products .nProductsCarousel.show__next
.nProductsCarousel__next {
    opacity: 1;
    visibility: visible;
}

/* Arrow image */

#clearance-products .nProductsCarousel__nextButton {
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;
}

#clearance-products .nProductsCarousel__nextButton img {
    display: block;
    width: 13px;
    height: 20px;
    object-fit: contain;
    transition: filter 0.25s ease;
}

/* Reverse left arrow */

#clearance-products .nProductsCarousel__prev img {
    transform: rotate(180deg);
}

/* Hover */

#clearance-products .nProductsCarousel__nav:hover {
    background: #e91d3b;
    border-color: #e91d3b;
    box-shadow: 0 6px 22px rgba(233,29,59,0.25);

    transform: translateY(-50%) scale(1.08) !important;
}

#clearance-products .nProductsCarousel__nav:hover img {
    filter: brightness(0) invert(1);
}

/* Click */

#clearance-products .nProductsCarousel__nav:active {
    transform: translateY(-50%) scale(0.94) !important;
}


/* 5. CLEARANCE HEADER
-------------------------------------------------- */

#clearance-products .clearance-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    text-align: left;
}

#clearance-products .clearance-heading__icon {
    flex: 0 0 52px;

    display: flex;
    align-items: center;
    justify-content: center;
}

#clearance-products .clearance-heading__icon img {
    display: block;
    width: 52px;
    height: 62px;
    object-fit: contain;
}

#clearance-products .clearance-heading__content h2 {
    margin: 0 0 3px;

    color: #111;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.2;
}

#clearance-products .clearance-heading__content p {
    margin: 0;

    color: #555;
    font-size: 17px;
    line-height: 1.4;
}


/* 6. SHOW MORE CARD
-------------------------------------------------- */

#clearance-products .nProductsCarousel__showMore {
    margin-right:10px;
    margin-bottom: 10px;
    min-height: 0;
    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #e5e5e5;
    background: #fafafa;
    border-radius: 5px;
}

#clearance-products .nProductsCarousel__showMore a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;

    width: 100%;
    height: 100%;
    padding: 20px;

    color: #222;
    text-decoration: none;
}

#clearance-products .nProductsCarousel__showMore a:hover {
    color: #e31837;
}

#clearance-products .nProductsCarousel__showMoreIcon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;

    border-radius: 50%;
    background: #e31837;
    color: #fff;

    font-size: 30px;
}

#clearance-products .nProductsCarousel__showMore strong {
    font-size: 17px;
}

#clearance-products .nProductsCarousel__showMore a span:last-child {
    color: #777;
    font-size: 12px;
}


/* 7. TABLET
-------------------------------------------------- */

@media (max-width: 1024px) {

    #clearance-products .nProductsCarousel__inner > * {
        flex-basis: calc((100% - 40px) / 3) !important;
        width: calc((100% - 40px) / 3) !important;
        max-width: calc((100% - 40px) / 3) !important;
    }

}


/* 8. MOBILE
-------------------------------------------------- */

@media (max-width: 600px) {

    /* Two products visible */

    #clearance-products .nProductsCarousel__inner > * {
        flex-basis: calc((100% - 12px) / 2) !important;
        width: calc((100% - 12px) / 2) !important;
        max-width: calc((100% - 12px) / 2) !important;
    }

    /* Header */

    #clearance-products .clearance-heading {
        gap: 10px;
        margin-bottom: 20px;
    }

    #clearance-products .clearance-heading__icon {
        flex-basis: 40px;
    }

    #clearance-products .clearance-heading__icon img {
        width: 40px;
        height: 48px;
    }

    #clearance-products .clearance-heading__content h2 {
        font-size: 22px;
    }

    #clearance-products .clearance-heading__content p {
        font-size: 12px;
    }

    /* Gradient */

    #clearance-products .nProductsCarousel::before,
    #clearance-products .nProductsCarousel::after {
        width: 35px;
    }

    /* Arrows */

    #clearance-products .nProductsCarousel__nav {
        width: 38px;
        height: 38px;
    }

    #clearance-products .nProductsCarousel__prev {
        left: 5px !important;
    }

    #clearance-products .nProductsCarousel__next {
        right: 5px !important;
    }

}