/**
 * ====================================================
 * Shopex Pro
 * Flash Sale CSS
 * ====================================================
 *
 * Location:
 * assets/css/flash-sale.css
 *
 * Purpose:
 * - Flash Sale section
 * - One product at a time
 * - Header + View All
 * - Limited Time Deals
 * - Countdown
 * - Header navigation arrows
 * - Product card
 * - Discount badge
 * - Sales information
 * - Progress bar
 * - Shop Now CTA
 * - Responsive layout
 *
 * Status:
 * FINAL / LOCKED
 *
 * Author:
 * Charka Creative Design
 * ====================================================
 */


/* ====================================================
   01. FLASH SALE CONTAINER
==================================================== */

.shopex-home-flash-sale {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


.shopex-flash-sale-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


.shopex-flash-sale-layout,
.shopex-flash-sale-main {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* ====================================================
   02. FLASH SALE HEADER
==================================================== */

.shopex-flash-sale-header {
    position: relative;

    display: grid;

    grid-template-columns:
        1fr
        auto
        1fr;

    align-items: center;

    width: 100%;

    margin: 0 0 16px;
    padding: 0;

    box-sizing: border-box;
}


/* ====================================================
   03. HEADER LEFT
==================================================== */

.shopex-flash-sale-header-left {
    grid-column: 1;

    justify-self: start;

    min-width: 0;

    margin: 0;
    padding: 0;

    box-sizing: border-box;
}


/* ====================================================
   04. FLASH SALE TITLE
==================================================== */

.shopex-flash-sale-title {
    display: flex;

    align-items: center;

    gap: 7px;

    margin: 0;
    padding: 0;

    color: #222222;

    font-size: 20px;
    font-weight: 800;

    line-height: 1.15;

    white-space: nowrap;
}


.shopex-flash-sale-title i {
    flex-shrink: 0;

    color: #ff6b00;

    font-size: 21px;
}


/* ====================================================
   05. HEADER RIGHT
==================================================== */

.shopex-flash-sale-header-right {
    grid-column: 3;

    justify-self: end;

    display: flex;

    align-items: center;

    gap: 16px;

    min-width: 0;

    margin: 0;
    padding: 0;

    box-sizing: border-box;
}


/* ====================================================
   06. VIEW ALL
==================================================== */

.shopex-flash-sale-view-all {

    flex-shrink: 0;
    margin-left: auto;
    margin-right: 0;

}

.shopex-flash-sale-view-all a {

    display: inline-flex;
    align-items: center;
    justify-content: flex-end;

    gap: 6px;

    color: #ff9900;

    font-size: 15px;
    font-weight: 700;

    line-height: 1.2;

    text-decoration: none;
    white-space: nowrap;

    transition:
        color .25s ease,
        transform .25s ease;

}

.shopex-flash-sale-view-all a:hover {

    color: #111111;

    transform: translateX(2px);

}

.shopex-flash-sale-view-all i {

    font-size: 10px;

}

/* ====================================================
   07. LIMITED TIME DEALS
   Centered below title + view all
==================================================== */

.shopex-flash-sale-subtitle {
    grid-column: 1 / -1;

    justify-self: center;

    width: 100%;

    margin: 7px 0 9px;
    padding: 0;

    color: #777777;

    font-size: 14px;
    font-weight: 500;

    line-height: 1.35;

    text-align: center;
}


/* ====================================================
   08. COUNTDOWN
==================================================== */

.shopex-flash-sale-countdown {
    grid-column: 1 / -1;

    justify-self: center;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 6px;

    margin: 0;

    padding: 0;

    white-space: nowrap;

    box-sizing: border-box;
}


.shopex-flash-sale-countdown-item {
    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    min-width: 60px;

    height: 45px;

    padding: 3px;

    border-radius: 7px;

    background: #111111;

    color: #ffffff;

    box-sizing: border-box;
}


.shopex-flash-sale-countdown-number {
    display: flex;

    align-items: center;
    justify-content: center;

    color: #ffffff;

    font-size: 20px;
    font-weight: 800;

    line-height: 1;
}


.shopex-flash-sale-countdown-label {
    margin-top: 3px;

    color: #ffffff;

    font-size: 12px;
    font-weight: 600;

    line-height: 1;

    text-transform: uppercase;

    letter-spacing: .2px;

    opacity: .7;
}


.shopex-flash-sale-countdown-separator {
    color: #ff9900;

    font-size: 16px;
    font-weight: 800;

    line-height: 1;
}


/* ====================================================
   09. SLIDER
==================================================== */

.shopex-flash-sale-slider {
    position: relative;

    display: flex;

    align-items: center;

    width: 100%;

    margin: 0;
    padding: 0;

    box-sizing: border-box;
}


/* ====================================================
   10. PRODUCTS WRAPPER
   One product visible at a time
==================================================== */

.shopex-flash-sale-products {
    position: relative;

    display: block;

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 0;

    overflow: hidden;

    box-sizing: border-box;
}


/* ====================================================
   11. PRODUCT CARD
==================================================== */

.shopex-flash-sale-card {

    position: relative;

    display: none;

    flex-direction: row;

    align-items: flex-start;

    width: 100%;
    min-width: 0;

    min-height: 350px;

    margin: 0;
    padding: 0;

    padding-top: 58px;

    overflow: hidden;

    border: 1px solid #eeeeee;

    border-radius: 14px;

    background: #ffffff;

    box-shadow:
        0 5px 18px rgba(0, 0, 0, .055);

    box-sizing: border-box;

}


/* Active product */

.shopex-flash-sale-card[aria-hidden="false"] {

    display: flex;

}

/* ====================================================
   12. PRODUCT IMAGE
   Image stays below title
==================================================== */

.shopex-flash-sale-image {

    position: relative;

    flex: 0 0 auto;

    width: 100%;

    min-width: 0;

    height: 250px;
    
    margin-top: 5px;

    overflow: hidden;

    background: #f7f7f7;

    box-sizing: border-box;

}

/* ----------------------------------------------------
   IMAGE LINK
---------------------------------------------------- */

.shopex-flash-sale-image a {

    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    margin: 0;
    padding: 0;

    text-decoration: none;

}


/* ----------------------------------------------------
   PRODUCT IMAGE
---------------------------------------------------- */

.shopex-flash-sale-image img {

    display: block;

    width: 100%;
    height: 100%;

    margin: 0;
    padding: 0;

    object-fit: cover;

    object-position: center;

    transition:
        transform .4s ease;

}


/* ----------------------------------------------------
   IMAGE HOVER
---------------------------------------------------- */

.shopex-flash-sale-card:hover
.shopex-flash-sale-image img {

    transform: scale(1.035);

}


/* ====================================================
   13. DISCOUNT BADGE
==================================================== */

.shopex-flash-sale-discount {

    position: absolute;

    top: 9px;
    right: 9px;

    z-index: 5;

    display: flex;

    align-items: center;
    justify-content: center;

    min-width: 43px;

    height: 24px;

    padding: 0 7px;

    border-radius: 999px;

    background: #ff3b30;

    color: #ffffff;

    font-size: 10px;

    font-weight: 800;

    line-height: 1;

    white-space: nowrap;

    box-shadow:
        0 5px 12px rgba(255, 59, 48, .22);

    pointer-events: none;

}


/* ====================================================
   14. PRODUCT CONTENT
==================================================== */

.shopex-flash-sale-content {
    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    z-index: 8;

    display: flex;

    flex-direction: column;

    width: 100%;

    min-width: 0;

    padding: 0;

    box-sizing: border-box;

    pointer-events: none;
}

/* ====================================================
   15. PRODUCT TITLE
   Full Width / Above Image
==================================================== */

.shopex-flash-sale-card
.shopex-flash-sale-product-title {

    position: absolute;

    top: 0;
    left: 0;
    right: 0;

    z-index: 10;

    display: block;

    width: 100%;

    min-height: 0;

    margin: 0;

    padding: 14px 16px 8px;

    box-sizing: border-box;

    color: #222222;

    font-size: 19px;

    font-weight: 700;

    line-height: 1.35;

    text-align: left;

}


/* ----------------------------------------------------
   TITLE LINK
---------------------------------------------------- */

.shopex-flash-sale-product-title a {

    display: block;

    width: 100%;

    margin: 0;

    padding: 0;

    overflow: hidden;

    color: #222222;

    text-decoration: none;

    white-space: nowrap;

    text-overflow: ellipsis;

    transition:
        color .25s ease;

}


/* ----------------------------------------------------
   TITLE HOVER
---------------------------------------------------- */

.shopex-flash-sale-product-title a:hover {

    color: #ff9900;

}


/* ====================================================
   16. PRICE
   Price overlay on image footer
==================================================== */

.shopex-flash-sale-price {
    position: absolute;

    left: 10px;
    bottom: 42px;

    z-index: 12;

    display: flex;
    flex-direction: column;

    align-items: flex-start;
    justify-content: center;

    gap: 1px;

    margin: 0;
    padding: 5px 9px;

    min-width: 92px;

    border-radius: 7px;

    background: rgba(255, 255, 255, .96);

    box-shadow:
        0 3px 10px rgba(0, 0, 0, .14);

    box-sizing: border-box;
}


/* Regular price */

.shopex-flash-sale-price del {
    display: block;

    margin: 0;
    padding: 0;

    color: #999999;

    font-size: 11px;
    font-weight: 500;

    line-height: 1.1;

    white-space: nowrap;
}


/* Sale price */

.shopex-flash-sale-price strong {
    display: block;

    margin: 0;
    padding: 0;

    color: #111111;

    font-size: 17px;
    font-weight: 800;

    line-height: 1.15;

    white-space: nowrap;
}

/* ====================================================
   17. SALES META
   SOLD / TARGET
==================================================== */

.shopex-flash-sale-meta {
    position: absolute;

    left: 10px;
    right: 10px;
    bottom: 8px;

    z-index: 20;

    display: flex;
    align-items: center;
    justify-content: space-between;

    width: auto;

    margin: 0;
    padding: 0;

    color: #777777;

    font-size: 10px;
    font-weight: 600;

    line-height: 1.2;

    box-sizing: border-box;
}


/* SOLD label */

.shopex-flash-sale-sold-label {
    color: #666666;

    font-size: 10px;
    font-weight: 600;

    text-transform: uppercase;

    letter-spacing: .2px;
}


/* SOLD count / Target */

.shopex-flash-sale-sold-count {
    color: #222222;

    font-size: 10px;
    font-weight: 700;

    white-space: nowrap;
}

/* ====================================================
   18. SALES PROGRESS
   Flash Sale Sold Progress Bar
==================================================== */

.shopex-flash-sale-progress {
    position: absolute;

    left: 10px;
    right: 10px;
    bottom: 25px;

    z-index: 19;

    width: auto;

    margin: 0;
    padding: 0;

    box-sizing: border-box;
}


/* Progress track */

.shopex-flash-sale-progress-bar {
    position: relative;

    display: block;

    width: 100%;
    height: 6px;

    overflow: hidden;

    border-radius: 999px;

    background: #eeeeee;

    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, .08);

    box-sizing: border-box;
}


/* Progress fill */

.shopex-flash-sale-progress-fill {
    display: block;

    width: 0;
    height: 100%;

    max-width: 100%;

    margin: 0;
    padding: 0;

    border-radius: 999px;

    background:
        linear-gradient(
            90deg,
            #ff9900 0%,
            #ff5a00 100%
        );

    box-shadow:
        0 1px 5px rgba(255, 107, 0, .22);

    box-sizing: border-box;

    transition:
        width .45s ease;
}

/* ====================================================
   19. SHOP NOW
==================================================== */

.shopex-flash-sale-shop-now {
    position: absolute;

    right: 10px;
    bottom: 42px;

    z-index: 13;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 5px;

    width: auto;
    min-width: 82px;

    min-height: 32px;

    margin: 0;
    padding: 0 10px;

    border: 0;
    border-radius: 7px;

    background: #ff9900;

    color: #ffffff;

    font-size: 11px;
    font-weight: 800;

    line-height: 1;

    text-align: center;
    text-decoration: none;

    box-shadow:
        0 3px 8px rgba(255, 153, 0, .22);

    box-sizing: border-box;

    transition:
        background .25s ease,
        transform .25s ease,
        box-shadow .25s ease;
}


.shopex-flash-sale-shop-now:hover {
    background: #111111;

    color: #ffffff;

    transform: translateY(-1px);

    box-shadow:
        0 5px 12px rgba(0, 0, 0, .15);
}


.shopex-flash-sale-shop-now i {
    font-size: 10px;
}

/* ====================================================
   20. SLIDER ARROWS
   Header-style compact navigation
==================================================== */

.shopex-flash-sale-prev,
.shopex-flash-sale-next {

    position: absolute;

    /* Header-এর vertical level */
    top: -2px;

    z-index: 20;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 25px;
    height: 25px;

    margin: 0;
    padding: 0;

    border: 1px solid #e6e6e6;
    border-radius: 50%;

    background: #ffffff;
    color: #222222;

    font-size: 11px;
    line-height: 1;

    cursor: pointer;

    box-sizing: border-box;

    box-shadow:
        0 3px 10px rgba(0, 0, 0, .08);

    transition:
        background .25s ease,
        color .25s ease,
        border-color .25s ease,
        box-shadow .25s ease,
        transform .20s ease;
}


/* ----------------------------------------------------
   PREVIOUS
---------------------------------------------------- */

.shopex-flash-sale-prev {

    left: 50%;

    transform: translateX(-18px);

}


/* ----------------------------------------------------
   NEXT
---------------------------------------------------- */

.shopex-flash-sale-next {

    left: 50%;

    transform: translateX(8px);

}


/* ----------------------------------------------------
   HOVER
---------------------------------------------------- */

.shopex-flash-sale-prev:hover,
.shopex-flash-sale-next:hover {

    border-color: #ff9900;

    background: #ff9900;

    color: #ffffff;

    box-shadow:
        0 5px 14px rgba(255, 153, 0, .20);

}


/* ----------------------------------------------------
   ACTIVE
---------------------------------------------------- */

.shopex-flash-sale-prev:active {

    transform:
        translateX(-38px)
        scale(.94);

}

.shopex-flash-sale-next:active {

    transform:
        translateX(8px)
        scale(.94);

}


/* ----------------------------------------------------
   SMALL MOBILE
---------------------------------------------------- */

@media (max-width: 767px) {

    .shopex-flash-sale-prev,
    .shopex-flash-sale-next {

        width: 28px;
        height: 28px;

        font-size: 10px;

    }

    .shopex-flash-sale-prev {

        transform: translateX(-34px);

    }

    .shopex-flash-sale-next {

        transform: translateX(6px);

    }

    .shopex-flash-sale-prev:active {

        transform:
            translateX(-34px)
            scale(.94);

    }

    .shopex-flash-sale-next:active {

        transform:
            translateX(6px)
            scale(.94);

    }

}


/* ====================================================
   21. EMPTY STATE
==================================================== */

.shopex-flash-sale-empty {
    width: 100%;

    padding: 30px 15px;

    border: 1px dashed #dddddd;

    border-radius: 12px;

    background: #fafafa;

    text-align: center;

    box-sizing: border-box;
}


.shopex-flash-sale-empty p {
    margin: 0;

    color: #777777;

    font-size: 13px;
}


/* ====================================================
   22. TABLET
==================================================== */

@media (max-width: 991px) {

    .shopex-flash-sale-title {
        font-size: 21px;
    }


    .shopex-flash-sale-header-right {
        gap: 11px;
    }


    .shopex-flash-sale-countdown-item {
        min-width: 35px;
        height: 35px;
    }


    .shopex-flash-sale-countdown-number {
        font-size: 12px;
    }


    .shopex-flash-sale-countdown-label {
        font-size: 5.5px;
    }


    .shopex-flash-sale-prev,
    .shopex-flash-sale-next {
        top: -67px;
    }


    .shopex-flash-sale-image {
        flex-basis: 43%;
        width: 43%;
    }


    .shopex-flash-sale-content {
        width: 57%;
        padding: 13px;
    }

}


/* ====================================================
   23. MOBILE
==================================================== */

@media (max-width: 767px) {

    .shopex-flash-sale-header {
        display: grid;

        grid-template-columns: 1fr auto;

        align-items: start;

        margin-bottom: 15px;
    }


    .shopex-flash-sale-header-left {
        grid-column: 1;
    }


    .shopex-flash-sale-header-right {
        grid-column: 2;

        gap: 9px;

        align-items: flex-start;
    }


    .shopex-flash-sale-title {
        font-size: 20px;
    }


    .shopex-flash-sale-title i {
        font-size: 19px;
    }


    .shopex-flash-sale-subtitle {
        grid-column: 1 / -1;

        order: 3;

        margin-top: 8px;

        font-size: 10px;
    }


    .shopex-flash-sale-countdown {
        grid-column: 1 / -1;

        order: 4;

        margin-top: 5px;
    }


    .shopex-flash-sale-countdown-item {
        min-width: 33px;

        height: 34px;

        padding: 3px;
    }


    .shopex-flash-sale-countdown-number {
        font-size: 11px;
    }


    .shopex-flash-sale-countdown-label {
        display: none;
    }


    .shopex-flash-sale-countdown-separator {
        font-size: 11px;
    }


    .shopex-flash-sale-view-all a {
        font-size: 11px;
    }


    .shopex-flash-sale-prev,
    .shopex-flash-sale-next {
        top: -48px;

        width: 27px;
        height: 27px;

        font-size: 10px;
    }


    .shopex-flash-sale-prev {
        transform:
            translateX(-34px);
    }


    .shopex-flash-sale-next {
        transform:
            translateX(7px);
    }


    .shopex-flash-sale-prev:active {
        transform:
            translateX(-34px)
            scale(.95);
    }


    .shopex-flash-sale-next:active {
        transform:
            translateX(7px)
            scale(.95);
    }


    .shopex-flash-sale-card {
        min-height: 0;
    }


    .shopex-flash-sale-image {
        flex-basis: 43%;
        width: 43%;

        aspect-ratio: 1 / 1;
    }


    .shopex-flash-sale-content {
        width: 57%;

        gap: 6px;

        padding: 11px;
    }


    .shopex-flash-sale-product-title {
        min-height: 34px;

        font-size: 13px;
    }


    .shopex-flash-sale-price strong {
        font-size: 15px;
    }


    .shopex-flash-sale-shop-now {
        min-height: 34px;

        font-size: 10px;
    }

}


/* ====================================================
   24. SMALL MOBILE
==================================================== */

@media (max-width: 480px) {

    .shopex-flash-sale-title {
        font-size: 18px;
    }


    .shopex-flash-sale-title i {
        font-size: 17px;
    }


    .shopex-flash-sale-subtitle {
        font-size: 9px;
    }


    .shopex-flash-sale-countdown {
        gap: 3px;
    }


    .shopex-flash-sale-countdown-item {
        min-width: 30px;

        height: 32px;
    }


    .shopex-flash-sale-countdown-number {
        font-size: 10px;
    }


    .shopex-flash-sale-countdown-separator {
        font-size: 10px;
    }


    .shopex-flash-sale-header-right {
        gap: 6px;
    }


    .shopex-flash-sale-view-all a {
        font-size: 10px;
    }


    .shopex-flash-sale-prev,
    .shopex-flash-sale-next {
        top: -45px;

        width: 25px;
        height: 25px;
    }


    .shopex-flash-sale-prev {
        transform:
            translateX(-31px);
    }


    .shopex-flash-sale-next {
        transform:
            translateX(6px);
    }


    .shopex-flash-sale-prev:active {
        transform:
            translateX(-31px)
            scale(.95);
    }


    .shopex-flash-sale-next:active {
        transform:
            translateX(6px)
            scale(.95);
    }


    .shopex-flash-sale-image {
        flex-basis: 42%;
        width: 42%;
    }


    .shopex-flash-sale-content {
        width: 58%;

        padding: 9px;
    }


    .shopex-flash-sale-product-title {
        min-height: 31px;

        font-size: 12px;
    }


    .shopex-flash-sale-price {
        gap: 4px;
    }


    .shopex-flash-sale-price del {
        font-size: 9px;
    }


    .shopex-flash-sale-price strong {
        font-size: 14px;
    }


    .shopex-flash-sale-meta {
        font-size: 9px;
    }


    .shopex-flash-sale-progress-bar {
        height: 5px;
    }


    .shopex-flash-sale-shop-now {
        min-height: 32px;

        padding: 0 8px;

        font-size: 9px;
    }

}


/* ====================================================
   25. ACCESSIBILITY
==================================================== */

.shopex-flash-sale-prev:focus-visible,
.shopex-flash-sale-next:focus-visible,
.shopex-flash-sale-shop-now:focus-visible,
.shopex-flash-sale-view-all a:focus-visible {
    outline: 2px solid #ff9900;

    outline-offset: 2px;
}


/* ====================================================
   26. END
==================================================== */

/* ====================================================
   FLASH SALE ENDED
   COMING SOON
==================================================== */

.shopex-flash-sale-ended {
    width: 100%;

    min-height: 320px;

    display: flex;

    align-items: center;
    justify-content: center;

    margin-top: 15px;

    padding: 30px 20px;

    border: 1px solid #eeeeee;

    border-radius: 14px;

    background:
        linear-gradient(
            135deg,
            #fff8eb,
            #ffffff
        );

    box-sizing: border-box;
}


.shopex-flash-sale-ended[hidden] {
    display: none !important;
}


.shopex-flash-sale-ended-content {
    text-align: center;
}


.shopex-flash-sale-ended-content i {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 60px;
    height: 60px;

    margin-bottom: 15px;

    border-radius: 50%;

    background: #ff9900;

    color: #ffffff;

    font-size: 24px;
}


.shopex-flash-sale-ended-content h3 {
    margin: 0 0 8px;

    color: #222222;

    font-size: 26px;
    font-weight: 800;
}


.shopex-flash-sale-ended-content p {
    margin: 0;

    color: #777777;

    font-size: 14px;
}