/* ============================================================
  2026年ベストバイ ウィジェット
  /assets/css/best-buy-2026.css
============================================================ */

/* ---- コンテンツ末版: PC/SP 両方で表示 ---- */
.bb-content-end-widget {
  display: block;
  margin: 2rem 0;
}

/* ---- サイドバー版: margin ---- */
.bb-sidebar-widget {
  margin-bottom: 1.2em;
}

/* ---- ラッパー共通 ---- */
.bb-bestbuy-wrap {
  background: #09111d;
  border: 1px solid rgba(8, 145, 178, 0.3);
  border-radius: 10px;
  padding: 14px;
  overflow: hidden;
}

/* ---- ヘッダー ---- */
.bb-bestbuy__header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 12px;
  padding: 0 0 10px;
  border-bottom: 1px solid rgba(8, 145, 178, 0.22);
}
.bb-bestbuy__year-badge {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #22d3ee;
  background: rgba(8, 145, 178, 0.16);
  border: 1px solid rgba(8, 145, 178, 0.42);
  padding: 2px 7px;
  border-radius: 4px;
  line-height: 1.6;
  flex-shrink: 0;
}
.bb-bestbuy__label {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #e2e8f0;
  text-transform: uppercase;
  line-height: 1.3;
}

/* ---- リスト（共通: 縦積み） ---- */
.bb-bestbuy__list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

/* ---- カード（共通） ---- */
.bb-bestbuy__item {
  position: relative;
  display: flex;
  gap: 10px;
  background: #0d1b2a;
  border: 1px solid rgba(8, 145, 178, 0.18);
  border-radius: 8px;
  padding: 9px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.bb-bestbuy__item:hover {
  border-color: rgba(8, 145, 178, 0.5);
  transform: translateY(-2px);
}

/* ---- カード全体リンク（オーバーレイ） ---- */
.bb-bestbuy__card-link {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 8px;
}

/* ---- 画像・ボタンはオーバーレイより前面に ---- */
.bb-bestbuy__img-link,
.bb-bestbuy__btn {
  position: relative;
  z-index: 3;
}
.bb-bestbuy__info {
  position: relative;
}

/* ---- 製品画像 ---- */
.bb-bestbuy__img-link {
  flex-shrink: 0;
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.97);
  line-height: 0;
}
.bb-bestbuy__img-link img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px;
  transition: opacity 0.2s;
}
.bb-bestbuy__img-link:hover img { opacity: 0.87; }

/* ---- テキスト情報 ---- */
.bb-bestbuy__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* ---- バッジ ---- */
.bb-bestbuy__badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.57rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 1px 6px;
  border-radius: 3px;
  line-height: 1.65;
}
.bb-bestbuy__badge--best {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.35);
}
.bb-bestbuy__badge--standard {
  background: rgba(8, 145, 178, 0.14);
  color: #22d3ee;
  border: 1px solid rgba(8, 145, 178, 0.38);
}

/* ---- 製品名 ---- */
.bb-bestbuy__name {
  font-size: 0.78rem;
  font-weight: 700;
  color: #e2e8f0;
  margin: 0;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- 価格 ---- */
.bb-bestbuy__price {
  font-size: 0.68rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.4;
}

/* ---- Amazonボタン ---- */
.bb-bestbuy__btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.67rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 5px;
  background: linear-gradient(135deg, #ff9900, #e67e00);
  color: #fff;
  text-decoration: none;
  margin-top: auto;
  align-self: flex-start;
  white-space: nowrap;
  line-height: 1.5;
  transition: opacity 0.18s ease;
}
.bb-bestbuy__btn:hover { opacity: 0.86; color: #fff; }

/* ---- SP版（共通）: カードを少し大きく ---- */
.bb-content-end-widget .bb-bestbuy__item {
  padding: 11px;
}
.bb-content-end-widget .bb-bestbuy__img-link {
  width: 76px;
  height: 76px;
}
.bb-content-end-widget .bb-bestbuy__name {
  font-size: 0.85rem;
  white-space: normal;
}
.bb-content-end-widget .bb-bestbuy__price {
  font-size: 0.74rem;
  color: #dee5ef;
}

/* ---- PC版（≥1201px）: コンテンツ末を3カラムグリッドに ---- */
@media (min-width: 1201px) {
  .bb-content-end-widget .bb-bestbuy__list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  /* 縦積みレイアウトに切り替え */
  .bb-content-end-widget .bb-bestbuy__item {
    flex-direction: column;
    padding: 12px;
    gap: 8px;
  }
  .bb-content-end-widget .bb-bestbuy__img-link {
    width: 100%;
    height: 150px;
    border-radius: 8px;
  }
  .bb-content-end-widget .bb-bestbuy__img-link img {
    padding: 10px;
  }
  .bb-content-end-widget .bb-bestbuy__name {
    font-size: 0.88rem;
    white-space: normal;
  }
  .bb-content-end-widget .bb-bestbuy__price {
    font-size: 0.78rem;
  }
  .bb-content-end-widget .bb-bestbuy__btn {
    width: 100%;
    justify-content: center;
    font-size: 0.72rem;
    padding: 6px 10px;
  }
}
