/*
 * Trích nguyên \3c style> inline trong app/Views/product/inc/header_list.php (partial include ở
 * tours/list-tour.php, product/spa/list-spa.php, product/care/list-spa.php,
 * product/mall/list-mall.php, product/study/list-study.php) — KHÔNG nằm trong file .css riêng
 * nào ở bản gốc, bị bỏ sót khi list.css được "tái tạo" ở phiên trước (list.css cũ không khớp
 * byte-for-byte với bản thật trên trenvl.com, đã thay bằng bản thật — xem
 * feedback_ci4_view_inline_style.md). File này PHẢI link SAU /css/tour/list.css để giữ đúng thứ
 * tự cascade gốc (link rồi mới tới \3c style> inline trong cùng file PHP).
 */
.sub_swiper2,
.sub_swiper_banner {
    visibility: hidden;
    height: 0;
    overflow: hidden;
}

#layout_loading:not(.open)~* .sub_swiper2,
#layout_loading:not(.open)~* .sub_swiper_banner,
.sub_swiper2.loaded,
.sub_swiper_banner.loaded {
    visibility: visible;
    height: auto;
}

.main_section_banner .sub_swiper_banner_inner {
    position: relative;
}

@media (min-width: 769px) {
    .main_section_banner .sub_swiper_banner:not(.swiper-initialized) .swiper-wrapper {
        display: flex;
        gap: 20px;
        flex-wrap: nowrap;
        overflow: hidden;
    }
    .main_section_banner .sub_swiper_banner:not(.swiper-initialized) .swiper-slide {
        width: calc((100% - 20px) / 2) !important;
        flex-shrink: 0;
    }
}

.swiper_banner_item {
    position: relative;
    border-radius: var(--qc-radius-card, 16px);
    overflow: hidden;
}

.swiper_banner_item .swiper_banner_img {
    height: 220px;
    width: 100%;
    object-fit: cover;
    display: block;
}

.swiper_banner_item .message {
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    color: #ffffff;
}

.swiper_banner_item .message .title_ {
    font-size: 24px;
    line-height: 1.3;
    font-weight: 700;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}

.swiper_banner_item .message .sub_ {
    font-size: 16px;
    line-height: 1.4;
    margin-top: 6px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}

.swiper_banner_item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(0, 0, 0, .35) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

.main_section_banner .swiper-button-banner-next,
.main_section_banner .swiper-button-banner-prev {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, .85);
    width: 44px;
    height: 44px;
    justify-content: center;
    align-items: center;
    display: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
    cursor: pointer;
    transition: opacity .3s;
}

.main_section_banner .swiper-button-banner-next {
    right: -22px;
}

.main_section_banner .swiper-button-banner-prev {
    left: -22px;
}

.main_section_banner:hover .swiper-button-banner-next,
.main_section_banner:hover .swiper-button-banner-prev {
    display: flex;
}

.main_section_banner .swiper-pagination-banner {
    margin-top: 16px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.main_section_banner .swiper-pagination-banner .swiper-pagination-bullet {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #d6d9e0;
    opacity: 1;
    border-radius: 50%;
    margin: 0;
    cursor: pointer;
    transition: all .2s ease;
}

.main_section_banner .swiper-pagination-banner .swiper-pagination-bullet-active {
    background: #17469e;
    width: 8px;
    height: 8px;
}

.main_category {
    margin-top: 30px;
    margin-bottom: 30px;
}

.set {
    position: relative;
    display: block;
    margin: 0 auto;
}

.main_category ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 0 !important;
}

.main_category ul li a {
    display: block;
    border: 1px solid #e5e5e5;
    border-radius: var(--qc-radius-section, 24px);
    height: 55px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 0 10px;
    background-color: #fff;
    transition: all 0.2s ease;
    text-decoration: none;
}

.main_category ul li a .img_box {
    display: none !important;
}

.main_category ul li a img {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.main_category ul li a.active,
.main_category ul li a[aria-current="page"],
.main_category ul li a:has(.img_box.active) {
    border-color: #2b78e4;
    background-color: #f4f8ff;
}

.main_category ul li a.active p,
.main_category ul li a[aria-current="page"] p,
.main_category ul li a:has(.img_box.active) p {
    color: #2b78e4;
    font-weight: 600;
}

@media (hover: hover) and (pointer: fine) {
    .main_category ul li a:hover {
        border-color: #2b78e4;
        background-color: #f4f8ff;
    }
    .main_category ul li a:hover p {
        color: #2b78e4;
    }
}

.main_category ul li a p {
    font-size: 16px;
    color: #333;
    transition: all 0.2s ease;
}

@media screen and (max-width: 850px) {
    .sub_tour_section2 .sub_swiper2 .swiper-wrapper {
        justify-content: flex-start;
        align-items: center;
        margin-top: 20px;
    }

    .img_box {
        padding-top: 0 !important;
    }

    .main_section_banner {
        padding-top: 2rem;
    }

    .content-sub-product-hotel .sub_swiper_banner_inner {
        padding: 0;
    }

    .swiper_banner_item .message {
        left: 1.5rem;
    }

    .swiper_banner_item .message .title_ {
        font-size: 18px;
    }

    .swiper_banner_item .message .sub_ {
        font-size: 13px;
    }

    .swiper_banner_item .swiper_banner_img {
        height: 160px;
    }

    .main_category {
        margin-top: 20px;
        margin-bottom: 20px;
        padding: 0 16px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        width: 100%;
        box-sizing: border-box;
    }

    .main_category::-webkit-scrollbar {
        display: none;
    }

    .main_category.swiper {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .main_category.swiper::-webkit-scrollbar {
        display: none;
    }

    .main_category .swiper-wrapper {
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 10px;
        width: max-content;
        min-width: 100%;
        padding-bottom: 6px;
    }

    .main_category .swiper-slide {
        width: auto !important;
        flex-shrink: 0;
    }

    .main_category ul li a {
        height: 45px;
        padding: 0 18px;
        border-radius: var(--qc-radius-section, 24px);
        gap: 0 8px;
        white-space: nowrap;
    }

    .main_category ul li a img {
        display: none;
        width: 35px;
        height: 35px;
        border-radius: 50%;
    }

    .main_category ul li a p {
        font-size: 14px;
        white-space: nowrap;
    }

    .main_section_banner .swiper-pagination-banner {
        margin-top: 3rem;
    }
}

@media (min-width: 851px) {
    .main_category.swiper {
        overflow: visible;
    }

    .main_category .swiper-wrapper {
        transform: none !important;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        width: auto !important;
    }

    .main_category .swiper-slide {
        width: auto !important;
        margin-right: 0 !important;
    }
}

.cate-loading-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    gap: 16px;
}

.cate-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: cate-spin 0.8s linear infinite;
}

.cate-loading-text {
    font-size: 14px;
    color: #9ca3af;
    font-weight: 500;
}

@keyframes cate-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media screen and (max-width: 450px) {
    .sub_tour_section2 .sub_swiper2 .swiper-wrapper {
        justify-content: start;
        align-items: center;
        margin-top: 30px;
    }
}
