/* 
 * ⚡ CSS SCRIPTS CHO FLASH SALE PRO - PINK TAB VERSION
 */

.fs-section {
    position: relative;
    padding: 80px 0;
    z-index: 1;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    /* Xóa nền cũ theo yêu cầu */
}

.fs-bg-box {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fs-bg-frame,
.fs-bg-frame-mobile {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: left center;
    transform: translateY(-50%);
}

.fs-bg-frame-mobile {
    display: none;
}

.fs-deco-img {
    position: absolute;
    pointer-events: none;
    z-index: 5;
    transition: transform 0.5s ease-out;
}

.fs-deco-tl {
    top: -20px;
    left: -20px;
    width: 140px;
}

.fs-deco-tr {
    top: 20px;
    right: 20px;
    width: 80px;
}

.fs-deco-bl {
    bottom: -10px;
    left: -10px;
    width: 100px;
}

.fs-deco-br {
    bottom: 0;
    right: 0;
    width: 120px;
}

.fs-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 60px;
    position: relative;
    z-index: 2;
}

/* 🎀 PINK TAB HEADER */
.fs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 100px 0 20px;
    position: relative;
    width: 60%;
    top: 25px;
}

.fs-title-box {
    flex: 1;
    text-align: left;
    transition: transform 0.3s ease;
}

.fs-title-flex {
    display: flex;
    align-items: center;
    gap: 50px;
    width: fit-content;
}


.fs-title-box h2 {
    font-size: 36px;
    color: #fff;
    margin: 0;
    font-weight: 600;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    line-height: 1.1;
}

.fs-title-box p {
    color: #fff;
    font-size: 16px;
    font-weight: 400;
    margin: 0 0 5px;
    display: flex;
    align-items: center;
    line-height: 1.2;
}

/* ⏲️ COUNTDOWN STYLE (WHITE PILLS) */
.fs-timer {
    display: flex;
    gap: 10px;
    align-items: center;
}

.t-unit {
    background: #00d1ff;
    color: #fff;
    text-align: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 4px 12px rgba(0, 209, 255, 0.3);
}

.t-num {
    font-size: 16px;
    font-weight: 800;
}

.t-lbl {
    font-size: 9px;
    font-weight: 700;
}

.t-sep {
    color: #fff;
    font-weight: 800;
    font-size: 18px;
}

/* 🛍️ PRODUCT SLIDER */
.swiper-fs {
    padding: 20px 0 20px !important;
}

/* 💠 SWIPER PAGINATION (DOTS) */
.swiper-pagination {
    bottom: 30px !important;
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #fff !important;
    opacity: 0.4;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 4px;
}

.swiper-pagination-bullet-active {
    width: 24px;
    opacity: 1;
    background: #00d1ff !important;
    box-shadow: 0 0 10px rgba(0, 209, 255, 0.4);
}

.ag-fs-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    padding: 12px;
    height: 100%;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    position: relative;
    /* For stretched link */
}

.ag-img-wrap {
    position: relative;
    width: 317px !important;
    height: auto !important;
    background: #fdf2f8;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
}

.ag-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ⭐ RATING STARS */
.ag-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.ag-stars {
    color: #e2e8f0;
    font-size: 14px;
    letter-spacing: -2px;
}

.ag-star.filled {
    color: #facc15;
}

.ag-rev-count {
    color: #94a3b8;
    font-size: 12px;
}

.ag-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ff0000;
    color: #fff;
    font-size: 16px;
    padding: 2px 10px;
    border-radius: 10px;
    z-index: 2;
}

.ag-name {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: auto;
}

.ag-name a {
    color: inherit;
    text-decoration: none;
}

.ag-buy-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
}

.ag-pricing {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    margin-bottom: 0;
    justify-content: flex-end;
}

.ag-pricing-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.ag-price-n {
    color: #e84879;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
}

.ag-price-o {
    color: #cbd5e1;
    text-decoration: line-through;
    font-size: 13px;
}

/* 🛒 FOOTER & BUTTONS */
.ag-card-footer {
    display: flex;
    gap: 6px;
    align-items: center;
    flex: 1;
    justify-content: center;
    position: relative;
    z-index: 2;
    /* Bring buttons above stretched link */
}

.ag-btn-buy {
    padding: 6px 12px;
    background: transparent;
    border: 1.5px solid #13b3d0;
    color: #13b3d0;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 700;
    font-size: 12px;
    transition: all 0.3s;
    white-space: nowrap;
}

.ag-btn-cart {
    width: 32px;
    height: 32px;
    background: #13b3d0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
}

.ag-btn-cart img {
    width: 18px;
    height: 18px;
    filter: brightness(0) invert(1);
}

.ag-btn-buy:hover {
    background: #13b3d0;
    color: #fff;
}

.ag-btn-cart:hover {
    background: #0e8ca3;
    transform: scale(1.1);
}

/* 🧭 NAVIGATION */
.fs-nav {
    display: flex;
    gap: 15px;
}

.fs-arrow {
    width: 50px;
    height: 50px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    color: #13b3d0;
    font-size: 24px;
    border: none;
    transition: all 0.3s;
}

.fs-arrow:hover {
    background: #13b3d0;
    color: #fff;
    transform: scale(1.1);
}

.lazy-load-active img {
    width: 20px !important;
    vertical-align: middle !important;
    margin-right: 5px !important;
}

/* ⚡ FLASHING LIGHTNING ANIMATION */
.ag-lightning-flash {
    animation: ag-lightning-pulse 1.5s infinite ease-in-out;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

@keyframes ag-lightning-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
    }
    50% {
        opacity: 0.6;
        transform: scale(1.2);
        filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.9));
    }
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .fs-container {
        padding: 0 24px;
    }

    .fs-deco-tl {
        width: 100px;
    }
}

@media (max-width: 768px) {
    .lazy-load-active img {
        width: 10px !important;
    }

    .fs-section {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        min-height: 450px !important;
        padding: 0 !important;
        width: 100vw !important;
        position: relative !important;
        left: 50% !important;
        right: 50% !important;
        margin-left: -50vw !important;
        margin-right: -50vw !important;
        overflow: hidden !important;
    }

    .fs-bg-box {
        z-index: 0 !important;
        height: 100% !important;
        width: 100% !important;
        position: absolute !important;
        inset: 0 !important;
    }

    .fs-bg-frame {
        display: none !important;
    }

    .fs-bg-frame-mobile {
        display: block !important;
        object-fit: contain !important;
        width: 100% !important;
        height: 100% !important;
    }

    .fs-container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 16px !important;
        margin: 0 !important;
        position: relative !important;
        z-index: 5 !important;
    }

    .fs-header {
        width: 100% !important;
        padding: 60px 10px 10px !important;
        text-align: center !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 15px !important;
        display: flex !important;
    }

    .fs-title-box {
        transform: none !important;
        margin: 0 !important;
        text-align: center !important;
        width: 100% !important;
        display: block !important;
    }

    .fs-title-flex {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 12px !important;
        width: 100% !important;
    }

    .fs-title-flex .fs-timer {
        margin: 0 auto !important;
        width: 100% !important;
        display: flex !important;
        justify-content: flex-start;
        font-size: 14px !important;
        position: absolute;
        top: 30px;
        left: 50%;
    }

    .fs-title-flex h2 {
        margin: 0 auto !important;
        width: 100% !important;
        display: flex !important;
        justify-content: flex-start;
        font-size: 14px !important;
    }

    .fs-title-box p {
        align-items: center !important;
        font-size: 12px !important;
        width: 100% !important;
        margin: 0 0 5px 0 !important;
    }

    .fs-nav {
        display: none !important;
    }

    .fs-timer {
        scale: 0.9;
        margin: 0 auto !important;
    }

    .swiper-fs {
        padding: 20px 0 10px !important;
        width: 100% !important;
    }

    .ag-fs-card {
        padding: 8px !important;
    }

    .ag-name {
        font-size: 12px !important;
        height: 1.2em !important;
        margin-bottom: 8px !important;
    }

    .ag-buy-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 4px !important;
        width: 100% !important;
        display: flex !important;
    }

    .ag-pricing {
        margin-bottom: 4px !important;
        width: 100% !important;
        justify-content: space-around !important;
    }

    .ag-price-n {
        font-size: 12px !important;
    }

    .ag-price-o {
        font-size: 12px !important;
    }

    .ag-card-footer {
        width: 100% !important;
        display: flex !important;
        justify-content: space-between !important;
        gap: 6px !important;
    }

    .ag-btn-buy {
        padding: 4px 8px !important;
        font-size: 11px !important;
        border-radius: 12px !important;
        flex: 1 !important;
        text-align: center !important;
    }

    .ag-btn-cart {
        width: 24px !important;
        height: 24px !important;
        flex-shrink: 0 !important;
    }

    .swiper-pagination {
        bottom: 20px !important;
    }

    .t-unit {
        width: 24px;
        height: 24px;
    }

    .t-num {
        font-size: 11px;
    }

    .ag-pricing {
        flex-direction: row !important;
        align-items: center !important;
        gap: 10px !important;
    }

    .ag-img-wrap {
        width: 100% !important;
        height: auto !important;
        margin-bottom: 5px !important;
    }

    .ag-btn-cart img {
        width: 12px !important;
        height: 12px !important;
    }

    .ag-stars {
        font-size: 11px;
        letter-spacing: -1px;
    }

    .t-lbl {
        font-size: 6px;
    }

    .ag-badge {
        font-size: 14px;
        top: 0;
        right: 0;
    }
}