/* =========================================================
   car list (メーカー絞り込み + カード + 検索)
   Androidでも崩れない整理版（丸ごと差し替え）
   ========================================================= */

/* --- 全体 --- */
.carlist-wrap{
  max-width: 1200px;
  margin: 0 auto;
}

/* 上下の文章 */
.carlist-top-text{
  text-align:center;
  font-weight:900;
  color:#ff6b00;
  margin: 18px 0 18px;
}
.carlist-bottom-text{
  text-align:center;
  font-weight:900;
  color:#ff0000;
  margin: 22px 0 18px;
}

/* =========================================================
   黄色背景（全幅：安全版）
   ========================================================= */
.maker-area-outer{
  position: relative;
  padding: 28px 0;
  overflow: visible; /* hidden をやめる */
}

/* 背景だけを全幅にする */
.maker-area-outer::before{
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: #FFDC38;
}


.maker-area-inner{
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 0px;
  box-sizing:border-box;
}

/* =========================================================
   検索UI（メーカー白枠の上／中央）
   ・矢印 + 「車種名で検索する」
   ・入力は四角（角丸なし）
   ・虫眼鏡が検索ボタン
   ・クリア×あり
   ・結果は必ず2段目
   ========================================================= */
.carlist-search{
  width: 100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: 10px;
  margin: 0 auto 16px;
}

.carlist-search__head{
  width: 100%;
  max-width: 640px;
  font-weight:900;
  color:#111;
  font-size: 18px;
  line-height:1.2;
}

.carlist-search__form{
  width: 100%;
  max-width: 640px; /* PC幅抑え */
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap: 8px;
  margin: 0;
}

.carlist-search__label{
  position:absolute;
  width:1px; height:1px;
  overflow:hidden;
  clip: rect(0 0 0 0);
  white-space:nowrap;
}

.carlist-search__box{
  position: relative;
  width: 100%;
  border: 2px solid rgba(0,0,0,.15);
  background:#fff;
  box-sizing:border-box;
  padding-right: 44px; /* 虫眼鏡分 */
}

.carlist-search__input{
  width: 100%;
  height: 48px;
  border: none;
  background: transparent;
  padding: 0 76px 0 14px; /* 右：× + 虫眼鏡 */
  font-size: 16px;
  font-weight: 800;
  outline:none;
  box-sizing:border-box;
}
.carlist-search__input::placeholder{
  color: rgba(0,0,0,.45);
  font-weight: 700;
}

/* クリア（×） */
.carlist-search__clear{
  position:absolute;
  right: 44px; /* 虫眼鏡の左 */
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 2px solid rgba(0,0,0,.18);
  background: #e6e6e6;
  color:#333;
  font-weight: 900;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  line-height:1;
}
.carlist-search__clear:hover{ background:#ddd; }

/* 虫眼鏡（検索） */
.carlist-search__submit{
  position:absolute;
  right: 0;
  top: 0;
  width: 44px;
  height: 48px;
  border: none;
  background: transparent;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
}
.carlist-search__icon{
  width: 22px;
  height: 22px;
  fill: rgba(0,0,0,.65);
}
.carlist-search__submit:hover .carlist-search__icon{
  fill: rgba(0,0,0,.9);
}

/* 結果（必ず2段目） */
.carlist-search__result{
  width: 100%;
  text-align:center;
  font-weight: 900;
  color:#333;
  line-height: 1.3;
}

/* SP調整（検索） */
@media (max-width: 900px){
  .carlist-search__head,
  .carlist-search__form{
    max-width: 100%;
  }
  .carlist-search__input{
    height: 52px;
  }
  .carlist-search__submit{
    height: 52px;
  }
}

/* =========================================================
   メーカー白枠
   ========================================================= */
.maker-area{
  border:1px solid #eee;
  border-radius:12px;
  padding:10px;
  background:#fff;
}
.maker-area__title{
  font-weight:900;
  margin-bottom:14px;
}

/* =========================================================
   メーカーアイコン
   PC：1段固定（白枠内で均等に縮む）
   ========================================================= */
.maker-icons{
  display:flex;
  flex-wrap:nowrap;
  gap:14px;
}

.maker-icon{
  flex: 1 1 0;
  min-width: 120px;
  height: 110px;
  box-sizing:border-box;

  border:2px solid #ff7a00;
  border-radius:12px;
  background:#fff;
  text-decoration:none;

  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding: 10px 8px;

  box-shadow: 0 6px 14px rgba(0,0,0,.10);
  transition: transform .12s ease, box-shadow .12s ease;
}
.maker-icon:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(0,0,0,.14);
}
.maker-icon:active{
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(0,0,0,.10);
}

.maker-logo{
  height: 60px;
  width: 100%;
  max-width: 110px;
  object-fit: contain;
  display:block;
  margin: 0 auto 6px;
}
.maker-name{
  font-weight:900;
  color:#111;
  font-size:14px;
  line-height:1.1;
  text-align:center;
  white-space:nowrap;
}

/* =========================================================
   SP：メーカー検索 4列×2段（Android崩れ防止）
   ※ minmax(0, 1fr) が超重要
   ========================================================= */
@media (max-width: 900px){
  .maker-icons{
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
  }

  .maker-icon{
    width: auto !important;
    flex: none !important;
    min-width: 0 !important;
    max-width: none !important;

    height: 64px;
    padding: 6px 6px;
    box-sizing: border-box;
    border-radius: 10px;

    /* 影：SPだけ弱く */
    box-shadow: 0 3px 6px rgba(0,0,0,.12);

    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap: 6px;
  }

  .maker-logo{
    height: 34px;
    max-width: 64px;
    width: 100%;
    object-fit: contain;
    margin: 0;
    display: block;
  }

  .maker-name{
    font-size: 11px;
    line-height: 1.05;
    white-space: nowrap;
    text-align:center;
  }
}

/* =========================================================
   メーカー見出し（ロゴ付き）
   ========================================================= */
.maker-section{ margin: 40px 0 10px; }
.maker-title{
  display:flex;
  align-items:center;
  gap:14px;
  font-size:32px;
  font-weight:900;
  margin: 0 0 18px;
  scroll-margin-top: 120px;
}
.maker-title-logo{
  height:44px;
  width:auto;
  display:block;
}
.maker-title-text{ line-height:1; }

/* =========================================================
   車種カード
   PC：4列（293px固定）
   ========================================================= */
.car-grid{
  display:grid;
  grid-template-columns: repeat(4, 293px);
  gap:22px;
  justify-content:space-between;
}

.car-card{
  width:293px;
  border:1px solid #ddd;
  border-radius:18px;
  overflow:hidden;
  background:#fff;
  display:flex;
  flex-direction:column;
}

.car-img-link{ display:block; }
.car-img-link:hover{ opacity:.9; }

.car-img{
  height:160px;
  width:100%;
  object-fit:contain;
  background:#fff;
}

.car-body{
  border-top:1px solid #eee;
  padding:8px 8px;
  flex:1;
}

.car-maker{
  font-size:14px;
  font-weight:900;
}
.car-name{
  font-size:16px;
  font-weight:900;
  margin-top:0px;
}

.btn-contact{
  display:block;
  margin-top:8px;
  border:2px solid #ff7a00;
  color:#ff7a00;
  text-decoration:none;
  text-align:center;
  padding:8px 30px 8px 10px;
  border-radius:999px;
  font-weight:900;
  position: relative;
}
.btn-contact::after{
  content: "›";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid currentColor;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  line-height:1;
}

.price-bar{
  display:block;
  background:#ff7a00;
  color:#fff;
  text-decoration:none;
  padding:10px 44px 10px 12px;
  text-align:left;
  font-size:18px;
  font-weight:900;
  position: relative;
}
.price-bar::after{
  content: "›";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 2px solid #fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  line-height:1;
}

/* =========================================================
   SP：ページ左右20px + 車種カード横スクロール
   ========================================================= */
@media (max-width: 900px){

  /* 既存：左右20pxはそのままでOK */
  .carlist-wrap{
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
  }

  .car-grid{
    display:flex;
    gap:10px;
    overflow-x:auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;

    /* 右にも余白を足して「次がある」感を出す */
    padding-right: 20px;
  }

  /* ▼ カード幅：だいたい半分＋2枚目が少し見切れる */
  .car-card{
  flex: 0 0 55%;
  max-width: 210px;
  min-width: 160px;
  scroll-snap-align: start;
}


  /* 画像はカード幅に追従（崩れ防止） */
  .car-img{
    width: 100%;
    height: auto;
    display: block;
  }

  /* ▼ 問い合わせボタン：幅に合わせて詰める（2行でOK） */
  .car-card .btn-contact{
    font-size: 10px;
    /* padding: 8px 10px; */
    line-height: 1.6;
    text-align: center;

    /* 長文でもはみ出さず自然に折り返す */
    white-space: normal;
    word-break: break-word;
  }

  /* ▼ 下部オレンジ：幅に合わせて詰める（1行維持しやすく） */
  .car-card .price-bar{
    font-size: 13px;
    /* padding: 10px 10px; */
    line-height: 1.2;
    text-align: center;

    /* なるべく1行、厳しければ折り返し */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* もし「…」が嫌で折り返しにしたい場合は上を消してこれに */
  /*
  .car-card .price-bar{
    white-space: normal;
    word-break: break-word;
  }
  */
}
@media (max-width: 900px){

  /* car-body は伸ばさない（間の余白を作らない） */
  .car-body{
    flex: 0 0 auto;
  }

@media (max-width: 900px){
  .car-grid{
    align-items: flex-start; /* ← これが本命：カード高さを揃えない */
  }
}