/* === BẮT ĐẦU PHẦN SỬA LỖI FOUC (NHÁY KHI TẢI TRANG) === */

/* Mặc định ẩn carousel đi để chờ Javascript khởi tạo */
.mcc-carousel-container {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease-in-out; /* Thêm hiệu ứng fade-in mượt mà */
}

/* Khi Swiper đã khởi tạo xong, nó sẽ thêm class này, lúc đó chúng ta mới cho carousel hiện ra */
.mcc-carousel-container.swiper-initialized {
    opacity: 1;
    visibility: visible;
}

/* === KẾT THÚC PHẦN SỬA LỖI === */


/* === BẮT ĐẦU PHẦN NÂNG CẤP: ĐỒNG BỘ CHIỀU CAO SLIDE === */
/* Ghi đè style mặc định height: 100% của Swiper.
   Khi đặt là 'auto', slide sẽ tự điều chỉnh chiều cao dựa vào nội dung bên trong.
   Cơ chế align-items: stretch của Swiper-wrapper (flex container) sẽ tự động
   kéo dãn các slide thấp hơn cho bằng slide cao nhất trong viewport. */
.mcc-carousel-container .swiper-slide {
    height: auto;
    padding: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    box-sizing: border-box !important;
}
/* === KẾT THÚC PHẦN NÂNG CẤP === */

/* Đảm bảo theme không ghi đè gap của flexbox làm sai lệch spaceBetween của Swiper */
.mcc-carousel-container .swiper-wrapper {
    gap: 0 !important;
}


/* Container chính của carousel */
.mcc-carousel-container {
    position: relative;
    overflow: hidden;
    margin-left: 10px !important;
    margin-right: 0px;
    padding-top: 10px; 
    padding-bottom: 20px;
}

.mcc-slide-inner {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.mcc-slide-image {
    position: relative;
    display: block;
    width: 100%;
    height: auto; 
    background-color: #f0f0f0; 
    overflow: hidden;
}

.mcc-slide-image img {
    display: block;
    position: relative;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.mcc-slide-content {
    padding: 20px;
    color: #fff;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.mcc-slide-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 10px 0;
}

.mcc-slide-description p {
    font-size: 14px;
    margin: 0 0 15px 0;
    line-height: 1.5;
}

.mcc-slide-button-wrap {
    margin-top: auto;
}

.mcc-slide-button {
    display: inline-block;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    color: #fff;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.mcc-slide-button:hover {
    opacity: 0.8;
}

/* Tùy chỉnh các nút điều hướng của Swiper */
.mcc-carousel-container .swiper-button-next,
.mcc-carousel-container .swiper-button-prev {
    width: 44px;
    height: 44px;
    background-color: rgba(0, 0, 0, 0.6); 
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    color: #fff; 
    top: 50%;
    transform: translateY(-50%);
    z-index: 10; 
    opacity: 0; 
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mcc-carousel-container .swiper-button-prev {
    left: 15px; 
}

.mcc-carousel-container .swiper-button-next {
    right: 15px;
}

.mcc-carousel-container .swiper-button-next:after,
.mcc-carousel-container .swiper-button-prev:after {
    font-size: 20px;
    font-weight: bold;
}

.mcc-carousel-container:hover .swiper-button-next,
.mcc-carousel-container:hover .swiper-button-prev {
    opacity: 1;
    visibility: visible;
}

.mcc-carousel-container .swiper-button-disabled {
    opacity: 0 !important;
    cursor: auto;
    pointer-events: none;
}

/* === BẮT ĐẦU: KIỂU HIỂN THỊ ẢNH LÀM NỀN === */
.mcc-style-bg_image .mcc-slide-inner {
    position: relative;
    aspect-ratio: 1 / 1; /* Slide hình vuông */
    min-height: auto;
}

.mcc-style-bg_image .mcc-slide-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-color: transparent;
}

.mcc-style-bg_image .mcc-slide-image img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
}

.mcc-style-bg_image .mcc-slide-content {
    position: relative;
    z-index: 2;
    background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0) 100%) !important;
    justify-content: flex-end; /* Đẩy toàn bộ nội dung xuống đáy */
    padding-top: 50%; /* Tránh chữ dính lên đầu nếu nội dung nhiều */
}

/* Gộp nội dung và nút lại cùng nhau bên dưới, tắt margin-top: auto của mặc định */
.mcc-style-bg_image .mcc-slide-button-wrap {
    margin-top: 15px; 
}

.mcc-style-bg_image .mcc-slide-button {
    background-color: #ffffff !important;
    color: #ff0000 !important;
    padding: 6px 16px;
    border-radius: 50px; /* Nút tròn */
    text-align: center;
    font-size: 12px; /* Chữ nhỏ hơn */
    font-weight: bold; /* Đã tăng độ đậm theo yêu cầu */
}

.mcc-style-bg_image .mcc-slide-button::after {
    content: ' \2192'; /* Thêm mũi tên vào sau chữ */
}

.mcc-style-bg_image .mcc-slide-title,
.mcc-style-bg_image .mcc-slide-description p {
    color: #ffffff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    margin-bottom: 5px; /* Rút gọn khe hở chữ để sát nhau hơn */
}
/* === KẾT THÚC: KIỂU HIỂN THỊ ẢNH LÀM NỀN === */