@charset "UTF-8";

:root {
  --primary: #1C64F2; 
  --bg-color: #F2F4F6; 
  --text-main: #191F28;
  --text-sub: #4E5968;
  --text-light: #8B95A1;
  --white: #FFFFFF;
  --border-radius-lg: 16px;
  --border-radius-xl: 24px;
}
html, body { height: 100%; margin: 0; padding: 0; background-color: var(--bg-color); font-family: 'Pretendard', sans-serif; color: var(--text-main); overflow-x: hidden; letter-spacing: -0.3px; -webkit-tap-highlight-color: transparent; }
* { box-sizing: border-box; }
::-webkit-scrollbar { display: none; }

.app-container { max-width: 480px; margin: 0 auto; background-color: var(--bg-color); min-height: 100vh; position: relative; overflow-x: hidden; }

.header { display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; position: sticky; top: 0; background: rgba(242, 244, 246, 0.9); backdrop-filter: blur(10px); z-index: 50; }
.header .back-btn { font-size: 24px; cursor: pointer; color: #191F28; font-weight: 300; }
.header-logo-img { height: 30px; object-fit: contain; }
.logo-text { font-weight: 900; font-size: 20px; color: #212121; }
/* --- 🌐 언어 변경 스위치 애니메이션 --- */
.lang-toggle {
  display: flex;
  position: relative; /* 하얀색 배경이 이 안에서만 움직이도록 기준점 설정 */
  background: #E5E8EB;
  border-radius: 20px;
  padding: 3px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  width: 80px; /* 스위치 전체 너비 고정 */
}

.lang-toggle div {
  flex: 1;
  text-align: center;
  padding: 4px 0;
  border-radius: 16px;
  z-index: 1; /* 글씨가 배경보다 위에 오도록 설정 */
  transition: color 0.3s ease;
}

.lang-toggle .active {
  color: var(--text-main);
}

/* 스르륵 움직이는 하얀색 배경 마법 */
.lang-toggle::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(50% - 3px); 
  height: calc(100% - 6px);
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* 스무스한 움직임 속도 */
}

/* US 모드일 때 하얀 배경이 오른쪽으로 스윽 이동 */
.lang-toggle.is-us::before {
  transform: translateX(100%);
}

.view { display: none; padding: 0 24px 140px; animation: fadeSlideUp 0.4s ease forwards; }
.view.active { display: block; }
@keyframes fadeSlideUp { from { opacity: 0; margin-top: 15px; } to { opacity: 1; margin-top: 0; } }

#view-intro.active { display: flex; flex-direction: column; min-height: 100vh; padding-bottom: 40px; }
.intro-header { margin-top: 40px; }
.intro-title { font-size: 26px; font-weight: 700; line-height: 1.4; color: var(--text-main); margin-bottom: 24px;}
.intro-logo { font-size: 32px; font-weight: 900; color: #212121; letter-spacing: -1px; }

.intro-bottom-btns { margin-top: auto; width: 100%; }
.intro-subtitle { font-size: 16px; font-weight: 600; color: var(--text-sub); margin-bottom: 16px; }

.main-btn { width: 100%; background: var(--primary); color: var(--white); border-radius: var(--border-radius-lg); padding: 24px 20px; text-align: left; margin-bottom: 16px; cursor: pointer; box-shadow: 0 4px 12px rgba(28, 100, 242, 0.2); transition: transform 0.2s; position: relative; }
.main-btn:active { transform: scale(0.97); }
.main-btn-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.main-btn-desc { font-size: 13px; font-weight: 400; opacity: 0.9; line-height: 1.4; }
.main-btn::after { content: '>'; position: absolute; right: 24px; top: 50%; transform: translateY(-50%) scaleY(1.5); font-size: 24px; font-weight: 300; }

.page-title { font-size: 24px; font-weight: 700; line-height: 1.4; margin-bottom: 32px; }
.section-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 16px; margin-top: 32px; }
.section-title { font-size: 16px; font-weight: 700; }
.section-hint { font-size: 13px; color: var(--text-sub); display: flex; align-items: center; gap: 4px; cursor: pointer;}

.brand-list { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; -ms-overflow-style: none; scrollbar-width: none; }
/* --- ★ 브랜드 로고 비율 완벽 해결 & 하얀색 버튼 디자인 복구 --- */
/* --- ★ 가로로 긴 로고(제네시스 등) 비율 완벽 해결 CSS --- */
.brand-card {
  width: 104px;          /* 카드는 안정적이고 넉넉하게 104px로 통일! */
  min-width: 104px;
  height: 104px;
  background: var(--white);
  border-radius: var(--border-radius-lg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: 0.2s;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.brand-card-img-wrapper {
  width: 75px;  
  height: 40px; 
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent; 
}

.brand-card-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain; /* 가로든 세로든 틀 안에서 꽉 차게 비율 유지 */
}

.brand-card .brand-name { 
  font-size: 14px; 
  font-weight: 700; 
  color: var(--text-main); 
}

.brand-card.selected { border-color: var(--primary); background: #E8F3FF; }

/* --- ★ 움직이는 구분선 고정 & 안내 문구 중앙 정렬 --- */
#dynamicContent {
  border-top: 1px solid #E5E8EB; /* 선을 내용물이 아닌 껍데기(컨테이너)에 고정! */
  margin-top: 24px;
  padding-top: 24px;
  min-height: 280px; /* 빈 공간의 높이를 미리 확보해서 덜컹거림 방지 */
  display: flex;
  flex-direction: column;
}

.empty-state {
  flex: 1; /* 남은 빈 공간을 꽉 채움 */
  display: flex;
  justify-content: center;
  align-items: center; /* 완벽한 세로 정중앙 배치 */
  color: var(--text-light);
  font-size: 15px;
  font-weight: 600;
  margin-top: -30px; /* 시각적으로 살짝 더 예뻐 보이게 위로 당겨줌 */
}

.car-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.car-chip { background: var(--white); padding: 16px 8px; text-align: center; border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--text-sub); cursor: pointer; transition: 0.2s; border: 1.5px solid transparent; }
.car-chip:active { transform: scale(0.95); }
.car-chip.selected { border-color: var(--primary); color: var(--primary); background: #E8F3FF; }

.model-list { display: flex; flex-direction: column; gap: 8px; }
.model-item { background: var(--white); padding: 18px 20px; border-radius: 12px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; transition: 0.2s; }
.model-item:active { background: #f9f9f9; transform: scale(0.98); }
.model-name { font-size: 15px; font-weight: 600; color: var(--text-main); }
.model-year { font-size: 14px; font-weight: 500; color: var(--text-sub); }

.bottom-cta-fixed { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; padding: 16px 24px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); background: linear-gradient(to top, rgba(242,244,246,1) 80%, rgba(242,244,246,0)); z-index: 10; display: flex; flex-direction: column; }
.bottom-cta-static { margin-top: 48px; padding-bottom: 24px; display: flex; flex-direction: column; gap: 12px; }
.blue-btn { width: 100%; padding: 18px; background: var(--primary); color: var(--white); border: none; border-radius: var(--border-radius-lg); font-size: 16px; font-weight: 700; cursor: pointer; transition: 0.2s; }
.blue-btn:active { transform: scale(0.97); }

/* --- [수정 포인트] 부위별 탭 메뉴 CSS --- */
.part-tabs-container { margin-top: 16px; margin-bottom: 24px; margin-left: -24px; margin-right: -24px; }
.part-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 0 24px; -ms-overflow-style: none; scrollbar-width: none; }
.part-tab { padding: 10px 18px; background: #E5E8EB; color: #4E5968; border-radius: 20px; font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer; transition: 0.2s; border: 1px solid transparent; }
.part-tab:active { transform: scale(0.95); }
.part-tab.active { background: var(--text-main); color: var(--white); border-color: var(--text-main); }

.video-container { width: 100%; aspect-ratio: 16/9; background: #000; border-radius: 16px; overflow: hidden; margin-bottom: 24px; }
.video-container iframe { width: 100%; height: 100%; border: none; }

.notice-box { background-color: #fff; border-radius: 16px; padding: 20px; margin-bottom: 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.02); }
.notice-box.warning { background-color: #FFF2F4; }
.notice-box.fallback { background-color: #E8F3FF; }
.notice-title { font-size: 15px; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.warning .notice-title { color: #F04452; }
.fallback .notice-title { color: var(--primary); }
.notice-desc { font-size: 14px; color: #4E5968; line-height: 1.5; word-break: keep-all; }

.step-list { display: flex; flex-direction: column; gap: 16px; }
.step-item { display: flex; gap: 16px; align-items: flex-start; }
.step-num { background: var(--primary); color: #fff; font-size: 13px; font-weight: 800; padding: 4px 10px; border-radius: 12px; flex-shrink: 0; }
.step-text { font-size: 15px; color: #333D4B; font-weight: 500; line-height: 1.5; margin-top: 2px; }

.bottom-sheet-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 100; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; display: flex; justify-content: center; align-items: flex-end; }
.bottom-sheet-overlay.open { opacity: 1; pointer-events: auto; }
.bottom-sheet { background: var(--bg-color); width: 100%; max-width: 480px; border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0; padding: 32px 24px; padding-bottom: calc(32px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); box-shadow: 0 -4px 20px rgba(0,0,0,0.1); }
.bottom-sheet-overlay.open .bottom-sheet { transform: translateY(0); }
.bs-title { font-size: 18px; font-weight: 700; margin-bottom: 24px; color: var(--text-main); }
.product-option { background: var(--white); padding: 20px; border-radius: var(--border-radius-lg); margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; transition: 0.2s; }
.product-option:active { transform: scale(0.98); background: #f9f9f9;}
.product-option-name { font-size: 16px; font-weight: 600; }
.product-option-arrow { font-size: 18px; color: var(--text-light); }
.bs-close-btn { margin-top: 16px; }