/* お知らせ詳細ページ */
.news-detail {
  max-width: 780px;
  margin: 0 auto;
  padding-bottom: 3rem;
}

.news-detail__banner {
  margin-bottom: 1.5rem;
}
.news-detail__banner img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.news-detail__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.news-detail__date {
  font-size: 13px;
  color: var(--text-light, #888);
}

.news-detail__title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
}

.news-detail__body {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text, #333);
}

.news-detail__body img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 1rem 0;
}

.news-detail__body h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.news-detail__body p {
  margin-bottom: 1rem;
}

.news-detail__body ul,
.news-detail__body ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.news-detail__back {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border, #dee2e6);
}

.news-detail__back a {
  color: var(--primary, #5a7a6f);
  text-decoration: none;
  font-size: 14px;
}

.news-detail__back a:hover {
  text-decoration: underline;
}

/* カラムレイアウト基本スタイルは style.css に移動済み */
/* SSR商品カードの高さ揃え */
.news-col .news-embed-products-ssr {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.news-col .news-embed-products-ssr > div {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.news-col .news-embed-products-ssr > div > div:last-child {
  margin-top: auto;
}
/* 記事内の商品カード埋め込み（横型：左=画像、右=情報+価格） */
.news-embed-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  clear: both;
  container-type: inline-size;
}
/* ------------------------------------------------------------
   記事・商品ページ内の埋め込み商品カード
   一覧ページのカードとは別デザイン（縦積み・画像は薄い背景の角丸・
   価格は左寄せで大きく・「商品を見る」ボタン付き）。
   マークアップは共通（api.js の renderCard / _product_card.html）で、
   見た目の差はここだけで付ける。
   ------------------------------------------------------------ */
.news-embed-products .product-card {
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  overflow: visible;
  text-decoration: none;
}
.news-embed-products .product-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
/* 画像は白背景の角丸ボックスに中央揃えで収める（切り取らず全体を見せる） */
.news-embed-products .product-card__img-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
}
.news-embed-products .product-card__image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  object-position: center;
  background: transparent;
  margin: 0 auto;
}
/* お気に入りは画像の右上 */
.news-embed-products .btn-favorite {
  top: 8px;
  right: 8px;
  left: auto;
  bottom: auto;
}
.news-embed-products .product-card__body {
  padding: 10px 2px 0;
}
.news-embed-products .product-card__brand {
  font-size: 0.8rem;
  color: #666;
  line-height: 1.3;
  margin-bottom: 0;
}
.news-embed-products .product-card__name {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 2px 0 4px;
}
/* 内容量は商品名の下に独立した行で出す */
.news-embed-products .product-card__volume,
.news-embed-products .product-card__volume--sp {
  display: block !important;
  font-size: 0.85rem;
  color: #888;
  text-align: left !important;
  align-self: flex-start !important;
  margin-bottom: 6px;
}
.news-embed-products .product-card__volume--pc { display: none !important; }
/* 価格は右寄せ（直下の「LINE友達で○%OFF」バッジと揃える）。数字だけ大きく太く */
.news-embed-products .product-card__bottom { padding: 0 2px; }
.news-embed-products .product-card__discount-wrap {
  align-items: flex-end !important;
  gap: 2px !important;
}
.news-embed-products .product-card__original-price {
  font-size: 0.8rem !important;
  color: #888 !important;
  text-align: right !important;
  align-self: flex-end !important;
}
.news-embed-products .product-card__price-row {
  justify-content: flex-end !important;
  align-items: flex-end !important;
  text-align: right !important;
  align-self: flex-end !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}
.news-embed-products .product-card__price-row > div { align-self: flex-end !important; }
.news-embed-products .product-card__price-incl {
  font-size: 1.2rem !important;
  font-weight: 700 !important;
  color: #000 !important;
  line-height: 1.2 !important;
}
.news-embed-products .product-card__discount-badge {
  font-size: 0.7rem !important;
  padding: 1px 8px !important;
  border-radius: 3px !important;
}
.news-embed-products .product-card__point-info {
  text-align: left !important;
  padding: 0 2px;
}
/* 「商品を見る」ボタン */
.news-embed-products .product-card__cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 2px 2px;
  padding: 9px 12px;
  border: 1px solid var(--color-primary);
  border-radius: 6px;
  color: var(--color-primary);
  background: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .2s, color .2s;
}
.news-embed-products .product-card__cta:hover {
  background: var(--color-primary);
  color: #fff;
}
.news-embed-products .product-card__cta-arrow {
  position: absolute;
  right: 12px;
  line-height: 1;
}
/* 品切れ：画像オーバーレイを非表示、インラインバッジを表示 */
.news-embed-products .product-card__soldout-badge { display: none; }
.news-embed-products .product-card--soldout .product-card__image { opacity: 1; }
.news-embed-products .product-card__soldout-badge--inline {
  display: inline-block;
  background: #999;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 600;
  border-radius: 3px;
  width: fit-content;
  padding: 1px 6px;
  margin: 2px 0 0 0;
}
/* 埋め込みカードでは出さない要素（「お買い得」等の画像バッジを含む） */
.news-embed-products .product-tags { display: none; }
.news-embed-products .product-card__campaign-badge { display: none; }
.news-embed-products .product-card__lead { display: none; }
.news-embed-products .product-card__new-badge { display: none; }
.news-embed-products .product-card__renewal-badge { display: none; }

/* SPでは縦積みにせず横スクロールにする（カード2枚以上のとき）。
   1枚だけのときは全幅のままスクロールさせない。 */
@media (max-width: 768px) {
  .news-embed-products {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .news-embed-products > .product-card {
    /* 次のカードが少し見える幅にしてスクロールできると分かるようにする */
    flex: 0 0 72%;
    scroll-snap-align: start;
  }
  .news-embed-products > .product-card:only-child {
    flex: 0 0 100%;
  }
  .news-embed-products::-webkit-scrollbar { height: 4px; }
  .news-embed-products::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
  }
}

/* タグのスタイル（top.cssと同じ定義） */
.news-tag {
  font-size: 10px;
  font-weight: 400;
  color: #fff !important;
  width: 60px;
  flex-shrink: 0;
  line-height: 0.3;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 0;
}
.news-tag.tag-new   { background: #e05a5a; }
.news-tag.tag-info  { background: #4a90c4; }
.news-tag.tag-sale  { background: #e07a20; }
.news-tag.tag-alert { background: #555; }

/* アーカイブ一覧（TOPページと同じ横並びスタイル） */
.news-detail .news-list { border-top: 1px solid var(--border, #dee2e6); list-style: none; margin: 0; padding: 0; }
.news-detail .news-list li { border-bottom: 1px solid var(--border, #dee2e6); }
.news-detail .news-list li a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 14px 4px;
  color: var(--text, #333);
  text-decoration: none;
}
.news-detail .news-list li a:hover { background: var(--primary-light, #f0f5f3); text-decoration: none; }
.news-date { font-size: 12px; color: var(--text-light, #888); flex-shrink: 0; width: 90px; }
.news-title { font-size: 1rem; flex: 1; }

/* ページネーション */
.news-pagination { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.news-pagination button,
.news-pagination a {
  border: 1px solid var(--border, #dee2e6);
  background: #fff;
  padding: 4px 14px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text, #333);
  text-decoration: none;
}
.news-pagination button:hover:not(:disabled),
.news-pagination a:hover { background: var(--primary-light, #f0f5f3); text-decoration: none; }
.news-pagination button:disabled { color: #bbb; cursor: default; }
.news-pagination .page-info { font-size: 13px; color: var(--text-light, #888); align-self: center; }

/* ============================================================
   コラム本文のFAQ（Q/Aバッジ形式）

   記事本文は <h3 class="brand_h4">Q: 質問</h3> + <p>回答</p> で書かれており、
   レンダリング時に app/utils/html_text.py の decorate_faq() が
   column-faq__q / column-faq__a を付与する。記事側のHTMLは書き換えない。

   .brand_h4 の ● は打ち消し、代わりに丸い Q バッジを出す。
   ============================================================ */
.news-detail__body .column-faq__q {
  /* .brand_h4 の ● と padding-left を打ち消す */
  position: relative;
  padding-left: 2.4em;
  margin-top: 1.6em;
  margin-bottom: 0.5em;
  font-size: 1.02rem;
  color: var(--text, #333);
}
.news-detail__body .column-faq__q::before {
  content: "Q";
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 0;
  top: 0.05em;
  width: 1.7em;
  height: 1.7em;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-family: "Cinzel", serif;
  font-size: 0.82em;
  font-weight: 700;
  line-height: 1;
}
.news-detail__body .column-faq__a {
  position: relative;
  padding-left: 2.4em;
  margin-bottom: 1.2em;
}
.news-detail__body .column-faq__a::before {
  content: "A";
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 1.7em;
  height: 1.7em;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  font-family: "Cinzel", serif;
  font-size: 0.82em;
  font-weight: 700;
  line-height: 1;
}
/* 回答が複数段落のとき、2段落目以降もバッジ幅に合わせて字下げする */
.news-detail__body .column-faq__a + p:not([class]) { padding-left: 2.4em; }

@media (max-width: 640px) {
  .news-detail__body .column-faq__q,
  .news-detail__body .column-faq__a,
  .news-detail__body .column-faq__a + p:not([class]) { padding-left: 2.1em; }
}

/* dl形式で書かれた記事のFAQ。dt/dd のブラウザ既定マージンを打ち消す */
.news-detail__body .brand_faq_list { margin: 1.2em 0; }
.news-detail__body dt.column-faq__q { font-weight: 600; }
.news-detail__body dd.column-faq__a { margin-left: 0; }

/* ===== 記事内 目次（.atoll-toc） =====
   色は variables.css の変数から作る（サイト別テーマで上書きできるように直書きしない） */
.atoll-toc {
  --toc-accent: var(--color-primary);
  --toc-line: color-mix(in srgb, var(--color-primary) 22%, var(--color-bg));
  --toc-line-soft: color-mix(in srgb, var(--color-primary) 15%, var(--color-bg));
  margin: 24px 0 32px;
  padding: 24px 28px 18px;
  border: 1px solid var(--toc-line);
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--color-primary) 4%, var(--color-bg)) 0%,
    color-mix(in srgb, var(--color-primary) 9%, var(--color-bg)) 100%);
  border-radius: 2px;
  text-align: left;
}
.atoll-toc .atoll-toc__label {
  margin: 0 0 2px;
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: 11px;
  letter-spacing: .25em;
  color: var(--toc-accent);
  line-height: 1.4;
}
.atoll-toc .atoll-toc__title {
  margin: 0 0 14px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--toc-line);
  font-family: "Zen Old Mincho", "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 26px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: .08em;
  line-height: 1.3;
}
.atoll-toc ol.atoll-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2 230px;          /* 本文幅が狭いときは自動で1列 */
  column-gap: 40px;
  column-rule: 1px solid var(--toc-line-soft);
}
.atoll-toc ol.atoll-toc__list li {
  list-style: none;
  margin: 0;
  padding: 0;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  border-bottom: 1px solid var(--toc-line-soft);
}
.atoll-toc ol.atoll-toc__list li::before,
.atoll-toc ol.atoll-toc__list li::marker {
  content: none;
  display: none;
}
.atoll-toc .atoll-toc__list a {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  padding: 11px 26px 11px 0;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.6;
  transition: color .2s, background-color .2s;
}
.atoll-toc .atoll-toc__list a::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-top: 1.5px solid var(--toc-accent);
  border-right: 1.5px solid var(--toc-accent);
  transform: translateY(-50%) rotate(45deg);
}
.atoll-toc .atoll-toc__list a:hover {
  color: var(--color-primary-hover);
  background-color: color-mix(in srgb, var(--color-primary) 6%, transparent);
}
.atoll-toc .atoll-toc__num {
  flex: 0 0 auto;
  min-width: 1.5em;
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: 24px;
  line-height: 1;
  color: var(--toc-accent);
}
.atoll-toc .atoll-toc__text {
  flex: 1;
}
@media (max-width: 767px) {
  .atoll-toc { padding: 18px 16px 10px; }
  .atoll-toc .atoll-toc__title { font-size: 22px; }
  .atoll-toc .atoll-toc__num { font-size: 20px; }
  .atoll-toc .atoll-toc__list a { gap: 12px; font-size: 13.5px; }
}
