/* ===== STOCK DETAIL PAGE ===== */

.stock-detail-page .stocks-archive__inner {
  gap: 30px;
}

/* ===== 詳細カード（白背景） ===== */
.stock-detail-card {
  background: var(--white);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 64px), calc(100% - 44px) 100%, 0 100%);
  padding: 36px 56px 60px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease .2s, transform .6s ease .2s;
}
.stock-detail-card.is-inview {
  opacity: 1;
  transform: translateY(0);
}

/* ステータスタグ（右側斜めカット・幅1/5） */
.stock-detail__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: -8px;
}
.stock-detail__status--sold {
  background: #888;
}

/* 車名 */
.stock-detail__title {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 500;
  font-size: 24px;
  color: #000;
  line-height: 1.5;
}

/* ===== ボディ（ギャラリー＋スペック） ===== */
.stock-detail__body {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

/* ギャラリー */
.stock-detail__gallery {
  flex-shrink: 0;
  width: 380px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stock-detail__main-photo {
  width: 100%;
  position: relative;
  overflow: hidden;
}
.stock-detail__main-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  transition: opacity .15s ease;
}
.stock-detail__thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.stock-detail__thumb {
  cursor: pointer;
  overflow: hidden;
  opacity: .65;
  transition: opacity .2s;
}
.stock-detail__thumb:hover,
.stock-detail__thumb.is-active {
  opacity: 1;
  outline: 2px solid var(--orange);
  outline-offset: -2px;
}
.stock-detail__thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

/* ===== 右カラム：価格＋スペック ===== */
.stock-detail__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 価格 */
.stock-detail__price {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stock-detail__price-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.stock-detail__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-detail__price-value {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 48px;
  font-weight: 500;
  color: #000;
  line-height: 1;
  margin-left: auto;
}
.stock-detail__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;
}

/* スペック表（縦並び・company.htmlスタイル） */
.stock-detail__specs {
  width: 100%;
}
.stock-detail__spec-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--orange);
  padding: 10px 8px;
  line-height: 1.7;
}
.stock-detail__spec-row:first-child {
  border-top: 1px solid var(--orange);
}
.stock-detail__spec-label {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: #000;
  white-space: nowrap;
  width: 160px;
  flex-shrink: 0;
  padding-right: 16px;
}
.stock-detail__spec-val {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 500;
  font-size: 17px;
  color: #000;
  flex: 1;
}

/* 説明文 */
.stock-detail__desc {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 400;
  font-size: 14px;
  color: #000;
  line-height: 1.9;
}

/* 区切り線 */
.stock-detail__divider {
  height: 2px;
  background: var(--orange);
}

/* ===== オプション・装備セクション ===== */
.stock-detail__options {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.stock-detail__section-title {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #000;
  letter-spacing: .05em;
}
.stock-detail__option-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
.stock-option-tag {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  border: 1.5px solid #aaa;
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 500;
  font-size: 13px;
  color: #888;
  text-align: center;
  white-space: nowrap;
}
.stock-option-tag--on {
  background: var(--orange);
  color: var(--white);
  border-color: var(--orange);
}

/* ===== お問い合わせカード ===== */
/* ===== 車両内お問い合わせ帯 ===== */
.stock-inquiry-header {
  background: var(--orange);
  margin: 40px 0 0;
  padding: 28px 40px;
}
.stock-inquiry-header__text {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--white);
  line-height: 1.6;
  text-align: center;
}
/* ＊印は必須項目（オレンジ帯直下） */
.stock-inquiry-note {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 13px;
  color: #aaa;
  text-align: right;
  margin: 4px 0;
}
/* フォームbodyもcard paddingを打ち消して揃える */
.stock-detail-card .contact-form-card__body {
  margin: 0 -56px;
  padding: 4px 56px 0;
}
/* 問い合わせ部分のライン全削除 */
.stock-detail-card .contact-form__row,
.stock-detail-card .contact-form__row:first-child {
  border-top: none;
  border-bottom: none;
}

.stock-contact-card {
  background: var(--white);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 64px), calc(100% - 44px) 100%, 0 100%);
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease .3s, transform .6s ease .3s;
}
.stock-contact-card.is-inview {
  opacity: 1;
  transform: translateY(0);
}
.stock-contact__header {
  background: var(--orange);
  padding: 36px 56px;
}
.stock-contact__heading {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: var(--white);
  line-height: 1.6;
  text-align: center;
}
.stock-contact__body {
  padding: 48px 56px 72px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.stock-form__note-required {
  text-align: right;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 13px;
  color: var(--orange);
}
.stock-contact__note {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 13px;
  color: #666;
  text-align: right;
}

/* フォーム行 */
.stock-form__row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid var(--orange);
  padding: 16px 0;
}
.stock-form__row:first-child {
  border-top: 1px solid var(--orange);
}
.stock-form__label {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 500;
  font-size: 15px;
  color: #000;
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (min-width: 901px) {
  .stock-detail__status { margin-left: 0; }

  .stock-form__row {
    flex-direction: row;
    align-items: flex-start;
    gap: 24px;
    padding: 14px 0;
  }
  .stock-form__label {
    width: 190px;
    flex-shrink: 0;
    padding-top: 10px;
    font-size: 17px;
    font-weight: 700;
  }
  .stock-form__field {
    flex: 1;
    min-width: 0;
  }
}
.stock-form__required {
  font-size: 15px;
  color: var(--orange);
  font-weight: 700;
}
.stock-form__input,
.stock-form__textarea {
  width: 100%;
  border: 1px solid #ccc;
  padding: 12px 16px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 15px;
  color: #000;
  box-sizing: border-box;
  outline: none;
  transition: border-color .2s;
}
.stock-form__input:focus,
.stock-form__textarea:focus {
  border-color: var(--orange);
}
.stock-form__textarea {
  height: 160px;
  resize: vertical;
}

/* ラジオ行 */
/* セレクトボックス（お問い合わせ区分用） */
.contact-form__select-wrap {
  position: relative;
}
.contact-form__select-wrap::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  border-right: 2px solid #666;
  border-bottom: 2px solid #666;
  pointer-events: none;
}
.stock-form__select {
  appearance: none;
  background: var(--white);
  cursor: pointer;
  padding-right: 40px;
}

.stock-form__radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.stock-form__radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 15px;
  color: #000;
  cursor: pointer;
}
.stock-form__radio-label input[type="radio"] {
  accent-color: var(--orange);
  width: 16px;
  height: 16px;
}

/* プライバシー同意 */
.stock-form__privacy {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14px;
  color: #000;
}
.stock-form__privacy input[type="checkbox"] {
  accent-color: var(--orange);
  width: 16px;
  height: 16px;
}
.stock-form__privacy a {
  color: var(--orange);
  text-decoration: underline;
}

/* 送信ボタン */
.stock-form__submit-wrap {
  display: flex;
  justify-content: center;
}
.stock-form__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 56px;
  padding: 0 60px;
  background: var(--orange);
  color: var(--white);
  font-family: 'M PLUS 1p', sans-serif;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: .1em;
  border: none;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  transition: opacity .2s;
}
.stock-form__submit:hover { opacity: .8; }
.stock-form__submit-arrow {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-top: 2.5px solid var(--white);
  border-right: 2.5px solid var(--white);
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* ===== 1100px以下 ===== */
@media (max-width: 1100px) {
  .stock-detail-card { padding: 28px 40px 64px; }
  .stock-detail__status { margin-left: 0; }
  .stock-detail__title { font-size: 26px; }
  .stock-detail__gallery { width: 300px; }
  .stock-detail__price-value { font-size: 40px; }
  .stock-contact__body { padding: 40px 40px 64px; }
  .stock-contact__heading { font-size: 22px; }
}

/* ===== 900px以下 ===== */
@media (max-width: 900px) {
  .stock-detail-card { padding: 24px 24px 56px; gap: 20px; }
  .stock-detail__status { margin-left: -24px; }
  .stock-detail__title { font-size: 22px; }
  .stock-detail__body { flex-direction: column; gap: 24px; }
  .stock-detail__gallery { width: 100%; }
  .stock-detail__main-photo img { aspect-ratio: 16 / 10; }
  .stock-detail__info { width: 100%; }
  .stock-detail__price { width: 100%; }
  .stock-detail__specs { width: 100%; }
  .stock-detail__spec-label { width: 110px; font-size: 13px; }
  .stock-detail__spec-val { font-size: 13px; }
  .stock-detail__option-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .stock-detail__option-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stock-contact__header { padding: 24px 28px; }
  .stock-contact__heading { font-size: 20px; }
  .stock-contact__body { padding: 32px 28px 56px; gap: 20px; }
}

/* ===== 500px以下 ===== */
@media (max-width: 500px) {
  .stock-detail-card { padding: 20px 16px 48px; }
  .stock-detail__spec-row { flex-direction: column; align-items: flex-start; padding: 8px; }
  .stock-detail__spec-label { width: 100%; padding-right: 0; padding-bottom: 2px; font-size: 15px; }
  .stock-detail__spec-val { font-size: 14px; }
  .stock-detail__status { margin-left: -16px; }
  .stock-detail__title { font-size: 18px; }
  .stock-detail__price-value { font-size: 34px; }
  .stock-detail__section-title { font-size: 16px; }
  .stock-detail__option-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stock-option-tag { font-size: 12px; }
  .stock-contact__header { padding: 20px 20px; }
  .stock-contact__heading { font-size: 17px; }
  .stock-contact__body { padding: 24px 20px 48px; }
  .stock-form__radio-group { gap: 12px; }
  .stock-form__submit { font-size: 16px; padding: 0 40px; }
}
