@charset "UTF-8";

/* =================================================================
読み物詳細
=================================================================*/
/* 2カラム（本文 781px / サイドバー 293px / 間隔 97px）
   幅: Figma（実寸1439px幅）の左右余白134pxを1440px基準で134.5pxとし、画面幅に比例（134.5 ÷ 1440 × 2 = 18.6805556%）、最大1171px
   間隔: 1440px時97px（97 ÷ 1440 = 6.7361111%）で画面幅に比例
   上: パンくず下端(y152)〜タイトル・検索欄上端(y212) / 下: 記事送り下端(y2394)〜フッター上端(y2514) */
.article-detail {display: flex; align-items: flex-start; gap: min(9.7rem, 6.7361111vw); width: min(117.1rem, calc(100% - 18.6805556vw)); margin: 0 auto; padding: 6rem 0 12rem;}
.article-detail .post {flex: 1; min-width: 0;}
.article-detail .sidebar {flex: none; width: 29.3rem;}

/* タイトル */
.article-detail .post-title {display: flex; flex-direction: column; align-items: center;}
.article-detail .post-title h2 {margin: 0; font-family: var(--font-mincho); font-size: 3.2rem; font-weight: 600; line-height: normal; color: var(--color-text); text-align: center;} /* W6 */
.article-detail .post-title img {display: block; width: 10rem; height: .2rem; margin-top: 1.5rem;} /* Figma: gap17px・線幅2pxが上方向に描画されるため 17 - 2 = 15px */

/* アイキャッチ画像 */
.article-detail .post-thumbnail {margin: 5.7rem 0 0;} /* タイトル下端(y277)〜画像上端(y334) */
.article-detail .post-thumbnail img {display: block; width: 100%; height: auto; aspect-ratio: 930 / 547; object-fit: cover; border-radius: 1.2rem;}

/* 本文（WordPressのブロックエディタ出力を想定した汎用スタイル） */
.article-detail .post-content {margin-top: 4rem; font-family: var(--font-mincho); font-size: 1.6rem; font-weight: 400; line-height: 1.8; color: var(--color-black);} /* W3 */
.article-detail .post-content > * {margin: 0;} /* カラーミー既存CSSの p {margin: 0 0 10px} 等を打ち消す */
.article-detail .post-content > * + * {margin-top: 4rem;} /* Figma: 本文ブロック間 40px */
.article-detail .post-content > h4 + * {margin-top: 2rem;} /* 小見出し〜内容 20px */
.article-detail .post-content > p + p {margin-top: 1.8em;} /* 段落間は空行1行分（16px × 1.8 = 28.8px） */
.article-detail .post-content h3 {padding-bottom: 1.2rem; background: linear-gradient(to right, var(--color-accent) 5rem, var(--color-line) 5rem) left bottom / 100% .2rem no-repeat; font-size: 2.6rem; font-weight: 600; line-height: normal;} /* W6 / 下線: 左50pxと残りで2色・線幅2px。padding = 文字との間隔10px + 線幅2px */
.article-detail .post-content h4 {font-size: 2rem; font-weight: 600; line-height: normal;} /* W6 */
.article-detail .post-content table {/*width: 46rem; max-width: 100%;*/width:100%;max-width:46rem;}
.article-detail .post-content td {padding: 0; border: none; vertical-align: top;}
.article-detail .post-content td:last-child {text-align: right;} /* Figma: 材料名と分量を幅460pxの左右に振り分け */
.article-detail .post-content tr + tr td {padding-top: 1rem;} /* 行間 10px（既存CSSで border-collapse: collapse のため border-spacing は使わない） */
.article-detail .post-content img {display: block; width: 100%; height: auto; border-radius: 1.2rem;}

/* 使用する商品（ACF・最大4件。2列で折り返し）
   見出し上40px・20px / 画像の角丸・各間隔・文字16pxはTOPの商品カード（index.css .c-product-item）に合わせる */
.article-detail .post-products {margin-top: 4rem;}
.article-detail .post-products h3 {margin: 0; font-family: var(--font-mincho); font-size: 2rem; font-weight: 600; line-height: normal; color: var(--color-text);} /* W6 */
.article-detail .post-products ul {display: grid; grid-template-columns: repeat(2, 1fr); gap: 3rem 2rem; margin: 2rem 0 0; padding: 0; list-style: none;}
.article-detail .post-products li {margin: 0; min-width: 0;}
.article-detail .post-products a {display: block; color: var(--color-text); text-decoration: none;}
.article-detail .post-products .image {margin-bottom: .8rem; overflow: hidden; border-radius: 1.2rem; aspect-ratio: 1 / 1; background: #f5f5f5;}
.article-detail .post-products .image img {display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 0;}
.article-detail .post-products .name,
.article-detail .post-products .more {margin: 0; font-family: var(--font-mincho); font-size: 1.6rem; font-weight: 400; line-height: 1.2; text-align: center;} /* W3 */
.article-detail .post-products .more:last-child {text-decoration: underline;} /* W3 */
.article-detail .post-products .name {margin-bottom: .8rem;} /* 商品名〜詳しくみる 8px（TOPのテキスト同士の間隔） */
.article-detail .post-products a:hover {opacity: .8;}
@media screen and (min-width: 500px) {
    .article-detail .post-products .image {margin-bottom: 1.2rem;} /* 画像〜テキスト 8px（SP）→ 12px（500px以上）がTOPと同じ */
}

/* 記事送り
   前後の記事が無い場合（WordPressで出力されない場合）も「読み物一覧に戻る」が中央に残るよう、3列グリッドで位置を固定 */
.article-detail .post-nav {display: grid; grid-template-columns: 5rem 1fr 5rem; align-items: center; margin-top: 6.3rem;} /* 本文下端(y2281)〜記事送り上端(y2344) */
.article-detail .post-nav .prev {grid-column: 1;}
.article-detail .post-nav .back {grid-column: 2; justify-self: center; display: flex; align-items: center; height: 5rem; padding: 0 2.4rem; border-radius: 10rem; background: var(--color-white); font-family: var(--font-mincho); font-size: 1.6rem; font-weight: 400; line-height: normal; color: var(--color-text); text-decoration: none;} /* W3 */
.article-detail .post-nav .next {grid-column: 3;}
.article-detail .post-nav img {display: block; width: 5rem; height: 5rem;}
.article-detail .post-nav .next img {transform: rotate(180deg) scaleY(-1);} /* Figmaと同じ回転・反転で右向きにする */

/* サイドバー：検索 */
.article-detail .search {display: flex; align-items: center; height: 5.2rem; border-radius: 2.6rem; background: var(--color-search-bg);}
.article-detail .search input {flex: 1; min-width: 0; height: 100%; margin: 0; padding: 0 0 0 2.6rem; border: none; border-radius: 0; background: transparent; box-shadow: none; font-family: var(--font-mincho); font-size: 1.6rem; line-height: normal; color: var(--color-black); -webkit-box-sizing: border-box; box-sizing: border-box; -webkit-appearance: none; appearance: none;} /* カラーミー既存CSS（Bootstrap由来の input 指定）を打ち消す / 16px未満だとiOS Safariでフォーカス時に拡大されるため16px */
.article-detail .search input::-webkit-search-cancel-button {-webkit-appearance: none;}
.article-detail .search button {flex: none; display: flex; margin: 0; padding: 0 1.9rem 0 1rem; border: none; background: none; cursor: pointer;} /* 右余白: Figmaのアイコン右端〜検索欄右端 約19px */
.article-detail .search button img {display: block; width: 2.1234rem; height: 2.1234rem;} /* 線幅分を含むSVGサイズ（アイコン本体20.73px） */
.screen-reader-text {position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; white-space: nowrap;} /* 画面には表示せず読み上げのみ（WordPress標準クラス名） */

/* サイドバー：最近の記事・カテゴリ */
.article-detail .widget {margin-top: 6rem;} /* ブロック間 60px */
.article-detail .search + .widget {margin-top: 4rem;} /* 検索欄下端(y264)〜最近の記事(y304) */
.article-detail .widget h2 {margin: 0; padding-bottom: 1.2rem; background: linear-gradient(to right, var(--color-accent) 5rem, var(--color-line) 5rem) left bottom / 100% .2rem no-repeat; font-family: var(--font-mincho); font-size: 2rem; font-weight: 600; line-height: normal; color: var(--color-text);} /* W6 / 下線: 左50pxと残りで2色・線幅2px。padding = 文字との間隔10px + 線幅2px */
.article-detail .widget ul {margin: 2rem 0 0; padding: 0; list-style: none;}
.article-detail .widget a {display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 2rem 0 1.9rem; border-bottom: 1px solid var(--color-border); background: var(--color-white); font-family: var(--font-mincho); font-size: 1.4rem; font-weight: 600; line-height: normal; color: var(--color-text); text-decoration: none;} /* W6 / 下余白: Figmaは区切り線1pxを余白20pxの内側に描画するため 20 - 1 = 19px（項目高さ61px） */
.article-detail .widget .arrow {flex: none; display: flex; justify-content: center; align-items: center; width: .688184rem; height: 1.3rem;}
.article-detail .widget .arrow img {flex: none; width: 1.3rem; height: .688184rem; max-width: none; transform: rotate(-90deg);} /* 下向きの図形をFigmaと同じ回転で右向きにする。既存CSSの img{max-width:100%} を解除 */

@media screen and (max-width: 767px) {
    .article-detail {flex-direction: column; align-items: stretch; gap: 6rem; width: auto; padding: 6rem 2rem 12rem;} /* SPは本文 → サイドバーの1カラム。間隔はサイドバー内のブロック間隔(60px)に合わせる */
    .article-detail .sidebar {width: auto;}
}
