/* ============================================================
   css/list.css — レビュー一覧ページ専用スタイル（Magazine テーマ）
   review.php と同じデザイン言語：
     - 直角エッジ（border-radius:0）
     - 1.5px solid var(--text) の太めボーダー
     - シャドウなしのフラット
     - 太字（font-weight:900）の見出し
     - 赤アクセント（var(--accent)）の TAG とホバー
   base.css の後に読み込む。
   ============================================================ */

/* ===========================
   ページ全体ラッパー
   =========================== */
.list-wrap {}

/* ===========================
   ブロック見出し（TAG + タイトル + 横線）
   review.php の .r2-block-head と同じ Magazine スタイル
   =========================== */
.list-block-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.list-block-tag {
  font-size: var(--fs-xs);
  font-weight: 900;
  letter-spacing: .14em;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  padding: 3px 8px;
  background: transparent;
  flex-shrink: 0;
}

.list-block-title {
  font-size: var(--fs-base);
  font-weight: 900;
  letter-spacing: .04em;
  margin: 0;
  color: var(--text);
}

.list-block-line {
  flex: 1;
  height: 1.5px;
  background: var(--text);
  opacity: .85;
}

/* ===========================
   カテゴリ選択ボタン（ダーク帯ヘッダー上に配置）
   =========================== */
.lc-cat-picker-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: transparent;
  border: 1.5px solid #e4e6ed;
  border-radius: 0;
  color: #e4e6ed;
  font-size: var(--fs-sm);
  font-weight: 900;
  cursor: pointer;
  transition: .15s;
  white-space: nowrap;
  letter-spacing: .04em;
}

.lc-cat-picker-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ===========================
   カテゴリ選択モーダル
   =========================== */
.lc-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 900;
}

.lc-modal-overlay.open {
  display: block;
}

.lc-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.97);
  width: min(920px, 94vw);
  max-height: 88vh;
  background: var(--bg2);
  border: 1.5px solid var(--text);
  border-radius: 0;
  z-index: 901;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
  overflow: hidden;
  box-sizing: border-box;
}

.lc-modal.open {
  display: flex;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.lc-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1.5px solid var(--text);
  flex-shrink: 0;
  background: var(--bg);
}

.lc-modal-title {
  font-size: var(--fs-base);
  font-weight: 900;
  letter-spacing: .04em;
}

.lc-modal-close {
  background: var(--bg2);
  border: 1.5px solid var(--text);
  border-radius: 0;
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  padding: 2px 10px;
  font-weight: 900;
  transition: .15s;
}

.lc-modal-close:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.lc-modal-body {
  overflow-y: auto;
  padding: 14px 20px 18px;
  flex: 1;
  scrollbar-gutter: stable;
  box-sizing: border-box;
}

/* すべて表示リンク */
.lc-modal-all {
  display: block;
  padding: 10px 14px;
  border: 1.5px solid var(--text);
  border-radius: 0;
  font-weight: 900;
  color: var(--text);
  background: var(--bg2);
  margin-bottom: 12px;
  letter-spacing: .02em;
  transition: .15s;
}

.lc-modal-all:hover,
.lc-modal-all.on {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* 親カテゴリ行（常時展開・トグル無し） */
.lc-modal-group {
  margin-bottom: 8px;
  min-width: 0;
}

.lc-modal-parent-link {
  display: block;
  padding: 9px 14px;
  background: var(--bg2);
  border: 1.5px solid var(--text);
  font-size: var(--fs-sm);
  font-weight: 900;
  color: var(--text);
  text-align: left;
  letter-spacing: .02em;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box;
  transition: .15s;
}

.lc-modal-parent-link:hover,
.lc-modal-parent-link.on {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* 子カテゴリ：親行の真下にぴったり接続（border 重複を margin-top:-1.5px で吸収） */
.lc-modal-children {
  display: flex;
  padding: 10px 12px;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--bg);
  border: 1.5px solid var(--text);
  margin-top: -1.5px;
}

.lc-modal-child {
  display: inline-block;
  padding: 5px 12px;
  background: var(--bg2);
  border: 1.5px solid var(--text);
  border-radius: 0;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  transition: .15s;
}

.lc-modal-child:hover,
.lc-modal-child.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* モバイル：画面下部から出るシート風 */
@media (max-width: 640px) {
  .lc-modal {
    top: auto;
    left: 0;
    bottom: 0;
    transform: translateY(20px);
    width: 100%;
    max-height: 92vh;
    border-radius: 0;
  }

  .lc-modal.open {
    transform: translateY(0);
  }
}

/* ===========================
   ページヘッダー（ダーク帯：直角・太字。サイト共通ヘッダーの延長として使う）
   =========================== */
.list-page-head {
  background: #191c22;
  border-bottom: 1.5px solid #252930;
  padding: 22px 0;
}

.list-page-head-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.list-page-head h1 {
  font-size: var(--fs-xl);
  font-weight: 900;
  letter-spacing: -.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #e4e6ed;
  margin: 0;
}

@media (min-width: 901px) {
  .list-page-head h1 {
    font-size: var(--fs-2xl);
  }
}

/* PC/モバイル出し分け */
.lc-head-pc {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lc-head-mobile {
  display: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 60vw;
}

@media (max-width: 900px) {
  .lc-head-pc {
    display: none;
  }

  .lc-head-mobile {
    display: inline-block;
  }
}

/* ===========================
   2カラム本体
   =========================== */
.list-body {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 28px 60px;
  display: grid;
  grid-template-columns: 1fr 300px;
  grid-template-areas: "main sidebar";
  gap: 28px;
  align-items: start;
}

@media (max-width: 900px) {
  .list-body {
    grid-template-columns: 1fr;
    grid-template-areas: "main";
  }
  .list-sidebar {
    display: none;
    grid-area: auto;
  }
}

/* ===========================
   右：カテゴリサイドバー（Magazine 化）
   =========================== */
.list-sidebar {
  grid-area: sidebar;
}

.list-main {
  grid-area: main;
}

.list-sidebar-inner {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  position: sticky;
  top: 76px;
  box-shadow: none;
  box-sizing: border-box;
}

.list-sidebar-inner .list-block-head {
  margin-bottom: 10px;
}

/* 2 つ目以降のブロック見出し（メーカー → カテゴリ）の間隔 */
.list-sidebar-inner .list-block-head-next {
  margin-top: 26px;
}

/* メーカー絞り込み専用ボタン
   - 件数 <em> を持たないので左寄せで読みやすく
   - 「不明（ノーブランド）」など括弧入りの長文に備えて改行可 */
.list-brand-btn {
  justify-content: flex-start;
  white-space: normal;
  line-height: 1.4;
}
.list-brand-btn span {
  display: block;
}

/* review.php の r2-cat-row / r2-cat-row-child と同一意匠で統一 */
.list-cat-all,
.list-cat-parent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg2);
  border: 1.5px solid var(--text);
  border-top: none;
  text-decoration: none;
  color: var(--text);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: .02em;
  transition: .15s;
}

.list-cat-all {
  border-top: 1.5px solid var(--text);
}

.list-cat-all span,
.list-cat-parent em {
  font-style: normal;
  font-size: var(--fs-xs);
  color: var(--accent);
  font-weight: 900;
  flex-shrink: 0;
}

.list-cat-all:hover,
.list-cat-parent:hover {
  background: var(--bg);
  color: var(--accent);
}

.list-cat-all.on,
.list-cat-parent.on {
  background: var(--accent);
  color: #fff;
}

.list-cat-all.on span,
.list-cat-parent.on em {
  color: #fff;
}

.list-cat-parent.on:hover {
  background: var(--accent);
  color: #fff;
}

/* 現在カテゴリの親（親自体は未選択でも、子が選択中）に左赤ライン */
.list-cat-parent.open:not(.on) {
  box-shadow: inset 3px 0 0 var(--accent);
}

/* 子カテゴリ（自動展開のみ・JS トグル無し） */
.list-cat-child {
  padding-left: 28px;
  font-size: var(--fs-xs);
  font-weight: 600;
  background: var(--bg);
  position: relative;
}

.list-cat-child::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 8px;
  height: 1.5px;
  background: var(--text);
  opacity: .55;
}

.list-cat-child.on::before {
  background: #fff;
  opacity: 1;
}

/* ===========================
   右：メインエリア（Magazine：枠なしフラット）
   =========================== */
.list-main {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  min-width: 0;
}

/* 並び替えバー：block-head を流用し、右側にチップを配置 */
.list-sort-bar {
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.list-sort-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.list-sort-chip {
  padding: 5px 14px;
  border-radius: 0;
  font-size: var(--fs-sm);
  font-weight: 900;
  border: 1.5px solid var(--text);
  background: var(--bg2);
  color: var(--text);
  text-decoration: none;
  transition: .15s;
  white-space: nowrap;
  letter-spacing: .02em;
}

.list-sort-chip:hover {
  background: var(--bg);
  color: var(--accent);
  border-color: var(--accent);
}

.list-sort-chip.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ===========================
   横型カード一覧（Magazine 化）
   =========================== */
.list-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lc {
  display: flex;
  align-items: stretch;
  background: var(--bg2);
  border: 1.5px solid var(--text);
  border-radius: 0;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: none;
  transition: .15s;
  min-height: 140px;
}

.lc:hover {
  border-color: var(--accent);
  background: var(--bg);
}

.lc:hover .lc-title {
  color: var(--accent);
}

/* 左：サムネイル */
.lc-thumb {
  position: relative;
  width: 250px;
  aspect-ratio: 1.618 / 1;
  flex-shrink: 0;
  background: var(--bg);
  overflow: hidden;
  align-self: center;
  border-right: 1.5px solid var(--text);
}

.lc-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.lc:hover .lc-thumb img {
  transform: scale(1.04);
}

.lc-nophoto {
  width: 100%;
  height: 100%;
  min-height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  color: var(--text2);
  opacity: .4;
}

/* スコアバッジ（サムネイル右下） */
.lc-score {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(14, 16, 20, 0.78);
  color: var(--star);
  font-size: var(--fs-sm);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 0;
  pointer-events: none;
  letter-spacing: 1px;
}

/* 右：情報エリア */
.lc-body {
  flex: 1;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  align-self: stretch;
}

/* メタ行（カテゴリバッジ + 製品名 + 時刻） */
.lc-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 26px;
}

/* カテゴリバッジ（Magazine：赤線 + 白地 + 赤文字。block-tag に揃える） */
.lc-cat {
  display: inline-flex;
  align-items: center;
  font-size: var(--fs-xs);
  font-weight: 900;
  background: transparent;
  border: 1.5px solid var(--accent);
  border-radius: 0;
  padding: 2px 8px;
  color: var(--accent);
  white-space: nowrap;
  line-height: 1.3;
  letter-spacing: .08em;
}

.lc-time {
  font-size: var(--fs-xs);
  color: var(--text2);
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
  opacity: .85;
}

.lc-product-badge {
  display: inline-flex;
  align-items: center;
  font-size: var(--fs-xs);
  font-weight: 700;
  background: var(--bg);
  border: 1.5px solid var(--text);
  border-radius: 0;
  padding: 2px 8px;
  color: var(--text);
  white-space: nowrap;
  line-height: 1.3;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lc-product-badge.lc-empty {
  visibility: hidden;
}

/* トップページ（縦積みカード）：カテゴリを画像左上に絶対配置 + 境界を底辺に */
.idx-col .lc-cat {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  background: var(--bg2);
}
.idx-col .lc-thumb {
  border-right: none;
  border-bottom: 1.5px solid var(--text);
}

/* タイトル */
.lc-title {
  font-size: var(--fs-lg2);
  font-weight: 900;
  line-height: 1.4;
  letter-spacing: .01em;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.4em * 2);
  transition: color .15s;
}

/* スニペット */
.lc-snippet {
  font-size: var(--fs-sm);
  color: var(--text2);
  line-height: 1.55;
  display: none;
  margin: -4px 0 0;
  opacity: .85;
}

/* フッター（著者 + いいね） */
.lc-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1.5px solid var(--text);
  font-size: var(--fs-xs);
  flex-wrap: wrap;
}

.lc-author {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.lc-ava {
  width: 22px;
  height: 22px;
  border-radius: 0;
  object-fit: cover;
  border: 1.5px solid var(--text);
  flex-shrink: 0;
}

.lc-ava-def {
  width: 22px;
  height: 22px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1.5px solid var(--text);
  font-size: var(--fs-sm);
  color: var(--text2);
  flex-shrink: 0;
}

.lc-likes {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-weight: 900;
  white-space: nowrap;
  margin-left: auto;
}

/* ===========================
   空状態
   =========================== */
.list-empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--text);
  background: var(--bg2);
  border: 1.5px solid var(--text);
  border-radius: 0;
}

.list-empty p {
  font-size: var(--fs-base);
  line-height: 1.7;
  font-weight: 700;
}

/* ===========================
   パンくずリスト（Magazine 化）
   =========================== */
.lc-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  font-size: var(--fs-sm);
  font-weight: 700;
  margin-bottom: 18px;
}

.lc-breadcrumb a {
  color: var(--text);
  text-decoration: none;
  transition: color .15s;
}

.lc-breadcrumb a:hover {
  color: var(--accent);
}

.lc-breadcrumb-sep {
  color: var(--text2);
  padding: 0 4px;
  opacity: .6;
}

.lc-breadcrumb-cur {
  color: var(--accent);
  font-weight: 900;
}

/* ===========================
   カテゴリリンクグリッド（パンくず下）
   PC : auto-fit で折り返し
   モバイル : 1 行横スクロール
   =========================== */
.list-cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 0 0 18px;
}

.list-cat-grid-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--bg2);
  color: var(--text);
  border: 1.5px solid var(--text);
  border-radius: 0;
  padding: 12px 10px;
  font-size: var(--fs-sm);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: .02em;
  text-decoration: none;
  transition: .18s;
  min-height: 44px;
  min-width: 0;          /* grid item の min-width:auto を解除して ellipsis を効かせる */
  overflow: hidden;
}

.list-cat-grid-label {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-cat-grid-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg);
}

.list-cat-grid-btn.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  cursor: default;
}

.list-cat-grid-dot { color: inherit; }

@media (max-width: 700px) {
  .list-cat-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
    margin: 0 0 14px;
    padding-bottom: 6px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }
  .list-cat-grid::-webkit-scrollbar { height: 6px; }
  .list-cat-grid::-webkit-scrollbar-thumb { background: var(--text4, #999); border-radius: 3px; }
  .list-cat-grid-btn {
    flex-shrink: 0;
    min-width: 130px;
    padding: 10px 18px;
    min-height: 42px;
    scroll-snap-align: start;
  }
}

/* ===========================
   ページネーション（Magazine：シャープ、太ボーダー）
   =========================== */
.list-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.list-pager-btn,
.list-pager-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 0;
  font-size: var(--fs-sm);
  font-weight: 900;
  text-decoration: none;
  background: var(--bg2);
  border: 1.5px solid var(--text);
  color: var(--text);
  transition: .15s;
  letter-spacing: .02em;
}

.list-pager-btn:hover,
.list-pager-num:hover {
  background: var(--bg);
  border-color: var(--accent);
  color: var(--accent);
}

.list-pager-num.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  pointer-events: none;
}

/* ===========================
   スマホ対応
   =========================== */

.list-hamburger {
  display: none;
}

.list-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 199;
}

.list-overlay.show {
  display: block;
}

@media (max-width: 640px) {
  .list-page-head-inner {
    padding: 0 14px;
  }

  .list-body {
    padding: 18px 14px 60px;
    gap: 18px;
  }

  /* ハンバーガーボタン（左下固定、Magazine：直角＋黒線） */
  .list-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 52px;
    height: 52px;
    padding: 10px;
    background: var(--accent);
    border: 1.5px solid var(--text);
    border-radius: 0;
    cursor: pointer;
    position: fixed;
    bottom: 20px;
    left: 16px;
    z-index: 210;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    transition: left 0.28s ease;
  }

  .list-hamburger span {
    display: block;
    height: 2px;
    background: #fff;
    border-radius: 0;
    transition: transform 0.25s ease, opacity 0.2s ease;
  }

  .list-hamburger.active {
    left: calc(280px + 16px);
  }

  .list-hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .list-hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .list-hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* ドロワー */
  .list-sidebar {
    display: block !important;
    position: fixed;
    top: 0;
    left: -290px;
    width: 280px;
    height: 100dvh;
    overflow-y: auto;
    z-index: 200;
    background: var(--bg2);
    border-right: 1.5px solid var(--text);
    transition: left 0.28s ease;
    padding: 14px;
    box-sizing: border-box;
  }

  .list-sidebar.open {
    left: 0;
  }

  .list-sidebar-inner {
    border-radius: 0;
    border: none;
    box-shadow: none;
    position: static;
    padding: 0;
  }

  /* カードを縦積みに */
  .lc {
    flex-direction: column;
    align-items: stretch;
  }

  .lc-thumb {
    width: 100%;
    aspect-ratio: 1.618 / 1;
    align-self: auto;
    border-right: none;
    border-bottom: 1.5px solid var(--text);
  }

  .lc-body {
    padding: 12px 14px;
  }

  .lc-snippet {
    display: -webkit-box;
  }

  .lc-title {
    font-size: var(--fs-lg);
    -webkit-line-clamp: 2;
  }
}
