/**
 * ListingHive Child — Pre-Production Polish (Phase4/T4)
 *
 * 旧 mu-plugin: wn-store-pre-prod-polish.php (v1.0.0) の CSS 部を子テーマへ移管。
 * 3 機能を統合（いずれも body.page-id-* で自己スコープ。全ページ enqueue で旧 wp_head 出力と等価）:
 *   1. /listings/(page-161) 下部 category-*.png 6 大画像カードの非表示
 *   2. /guide_market/(page-1101) 取引の流れ 縦タイムライン化
 *   3. ヘッダー Tier2 メニュー 8→5 項目フラット化（全ページ共通）
 *
 * 規約: !important 不使用、body プレフィクスで specificity 確保。
 */

/* ============================================================
   1. /listings/ 下部 category-*.png 6 大画像カード非表示
   ============================================================ */
body.page-id-161 .hp-listing-categories,
body.page-id-161 .hp-listing-categories.hp-grid.hp-block,
body.page-id-161 .hp-page__content > .hp-listing-categories,
body.page-id-161 .hp-listing-category--view-block {
    display: none;
}
body.page-id-161 .hp-grid__item:has(.hp-listing-category) {
    display: none;
}
body.page-id-161 .hp-listing-category__image,
body.page-id-161 img[src*="category-1.png"],
body.page-id-161 img[src*="category-2.png"],
body.page-id-161 img[src*="category-3.png"],
body.page-id-161 img[src*="category-4.png"],
body.page-id-161 img[src*="category-5.png"],
body.page-id-161 img[src*="category-6.png"] {
    display: none;
    visibility: hidden;
}

/* ============================================================
   2. /guide_market/ 取引の流れ 縦タイムライン化
   ============================================================ */
body.page-id-1101 .wn-store-flow-steps {
    list-style: none;
    margin: clamp(1rem, 3vw, 2rem) auto;
    padding: 0;
    max-width: 760px;
    position: relative;
    counter-reset: flow-step;
    display: block;
    grid-template-columns: none;
    grid-template-rows: none;
}
body.page-id-1101 .wn-store-flow-steps > li {
    display: block;
    width: auto;
    max-width: none;
    grid-column: auto;
    grid-row: auto;
}
body.page-id-1101 .wn-store-flow-steps::before {
    content: "";
    position: absolute;
    top: 28px;
    bottom: 28px;
    left: clamp(20px, 4vw, 28px);
    width: 2px;
    background: linear-gradient(
        to bottom,
        var(--c-accent, #F26B22) 0%,
        rgba(242, 107, 34, .35) 60%,
        rgba(242, 107, 34, .2) 100%
    );
    border-radius: 2px;
}
body.page-id-1101 .wn-store-flow-steps > li {
    position: relative;
    margin: 0 0 clamp(1rem, 2.5vw, 1.5rem);
    padding: 1.1rem 1.25rem 1.1rem clamp(60px, 9vw, 80px);
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .04);
    transition: box-shadow .2s ease, transform .15s ease, border-color .15s ease;
}
body.page-id-1101 .wn-store-flow-steps > li:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .08);
    border-color: rgba(242, 107, 34, .25);
}
body.page-id-1101 .wn-store-flow-steps > li:last-child {
    margin-bottom: 0;
}
body.page-id-1101 .wn-store-flow-steps__num {
    position: absolute;
    top: 1rem;
    left: clamp(8px, 1.5vw, 12px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(30px, 5vw, 36px);
    height: clamp(30px, 5vw, 36px);
    background: linear-gradient(135deg, var(--c-accent, #F26B22) 0%, #ff8a4d 100%);
    color: #fff;
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(242, 107, 34, .35), 0 0 0 4px rgba(255, 255, 255, 1);
    z-index: 1;
}
body.page-id-1101 .wn-store-flow-steps > li > h3 {
    margin: 0 0 .35rem;
    font-size: clamp(1.05rem, 2vw, 1.2rem);
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1.4;
}
body.page-id-1101 .wn-store-flow-steps > li > p {
    margin: 0;
    font-size: .92rem;
    line-height: 1.7;
    color: #555;
}
body.page-id-1101 .wn-store-flow-steps > li:last-child {
    background: linear-gradient(135deg, rgba(0, 0, 0, .015) 0%, rgba(0, 0, 0, 0) 100%);
}
html[data-theme="dark"] body.page-id-1101 .wn-store-flow-steps > li {
    background: #1f2430;
    border-color: rgba(255, 255, 255, .1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, .25);
}
html[data-theme="dark"] body.page-id-1101 .wn-store-flow-steps > li:hover {
    border-color: rgba(242, 107, 34, .35);
}
html[data-theme="dark"] body.page-id-1101 .wn-store-flow-steps > li > h3 {
    color: #e6e8ed;
}
html[data-theme="dark"] body.page-id-1101 .wn-store-flow-steps > li > p {
    color: #cfd6e2;
}
html[data-theme="dark"] body.page-id-1101 .wn-store-flow-steps__num {
    box-shadow: 0 2px 8px rgba(242, 107, 34, .5), 0 0 0 4px #15171c;
}
html[data-theme="dark"] body.page-id-1101 .wn-store-flow-steps > li:last-child {
    background: linear-gradient(135deg, rgba(255, 255, 255, .02) 0%, rgba(255, 255, 255, 0) 100%);
}
@media (max-width: 600px) {
    body.page-id-1101 .wn-store-flow-steps > li {
        padding: .95rem 1rem .95rem 50px;
        border-radius: 12px;
    }
    body.page-id-1101 .wn-store-flow-steps::before {
        left: 18px;
    }
    body.page-id-1101 .wn-store-flow-steps__num {
        left: 4px;
        width: 28px;
        height: 28px;
        font-size: .9rem;
    }
}

/* ============================================================
   3. ヘッダー Tier2 メニュー 5 項目フラット化（全ページ共通）
   ============================================================ */
body .wn-header-tier2 #menu-header li.menu-item a[href*="/guide_payment"],
body .wn-header-tier2 #menu-header li.menu-item a[href$="/guide_payment/"] {
    display: none;
}
body .wn-header-tier2 #menu-header > li:has(> a[href*="/guide_payment"]) {
    display: none;
}
body .wn-header-tier2 #menu-header > li:has(> a[href*="web-navigator.blog"]),
body .wn-header-tier2 #menu-header > li:has(> a:not([href*="web-navigator"]):not([href^="/"]):not([href*="localhost"])) > a[target="_blank"] {
    display: none;
}
body .wn-header-tier2 #menu-header > li:has(> a[href*="web-navigator.com"]) {
    display: none;
}
body .wn-header-tier2 #menu-header {
    display: flex;
    justify-content: center;
    gap: clamp(.5rem, 2vw, 1.75rem);
    flex-wrap: wrap;
}
body .wn-header-tier2 #menu-header > li.menu-item {
    margin: 0;
}
