/* ============================================================================
   v4/css/detail-db.css — v4/detail.php (실 DB 상세 · 2단계) 전용 추가 스타일
   ----------------------------------------------------------------------------
   · detail.css 를 대체하지 않습니다. detail.css 가 이미 정의한 .dt-* 규칙 위에,
     이 페이지에만 필요한 것(약정별 요금 표 · 오류 안내 · 상세 컷 여러 장)만 더합니다.
   · 화면 톤은 detail.css 와 같습니다: 글자 12 / 13.5 / 15 / 18 / 24 / 34px,
     무게 400 / 600 / 700 / 800, #111 · #444 · #8a8f98 · 테두리 #e3e5e9,
     포인트 컬러 #ea1917 하나.
   · 모든 규칙을 .v4-detail 스코프 안에 둡니다(다른 페이지에 영향 없음).
   ============================================================================ */

/* ---------------------------------------------------------------------------
   1. 약정별 월 렌탈료 표
   --------------------------------------------------------------------------- */
.v4-detail .dt-planbox {
  border: 1px solid #e3e5e9;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}
.v4-detail .dt-planbox--empty {
  padding: 20px 18px;
}
.v4-detail .dt-planbox--empty p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: #444;
  word-break: keep-all;
}
.v4-detail .dt-plan {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  color: #444;
}
.v4-detail .dt-plan__caption {
  padding: 14px 18px 12px;
  text-align: left;
  font-size: 12px;
  line-height: 1.55;
  color: #8a8f98;
  word-break: keep-all;
}
.v4-detail .dt-plan thead th {
  padding: 9px 18px;
  border-top: 1px solid #eef0f3;
  border-bottom: 1px solid #eef0f3;
  background: #fafbfc;
  font-size: 12px;
  font-weight: 600;
  color: #8a8f98;
  text-align: left;
  white-space: nowrap;
}
.v4-detail .dt-plan thead th:nth-child(2),
.v4-detail .dt-plan thead th:nth-child(3) { text-align: right; }
.v4-detail .dt-plan tbody th,
.v4-detail .dt-plan tbody td {
  padding: 13px 18px;
  border-bottom: 1px solid #f4f5f7;
  vertical-align: middle;
}
.v4-detail .dt-plan tbody th {
  font-size: 15px;
  font-weight: 700;
  color: #111;
  text-align: left;
  white-space: nowrap;
}
.v4-detail .dt-plan tbody td {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.v4-detail .dt-plan tbody td strong {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #111;
}
.v4-detail .dt-plan tbody tr:last-child th,
.v4-detail .dt-plan tbody tr:last-child td { border-bottom: 0; }
.v4-detail .dt-plan tbody tr.is-rep { background: #fdf7f7; }
.v4-detail .dt-plan__badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  margin-left: 6px;
  padding: 0 7px;
  border-radius: 5px;
  background: #fdecec;
  color: #ea1917;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.02em;
  vertical-align: middle;
}
.v4-detail .dt-plan__note {
  margin: 0;
  padding: 14px 18px 16px;
  border-top: 1px solid #eef0f3;
  font-size: 12px;
  line-height: 1.65;
  color: #8a8f98;
  word-break: keep-all;
}

/* ---------------------------------------------------------------------------
   2. 상세 설명 이미지 여러 장 — 위에서 아래로 이어 붙입니다.
   --------------------------------------------------------------------------- */
.v4-detail .dt-detailimg + .dt-detailimg { margin-top: 0; }
.v4-detail .dt-detailimg img + img {
  border-top: 1px solid #f4f5f7;
}

/* ---------------------------------------------------------------------------
   3. 잘못된 주소·없는 상품 안내 (404)
   --------------------------------------------------------------------------- */
.v4-detail .dt-errorbox {
  margin: 18px 0 40px;
  padding: 48px 24px;
  border: 1px solid #e3e5e9;
  border-radius: 16px;
  background: #fafbfc;
  text-align: center;
}
.v4-detail .dt-errorbox__title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #111;
}
.v4-detail .dt-errorbox__text {
  margin: 10px auto 0;
  max-width: 640px;
  font-size: 13.5px;
  line-height: 1.7;
  color: #444;
  word-break: keep-all;
}
.v4-detail .dt-errorbox__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}
.v4-detail .dt-errorbox__hint {
  margin: 16px 0 0;
  font-size: 12px;
  color: #8a8f98;
}
.v4-detail .dt-errorbox__hint a { color: #444; }

/* ---------------------------------------------------------------------------
   3-1. 약정 선택 버튼 — 주문(가격) 영역에서 약정 개월수를 실제로 고르는 UI.
        선택 값(data-months/data-monthly)은 서버가 rental_prices 에서 읽어 내려준다.
        동작은 v4/js/detail-rental.js (이 페이지에서만 불러온다).
   --------------------------------------------------------------------------- */
.v4-detail .dt-planpick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 14px;
}
.v4-detail .dt-planpick__opt {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 14px;
  border: 1px solid #e3e5e9;
  border-radius: 10px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease;
}
.v4-detail .dt-planpick__opt:hover { border-color: #111; }
.v4-detail .dt-planpick__opt.is-active { border-color: #111; background: #111; }
.v4-detail .dt-planpick__m { font-size: 14px; font-weight: 700; color: #111; letter-spacing: -0.02em; }
.v4-detail .dt-planpick__om { font-size: 11.5px; font-weight: 600; color: #8a8f98; }
.v4-detail .dt-planpick__opt.is-active .dt-planpick__m { color: #fff; }
.v4-detail .dt-planpick__opt.is-active .dt-planpick__om { color: rgba(255, 255, 255, .72); }
.v4-detail .dt-planpick__opt:focus-visible { outline: 2px solid #111; outline-offset: 2px; }
.v4-detail .dt-price__label strong { color: #444; font-weight: 700; }
.v4-detail .dt-price__sub strong { color: #444; font-variant-numeric: tabular-nums; }
/* 약정 표에 의무 사용기간 열이 늘었으므로 오른쪽 정렬 범위를 4열로 맞춘다 */
.v4-detail .dt-plan thead th:nth-child(2),
.v4-detail .dt-plan thead th:nth-child(3),
.v4-detail .dt-plan thead th:nth-child(4) { text-align: right; }

/* ---------------------------------------------------------------------------
   4. 좁은 화면
   --------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .v4-detail .dt-plan { font-size: 12.5px; }
  .v4-detail .dt-plan__caption { padding: 12px 14px 10px; }
  .v4-detail .dt-plan thead th,
  .v4-detail .dt-plan tbody th,
  .v4-detail .dt-plan tbody td { padding: 11px 12px; }
  .v4-detail .dt-plan tbody th { font-size: 13.5px; }
  .v4-detail .dt-plan tbody td strong { font-size: 15px; }
  .v4-detail .dt-plan__note { padding: 12px 14px 14px; }
  .v4-detail .dt-errorbox { padding: 34px 16px; }
  .v4-detail .dt-errorbox__title { font-size: 20px; }
  .v4-detail .dt-planpick { gap: 5px; }
  .v4-detail .dt-planpick__opt { padding: 7px 11px; }
  .v4-detail .dt-planpick__m { font-size: 13px; }
}

/* ---------------------------------------------------------------------------
   5. 상세 본문 이미지 폭 — 헤더·메뉴 컨테이너 폭에 맞춤 (2026-11-23)
      · 기준 폭: .v4-inner = max-width 1248 - 좌우 24 = 콘텐츠 1200px
        (헤더 로고 줄 .v4-head__util-in / 메뉴 줄 .v4-head__gnb-in 실측 1200,
         1440 뷰포트에서 x 88.5 + padding 24 = 본문 시작 112.5)
      · detail.css 의 .dt-detailimg max-width:860px 를 본문 폭(1200)으로 올려
        상세 컷을 헤더와 같은 폭에 꽉 채우고, 남는 폭은 좌우 auto 로 중앙 정렬.
      · 1248px 미만 화면에서는 .v4-inner 가 화면 폭을 쓰므로 width:100% 가
        그대로 따라가고(모바일 390 가로 스크롤 없음), max-width:1200px 는
        넓은 화면에서만 상한으로 작동한다.
   --------------------------------------------------------------------------- */
.v4-detail .dt-detailimg {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}
.v4-detail .dt-detailimg img {
  display: block;
  width: 100%;
  max-width: 1200px;
  height: auto;
  margin: 0 auto;
}
.v4-detail .dt-detailimg__note {
  max-width: 1200px;
}

/* ---------------------------------------------------------------------------
   6. 상세 페이지 본문 컨테이너 폭 = 헤더와 같은 1200 (2026-11-23)
      · 헤더(.v4-head .v4-inner)는 1248 박스 − 좌우 24 = 콘텐츠 1200 으로
        맞춰져 있는데, 본문 .v4-inner 는 1200 박스 − 좌우 24 = 1152 로
        24px 씩 좁아 상세컷이 헤더보다 안쪽에서 시작하고 있었습니다.
      · 이 페이지(.v4-detail) 안에서만 본문 컨테이너를 헤더와 같은 1248 박스로
        올려, 상세컷·제목·표가 모두 헤더 콘텐츠(1200)와 같은 시작점을 쓰게 합니다.
      · 1248px 미만 화면에서는 좌우 20px 여백 그대로(가로 스크롤 없음).
      · 전체 폭 규칙은 v4/css/v4-width-1200.css·css/header-base.css 소관이므로
        그 파일은 건드리지 않고, 이 페이지 전용 CSS 에서만 덮어씁니다.
   --------------------------------------------------------------------------- */
@media (min-width: 1248px) {
  .v4-detail .v4-inner {
    max-width: 1248px !important;
  }
}
