@charset "UTF-8";

/* ============================================================
 * 車を買う（/buy/）
 * 読み込み順： reset.css → common.css → buy.css → drawer-nav.css
 *
 * 車両カード（.car-list / .car-card）とページ送り（.pager）、
 * フォーム部品（.form__select）は common.css 側にある。
 * ここには絞り込み検索と一覧の見出しまわりだけ書く。
 * ========================================================== */


/* ------------------------------------------------------------
 * 絞り込み検索
 * ---------------------------------------------------------- */
.stock-search {
	padding: 48px 0;
	background: var(--color-bg);
}

/* いきなり選択欄が始まらないように見出しを置く */
.stock-search__head {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 24px;
}

.stock-search__en {
	color: var(--color-accent);
	font-size: 16px;
	letter-spacing: .1em;
	line-height: 1;
}

.stock-search__title {
	font-size: 24px;
	font-weight: 900;
	line-height: 1.4;
}

.stock-search__fields {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
}

.stock-search__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.stock-search__label {
	color: var(--color-sub);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .04em;
}

/* 選択欄の行間（20px）と区別がつくよう、ボタンの上だけ余白を広くとる */
.stock-search__foot {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 16px;
	margin-top: 48px;
}


/* ------------------------------------------------------------
 * 在庫一覧
 * ---------------------------------------------------------- */
.stock-list {
	padding: 56px 0 88px;
	background: var(--color-white);
}

/* お支払い方法。表組みは共通の .profile-list をそのまま使う */
.payment {
	padding: 72px 0 88px;
	background: var(--color-bg);
}

.stock-list__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--color-line);
}

.stock-list__count {
	font-size: 16px;
	font-weight: 700;
}

.stock-list__count .en {
	margin-right: 4px;
	color: var(--color-accent);
	font-size: 32px;
	line-height: 1;
}

/* 該当する在庫が1台もないとき。お知らせ一覧の .news-list__empty と同じ見せ方にそろえる。
   空の <ul class="car-list"> が余白だけ残すので、そちらは隠す */
.stock-list__empty {
	margin-top: 36px;
	padding: 40px 0;
	border-bottom: 1px solid var(--color-line);
	color: var(--color-sub);
	font-size: 16px;
	line-height: 1.8;
}

.stock-list__empty + .car-list {
	display: none;
}

.stock-list__sort {
	display: flex;
	align-items: center;
	gap: 12px;
}

.stock-list__sort-label {
	flex-shrink: 0;
	color: var(--color-sub);
	font-size: 14px;
	font-weight: 700;
}

.stock-list__sort .form__select {
	width: auto;
	min-width: 220px;
	padding: 10px 44px 10px 16px;
	font-size: 14px;
}

.stock-list .car-list {
	margin-top: 32px;
}


/* ------------------------------------------------------------
 * ~1199px
 * ---------------------------------------------------------- */
@media screen and (max-width: 1199px) {
	.stock-search__fields {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* ------------------------------------------------------------
 * ~959px
 * ---------------------------------------------------------- */
@media screen and (max-width: 959px) {
	.stock-search {
		padding: 32px 0;
	}

	.payment {
		padding: 56px 0 64px;
	}

	.stock-list__empty {
		margin-top: 24px;
		padding: 32px 0;
		font-size: 14px;
	}

	.stock-search__fields {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px;
	}

	.stock-list {
		padding: 40px 0 72px;
	}
}

/* ------------------------------------------------------------
 * ~767px
 * ---------------------------------------------------------- */
@media screen and (max-width: 767px) {
	.stock-search {
		padding: 24px 0;
	}

	.stock-search__fields {
		grid-template-columns: repeat(1, minmax(0, 1fr));
		gap: 12px;
	}

	.stock-search__foot {
		flex-direction: column;
		margin-top: 20px;
	}

	.stock-list {
		padding: 32px 0 56px;
	}

	.stock-list__head {
		gap: 12px;
	}

	.stock-list__count .en {
		font-size: 26px;
	}

	.stock-list__sort {
		width: 100%;
	}

	.stock-list__sort .form__select {
		width: 100%;
		min-width: 0;
	}
}
