/* ==========================================================================
   NEWS 共通パーツ：MATOW の装飾（このサイトだけの指定）
   基本の CSS は同じフォルダの news-parts.css（全サイト共通の原本のコピー。そちらは直さない）。
   news-parts.css のあとに読み込まれる（functions.php の「NEWS 記事の共通パーツ」）。

   - 色は base.css の先頭の変数（futureshop 側の style_202305.css と同じ色）を使う
   - リンクボタンは futureshop 側のボタン（.fs-c-button--primary：ブラウンの地・角なし）と同じ形
   - 商品リストは、記事の下の「関連商品」（style.css の 3.）と同じ見た目
   - パーツの前後の間隔は、本文の段落の間隔（base.css の .entry-content > * の 2em）にそろえる
   - .gallery・img.alignnone は今までの記事と同じ見え方に戻している（下の「今までの記事」）
   ========================================================================== */

/* 色・間隔（共通 CSS の変数を上書き） */
:root {
  --np-accent: var(--matow-brown);
  --np-btn-color: var(--matow-background);
  --np-btn-hover-bg: var(--matow-brown);   /* カーソルを乗せたときは色を変えず、薄くする（下） */
  --np-btn-radius: 0;
  --np-btn-min-width: 320px;               /* futureshop のボタンの幅（max-width: 320px）に近づける */
  --np-btn-padding: 10px 20px;
  --np-block-gap: 2em;                     /* 本文の段落どうしの間隔と同じ */
  --np-line: var(--matow-line-color);
  --np-muted: var(--matow-pale-text-color);
  --np-red: var(--matow-red);              /* 今までの .red と同じ赤 */
  --np-box-bg: var(--matow-white);
  --np-box-line: var(--matow-line-color);
  --np-gap: 30px;                          /* 一覧のカードのすき間と同じ */
}

/* --------------------------------------------------------------------------
   段落の間：base.css は p の余白を 0 にし、本文の直下の要素（.entry-content > *）にだけ 2em を付けている。
   パーツの中の段落（囲みで空行を入れたところ）にも間を空ける
   -------------------------------------------------------------------------- */
.entry-content .np-box > * + p {
  margin-top: 1em;
}

/* --------------------------------------------------------------------------
   テキストリンク：本文のリンク（.entry-content a）と同じ下線の位置
   -------------------------------------------------------------------------- */
.entry-content a.np-link,
.entry-content a.np-link:link,
.entry-content a.np-link:visited {
  text-underline-offset: 4px;
}

/* --------------------------------------------------------------------------
   リンクボタン：futureshop 側のボタン（.fs-c-button--primary）と同じ形
   ブラウンの地・クリーム色の文字・角なし・欧文フォント・字間 0.2em
   -------------------------------------------------------------------------- */
.entry-content a.np-btn,
.entry-content a.np-btn:link,
.entry-content a.np-btn:visited,
.entry-content a.np-btn:hover,
.entry-content a.np-btn:focus-visible {
  border: none;
  color: var(--np-btn-color);
  font-family: var(--matow-latin-font);
  font-size: 15px;
  font-weight: 500;
  line-height: 2;
  letter-spacing: 0.2em;
  transition: opacity 0.5s ease;
}

.entry-content a.np-btn:hover {
  opacity: 0.7;
}

/* --------------------------------------------------------------------------
   商品リスト：記事の下の「関連商品」と同じ見た目
   商品名・価格は 12px、カーソルを乗せると薄くなる（下線は付けない）
   -------------------------------------------------------------------------- */
.entry-content .np-item a,
.entry-content .np-item a:link,
.entry-content .np-item a:visited {
  text-decoration: none;
  transition: opacity 0.5s ease;
}

.entry-content .np-item a:hover {
  opacity: 0.7;
}

.entry-content .np-item__name {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 500;
}

.entry-content .np-item__price {
  margin-top: 4px;
  font-family: var(--matow-latin-font);
  font-size: 12px;
}

.entry-content .np-item a:hover .np-item__name {
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   スマートフォン（futureshop と同じ 767px 以下）
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  :root {
    --np-gap-sp: 20px;
  }

  .entry-content a.np-btn,
  .entry-content a.np-btn:link,
  .entry-content a.np-btn:visited {
    width: 100%;
    min-width: 0;
    font-size: 13px;
  }
}

/* --------------------------------------------------------------------------
   今までの記事の見え方を保つ（共通 CSS が WordPress 標準のクラスにも当たるため）
   -------------------------------------------------------------------------- */
/* ギャラリー（[gallery]。2026-11-28 時点で NEWS 7 件が使っている。新しい記事では使わない決まり）。
   今までは style.css の 2. で、すき間 1rem（10px）・どの画面の幅でも columns= の列数だった。
   共通 CSS（すき間 8px・スマホ 2 列・画像を block）のままだと並びが少し変わるので、元に戻す */
.entry-content .gallery {
  --np-gallery-gap: 1rem;
}

.entry-content .gallery .gallery-icon img {
  display: inline;
}

@media (max-width: 767px) {
  .entry-content .gallery-columns-2 { grid-template-columns: 1fr 1fr; }
  .entry-content .gallery-columns-3 { grid-template-columns: 1fr 1fr 1fr; }
  .entry-content .gallery-columns-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
}
