.bce-promotions-carousel-wrapper {
    position: relative;
    padding: 0;
    box-sizing: border-box;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    overflow: hidden;
}

.bce-promotions-carousel-wrapper.loading {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.bce-promotions-swiper .swiper-slide {
    height: auto;
    padding: 15px 0;
    overflow: visible !important;
    position: relative;
    z-index: 1;
}

.bce-promotions-swiper .swiper-slide:hover {
    z-index: 999 !important;
}

.promo-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    height: 100%;
    background-color: #ffffff;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 0 5px;
}

.promo-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.15);
}

.promo-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 75%;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.promo-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease-in-out;
}

.promo-days-left {
    position: absolute;
    top: 10px;
    left: 0;
    background-color: #ffc107;
    color: #000;
    padding: 5px 15px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 0 4px 4px 0;
    z-index: 2;
}

.promo-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.promo-content h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: bold;
    color: #222;
}

.promo-description {
    font-size: 14px;
    color: #555;
    flex-grow: 1;
    line-height: 1.5;
}

.promo-actions {
    padding: 20px 15px;
    text-align: center;
    flex-shrink: 0;
    border-top: 1px solid #f0f0f0;
}

.bce-promo-toggle-btn,
.bce-promo-custom-link-btn,
.bce-promo-claim-points-btn,
.bce-promo-toggle-shipping-btn {
    display: inline-block;
    padding: 10px 30px;
    font-size: 14px;
    font-weight: 600;
    color: #000000;
    background-color: #ffffff;
    border: 1px solid #000000;
    border-radius: 50px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

.bce-promo-toggle-btn:hover,
.bce-promo-custom-link-btn:hover,
.bce-promo-claim-points-btn:hover,
.bce-promo-toggle-shipping-btn:hover {
    background-color: #f5f5f5;
    color: #000;
}

.bce-promo-toggle-btn.applied,
.bce-promo-toggle-btn.applied:hover,
.bce-promo-toggle-shipping-btn.applied,
.bce-promo-toggle-shipping-btn.applied:hover {
    background-color: #000000;
    color: #ffffff;
    border-color: #000000;
}

.bce-promotions-swiper .swiper-button-next,
.bce-promotions-swiper .swiper-button-prev {
    background-color: rgba(52, 58, 64, 0.7) !important;
    color: #fff !important;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background-color 0.2s ease-in-out;
}

.bce-promotions-swiper .swiper-button-next:hover,
.bce-promotions-swiper .swiper-button-prev:hover {
    background-color: rgba(52, 58, 64, 0.9) !important;
    color: #fff !important;
}

.bce-promotions-swiper .swiper-button-next::after,
.bce-promotions-swiper .swiper-button-prev::after {
    font-size: 18px;
    font-weight: bold;
}

.bce-promotions-swiper {
    padding-top: 10px;
    padding-bottom: 15px;
    overflow: visible !important;
    margin-left: 0;
    margin-right: 0;
}

.bce-promotions-title {
    font-size: 20px;
}

@media (max-width: 767px) {
    .bce-promotions-carousel-wrapper,
    .bce-promotions-title {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* =================================================================== */
/* == CSS CHO BỐ CỤC NGANG                                          == */
/* =================================================================== */

.horizontal-layout .swiper-slide {
    height: auto;
}

.horizontal-layout .promo-card-horizontal {
    display: flex;
    flex-direction: row;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    height: 100%;
    max-height: 150px;
    background-color: #ffffff;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 0 5px;
}

.horizontal-layout .promo-card-horizontal:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.horizontal-layout .promo-image-wrapper-horizontal {
    flex: 0 0 150px;
    height: 150px;
    position: relative;
}

.horizontal-layout .promo-image-wrapper-horizontal img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.horizontal-layout .promo-content-wrapper-horizontal {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 15px 20px;
    justify-content: space-between;
    height: 100%;
}

.horizontal-layout .promo-content {
    padding: 0;
    flex-grow: 1;
}

.horizontal-layout .promo-content h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 5px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.horizontal-layout .promo-description {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;  
    overflow: hidden;
}

.horizontal-layout .promo-actions {
    padding: 0;
    border-top: none;
    text-align: left;
    flex-shrink: 0;
}

.horizontal-layout .bce-promo-toggle-btn,
.horizontal-layout .bce-promo-custom-link-btn,
.horizontal-layout .bce-promo-claim-points-btn,
.horizontal-layout .bce-promo-toggle-shipping-btn {
    padding: 6px 20px;
    font-size: 13px;
    font-weight: 500;
}

.horizontal-layout .promo-days-left {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(255, 193, 7, 0.9);
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 11px;
    margin-bottom: 0;
}

@media (max-width: 767px) {
    .horizontal-layout .promo-card-horizontal {
        max-height: 120px;
    }
    .horizontal-layout .promo-image-wrapper-horizontal {
        flex: 0 0 120px;
        height: 120px;
    }
    .horizontal-layout .promo-content-wrapper-horizontal {
        padding: 10px 15px;
    }
    .horizontal-layout .promo-content h3 {
        font-size: 14px;
    }
    .horizontal-layout .promo-description {
        font-size: 12px;
        -webkit-line-clamp: 2;
    }
     .horizontal-layout .bce-promo-toggle-btn,
    .horizontal-layout .bce-promo-custom-link-btn,
    .horizontal-layout .bce-promo-claim-points-btn,
    .horizontal-layout .bce-promo-toggle-shipping-btn {
        padding: 5px 15px;
        font-size: 12px;
    }
}

/* =================================================================== */
/* == CSS CHO BỐ CỤC LƯỚI (GRID VIEW)                              == */
/* =================================================================== */

.bce-promotions-grid-wrapper {
    display: grid;
    gap: 20px 15px;
}

.bce-promotions-grid-wrapper:not(.horizontal-layout) {
    grid-template-columns: repeat(4, 1fr);
}

.bce-promotions-grid-wrapper.horizontal-layout {
    grid-template-columns: repeat(3, 1fr);
}

.bce-promotions-grid-wrapper .promo-item .promo-card,
.bce-promotions-grid-wrapper .promo-item .promo-card-horizontal {
    margin: 0;
}

/* ==================== BẮT ĐẦU SỬA LỖI HIỂN THỊ NGÀY ==================== */
.bce-promotions-grid-wrapper .promo-item {
    position: relative; 
}

.bce-promotions-grid-wrapper .promo-card,
.bce-promotions-grid-wrapper .promo-card-horizontal {
    z-index: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease, z-index 0s 0.3s;
}

.bce-promotions-grid-wrapper .promo-item:hover .promo-card,
.bce-promotions-grid-wrapper .promo-item:hover .promo-card-horizontal {
    z-index: 99; /* Đưa thẻ được hover lên trên */
    transition: transform 0.3s ease, box-shadow 0.3s ease, z-index 0s;
}
/* ==================== KẾT THÚC SỬA LỖI HIỂN THỊ NGÀY ==================== */


@media (max-width: 1024px) {
    .bce-promotions-grid-wrapper:not(.horizontal-layout) {
        grid-template-columns: repeat(2, 1fr);
    }
    .bce-promotions-grid-wrapper.horizontal-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .bce-promotions-grid-wrapper:not(.horizontal-layout),
    .bce-promotions-grid-wrapper.horizontal-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}