/* =============================================
   Sale Box Swiper Layout
   ============================================= */
   .t888-sale-box-wrapper{
    overflow-x: hidden;
   }
.sale-box-swiper-outer {
    position: relative;
}

.sale-box-swiper {
    width: 100%;
    padding-bottom: 40px;
    overflow: visible !important;
}

.sale-box-swiper .swiper-slide {
    height: auto;
}

.sale-box-swiper .swiper-slide .grid-product-item {
    height: 100%;
}


/* =============================================
   Sale Box Header
   ============================================= */
.sale-box-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    position: relative;
}

.sale-box-title {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    color: var(--third-color);
    margin: 0;
    letter-spacing: 2px;
}

.sale-box-title::after {
    content: "";
    display: block;
    width: 50px;
    height: 3px;
    background: #b88166;
    margin: 10px auto 0;
}

.sale-box-nav-wrap {
    display: flex;
    gap: 10px;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

/* Navigation arrows */
.sale-box-btn-prev,
.sale-box-btn-next {
    width: 40px;
    height: 40px;
    background: #fff;
    color: #b88166;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    pointer-events: auto;
    border: 1px solid #eee;
}

.sale-box-btn-prev:hover,
.sale-box-btn-next:hover {
    background: #b88166;
    color: #fff;
    transform: scale(1.1);
}

.sale-box-btn-prev.swiper-button-disabled,
.sale-box-btn-next.swiper-button-disabled {
    opacity: 0.4;
    cursor: default;
}

/* Pagination dots */
.sale-box-swiper .sale-box-pagination {
    bottom: 0;
}

.sale-box-swiper .swiper-pagination-bullet {
    background: var(--third-color, #28a745);
    opacity: 0.4;
}

.sale-box-swiper .swiper-pagination-bullet-active {
    opacity: 1;
}

/* =============================================
   Widget wrapper
   ============================================= */
.t888-sale-box-wrapper {
    position: relative;
    margin-bottom: 30px;
    width: 100%;
}

.t888-sale-box-wrapper .t888-heading {
    margin-bottom: 20px;
}

.t888-sale-box-wrapper .t888-heading .title-heading {
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary-color, #333);
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--third-color, #28a745);
    display: inline-block;
}

/* =============================================
   Product card layout
   ============================================= */
.t888-sale-box-wrapper .grid-product-item.product-grid-layout-3 {
    border: 1px solid var(--forth-color, #eee);
    padding: 0 !important;
    background: #fff;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    overflow: visible;
}

.t888-sale-box-wrapper .grid-product-item.product-grid-layout-3:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-color: #b88166;
}

.t888-sale-box-wrapper .grid-product-item.product-grid-layout-3 .product-item-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.t888-sale-box-wrapper .product-title,
.t888-sale-box-wrapper .product-price,
.t888-sale-box-wrapper .sale-box-sold-wrap,
.t888-sale-box-wrapper .sale-box-timer-container {
    padding-left: 15px;
    padding-right: 15px;
}

.t888-sale-box-wrapper .grid-3-action-wrap {
    margin-top: auto;
    padding: 10px 15px 20px 15px;
}

.t888-sale-box-wrapper .product-thumbnail {
    position: relative;
    padding-top: 110%;
    /* Tỷ lệ vừa đủ cho bật lửa dọc */
    overflow: hidden;
    border: none;
    border-bottom: 1px solid var(--forth-color, #eee);
    background-color: var(--secondary-color, #f5f5f5);
}

.t888-sale-box-wrapper .product-thumbnail .product-link {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 1;
}

.t888-sale-box-wrapper .product-thumbnail .product-link img {
    width: 100%;
    height: 100%;
    display: block;
    /* object-fit: contain; */
    /* Hiện full ảnh, không crop */
    object-position: center;
    transition: transform 0.4s ease;
    top: 0 !important;
}

.t888-sale-box-wrapper .product-thumbnail:hover .product-link img {
    transform: scale(1.05);
}

.t888-sale-box-wrapper .product-thumbnail-outer {
    position: relative;
    margin-bottom: 12px;
}

/* =============================================
   Badges
   ============================================= */
.t888-sale-box-wrapper .product-badge.sale {
    position: absolute;
    right: 1.25rem;
    top: 1.25rem;
    left: auto;
    background: #ffde00;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    color: var(--primary-color, #333);
    font-size: .75rem;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
}

.t888-sale-box-wrapper .product-badge.new {
    position: absolute;
    left: 1.25rem;
    top: 1.25rem;
    right: auto;
    background: #b6ff8a;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    color: var(--primary-color, #333);
    font-size: .7rem;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
    text-transform: lowercase;
}

.t888-sale-box-wrapper .product-badge.hot {
    position: absolute;
    left: 4.5rem;
    top: 1.25rem;
    right: auto;
    background: #ffc1c1;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    color: var(--primary-color, #333);
    font-size: .7rem;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
    text-transform: lowercase;
}

/* =============================================
   Product Title – 2-line clamp
   ============================================= */
.t888-sale-box-wrapper .product-title {
    font-size: 13px !important;
    font-weight: 700 !important;
    text-align: center !important;
    text-transform: uppercase !important;
    margin-bottom: 6px !important;
    min-height: 36px;
    /* 2 dòng × 1.4 × 13px */
    overflow: hidden;
}

.t888-sale-box-wrapper .product-title a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    line-height: 1.4;
    color: var(--primary-color, #333);
    text-decoration: none;
    transition: color 0.2s;
}

.t888-sale-box-wrapper .product-title a:hover {
    color: var(--third-color, #28a745);
}

/* =============================================
   Price
   ============================================= */
.t888-sale-box-wrapper .product-price.d-flex {
    justify-content: center !important;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 4px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--third-color, #28a745);
    line-height: 1.8rem;
    flex-wrap: wrap;
}

.t888-sale-box-wrapper .product-price .regular-price {
    opacity: .5;
    color: var(--primary-color, #333);
    font-weight: 400;
    text-decoration: line-through;
}

.t888-sale-box-wrapper .product-price .sale-price {
    color: var(--third-color, #28a745);
}

/* =============================================
   Sold progress bar
   ============================================= */
.sale-box-sold-wrap {
    margin-top: 6px;
    margin-bottom: 6px;
    text-align: center;
}

.sale-box-sold-text {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #e44d26;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
}

.sale-box-sold-text::before {
    content: "🔥";
    font-size: 13px;
}

.sale-box-sold-bar-bg {
    width: 100%;
    height: 5px;
    background: #e5e5e5;
    border-radius: 20px;
    overflow: hidden;
}

.sale-box-sold-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--third-color, #28a745), #5cb85c);
    border-radius: 20px;
    transition: width 0.4s ease;
}

/* =============================================
   Countdown
   ============================================= */
.sale-box-timer-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.sale-box-countdown-label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    text-align: center;
}

.sale-box-countdown {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.sale-box-time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 0;
    padding: 6px 4px;
    background: var(--third-color, #28a745);
    border-radius: 6px;
    color: #fff;
}

.sale-box-time-num {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.1;
}

.sale-box-time-label {
    font-size: 10px;
    font-weight: 400;
    line-height: 1.3;
    margin-top: 2px;
}

/* =============================================
   Out of stock / ended
   ============================================= */
.sale-box-out-stock {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: #1a1a1a;
    border-radius: 4px;
    padding: 0 8px;
    height: 36px;
    text-align: center;
    text-transform: uppercase;
    transition: background 0.3s ease;
}

.sale-box-out-stock:hover {
    background: #333;
}

.sale-box-ended-label {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #666;
    background: #f5f5f5;
    border-radius: 4px;
    padding: 0 8px;
    height: 36px;
    text-align: center;
    text-transform: uppercase;
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 767px) {
    .sale-box-nav-wrap {
        display: none;
    }

    .sale-box-header {
        margin-bottom: 16px;
    }

    .sale-box-title {
        font-size: 18px;
    }

    .sale-box-time-num {
        font-size: 14px;
    }

    .sale-box-time-label {
        font-size: 8px;
    }
}

@media (max-width: 480px) {
    .sale-box-time-num {
        font-size: 12px;
    }

    .sale-box-time-label {
        font-size: 7px;
    }

    .sale-box-out-stock,
    .sale-box-ended-label {
        font-size: 10px;
        min-height: 34px;
    }
}

/* �� b? gi?i h?n max-width d? sale box r?ng theo container Elementor */