/* =========================================================
   차량 상세 페이지 공통 스타일 (45bus, 25bus, 28limousine, 1014van)
   ========================================================= */

/* ---------- 기본 ---------- */
h1,
h2,
p,
figure {
  margin: 0;
}

button {
  cursor: pointer;
}

.media {
  position: relative;
  overflow: hidden;
}

.original-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section-title {
  font-size: clamp(34px, 5vw, 40px);
  font-weight: 700;
  line-height: 1.25;
}

/* 본문 섹션: 화면 전체 폭으로 펼친 뒤 안쪽 .page로 정렬 */
.detail-overview,
.interior,
.seating {
  position: relative;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  overflow: hidden;
  scroll-margin-top: 80px;
}

/* ---------- 히어로 ---------- */
.vehicle-hero {
  height: calc(100svh - var(--nav-height));
  min-height: 560px;
  max-height: 900px;
  margin-top: var(--nav-height);
  background: #a6aaa4;
  color: #fff;
}

.vehicle-hero > .media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vehicle-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(4, 24, 28, 0.3), rgba(0, 0, 0, 0.24) 35%, rgba(4, 24, 28, 0.78));
}

.vehicle-hero-copy {
  position: absolute;
  z-index: 2;
  bottom: 128px;
  left: 0;
  right: 0;
}

.vehicle-hero h1 {
  font-size: clamp(42px, 5.4vw, 76px);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.vehicle-hero h1 span {
  color: var(--lime);
}

.vehicle-hero-copy p {
  margin-top: 24px;
  font-size: 20px;
  line-height: 1.65;
}

.crumb-dropdown.is-open {
  max-height: 180px;
}

/* 연료 태그 (vehicles.html 태그와 같은 색 구성) */
.vehicle-hero-copy .card-fuel-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.vehicle-hero-copy .card-fuel-tags span {
  padding: 4px 9px;
  border: 1px solid #d8e3ff;
  border-radius: 30px;
  background: #f4f7ff;
  color: var(--blue);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

@media (max-width: 1000px) {
  .vehicle-hero-copy {
    bottom: 108px;
  }

  .vehicle-hero-copy p {
    font-size: 18px;
  }
}

@media (max-width: 760px) {
  .vehicle-hero-copy .card-fuel-tags {
    gap: 4px;
  }

  .vehicle-hero {
    min-height: 600px;
    max-height: 820px;
  }

  .vehicle-hero h1 {
    font-size: clamp(36px, 7vw, 54px);
  }

  .vehicle-hero-copy {
    bottom: 106px;
  }

  .vehicle-hero-copy p {
    max-width: 370px;
    margin-top: 20px;
    font-size: 16px;
  }

  .vehicle-hero-copy p br {
    display: none;
  }
}

/* ---------- 차량 정보 ---------- */
.detail-overview {
  padding: 96px 0;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
  align-items: start;
}

.overview-grid > * {
  min-width: 0;
}

.bus-photo {
  width: 100%;
  aspect-ratio: 1.75;
}

.bus-photo .original-media {
  object-fit: contain;
}

/* 외관 사진 아래 친환경 연료 문구 */
.sustainable-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 24px auto 0;
  color: var(--blue);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.6;
  text-align: center;
}

.sustainable-option img {
  flex: none;
  width: auto;
  height: 26px;
}

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

.spec-grid > * {
  min-width: 0;
}

.spec-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 184px;
  padding: 24px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}

.spec-card:hover,
.spec-card:focus-visible {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
}

.spec-icon {
  display: block;
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  object-fit: contain;
  transition: filter 0.25s;
}

.spec-card:hover .spec-icon,
.spec-card:focus-visible .spec-icon {
  filter: brightness(0) invert(1);
}

.spec-card p {
  margin-bottom: 8px;
  color: var(--body);
  font-size: 16px;
  line-height: 1.5;
  transition: color 0.25s;
}

.spec-card:hover p,
.spec-card:focus-visible p {
  color: #fff;
}

.spec-card strong {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
}

.recommended {
  margin-top: 16px;
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.recommended h2 {
  margin-bottom: 20px;
  font-size: 18px;
}

.use-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 16px;
}

.use-list span {
  display: inline-block;
  padding: 7px 11px;
}

.use-list .best {
  border-radius: 100px;
  background: var(--lime);
  color: #000;
  font-weight: 600;
}

@media (max-width: 1100px) {
  .overview-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .overview-grid > div {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
  }

  .vehicle-visual {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
  }
}

@media (max-width: 1000px) {
  .recommended {
    padding: 24px 12px;
  }

  .use-list {
    gap: 12px 0;
  }
}

@media (max-width: 760px) {
  .detail-overview {
    padding: 68px 0;
  }

  .bus-photo {
    max-width: 520px;
    margin: 0 auto;
  }

  .sustainable-option {
    margin-top: 20px;
    font-size: 16px;
  }

  .spec-grid {
    gap: 12px;
  }

  .spec-card {
    min-height: 162px;
    padding: 22px 12px;
  }

  .spec-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 14px;
  }

  .spec-card strong {
    font-size: 18px;
  }

  .recommended {
    margin-top: 12px;
  }
}

@media (max-width: 420px) {
  .spec-card strong {
    font-size: 17px;
  }

  .recommended {
    padding: 24px 16px;
  }

  .use-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- 상세 사진 ---------- */
.interior {
  padding: 72px 0 96px;
  background: #f4f7ff;
}

.interior-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 32px 40px;
}

.interior-heading {
  grid-column: 1 / -1;
  grid-row: 1;
}

.gallery-label {
  position: relative;
  z-index: 2;
  grid-column: 1;
  grid-row: 2;
  align-self: center;
  width: calc(100% + 40px);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
}

.gallery-label::before {
  content: '';
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
}

.gallery-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.gallery-stage {
  position: relative;
  grid-column: 2;
  grid-row: 2;
  aspect-ratio: 1.45;
  overflow: hidden;
  background: #f4f7ff;
}

.gallery-panel {
  position: absolute;
  inset: 0;
}

.gallery-panel[hidden] {
  display: none;
}

.gallery-panel .media {
  width: 100%;
  height: 100%;
}

.gallery-panel figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 64px 30px 28px;
  background: linear-gradient(transparent, rgba(4, 24, 28, 0.62));
  color: #fff;
  font-size: 16px;
  line-height: 1.6;
}

.gallery-controls {
  grid-column: 2;
  grid-row: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.gallery-tabs {
  display: flex;
  align-items: center;
  gap: 30px;
}

.gallery-tabs button {
  position: relative;
  padding: 10px 0;
  border: 0;
  background: none;
  color: var(--body);
  font-size: 16px;
}

.gallery-tabs button[aria-selected='true'] {
  color: var(--ink);
  font-weight: 700;
}

.gallery-tabs button::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.gallery-tabs button[aria-selected='true']::after {
  transform: scaleX(1);
}

/* 사진이 없는 탭 (예: 25인승 후면) */
.gallery-tabs button:disabled {
  color: #dadddb;
  cursor: default;
}

@media (max-width: 1100px) {
  .interior-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .gallery-label {
    width: 100%;
  }

  .gallery-label::after {
    flex: 0 1 100px;
  }

  .gallery-stage {
    grid-column: 1;
    grid-row: 3;
  }

  .gallery-controls {
    grid-column: 1;
    grid-row: 4;
  }

  .gallery-tabs {
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  .interior {
    padding: 56px 0 64px;
  }

  .gallery-stage {
    aspect-ratio: 1.12;
  }

  .gallery-panel figcaption {
    padding: 60px 20px 24px;
    font-size: 14px;
  }

  .gallery-controls {
    gap: 8px;
  }

  .gallery-tabs {
    gap: 28px;
  }
}

/* ---------- 사진 캐러셀 ---------- */
.interior-carousel {
  --arrow-size: 32px;
  position: relative;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
}

.interior-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.interior-slide {
  position: absolute;
  inset: 0;
}

.interior-slide[hidden] {
  display: none;
}

.interior-carousel figcaption {
  padding-bottom: 56px;
  pointer-events: none;
}

.interior-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: var(--arrow-size);
  height: var(--arrow-size);
  margin-top: calc(var(--arrow-size) / -2);
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.interior-arrow.prev {
  left: 16px;
}

.interior-arrow.next {
  right: 16px;
}

.interior-arrow:not(:disabled):hover {
  background: var(--lime);
  color: #000;
  transform: translateX(2px);
}

.interior-arrow.prev:not(:disabled):hover {
  transform: translateX(-2px);
}

.interior-arrow:disabled {
  background: #e7e9e7;
  color: #a9aeaa;
  cursor: default;
}

.interior-arrow:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}

.interior-dots {
  position: absolute;
  z-index: 3;
  bottom: 16px;
  left: 50%;
  display: flex;
  gap: 4px;
  transform: translateX(-50%);
}

.interior-dot {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

.interior-dot::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.interior-dot[aria-current='true']::before {
  background: var(--lime);
}

/* 화면에는 숨기고 스크린리더에만 읽히는 상태 문구 */
.interior-status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 760px) {
  .interior-carousel {
    --arrow-size: 28px;
  }

  .interior-carousel figcaption {
    padding: 48px 20px 52px;
  }

  .interior-arrow {
    font-size: 16px;
  }

  .interior-arrow.prev {
    left: 12px;
  }

  .interior-arrow.next {
    right: 12px;
  }

  .interior-dots {
    bottom: 12px;
  }
}

/* ---------- 좌석 ---------- */
.seating {
  padding: 88px 0 72px;
}

.seat-photo {
  width: 100%;
  margin: 32px auto;
}

.seat-photo .original-media {
  position: static;
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.seat-caption {
  color: var(--body);
  font-size: 16px;
  line-height: 1.9;
  text-align: center;
}

.seat-caption strong {
  color: var(--ink);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .seating {
    padding: 60px 0;
  }

  .seat-photo {
    margin: 24px 0;
  }
}
