/* ============================================================
   VJ-CUSTOM.CSS — Tất cả override & fix được gom vào đây
   Enqueued sau vj-main (vietjet.css) để có độ ưu tiên cao hơn
   ============================================================ */

/* --- Admin bar: xóa html margin + body padding trùng --- */
html.admin-bar { margin-top: 0 !important; }
.admin-bar body { padding-top: 0 !important; }
.admin-bar .truot { top: 32px !important; }
@media (max-width: 781px) { .admin-bar .truot { top: 46px !important; } }

/* --- Mobile: nav sticky ở đầu trang --- */
@media (max-width: 767px) {
    .wpfixed {
        position: sticky !important;
        top: 0 !important;
        z-index: 1051 !important;
    }
    .admin-bar .wpfixed { top: 46px !important; }
    body { padding-top: 0 !important; }
    .admin-bar body { padding-top: 0 !important; }
}

/* --- Tour chi tiết: content không bị khuất sau nav mobile --- */
@media (max-width: 767px) {
    body.single-product .container.vj-single {
        padding-top: calc(var(--vj-nav-bottom, 60px) + 4px) !important;
    }
}

/* --- Tour chi tiết: tabnav sticky --- */
body.single-product .vj-tabnav-wrap {
    position: sticky !important;
    top: var(--vj-nav-bottom, 40px) !important;
    z-index: 100 !important;
}
@media (max-width: 767px) {
    body.single-product .vj-tabnav-wrap { top: 40px !important; }
}

/* --- Tabnav fade edges (chỉ mobile/tablet khi tab có thể scroll) --- */
.vj-tabnav-wrap { position: relative; }
@media (max-width: 991px) {
    .vj-tabnav-wrap::before,
    .vj-tabnav-wrap::after {
        content: "";
        position: absolute;
        top: 0; bottom: 0;
        z-index: 2;
        pointer-events: none;
    }
    .vj-tabnav-wrap::before { left: 0; width: 10px; background: linear-gradient(to right, #F7F3EC, transparent); }
    .vj-tabnav-wrap::after  { right: 0; width: 40px; background: linear-gradient(to left, #F7F3EC 15%, transparent); }
}

/* --- Booking box: sticky dưới tabnav --- */
body.single-product .vj-booking-col .vj-booking-box {
    margin-top: 0;
    top: calc(var(--vj-nav-bottom, 40px) + 8px) !important;
}

/* --- Tour chi tiết: gallery có khoảng cách với booking box trên mobile/tablet --- */
@media (max-width: 991px) {
    .vj-gallery { margin-top: 20px; }
    .vj-booking-col { margin-bottom: 20px !important; }
}

/* --- Hero slider mobile: đủ cao để thấy nội dung ảnh --- */
@media (max-width: 767px) {
    #vj-main-slider .owl-stage-outer,
    #vj-main-slider .owl-stage,
    #vj-main-slider .owl-item { height: auto !important; }
    #vj-main-slider .item a { display: block; }
    #vj-main-slider .item img {
        width: 100% !important;
        height: auto !important;
        min-height: 65vw !important;
        object-fit: cover !important;
        object-position: top center !important;
    }
}

/* --- Nút Zalo booking: giữ 1 hàng trên mobile --- */
@media (max-width: 767px) {
    .vj-btn-zalo { font-size: 13px !important; white-space: nowrap !important; letter-spacing: 0 !important; }
}

/* --- Footer mobile: tên công ty căn giữa, xuống dòng hợp lý --- */
@media (max-width: 767px) {
    li.vj-biz-name {
        white-space: normal !important;
        text-align: center !important;
        display: block !important;
        width: 100% !important;
        font-size: 11.5px !important;
        line-height: 1.6 !important;
        padding: 0 16px !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: none !important;
    }
}

/* --- Mobile nav overlay: iOS Safari cần cursor:pointer để nhận tap --- */
.menu-overlay { cursor: pointer; }

/* --- Date picker: nút tick nhỏ gọn mọi màn hình --- */
.vjs-dp-confirm {
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    min-width: unset !important;
    padding: 0 !important;
    font-size: 12px !important;
    line-height: 1 !important;
}
@media (max-width: 767px) {
    .vjs-dp-popup {
        width: 296px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
    .vjs-dp-confirm {
        width: 30px !important;
        height: 30px !important;
        font-size: 11px !important;
    }
    .vjs-dp-cell { padding: 9px 0 !important; font-size: 13px !important; }
}

/* --- Footer tablet: căn giữa nút social --- */
@media (min-width: 768px) {
    .vj-footer .social_block { justify-content: center; width: 100%; }
}

/* --- Điểm đến hấp dẫn: cân bằng spacing --- */
#vj-destinations { padding-top: 40px; padding-bottom: 56px; }
@media (max-width: 767px) {
    #vj-destinations { padding-top: 20px; padding-bottom: 28px; }
}

/* --- Ẩn vạch xanh lịch khởi hành trên card tour --- */
.vj-ft2-depart-bar { display: none !important; }

/* --- Desktop: footer map & card badge --- */
@media (min-width: 992px) {
    .vj-foot-map-col .vj-foot-col-title { display: none !important; }
    .vj-foot-map-col { display: flex; flex-direction: column; }
    .vj-foot-map-col .vj-foot-map-lg {
        margin-top: 65px;
        flex: 1;
        height: auto !important;
        min-height: 180px;
        margin-bottom: 55px;
    }
    .vj-ft2-thumb .vj-ft2-badge { border: none !important; }
    .vj-ft2-row-head .vj-ft2-row-badge { border: none !important; }
}

/* --- Liên hệ: chữ LIÊN HỆ đậm trên banner --- */
.vj-lh-page-head .txt-main { font-weight: 900 !important; }

/* --- Bài viết: ẩn block ngày/tác giả cũ (HTML Shopify) trong post content --- */
.vj-post-content .article-head,
.vj-post-content .article-date-comment,
.vj-post-content .article-tldr { display: none !important; }

/* --- Liên hệ mobile: ảnh nền không có 3 khung ảnh --- */
@media (max-width: 767px) {
    .vj-lh-bg-img {
        background-image: url("/wp-content/themes/mt/images/anh-nen-mobile.webp") !important;
    }
}

/* --- Mobile: các banner không bị đẩy lên che chữ --- */
@media (max-width: 767px) {
    .vj-banner-title { margin-top: 0 !important; }
    .vj-lh-banner { margin-top: 0 !important; height: 140px !important; }
    .vj-lh-page-head { padding-top: calc(var(--vj-nav-bottom, 60px) + 10px) !important; }
}

/* --- Ẩn cứng TOC sticky cũ (không dùng nữa) --- */
.vj-toc-sticky-wrap,
.vj-toc-trigger { display: none !important; }

/* --- Override style.css: nav{position:fixed} trên mobile không áp cho TOC --- */
@media (max-width: 767px) {
    #vj-toc-nav {
        position: static !important;
        top: auto !important;
        left: auto !important;
        width: auto !important;
        z-index: auto !important;
        background-color: #fff !important;
        box-shadow: none !important;
    }
}
