/* カテゴリトップ（一覧の1ページ目）専用スタイル。style.css・catalog.css の後に読み込む。
   2026-11-11 家電トップから導入。「家電買取」で来た人に、買取サービスとして先に説明する並び。
   ・ヒーローはトップと同じ全面黄色
   ・セクションは型番ページと同じ、白と淡い青の帯の交互＋丸枠の線画アイコンの見出し
   ・丸＝読むもの（特徴・流れ・確認ポイント）、四角＝押せるもの（種類カード・型番の行）
   中身は 型番ページ生成/category_top.py が組み立てる。2ページ目以降は従来の一覧のまま。 */

:root {
  --tint: #F1F8FC;
  --ink: #111;
}

/* ===== 帯と見出し ===== */
.ct-band { padding: 46px 20px 52px; scroll-margin-top: 64px; }
.ct-band--tint { background: var(--tint); }
.ct-wrap { max-width: 1040px; margin: 0 auto; }
.ct-wrap--narrow { max-width: 820px; }
.ct-head { text-align: center; }
.ct-head__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--blue);
  border-radius: 9999px;
  background: radial-gradient(circle, #E1F1FA 0 21px, #fff 21.5px);
  color: var(--blue-heading);
}
.ct-head__icon svg { width: 25px; height: 25px; }
.ct-head h2 {
  margin-top: 8px;
  color: var(--blue-heading);
  font-size: clamp(22px, 3.5vw, 28px);
  font-weight: 700;
  line-height: 1.5;
}
.ct-head p { margin-top: 6px; color: var(--gray); font-size: 14px; }
.ct-note { margin-top: 14px; color: var(--gray); font-size: 12px; line-height: 1.7; }
.ct-more { margin-top: 22px; text-align: center; font-size: 14px; font-weight: 700; }
.ct-more a { color: var(--blue); }

/* ===== ヒーロー（全面黄色） ===== */
.ct-hero { background: var(--yellow); color: #111; padding: 30px 20px 40px; }
.ct-hero__grid { max-width: 1080px; margin: 0 auto; display: grid; gap: 28px; }
.ct-hero__eyebrow { display: inline-block; padding: 4px 12px; background: #111; color: var(--yellow); font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.ct-hero__title { margin-top: 12px; font-size: clamp(46px, 8.4vw, 88px); font-weight: 900; line-height: 1.1; letter-spacing: .02em; }
/* 見出し（「パソコン買取」「オーディオ買取」など）は、文字数が多くても1行に収める。
   左の欄の幅を文字数で割った大きさを上限にする。文字数は category_top.py が --ct-chars に入れる。 */
.ct-hero__text { container-type: inline-size; }
@supports (width: 1cqi) {
  .ct-hero__title { font-size: min(clamp(46px, 8.4vw, 88px), calc(100cqi / var(--ct-chars, 4) / 1.04)); }
}
/* 分類一覧の見出し（「電子レンジ・オーブン買取」など）：1行に収めず、区切りごとに折り返して、ほかの分類と同じ大きさで見せる。
   スマホだけでなく、パソコン幅でも同じ（2026-11-12、土居さんの指示。1行に収めると、名前の長い分類だけ文字が小さくなるため）。
   区切りは category_top.py が <span class="ct-hero__part"> で入れ、いちばん長い区切りの文字数を --ct-chars-part に入れる。
   区切りが左の欄に収まらないときだけ、その区切りが収まる大きさまで縮める。 */
.ct-hero__part { display: inline-block; }
@supports (width: 1cqi) {
  .ct-hero__title.ct-hero__title--parts { font-size: min(clamp(46px, 8.4vw, 88px), calc(100cqi / var(--ct-chars-part, 4) / 1.04)); }
}
.ct-hero__title small { display: block; margin-top: 10px; font-size: clamp(18px, 2.7vw, 27px); line-height: 1.5; letter-spacing: 0; }
.ct-search { position: relative; width: 100%; max-width: 520px; margin: 20px 0 0; }
.ct-search svg {
  position: absolute;
  top: 50%;
  left: 16px;
  width: 20px;
  height: 20px;
  color: var(--gray-light);
  transform: translateY(-50%);
  pointer-events: none;
}
.ct-search input {
  width: 100%;
  min-height: 58px;
  padding: 0 16px 0 46px;
  border: 0;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(8, 52, 84, .25);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.ct-search input::placeholder { color: var(--gray-light); font-weight: 400; }
.ct-search .search-results { color: var(--text); text-align: left; }
.ct-search a.search-result-item { color: inherit; text-decoration: none; }
.ct-hero .ct-search { max-width: none; margin: 22px 0 0; }
.ct-hero .ct-search input { min-height: 60px; border: 3px solid #111; border-radius: 0; box-shadow: none; }
.ct-hero__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  margin-top: 10px;
  /* 名前の長い分類（掃除機・ロボット掃除機など）は、スマホで文言が2行になる。中央にそろえ、端に付かないようにする。 */
  padding: 6px 8px;
  background: #111;
  color: var(--yellow);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
}
.ct-checks { display: grid; gap: 8px; margin-top: 18px; list-style: none; }
.ct-checks li { position: relative; padding-left: 28px; font-size: 14px; font-weight: 700; line-height: 1.6; }
.ct-checks li small { display: block; font-size: 11.5px; font-weight: 400; }
.ct-checks li::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 0;
  width: 19px;
  height: 19px;
  background: #111;
  clip-path: polygon(14% 52%, 0 66%, 40% 100%, 100% 22%, 86% 10%, 39% 70%);
}
.ct-photo { position: relative; margin: 0 8px 8px 0; }
.ct-photo img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border: 3px solid #111; box-shadow: 8px 8px 0 #111; }
/* ヒーローの写真が製品写真（白い背景）のとき：切り取らずに全体を見せ、下の札と重ならない余白を取る。 */
.ct-photo--product img { object-fit: contain; background: #fff; padding: 18px 18px 70px; }
.ct-photo__tag {
  position: absolute;
  left: -3px;
  bottom: 18px;
  padding: 8px 14px 8px 12px;
  background: #111;
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
}
.ct-photo__tag b { color: var(--yellow); font-size: 24px; font-weight: 900; margin-right: 3px; }
@media (min-width: 900px) {
  .ct-hero { padding: 52px 24px 60px; }
  .ct-hero__grid { grid-template-columns: 1.05fr .95fr; align-items: center; gap: 48px; }
}

/* ===== 特徴・確認ポイント（読むもの＝丸） ===== */
.ct-points { display: grid; gap: 28px 24px; margin-top: 30px; }
@media (min-width: 768px) {
  .ct-points { grid-template-columns: repeat(3, 1fr); }
}
.ct-point { text-align: center; }
.ct-point__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  border: 1px solid var(--blue);
  border-radius: 9999px;
  background: radial-gradient(circle, #E1F1FA 0 39px, #fff 39.5px);
  color: var(--blue-heading);
}
.ct-point__icon svg { width: 40px; height: 40px; }
.ct-point h3 { margin-top: 12px; font-size: 17px; font-weight: 700; line-height: 1.5; }
.ct-point p { margin-top: 6px; color: var(--gray); font-size: 13.5px; line-height: 1.8; text-align: left; }
.ct-point a { display: block; margin-top: 8px; color: var(--blue); font-size: 13px; font-weight: 700; }

.ct-groups { display: grid; gap: 22px; margin-top: 28px; }
.ct-group h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--blue-heading);
  font-size: 16px;
  font-weight: 700;
}
.ct-group h3::after { content: ""; flex: 1; height: 1px; background: rgba(0, 144, 216, .34); }
/* 中間ページ（PCパーツ一覧など）がある束は、見出しの右端にその一覧へのリンクを置く。 */
.ct-group h3 a { order: 3; flex: none; color: var(--blue-heading); font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.ct-group h3 a:hover { text-decoration: underline; }

/* ===== 買取できる種類（写真つきのカード。束ごとに並べる） ===== */
.ct-kinds { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 12px; }
@media (min-width: 700px) {
  .ct-kinds { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1000px) {
  .ct-kinds { grid-template-columns: repeat(6, 1fr); }
}
.ct-kind {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0, 144, 216, .34);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  box-shadow: 0 5px 16px rgba(18, 70, 104, .06);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.ct-kind::after {
  content: "›";
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 9999px;
  background: var(--blue);
  color: #fff;
  font-size: 17px;
  line-height: 1;
}
.ct-kind__photo { display: flex; align-items: center; justify-content: center; height: 96px; padding: 12px 12px 4px; }
.ct-kind__photo img { width: auto; max-width: 100%; height: 100%; object-fit: contain; }
.ct-kind__photo svg { width: 48px; height: 48px; color: #9CC7E2; }
.ct-kind__body { display: flex; flex: 1; flex-direction: column; padding: 8px 12px 12px; border-top: 1px solid var(--border); }
.ct-kind__name { font-size: 13.5px; font-weight: 700; line-height: 1.4; }
.ct-kind__count { margin-top: 5px; color: var(--gray); font-size: 12px; }
.ct-kind__price { color: var(--red); font-size: 14px; font-weight: 700; }
.ct-kind__price small { color: var(--gray); font-size: 10.5px; font-weight: 400; margin-right: 3px; }
@media (hover: hover) {
  .ct-kind:hover, .ct-row:hover { border-color: var(--blue); box-shadow: 0 10px 24px rgba(18, 70, 104, .12); transform: translateY(-2px); }
}
/* カードが2枚しかないカテゴリ（ドローン・工具）用：横長の大きなカード。設定の wideCards で付く。 */
@media (min-width: 700px) {
  .ct-kinds.ct-kinds--wide { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .ct-kinds--wide .ct-kind { flex-direction: row; align-items: stretch; }
  .ct-kinds--wide .ct-kind__photo { flex: 0 0 40%; height: 168px; padding: 18px; }
  .ct-kinds--wide .ct-kind__body { justify-content: center; padding: 18px 48px 18px 22px; border-top: 0; border-left: 1px solid var(--border); }
  .ct-kinds--wide .ct-kind__name { font-size: 19px; }
  .ct-kinds--wide .ct-kind__count { margin-top: 8px; font-size: 14px; }
  .ct-kinds--wide .ct-kind__price { margin-top: 2px; font-size: 21px; }
  .ct-kinds--wide .ct-kind__price small { font-size: 12px; }
}
/* メーカーのカード（分類一覧の案内ページ）：枚数に合わせて列の数を決める。列の数は category_top.py が --ct-cols に入れる。 */
@media (min-width: 1000px) {
  .ct-kinds.ct-kinds--fit { grid-template-columns: repeat(var(--ct-cols, 6), 1fr); }
}
/* 同じページの型番一覧を絞り込むカード（ドローン・ゲーム・メーカーのカード）：選んでいるものに枠を付ける。 */
.ct-kind.is-active { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue); }

/* ===== 買取価格の例（2つを切り替える） ===== */
.ct-tabs[hidden] { display: none; }
.ct-tabs { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.ct-tabs button {
  flex: 1;
  max-width: 300px;
  min-height: 46px;
  padding: 6px 12px;
  border: 1px solid var(--blue);
  border-radius: 9999px;
  background: #fff;
  color: var(--blue-heading);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  cursor: pointer;
}
.ct-tabs button[aria-selected="true"] { border-color: var(--blue-heading); background: var(--blue-heading); color: #fff; }
.ct-tabs button:focus-visible { outline: 3px solid rgba(0, 144, 216, .3); outline-offset: 3px; }
.ct-panel[hidden] { display: none; }
.ct-panel__lead { margin-top: 16px; color: var(--gray); font-size: 13.5px; text-align: center; }
.ct-rows { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 16px; list-style: none; }
@media (min-width: 860px) {
  .ct-rows { grid-template-columns: repeat(2, 1fr); gap: 12px 16px; }
}
.ct-row {
  display: grid;
  grid-template-columns: 30px 60px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 8px 14px 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.ct-row__no {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--blue);
  border-radius: 9999px;
  color: var(--blue-heading);
  font-size: 13px;
  font-weight: 700;
}
.ct-row__no--top { border-color: var(--blue-heading); background: var(--blue-heading); color: #fff; }
.ct-row__thumb { display: flex; align-items: center; justify-content: center; width: 60px; height: 56px; }
.ct-row__thumb img { width: auto; max-width: 100%; height: 100%; object-fit: contain; }
.ct-row__kind { display: inline-block; border: 1px solid var(--blue); border-radius: 9999px; padding: 0 9px; color: var(--blue); font-size: 11px; }
.ct-row__name { display: block; margin-top: 3px; font-size: 14px; font-weight: 700; line-height: 1.45; overflow-wrap: anywhere; }
.ct-row__price { color: var(--red); font-size: 18px; font-weight: 700; text-align: right; white-space: nowrap; }
.ct-row__price small { font-size: 11px; }
.ct-row__icon { width: 36px; height: 36px; color: #9CC7E2; }
.ct-row--plain { grid-template-columns: 60px 1fr auto; }
.ct-row__sub { display: block; color: var(--gray); font-size: 11px; font-weight: 400; }
@media (max-width: 420px) {
  .ct-row { grid-template-columns: 26px 46px 1fr; row-gap: 2px; }
  .ct-row__thumb { width: 46px; height: 44px; }
  .ct-row__price { grid-column: 3; text-align: left; font-size: 16px; }
}
@media (max-width: 420px) {
  .ct-row--plain { grid-template-columns: 46px 1fr; }
  .ct-row--plain .ct-row__price { grid-column: 2; }
  .ct-row__sub { display: inline; margin-left: 8px; }
}
/* 幅320の画面では、価格と「美品（A）」を1行に並べると行が画面からはみ出すので、2行に分ける。 */
@media (max-width: 359px) {
  .ct-row__sub { display: block; margin-left: 0; }
}

/* ===== 買取の流れ（トップと同じ横並び3カラム・丸写真） ===== */
.ct-flow { display: grid; gap: 30px 24px; margin-top: 32px; }
@media (min-width: 768px) {
  .ct-flow { grid-template-columns: repeat(3, 1fr); }
}
.ct-step { text-align: center; }
.ct-step .circle-media { width: 150px; height: 150px; }
.ct-step p.ct-step__label { margin-top: 12px; color: var(--red); font-size: 14px; font-weight: 700; text-align: center; }
.ct-step h3 { font-size: 18px; font-weight: 700; }
.ct-step p { margin-top: 6px; color: var(--gray); font-size: 13.5px; line-height: 1.8; text-align: left; }
.ct-badge {
  position: absolute;
  top: 2px;
  left: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
}

/* ===== よくある質問 ===== */
.ct-faq { margin-top: 26px; border-top: 1px solid var(--border); }
.ct-faq details { border-bottom: 1px solid var(--border); background: #fff; }
.ct-faq summary {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 44px 16px 14px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
  cursor: pointer;
  list-style: none;
}
.ct-faq summary::-webkit-details-marker { display: none; }
.ct-faq summary::before {
  content: "Q";
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 9999px;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
}
.ct-faq summary::after {
  content: "";
  position: absolute;
  top: 22px;
  right: 18px;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  transform: rotate(45deg);
  transition: transform .2s ease;
}
.ct-faq details[open] summary::after { transform: rotate(-135deg); top: 26px; }
.ct-faq__a { padding: 0 16px 18px 52px; color: var(--text); font-size: 14px; line-height: 1.9; }
.ct-faq__a a { color: var(--blue); font-weight: 700; }

/* ===== 型番一覧（1ページ目だけ、ほかの帯と見出しをそろえる） ===== */
.ct-top #camera-products { padding: 46px 20px 52px; }
.ct-top #product-list-title::before {
  content: "";
  display: block;
  width: 52px;
  height: 52px;
  margin: 0 auto 8px;
  border: 1px solid var(--blue);
  border-radius: 9999px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231867C0' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") center / 25px 25px no-repeat,
    radial-gradient(circle, #E1F1FA 0 21px, #fff 21.5px);
}

/* ===== 申し込みの黄色い帯（型番ページと同じ） ===== */
.ct-cta { background: var(--yellow); color: var(--ink); padding: 44px 20px 48px; text-align: center; }
.ct-cta h2 { font-size: clamp(22px, 3.6vw, 30px); font-weight: 900; line-height: 1.5; }
.ct-cta p { margin-top: 10px; color: var(--yellow-ink); font-size: 14px; }
.ct-cta__buttons { display: flex; flex-direction: column; gap: 12px; margin-top: 22px; }
.ct-cta .btn { max-width: 380px; }
.ct-cta .btn--yellow { background: var(--ink); color: var(--yellow); }
.ct-cta .btn--outline { border-color: var(--ink); color: var(--ink); }
@media (min-width: 768px) {
  .ct-cta__buttons { flex-direction: row; justify-content: center; }
  .ct-cta .btn { margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .ct-kind, .ct-row { transition: none; }
}
