/* ============================================================
   class-detail.css — 클래스 상세 페이지
   ============================================================ */

.detail-main { padding-top: 0; }

/* ---- 히어로 (이미지 full-bleed) ---- */
.detail-hero {
  position: relative;
  height: 55vh;
  min-height: 400px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.detail-hero__img-wrap {
  position: absolute;
  inset: 0;
}
.detail-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
}

.detail-hero__content {
  position: relative;
  z-index: 2;
  padding-bottom: 3rem;
  color: #fff;
}

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  margin-bottom: 1.2rem;
  transition: color 0.2s;
  letter-spacing: 0.02em;
}
.detail-back:hover { color: #fff; }

.detail-hero__label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}
.detail-hero__title {
  font-family: 'ClimateCrisisKR', 'Black Han Sans', sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: normal;
  line-height: 1.2;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}
.detail-hero__sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.75);
  font-weight: 400;
}

/* ---- 정보 칩 ---- */
.detail-info { padding: 2rem 0 0; }
.detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 0;
  border-top: 1px solid var(--color-border);
}
.detail-chip {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: none;
  border: none;
  border-right: 1px solid #ddd;
  border-radius: 0;
  padding: 0 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #444;
  line-height: 1;
}
.detail-chip:first-child { padding-left: 0; }
.detail-chip:last-child { border-right: none; }
.detail-chip__icon { font-size: 1.05rem; }

/* ---- 본문 ---- */
.detail-body { padding-top: 2.5rem; }
.detail-body__grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 3rem 2.5rem;
  align-items: start;
}

/* 좌측: 이미지 스택 */
.detail-body__images {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.detail-img-item {
  border-radius: 14px;
  overflow: hidden;
  background: #f0f0f0;
  line-height: 0;
}
.detail-img-item img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.detail-includes__title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 0.5rem;
}
.detail-includes__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}
.detail-includes__list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.8);
}
.detail-includes__list li::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
}

/* ---- CTA 박스 안 — 클래스 정보 ---- */
.detail-cta-info {
  margin-bottom: 0.9rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.detail-cta-info__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.3rem;
}
.detail-cta-info__title {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}
.detail-cta-info__heading {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.4;
}

.detail-cta-desc {
  font-size: 0.82rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.72);
  margin-bottom: 1rem;
}

/* ---- 사이드 패널 ---- */
.detail-body__side {
  align-self: stretch;
}

/* ---- 사이드 CTA 박스 ---- */
.detail-cta-box {
  background: var(--color-dark);
  color: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  position: sticky;
  top: 106px;
}
.detail-price {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.detail-price__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
}
.detail-price__value {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--color-accent);
}

.detail-cta-box__note {
  font-size: 0.74rem;
  color: rgba(255,255,255,0.45);
  margin-bottom: 0.9rem;
}
.detail-cta-box__btn {
  display: block;
  text-align: center;
  width: 100%;
  padding: 0.75rem;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 10px;
  margin-bottom: 0.75rem;
}
.detail-cta-box__sub-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 1rem;
}

/* 단체 문의 팝업 */
.detail-contact-wrap {
  position: relative;
  display: flex;
}
.detail-contact-wrap .detail-cta-box__sub-btn {
  flex: 1;
  width: 100%;
  background: none;
  font-family: inherit;
  cursor: pointer;
}

.detail-contact-popup {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  width: 220px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.22);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.2s, transform 0.2s;
  z-index: 10;
}
.detail-contact-popup.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.detail-cta-box__sub-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.7rem 0.5rem;
  border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,0.15);
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  text-align: center;
}
.detail-cta-box__sub-btn:hover {
  border-color: rgba(255,255,255,0.45);
  color: #fff;
  background: rgba(255,255,255,0.06);
}

.detail-cta-box__back-link {
  display: block;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  transition: color 0.2s;
  margin-top: 1.25rem;
}
.detail-cta-box__back-link:hover { color: rgba(255,255,255,0.8); }

/* ---- 클래스 카드 링크 처리 (메인 페이지) ---- */
a.class-card {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
a.class-card:hover .class-card__img img {
  transform: scale(1.04);
}

/* ---- 반응형 ---- */
@media (max-width: 1024px) {
  .detail-body__grid {
    grid-template-columns: 1fr 300px;
  }
}
@media (max-width: 768px) {
  .detail-body__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .detail-cta-box {
    display: none;
  }
  .detail-hero { height: 45vh; }

  /* 모바일 칩 — 세로 스택, 구분선 제거 */
  .detail-chips {
    padding: 0;
    flex-direction: column;
    gap: 0.55rem;
    border-top: 1px solid var(--color-border);
  }
  .detail-chip {
    font-size: 0.82rem;
    padding: 0;
    border-right: none;
  }

  /* 모바일 하단 고정 CTA 바 */
  .mobile-cta-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--color-dark);
    padding: 0.75rem 1.25rem;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 24px rgba(0,0,0,0.18);
  }
  .mobile-cta-bar__price {
    flex: 1;
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--color-accent);
    letter-spacing: -0.02em;
  }
  .mobile-cta-bar__price span {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(255,255,255,0.45);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.1rem;
  }
  .mobile-cta-bar__actions {
    display: flex;
    gap: 0.5rem;
  }
  .mobile-cta-bar__main-btn {
    padding: 0.65rem 1.1rem;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 10px;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .mobile-cta-bar__sub-btn {
    padding: 0.65rem 0.9rem;
    border: 1.5px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    background: transparent;
    color: rgba(255,255,255,0.75);
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
  }

  /* 하단 바에 가려지지 않도록 여백 */
  body { padding-bottom: 80px; }
}

@media (min-width: 769px) {
  .mobile-cta-bar { display: none; }
}

/* ---- 규격 선택 ---- */
.variant-selector {
  margin: 1rem 0;
}
.variant-selector__label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #aaa;
  margin-bottom: 0.65rem;
}
.variant-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.variant-btn {
  padding: 0.45rem 0.9rem;
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  background: rgba(255,255,255,0.07);
  font-size: 0.83rem;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  font-family: inherit;
  line-height: 1.4;
  text-align: left;
}
.variant-btn:hover {
  border-color: rgba(255,255,255,0.5);
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.12);
}
.variant-btn.is-selected {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: #0f0f0f;
  font-weight: 800;
}
