/* --- レイアウト・共通設定 --- */
#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: var(--color-red);
}

/* --- 1. カテゴリ選択ナビゲーション（親ラッパー） --- */
#purchase-result-section .nav-scroll-wrapper {
    padding-top: 2.5cqw;
    padding-bottom: 0;
    position: relative; /* 基準点 */
}

/* --- 横スクロールコンテナ --- */
#purchase-result-section .tab-scroll-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    transform: rotateX(180deg);
    padding: 1cqw 1cqw 2.5cqw;
}

#purchase-result-section .tab-scroll-container::-webkit-scrollbar {
    height: 1.5cqw;
}

#purchase-result-section .tab-scroll-container::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 100vw;
    margin: 0 2cqw;
}

#purchase-result-section .tab-scroll-container::-webkit-scrollbar-thumb {
    background: #a8a8a8;
    border-radius: 100vw;
    border: 0.3cqw solid transparent;
    background-clip: content-box;
}

#purchase-result-section .tab-nav-list {
    display: flex;
    gap: 2cqw;
    width: max-content;
    padding: 0 1cqw;
    transform: rotateX(180deg);
}

/* --- ナビゲーションアイテム --- */
#purchase-result-section .tab-nav-item {
    width: 20cqw;
    height: auto;
    flex-shrink: 0;
    flex-grow: 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
    flex-direction: column;
    overflow: visible;
    position: relative;
}

#purchase-result-section .tab-nav-item.is-active {
    background-color: var(--color-red) !important;
    color: var(--color-white);
}

#purchase-result-section .tab-nav-item.is-active::after {
    content: "";
    display: block;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-style: solid;
    border-width: 1.5cqw 1.5cqw 0 1.5cqw;
    border-color: var(--color-red) transparent transparent transparent;

    z-index: 10;
}

#purchase-result-section .nav-item-img-wrap {
    flex-grow: 1;
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#purchase-result-section .nav-item-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    margin: 0;
    border-bottom: 2px solid var(--color-gray-dark);
    background: var(--color-white);
}

#purchase-result-section .nav-item-text-wrap {
    display: flex;
    align-items: center;
    text-align: center;
    justify-content: center;
    width: 100%;
}

#purchase-result-section .nav-text {
    line-height: 1.2;
    padding: 0.4cqw 2.5cqw;
}

/* --- 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 2.5cqw 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;
}

#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;
}

#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;
}

#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);
    /* 拡大 */
}
