/* --- レイアウト・共通設定 --- */
#purchase-result-section {
    padding: 20px 0;
}

/* --- メインタイトル --- */
#purchase-result-section .section-title {
    text-align: center;
    padding: 1cqw 0 2cqw;
}

#purchase-result-section .section-title .highlight {
    color: #e60012;
}

/* ==========================================================================
   1. カテゴリ選択ナビゲーション（完成形デザイン統合・バー非表示・高さ抑制）
   ========================================================================== */
#purchase-result-section .nav-scroll-wrapper {
    position: relative;
    padding-top: 2.5cqw;
    padding-bottom: 0;
}

/* 横スクロールコンテナ（スクロールバー完全非表示 ＆ スムーズスライド） */
#purchase-result-section .tab-scroll-container {
    width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    padding: 3cqw 1cqw 3cqw;
    user-select: none;
    -webkit-user-select: none;
    scrollbar-width: none !important; /* Firefox / Edge */
    -ms-overflow-style: none !important; /* IE */
}

#purchase-result-section .tab-scroll-container::-webkit-scrollbar {
    display: none !important; /* Chrome / Safari */
    width: 0 !important;
    height: 0 !important;
}

#purchase-result-section .tab-notice {
    text-align: center;
}

/* タブリスト（1列並び維持・等高化・不要な反転ハック削除） */
#purchase-result-section .tab-nav-list {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 2cqw;
    width: max-content !important;
    padding: 0 1cqw;
}

/* ナビゲーションアイテム本体（27cqw幅・角丸16px・コンパクト化） */
#purchase-result-section .tab-nav-item {
    width: 30cqw;
    min-width: 80px;
    height: auto !important;
    flex-shrink: 0;
    flex-grow: 0;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center;
    border-radius: 12px;
    border: 1px solid #b2b2b2;
    cursor: pointer;
    position: relative;
    box-sizing: border-box;
    transition:
        background 0.3s ease,
        border-color 0.3s ease;
    background: var(--color-white, #ffffff);
    box-shadow: 3px 3px 2px rgba(0, 0, 0, 0.2);
}

#purchase-result-section .tab-nav-item:hover {
    background: #f3f3f3;
}

/* アイコン表示エリア（画像による縦伸びを抑制） */
#purchase-result-section .nav-item-img-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 4px 0;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

#purchase-result-section .nav-item-img-wrap img {
    max-width: 50%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0;
    border-bottom: none;
    background: transparent;
    -webkit-user-drag: none;
    pointer-events: none;
}

/* テキストエリア */
#purchase-result-section .nav-item-text-wrap {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center;
    width: 100%;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

#purchase-result-section .nav-text {
    line-height: 1.2 !important;
    padding: 1cqw 0.3cqw;
    margin: 0 !important;
    --f-base: 12;
}
#purchase-result-section .tab-notice {
    text-align: center;
}
/* アクティブ状態 */
#purchase-result-section .tab-nav-item.is-active {
    border-color: #e60012;
    background-color: transparent !important;
}

#purchase-result-section .tab-nav-item.is-active .nav-item-img-wrap {
    background-color: #fdedee;
}

#purchase-result-section .tab-nav-item.is-active .nav-item-text-wrap {
    background-color: #e60012 !important;
}

#purchase-result-section .tab-nav-item.is-active .nav-text {
    color: var(--color-white, #ffffff) !important;
}

/* アクティブタブ下部の吹き出し三角 */
#purchase-result-section .tab-nav-item.is-active::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    bottom: -11%;
    left: 50% !important;
    transform: translateX(-50%) !important;
    border-style: solid !important;
    border-width: 3cqw 3cqw 0 3cqw !important;
    border-color: #e60012 transparent transparent transparent !important;
    z-index: 10 !important;
}

/* --- 2. メインコンテンツ（タブ切り替えエリア） --- */
#purchase-result-section .tab-panel {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#purchase-result-section .tab-panel.is-active {
    display: block;
    opacity: 1;
}

/* --- 3. 買取実績リスト（カード表示） --- */
#purchase-result-section .purchase-list-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 2.5cqw;
}

#purchase-result-section .purchase-card {
    background: var(--color-white);
    border-radius: 10px;
    padding: 2.5cqw;
    height: 100%;
    display: flex;
    flex-direction: column;
}

#purchase-result-section .card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
    gap: 2cqw;
}

#purchase-result-section .card-image {
    text-align: center;
    height: 40cqw;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#purchase-result-section .card-image img {
    width: 40cqw;
    height: auto;
    object-fit: contain;
    padding: 2cqw;
}

#purchase-result-section .card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#purchase-result-section .card-detail {
    margin-top: auto;
}

#purchase-result-section .price-label {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    margin-top: 1cqw;
}

#purchase-result-section .price-date {
    margin: 1cqw 0 0 0;
}

#purchase-result-section .price-value {
    margin: 1cqw 0 0 0;
    line-height: 1;
}

/* --- 4. もっと見る機能 --- */
#purchase-result-section .js-limit-wrap {
    overflow: hidden;
    transition: height 0.5s ease;
}

#purchase-result-section .limit-trigger-btn {
    cursor: pointer;
}

#purchase-result-section .purchase-result-under-area {
    padding: 0 2.5cqw;
}

#purchase-result-section .purchase-result-under-area .annotation-text {
    margin-bottom: 3cqw;
}

/* --- 5. スライダースクロール矢印ボタン --- */
#purchase-result-section .nav-slide-btn {
    position: absolute;
    top: 57%;
    transform: translateY(-50%);
    z-index: 10;
    width: 20%;
    height: 90%;
    border: none;
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}

#purchase-result-section .nav-slide-btn span {
    display: block;
    transform: scaleX(0.8);
    letter-spacing: -2px;
}

#purchase-result-section .nav-slide-btn.is-prev {
    left: 0;
    padding-right: 5%;
    background: linear-gradient(
        to left,
        rgba(255, 255, 255, 0) 0%,
        var(--color-beige) 100%
    );
}

#purchase-result-section .nav-slide-btn.is-prev img {
    transform: rotate(180deg);
    width: 50%;
}

#purchase-result-section .nav-slide-btn.is-next {
    right: 0;
    padding-left: 5%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        var(--color-beige) 100%
    );
}

#purchase-result-section .nav-slide-btn.is-next img {
    width: 50%;
}

#purchase-result-section .nav-slide-btn.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* --- 6. CTAボタン --- */
#purchase-result-section .buy-btn {
    margin-top: 2cqw;
    transition:
        transform 0.3s ease,
        opacity 0.3s ease;
}

#purchase-result-section .buy-btn img {
    width: 100%;
}

#purchase-result-section .buy-btn:hover {
    opacity: 0.8;
    transform: scale(1.05);
}
