/* ============================================================================
   v4/css/detail.css — 상품 상세 페이지(detail.html) v1
   ----------------------------------------------------------------------------
   · 이 파일은 상세 페이지에서만 읽습니다. 다른 페이지 CSS(main.css / shop.css /
     new-main.css / header-v6.css / v4-width-1200.css / appliance-list.css)는
     건드리지 않고, 모든 규칙을 .v4-detail 스코프 안에만 둡니다.
   · 화면 톤은 v4 가전 목록(appliance-list.css)과 같게 맞췄습니다.
     글자 12 / 13.5 / 15 / 18 / 24 / 34px 여섯 단계, 무게 400 / 600 / 700 / 800,
     회색 #111(제목) / #444(본문) / #8a8f98(보조), 테두리 #e3e5e9,
     포인트 컬러는 #ea1917 하나만 씁니다(섹션 제목 왼쪽 바).
   · 본문 폭은 v4-width-1200.css 의 1200(.v4-inner 1248 − 좌우 24)을 그대로
     쓰고, 그 안에서 2단(좌 이미지 500 / 우 정보) → 960px 이하 1단입니다.
   · 이 파일을 지우면 페이지는 스타일 없는 기본 마크업으로 돌아갑니다.
   ============================================================================ */

/* ---------------------------------------------------------------------------
   0. new-main.css 의 `.v4-detail { display:grid; ... }` 는 pages.js 가 그리던
      옛 상세 화면의 2단 그리드입니다. 이 페이지에서는 <main> 이 같은 클래스를
      쓰므로, main 자체는 블록으로 되돌리고 2단은 .dt-top 이 맡습니다.
   --------------------------------------------------------------------------- */
.v4-detail.v4-page {
  display: block;
  grid-template-columns: none;
  gap: 0;
}

/* ---------------------------------------------------------------------------
   1. 위치 표시
   --------------------------------------------------------------------------- */
.v4-detail .dt-crumb {
  margin: 0 0 20px;
  font-size: 12px;
  color: #8a8f98;
}
.v4-detail .dt-crumb a { color: #8a8f98; text-decoration: none; }
.v4-detail .dt-crumb a:hover { color: #111; }
.v4-detail .dt-crumb strong {
  font-weight: 600;
  color: #444;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 60%;
}

/* ---------------------------------------------------------------------------
   2. 상단 2단 — 좌 이미지 / 우 정보
   --------------------------------------------------------------------------- */
.v4-detail .dt-top {
  display: grid;
  grid-template-columns: minmax(0, 500px) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
@media (max-width: 1100px) {
  .v4-detail .dt-top { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 32px; }
}

/* 2-1. 이미지 */
.v4-detail .dt-gallery { min-width: 0; }
.v4-detail .dt-gallery__main {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  padding: 28px;
  border: 1px solid #e9ebee;
  border-radius: 16px;
  background: #fff;
}
.v4-detail .dt-gallery__main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.v4-detail .dt-gallery__main.is-noimg img { display: none; }
.v4-detail .dt-gallery__main.is-noimg::after {
  content: "이미지 준비 중";
  font-size: 13.5px;
  color: #b9bec6;
}

.v4-detail .dt-gallery__thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.v4-detail .dt-gallery__thumbs[hidden] { display: none; }
.v4-detail .dt-thumb {
  width: 78px;
  height: 78px;
  padding: 6px;
  border: 1px solid #e3e5e9;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.v4-detail .dt-thumb.is-active { border-color: #111; }
.v4-detail .dt-thumb img { width: 100%; height: 100%; object-fit: contain; }

/* 2-2. 정보 */
.v4-detail .dt-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding-top: 2px;
}
.v4-detail .dt-info__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  color: #8a8f98;
}
.v4-detail .dt-info__kind {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: #f1f2f4;
  color: #444;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.v4-detail .dt-info__kind.is-rental { background: #fdecec; color: #ea1917; }

.v4-detail .dt-info__name {
  margin: 10px 0 0;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.04em;
  color: #111;
  word-break: keep-all;
}
.v4-detail .dt-info__model {
  margin: 10px 0 0;
  font-size: 13.5px;
  color: #8a8f98;
  word-break: break-all;
}
.v4-detail .dt-info__model span { color: #444; font-weight: 600; }

/* 가격 블록 */
.v4-detail .dt-price {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 22px;
  padding: 18px 0;
  border-top: 1px solid #e3e5e9;
  border-bottom: 1px solid #e3e5e9;
}
.v4-detail .dt-price__label {
  font-size: 12px;
  font-weight: 600;
  color: #8a8f98;
  line-height: 1.3;
}
.v4-detail .dt-price__row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 4px 0 0;
  line-height: 1.15;
}
.v4-detail .dt-price__num {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #111;
}
.v4-detail .dt-price__unit { font-size: 15px; font-weight: 600; color: #444; }
.v4-detail .dt-price__ask { font-size: 24px; font-weight: 800; color: #111; letter-spacing: -0.03em; }
.v4-detail .dt-price__cond { margin: 8px 0 0; font-size: 13.5px; font-weight: 600; color: #444; }
.v4-detail .dt-price__sub { margin: 2px 0 0; font-size: 12px; line-height: 1.5; color: #8a8f98; }

/* 조건 칩 */
.v4-detail .dt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.v4-detail .dt-chips[hidden] { display: none; }
.v4-detail .dt-chips li {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border: 1px solid #e3e5e9;
  border-radius: 999px;
  background: #fff;
  color: #444;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* 상담 CTA */
.v4-detail .dt-cta {
  display: flex;
  gap: 8px;
  margin-top: 22px;
}
.v4-detail .dt-btn {
  display: inline-flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  height: 54px;
  padding: 0 20px;
  border: 1px solid #111;
  border-radius: 12px;
  background: #fff;
  color: #111;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
  cursor: pointer;
  transition: background .14s ease, color .14s ease, border-color .14s ease;
}
.v4-detail .dt-btn:hover { background: #f7f8f9; }
.v4-detail .dt-btn--solid { background: #111; border-color: #111; color: #fff; }
.v4-detail .dt-btn--solid:hover { background: #000; border-color: #000; color: #fff; }

/* 유의 문구 */
.v4-detail .dt-notes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}
.v4-detail .dt-notes li {
  position: relative;
  padding-left: 9px;
  font-size: 12px;
  line-height: 1.65;
  color: #8a8f98;
  word-break: keep-all;
}
.v4-detail .dt-notes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #c9ccd1;
}

/* ---------------------------------------------------------------------------
   3. 아래 섹션 공통
   --------------------------------------------------------------------------- */
.v4-detail .dt-sec {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid #eef0f3;
}
.v4-detail .dt-sec__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.03em;
  color: #111;
}
.v4-detail .dt-sec__title::before {
  content: "";
  flex: 0 0 auto;
  width: 3px;
  height: 16px;
  border-radius: 2px;
  background: #ea1917;
}
.v4-detail .dt-sec__foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}
.v4-detail .dt-more {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 18px;
  border: 1px solid #e3e5e9;
  border-radius: 10px;
  background: #fff;
  color: #111;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.v4-detail .dt-more:hover { border-color: #111; }

/* 3-1. 상세 정보 표 */
.v4-detail .dt-spec {
  margin: 0;
  border-top: 1px solid #f1f2f4;
}
.v4-detail .dt-spec__row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid #f1f2f4;
}
.v4-detail .dt-spec dt {
  font-size: 13.5px;
  font-weight: 600;
  color: #8a8f98;
  line-height: 1.6;
}
.v4-detail .dt-spec dd {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
  color: #111;
  word-break: keep-all;
}

/* 3-2. 제휴카드 안내 박스 */
.v4-detail .dt-card-box {
  padding: 18px 20px 20px;
  border: 1px solid #e9ebee;
  border-radius: 14px;
  background: #fafbfc;
}
.v4-detail .dt-card-box > p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: #444;
  word-break: keep-all;
}
.v4-detail .dt-card-box > p strong { font-weight: 700; color: #111; }
.v4-detail .dt-card-box ul {
  display: grid;
  gap: 5px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.v4-detail .dt-card-box li {
  position: relative;
  padding-left: 12px;
  font-size: 13.5px;
  line-height: 1.65;
  color: #444;
  word-break: keep-all;
}
.v4-detail .dt-card-box li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #b9bec6;
}

/* 3-3. 배송·설치·관리 안내 */
.v4-detail .dt-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.v4-detail .dt-guide__item {
  padding: 16px 18px 18px;
  border: 1px solid #e9ebee;
  border-radius: 14px;
  background: #fff;
}
.v4-detail .dt-guide__item h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #111;
}
.v4-detail .dt-guide__item p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: #444;
  word-break: keep-all;
}

/* 3-4. 관련 상품 */
.v4-detail .dt-related {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
/* 카드가 4개보다 적으면(렌탈은 등록 상품이 4개) 그 수에 맞춰 줄을 채웁니다 */
.v4-detail .dt-related[data-n="1"] { grid-template-columns: minmax(0, 1fr); }
.v4-detail .dt-related[data-n="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.v4-detail .dt-related[data-n="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.v4-detail .dt-related:empty { display: none; }
.v4-detail .dt-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #e9ebee;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: border-color .14s ease;
}
.v4-detail .dt-card:hover { border-color: #111; }
.v4-detail .dt-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  padding: 16px;
  border-bottom: 1px solid #f4f5f7;
}
.v4-detail .dt-card__media img { width: 100%; height: 100%; object-fit: contain; }
.v4-detail .dt-card__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px 14px;
}
.v4-detail .dt-card__brand { font-size: 12px; font-weight: 600; color: #8a8f98; letter-spacing: 0; }
.v4-detail .dt-card__name {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.42;
  letter-spacing: -0.03em;
  color: #111;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.v4-detail .dt-card__model {
  font-size: 12px;
  color: #8a8f98;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.v4-detail .dt-card__price {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #111;
}
.v4-detail .dt-card__price em {
  margin-left: 2px;
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
  color: #8a8f98;
  letter-spacing: 0;
}

/* ---------------------------------------------------------------------------
   4. 좁은 화면 — 960px 이하 1단
   --------------------------------------------------------------------------- */
@media (max-width: 1240px) {
  .v4-detail .dt-related { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .v4-detail .dt-top {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }
  .v4-detail .dt-gallery__main {
    max-width: 460px;
    margin: 0 auto;
    padding: 22px;
  }
  .v4-detail .dt-gallery__thumbs { justify-content: center; max-width: 460px; margin: 10px auto 0; }
  .v4-detail .dt-info { padding-top: 0; }
  .v4-detail .dt-info__name { font-size: 24px; }
  .v4-detail .dt-price { margin-top: 18px; padding: 15px 0; }
  .v4-detail .dt-price__num { font-size: 28px; }
  .v4-detail .dt-price__ask { font-size: 21px; }
  .v4-detail .dt-guide { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 768px) {
  .v4-detail .dt-crumb { margin-bottom: 14px; }
  .v4-detail .dt-info__name { font-size: 21px; }
  .v4-detail .dt-info__model { font-size: 12px; }
  .v4-detail .dt-price__num { font-size: 24px; }
  .v4-detail .dt-price__unit { font-size: 13.5px; }
  .v4-detail .dt-chips li { height: 28px; padding: 0 10px; font-size: 11.5px; }
  .v4-detail .dt-btn { height: 50px; font-size: 13.5px; border-radius: 10px; }
  .v4-detail .dt-sec { margin-top: 28px; padding-top: 22px; }
  .v4-detail .dt-sec__title { font-size: 15px; margin-bottom: 12px; }
  .v4-detail .dt-sec__title::before { height: 14px; }
  .v4-detail .dt-spec__row { grid-template-columns: 96px minmax(0, 1fr); gap: 10px; padding: 11px 0; }
  .v4-detail .dt-spec dt { font-size: 12px; }
  .v4-detail .dt-spec dd { font-size: 13.5px; }
  .v4-detail .dt-card-box { padding: 15px 16px 17px; }
  .v4-detail .dt-card-box > p,
  .v4-detail .dt-card-box li { font-size: 12px; }
  .v4-detail .dt-guide__item { padding: 14px 15px 15px; }
  .v4-detail .dt-guide__item h3 { font-size: 13.5px; }
  .v4-detail .dt-guide__item p { font-size: 12px; }
  .v4-detail .dt-related { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .v4-detail .dt-related[data-n="3"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v4-detail .dt-card__media { padding: 12px; }
  .v4-detail .dt-card__body { padding: 10px 11px 12px; }
  .v4-detail .dt-card__name { font-size: 12px; }
  .v4-detail .dt-card__price { font-size: 13.5px; }
  .v4-detail .dt-sec__foot { margin-top: 12px; }
  .v4-detail .dt-more { height: 40px; font-size: 12px; }
}
@media (max-width: 560px) {
  .v4-detail .dt-cta { flex-direction: column; }
  .v4-detail .dt-btn { flex: 0 0 auto; width: 100%; }
}

/* ---------------------------------------------------------------------------
   v2 에서 더한 규칙 — 갤러리 안내문 · 가격 범위 · 제품컷+스펙 2단 · 상세 통이미지
   (v1 규칙은 위에 그대로 두고 이 블록만 뒤에 붙습니다. 모두 .v4-detail 스코프)
   --------------------------------------------------------------------------- */

/* 갤러리 아래 대체 이미지 안내 */
.v4-detail .dt-gallery__note {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: #8a8f98;
  word-break: keep-all;
}
.v4-detail .dt-gallery__note[hidden] { display: none; }

/* 월 렌탈료 범위 표기 */
.v4-detail .dt-price__range {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #444;
}

/* 상품 정보 — 통이미지가 없을 때 제품컷(좌) + 스펙 표(우) */
.v4-detail .dt-specbox { display: block; }
.v4-detail .dt-specbox.is-split {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.v4-detail .dt-specbox__media {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  padding: 18px;
  border: 1px solid #e9ebee;
  border-radius: 14px;
  background: #fff;
}
.v4-detail .dt-specbox__media[hidden] { display: none; }
.v4-detail .dt-specbox__media img { width: 100%; height: 100%; object-fit: contain; }

/* 제조사 표기 스펙 묶음 */
.v4-detail .dt-spec__group { margin-top: 22px; }
.v4-detail .dt-spec__group[hidden] { display: none; }
.v4-detail .dt-subtitle {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #111;
}
.v4-detail .dt-subtitle span {
  font-size: 12px;
  font-weight: 600;
  color: #8a8f98;
}
.v4-detail .dt-spec--maker .dt-spec__row { padding: 11px 0; }
.v4-detail .dt-spec--maker dd { font-weight: 400; }

/* 상세 통이미지 — 세로로 이어 붙임(제조사 상세페이지형) */
.v4-detail .dt-detailimg {
  max-width: 860px;
  margin: 0 auto;
  border: 1px solid #eef0f3;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.v4-detail .dt-detailimg img {
  display: block;
  width: 100%;
  height: auto;
}
.v4-detail .dt-detailimg__note {
  max-width: 860px;
  margin: 10px auto 0;
  font-size: 12px;
  line-height: 1.6;
  color: #8a8f98;
  word-break: keep-all;
}

.v4-detail .dt-spec dt { word-break: keep-all; }
.v4-detail .dt-spec--maker .dt-spec__row { grid-template-columns: 190px minmax(0, 1fr); }
.v4-detail .dt-thumb { width: 74px; height: 74px; }

/* 좁은 화면 */
@media (max-width: 960px) {
  .v4-detail .dt-specbox.is-split {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .v4-detail .dt-specbox__media { max-width: 260px; margin: 0 auto; }
}
@media (max-width: 768px) {
  .v4-detail .dt-spec--maker .dt-spec__row { grid-template-columns: 104px minmax(0, 1fr); }
  .v4-detail .dt-price__range { font-size: 17px; }
  .v4-detail .dt-detailimg { border-radius: 10px; }
}
