/* ==========================================================
   base.css — 모든 페이지 공통 (리셋·변수·헤더·푸터·버튼·FAQ·Sticky CTA)
   로드 대상: 전체 페이지
   ========================================================== */

/* ===== RESET & VARIABLES ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy:        #1B3A6B;
  --navy-dark:   #122850;
  --navy-light:  #2a5298;
  --orange:      #E05C00;
  --orange-hover:#c25000;
  --white:       #ffffff;
  --gray-100:    #f5f7fa;
  --gray-200:    #e9ecef;
  --gray-300:    #dee2e6;
  --gray-600:    #6c757d;
  --gray-800:    #343a40;
  --text:        #212529;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 400;
  color: var(--text);
  line-height: 1.7;
  background: var(--white);
  padding-bottom: 64px;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--navy);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.site-logo {
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--white);
  letter-spacing: -0.5px;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.site-logo img {
  display: inline-block;
  height: 36px;
  width: 36px;
  object-fit: contain;
  flex-shrink: 0;
}

.site-logo span {
  color: var(--orange);
}

/* 기본값 = 모바일 드롭다운 */
.nav-menu {
  display: none;
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  background: var(--navy-dark);
  flex-direction: column;
  gap: 0;
  padding: 12px 0;
  list-style: none;
}

.nav-menu.open {
  display: flex;
}

.nav-menu li a {
  display: block;
  padding: 12px 24px;
  font-size: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.nav-menu a {
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
  font-weight: 700;
  transition: color 0.2s;
}

.nav-menu a:hover {
  color: var(--orange);
}

/* 기본값 = 모바일: 햄버거 표시 */
.menu-btn {
  display: flex;
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  flex-direction: column;
  gap: 5px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s;
}

/* 네비 준비 중 표시 */
.nav-soon {
  color: rgba(255,255,255,0.4);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: default;
}

.nav-soon em {
  font-style: normal;
  font-size: 0.75rem;
  background: rgba(255,255,255,0.12);
  padding: 1px 7px;
  border-radius: 999px;
  margin-left: 4px;
}

/* ===== BREADCRUMB ===== */
.breadcrumb-nav {
  background: var(--gray-100);
  padding: 10px 20px;
  font-size: 0.85rem;
}

.breadcrumb-list,
.breadcrumb {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  max-width: 1100px;
  margin: 0 auto;
  color: var(--gray-600);
}

.breadcrumb-list li a,
.breadcrumb li a {
  color: var(--navy);
}

.breadcrumb-list li a:hover,
.breadcrumb li a:hover {
  color: var(--orange);
  text-decoration: underline;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Noto Sans KR', sans-serif;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn-orange {
  background: var(--orange);
  color: var(--white);
}

.btn-orange:hover {
  background: var(--orange-hover);
}

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.6);
}

.btn-outline-white:hover {
  background: rgba(255,255,255,0.1);
}

.btn-naver {
  background: #03C75A;
  color: var(--white);
}

.btn-naver:hover {
  background: #02b050;
}

.btn-godo {
  background: var(--white);
  color: var(--navy);
}

.btn-godo:hover {
  background: var(--gray-200);
}

/* 기본값 = 모바일 */
.btn-sm {
  padding: 8px 14px;
  font-size: 0.8rem;
  border-radius: 6px;
}

/* ===== SECTION COMMON ===== */
/* 기본값 = 모바일 */
section {
  padding: 48px 16px;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 12px;
  word-break: keep-all;
}

.section-sub {
  color: var(--gray-600);
  margin-bottom: 44px;
  font-size: 1rem;
  word-break: keep-all;
}

/* ===== FAQ ===== */
.faq-section {
  background: var(--gray-100);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  overflow: hidden;
}

/* 기본값 = 모바일 */
.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 18px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--navy);
  text-align: left;
  min-height: 56px;
}

.faq-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 900;
  transition: transform 0.3s, background 0.2s;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.faq-answer-inner {
  padding: 16px 24px 20px;
  color: var(--gray-800);
  font-size: 0.95rem;
  line-height: 1.8;
  word-break: keep-all;
  border-top: 1px solid var(--gray-200);
}

.faq-item.open .faq-answer {
  max-height: 600px;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
  background: var(--orange);
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.65);
  padding: 36px 20px;
  text-align: center;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
}

.footer-logo {
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--white);
  margin-bottom: 12px;
  white-space: nowrap;
  letter-spacing: -0.5px;
}

.footer-logo span {
  color: var(--orange);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.footer-links a {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--orange);
}

.footer-copy {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.35);
}

/* ===== STICKY CTA BAR ===== */
#sticky-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  background: var(--navy-dark);
  padding: 12px 20px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.25);
}

/* 기본값 = 모바일 */
.sticky-text {
  color: var(--white);
  font-weight: 700;
  font-size: 0.82rem;
}

.sticky-price {
  color: var(--orange);
  font-weight: 900;
}

.sticky-btn-group {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* ===== DESKTOP — BASE ===== */
@media (min-width: 769px) {
  /* 헤더 풀메뉴 */
  .header-inner {
    justify-content: space-between;
  }

  .menu-btn {
    display: none;
  }

  .nav-menu {
    display: flex;
    position: static;
    background: transparent;
    flex-direction: row;
    gap: 28px;
    padding: 0;
  }

  .nav-menu li a {
    display: inline;
    padding: 0;
    border-bottom: none;
  }

  /* 섹션 공통 패딩 */
  section {
    padding: 72px 20px;
  }

  /* FAQ */
  .faq-question {
    padding: 20px 24px;
    font-size: 1rem;
    min-height: auto;
  }

  /* Sticky CTA */
  .sticky-text {
    font-size: 0.95rem;
  }

  .sticky-btn-group {
    gap: 10px;
  }

  .btn-sm {
    padding: 10px 20px;
    font-size: 0.88rem;
  }
}

/* 스마트스토어 버튼 임시 숨김 */
a[href="https://m.site.naver.com/24gXk"] {
  display: none !important;
}

/* ===== 오늘의 팁 카드 ===== */
.daily-tip-section {
  padding: 0 20px;
  margin: -8px auto 0;
  max-width: 900px;
}

.daily-tip-wrap {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #f0f7ff;
  border-left: 4px solid #0066cc;
  border-radius: 10px;
  padding: 16px 18px;
}

.tip-emoji {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.tip-body {
  flex: 1;
}

.tip-title {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: #0055aa;
  margin-bottom: 4px;
}

.tip-text {
  font-size: 0.87rem;
  color: #333;
  line-height: 1.65;
  word-break: keep-all;
}

@media (min-width: 769px) {
  .daily-tip-section {
    padding: 0 40px;
  }
}

/* ===== 홈화면 추가 설치 배너 ===== */
.install-banner {
  display: none;
  position: fixed;
  bottom: 64px; /* sticky CTA 위 */
  left: 0;
  right: 0;
  z-index: 850;
  background: var(--navy-dark);
  color: var(--white);
  padding: 12px 16px;
  align-items: center;
  gap: 12px;
  box-shadow: 0 -2px 16px rgba(0,0,0,0.3);
  animation: slideUp 0.4s ease;
}

.install-banner.visible {
  display: flex;
}

.install-banner-text {
  flex: 1;
  font-size: 0.82rem;
  line-height: 1.45;
}

.install-banner-text strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.install-banner-btn {
  background: #0066cc;
  color: var(--white);
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.install-banner-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  flex-shrink: 0;
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ===== iOS 홈화면 추가 안내 모달 ===== */
.ios-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.55);
  align-items: flex-end;
  justify-content: center;
  padding: 0 0 80px;
  animation: fadeIn 0.25s ease;
}

.ios-modal-overlay.visible {
  display: flex;
}

.ios-modal {
  background: var(--white);
  border-radius: 16px 16px 0 0;
  padding: 28px 24px 24px;
  width: 100%;
  max-width: 480px;
  text-align: center;
}

.ios-modal-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 20px;
}

.ios-modal-steps {
  list-style: none;
  counter-reset: step;
  text-align: left;
  margin-bottom: 16px;
}

.ios-modal-steps li {
  counter-increment: step;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  font-size: 0.9rem;
  color: var(--gray-800);
  border-bottom: 1px solid var(--gray-200);
}

.ios-modal-steps li::before {
  content: counter(step);
  background: #0066cc;
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ios-modal-hint {
  font-size: 0.82rem;
  color: var(--gray-600);
  margin-bottom: 20px;
}

.ios-modal-close {
  background: #0066cc;
  color: var(--white);
  border: none;
  border-radius: 10px;
  padding: 13px 0;
  width: 100%;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ===== PWA 하단 탭바 (standalone 모드 전용) ===== */
#pwa-tabbar {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 950;
  background: var(--navy-dark);
  box-shadow: 0 -1px 0 rgba(255,255,255,0.08);
  /* iOS safe area 대응 */
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.pwa-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px 10px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  gap: 3px;
  transition: color 0.15s;
}

.pwa-tab--active {
  color: #60a5fa;
}

.pwa-tab:active {
  background: rgba(255,255,255,0.06);
}

.pwa-tab-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.pwa-tab-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* standalone 모드: 하단 여백 확보 + sticky CTA 숨김 */
body.pwa-standalone {
  padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
}

body.pwa-standalone #sticky-cta {
  display: none !important;
}
