/* お知らせ詳細ページ */
.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;
}
.news-embed-products .product-card {
  font-size: 0.85rem;
  display: grid;
  grid-template-columns: 40% 1fr;
  grid-template-rows: 1fr auto;
  row-gap: 0;
  border-radius: 12px;
  border: 1px solid #e8e8e8;
  background: #fff;
  overflow: hidden;
  text-decoration: none;
  max-width: 280px;
}
.news-embed-products .product-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.news-embed-products .product-card__img-link {
  grid-row: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}
.news-embed-products .product-card__image {
  width: 100%;
  object-fit: contain;
}
.news-embed-products .product-card__body {
  display: flex;
  flex-direction: column;
  padding: 14px 10px 0 4px;
  box-sizing: border-box;
}
.news-embed-products .product-card__brand {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 0;
  line-height: 1.2;
}
.news-embed-products .product-card__name {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0;
}
.news-embed-products .product-card__name--long { font-size: 0.9rem; }
.news-embed-products .product-card__soldout-badge--inline {
  display: inline-block;
  background: #999;
  color: #fff;
  font-size: 0.5rem;
  font-weight: 600;
  border-radius: 3px;
  width: fit-content;
  padding: 1px 6px;
  margin: 2px 0 0 0;
}
.news-embed-products .product-card__bottom {
  grid-column: 2;
  padding: 0 10px 8px 4px;
}
/* 価格アライメントを左寄せに上書き */
.news-embed-products .product-card__discount-wrap {
  align-items: flex-start !important;
  gap: 0 !important;
}
.news-embed-products .product-card__discount-wrap > div {
  margin: 0;
  line-height: 1.3;
}
.news-embed-products .product-card__original-price {
  font-size: 0.78rem !important;
  text-align: right !important;
  align-self: stretch !important;
}
.news-embed-products .product-card__discount-badge {
  font-size: 0.65rem !important;
  padding: 1px 6px !important;
  background: #e8a300 !important;
  border-radius: 3px !important;
}
.news-embed-products .product-card__price-row {
  justify-content: flex-end !important;
  text-align: right !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
  align-self: stretch !important;
}
.news-embed-products .product-card__price-incl {
  font-size: 1.4rem !important;
  font-weight: 400 !important;
  line-height: 1 !important;
}
/* 品切れ：画像オーバーレイを非表示、インラインバッジを表示 */
.news-embed-products .product-card__soldout-badge { display: none; }
.news-embed-products .product-card--soldout .product-card__image { opacity: 1; }
/* 非表示要素 */
.news-embed-products .product-tags { display: none; }
.news-embed-products .product-card__campaign-badge { display: none; }
.news-embed-products .product-card__point-info { 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; }
.news-embed-products .product-card {
  position: relative;
}
.news-embed-products .btn-favorite {
  position: absolute;
  left: 4px;
  bottom: 4px;
  top: auto !important;
  right: auto !important;
}
/* カラム内の商品カード調整 */
.news-col .news-embed-products { max-width: none; }
.news-col .product-card { overflow: hidden; }
.news-col .product-card__name { font-size: 0.85rem; }
.news-col .product-card__name--long { font-size: 0.75rem; }
.news-col .product-card__price-incl { font-size: 1.4rem !important; }
/* コンテナ幅が狭い場合：画像比率を縮小 */
@container (max-width: 400px) {
  .product-card {
    grid-template-columns: 35% 1fr !important;
  }
  .product-card__img-link {
    padding: 8px !important;
    margin: 8px !important;
  }
  .product-card__body { padding: 12px 12px 4px 4px !important; }
  .product-card__bottom { padding: 4px 12px 12px 4px !important; }
  .product-card__name { font-size: 0.9rem !important; }
  .product-card__price-incl { font-size: 1.2rem !important; }
}
/* コンテナ幅が非常に狭い場合に縦並びに切り替え */
@container (max-width: 280px) {
  .product-card {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto auto !important;
  }
  .product-card__img-link {
    grid-row: auto !important;
    max-height: 200px;
  }
  .product-card__body { padding: 8px 12px 4px !important; }
  .product-card__bottom { grid-column: 1 !important; padding: 4px 12px 12px !important; }
}

/* タグのスタイル（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; }
