html {
    scroll-behavior: smooth;
}

.ck-content h2, .ck-content h3 {
    scroll-margin-top: 70px; 
}

#toc-container {
    background: #f9f9f9;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
    width: 100%; 
    box-sizing: border-box; 
    margin: 20px 0;
}
.toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    margin-bottom: 10px;
}
.toc-title {
    font-weight: bold;
    margin: 0;
    font-size: 1.1rem;
}
.toc-toggle-btn {
    background: none;
    border: 1px solid #ccc;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #555;
}
.toc-toggle-btn:hover {
    background: #eee;
}
#table-of-contents ul {
    list-style-type: none;
    padding-left: 10px;
    margin: 0;
}
#table-of-contents li {
    margin: 8px 0;
}
#table-of-contents a {
    text-decoration: none;
    color: #0066cc;
}
#table-of-contents a:hover {
    text-decoration: underline;
}
#table-of-contents ul ul {
    padding-left: 20px;
}
/* Thuộc tính ẩn danh sách mục lục khi bấm nút */
.toc-hidden {
    display: none;
}

    .ez-product-nav-holder {
        width: 100% !important;
        background-color: #ffffff !important;
        border-bottom: 1px solid #e5e5e5 !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
        z-index: 999 !important;
        display: none !important; 
        position: relative !important;
    }

    /* ĐỊNH VỊ CỐ ĐỊNH CHUẨN 60PX TRÊN MOBILE DƯỚI HEADER-STICKY-2 */
    .ez-product-nav-holder.ez-sticky-active {
        display: block !important;
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        top: 74px !important; /* Độ dày cố định 60px theo yêu cầu của bạn trên Mobile */
    }
@media (max-width: 992px){
    .ez-product-nav-holder.ez-sticky-active {
        top: 60px !important; /* Độ dày cố định 60px theo yêu cầu của bạn trên Mobile */
    }
    
}
    /* DANH SÁCH TAB: HỖ TRỢ VUỐT TRƯỢT MƯỢT MÀ TRÊN MOBILE */
    .ez-product-nav-holder .ez-nav-tabs-list {
        display: flex !important;
        justify-content: flex-start !important; /* Đổi từ center sang flex-start để hỗ trợ trượt ngang */
        align-items: center !important;
        list-style: none !important;
        padding: 0 15px !important; /* Tạo khoảng đệm lề trái/phải 15px để phần tử đầu tiên không bị che */
        margin: 0 !important;
        height: 38px !important; /* Chiều cao tối ưu vừa vặn cho ngón tay bấm trên mobile */
        overflow-x: auto !important; /* Kích hoạt vuốt trượt ngang */
        white-space: nowrap !important; /* Ngăn chữ bị xuống dòng */
        -webkit-overflow-scrolling: touch !important; /* Giúp vuốt bằng ngón tay siêu mượt trên iPhone/Android */
        scroll-snap-type: x mandatory; /* Tạo điểm dừng thông minh khi vuốt */
    }

    /* Ẩn thanh cuộn mặc định của trình duyệt để đạt thẩm mỹ cao như FPT Shop */
    .ez-product-nav-holder .ez-nav-tabs-list::-webkit-scrollbar {
        display: none !important;
    }

    /* PHẦN TỬ LIÊN KẾT TAB */
    .ez-product-nav-holder .ez-tab-link-item {
        display: inline-block !important;
        color: #555555 !important;
        font-weight: 600 !important;
        font-size: 13px !important; /* Kích thước chữ vừa vặn màn hình di động */
        padding: 5px 16px !important; /* Khoảng cách hợp lý để không chiếm quá nhiều diện tích */
        text-decoration: none !important;
        border-bottom: 3px solid transparent !important;
        letter-spacing: 0.3px !important;
        transition: color 0.1s ease-in-out !important;
        scroll-snap-align: start; /* Điểm dính khi trượt */
    }

    /* TRẠNG THÁI ACTIVE: CHỮ ĐỎ + GẠCH DƯỚI ĐỎ CHUẨN FPT SHOP */
    .ez-product-nav-holder .ez-tab-link-item.ez-active {
        color: #e30019 !important;
        font-weight: 700 !important;
        border-bottom-color: #e30019 !important;
    }
    .ez-tab-link-item .icon {
        margin-right:8px;
    }