/*
 * nicobay-journal-offer.css — 記事の店へのボタンを置き換える枠と、BF の告知の札（inc/journal-bf-offer.php）。
 *
 * 2026-11-26 小田さんの直し: トンマナを整える（太い黒枠・黒地に黄の札・赤い価格をやめる）／
 * 割引後の価格は緑／商品の写真は機種ページと同じフレーバー画像／「詳しくみる」とカードの間を空ける／
 * 全記事に BF の告知の札（黒地・黄色の文字・角の丸い形）。
 *
 * 色は本店の緑 #138808 と線 #E3E0DB（nicobay-journal.css の --nbj-*）。BF の印だけ黒 #0A0A0A と黄 #FFE600。
 * 本文の中に入るので、本文の a・ul・li・p の既定（下線・字下げ・余白）をここで打ち消す。
 */

.nbj-content .nbj-offer {
  --nbo-ink: var(--nbj-text, #1a1a1a);
  --nbo-sub: var(--nbj-sub, #5a5a5a);
  --nbo-line: var(--nbj-line, #e3e0db);
  --nbo-brand: var(--nbj-brand, #138808);
  --nbo-tint: var(--nbj-tint, rgba(19, 136, 8, 0.09));
  --nbo-black: #0a0a0a;
  --nbo-yellow: #ffe600;
  flex: 1 1 100%;
  width: 100%;
  margin: 3.2rem 0;
  overflow: hidden;
  border: 1px solid var(--nbo-line);
  border-radius: 12px;
  background: #fff;
  color: var(--nbo-ink);
  text-align: left;
}

/* 本文の段落の余白を消す。:where で強さを上げないので、下の個別の余白（見出し・詳しくみる）がそのまま効く */
.nbj-content .nbj-offer :where(p) {
  margin: 0;
}

/* ---- 帯（BF の間だけ） ---- */
.nbj-content .nbj-offer__band {
  display: grid;
  gap: 0.4rem;
  padding: 1.4rem 1.6rem 1.5rem;
  background: var(--nbo-black);
  color: #fff;
}

.nbj-content .nbj-offer__band-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.2rem 1rem;
}

.nbj-content .nbj-offer__bf {
  color: var(--nbo-yellow);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.nbj-content .nbj-offer__until {
  color: rgba(255, 255, 255, 0.65);
  font-size: 1.2rem;
  font-weight: 600;
}

.nbj-content .nbj-offer__band-main {
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.5;
}

/* 「全品20%OFF ＋」と「この記事から1点につき$5OFF」は、それぞれのまとまりで折り返す */
.nbj-content .nbj-offer__seg {
  display: inline-block;
  margin-right: 0.4em;
}

.nbj-content .nbj-offer__band-main em {
  margin: 0 0.1em;
  color: var(--nbo-yellow);
  font-size: 1.15em;
  font-style: normal;
  font-weight: 800;
}

.nbj-content .nbj-offer__band-note {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.1rem;
  line-height: 1.5;
}

/* ---- 中身 ---- */
.nbj-content .nbj-offer__body {
  padding: 1.8rem 1.6rem 2rem;
}

.nbj-content .nbj-offer__title {
  margin-bottom: 1.4rem;
  color: var(--nbo-ink);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.5;
}

.nbj-content .nbj-offer__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 1.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nbj-content .nbj-offer__grid--n3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem 0.8rem;
}

.nbj-content .nbj-offer__item {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nbj-content .nbj-offer__item::marker {
  content: none;
}

.nbj-content .nbj-offer__media {
  display: block;
  aspect-ratio: 1;
  max-width: 100%;
  overflow: hidden;
  border-radius: 8px;
  background: var(--nbj-surface, #f5f5f5);
  text-decoration: none;
}

.nbj-content .nbj-offer__img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 0;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.nbj-content .nbj-offer__media:hover .nbj-offer__img {
  transform: scale(1.03);
}

.nbj-content .nbj-offer__info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  min-width: 0;
}

.nbj-content .nbj-offer__gear {
  color: var(--nbo-sub);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
}

.nbj-content .nbj-offer__name {
  display: -webkit-box;
  overflow: hidden;
  color: var(--nbo-ink);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.45;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.nbj-content .nbj-offer__name:hover {
  color: var(--nbo-ink);
  text-decoration: underline;
}

.nbj-content .nbj-offer__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.6rem;
  color: var(--nbo-brand);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.4;
}

.nbj-content .nbj-offer__price del {
  color: var(--nbo-sub);
  font-size: 1.15rem;
  font-weight: 500;
}

/* 割引後の価格は緑（サイトの赤い価格の上書き） */
.nbj-content .nbj-offer__price ins,
.nbj-content .nbj-offer__price ins .woocommerce-Price-amount {
  color: var(--nbo-brand);
  text-decoration: none;
}

/* 記事限定の価格。NICOBAY の「線だけの丸い札」 */
.nbj-content .nbj-offer__deal {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-top: 0.2rem;
  padding: 0.2rem 0.9rem;
  border: 1px solid var(--nbo-brand);
  border-radius: 999px;
  background: var(--nbo-tint);
  color: var(--nbo-brand);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
}

/* 記事限定の価格を出すカードは、BF の価格（緑）にも緑の打ち消し線を引く（2026-11-26 小田さん） */
.nbj-content .nbj-offer__item--deal .nbj-offer__price ins,
.nbj-content .nbj-offer__item--deal .nbj-offer__price ins .woocommerce-Price-amount {
  text-decoration: line-through;
  text-decoration-color: var(--nbo-brand);
  text-decoration-thickness: 0.12rem;
}

.nbj-content .nbj-offer__deal b,
.nbj-content .nbj-offer__deal .woocommerce-Price-amount {
  color: var(--nbo-brand);
  font-size: 1.35rem;
  font-weight: 800;
}

/* カートのボタンはカードの下にそろえる */
.nbj-content .nbj-offer__cart {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 4rem;
  margin-top: auto;
  padding: 0.6rem 0.4rem;
  border-radius: 999px;
  background: var(--nbo-brand);
  color: var(--nb-color-on-brand, #fff);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
}

.nbj-content .nbj-offer__cart:hover {
  color: var(--nb-color-on-brand, #fff);
  text-decoration: none;
  filter: var(--nb-hover-filter, brightness(0.9));
}

/* 3枚並び（BF のおすすめ3機種）はスマホで3列にするので、文字と余白を詰める */
.nbj-content .nbj-offer__grid--n3 .nbj-offer__name {
  font-size: 1.2rem;
}

.nbj-content .nbj-offer__grid--n3 .nbj-offer__price {
  font-size: 1.3rem;
}

.nbj-content .nbj-offer__grid--n3 .nbj-offer__price del {
  font-size: 1.05rem;
}

.nbj-content .nbj-offer__grid--n3 .nbj-offer__deal {
  padding: 0.1rem 0.6rem;
  font-size: 1rem;
}

.nbj-content .nbj-offer__grid--n3 .nbj-offer__deal b,
.nbj-content .nbj-offer__grid--n3 .nbj-offer__deal .woocommerce-Price-amount {
  font-size: 1.15rem;
}

.nbj-content .nbj-offer__grid--n3 .nbj-offer__cart {
  min-height: 3.6rem;
  font-size: 1.15rem;
}

/* ---- 詳しくみる・もとのボタン ---- */
.nbj-content .nbj-offer__more {
  margin-top: 2.8rem;
  text-align: center;
}

.nbj-content .nbj-offer__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24rem;
  max-width: 100%;
  min-height: 4.6rem;
  padding: 0.8rem 2.4rem;
  border: 2px solid var(--nbo-brand);
  border-radius: 999px;
  background: #fff;
  color: var(--nbo-brand);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}

.nbj-content .nbj-offer__button:hover {
  background: var(--nbo-brand);
  color: var(--nb-color-on-brand, #fff);
  text-decoration: none;
}

/* カードが無い枠（帯ともとのボタンだけ）は、ボタンを本店の緑のボタンにする */
.nbj-content .nbj-offer__body > .nbj-offer__more:first-child {
  margin-top: 0;
}

.nbj-content .nbj-offer__body > .nbj-offer__more:first-child .nbj-offer__button {
  background: var(--nbo-brand);
  color: var(--nb-color-on-brand, #fff);
}

.nbj-content .nbj-offer__orig {
  margin-top: 1.2rem;
  font-size: 1.25rem;
  text-align: center;
}

.nbj-content .nbj-offer__orig a {
  color: var(--nbo-sub);
}

/* ---- 単品のカード（いつものカードに帯を付けたもの）。価格と %OFF も緑にそろえる ---- */
.nbj-content .nbj-offer--single .nbj-product {
  margin: 0;
  padding: 0;
  border: 0;
}

.nbj-content .nbj-offer--single .nbj-product__price ins,
.nbj-content .nbj-offer--single .nbj-product__price ins .woocommerce-Price-amount {
  color: var(--nbo-brand);
}

.nbj-content .nbj-offer--single .nbj-product__off {
  background: var(--nbo-brand);
}

@media screen and (min-width: 750px) {
  .nbj-content .nbj-offer__band {
    padding: 1.6rem 2.4rem 1.7rem;
  }

  .nbj-content .nbj-offer__band-main {
    font-size: 1.9rem;
  }

  .nbj-content .nbj-offer__band-note {
    font-size: 1.2rem;
  }

  .nbj-content .nbj-offer__body {
    padding: 2.4rem 2.4rem 2.6rem;
  }

  .nbj-content .nbj-offer__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2.4rem 1.6rem;
  }

  .nbj-content .nbj-offer__grid--n3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nbj-content .nbj-offer__grid--n3 .nbj-offer__name {
    font-size: 1.3rem;
  }

  .nbj-content .nbj-offer__grid--n3 .nbj-offer__price {
    font-size: 1.5rem;
  }

  .nbj-content .nbj-offer__grid--n3 .nbj-offer__cart {
    min-height: 4rem;
    font-size: 1.3rem;
  }

  .nbj-content .nbj-offer__more {
    margin-top: 3.2rem;
  }
}

/* ===========================================================================
 * BF の告知の札（全記事のページ下。黒地・黄色の文字・角の丸い形。押すと BF の NEWS へ）
 * スマホは右下の「上へ戻る」（45px・右から20px）を避けて右を空ける。カートドロワーより下に重ねる。
 * ========================================================================= */
.nbj-bf-pop {
  position: fixed;
  z-index: 999;
  right: calc(76px + env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  left: calc(12px + env(safe-area-inset-left, 0px));
  display: flex;
  align-items: center;
  border-radius: 999px;
  background: #0a0a0a;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  color: #ffe600;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.nbj-bf-pop.is-in {
  opacity: 1;
  transform: none;
}

.nbj-bf-pop[hidden] {
  display: none;
}

.nbj-bf-pop__link {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 0.4rem;
  min-width: 0;
  padding: 0.9rem 0.2rem 1rem 1.6rem;
  color: #ffe600;
  text-decoration: none;
}

.nbj-bf-pop__link:hover,
.nbj-bf-pop__link:focus-visible {
  color: #ffe600;
  text-decoration: none;
}

.nbj-bf-pop__top {
  grid-column: 1;
  overflow: hidden;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nbj-bf-pop__until {
  margin-left: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.8;
}

.nbj-bf-pop__until--pc {
  display: none;
}

.nbj-bf-pop__main {
  grid-column: 1;
  overflow: hidden;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nbj-bf-pop__arrow {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.nbj-bf-pop__close {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  margin-right: 0.7rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 230, 0, 0.14);
  color: #ffe600;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.nbj-bf-pop__close:focus-visible,
.nbj-bf-pop__link:focus-visible {
  outline: 2px solid #ffe600;
  outline-offset: 2px;
}

@media screen and (min-width: 750px) {
  .nbj-bf-pop {
    right: auto;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    width: max-content;
    max-width: min(560px, calc(100vw - 180px));
    transform: translate(-50%, 12px);
  }

  .nbj-bf-pop.is-in {
    transform: translate(-50%, 0);
  }

  .nbj-bf-pop__link {
    column-gap: 0.8rem;
    padding: 1.1rem 0.6rem 1.2rem 2.6rem;
  }

  .nbj-bf-pop__top {
    font-size: 1.15rem;
    letter-spacing: 0.1em;
  }

  .nbj-bf-pop__until--sp {
    display: none;
  }

  .nbj-bf-pop__until--pc {
    display: inline;
  }

  .nbj-bf-pop__main {
    font-size: 1.6rem;
  }

  .nbj-bf-pop__arrow {
    font-size: 2.2rem;
  }

  .nbj-bf-pop__close {
    width: 3rem;
    height: 3rem;
    margin-right: 0.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nbj-bf-pop {
    transition: none;
  }
}
