:root {
  --container: 1400px;
  --ink: #0f172a;
  --muted: #6b7280;
  --line: #e9edf3;
  --white: #fff;
  --clover-green: #2d5f3f;
  --clover-light: #4ade80;
  --clover-dark: #1e4a2f;
}

/* 공통 컨테이너 */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ========================================
   1) 전체 헤더 래퍼 (sticky)
   ======================================== */
.site-header-wrap {
  position: sticky;
  top: 0;
  z-index: 999;
  background: #ffffff;
  border-bottom: 1px solid #e9ecef;
}

.site-header {
  width: 100%;
  background: #ffffff;
}

/* ========================================
   2) 헤더 내부 컨테이너 - 한 줄로 정리
   ======================================== */
.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  height: 60px;
}

/* ========================================
   3) 로고
   ======================================== */
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.logo img {
  height: 32px;
  width: auto;
}

/* ========================================
   4) 검색창 - 헤더 오른쪽에 작게
   ======================================== */
.search-wrap {
  position: relative;
  flex: 0 0 auto;
  width: 280px;
}

.search-wrap input[type="text"] {
  width: 100%;
  padding: 10px 40px 10px 16px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
  background: #cdfaff70;
  color: #212529;
}

.search-wrap input[type="text"]::placeholder {
  color: #adb5bd;
}

.search-wrap input[type="text"]:focus {
  border-color: #4dabf7;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(77, 171, 247, 0.1);
}

.search-wrap .search-ic {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #868e96;
  pointer-events: none;
}

/* ========================================
   5) 사용자 박스 - 아이콘 형태로
   ======================================== */
.user-box {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  color: #495057;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.user-name:hover {
  background: #f1f3f5;
  color: #212529;
}

.path {
  font-size: 14px;
  font-weight: 600;
  color: #495057;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
}

.path:hover {
  background: #f1f3f5;
}

.login-btn,
.signup-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
}

.login-btn {
  color: #495057;
  background: transparent;
}

.login-btn:hover {
  background: #f1f3f5;
}

.signup-btn {
  color: #495057;
  background: transparent;
}

.signup-btn:hover {
  background: #f1f3f5;
}

.user-logout {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #fa5252;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-logout:hover {
  background: #fff5f5;
}

/* ========================================
   6) 카테고리 네비게이션 - 헤더 안에 통합
   ======================================== */
.nav-container {
  display: flex;
  align-items: center;
  flex: 1;
  margin-left: 40px;
}

.cat-nav {
  background: transparent;
  border: none;
}
.sr-only {
  display: none;
}

.cat-nav ul {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cat-nav li {
  position: relative;
}

.cat-nav a {
  display: block;
  padding: 0;
  width: max-content;
  font-size: 15px;
  font-weight: 600;
  color: #495057;
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
}

.cat-nav a:hover {
  color: #4dabf7;
}

.cat-nav li.active a {
  color: #4dabf7;
}

/* 카테고리 드롭다운 */
.category-dropdown,
.hidden_cate,
.hidden_board {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 8px;
  min-width: 180px;
  z-index: 1000;
  margin-top: 0px;
}

.nav-category:hover .hidden_cate,
.nav-board:hover .hidden_board {
  display: block;
}

.category-link,
.board-link {
  display: block;
  padding: 10px 14px;
  color: #495057;
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.category-link:hover,
.board-link:hover {
  background: #f1f3f5;
  color: #4dabf7;
}

/* ========================================
   7) 반응형
   ======================================== */
@media (max-width: 1024px) {
  .header-inner {
    height: 68px;
    gap: 24px;
  }

  .search-wrap {
    max-width: 450px;
  }

  .cat-nav ul {
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .header-inner {
    height: 64px;
    gap: 16px;
    padding: 0;
  }

  .header-container {
    padding: 0 16px;
  }

  .search-wrap {
    max-width: 320px;
  }

  .search-wrap input[type="text"] {
    padding: 12px 44px 12px 20px;
    font-size: 14px;
  }

  .user-box {
    gap: 8px;
  }

  .login-btn,
  .signup-btn,
  .user-logout {
    padding: 9px 16px;
    font-size: 13px;
  }

  .cat-nav ul {
    gap: 24px;
    padding: 0 16px;
  }

  .cat-nav a {
    font-size: 14px;
  }
}

@media (max-width: 640px) {
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 14px;
  }

  .user-box {
    order: 2;
  }

  .search-wrap {
    order: 3;
    max-width: 80%;
    width: 100%;
    margin: 0 auto;
  }

  .cat-nav ul {
    gap: 20px;
  }

  .user-name,
  .path {
    font-size: 0;
    padding: 10px;
  }

  .user-name::before {
    content: "👤";
    font-size: 18px;
  }

  .path::before {
    content: "🛒";
    font-size: 18px;
  }
}
