
.custom-tab-wrapper {
    position: relative; /* This makes it occupy its own space in the layout */
    background-color: #fff; /* Ensures a solid background */
    z-index: 10; /* Lifts it above adjacent page content */
    
    /* This adds a clean line separating it from the widget below */
    border-bottom: 1px solid #EAEAEA; 

    overflow: hidden;
    padding: 0 32px;
}
.tab-scroll-container {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.tab-scroll-container::-webkit-scrollbar { display: none; }
.custom-tab-list {
    display: flex;
    gap: 20px;
    white-space: nowrap;
    padding: 10px 0;
}
.custom-tab {
    background: none;
    border: none;
    font-size: 15px;
    padding: 8px 12px;
    position: relative;
    cursor: pointer;
    color: #444;
    transition: all 0.2s ease;
    white-space: nowrap;
    border-radius: 4px;
}
.custom-tab:hover { background-color: #f0f0f0; }
.custom-tab::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #111;
    transform: translateX(-50%);
    transition: all 0.3s ease;
}
.custom-tab:hover::after { width: 20px; }
.custom-tab.active {
    font-weight: 600;
    color: #111;
    background-color: transparent;
}
.custom-tab.active::after { width: 100%; }
.tab-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    cursor: pointer;
    z-index: 10;
}
.tab-scroll-btn.left { left: 0; }
.tab-scroll-btn.right { right: 0; }

/* --- STYLES FOR STICKY BEHAVIOR --- */
.custom-tab-wrapper.is-sticky {
    position: fixed;
    top: 0; /* This will be dynamically set by JavaScript */
    left: 0;
    right: 0;
    width: 100%;
    z-index: 998; /* Sits below header z-index of 999 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);

}

/* The placeholder is controlled by JS and only needs to be a block element */
.custom-tabs-sticky-placeholder {
    display: block;
    height: 0;
}

/* Add this new rule to the bottom of your style.css */

.custom-tab-wrapper:not(.is-sticky) {
    position: static !important;
}

.custom-tab-wrapper {
    transition: transform 0.4s ease, opacity 0.3s ease;
    will-change: transform, opacity;
    opacity: 1;
    transform: translateY(20px); /* Start slightly lower when not sticky */
}

.custom-tab-wrapper.is-sticky {
    transform: translateY(0);
    opacity: 1;
}

.custom-tab-wrapper:not(.is-sticky) {
    transform: translateY(60px); /* This is what causes the "slide in" */
    opacity: 0.7; /* Optional: slightly fade out when not sticky */
}
