/* ==============================================
   製品ページ: セクションナビ（追従型）
============================================== */

.pp-section-nav {
    background: #002040 !important;
    border-bottom: 1px solid rgba(204, 255, 0, 0.2) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1) !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* JS で付与される固定状態 */
.pp-section-nav.is-fixed {
    position: fixed !important;
    top: 70px !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
}

.admin-bar .pp-section-nav.is-fixed {
    top: 102px !important;
}

.pp-section-nav__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
    position: relative; /* ::after フェードの基準 */
}

/* 項目が多くて溢れる場合、右端にフェードでスクロール可能を示唆 */
.pp-section-nav__inner::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(to right, rgba(0, 32, 64, 0), rgba(0, 32, 64, 1));
    pointer-events: none;
}

.pp-section-nav__list {
    display: flex;
    gap: 4px;
    /* safe center: 項目が収まる時は中央寄せ、溢れる時は flex-start にフォールバック
       (justify-content: center だとオーバーフロー時に先頭がスクロール不可になる) */
    justify-content: safe center;
    list-style: none !important;
    padding: 8px 0 !important;
    margin: 0 !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* min-width: max-content は overflow-x と矛盾するため削除。
       これがあると親 (max-width:1280px) を突き破って右に溢れていた。 */
}

.pp-section-nav__list::-webkit-scrollbar {
    display: none;
}

.pp-section-nav__item {
    flex-shrink: 0;
}

.pp-section-nav__link {
    display: block;
    padding: 8px 16px;
    font-size: 16px !important;
    color: #fff !important;
    text-decoration: none !important;
    white-space: nowrap;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.pp-section-nav__link:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

.pp-section-nav__link.is-active {
    background: #CCFF00 !important;
    color: #1A1A1A !important;
    font-weight: 700 !important;
}

/* ---- レスポンシブ ---- */

@media only screen and (max-width: 1024px) {
    .pp-section-nav__list {
        justify-content: flex-start;
    }

    .pp-section-nav__link {
        padding: 6px 12px;
        font-size: 14px !important;
    }
}

@media only screen and (max-width: 640px) {
    .pp-section-nav.is-fixed {
        top: 0 !important;
    }

    .admin-bar .pp-section-nav.is-fixed {
        top: 46px !important;
    }

    .pp-section-nav__inner {
        padding: 0 8px;
    }

    .pp-section-nav__link {
        padding: 6px 10px;
        font-size: 13px !important;
    }

    .pp-section-nav__list {
        scroll-snap-type: x mandatory;
    }

    .pp-section-nav__item {
        scroll-snap-align: start;
    }
}
