/* ===========================================================================
   제품 시리즈 상세 (시안 05: 기종별 소개 — SE2200 Series 샘플)
   첫 화면만 뷰포트를 채우고 이후 콘텐츠는 API 데이터 높이에 따라 일반 스크롤한다.
   =========================================================================== */

.series-page { padding-top: 0; }
.series-hero {
  height: 100vh; height: 100svh; min-height: 64rem;
  display: flex; align-items: stretch;
}
.series-hero > .section {
  width: 100%; display: flex; align-items: center;
  padding-top: calc(var(--header-h) + 3rem);
}

/* ---------- 시리즈 2톤 타이틀 (SE2200 굵게 + Series 얇게) ---------- */
.series-title { font-family: var(--font-en); font-size: 3.2rem; letter-spacing: .01em; color: var(--color-gold); }
.series-title strong { font-weight: 800; }
.series-title span { font-weight: 300; }

/* ---------- 패널 1 · 제품 스테이지 + 제품 셀렉터 ---------- */
.series-stage { position: relative; margin-top: 1rem; display: flex; align-items: center; justify-content: center; }
.series-stage img { height: clamp(26rem, 44vh, 44rem); object-fit: contain; }
.series-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 4.4rem; height: 4.4rem; color: var(--color-gold);
  transition: opacity .2s;
}
.series-arrow:hover { opacity: .7; }
.series-arrow[hidden] { display: none; }
.series-arrow svg { width: 100%; height: 100%; }
.series-arrow--prev { left: 0; }
.series-arrow--next { right: 0; }

.series-finder { margin-top: 4.2rem; display: flex; align-items: flex-end; gap: 3rem; }
.series-finder label { flex: 1; display: block; }
.series-finder .f-cap {
  display: block; margin-bottom: .9rem;
  font-family: var(--font-en); font-size: 1.25rem; font-weight: 700; color: #333;
}
.series-finder select {
  width: 100%; height: 4.4rem; padding: 0 3.6rem 0 1.6rem;
  border: 1px solid #c7cbcf; border-radius: 2.2rem; background: #fff;
  font-family: var(--font-en); font-size: 1.3rem; color: #555;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23555'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1.3rem center; background-size: 1.6rem;
}
.series-finder .btn-search-pill {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 1rem;
  height: 4.4rem; padding: 0 3rem; border-radius: 2.2rem;
  background: var(--color-sand); color: #fff;
  font-family: var(--font-en); font-size: 1.4rem; font-weight: 500;
  transition: filter .25s;
}
.series-finder .btn-search-pill:hover { filter: brightness(1.07); }
.series-finder .btn-search-pill svg { width: 1.7rem; height: 1.7rem; }
.series-finder[hidden] { display: none; }

/* ---------- 로드 실패 안내 ---------- */
/* 페이지 배너: 상세 로드 실패(= 페이지 전체 실패) 시 히어로 상단에 하나만 노출 */
.series-page-error {
  margin-bottom: 2rem; padding: 1.4rem 1.8rem;
  border: 1px solid #e3c6c6; border-radius: .6rem; background: #fbf2f2;
  font-size: 1.4rem; line-height: 1.6; color: #9b3b3b;
}
/* 검색 폼 자리 대체: 검색 목록만 실패했을 때 빈 셀렉트 대신 노출 */
.series-finder-error {
  margin-top: 4.2rem; font-size: 1.4rem; line-height: 1.6; color: #7a7f86;
}

/* ---------- 패널 2 · 시리즈 개요 (다크 네이비) ---------- */
/* 타이틀은 네이비 위에서도 골드 유지 (시안 기준) — 기본 .series-title 골드 상속 */
/* 모델 칩: 흰 셀 + 다크 텍스트, 네이비 바탕이 1px 심으로 비침 (시안 05) */
.series-models { display: flex; flex-wrap: wrap; gap: 1px; margin-top: 2.6rem; }
.series-models span {
  padding: .7rem 1.2rem; min-width: 10.4rem; text-align: center;
  background: #fff;
  font-family: var(--font-en); font-size: 1.25rem; font-weight: 500; color: #1c2430;
}
.series-desc-row { margin-top: 4.2rem; display: flex; align-items: center; gap: 4.5rem; }
.series-desc { flex: 1; padding-left: 2rem; border-left: 2px solid var(--line-gold); /* 세로선 공통 톤 */ }
.series-desc h3 { font-size: 2rem; font-weight: 700; color: #fff; white-space: pre-line; }
/* 관리자에서 입력한 시리즈 정보의 개행을 그대로 보존 (textContent 렌더) */
.series-desc p { margin-top: 1.4rem; font-size: 1.4rem; line-height: 1.8; color: #c9ccd0; font-weight: 300; white-space: pre-line; }
.series-catalog { flex: 0 0 auto; text-align: center; }
.series-catalog .cat-circle {
  width: 5.4rem; height: 5.4rem; margin: 0 auto; border-radius: 50%;
  background: #fff; color: #16181b;
  display: flex; align-items: center; justify-content: center;
  transition: transform .25s;
}
.series-catalog:hover .cat-circle { transform: translateY(-3px); }
.series-catalog .cat-circle img { width: 2.8rem; height: 2.8rem; object-fit: contain; }
.series-catalog b {
  display: block; margin-top: .9rem;
  font-family: var(--font-en); font-size: 1.1rem; font-weight: 500; letter-spacing: .12em; color: #fff;
}
.series-features { margin-top: 4.2rem; padding: 3rem 3.4rem; background: var(--color-sand); }
.series-features li {
  position: relative; padding-left: 1.9rem;
  font-size: 1.5rem; font-weight: 600; line-height: 1.75; color: #2b2118;
}
.series-features li + li { margin-top: 1rem; }
.series-features li::before {
  content: ''; position: absolute; left: 0; top: .76em;
  width: .8rem; height: .8rem; border-radius: 50%; background: #16181b;
}

/* ---------- 패널 3 · 미디어 (가공 영상/이미지) ---------- */
.series-media__head { display: flex; align-items: center; justify-content: space-between; }
.series-media__title { font-family: var(--font-en); font-size: 1.8rem; color: #111; }
.series-media__title strong { font-weight: 800; }
.series-media__title span { color: #555; font-weight: 300; }
.media-dots { display: flex; gap: .9rem; }
.media-dots i { width: .9rem; height: .9rem; border-radius: 50%; border: 1px solid var(--color-gold); }
.media-dots i.on { background: var(--color-gold); }
.series-media__stage { position: relative; margin-top: 2rem; }
.series-media__stage[hidden],
.series-media__stage > img[hidden],
.series-media__iframe[hidden],
.media-play[hidden],
.series-media__empty[hidden] { display: none; }
.series-media__stage img { width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; }
.series-media__iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; background: #000; }
.media-play {
  position: absolute; inset: 0; margin: auto;
  width: 5.4rem; height: 5.4rem; border-radius: 50%;
  border: 1px solid rgba(35,32,32,.24);
  background: #fff; color: #16181b;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.14);
  transition: transform .25s;
}
.media-play:hover { transform: scale(1.08); }
.media-play img { width: 2.2rem; height: 2.55rem; margin-left: .2rem; object-fit: contain; }
/* 미디어 패널 좌우 화살표는 스테이지 바깥 여백에 */
.series-media__wrap { position: relative; padding: 0 6.4rem; }
.series-media__wrap .series-arrow--prev { left: 0; }
.series-media__wrap .series-arrow--next { right: 0; }

/* ---------- 패널 4 · Specifications ---------- */
.spec-title { font-family: var(--font-en); font-size: 2rem; font-weight: 800; color: #111; }
.spec-scroll {
  margin-top: 2.4rem; overflow-x: auto;
  /* 오른쪽 "더 있음" 페이드 힌트 (순수 CSS 스크롤 섀도우).
     - cover(흰 그라데이션, local): 콘텐츠 오른쪽 끝에 붙어 함께 스크롤 → 끝에 닿으면 아래 섀도우를 덮어 힌트가 사라짐
     - shadow(radial, scroll): 컨테이너 오른쪽 가장자리에 고정 → 더 볼 게 있을 때만 노출
     JS 없이 끝 도달 시 자동 소멸. 세로 스크롤엔 영향 없음. */
  background:
    linear-gradient(to left, #fff, rgba(255, 255, 255, 0)) 100% 0 / 4.4rem 100% no-repeat local,
    radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, .22), rgba(0, 0, 0, 0)) 100% 0 / 2.4rem 100% no-repeat scroll;
}
/* 끝 도달 시(JS가 토글) 페이드/그림자 완전 제거 — 관성 스크롤 잔상 방지. */
.spec-scroll.is-scroll-end { background: none; }
/* border-collapse: collapse + sticky 셀 조합은 경계선이 테이블 격자 레이어(셀 배경 아래)에
   그려져 sticky 라벨/단위 열의 흰 배경에 덮여 사라짐 → separate로 각 셀이 자기 border를
   직접 그리게 함(테두리는 tbody td border-bottom 하나뿐이라 이중선 없음). */
.spec-table { width: 100%; min-width: 76rem; border-collapse: separate; border-spacing: 0; }
.spec-table thead th {
  padding: 1.05rem 1rem;
  background: var(--color-sand); color: #222;
  font-family: var(--font-en); font-size: 1.3rem; font-weight: 700;
}
.spec-table tbody td {
  padding: .9rem 1.2rem; border-bottom: 1px solid #ddd;
  text-align: center; font-size: 1.28rem; font-weight: 400; color: #555;
}
/* 제품 열 최소폭: 콘텐츠 폭(132rem) − 라벨/단위(26rem) = 106rem 을 5등분 → 21.2rem.
   제품 6개 이상이면 min-width 합이 콘텐츠 폭을 넘어 .spec-scroll(overflow-x)로 가로 스크롤.
   제품 5개 이하면 table width:100% 가 늘려 꽉 채움(스크롤 없음). */
.spec-table thead th:not(:first-child),
.spec-table tbody td:not(.spec-label):not(.spec-unit) { min-width: 21.2rem; }
/* 라벨/단위 열은 가로 스크롤 중에도 왼쪽 고정 — 항목명이 사라지지 않게.
   폭은 width가 아닌 min-width로 확정: auto 레이아웃에서 제품열 min-width에 밀려
   라벨열이 압축(줄바꿈)되고 단위열 sticky(left:18rem) 오프셋이 어긋나는 것을 방지.
   라벨 18rem 확정 → 단위 sticky left:18rem 이 정확히 라벨 오른쪽에 붙음. */
.spec-table td.spec-label {
  min-width: 18rem; width: 18rem; text-align: left; color: #222; font-weight: 500;
  position: sticky; left: 0; z-index: 1; background: #fff;
}
.spec-table td.spec-unit {
  min-width: 8rem; width: 8rem; color: #767676; font-family: var(--font-en); font-weight: 400;
  position: sticky; left: 18rem; z-index: 1; background: #fff;
}
.spec-table thead th:first-child { position: sticky; left: 0; z-index: 2; }
.spec-note {
  margin-top: 1.4rem; display: flex; justify-content: space-between; gap: 2rem;
  font-size: 1.15rem; font-weight: 400; color: #767676;
}

/* 카탈로그/교육 신청 폼 모달 스타일은 styles.css 의 공용 .apply-modal / .apply-form__* 로 이관됨. */

/* ---------- 반응형 ---------- */
@media (max-width: 1024px) {
  .series-desc-row { flex-direction: column; align-items: stretch; }
  .series-catalog { align-self: flex-end; }
  .series-media__wrap { padding: 0; }
  .series-media__wrap .series-arrow { display: none; }
}
@media (max-width: 640px) {
  /* 풀스크린 히어로가 모바일 세로 폼(셀렉트 3 + Search)을 다 못 담아 Search가
     다음 네이비 섹션에 덮이던 문제 → 고정 높이 대신 콘텐츠에 맞춰 늘어나게. */
  .series-hero { height: auto; min-height: 100svh; }
  .series-hero > .section { align-items: flex-start; padding-bottom: 4rem; }
  .series-title { font-size: 2.4rem; }
  .series-finder { flex-direction: column; align-items: stretch; gap: 1.8rem; }
  .series-finder .btn-search-pill { justify-content: center; }
  .series-models span { min-width: 8.4rem; font-size: 1.15rem; }
  .series-features { padding: 2.4rem 2.2rem; }
  .series-features li { font-size: 1.35rem; }

  /* 사양표: 좁은 화면에서 라벨/단위(sticky) 고정폭이 화면을 다 먹어 제품이 1개도 안
     보이던 문제 → 고정폭·제품폭·여백을 모바일용으로 축소해 제품 1.5개+ 노출.
     min-width:0 로 소수 제품 시리즈가 76rem(760px)로 억지 확장되는 것도 방지. */
  .spec-table { min-width: 0; }
  .spec-table thead th:not(:first-child),
  .spec-table tbody td:not(.spec-label):not(.spec-unit) { min-width: 12rem; }
  .spec-table td.spec-label { min-width: 11rem; width: 11rem; }
  .spec-table td.spec-unit { min-width: 4.5rem; width: 4.5rem; left: 11rem; }
  .spec-table thead th, .spec-table tbody td {
    padding-left: .8rem; padding-right: .8rem; font-size: 1.2rem;
  }
}
