/* ===== ARCHIVE STOCKS PAGE ===== */

/* ===== コンテンツラッパー ===== */
.stocks-archive {
  background: var(--bg);
  padding: 56px 0 80px;
}
.stocks-archive__inner {
  width: 1144px;
  max-width: calc(100% - 48px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

/* ===== 在庫リストボックス ===== */
.stocks-list {
  background: var(--white);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 64px), calc(100% - 44px) 100%, 0 100%);
  padding: 0 56px;
  display: flex;
  flex-direction: column;
}

/* ===== 車両カード ===== */
.stock-item {
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease, transform .5s ease;
}
.stock-item.is-inview {
  opacity: 1;
  transform: translateY(0);
}

/* ステータスタグ（news-item__catと同じデザイン） */
.stock-item__status {
  display: inline-block;
  background: var(--orange);
  color: var(--white);
  font-family: 'M PLUS 2', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .1em;
  padding: 6px 60px 6px 40px;
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 100%, 0 100%);
  white-space: nowrap;
  align-self: flex-start;
  margin-left: -56px;
  margin-top: -10px;
  margin-bottom: -10px;
}
.stock-item:first-child .stock-item__status {
  margin-top: 10px;
}
.stock-item + .stock-item .stock-item__status {
  margin-top: -20px;
}
.stock-item__status--sold {
  background: #888;
}

/* 車名 */
.stock-item__title {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 700;
  font-size: 28px;
  color: #000;
  line-height: 1.3;
  padding: 0 4px;
}

/* 本体：写真＋スペック */
.stock-item__body {
  display: flex;
  gap: 48px;
  align-items: flex-end;
}

/* 写真 */
.stock-item__photo {
  flex-shrink: 0;
  width: 380px;
}
.stock-item__photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

/* 右カラム */
.stock-item__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stock-item__btns {
  margin-top: 12px;
}

/* 価格行 */
.stock-item__price {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stock-item__price-group {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.stock-item__price-label {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--orange);
  white-space: nowrap;
  line-height: 1;
  padding-bottom: 6px;
  width: 160px;
  flex-shrink: 0;
}
.stock-item__price-value {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 48px;
  font-weight: 500;
  color: #000;
  line-height: 1;
  margin-left: auto;
}
.stock-item__price-unit {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #000;
  line-height: 1;
  padding-bottom: 4px;
  margin-left: -4px;
}

/* スペック表 */
.stock-item__specs {
  display: flex;
  border: 1px solid var(--orange);
}
.stock-item__spec-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--orange);
}
.stock-item__spec-col:last-child {
  border-right: none;
}
.stock-item__spec-head {
  background: #ffede1;
  border-bottom: 1px solid var(--orange);
  padding: 14px 8px;
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: #000;
  text-align: center;
  white-space: nowrap;
}
.stock-item__spec-val {
  background: var(--white);
  padding: 14px 8px;
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: #000;
  text-align: center;
  white-space: nowrap;
}

/* ボタン行 */
.stock-item__btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.stock-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 52px;
  padding: 0 20px;
  border-radius: 16px;
  border: 2px solid var(--orange);
  font-family: 'M PLUS 1p', sans-serif;
  font-weight: 500;
  font-size: 20px;
  letter-spacing: .1em;
  text-decoration: none;
  cursor: pointer;
  transition: opacity .2s;
  white-space: nowrap;
  position: relative;
  min-width: 0;
}
.stock-btn:hover { opacity: .8; }

.stock-btn--outline {
  background: var(--white);
  color: var(--orange);
}
.stock-btn--fill {
  background: var(--orange);
  color: var(--white);
  border-color: var(--white);
}

.stock-btn__arrow {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-top: 2.5px solid currentColor;
  border-right: 2.5px solid currentColor;
  transform: rotate(45deg);
  flex-shrink: 0;
  position: absolute;
  right: 30px;
  top: 50%;
  margin-top: -6px;
}

/* 区切り線 */
.stock-item__divider {
  height: 2px;
  background: var(--orange);
  margin-top: 16px;
  margin-bottom: 0;
}
.stock-item:last-child .stock-item__divider {
  display: none;
}
.stocks-list > .stock-item:last-child .stock-item__divider {
  display: none !important;
}

/* ===== ページネーション ===== */
.stocks-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.stocks-pagination__prev,
.stocks-pagination__next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--orange);
  color: var(--white);
  font-family: 'M PLUS 2', sans-serif;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .1em;
  text-decoration: none;
  height: 40px;
  padding: 0 56px;
  white-space: nowrap;
  transition: opacity .2s;
}
.stocks-pagination__prev:hover,
.stocks-pagination__next:hover { opacity: .8; }
.stocks-pagination__prev {
  clip-path: polygon(22px 0, 100% 0, 100% 100%, 0 100%);
}
.stocks-pagination__next {
  clip-path: polygon(0 0, 100% 0, calc(100% - 22px) 100%, 0 100%);
}
.stocks-pagination__pages {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'M PLUS 2', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #000;
}
.stocks-pagination__page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  text-decoration: none;
  color: #000;
  font-family: 'M PLUS 2', sans-serif;
  font-weight: 700;
  font-size: 14px;
  transition: background .2s, color .2s;
}
.stocks-pagination__page:hover,
.stocks-pagination__page.is-current {
  background: var(--orange);
  color: var(--white);
}
.stocks-pagination__dots {
  font-family: 'M PLUS 2', sans-serif;
  font-size: 14px;
  color: #000;
  padding: 0 4px;
}

/* ===== 1100px以下 ===== */
@media (max-width: 1100px) {
  .stocks-archive { padding-top: 30px; }
  .stock-item__title { font-size: 26px; }
  .stock-item__photo { width: 300px; }
  .stock-item__price-value { font-size: 40px; }
  .stock-item__price-label { font-size: 13px; }
  .stock-item__price-unit { font-size: 13px; }
  .stock-btn { font-size: 16px; min-width: 0; flex: 1; }
}

/* ===== 900px以下 ===== */
@media (max-width: 900px) {
  .stocks-archive { padding: 30px 0 60px; }
  .stocks-archive__inner { gap: 32px; }
  .stocks-intro { padding: 24px 28px; font-size: 15px; border-radius: 28px; }
  .stocks-list { padding: 0 28px; }
  .stock-item__status { margin-left: -28px; }
  .stock-item { gap: 16px; }
  .stock-item__body { flex-direction: column; gap: 24px; }
  .stock-item__photo { width: 100%; }
  .stock-item__photo img { aspect-ratio: 16 / 10; }
  .stock-item__info { width: 100%; }
  .stock-item__specs { width: 100%; }
  .stock-item__title { font-size: 24px; }
  .stock-item__status { font-size: 15px; padding: 6px 60px 6px 40px; }
  .stocks-pagination__prev,
  .stocks-pagination__next { font-size: 15px; height: 38px; padding: 0 32px; }
}

/* ===== 500px以下 ===== */
@media (max-width: 500px) {
  .stocks-archive__inner { max-width: calc(100% - 24px); }
  .stocks-list { padding: 0 16px; }
  .stocks-intro { padding: 20px 20px; border-radius: 20px; }
  .stock-item__title { font-size: 20px; }
  .stock-item__price-value { font-size: 34px; }
  .stock-item__price-label { width: 120px; font-size: 13px; }
  .stock-item__spec-head,
  .stock-item__spec-val { font-size: 12px; padding: 10px 4px; }
  .stock-item__btns { height: 105px; gap: 8px; flex-flow: column; }
  .stock-btn { font-size: 14px; height: 48px; width: 100%; padding: 0 16px; gap: 0; }
  .stocks-pagination { gap: 8px; }
  .stocks-pagination__prev,
  .stocks-pagination__next { padding: 0 20px; font-size: 14px; }
}
