/* =======================================
   書籍詳細ページ固有スタイル (detail.html)
   ======================================= */


body{

    background-color: #f0f5f5;
}

main{
  background-image: unset;
}

.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;
    justify-content: space-between;
    margin-bottom: 15px;
    width: 350px;
}
.main-cover {
    flex: 1;
    text-align: center;
    justify-content: center;
    border: 1px solid var(--color-black1);
    width: 290px;
    height: auto;
    display: flex;
}
.main-cover img {
    max-width: 100%;
    height: auto;
}

.book_text{
    justify-content: center;
}

.sales-link{
    border-radius: 30px;
    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: 60px;
    height: 60px;
}

.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.125rem;
    font-weight: 500;
}
.book-title-main {
    font-size: 2.5rem;
    color: var(--color-black1);
    margin-bottom: 10px;
    text-align: center;
    font-weight: 900;
}


.book-author {
    margin-bottom: 20px;
    color: var(--color-black2);
    text-align: center;
    font-size: 0.85rem;
}
.info-separator {
    border: 0;
    height: 1px;
    background-color: var(--color-black2);
    margin: 20px auto;
    width: 95%;
}

/* 書籍スペックリスト */
.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-blue);
  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;
    border: 1px solid var(--color-black2);
    border-radius: 35px;
    text-align: center;
            width: 200px;
    transition: background-color 0.3s;
    background-color: #e6f0ff;
    color: var(--color-black2);
}
.button-nav:hover {
    background-color: white;
}

/* ▶ 右矢印 */
.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: #aaa;
    background-color: var(--color-white);
}

.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: 1.1em;
    border-bottom: 2px solid transparent;
    margin-bottom: -8px;
    background-color: #fffab4;
    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;
}
 
.tab-content.active {
    display: block;
}
.tab-content h3 {
    margin-bottom: 15px;
}
.tab-content ul {
    list-style-type: none;
    padding-left: 20px;
}



.custom-button:hover {
    background-color: #3b56c4; /* ホバー時の色を少し明るく */
}

/* 最下部トップへボタン */
.back-to-top-container {
    text-align: center;
    padding: 50px 20px;
}
.button-large {
    width: 280px;
    height: 60px;
    border: none;
    border-radius: 40px;
    color: var(--color-white);
    background-color: var(--color-blue);
    font-size: 1.5rem;
    display: flex;
    font-weight: bold;
    margin: auto;
    text-align: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s;
    align-items: center;
}


/* --- 追従ボタン（詳細ページ用）--- */

.back-to-list-button {
	background-color: var(--color-red);
	width: 80px;
	height: 80px;
	line-height: 50px;
	border-radius: 40px;
	font-size: 1em;
	margin-top: 5px;
	color: var(--color-white);
	font-weight: bold;
	text-align: center;
	cursor: pointer;
	transition: filter 0.25s ease;
}


/* ホバー時に少し明度を落とす（＝薄く見える） */
.back-to-list-button:hover {
  filter: brightness(0.85);
}


.to-top-button {
    width: 80px;
    height: 80px;
}



/* ===== ボタングリッド（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: 48%;
        font-size: 0.8125rem;
       height: 40px;
    }

.btn-grid{
    grid-template-columns: repeat(2, minmax(0,1fr)); /* SPは2列 */
  }
.book_text{
    margin: 20px 0 0 0;
}

.tab-content {
    border-radius: unset;
}

    .detail-container {
        flex-direction: column; /* 縦並びにする */
        gap: 5px;
        padding: 10px;
    }

    /* 書影と販売エリア */

    .tmb {
    width: 35px;
    height: 35px;

    }
    .media-purchase-area {
        flex: auto;
        width: 100%; /* 幅を画面いっぱいに */
        order: 1; /* SPで上に配置 */
    }
    .book-media-viewer {
        width: 60%;
        margin: 20px auto;
    }
    .main-cover {
        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;
    width: 95%;
    }
.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: 20px 0 20px;
}


.book-title-sab {
    font-size: 0.875rem;
}

.site-btn {
    width: 48%;
        height: 50px;
}

    /* 情報・コンテンツエリア */
    .info-content-area {
        flex: auto;
        order: 2; 
    }
    .book-title-main {
        font-size: 1.5rem;
    }

    .book-spec-list {
    gap: 5px 15px;
    }
    .button-large {
        width: 240px;
        height: 50px;
        font-size: 1.25rem;
    }
    .to-top-button {
        width: 70px;
        height: 60px;
    }

    .book-author {
        font-size: 0.75rem;
    }

   /* タブ */
    .tab-button {
        flex: 1; /* タブを均等幅に */
        text-align: center;
    }
    

}