/* carding.css(프론트 빌드 결과)는 바이트 단위로 그대로 두고, 덧붙이는 규칙은 이 파일에 둔다. (ASSETS.md "CSS 수정 규칙") */

/* ---- 이미지 뷰어: 전체화면 (토스 신차 웹 CarImageViewer 모양) ---- */
.image-viewer-backdrop {
  padding: 0;
  display: block;
  touch-action: none;
}
.image-viewer {
  width: 100%;
  max-height: none;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  position: relative;
  color: #fff;
}
.image-viewer-close {
  top: calc(env(safe-area-inset-top, 0px) + 4px);
  right: auto;
  left: 8px;
  z-index: 2;
  background: transparent;
}
.image-viewer-close:hover {
  background: #ffffff1f;
}
.image-viewer-count {
  top: calc(env(safe-area-inset-top, 0px) + 16px);
  bottom: auto;
  z-index: 2;
  background: transparent;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.image-viewer-stage {
  flex: 1 1 0;
  min-height: 0;
  margin-top: calc(env(safe-area-inset-top, 0px) + 52px);
  position: relative;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.image-viewer-stage.is-zoomed {
  cursor: grab;
}
.image-viewer-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.image-viewer-slide .image-viewer-img {
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  border-radius: 0;
  object-fit: contain;
  transition: transform 0.2s ease;
}
.image-viewer-nav {
  z-index: 2;
  top: calc(50% - 40px);
}
.image-viewer-thumbs {
  flex: none;
  display: flex;
  gap: 6px;
  padding: 12px 12px calc(env(safe-area-inset-bottom, 0px) + 20px);
  overflow-x: auto;
  scrollbar-width: none;
}
.image-viewer-thumbs::-webkit-scrollbar {
  display: none;
}
.image-viewer-thumb {
  flex: none;
  width: 56px;
  height: 56px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 8px;
  opacity: 0.45;
}
.image-viewer-thumb[aria-current='true'] {
  border-color: #1695fd;
  opacity: 1;
}
.image-viewer-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.image-viewer-caption {
  flex: none;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 16px 0;
}
.image-viewer-thumb {
  position: relative;
}
.image-viewer-thumb-label {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 8px 0 3px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  background: linear-gradient(transparent, #000c);
  pointer-events: none;
}
.image-viewer-hint {
  font-size: 12px;
  color: #ffffff99;
}

/* ---- 상세 메인 사진: 옆으로 흘러가며 바뀐다 ----
   새 사진(.entering)은 오른쪽 바깥에서 대기하다가 불러와지면(.is-ready) 들어오고,
   같은 순간 이전 사진(.leaving)이 왼쪽으로 밀려난다. 새 사진이 .leaving 보다 앞에 있어야 ~ 선택자가 동작한다. */
.dt-gallery .dt-main-view {
  position: relative;
}
.dt-gallery .dt-main-photo-entering,
.dt-gallery .dt-main-photo-leaving {
  position: absolute;
  inset: 0;
}
.dt-gallery .dt-main-photo-entering {
  z-index: 1;
  animation: none;
  transform: translateX(100%);
}
.dt-gallery .dt-main-photo-entering.is-ready {
  animation: dtPhotoSlideIn 0.55s cubic-bezier(0.22, 0.8, 0.24, 1) both;
}
.dt-gallery .dt-main-photo-entering.is-ready ~ .dt-main-photo-leaving {
  animation: dtPhotoSlideOut 0.55s cubic-bezier(0.22, 0.8, 0.24, 1) both;
}
@keyframes dtPhotoSlideIn {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}
@keyframes dtPhotoSlideOut {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}
