/* =======================================
   書籍詳細ページ固有スタイル (detail.html)
   ======================================= */


body {
  background-color: #f0f5f5;
    padding: unset;
}

body::before {
  content: "";
  position: unse;
  inset: 0;
  border: unset;
}

main {
  background-image: unset;
}

.txt_bold {
  font-weight: 600;
}

.detail-page {
  padding-top: 20px;
  /* ヘッダー下のスペース */
}

.detail-container {
  max-width: 920px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  /* 主要コンテンツを横並びにする */
  gap: 40px;
  justify-content: center;
}

/* --- 1. 書影と販売エリア (左側) --- */
.media-purchase-area {
  display: flex;
}

/* 書影ビューア */
.book-media-viewer {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  width: 325px;
  flex-direction: column;
}


.book-cover-btn-area {
  margin: 0 auto 30px;
}

.book-cover-area {
  gap: 20px;
}

.btn-box {
  margin-top: 10px;
}

.main-cover {
  flex: 1;
  text-align: center;
  justify-content: center;
  border: 1px solid var(--color-black1);
  width: 325px;
  height: auto;
  display: flex;
}

.main-cover img {
  max-width: 100%;
  height: auto;
}

.book_text {
  justify-content: center;
}

.sales-link {
  font-size: 1rem;
  height: 50px;
  max-width: 220px;
  width: 48%;
}

.sales-links {
  margin-top: unset;
}

/* 1. ボタン本体の基本設定 */
.arrow-nav {
  position: relative;
  display: block;
  /* ボタンの幅と高さを制御しやすくする */
  border: none;
  border-radius: 50%;
  /* 丸いボタンにする場合 */
  cursor: pointer;
  color: var(--color-black2);
}

.arrow-nav.next-arrow::after {
  content: "";
  position: absolute;
  top: 50%;
  right: auto;
  /* 元のrightをリセット */
  left: 50%;
  /* 中央に配置 */
  width: 30px;
  height: 30px;
  border-top: 4px solid currentColor;
  border-right: 4px solid currentColor;
  transform: translate(0%, -50%) rotate(45deg);
}

.arrow-nav.prev-arrow::after {
  content: "";
  position: absolute;
  top: 50%;
  right: auto;
  /* 元のrightをリセット */
  left: 50%;
  /* 中央に配置 */
  width: 30px;
  height: 30px;
  border-top: 4px solid currentColor;
  border-right: 4px solid currentColor;
  transform: translate(-100%, -50%) rotate(-135deg);
}


/* サムネイル */
.tmb-list {
  display: flex;
  gap: 8px;
  margin-bottom: 30px;
  overflow-x: auto;
  justify-content: center;
}

.tmb {
  width: 45px;
  height: 45px;
  cursor: pointer;
  border: 1px solid var(--color-black1);
  overflow: hidden;
  position: relative;
}


.tmb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* ← トリミングなしで全体を収める */
  object-position: center;
  /* 中央揃え */
  display: block;
}

.tmb img .active {
  border-color: var(--color-yellow);
  /* 選択中のサムネイル */
}

/* 販売リンク */
.purchase-links-list {
  display: grid;
  gap: 15px;
  margin-bottom: 20px;
}

/* SNSシェア */
.detail-social-share {
  text-align: center;
  margin-top: 20px;
}

.detail-social-share p {
  margin-bottom: 10px;
}

.share-text {
  font-size: 1.5rem;
  gap: 6px;
  font-weight: 600;
  margin: 10px 0;
}

.share-button img {
  width: 50px;
  height: 50px;
}

.button-purchase {
  height: 70px;
  width: 320px;
}

/* --- 2. 情報・コンテンツエリア (右側) --- */
.info-content-area {
  flex: 1;
  max-width: 970px;
  margin: auto;
}

.book-title-sab {
  color: var(--color-black1);
  text-align: center;
  font-size: 1.5rem;
  font-weight: 500;
}

.book-title-main {
  font-size: 2.5rem;
  color: var(--color-black1);
  text-align: center;
  font-weight: 900;
}


.book-author {
  margin: 15px 0;
  color: var(--color-black2);
  text-align: center;
  font-size: 0.85rem;
}

/* 書籍スペックリスト */
.book-spec-list {
  display: grid;
  grid-template-columns: repeat(2, auto);
  justify-content: center;
  gap: 0.5rem 6rem;
  margin: 1rem auto;
  max-width: 800px;
  text-align: left;
  font-size: 0.825rem;
}

.spec-item {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  white-space: nowrap;
  color: var(--color-black1);
}

.spec-item dt {
  color: var(--color-red);
  font-weight: bold;
}

.spec-item dd {
  margin: 0;
  font-feature-settings: "palt" 1;
}

/* ナビゲーションボタン */
.volume-nav-buttons {
  display: flex;
  margin: 40px auto 20px;
  gap: 30px;
  justify-content: center;
}

.button-nav {
  position: relative;
  padding: 10px 15px;
  text-align: center;
  width: 200px;
  transition: background-color 0.3s;
  background-color: var(--color-red);
  color: var(--color-white);
  clip-path: polygon(6% 0%, 94% 0%, 100% 50%, 94% 100%, 6% 100%, 0% 50%);
}

.button-nav:hover {
  background-color: color-mix(in srgb, var(--color-red) 80%, white 20%);
}

/* ▶ 右矢印 */
.button-nav.next::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 15px;
  /* ← ボタン右端からの距離 */
  width: 12px;
  height: 12px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
  /* 縦中央で右向き */
}

/* ◀ 左矢印 */
.button-nav.prev::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 15px;
  width: 12px;
  height: 12px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: translateY(-50%) rotate(-45deg);
}

.btn_gry {
  color: var(--color-white);
  background-color: var(--color-gray);
}

.btn_gry:hover {
  background-color: var(--color-gray);
}

.tab-container {
  width: 100%;
  max-width: 940px;
  display: block;
  margin: auto;
}

/* タブ切り替え */

.tab-content-area {
  background-color: var(--color-white);
  width: 100%;
  margin: auto;
  z-index: 5;
  position: relative;
  border-radius: 5px;
}


.tabs {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: auto;
  width: 95%;
}

.tab-button {
  padding: 10px 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -8px;
  background-color: var(--color-yellow);
  border-radius: 5px;
  z-index: 0;
  color: var(--color-black2);
  width: 45%;
  transition: filter 0.2s ease;
  /* ← なめらかに */
}

.tab-button:hover {
  filter: brightness(1.1);
}

.tab-button.active {
  font-weight: bold;
  background-color: var(--color-white);
}


.tab-content {
  width: 100%;
  margin: auto;
  display: none;
  padding: 20px;
  border-radius: 8px;
  line-height: 1.75;
  text-align: justify;
  font-weight: 500;
}


.tab-content p+p {
  margin: 10px 0;
}


.tab-content.active {
  display: block;
}

.tab-content h3 {
  margin-bottom: 15px;
}

.tab-content ul {
  list-style-type: none;
  padding-left: 10px;
}


/* 最下部トップへボタン */
.back-to-top-container {
  text-align: center;
  padding: 50px 20px;
}

.button-large {
  width: 280px;
  height: 60px;
  border: none;
  color: var(--color-white);
  background-color: var(--color-red);
  font-size: 1.5rem;
  display: flex;
  font-weight: bold;
  margin: auto;
  text-align: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
  align-items: center;
  clip-path: polygon(6% 0%, 94% 0%, 100% 50%, 94% 100%, 6% 100%, 0% 50%);
}

.button-large:hover {
  background-color: color-mix(in srgb, var(--color-red) 70%, white 20%);
}

/* クリック中の押し込み感を少し強くしたい場合（任意） */
.button-large:active {
  transform: translateY(3px);
}



/* --- 追従ボタン（詳細ページ用）--- */

.back-to-list-button {
  background-color: var(--color-black1);
  width: 100px;
  height: 100px;
  font-size: 1.25rem;
  margin-top: 5px;
  color: var(--color-white);
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, transform 0.1s ease;
  clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
  /* line-height は使わないので指定しない */
}

.back-to-list-button:hover {
  background-color: color-mix(in srgb, var(--color-black1) 80%, white 20%);
  transform: translateY(2px);
}

.back-to-list-button:active {
  transform: translateY(3px);
}





/* ===== ボタングリッド（3列×複数行） ===== */
.btn-grid {
  display: flex;
  gap: 12px;
  margin: 12px 0 24px;
  flex-wrap: wrap;
  text-align: center;
  justify-content: center;
  max-width: 940px;
  margin: auto;
}

/* ボタン共通 */
.site-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  /* 画像とテキストの間隔 */
  width: 280px;
  height: 65px;
  background: var(--color-white);
  color: var(--color-black1);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  transition: filter .2s ease, transform .08s ease;
  overflow: hidden;
  box-sizing: border-box;
}

.site-btn img {
  height: 24px;
  /* ← ロゴの高さ（揃える） */
  width: auto;
  object-fit: contain;
  /* 比率保持 */
  vertical-align: middle;
}

.site-btn:hover {
  filter: brightness(1.07);
}

.site-btn:active {
  transform: translateY(1px);
}

.js-float-sub {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.js-float-sub.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}


/* =======================================
   レスポンシブ対応 (Max-width: 767px)
   ======================================= */
@media (max-width: 767px) {

  .detail-page {
    padding-top: 0px;
  }

  .sales-link {
    width: 46%;
    font-size: 0.8125rem;
    height: 40px;
  }

  .btn-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    /* SPは2列 */
  }

  .book_text {
    margin: 10px 0 0 0;
  }

  .tab-content {
    border-radius: unset;
  }

  .detail-container {
    flex-direction: column;
    gap: 5px;
    padding: 0px;
  }

  /* 書影と販売エリア */

  .tmb {
    width: 35px;
    height: 35px;

  }

  .media-purchase-area {
    flex: auto;
    width: 100%;
    /* 幅を画面いっぱいに */
    order: 1;
    /* SPで上に配置 */
  }

  .book-media-viewer {
    width: 50%;
    margin: 20px auto;
  }

  .main-cover {
    width: 100%;
    flex: 1;
    height: unset;
  }

  .tmb-list {
    justify-content: center;
    margin-bottom: unset;
  }

  .purchase-links-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .button-purchase {
    width: 47%;
    font-size: 0.825rem;
    margin: unset;
    height: 50px;
  }

  .share-text {
    font-size: 1rem;
    margin: unset;
  }

  .volume-nav-buttons {
    gap: 10px;
    margin: 20px auto 20px;
  }

  .button-nav {
    font-size: 0.825rem;
    padding: 8px 15px;
  }

  .social-icons {
    gap: 5px;
  }

  .share-button img {
    width: 40px;
    height: 40px;
  }

  .info-separator {
    width: 95%;
  }

  .social-share-buttons {
    text-align: center;
    display: flex;
    margin: auto;
    justify-content: center;
    gap: 10px;
    padding: 5px 0;
  }


  .book-title-sab {
    font-size: 0.75rem;
  }

  .site-btn {
    width: 48%;
    height: 50px;
  }

  /* 情報・コンテンツエリア */
  .info-content-area {
    flex: auto;
    order: 2;
  }

  .book-title-main {
    font-size: 1.25rem;
    line-height: 1.25;
  }

  .book-spec-list {
    gap: 5px 15px;
    font-size: 0.75rem;
    margin: 10px auto;
  }

  .button-large {
    width: 240px;
    height: 50px;
    font-size: 1.25rem;
  }

  .to-top-button {
    width: 55px;
    height: 55px;
  }

  .book-author {
    font-size: 0.75rem;
    margin: 0 0 10px 0;
  }

  /* タブ */
  .tab-button {
    flex: 1;
    /* タブを均等幅に */
    text-align: center;
  }

  .tab-content ul {
    padding-left: 5px;
  }

  .js-float-sub {
    right: 10px;
    bottom: 10px;
  }

  .back-to-list-button {
    width: 80px;
    height: 80px;
    font-size: 1rem;
  }

  .tab-content.active {
    font-size: 0.825rem;
  }

  .button-nav.next::after {
    width: 10px;
    height: 10px;
  }

  .button-nav.prev::before {
    width: 10px;
    height: 10px;
  }

  .tab-button {
    font-size: 0.875rem;
  }
  .sales-link img {
    height: 34px;
  }
      .button-detail {
        width: 180px;
      }

}