@charset "UTF-8";

/* 時計専用：日本版の配色・カード・グラデーション付き「もっと見る」。
   CSS Nesting（ネイティブCSSの & 記法）で記述。SCSSの事前コンパイル不要。 */
#purchase-result-section.purchase-result--watch {
    padding: 35px 0;
    background: #1f1f1f;
    color: #fff;
    overflow-anchor: none;

    & .title-wrap {
        padding-bottom: 0;
        text-align: center;

        &::after { background-image: none; }

        & .title {
            display: inline-block;
            font-family: "A-OTF Ryumin Pr5", "Noto Serif TC", "Noto Serif JP", "Yu Mincho", serif;
            font-weight: 600;
            line-height: 1.4;
            letter-spacing: .03em;
            background: linear-gradient(270deg, #e0d5bf 0%, #ede7d5 49.41%, #d5c7ac 97.88%);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            color: transparent;
            border-bottom: none !important;
        }
    }

    & .title-lead {
        margin: 3cqw auto;
        text-align: center;
        color: #fff;
    }

    & .section-title {
        padding: 1cqw 0 2cqw;
        text-align: center;
        background: #1f1f1f;
        color: #fff;
        font-weight: bold;
    }

    & .nav-scroll-wrapper {
        position: relative;
        padding-top: 2.5cqw;
    }

    & .tab-scroll-container {
        width: 100%;
        padding: 1cqw 1cqw 2.5cqw;
        overflow-x: auto;
        transform: rotateX(180deg);
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: rgb(255 255 255 / 70%) rgb(255 255 255 / 10%);

        &::-webkit-scrollbar { height: 5px; }
        &::-webkit-scrollbar-track {
            background: rgb(255 255 255 / 10%);
            border-radius: 10px;
        }
        &::-webkit-scrollbar-thumb {
            background: rgb(255 255 255 / 70%);
            border-radius: 10px;
        }
    }

    & .tab-nav-list {
        display: flex;
        width: max-content;
        gap: 2cqw;
        padding: 0 1cqw;
        transform: rotateX(180deg);
    }

    & .tab-nav-item {
        position: relative;
        display: flex;
        flex: 0 0 auto;
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
        width: 20cqw;
        min-width: 110px;
        margin-bottom: 5px;
        padding: 0;
        border: 0;
        border-radius: 8px;
        background: #fff;
        color: #333;
        cursor: pointer;
        overflow: visible;
        transition: background .3s ease;

        &:hover { background: #f3f3f3; }
        &.is-active {
            background: var(--color-red, #c50016);
            color: #fff;

            &::after {
                content: "";
                position: absolute;
                top: 100%;
                left: 50%;
                transform: translateX(-50%);
                border: 1.5cqw solid transparent;
                border-top-color: var(--color-red, #c50016);
                border-bottom: 0;
            }
        }
    }

    & .nav-item-img-wrap {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        aspect-ratio: 1.3;
        border-radius: 8px 8px 0 0;
        background: #fff;
        overflow: hidden;

        & img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            border-bottom: 2px solid #aaa;
        }
    }

    & .nav-item-text-wrap {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 42px;
        padding: .5cqw 1cqw;
        text-align: center;
        flex: 1;
        overflow-wrap: anywhere;
    }
    & .nav-text { line-height: 1.3; }

    & .nav-slide-btn {
        position: absolute;
        top: 55%;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 18%;
        height: 90%;
        transform: translateY(-50%);
        border: 0;
        background: transparent;
        cursor: pointer;
        transition: opacity .3s, visibility .3s;

        &.is-prev {
            left: 0;
            padding-right: 5%;
            background: linear-gradient(to left, transparent, #1f1f1f);
            & img { transform: rotate(180deg); }
        }
        &.is-next {
            right: 0;
            padding-left: 5%;
            background: linear-gradient(to right, transparent, #1f1f1f);
        }
        &.is-hidden {
            visibility: hidden;
            opacity: 0;
            pointer-events: none;
        }
        & img { width: 50%; }
    }

    & .tab-panel {
        display: none;
        &.is-active { display: block; }
    }

    & .purchase-list-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 2.5cqw;
        background: #1f1f1f;
        overflow-anchor: none;
    }

    & .purchase-card {
        display: flex;
        flex-direction: column;
        height: 100%;
        padding: 2.5cqw;
        border-radius: 10px;
        background: #fff;
        color: #333;
    }

    & .card-link {
        display: flex;
        flex-direction: column;
        height: 100%;
        gap: 2cqw;
        color: inherit;
        text-decoration: none;
    }

    & .card-image {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 40cqw;
        & img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            padding: 2cqw;
        }
    }

    & .card-content {
        display: flex;
        flex: 1;
        flex-direction: column;
        justify-content: space-between;
    }

    & .card-title { margin-bottom: auto; }
    & .card-detail { margin-top: 1cqw; }
    & .price-info { margin-top: 1cqw; }

    & .price-label {
        display: inline-block;
        padding: 4px 8px;
        margin-top: 1cqw;
        border-radius: 4px;
        background: #f6f0e7;
        color: #333;
    }
    & .price-value {
        margin: 1cqw 0 0;
        color: var(--color-red, #c50016);
        line-height: 1.2;
        overflow-wrap: anywhere;
    }
    & .price-date { margin: 1cqw 0 0; color: #555; }

    /* 折りたたみ領域の中でもボタンを見失わないよう、
       コンテンツが600pxを超えた時だけグラデーションを重ねる。 */
    & .purchase-results-scroll-field-wrapper { position: relative; }

    & .js-purchase-results-wrap {
        position: relative;
        overflow: visible;
        transition: height .5s ease;

        &.has-overflow:not(.is-opened) {
            overflow: hidden;
            & > .purchase-results-static-more-container {
                position: absolute;
                bottom: 0;
                left: 0;
                height: 20cqw;
                min-height: 100px;
                padding: 0 2.5cqw 25px;
                background: linear-gradient(to bottom, rgb(31 31 31 / 0%), #1f1f1f);
                pointer-events: none;
                & > * { pointer-events: auto; }
            }
        }
        &.is-opened { overflow: visible; }
    }

    & .purchase-results-static-more-container {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 15px;
        width: 100%;
        min-height: 0;
        padding: 15px 2.5cqw 3cqw;
        box-sizing: border-box;
        background: transparent;
        z-index: 10;

    }

    & .purchase-results-more-trigger-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        min-height: 44px;
        padding: 12px 24px;
        margin: 0 auto;
        border: var(--border-thick, 2px) solid var(--color-gray-dark, #888);
        border-radius: var(--border-radius-m, 6px);
        background: var(--color-white, #fff);
        color: #333;
        cursor: pointer;
        pointer-events: auto;
        box-shadow: 0 3px 6px rgb(0 0 0 / 10%);
        transition: background .2s ease, transform .2s ease;

        &:hover { background: var(--color-gray-light, #f0f0f0); transform: translateY(-2px); }
        &:disabled { opacity: .6; cursor: progress; }
    }


    /* 参考価格リンク：開いた状態は「もっと見る」ボタンの直上、
       通常状態は一覧の下に表示。どちらも時計専用。 */
    & .purchase-results-default-links {
        padding: 15px 2.5cqw 0;
    }
    & .purchase-result-optional-btns {
        width: 100%;
        display: block;
        box-sizing: border-box;

        & .common-link-btn {
            color: #1f1f1f;
            margin-bottom: 15px;
            box-sizing: border-box;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 4cqw 4cqw 4cqw;
            background: var(--color-white);
            border: var(--border-thick) solid var(--color-gray-dark);
            border-radius: var(--border-radius-m);
            transition: opacity 0.3s ease, background-color 0.3s ease;
        }
    }
    & .purchase-results-opened-links { margin: 0 auto; }

    & .purchase-result-error { margin: 8px 2.5cqw 0; color: #fff; }
    & .purchase-result-under-area {
        padding: 0 2.5cqw;
        margin-top: 20px;
        & .annotation-text { margin: 3cqw 0; color: #fff; }
    }

    & [hidden] { display: none !important; }

    @media (max-width: 767px) {
        & .title-lead { margin: 20px auto; }
        & .tab-nav-item { width: 35cqw; }
        & .purchase-card { padding: 12px; }
        & .card-image {
            height: 36cqw;
            & img { padding: 6px; }
        }
        & .annotation-text { margin: 14px 0; }
    }
}
