/* =========================================================
   カテゴリ一覧ページ専用 CSS
   （レイアウトは従来のあなたの環境に完全準拠）
   ========================================================= */

/* --- 全体レイアウト --- */
main.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

/* --- タイトル --- */
.page-title {
  font-size: 24px;
  margin: 16px 0 24px;
  color: var(--fg);
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}

/* ---------------------------------------------------------
   ■ コントロールエリア（あなたの従来 UI を忠実再現）
   --------------------------------------------------------- */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.control-group {
  display: flex;
  flex-direction: column;
  min-width: 160px;
}

.control-group label {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 4px;
}

.control-group select {
  padding: 6px 8px;
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}

/* ---------------------------------------------------------
   ■ 画像グリッド（従来のまま）
   --------------------------------------------------------- */
.image-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* JS で上書き */
  gap: 16px;
}

.card {
  border: 1px solid var(--line);
  padding: 10px;
  border-radius: 10px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow .15s ease;
}

.card:hover {
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.thumb-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border-radius: 8px;
  height: 140px;
  overflow: hidden;
}

.thumb {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.meta {
  padding: 0 4px;
}

.title {
  font-size: 15px;
  margin: 0;
  line-height: 1.4;
}

.title a {
  color: var(--fg);
  text-decoration: none;
}

.title a:hover {
  text-decoration: underline;
}

/* ---------------------------------------------------------
   ■ ページネーション（従来のまま）
   --------------------------------------------------------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 24px 0 16px;
}

.page-btn {
  padding: 6px 12px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
}

.page-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.pages {
  display: flex;
  gap: 4px;
}

.page-number {
  padding: 6px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}

.page-number.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ---------------------------------------------------------
   ■ ステータス
   --------------------------------------------------------- */
.status {
  margin-top: 12px;
  color: var(--muted);
}

/* ---------------------------------------------------------
   ▼ 特記事項
   base.css のヘッダーと競合しないよう margin/padding 等は控えめ
   --------------------------------------------------------- */
