/* ==========================================================
   CULTRA 제품 상세 페이지 공통 스타일 (site/products/*.html)
   - 공통(초기화·색·폰트·네비·푸터)은 style.css
   - 상세 9개가 같은 구성을 쓰므로 이 파일 하나로 관리
   구성: 머리(경로 → CT 코드 → 제품 종류 영문) → 큰 사진 → 소개 글 → 특징 → 성능·제작 사이즈 → 단면도 → 사진
   ========================================================== */

.pd {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 72px;
}

/* 머리: style.css의 공통 페이지 머리(.page-head) 그대로
   경로(Products / 분류 / 제품, Home 없음) → 제목(CT 코드) → 소개 문구(제품 종류 영문) */
.pd-head { padding-top: calc(var(--nav-height) + 24px); }

/* 경로 고정 바 (product-detail.js): 머리의 경로가 메뉴 뒤로 지나가면 메뉴 바로 아래에 같은 경로를 띄움 (사용자 결정)
   높이 약 40px. 메뉴와 같은 반투명 흰 배경. 높이가 아주 낮은 화면(가로로 눕힌 휴대폰)에서는 띄우지 않음 */
.pd-crumbbar {
  position: fixed;
  left: 0; right: 0;
  top: var(--nav-height);
  z-index: 90;                       /* 메뉴(100) 아래 */
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--hairline);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
}
.pd-crumbbar-on .pd-crumbbar {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s;
}
.pd-crumbbar-on nav.scrolled { border-bottom-color: transparent; }   /* 메뉴·경로 바 사이 선이 두 줄로 보이지 않게 */
.pd-crumbbar-in { max-width: 1440px; margin: 0 auto; padding: 12px 72px; }
/* 키보드로 이동할 때 초점이 메뉴·경로 바 뒤에 가리지 않게 */
html { scroll-padding-top: calc(var(--nav-height) + 56px); }
@media (max-height: 480px) {
  .pd-crumbbar { display: none; }
  .pd-crumbbar-on nav.scrolled { border-bottom-color: var(--hairline); }
  html { scroll-padding-top: calc(var(--nav-height) + 16px); }
}
@media (prefers-reduced-motion: reduce) {
  .pd-crumbbar, .pd-crumbbar-on .pd-crumbbar { transition: none; transform: none; }
}

/* ── 첫 사진 (현장명 캡션 없음) ── */
.pd-hero img {
  width: 100%;
  height: auto;                      /* img의 height 속성보다 아래 비율이 우선하게 */
  aspect-ratio: 21 / 10;
  object-fit: cover;
  display: block;
  opacity: 0;
  animation: pdImgIn 1.2s ease 0.1s forwards;
}
@keyframes pdImgIn { to { opacity: 1; } }

/* 사진 대신 렌더로 시작하는 제품 (실제 시공 사진이 생기면 사진으로 교체) */
.pd-hero--render img {
  aspect-ratio: 21 / 9;
  object-fit: contain;
}

/* ── 소개 글 (사진 아래. 제목은 위 머리에 있으므로 중복하지 않음) ── */
.pd-intro {
  padding: 56px 0 72px;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 1s ease 0.3s forwards;
}
.pd-body p {
  max-width: 34em;
  font-size: clamp(13px, 0.95vw, 15px);
  line-height: 1.95;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  margin-bottom: 20px;
  text-wrap: balance;
}
.pd-body p:last-child { margin-bottom: 0; }

/* ── 구역 공통 ── */
.pd-sec {
  padding: 72px 0;
  border-top: 1px solid var(--hairline);
}
.pd-label {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
  margin-bottom: 32px;
}

/* ── 렌더와 특징 ── */
.pd-feat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.pd-feat-img { aspect-ratio: 4 / 3; }
.pd-feat-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.pd-feat-list { list-style: none; counter-reset: feat; }
.pd-feat-list li {
  counter-increment: feat;
  padding: 22px 0;
  border-top: 1px solid var(--hairline);
}
.pd-feat-list li:last-child { border-bottom: 1px solid var(--hairline); }
.pd-feat-list h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}
.pd-feat-list h3::before {
  content: counter(feat, decimal-leading-zero);
  margin-right: 12px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
}
.pd-feat-list p {
  max-width: 34em;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--ink-soft);
}
/* 렌더가 첫 화면에 이미 있는 제품: 특징만 두 줄로 */
.pd-feat--text { grid-template-columns: 1fr; }
.pd-feat--text .pd-feat-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 56px;
}
.pd-feat--text .pd-feat-list li:nth-last-child(2) { border-bottom: 1px solid var(--hairline); }

/* ── 성능 · 제작 사이즈 ── */
.pd-spec {
  width: 100%;
  max-width: 760px;
  border-collapse: collapse;
}
.pd-spec th,
.pd-spec td {
  text-align: left;
  font-weight: 400;
  font-size: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
  vertical-align: baseline;
}
.pd-spec tr:first-child th,
.pd-spec tr:first-child td { border-top: 1px solid var(--ink); }
.pd-spec th {
  width: 50%;
  padding-right: 16px;
  color: var(--ink-soft);
}
.pd-spec th small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: rgba(10,10,10,0.58);      /* 작은 글자 대비 4.5:1 이상 */
}
.pd-spec td {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.pd-note {
  max-width: 760px;
  margin-top: 16px;
  font-size: 12px;
  line-height: 1.8;
  color: rgba(10,10,10,0.58);
}

/* ── 단면도 ── */
.pd-draw {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 2.4fr);
  gap: 56px;                         /* 회색 판이 없어져서 두 도면 사이를 넓혀 구분 */
}
.pd-draw--single { grid-template-columns: 1fr; }
.pd-draw figure {
  display: flex;
  flex-direction: column;
  padding: 0;
  background: none;                  /* 도면 배경 투명 — 페이지 흰 바탕 그대로 (사용자 결정) */
}
.pd-draw .pd-draw-img {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pd-draw img {
  max-width: 100%;
  height: auto;
  display: block;
  mix-blend-mode: multiply;          /* 도면의 흰 바탕이 페이지 배경에 녹아들게 (배경이 흰색이 아니어도 투명처럼 보임) */
}
.pd-draw--single img { max-width: min(100%, 960px); }
.pd-draw-v img { width: auto; max-height: 640px; }   /* 세로로 긴 단면도가 너무 길어지지 않게 */
.pd-draw figcaption {
  margin-top: 20px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.pd-draw figcaption b {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink);
}

/* ── 두 번째 사진 (원래 비율 그대로, 오른쪽 정렬) ── */
.pd-photo img {
  width: min(100%, 720px);
  height: auto;
  margin-left: auto;
  display: block;
}

/* ── 모바일 (768px 이하) ── */
@media (max-width: 768px) {
  .pd { padding: 0 32px; }
  .pd-head { padding-top: calc(var(--nav-height) + 16px); }
  .pd-crumbbar-in { padding: 12px 32px; }
  .pd-hero img { aspect-ratio: 4 / 3; }
  .pd-hero--render img { aspect-ratio: 4 / 3; }
  .pd-intro { padding: 32px 0 48px; }
  .pd-sec { padding: 48px 0; }
  .pd-feat { grid-template-columns: 1fr; gap: 28px; }
  .pd-feat--text .pd-feat-list { grid-template-columns: 1fr; }
  .pd-feat--text .pd-feat-list li:nth-last-child(2) { border-bottom: 0; }
  .pd-draw { grid-template-columns: 1fr; }
  .pd-draw { gap: 40px; }
  .pd-draw-v img { max-height: 440px; }
  .pd-photo img { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .pd-hero img, .pd-intro { animation: none; opacity: 1; transform: none; }
}
