/* ベースフォントサイズの設定 */
html {
  font-size: 16px; /* デフォルトのフォントサイズ */
}

/* グローバルなリセット */
body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  font-size: 16px; /* デフォルト文字サイズ */
  line-height: 1.5;
  background-color: #f9f9f9; /* 背景色 */
  color: #333; /* テキストカラー */
}

/* コンテナクラス */
.container {
  max-width: 1200px; /* 最大幅を設定 */
  margin: 0 auto; /* 中央寄せ */
  padding: 0 15px; /* 横の余白を追加 */
}

/* --- ヘッダーの基本スタイル --- */
header {
  display: flex;
  align-items: center;
  justify-content: center; /* ロゴを中央に配置 */
  background-color: #1b6c7b; /* 背景色を#1b6c7bに設定 */
  height: 100px; /* 通常時の高さ */
  padding: 0 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* 軽い影を追加 */
  position: sticky; /* スクロール時に固定 */
  top: 0;
  z-index: 1000; /* 他要素より前面に表示 */
}

header img {
  max-height: 80%; /* ロゴの高さをヘッダー内に収める */
  max-width: 100%;
}

/* --- スマホ用スタイル --- */
@media (max-width: 768px) {
  header {
    height: 50px; /* スマホ時の高さ */
    padding: 0 10px; /* スマホ時の余白を調整 */
  }

  header img {
    max-height: 50px; /* ロゴサイズを縮小 */
  }
}





/* --- 全体のスタイル --- */
.book-detail-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
}

/* パンくずリストの基本スタイル */
.breadcrumb {
  font-size: 14px;
  margin-bottom: 20px;
  color: #659D9D; /* テキストカラー */
}

.breadcrumb a {
  color: #659D9D; /* リンクカラー */
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline; /* ホバー時のアンダーライン */
}

.breadcrumb span {
  color: #1B6C7B; /* 現在のページ部分は異なる色で表示 */
  font-weight: bold;
}


/* 本の詳細情報 */


.book-detail {
  display: flex;
  flex-direction: row; /* 横並び配置 */
  align-items: flex-start; /* 上揃え */
  gap: 15px; /* 画像とテキストの間隔 */
  padding: 20px;
  border: 1px solid #ddd; /* セクション全体の枠線 */
  border-radius: 5px;
  background-color: #fff; /* 背景色を白に設定 */
}

.book-image {
  flex: 0 0 40%; /* 左カラムの幅を40%に設定 */
  max-width: 40%;
  display: flex;
  align-items: center; /* 縦方向の中央揃え */
  justify-content: center;
}

.book-image img {
  max-width: 100%;
  height: auto;
  border: 1px solid #ddd; /* 画像に枠線を追加 */
  border-radius: 5px;
}

.book-info {
  flex: 1; /* 右カラムが残りのスペースを占有 */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px; /* 各要素の間隔 */
}

.book-info h1 {
  font-size: 18px; /* タイトルのサイズ */
  font-weight: bold;
  color: #333;
  margin: 0;
  line-height: 1.4;
}
.book-info .sub-title {
  font-size: 14px;
  color: #666;
  margin: 0;
}

.book-info .author {
  font-size: 14px;
  color: #444;
  margin: 0;
}
.book-info .price {
  font-size: 16px;
  color: #333;
  margin: 0;
}

.book-info .price .price-value {
  font-size: 24px; /* 金額を強調 */
  font-weight: bold;
  color: #d9534f; /* 赤色で目立たせる */
}

/*  書籍購入方法  */

.purchase {
  height: auto; /* 高さをコンテンツに合わせる */
  display: flex;
  flex-direction: column; /* 縦方向に要素を配置 */
  justify-content: center;
  align-items: center;
  background-color: #fff; /* 背景色は任意で変更可能 */
}

.purchase_note {
  margin-bottom: 10px; /* ボックスとの余白 */
  font-size: 14px; /* フォントサイズを調整 */
  color: #333; /* テキストカラー */
  text-align: center; /* テキストを中央揃え */
}

.purchase_box {
  background: #fff;
  width: 130px;
  box-sizing: border-box;
  border: 1px solid #E32B36;
  border-radius: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px; /* 内側余白を追加 */
}

.purchase_box a {
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
}

.purchase_box img {
  display: block;
  max-width: 100%;
}

/* -- */

/* --- スマホ用スタイル --- */
@media (max-width: 768px) {
  /* 全体の余白と幅の調整 */
  .book-detail-page {
      padding: 10px;
  }

  /* パンくずリスト */
  .breadcrumb {
      font-size: 12px;
      margin-bottom: 15px;
  }

  /* 本の詳細情報 */
  .book-detail {
      flex-direction: column; /* 縦並びに変更 */
      align-items: center; /* 中央揃え */
      text-align: center; /* テキストを中央揃え */
  }

  .book-image {
      max-width: 80%; /* 画像の幅を調整 */
      margin-bottom: 15px;
  }

  .book-info {
      align-items: center; /* テキストを中央揃え */
  }

  .book-info h1 {
      font-size: 16px; /* タイトルを少し縮小 */
  }

  .book-info .price .price-value {
      font-size: 20px; /* 金額も調整 */
  }

  .purchase_note {
    font-size: 16px; /* スマホ時にフォントサイズを大きく */
  }

  .purchase_box {
    width: 220px; /* ボックスの幅を広げる */
    padding: 20px; /* 内側余白を調整 */
  }

  .purchase_image {
    max-width: 80%; /* 画像サイズを調整 */
  }

  /* --- */
}
