/* BASIC css start */
@charset "utf-8";
/* ============================================================
   THE LAB CHEMICAL — 헤더 / 하단 네비 / 검색 / 카테고리
   header.1.css
============================================================ */

/* ══════════════════════════════════════
   1. 헤더 기본
══════════════════════════════════════ */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
  transition: box-shadow .25s;
}
#header.scrolled {
  box-shadow: 0 2px 16px rgba(12, 2, 91, .08);
}

body {
  padding-top: calc(56px + env(safe-area-inset-top));
  padding-bottom: calc(var(--bottom-nav-h, 60px) + env(safe-area-inset-bottom));
}

/* ── 로고 ── */
.header-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-decoration: none;
  line-height: 1;
  align-items: center;
}
.logo-main {
  font-size: 16px;
  font-weight: 900;
  color: var(--navy, #0C025B);
  letter-spacing: -.4px;
  line-height: 1;
  white-space: nowrap;
  font-family: var(--font, 'Pretendard', 'Noto Sans KR', sans-serif);
}
.logo-main span { color: #a78bfa; }
.logo-sub {
  font-size: 9px;
  font-weight: 500;
  color: rgba(12, 2, 91, .35);
  letter-spacing: .04em;
  white-space: nowrap;
  line-height: 1;
  font-family: var(--font, 'Pretendard', 'Noto Sans KR', sans-serif);
}

/* ── 아이콘 버튼 ── */
.header-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--navy);
  border-radius: 10px;
  transition: background var(--ease, .2s);
  text-decoration: none;
  flex-shrink: 0;
}
.header-icon-btn:active { background: var(--navy-lt, rgba(12,2,91,.07)); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0;
}

/* ══════════════════════════════════════
   2. 검색 오버레이
══════════════════════════════════════ */
#search-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(255, 255, 255, .98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: flex-start;
  padding-top: env(safe-area-inset-top);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity .22s ease, transform .22s ease;
}
#search-overlay.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.search-overlay-inner {
  width: 100%;
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  gap: 4px;
  border-bottom: 1px solid var(--border);
}
.search-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: none; background: none;
  cursor: pointer;
  color: var(--navy);
  border-radius: 10px;
  flex-shrink: 0;
  transition: background var(--ease);
}
.search-back-btn:active { background: var(--navy-lt); }
.search-overlay-form {
  flex: 1;
  display: flex;
  align-items: center;
  height: 42px;
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 0 4px 0 16px;
  gap: 4px;
}
.search-overlay-form input[type="text"] {
  flex: 1;
  border: none;
  background: none;
  font-size: 16px;
  color: var(--text);
  outline: none;
  padding: 0;
  font-family: var(--font);
}
.search-overlay-form input::placeholder { color: var(--text-muted); }
.search-overlay-form button[type="submit"] {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border: none;
  background: var(--navy);
  border-radius: 9px;
  cursor: pointer;
  color: #fff;
  flex-shrink: 0;
  transition: background var(--ease);
}
.search-overlay-form button[type="submit"]:active { background: var(--navy-dk); }

/* ══════════════════════════════════════
   3. 하단 네비게이션
══════════════════════════════════════ */
#btmMenuBar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 900;
  height: calc(60px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
}
#btmMenuBar ul {
  display: flex;
  height: 60px;
  margin: 0; padding: 0;
  list-style: none;
}
#btmMenuBar ul li { flex: 1; }
#btmMenuBar ul li a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 100%;
  text-decoration: none;
  color: var(--text-muted);
  transition: color .18s;
  position: relative;
}
#btmMenuBar ul li a svg { stroke: currentColor; transition: stroke .18s; }
#btmMenuBar ul li a span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: -.3px;
  line-height: 1;
}
#btmMenuBar ul li a.active,
#btmMenuBar ul li a:active { color: var(--navy); }
#btmMenuBar ul li a.active::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 24px; height: 2.5px;
  background: var(--navy);
  border-radius: 0 0 3px 3px;
}

/* ══════════════════════════════════════
   4. 카테고리 드로어
══════════════════════════════════════ */
.category-drawer {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
}
.category-drawer.open { display: block; }

.category-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  opacity: 0;
  transition: opacity .3s ease;
}
.category-drawer.open .category-backdrop { opacity: 1; }

.category-panel {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-height: 82vh;
  background: var(--bg);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -8px 40px rgba(12, 2, 91, .12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(100%);
  transition: transform .32s cubic-bezier(.4, 0, .2, 1);
  padding-bottom: env(safe-area-inset-bottom);
}
.category-drawer.open .category-panel { transform: translateY(0); }

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.category-header h2 {
  font-size: 17px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -.4px;
  margin: 0;
}
.category-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border: none;
  background: var(--bg-soft);
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-sub);
  transition: background var(--ease);
}
.category-close:active { background: var(--border); }

.category-nav {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 16px 20px 24px;
  flex: 1;
}

/* ── 나라별 섹션 ── */
.drawer-country-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.drawer-country-section { }

.drawer-country-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.drawer-country-flag { font-size: 15px; line-height: 1; }

.drawer-brand-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.drawer-brand-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #0f172a);
  text-decoration: none;
  background: var(--bg-soft, #f8fafc);
  transition: background .12s, color .12s;
}
.drawer-brand-link::before {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--border, #e2e8f0);
  flex-shrink: 0;
  transition: background .12s;
}
.drawer-brand-link:active {
  background: var(--navy-lt, rgba(12,2,91,.07));
  color: var(--navy, #0C025B);
}
.drawer-brand-link:active::before {
  background: var(--navy, #0C025B);
}

/* ── 하단 바로가기 ── */
.drawer-footer {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border, #e2e8f0);
}
.drawer-footer-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-sub, #64748b);
  text-decoration: none;
  background: #fff;
  transition: all .15s;
}
.drawer-footer-btn:active {
  border-color: var(--navy, #0C025B);
  color: var(--navy, #0C025B);
  background: var(--navy-lt, rgba(12,2,91,.07));
}

/* ══════════════════════════════════════
   5. 자동완성
══════════════════════════════════════ */
.search-auto-complete-list {
  display: none;
  position: absolute;
  top: 56px; left: 0; right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(12,2,91,.08);
  z-index: 1200;
}
.search-auto-complete-list ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 16px 16px;
  list-style: none;
  margin: 0;
}
.search-auto-complete-list ul li a {
  display: block;
  padding: 6px 14px;
  font-size: 12.5px;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-soft);
  text-decoration: none;
  transition: all var(--ease);
}
.search-auto-complete-list ul li a strong { color: var(--accent); }
.search-auto-complete-list ul li a:active {
  background: var(--navy-lt);
  border-color: var(--navy);
  color: var(--navy);
}

/* ══════════════════════════════════════
   6. body-lock
══════════════════════════════════════ */
body.body-lock {
  overflow: hidden;
  height: 100vh;
  touch-action: none;
}
/* BASIC css end */

