/* 書籍カテゴリタブのスタイル */
.book-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 25px;
  justify-content: center;
}

.category-tab {
  padding: 8px 15px;
  background-color: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  text-decoration: none;
  color: #333;
}

.category-tab:hover {
  background-color: #e8e8e8;
}

.category-tab.active {
  background-color: #4a86e8;
  color: white;
  border-color: #4a86e8;
}

/* カテゴリバッジのスタイル - 位置を右上に変更 */
.book-category-badge {
  position: absolute;
  top: 0;
  right: 0; /* 左から右に変更 */
  background-color: rgba(0,0,0,0.5); /* 少し透明度を上げて薄く */
  color: white;
  padding: 3px 8px;
  font-size: 0.7rem;
  border-radius: 0 0 0 5px; /* 角丸の位置を調整 */
}

/* 書籍コンテンツのスタイル調整 */
.book-content {
  position: relative;
}

/* 書籍アイテムのスタイル */
.book-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.book-item {
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.book-content {
  padding: 15px;
  background-color: #f9f9f9;
}

.book-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 8px;
  line-height: 1.3;
  color: #333;
  padding-right: 10px; /* タイトルが右側のバッジと被らないようにパディングを追加 */
}

.book-description {
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 15px;
  color: #444;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

/* アマゾンリンクのスタイルは amazon-button-unified.css で上書きされます */
/* .book-link {
  display: inline-block;
  padding: 8px 15px;
  background-color: #4285f4;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

.book-link:hover {
  background-color: #3367d6;
} */

.all-books-link {
  text-align: center;
  margin-top: 30px;
}

.view-all-books {
  display: inline-block;
  padding: 10px 20px;
  background-color: #f5f5f5;
  color: #333;
  text-decoration: none;
  border-radius: 4px;
  font-size: 16px;
  transition: all 0.3s ease;
}

.view-all-books:hover {
  background-color: #e0e0e0;
}

/* スマホ向け調整 */
@media (max-width: 767px) {
  .book-categories {
    overflow-x: auto;
    padding-bottom: 5px;
  }
  
  .category-tab {
    white-space: nowrap;
  }
  
  .book-list {
    grid-template-columns: 1fr;
  }
}

/* 非表示項目 - デフォルトでは全て表示 */
.book-item.hidden {
  display: none;
}

.loading-message {
  text-align: center;
  padding: 20px;
  color: #666;
}

.amazon-disclaimer {
  font-size: 12px;
  color: #666;
  margin-top: 30px;
  text-align: center;
}