/*
Theme Name: TOM'S 新製品案内
Author: Roots Creative
Description: TOM'S 新製品案内サイト専用のオリジナル WordPress テーマ。月別の新製品情報を一覧表示し、各製品の詳細ページを管理する。CPT「新製品」と ACF カスタムフィールドとの連携前提。ダークグレー×レッドアクセントのモダンデザイン。
Version: 1.1.0
License: Proprietary
Text Domain: toms-newproducts
*/

/* ==========================================================================
   0. Design Tokens
   ========================================================================== */
:root {
    --bg:              #141414;
    --bg-elev:         #1c1c1c;
    --bg-card:         #1c1c1c;
    --bg-image:        #fff;
    --border:          #2a2a2a;
    --border-strong:   #3a3a3a;

    --text:            #ececec;
    --text-bright:     #ffffff;
    --text-mute:       #9a9a9a;
    --text-dim:        #6b6b6b;

    --accent:          #e60019;
    --accent-hover:    #ff1f3a;

    --font-display:    "Archivo", "Arial Narrow", Arial, sans-serif;
    --font-jp:         -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Yu Gothic Medium", "游ゴシック Medium", YuGothic, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;

    --gutter:          32px;
    --section-gap:     80px;
}

@media (max-width: 600px) {
    :root {
        --gutter:      20px;
        --section-gap: 56px;
    }
}

/* ==========================================================================
   1. Reset / Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    padding: 0;
    font-family: var(--font-jp);
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 { margin: 0 0 0.5em; line-height: 1.3; font-weight: 700; color: var(--text-bright); }
p { margin: 0 0 1em; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--text); text-decoration: none; transition: color .15s ease, opacity .15s ease; }
a:hover { color: var(--accent-hover); text-decoration: none; }
button { font: inherit; cursor: pointer; }
hr { border: 0; height: 1px; background: var(--border); margin: 32px 0; }

::selection { background: var(--accent); color: #fff; }

.screen-reader-text {
    border: 0; clip: rect(1px,1px,1px,1px); -webkit-clip-path: inset(50%);
    clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden;
    padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}

/* ==========================================================================
   2. Layout
   ========================================================================== */
.container {
    width: 100%;
    padding: 0 var(--gutter);
    margin: 0;
}

.site-main {
    padding: 0 0 var(--section-gap);
    min-height: 60vh;
}

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 48px;
    align-items: start;
    padding-top: 56px;
}

.layout-full {
    padding-top: 56px;
}

@media (max-width: 1024px) {
    .layout-with-sidebar {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* ==========================================================================
   3. Site Header
   ========================================================================== */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
    position: relative;
}

.site-header::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 80px;
    height: 3px;
    background: var(--accent);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.site-title {
    margin: 0;
    line-height: 0;
}

.site-logo {
    display: inline-block;
    line-height: 0;
}

.site-logo img {
    display: block;
    height: 36px;
    width: auto;
}

.site-logo:hover {
    opacity: 0.85;
}

.site-description {
    margin: 4px 0 0;
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.site-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 28px;
}

.site-nav a {
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 0;
    position: relative;
}

.site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.25s ease;
}

.site-nav a:hover::after {
    width: 100%;
}

@media (max-width: 600px) {
    .site-logo img { height: 28px; }
    .site-nav ul { gap: 16px; }
    .site-nav a { font-size: 12px; }
}

/* ==========================================================================
   4. Site Footer
   ========================================================================== */
.site-footer {
    background: #0c0c0c;
    color: var(--text-dim);
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border);
}

.site-copyright {
    margin: 0;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ==========================================================================
   5. Breadcrumb
   ========================================================================== */
.breadcrumb {
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    font-size: 12px;
    letter-spacing: 0.05em;
}

.breadcrumb a {
    color: var(--text-mute);
}

.breadcrumb a:hover {
    color: var(--accent-hover);
}

.breadcrumb span {
    color: var(--text-bright);
}

/* ==========================================================================
   6. Section Title (Month / Page)
   ========================================================================== */
.month-header {
    margin: 0 0 48px;
}

/* 日本語タイトル（主役）：大きく */
.month-jp {
    font-family: var(--font-jp);
    font-weight: 700;
    font-size: clamp(28px, 4.2vw, 56px);
    line-height: 1.35;
    letter-spacing: 0.03em;
    color: var(--text-bright);
    margin: 0;
}

/* 英字キャプション（補足）：小さく + 赤バー */
.month-en {
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: var(--font-display);
    font-weight: 800;
    font-style: italic;
    font-stretch: 108%;
    font-size: 13px;
    letter-spacing: 0.12em;
    color: var(--text-mute);
    margin: 14px 0 0;
    text-transform: uppercase;
}

.month-en::before {
    content: "";
    flex: 0 0 auto;
    width: 44px;
    height: 2px;
    background: var(--accent);
}

.page-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-style: italic;
    font-stretch: 110%;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1;
    text-transform: uppercase;
    color: var(--text-bright);
    margin: 0 0 32px;
    letter-spacing: -0.005em;
}

/* ==========================================================================
   7. Sidebar / Widgets
   ========================================================================== */
.sidebar {
    font-size: 14px;
}

.widget {
    margin: 0 0 36px;
    padding: 0;
}

.widget-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-style: italic;
    text-transform: uppercase;
    font-size: 22px;
    letter-spacing: 0.02em;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
    color: var(--text-bright);
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.widget li:last-child { border-bottom: none; }

.widget a {
    color: var(--text);
}

.widget a:hover {
    color: var(--accent-hover);
}

/* サイドバー: 他の新製品リスト（サムネイル + 製品名） */
.widget-sub {
    font-size: 11px;
    letter-spacing: 0.15em;
    color: var(--text-dim);
    text-transform: uppercase;
    margin: -8px 0 16px;
}

.other-products-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.other-products-list li {
    border-bottom: 1px solid var(--border);
}

.other-products-list li:last-child {
    border-bottom: none;
}

.other-product {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    color: var(--text);
}

.other-product-thumb {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    overflow: hidden;
    background: #0e0e0e;
    border: 1px solid var(--border);
}

.other-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.other-product:hover .other-product-thumb img {
    transform: scale(1.08);
}

.other-product-thumb .noimage-sm {
    display: block;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(45deg, #1c1c1c, #1c1c1c 6px, #161616 6px, #161616 12px);
}

.other-product-name {
    flex: 1;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text);
    transition: color 0.2s;
}

.other-product:hover .other-product-name {
    color: var(--accent-hover);
}

/* ==========================================================================
   8. Search Form
   ========================================================================== */
.search-form {
    display: flex;
    gap: 0;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-elev);
    border: 1px solid var(--border-strong);
    border-radius: 0;
    color: var(--text);
    font-size: 14px;
}

.search-form input[type="search"]::placeholder { color: var(--text-dim); }

.search-form .search-submit {
    padding: 10px 18px;
    background: var(--accent);
    color: #fff;
    border: 1px solid var(--accent);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: background 0.2s;
}

.search-form .search-submit:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

/* ==========================================================================
   9. Product Card Grid (新製品案内ページ)
   ========================================================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
}

@media (min-width: 1700px) {
    .products-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
    .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.product-card:hover {
    border-color: var(--border-strong);
}

/* Image (枠なし・エリアいっぱい・ホバーで拡大トリミング) */
.product-card-image {
    display: block;
    overflow: hidden;
    position: relative;
    aspect-ratio: 3 / 2;
    background: #0e0e0e;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform-origin: center;
}

.product-card:hover .product-card-image img {
    transform: scale(1.08);
}

.product-card-image .noimage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 13px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    background: repeating-linear-gradient(45deg, #181818, #181818 10px, #141414 10px, #141414 20px);
}

/* Card info */
.product-card-info {
    padding: 22px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
}

.product-card-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    color: var(--text-bright);
    line-height: 1.4;
    letter-spacing: 0.02em;
    transition: color 0.2s;
}

.product-card-title a {
    color: inherit;
    text-decoration: none;
}

.product-card-meta {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 14px;
    margin: 0;
    font-size: 13px;
    color: var(--text-mute);
}

.product-card-meta dt {
    font-weight: 500;
    letter-spacing: 0.06em;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-dim);
    align-self: center;
    white-space: nowrap;
}

.product-card-meta dd {
    margin: 0;
    color: var(--text);
}

.detail-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: auto;
    padding: 12px 20px;
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--text);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.detail-btn::after {
    content: "→";
    font-size: 14px;
    transition: transform 0.25s ease;
}

.detail-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    text-decoration: none;
}

.product-card:hover .detail-btn {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.product-card:hover .detail-btn::after {
    transform: translateX(4px);
}

/* ==========================================================================
   10. Month Block (一覧ページの大セクション)
   ========================================================================== */
.month-block {
    margin-bottom: var(--section-gap);
}

/* ==========================================================================
   10b. 販売フローページ誘導 CTA（トップページ・製品グリッド下）
   ========================================================================== */
.flow-cta {
    text-align: center;
    margin: 24px 0 var(--section-gap);
}

.flow-cta-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 360px;
    padding: 22px 48px;
    background: transparent;
    border: 2px solid var(--border-strong);
    border-radius: 4px;
    color: var(--text-bright);
    font-family: var(--font-jp);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.06em;
    text-decoration: none;
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.flow-cta-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    text-decoration: none;
}

/* 内側の英字キャプション（小） */
.flow-cta-en {
    font-family: var(--font-display);
    font-weight: 800;
    font-style: italic;
    font-stretch: 108%;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.18em;
    color: var(--text-mute);
    line-height: 1;
    transition: color 0.25s ease;
}

.flow-cta-btn:hover .flow-cta-en {
    color: rgba(255, 255, 255, 0.85);
}

/* 内側の日本語ラベル */
.flow-cta-jp {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.flow-cta-jp::after {
    content: "→";
    font-size: 20px;
    line-height: 1;
    transition: transform 0.2s ease;
}

.flow-cta-btn:hover .flow-cta-jp::after {
    transform: translateX(6px);
}

@media (max-width: 600px) {
    .flow-cta-btn {
        min-width: 0;
        width: 100%;
        padding: 22px 32px;
        font-size: 16px;
    }
}

/* ==========================================================================
   11. Past Months Archive Nav
   ========================================================================== */
.month-archive-nav {
    margin: var(--section-gap) 0;
    padding: 36px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.archive-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-style: italic;
    text-transform: uppercase;
    font-size: 36px;
    letter-spacing: 0.01em;
    color: var(--text-bright);
    margin: 0 0 24px;
}

.month-archive-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px 32px;
}

.month-archive-nav li {
    padding: 0;
}

.month-archive-nav a {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 8px 0;
    color: var(--text);
    font-size: 14px;
    transition: color 0.2s, gap 0.2s;
}

.month-archive-nav a::before {
    content: "›";
    color: var(--accent);
    font-size: 18px;
    line-height: 1;
    transition: transform 0.2s;
}

.month-archive-nav a:hover {
    color: var(--accent-hover);
    gap: 18px;
}

.archive-jp {
    color: var(--text-dim);
    font-size: 12px;
    margin-left: 10px;
    letter-spacing: 0.08em;
}

/* ==========================================================================
   12. CTA Blocks (個人 / 法人) — コンパクト + 右側アイキャッチ画像
   ========================================================================== */
.cta-blocks {
    margin-top: var(--section-gap);
}

.cta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

@media (max-width: 768px) {
    .cta-grid { grid-template-columns: 1fr; }
}

.cta {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--border);
    background: var(--bg-elev);
    color: var(--text);
    position: relative;
    overflow: hidden;
    min-height: 150px;
    transition: border-color 0.3s;
}

.cta::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--cta-accent, var(--accent));
    z-index: 2;
}

.cta-personal { --cta-accent: #e60019; }
.cta-business { --cta-accent: #ffffff; }

.cta:hover {
    border-color: var(--cta-accent, var(--accent));
}

.cta-body {
    flex: 1 1 auto;
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cta-body h3 {
    font-family: var(--font-display);
    font-weight: 800;
    font-style: italic;
    font-size: 21px;
    text-transform: uppercase;
    color: var(--text-bright);
    margin: 0 0 10px;
    letter-spacing: 0.01em;
}

.cta-body p {
    margin: 0;
    font-size: 12px;
    line-height: 1.7;
    color: var(--text-mute);
}

.cta-body a {
    color: var(--cta-accent);
    text-decoration: underline;
    font-weight: 600;
}

.cta-body a:hover { opacity: 0.8; }

.cta-image {
    flex: 0 0 38%;
    background-color: #2a2a2a;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

@media (max-width: 480px) {
    .cta-image { flex-basis: 32%; }
    .cta-body { padding: 16px 18px; }
}

/* ==========================================================================
   13. Product Detail Page — 2カラム（左:ギャラリー / 右:製品情報）
   ========================================================================== */
.product-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    grid-template-rows: auto 1fr;
    grid-template-areas:
        "gallery title"
        "gallery info";
    column-gap: 48px;
    align-items: start;
    padding-top: 48px;
}

.product-layout .product-title { grid-area: title; }
.product-info-col              { grid-area: info; }

@media (max-width: 900px) {
    /* スマホ：製品名 → メイン画像 → 製品情報 の縦並び */
    .product-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        grid-template-areas:
            "title"
            "gallery"
            "info";
        padding-top: 32px;
    }
    .product-info-col { margin-top: 32px; }
}

/* --- 左カラム：画像ギャラリー（サムネイル付きスライダー）--- */
.product-gallery-col {
    grid-area: gallery;
    position: sticky;
    top: 24px;
}

@media (max-width: 900px) {
    .product-gallery-col { position: static; }
}

.pg-stage {
    position: relative;
    background: #0e0e0e;
    border: 1px solid var(--border);
    overflow: hidden;
}

.pg-main {
    aspect-ratio: 3 / 2;
}

.pg-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.2s ease;
}

.pg-stage .noimage {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 3 / 2;
    color: var(--text-dim);
    font-size: 13px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.pg-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.pg-arrow:hover { background: var(--accent); }
.pg-prev { left: 0; }
.pg-next { right: 0; }

.pg-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.pg-thumb {
    width: 78px;
    height: 78px;
    padding: 0;
    border: 1px solid var(--border);
    background: #0e0e0e;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s;
}

.pg-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.pg-thumb:hover img { transform: scale(1.1); }
.pg-thumb.is-active { border-color: var(--accent); }

/* --- 右カラム：製品情報 --- */
.product-layout .product-title {
    font-family: var(--font-jp);
    font-weight: 700;
    font-size: clamp(24px, 2.4vw, 36px);
    color: var(--text-bright);
    line-height: 1.35;
    margin: 0 0 20px;
    letter-spacing: 0.02em;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--accent);
}

.product-meta {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 10px 18px;
    margin: 0 0 28px;
    padding: 20px 22px;
    background: var(--bg-elev);
    border-left: 3px solid var(--accent);
}

.product-meta dt {
    font-weight: 600;
    color: var(--text-mute);
    letter-spacing: 0.05em;
    font-size: 12px;
    margin: 0;
    align-self: center;
}

.product-meta dd {
    margin: 0;
    color: var(--text-bright);
    font-size: 15px;
}

.product-description {
    margin: 0 0 28px;
    line-height: 1.9;
    color: var(--text);
    font-size: 15px;
}

.product-description p { margin: 0 0 1em; }
.product-description a { color: var(--accent-hover); text-decoration: underline; }

.product-links {
    margin: 28px 0 0;
    padding: 20px 22px;
    background: var(--bg-elev);
}

.product-links h3 {
    font-family: var(--font-jp);
    font-weight: 700;
    font-size: 17px;
    margin: 0 0 12px;
    color: var(--text-bright);
}

.product-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-links li {
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
}

.product-links li:last-child { border-bottom: none; }

.product-links a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 14px;
    transition: color 0.2s, gap 0.2s;
}

.product-links a::before {
    content: "›";
    color: var(--accent);
    font-size: 18px;
}

.product-links a:hover {
    color: var(--accent-hover);
    gap: 14px;
}

/* ==========================================================================
   14. Related Products (詳細ページ下部の他の新製品)
   ========================================================================== */
.related-products {
    margin-top: var(--section-gap);
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.related-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-style: italic;
    font-stretch: 110%;
    text-transform: uppercase;
    font-size: clamp(28px, 3.5vw, 44px);
    color: var(--text-bright);
    margin: 0 0 28px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.related-item {
    display: block;
    color: var(--text);
}

.related-thumb {
    display: block;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: #0e0e0e;
    border: 1px solid var(--border);
}

.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.related-item:hover .related-thumb img { transform: scale(1.08); }

.related-thumb .noimage-sm {
    display: block;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(45deg, #1c1c1c, #1c1c1c 8px, #161616 8px, #161616 16px);
}

.related-name {
    display: block;
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text);
    transition: color 0.2s;
}

.related-item:hover .related-name { color: var(--accent-hover); }

/* スマホ：横スライド（カルーセル）。2枚目を約24%覗かせてスワイプ可能と分かるように */
@media (max-width: 600px) {
    .related-grid {
        display: flex;
        grid-template-columns: none;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 12px;
        padding-bottom: 14px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: var(--border-strong) transparent;
    }

    .related-grid > .related-item {
        flex: 0 0 76%;
        scroll-snap-align: start;
    }

    .related-grid::-webkit-scrollbar {
        height: 4px;
    }

    .related-grid::-webkit-scrollbar-thumb {
        background: var(--border-strong);
        border-radius: 2px;
    }
}

/* ==========================================================================
   15. 404 Page
   ========================================================================== */
.error-404 {
    text-align: center;
    padding: 80px 0;
}

.error-404 .page-title {
    text-align: center;
}

/* ==========================================================================
   16. Generic Posts (fallback)
   ========================================================================== */
.post-summary {
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
}

.post-summary h2 {
    font-size: 20px;
    margin: 0 0 8px;
    color: var(--text-bright);
}

.post-excerpt { color: var(--text-mute); font-size: 14px; }

/* ==========================================================================
   17. 購入先（電話 / EC / 販売店）アイコン
   ========================================================================== */
.purchase-block {
    margin: 32px 0 0;
}

.purchase-title {
    font-family: var(--font-jp);
    font-weight: 700;
    font-size: 15px;
    color: var(--text-bright);
    margin: 0 0 14px;
    letter-spacing: 0.08em;
}

.purchase-icons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.purchase-icon {
    width: 76px;
    min-height: 76px;
    padding: 12px 6px 10px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.15s ease;
    font-family: var(--font-jp);
}

.purchase-icon svg {
    width: 28px;
    height: 28px;
    display: block;
}

.purchase-icon .purchase-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #fff;
    line-height: 1;
}

/* リンクとして機能するアイコン（EC / 販売店）はホバー演出を付ける。
   電話アイコンは <span> のため :hover の動作も自然に控えめになる */
a.purchase-icon:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-1px);
    text-decoration: none;
}

/* ─────── 電話アイコン ホバー時のツールチップ（メール + 電話 + 営業時間）─────── */
.purchase-phone {
    position: relative;
}

.phone-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #000;
    color: #fff;
    padding: 12px 16px;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1.7;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 10;
    text-align: left;
}

/* 不可視ブリッジ：アイコンとツールチップの隙間を hover 領域でつなぐ
   （リンク（メールURL）に到達しやすくするため） */
.phone-tooltip::before {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 14px;
}

.purchase-phone:hover .phone-tooltip,
.purchase-phone:focus-within .phone-tooltip {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.phone-tooltip-row {
    display: block;
}

.phone-tooltip-label {
    color: var(--accent-hover);
    font-weight: 700;
    margin-right: 4px;
}

.phone-tooltip a {
    color: #fff;
    text-decoration: underline;
}

.phone-tooltip a:hover {
    color: var(--accent-hover);
}

/* ==========================================================================
   18. ご購入の流れページ（page-flow.php / body.is-flow-page）
       全体センター揃え、背景は純黒で画像と一体化させる
   ========================================================================== */
body.is-flow-page {
    background: #000;
}

/* パンくず背景も黒に揃える（既定の .breadcrumb の bg-elev を上書き） */
body.is-flow-page .breadcrumb {
    background: #000;
    border-bottom-color: transparent;
}

.flow-page {
    padding: 48px 0 64px;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.flow-page-title {
    font-family: var(--font-jp);
    font-weight: 700;
    font-size: clamp(26px, 3vw, 38px);
    color: var(--text-bright);
    line-height: 1.4;
    margin: 0 0 28px;
    letter-spacing: 0.02em;
}

/* タイトル下のセンター短赤ライン */
.flow-page-title::after {
    content: "";
    display: block;
    width: 60px;
    height: 2px;
    background: var(--accent);
    margin: 16px auto 0;
}

.flow-graphic {
    margin: 32px 0;
}

.flow-graphic img {
    max-width: 100%;
    height: auto;
    display: inline-block;
}

.flow-description {
    margin-top: 32px;
    line-height: 1.9;
    color: var(--text);
    text-align: left;  /* 本文は通常の左寄せに戻す */
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.flow-description p {
    margin: 0 0 1em;
}

/* ==========================================================================
   19. お問い合わせセクション（page-flow.php 内・画像の下）
       参照元の実数値で揃える：
         - セクション背景 #333333（全幅）
         - カード border 2px solid #666 / radius 16px / padding 40px 0 15px 0
         - オレンジ #ff6900（WordPress Luminous Vivid Orange）
   ========================================================================== */
.contact-section {
    background: #333333;
    padding: 80px 0 64px;
    margin-top: 0;
}

.contact-section-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 32px;
    text-align: center;
}

.contact-section-title {
    font-family: var(--font-jp);
    font-weight: 400;
    font-size: 18px;
    color: #fff;
    margin: 0 0 40px;
    letter-spacing: 0.08em;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 0;
}

@media (max-width: 768px) {
    .contact-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.contact-card {
    background: transparent;
    border: 2px solid #666;
    border-radius: 16px;
    padding: 40px 16px 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    gap: 36px;
}

.contact-card-title {
    font-family: var(--font-jp);
    font-weight: 700;
    font-size: 22px;
    color: #fff;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    line-height: 1.4;
}

.contact-card-icon {
    display: inline-flex;
    color: #fff;
    flex-shrink: 0;
}

.contact-card-icon svg {
    width: 28px;
    height: 28px;
    display: block;
}

.contact-btn {
    display: inline-block;
    padding: 22px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-family: var(--font-jp);
    font-weight: 700;
    font-size: 18px;
    line-height: 1.55;
    text-align: center;
    transition: opacity 0.15s ease;
    min-width: 280px;
}

.contact-btn:hover {
    opacity: 0.85;
    text-decoration: none;
}

/* オレンジ：参照元 has-luminous-vivid-orange-background-color の実数値 */
.contact-btn-personal {
    background: #ff6900;
    color: #fff;
}
.contact-btn-personal:hover { color: #fff; }

.contact-btn-distributor {
    background: #fff;
    color: #222;
}
.contact-btn-distributor:hover { color: #222; }

.contact-phone {
    text-align: center;
}

.contact-phone-number {
    font-family: var(--font-jp);
    font-weight: 700;
    font-size: 38px;
    color: #fff;
    margin: 0 0 22px;
    letter-spacing: 0.02em;
    line-height: 1.15;
}

.contact-phone-hours-label {
    font-size: 13px;
    color: #cfcfcf;
    margin: 0 0 6px;
    letter-spacing: 0.04em;
}

.contact-phone-hours {
    font-size: 14px;
    color: #cfcfcf;
    margin: 0;
    line-height: 1.75;
}

.contact-note {
    font-size: 14px;
    color: #fff;
    margin: 32px 0 0;
    line-height: 1.85;
}

@media (max-width: 768px) {
    .contact-section {
        padding: 56px 0 48px;
    }
    .contact-card {
        min-height: 0;
        padding: 32px 16px 28px;
        gap: 24px;
    }
    .contact-card-title {
        font-size: 20px;
    }
    .contact-phone-number {
        font-size: 32px;
    }
}

@media (max-width: 600px) {
    .contact-phone-number {
        font-size: 28px;
    }
    .contact-btn {
        min-width: 0;
        width: 100%;
    }
}
