/* 폰트 로드 */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');
@import url('https://fonts.googleapis.com/css2?family=Allerta+Stencil&display=swap');


:root {
  /* 1-2. 컬러 시스템 */
  --color-primary: #4a5e2f;
  --color-secondary: #7a9a3f;
  --color-muted: #c8d4b0;
  --color-surface: #f2f0e8;
  --color-surface-2: #f7f5ee;
  --color-text-primary: #2e2e2e;
  --color-text-secondary: #6b6b6b;
  --color-reject-bg: #ffe5e5;
  --color-reject-text: #a03030;
  
  --color-kakao-border: rgba(254, 229, 0, 0.6);
  --color-kakao-bg: #FEE500;
  --color-naver-border: rgba(3, 199, 90, 0.5);
  --color-naver-bg: #03C75A;
}

* {
  font-family: 'Pretendard', -apple-system, sans-serif;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--color-surface);
  color: var(--color-text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 1-3. 타이포그래피 */
.text-h1 { font-size: clamp(28px, 5vw, 48px); font-weight: 500; line-height: 1.2; }
.text-h2 { font-size: clamp(20px, 3vw, 32px); font-weight: 500; line-height: 1.3; }
.text-h3 { font-size: 18px; font-weight: 500; line-height: 1.4; }
.text-body { font-size: 15px; font-weight: 400; line-height: 1.7; }
.text-caption { font-size: 12px; font-weight: 400; line-height: 1.6; font-style: italic; }

/* 버튼 텍스트 유틸리티 */
.text-btn-primary { font-size: 15px; font-weight: 500; }
.text-btn-secondary { font-size: 14px; font-weight: 500; }
.text-btn-social { font-size: 14px; font-weight: 500; }
.text-link-guest { font-size: 12px; font-weight: 400; text-decoration: underline; cursor: pointer; }
.text-floating-price { font-size: 16px; font-weight: 500; }
.text-floating-product { font-size: 12px; font-weight: 400; }

/* 1-4. 컴포넌트 스타일 원칙 */
.neumorphism {
  box-shadow: 4px 4px 10px rgba(0,0,0,0.08), -4px -4px 10px rgba(255,255,255,0.7);
  background: var(--color-surface);
  border-radius: 12px;
  border: 0.5px solid transparent;
  transition: all 0.2s ease-in-out;
}

.glassmorphism {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(242,240,232,0.92);
  border: 0.5px solid rgba(200,212,176,0.6);
}

.border-base { border: 0.5px solid var(--color-muted); }
.border-active { border: 1px solid var(--color-primary); }

.radius-card { border-radius: 16px; }
.radius-btn { border-radius: 14px; }
.radius-tag { border-radius: 10px; }

svg { stroke-width: 1.2; stroke-linecap: round; fill: none; }
.icon-body { width: 20px; height: 20px; }
.icon-btn { width: 16px; height: 16px; }

/* 1-5. 반응형 브레이크포인트 & 그리드 */
.container { width: 100%; margin: 0 auto; }

@media (max-width: 639px) {
  .container { padding: 0 20px; }
  .grid-product { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .container { padding: 0 32px; }
  .grid-product { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

@media (min-width: 1024px) {
  .container { max-width: 1200px; padding: 0 48px; }
  .grid-hero { display: grid; grid-template-columns: 5fr 7fr; gap: 24px; }
  .grid-12col { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
}

/* D-23: 3SecFix Micro-animations */
.sec-fix-step {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 150ms ease-in-out, transform 150ms ease-in-out;
}

.sec-fix-container.animate .step-chik {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0ms;
}

.sec-fix-container.animate .step-tok {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 450ms; /* 0ms + 150ms(duration) + 300ms(gap) */
}

.sec-fix-container.animate .step-ssuk {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 900ms; /* 450ms + 150ms(duration) + 300ms(gap) */
}

@media (prefers-reduced-motion: reduce) {
  .sec-fix-step {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* GNB 전체 */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(242, 240, 232, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 0.5px solid #c8d4b0;
  padding: 0 48px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 로고 */
.gnb-logo {
  font-family: 'Pretendard', sans-serif;
  font-size: 20px;
  font-weight: 500;
  font-style: italic;
  color: #4a5e2f;
  text-decoration: none;
  display: flex;
  align-items: center;
}
.gnb-logo-img {
  height: 56px;
  width: auto;
  display: block;
}
@media (max-width: 767px) {
  .gnb-logo-img {
    height: 40px;
  }
}

/* 메뉴 항목 */
.gnb-menu a {
  font-family: 'Pretendard', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #2e2e2e;
  text-decoration: none;
  margin: 0 20px;
  letter-spacing: 0.04em;
  transition: color 0.15s;
}
.gnb-menu a:hover { color: #4a5e2f; }
.gnb-menu a.active { color: #4a5e2f; font-weight: 500; }

/* 진단하기 버튼 */
.gnb-cta {
  font-family: 'Pretendard', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #ffffff;
  background: #4a5e2f;
  border: none;
  border-radius: 24px;
  padding: 8px 20px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}
.gnb-cta:hover { background: #3b4f24; }
.gnb-cta:active { transform: scale(0.97); }

/* 모바일 햄버거 */
@media (max-width: 639px) {
  nav { padding: 0 20px; }
  .gnb-menu { display: none; }
  .gnb-hamburger { display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
  .gnb-hamburger span { width: 22px; height: 1px; background: #2e2e2e; }
}
@media (min-width: 640px) {
  .gnb-hamburger { display: none; }
}

/* Drawer */
.gnb-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: #f2f0e8;
  z-index: 200;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
}
.gnb-drawer.open {
  transform: translateX(0);
}
.gnb-drawer-header {
  height: 60px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 0.5px solid #c8d4b0;
}
.gnb-close {
  font-size: 24px;
  cursor: pointer;
  color: #2e2e2e;
}
.gnb-drawer-menu {
  flex: 1;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.gnb-drawer-menu a {
  font-family: 'Pretendard', sans-serif;
  font-size: 28px;
  font-weight: 500;
  color: #2e2e2e;
  text-decoration: none;
}
.gnb-drawer-cta {
  margin: 20px;
  width: calc(100% - 40px);
  height: 52px;
  background: #4a5e2f;
  color: #ffffff;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Pretendard', sans-serif;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
}

/* 구매 버튼 CSS (rules.md Part B 기준) */
.buy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 320px;
  height: 52px;
  border-radius: 14px;
  background: #f2f0e8;
  border: 0.5px solid rgba(3, 199, 90, 0.5);
  font-family: 'Pretendard', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #2e2e2e;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.buy-btn:hover {
  background: #e8f5ec;
  border-color: rgba(3, 199, 90, 0.8);
}
.buy-btn:active { transform: scale(0.97); }

/* 일반 성분 태그 */
.ing-tag {
  font-size: 11px;
  padding: 3px 10px;
  background: #f7f5ee;
  border: 0.5px solid #c8d4b0;
  border-radius: 10px;
  color: #2e2e2e;
  display: inline-block;
  margin: 2px;
}
/* 배제 성분 태그 */
.ing-reject {
  font-size: 11px;
  padding: 3px 10px;
  background: #ffe5e5;
  border: 0.5px solid #f0b0b0;
  border-radius: 10px;
  color: #a03030;
  display: inline-block;
  margin: 2px;
}

/* 모바일 플로팅 바 */
@media (max-width: 639px) {
  .mobile-floating-bar {
    position: static;
    bottom: 0;
    padding: 16px 0;
    background: var(--color-surface);
    z-index: 50;
    border-top: 0.5px solid var(--color-muted);
    margin-top: 24px;
    display: flex;
    justify-content: center;
  }
}
@media (min-width: 640px) {
  .mobile-floating-bar {
    margin-top: auto;
  }
}

/* 플로팅 바 모바일 전용 처리 */
#floating-bar {
  display: none;
  padding: 12px 20px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

/* 모바일에서만 표시 */
@media (max-width: 639px) {
  #floating-bar {
    display: flex;
  }
}

/* Allerta Stencil Font */
.font-slogan-allerta {
  font-family: 'Allerta Stencil', sans-serif !important;
}

/* Skin Balance Game Button Animation */
@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(74, 94, 47, 0.5);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(74, 94, 47, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(74, 94, 47, 0);
  }
}
.pulse-glow-btn {
  animation: pulseGlow 2s infinite;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.pulse-glow-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(74, 94, 47, 0.3);
  background-color: var(--color-secondary) !important;
}
.pulse-glow-btn:active {
  transform: translateY(0);
}

/* ── 빵부스러기 (Breadcrumbs) 스타일 ── */
.breadcrumbs {
  font-family: 'Pretendard', sans-serif;
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.breadcrumbs a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}
.breadcrumbs a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}
.breadcrumbs span {
  color: var(--color-text-primary);
  font-weight: 500;
}

/* ── 카테고리 필터 탭 (Filter Tabs) 스타일 ── */
.filter-tab {
  font-family: 'Pretendard', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-surface-2);
  border: 0.5px solid var(--color-muted);
  border-radius: 20px;
  padding: 8px 18px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  outline: none;
}
.filter-tab:hover {
  background: #EAF3DE;
  color: #27500A;
  border-color: var(--color-secondary);
}
.filter-tab.active {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(74, 94, 47, 0.15);
}

/* ── GNB SHOP 메가 메뉴 및 아코디언 ── */
.gnb-mega-menu {
  display: block !important;
  min-width: 320px;
  padding: 16px !important;
  box-sizing: border-box;
}

.gnb-accordion {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.gnb-acc-item {
  border-radius: 12px;
  overflow: hidden;
  transition: background-color 0.2s ease;
}

.gnb-acc-item:hover,
.gnb-acc-item:focus-within {
  background: rgba(74, 94, 47, 0.04);
}

.gnb-acc-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: none;
  border: none;
  font-family: 'Pretendard', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #4a5e2f;
  text-align: left;
  cursor: pointer;
  outline: none;
  transition: color 0.2s ease;
}

.gnb-acc-trigger:hover,
.gnb-acc-trigger:focus {
  color: #27500A;
}

.gnb-acc-arrow {
  transition: transform 0.25s ease-in-out;
  color: #7a9a3f;
}

.gnb-acc-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.25s ease-in-out, opacity 0.25s ease-in-out;
}

.gnb-acc-inner {
  padding: 4px 12px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* 호버, 포커스 및 활성화 클래스 상태 정의 */
.gnb-acc-item:hover .gnb-acc-content,
.gnb-acc-item:focus-within .gnb-acc-content,
.gnb-acc-item.is-active .gnb-acc-content {
  max-height: 250px;
  opacity: 1;
}

.gnb-acc-item:hover .gnb-acc-arrow,
.gnb-acc-item:focus-within .gnb-acc-arrow,
.gnb-acc-item.is-active .gnb-acc-arrow {
  transform: rotate(180deg);
}

/* 모바일 드로어 내부 아코디언 스타일 대응 */
.util-nav-mobile .gnb-acc-trigger {
  font-size: 14px;
  font-weight: 600;
  color: #2e2e2e;
  border-bottom: 0.5px solid #ede9e0;
  padding: 12px 4px;
}

.util-nav-mobile .gnb-acc-inner {
  padding: 4px 8px 8px 12px;
}

.util-nav-mobile .gnb-acc-inner a {
  display: block;
  padding: 8px 8px 8px 12px;
  font-size: 13px;
  color: #555;
  text-decoration: none;
  border-bottom: 0.5px solid #ede9e0;
}

.util-nav-mobile .gnb-acc-inner a:last-child {
  border-bottom: none;
}

.util-nav-mobile .gnb-acc-inner a:hover {
  color: #4a5e2f;
}

.util-nav-mobile .gnb-acc-item:focus-within,
.util-nav-mobile .gnb-acc-item:hover {
  background: none;
}

/* ── 전성분 표기 섹션 (Ingredients Section) ── */
.ingredients-section {
  padding: 80px 48px;
  background: #fdfdfb;
  border-top: 0.5px solid #e8e4da;
  border-bottom: 0.5px solid #e8e4da;
}

.ingredients-container {
  max-width: 800px;
  margin: 0 auto;
}

/* 디지털 단상자 카드 (사용자 첨부 이미지 디자인 모사) */
.ingredients-card {
  background: #ffffff;
  border: 1px solid #e8e6df;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 8px 24px rgba(74, 94, 47, 0.02);
  font-family: 'Pretendard', sans-serif;
  color: #2e2e2e;
}

.ingredients-card-meta {
  font-size: 13px;
  font-weight: 600;
  color: #739050;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.ingredients-card-title {
  font-size: 20px;
  font-weight: 700;
  color: #2e2e2e;
  line-height: 1.4;
  margin: 0 0 4px 0;
}

.ingredients-card-subtitle {
  font-size: 20px;
  font-weight: 700;
  color: #2e2e2e;
  margin: 0 0 12px 0;
}

.ingredients-card-volume {
  font-size: 13.5px;
  color: #8c8a82;
  margin-bottom: 24px;
}

.ingredients-card-divider {
  height: 1px;
  background: #eae8e1;
  margin: 20px 0;
  border: none;
}

.ingredients-item-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #333333;
  margin: 24px 0 8px 0;
  letter-spacing: -0.01em;
}

.ingredients-item-desc {
  font-size: 13px;
  line-height: 1.62;
  color: #555555;
  margin: 0 0 20px 0;
}

.ingredients-item-desc-warning {
  font-size: 12px;
  line-height: 1.6;
  color: #666666;
  margin: 0;
}

/* 반응형 모바일 뷰 */
@media (max-width: 767px) {
  .ingredients-section {
    padding: 60px 20px;
  }
  .ingredients-card {
    padding: 28px 24px;
  }
}

/* ── 사전 체험단 후기 섹션 (Trial Review Section) ── */
.trial-review-section {
  padding: 80px 48px;
  background: #fdfdfb;
  border-top: 0.5px solid #e8e4da;
  border-bottom: 0.5px solid #e8e4da;
}

.trial-review-container {
  max-width: 800px;
  margin: 0 auto;
}

.trial-review-header {
  text-align: center;
  margin-bottom: 40px;
}

.trial-review-badge {
  display: inline-block;
  padding: 6px 14px;
  background: #EAF3DE;
  border: 0.5px solid #a8c888;
  border-radius: 20px;
  font-family: 'Pretendard', sans-serif;
  font-size: 11px;
  color: #27500A;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.trial-review-title {
  font-family: 'Pretendard', sans-serif;
  font-size: clamp(20px, 2.5vw, 24px);
  font-weight: 500;
  color: #2e2e2e;
  margin: 0 0 10px 0;
  letter-spacing: -0.02em;
}

.trial-review-notice {
  font-family: 'Pretendard', sans-serif;
  font-size: 12.5px;
  color: #8c8a82;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.trial-review-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.trial-review-card {
  background: #ffffff;
  border: 1px solid #e8e6df;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(74, 94, 47, 0.01);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.trial-review-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(74, 94, 47, 0.06);
  border-color: #a8c888;
}

.trial-review-stars {
  font-size: 14px;
  color: #FFB800;
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.trial-review-text {
  font-family: 'Pretendard', sans-serif;
  font-size: 13px;
  line-height: 1.65;
  color: #444444;
  margin: 0 0 20px 0;
  flex: 1;
  text-align: left;
}

.trial-review-card-divider {
  height: 0.5px;
  background: #eae8e1;
  border: none;
  margin: 0 0 12px 0;
}

.trial-review-user {
  font-family: 'Pretendard', sans-serif;
  font-size: 12px;
  color: #7a7872;
  font-weight: 500;
  margin: 0;
  text-align: left;
}

/* 반응형 모바일 뷰 */
@media (max-width: 767px) {
  .trial-review-section {
    padding: 60px 20px;
  }
  .trial-review-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .trial-review-card {
    padding: 20px;
  }
}

/* ── 슈퍼 센텔라 & 카밍 허브 콤플렉스 컴포넌트 ── */
.ingredients-complex-box {
  border-radius: 16px;
  padding: 28px;
  background: #ffffff;
  border: 0.5px solid #c8d4b0;
  box-sizing: border-box;
}

.ingredients-complex-title {
  font-family: 'Pretendard', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #2e2e2e;
  margin-bottom: 16px;
  text-align: left;
}

.ingredients-complex-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.ingredients-complex-tag {
  padding: 6px 14px;
  border-radius: 20px;
  background: #f7f5ee;
  border: 0.5px solid #c8d4b0;
  font-family: 'Pretendard', sans-serif;
  font-size: 12px;
  color: #2e2e2e;
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  user-select: none;
  display: inline-block;
  box-sizing: border-box;
}

/* 슈퍼 센텔라 강조 배지 */
.ingredients-complex-tag.highlight {
  background: #EAF3DE;
  border: 0.5px solid #a8c888;
  color: #27500A;
  font-weight: 500;
}

.ingredients-complex-tag:hover,
.ingredients-complex-tag:focus-visible {
  border-color: #a8c888;
  background: #EAF3DE;
  transform: translateY(-1px);
}

/* 팝오버 스타일 */
.ingredients-popover {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  z-index: 1000;
  background: #ffffff;
  border: 1px solid #e1ead6;
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 10px 30px rgba(74, 94, 47, 0.12);
  width: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

/* 화살표 */
.ingredients-popover::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #ffffff transparent transparent transparent;
}

.ingredients-popover::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 7px;
  border-style: solid;
  border-color: #e1ead6 transparent transparent transparent;
  z-index: -1;
}

/* 활성화 상태 (호버, 포커스, 액티브 클래스) */
.ingredients-complex-tag:hover .ingredients-popover,
.ingredients-complex-tag:focus-within .ingredients-popover,
.ingredients-complex-tag.active .ingredients-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(-12px);
}

.ingredients-popover-img {
  width: 120px;
  height: 120px;
  border-radius: 8px;
  object-fit: cover;
  background: #f7f5ee;
  display: block;
  border: 0.5px solid #e1ead6;
  box-sizing: border-box;
}

.ingredients-popover-name {
  font-family: 'Pretendard', sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  color: #27500A;
  margin: 0;
  text-align: center;
}

.ingredients-complex-desc {
  font-family: 'Pretendard', sans-serif;
  font-size: 12px;
  color: #6b6b6b;
  text-align: center;
  margin: 0;
  font-style: italic;
  line-height: 1.7;
}

/* 모바일 팝오버 대응 (화면 밖으로 나가는 것 방지 및 터치 편의성) */
@media (max-width: 480px) {
  .ingredients-popover {
    width: 120px;
    padding: 8px;
  }
  .ingredients-popover-img {
    width: 104px;
    height: 104px;
  }
}





