@charset "UTF-8";

/* ===================================
   サイドバーレイアウト
   デスクトップのみ：main + sidebar 横並び
   モバイル：サイドバー非表示
   =================================== */

/* コンテナをFlexboxに（サイドバーがあるページ用） */
.content-wrapper {
  display: flex;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* メインコンテンツ：サイドバーがある場合 */
.content-wrapper main {
  flex: 1;
  min-width: 0; /* flexアイテムのオーバーフロー防止 */
  max-width: none;
}

/* サイドバー（336px固定） */
.sidebar {
  flex: 0 0 336px;
  align-self: flex-start;
}

.sidebar-section {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

/* バナー枠 */
.sidebar-banner {
  margin-bottom: 1.5rem;
  text-align: center;
}

.sidebar-banner img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.sidebar-title {
  font-size: 1.1rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid #f0f0f0;
}

/* 天気ウィジェット */
.sidebar-weather-main {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.sidebar-weather-icon {
  font-size: 1.6rem;
  color: #666;
}

.sidebar-weather-name {
  font-size: 1rem;
  color: #333;
}

.sidebar-weather-temp {
  font-size: 1.5rem;
  color: #333;
}

.sidebar-weather-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.sidebar-weather-table td {
  padding: 0.2rem 0;
  color: #555;
}

.sidebar-weather-table td:first-child {
  color: #555;
  width: 60%;
}

.sidebar-weather-time {
  font-size: 0.85rem;
  color: #888;
  margin-top: 0.6rem;
}

/* 為替ウィジェット */
.sidebar-exchange-rate {
  font-size: 1.3rem;
  color: #333;
  margin-bottom: 0.3rem;
}

.sidebar-exchange-label {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 0.3rem;
}

.sidebar-exchange-date {
  font-size: 0.85rem;
  color: #888;
}

/* メニューリスト */
.sidebar-category-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-category-list li {
  border-bottom: 1px solid #f0f0f0;
}

.sidebar-category-list li:last-child {
  border-bottom: none;
}

.sidebar-category-list li a {
  display: block;
  padding: 0.7rem 0;
  color: #0066cc;
  text-decoration: none;
  font-size: 1.0rem;
  transition: color 0.2s;
}

.sidebar-category-list li a:hover {
  color: #1557b0;
}

/* 書籍カード */
.sidebar-book-card {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 0.8rem;
  margin-bottom: 0.8rem;
}

.sidebar-book-card:last-child {
  margin-bottom: 0;
}

.sidebar-book-inner {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 0.6rem;
}

.sidebar-book-img-link {
  flex-shrink: 0;
}

.sidebar-book-img-link img {
  display: block;
}

.sidebar-book-meta {
  flex: 1;
  min-width: 0;
}

.sidebar-book-title {
  display: block;
  font-size: 0.82rem;
  color: #333;
  text-decoration: none;
  line-height: 1.4;
  margin-bottom: 0.4rem;
}

.sidebar-book-title:hover {
  color: #0066cc;
}

.sidebar-book-price {
  font-size: 1.1rem;
  color: #F43E43;
  font-weight: bold;
}

.sidebar-book-buttons {
  display: flex;
  gap: 0.4rem;
}

.sidebar-book-buttons a {
  flex: 1;
  display: block;
  text-align: center;
  padding: 0.3rem 0;
  font-size: 0.78rem;
  text-decoration: none;
  border-radius: 3px;
  background-color: #BFA466;
  color: #fff;
  font-weight: bold;
}

.sidebar-book-buttons a:hover {
  opacity: 0.8;
}

/* ===================================
   レスポンシブ：モバイルではサイドバー非表示
   =================================== */
@media (max-width: 1024px) {
  .content-wrapper {
    flex-direction: column;
    padding: 0;
  }

  .sidebar {
    display: none;
  }

  .content-wrapper main {
    flex: none;
    max-width: none;
    padding: 1rem;
  }
}

@media (max-width: 768px) {
  .content-wrapper main {
    padding: 0.8rem;
    margin: 0;
  }
}
