/* =============================================================
   package-detail.css — C3 프로그램(패키지) 상세(/programs/{id}) 페이지 전용
   시안: Figma TheKKOT-yhlee · node 23:1625(모바일 393).
   데스크탑 시안은 없음 — C3 시술 상세(treatment-detail.css)와 같은 2단 패턴.

   모바일: 히어로 풀블리드 + 앵커 탭 sticky + 하단 상담/예약 버튼 바(bottomBtn).
   데스크탑: 본문(좌) + 고정 카드(우). 탭·버튼 바는 사라진다.
   ============================================================= */

/* ---------------------------------------------------------------
   히어로 이미지 (시안 306px 풀블리드)
   --------------------------------------------------------------- */
.pd-hero {
  margin: 0 calc(-1 * var(--kb-frame-pad));
}

.pd-hero img {
  width: 100%;
  height: 306px;
  object-fit: cover;
  background: var(--kb-gray-50);
}

/* ---------------------------------------------------------------
   프로그램명 + 핵심 메타 (시안 상세 top · px16 py30 · gap 16/8)
   --------------------------------------------------------------- */
.pd-top {
  padding: 30px 0;
}

.pd-title {
  color: var(--kb-gray-900);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 30px;
}

.pd-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.pd-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--kb-gray-600);
  font-size: 0.8125rem;
  font-weight: 500;
}

.pd-meta-row::before {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background: currentColor;
}

.pd-icon-clock::before {
  -webkit-mask: url("../img/treatment/icon/icon-clock.svg") center / contain no-repeat;
  mask: url("../img/treatment/icon/icon-clock.svg") center / contain no-repeat;
}

.pd-icon-level::before {
  -webkit-mask: url("../img/treatment/icon/icon-level.svg") center / contain no-repeat;
  mask: url("../img/treatment/icon/icon-level.svg") center / contain no-repeat;
}

.pd-icon-hospital::before {
  -webkit-mask: url("../img/program/icon/icon-hospital.svg") center / contain no-repeat;
  mask: url("../img/program/icon/icon-hospital.svg") center / contain no-repeat;
}

/* division 밴드도 모바일 풀블리드 */
main .t-division {
  margin: 0 calc(-1 * var(--kb-frame-pad));
}

/* ---------------------------------------------------------------
   모바일 앵커 탭 — 헤더(50px) 아래 sticky (시안 상세 탭그룹)
   --------------------------------------------------------------- */
.pd-tabs {
  position: sticky;
  top: 50px;
  z-index: 30;
  display: flex;
  gap: 12px;
  margin: 0 calc(-1 * var(--kb-frame-pad));
  padding: 0 var(--kb-frame-pad);
  background: var(--kb-white);
  border-bottom: 1px solid var(--kb-gray-300);
}

.pd-tabs a {
  padding: 16px 2px;
  color: var(--kb-gray-500);
  font-size: 1rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.pd-tabs a.is-current {
  color: var(--kb-gray-900);
  font-weight: 700;
  border-bottom-color: var(--kb-gray-900);
}

/* ---------------------------------------------------------------
   본문 섹션 (시안 py24 · 제목 18 SemiBold · gap 12)
   --------------------------------------------------------------- */
.pd-section {
  padding: 24px 0;
  scroll-margin-top: 110px; /* sticky 헤더+탭에 가리지 않게 */
}

.pd-section h2 {
  color: var(--kb-gray-900);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.pd-copy {
  color: var(--kb-gray-600);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 22px;
  white-space: pre-line; /* 운영자가 넣은 줄바꿈 유지 */
}

/* ---------------------------------------------------------------
   구성 — 시술 카드 (시안 프로그램 구성 리스트 · 84px 사진 + 화살표)
   --------------------------------------------------------------- */
.pd-treatments {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pd-treatment-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: var(--kb-white);
  border: 1px solid var(--kb-gray-300);
  border-radius: var(--kb-radius);
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.1);
}

.pd-treatment-photo {
  flex: none;
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: var(--kb-radius);
  background: var(--kb-gray-50);
}

.pd-treatment-body {
  flex: 1;
  min-width: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.pd-treatment-body > span:first-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pd-treatment-name {
  color: var(--kb-gray-800);
  font-size: 1rem;
  font-weight: 700;
}

.pd-treatment-desc {
  color: var(--kb-gray-600);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 18px;
  /* 카드 높이를 지키기 위해 2줄에서 자른다 (시안 2줄) */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pd-treatment-duration {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--kb-gray-800);
  font-size: 0.8125rem;
  font-weight: 600;
}

.pd-treatment-duration::before {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background: currentColor;
}

.pd-treatment-arrow {
  flex: none;
  width: 12px;
  height: 12px;
  background: var(--kb-gray-500);
  -webkit-mask: url("../img/program/icon/icon-arrow-right.svg") center / contain no-repeat;
  mask: url("../img/program/icon/icon-arrow-right.svg") center / contain no-repeat;
}

/* ---------------------------------------------------------------
   포함 · 불포함 (시안 포함불포함 · +/− 원형 아이콘)
   --------------------------------------------------------------- */
.pd-inclusion {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.pd-inclusion h3 {
  color: var(--kb-gray-800);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 12px;
}

.pd-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pd-items li {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--kb-gray-700);
  font-size: 0.875rem;
  font-weight: 500;
}

.pd-items li::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  background: var(--kb-gray-700);
}

.pd-items-included li::before {
  -webkit-mask: url("../img/program/icon/icon-add-circle.svg") center / contain no-repeat;
  mask: url("../img/program/icon/icon-add-circle.svg") center / contain no-repeat;
}

.pd-items-excluded li::before {
  -webkit-mask: url("../img/program/icon/icon-minus-circle.svg") center / contain no-repeat;
  mask: url("../img/program/icon/icon-minus-circle.svg") center / contain no-repeat;
}

/* ---------------------------------------------------------------
   진행 병원 — C1 병원 카드와 같은 구성 (80px 사진 · 언어 뱃지)
   --------------------------------------------------------------- */
.pd-hospitals {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pd-hospital {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pd-hospital > img {
  flex: none;
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--kb-radius);
  background: var(--kb-gray-100);
}

.pd-hospital-body {
  flex: 1;
  min-width: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px 0;
}

.pd-hospital-location {
  color: var(--kb-gray-600);
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 6px;
}

.pd-hospital-name {
  color: var(--kb-gray-800);
  font-size: 1rem;
  font-weight: 700;
}

.pd-hospital-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* ---------------------------------------------------------------
   예약 안내 — 체크리스트 + 면책 박스 (시안 예약 안내)
   --------------------------------------------------------------- */
.pd-checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pd-checklist li {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--kb-gray-700);
  font-size: 0.875rem;
  font-weight: 500;
}

.pd-checklist li::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  background: var(--kb-gray-700);
  -webkit-mask: url("../img/treatment/icon/icon-check.svg") center / contain no-repeat;
  mask: url("../img/treatment/icon/icon-check.svg") center / contain no-repeat;
}

.pd-disclaimer {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--kb-gray-100);
  border-radius: var(--kb-radius);
  background: var(--kb-gray-50);
  color: var(--kb-gray-500);
  font-size: 0.8125rem;
  font-weight: 500;
}

/* ---------------------------------------------------------------
   하단 고정 상담/예약 버튼 바 (시안 bottomBtn · 모바일·태블릿)
   --------------------------------------------------------------- */
.pd-bottombar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  gap: 8px;
  padding: 12px var(--kb-frame-pad) calc(12px + env(safe-area-inset-bottom));
  background: var(--kb-white);
  border-top: 1px solid var(--kb-gray-300);
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
}

.pd-bottombar .t-fab-form {
  display: contents;
}

.pd-btn-consult,
.pd-btn-book {
  flex: 1;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--kb-radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.pd-btn-consult {
  background: var(--kb-white);
  border: 1px solid var(--kb-main);
  color: var(--kb-main-600);
}

.pd-btn-consult:hover {
  background: var(--kb-main-50);
}

/* 버튼 바에 가리지 않게 본문 바닥 여백 (footer 는 셸 공통) */
.pd-layout {
  padding-bottom: 24px;
}

body:has(.pd-bottombar) .kb-footer {
  margin-bottom: 92px;
}

/* ---------------------------------------------------------------
   태블릿 — 히어로만 조금 키운다 (C3 과 동일)
   --------------------------------------------------------------- */
@media (min-width: 560px) {
  .pd-hero img {
    height: 360px;
  }
}

/* ---------------------------------------------------------------
   데스크탑 — 본문(좌) + 고정 카드(우) 2단 (C3 9:486 패턴)
   --------------------------------------------------------------- */
@media (min-width: 1100px) {
  .pd-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 384px;
    gap: 20px;
    align-items: start;
    padding-top: 50px;
    padding-bottom: 30px;
  }

  .pd-hero {
    margin: 0;
  }

  .pd-hero img {
    height: 480px;
    border-radius: 12px;
  }

  .pd-section {
    padding: 30px 0;
  }

  #pd-info h2 {
    font-size: 1.25rem;
  }

  /* 모바일 전용 요소 제거 */
  .pd-bottombar {
    display: none;
  }

  body:has(.pd-bottombar) .kb-footer {
    margin-bottom: 0;
  }

  /* 우측 고정 카드 */
  .pd-aside {
    position: sticky;
    top: 90px;
  }

  .pd-aside-card {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 30px 24px;
    border: 1px solid var(--kb-gray-300);
    border-radius: 12px;
    background: var(--kb-white);
  }

  .pd-aside-head .pd-title {
    font-size: 1.5rem;
  }

  .pd-cta-row {
    display: flex;
    gap: 8px;
  }

  .pd-cta-row .pd-btn-consult,
  .pd-cta-row .pd-btn-book {
    height: 52px;
  }
}
