/* ==========================================================================
   M4H STUNNING FIRE GRADIENT FLASH SALE DESIGN SYSTEM 2026
   Vibrant Fire Red/Orange Gradient, Glassmorphic Badges & 3D Glowing Buttons
   ========================================================================== */

/* 1. Flash Sale Container & Box */
.m4h-fs-container {
    margin-top: 25px !important;
    margin-bottom: 35px !important;
}

.m4h-home-flashsale-box {
    background: #ffffff !important;
    border-radius: 20px !important;
    padding: 24px !important;
    box-shadow: 0 12px 35px rgba(240, 104, 58, 0.12) !important;
    border: 1px solid #ffe8e0 !important;
    position: relative;
    overflow: hidden;
}

/* 2. Clean & Elegant Flash Sale Block Header */
.m4h-fs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 22px;
    padding-bottom: 16px;
    background: transparent !important;
    border-bottom: 2px dashed #ffe8e0 !important;
    box-shadow: none !important;
}

.m4h-fs-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.m4h-fs-icon-flame {
    font-size: 26px;
    display: inline-block;
    animation: flame-bounce 1.2s infinite ease-in-out alternate;
}

@keyframes flame-bounce {
    0% {
        transform: scale(1) translateY(0);
    }

    100% {
        transform: scale(1.22) translateY(-3px);
    }
}

.m4h-fs-title {
    font-size: 20px !important;
    font-weight: 900 !important;
    color: #0f172a !important;
    margin: 0 !important;
    letter-spacing: -0.4px;
    text-transform: uppercase;
}

/* 3. Live 3D Countdown Timer Boxes */
.m4h-fs-timer-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #d9261c 0%, #f0683a 100%);
    padding: 6px 16px;
    border-radius: 30px;
    box-shadow: 0 4px 14px rgba(217, 38, 28, 0.25);
}

.timer-label {
    font-size: 11px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.8px;
}

.m4h-timer-boxes {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 900;
    color: #ffffff;
}

.t-box {
    background: #ffffff;
    color: #d9261c;
    font-size: 13px;
    font-weight: 900;
    padding: 4px 8px;
    border-radius: 7px;
    min-width: 26px;
    text-align: center;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* 4. Product Card High Conversion 3D Overrides */
.m4h-fs-product-card {
    position: relative;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    /* border: 1px solid #f1f5f9 !important; */
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    overflow: hidden !important;
}

.m4h-fs-product-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 16px 36px rgba(240, 104, 58, 0.15) !important;
    border-color: #ffd8cc !important;
}

.m4h-fs-product-card .box-image {
    position: relative !important;
    width: 100% !important;
    padding-top: 100% !important;
    /* 1:1 Square Ratio */
    overflow: hidden !important;
    background: #f8fafc !important;
}

.m4h-fs-product-card .box-image a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.m4h-fs-product-card .box-image img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.5s ease !important;
}

.m4h-fs-product-card:hover .box-image img {
    transform: scale(1.06) !important;
}

/* Radiant Discount Ribbon Badge */
.m4h-fs-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #d9261c, #ff4d4d) !important;
    color: #ffffff !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    padding: 4px 10px !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 14px rgba(217, 38, 28, 0.4) !important;
    z-index: 5;
    letter-spacing: 0.3px;
}

.m4h-fs-product-card .box-text {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    padding: 14px 12px !important;
    justify-content: space-between !important;
    text-align: left !important;
}

/* Tiêu đề sản phẩm 2 dòng màu xám đen đậm */
.m4h-fs-product-card .product-title,
.m4h-fs-product-card .product-title a {
    color: #1e293b !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    height: 37px !important;
    max-height: 37px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    word-break: break-word !important;
    white-space: normal !important;
    margin-bottom: 6px !important;
    text-align: left !important;
    transition: color 0.2s ease !important;
}

.m4h-fs-product-card .product-title a:hover {
    color: #d9261c !important;
}

/* Giá bán hiển thị lùi trái sát nhau */
.m4h-fs-product-card .price-wrapper {
    display: flex !important;
    align-items: baseline !important;
    justify-content: flex-start !important;
    gap: 4px !important;
    width: 100% !important;
    text-align: left !important;
}

/* Hàng Đánh Giá Rating ⭐ & Đã Bán X (Đánh giá Cạnh Trái - Đã bán Cạnh Phải) */
.m4h-fs-product-card .m4h-rating-sold-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    margin: 3px 0 3px 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    line-height: 1.3 !important;
    text-align: left !important;
    flex-wrap: wrap !important;
    gap: 2px 4px !important;
    overflow: hidden !important;
}

.m4h-fs-product-card .m4h-custom-rating {
    display: inline-flex !important;
    align-items: center !important;
    gap: 2px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
    flex: 0 1 auto !important;
    overflow: hidden !important;
}

.m4h-fs-product-card .m4h-star-icon {
    color: #f59e0b !important;
    font-size: 11.5px !important;
    line-height: 1 !important;
}

.m4h-fs-product-card .m4h-rating-val {
    color: #1e293b !important;
    font-weight: 800 !important;
    font-size: 10.5px !important;
}

.m4h-fs-product-card .m4h-review-cnt {
    color: #64748b !important;
    font-weight: 500 !important;
    font-size: 10px !important;
}

.m4h-fs-product-card .da-ban {
    font-size: 10.5px !important;
    color: #d9261c !important;
    font-weight: 700 !important;
    margin-left: auto !important;
    padding: 0 !important;
    white-space: nowrap !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
}

/* Tối ưu thanh tiến độ suất ưu đãi */
.m4h-fs-progress-wrap {
    position: relative;
    background: #fff5f5 !important;
    border: 1px solid #fecdd3 !important;
    height: 18px !important;
    border-radius: 10px !important;
    margin: 8px 0 10px 0 !important;
    overflow: hidden !important;
}

.m4h-fs-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #ff8c00 0%, #e53935 100%) !important;
    border-radius: 10px;
    transition: width 0.6s ease;
}

.m4h-fs-progress-text {
    position: relative;
    z-index: 2;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #991b1b !important;
    text-shadow: none !important;
    display: block;
    line-height: 18px !important;
    text-align: center;
}

/* Nút DEAL HỜI thiết kế nhỏ gọn, tinh tế */
.m4h-buy-now-btn {
    background: linear-gradient(135deg, #ea3829 0%, #d9261c 100%) !important;
    color: #ffffff !important;
    border: none !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    padding: 6px 16px !important;
    border-radius: 8px !important;
    max-width: 130px !important;
    margin: auto auto 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 3px 10px rgba(234, 56, 41, 0.25) !important;
    transition: all 0.25s ease !important;
}

.m4h-buy-now-btn:hover {
    background: linear-gradient(135deg, #c62828 0%, #b71c1c 100%) !important;
    transform: translateY(-1.5px) !important;
    box-shadow: 0 5px 14px rgba(234, 56, 41, 0.35) !important;
}

/* 5. Luxury Furniture Dynamic Background Hero Banner */
.m4h-flashsale-page-wrapper {
    margin-top: 25px;
    margin-bottom: 50px;
}

.m4h-fs-hero-banner {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 24px;
    padding: 65px 30px;
    text-align: center;
    margin-bottom: 35px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.m4h-fs-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.88) 0%, rgba(217, 38, 28, 0.78) 50%, rgba(240, 104, 58, 0.85) 100%);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 1;
}

.m4h-fs-hero-content {
    position: relative;
    z-index: 2;
}

.pulse-glow {
    animation: pulse-glow-anim 2s infinite alternate;
}

@keyframes pulse-glow-anim {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
        transform: scale(1);
    }

    100% {
        box-shadow: 0 0 20px 6px rgba(255, 255, 255, 0.6);
        transform: scale(1.04);
    }
}

.shimmer-text {
    background: linear-gradient(90deg, #ffffff 0%, #fff7ed 50%, #ffffff 100%);
    background-size: 200% auto;
    color: #ffffff !important;
    -webkit-background-clip: text;
    animation: shimmer-anim 3s linear infinite;
}

@keyframes shimmer-anim {
    to {
        background-position: 200% center;
    }
}

.m4h-fs-hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    padding: 6px 20px;
    border-radius: 30px;
    letter-spacing: 0.8px;
    margin-bottom: 16px;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
}

.m4h-fs-hero-title {
    color: #ffffff !important;
    font-size: 32px !important;
    font-weight: 900 !important;
    margin-bottom: 14px !important;
    letter-spacing: -0.6px;
    line-height: 1.25 !important;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
}

.m4h-fs-hero-desc {
    color: #fff3f0 !important;
    font-size: 16px !important;
    max-width: 700px;
    margin: 0 auto 26px auto !important;
    line-height: 1.6;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}


.m4h-fs-hero-features {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
}

.m4h-fs-hero-features .f-pill {
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 20px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 6. Single Product Page High Conversion Flash Sale Countdown Box */
.m4h-single-fs-box {
    background: linear-gradient(135deg, #fff7f5 0%, #ffffff 100%) !important;
    border: 1.5px solid #ffd0c2 !important;
    border-radius: 14px !important;
    padding: 14px 16px !important;
    margin: 15px 0 18px 0 !important;
    box-shadow: 0 6px 20px rgba(240, 104, 58, 0.12) !important;
}

.m4h-sfs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.m4h-sfs-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 800;
    color: #d9261c;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.m4h-sfs-timer {
    display: flex;
    align-items: center;
    gap: 6px;
}

.m4h-sfs-timer .timer-label {
    font-size: 11px;
    font-weight: 800;
    color: #d9261c;
}

.m4h-sfs-timer .t-box {
    background: #d9261c;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 5px;
    min-width: 22px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(217, 38, 28, 0.3);
}

.m4h-sfs-progress-wrap {
    position: relative;
    background: #fee2e2;
    height: 18px;
    border-radius: 10px;
    overflow: hidden;
}

.m4h-sfs-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #ff4d4d, #f0683a, #ff9900);
    border-radius: 10px;
    transition: width 0.6s ease;
}

.m4h-sfs-progress-text {
    position: relative;
    z-index: 2;
    font-size: 11px;
    font-weight: 800;
    color: #111111;
    display: block;
    line-height: 18px;
    text-align: center;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.9);
}

/* Compact, touch-friendly Flash Sale cards on phones. */
@media (max-width: 549px) {
    .m4h-fs-container {
        margin-top: 14px !important;
        margin-bottom: 24px !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .m4h-home-flashsale-box {
        padding: 14px 10px 12px !important;
        border-radius: 18px !important;
        box-shadow: 0 8px 24px rgba(240, 104, 58, 0.1) !important;
    }

    .m4h-fs-header {
        align-items: stretch;
        gap: 10px;
        margin-bottom: 14px;
        padding: 0 4px 12px;
    }

    .m4h-fs-title-wrap {
        justify-content: center;
        gap: 8px;
    }

    .m4h-fs-icon-flame {
        font-size: 23px;
    }

    .m4h-fs-title {
        font-size: 16px !important;
        line-height: 1.25 !important;
        letter-spacing: -0.25px;
        text-align: center;
    }

    .m4h-fs-timer-wrap {
        width: 100%;
        justify-content: center;
        gap: 6px;
        padding: 7px 10px;
        border-radius: 14px;
        box-sizing: border-box;
    }

    .m4h-fs-timer-wrap .timer-label {
        font-size: 10px;
        letter-spacing: 0.35px;
    }

    .m4h-fs-timer-wrap .t-box {
        min-width: 25px;
        padding: 4px 6px;
        font-size: 12px;
    }

    .m4h-home-flashsale-box .products.row {
        margin-left: -4px !important;
        margin-right: -4px !important;
    }

    .m4h-home-flashsale-box .products.row>.col {
        padding-left: 4px !important;
        padding-right: 4px !important;
        margin-bottom: 8px !important;
    }

    .m4h-fs-product-card {
        border-radius: 12px !important;
    }

    .m4h-fs-product-card .box-text {
        padding: 9px 8px 10px !important;
    }

    .m4h-fs-product-card .product-title,
    .m4h-fs-product-card .product-title a {
        font-size: clamp(10.5px, 3.2vw, 12px) !important;
        line-height: 1.35 !important;
        min-height: 32px;
        margin-bottom: 5px !important;
    }

    .m4h-fs-badge {
        top: 8px;
        left: 8px;
        padding: 4px 7px !important;
        border-radius: 7px !important;
        font-size: 10.5px !important;
    }

    .m4h-fs-progress-wrap {
        height: 17px !important;
        margin: 7px 0 9px !important;
    }

    .m4h-fs-progress-text {
        font-size: clamp(8.5px, 2.65vw, 10px) !important;
        line-height: 17px !important;
    }

    .m4h-buy-now-btn {
        width: 100%;
        max-width: none !important;
        min-height: 31px;
        margin-top: 2px !important;
        padding: 6px 8px !important;
        font-size: clamp(9.5px, 2.85vw, 10.5px) !important;
    }
}

/* Tight price gap for Flashsale cards */
.m4h-fs-product-card .price-wrapper,
.m4h-home-flashsale-box .price-wrapper {
    display: flex !important;
    align-items: baseline !important;
    gap: 3px !important;
    column-gap: 3px !important;
    justify-content: center !important;
}

.m4h-fs-product-card .price-wrapper del,
.m4h-home-flashsale-box .price-wrapper del {
    margin-left: 2px !important;
    margin-right: 0 !important;
}