/**
 * 헤더 컴포넌트 - 오렌지-핑크 그라디언트 디자인
 */

body {
  padding-top: 64px;
}

.site-header {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-fixed);
  border-bottom: 1px solid #f3f4f6;
  backdrop-filter: blur(8px);
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 32px;
}

/* 로고 */
.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #f97316, #ec4899);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(90deg, #ea580c, #db2777);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 헤더 검색폼 */
.header-search-form {
  flex: 1;
  max-width: 560px;
  display: flex;
  align-items: center;
  background: #f3f4f6;
  border-radius: 9999px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.header-search-form:focus-within {
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
  background: #fff;
}

.header-search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 16px;
  font-size: 0.875rem;
  color: #111827;
  font-family: inherit;
  outline: none;
}

.header-search-input::placeholder {
  color: #9ca3af;
}

.header-search-btn {
  background: none;
  border: none;
  padding: 10px 16px;
  cursor: pointer;
  color: #f97316;
  font-size: 1rem;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.header-search-btn:hover {
  color: #c2410c;
}

/* 서브 네비게이션 */
.site-subnav {
  background-color: #e5e5e5;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  width: 100%;
}

.site-subnav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-subnav-list li a {
  display: block;
  padding: 0 20px;
  line-height: 44px;
  font-size: 0.875rem;
  color: #374151;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}

.site-subnav-list li a:hover {
  color: #ea580c;
}

/* 유저 메뉴 */
.user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* 리뷰 작성 버튼 */
.btn-write {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #ea580c;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}

.btn-write:hover {
  color: #c2410c;
}

/* 헤더 아웃라인 버튼 */
.btn-header-outline {
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
  font-family: inherit;
}

.btn-header-outline:hover {
  color: #ea580c;
}

/* 헤더 회원가입 버튼 */
.btn-header-primary {
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: white;
  background: linear-gradient(135deg, #f97316, #ec4899);
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.btn-header-primary:hover {
  opacity: 0.9;
}

/* 사용자 프로필 래퍼 */
.user-profile-wrapper {
  position: relative;
}

/* 사용자 프로필 버튼 */
.user-profile-button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  background: white;
  border-radius: 9999px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  white-space: nowrap;
}

.user-profile-button:hover {
  border-color: #fdba74;
  color: #ea580c;
}

.profile-avatar-img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-avatar-initial {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f97316, #ec4899);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.user-nickname-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dropdown-arrow {
  font-size: 10px;
  color: #9ca3af;
}

/* 사용자 드롭다운 */
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  overflow: hidden;
}

/* 드롭다운 헤더 */
.dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: white;
}

.dropdown-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f97316, #ec4899);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.dropdown-avatar.has-image {
  padding: 0;
  background: none;
}

.dropdown-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dropdown-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dropdown-nickname-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dropdown-nickname {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #111827;
}

.dropdown-mypage-link {
  font-size: 0.75rem;
  color: #ea580c;
  text-decoration: none;
  padding: 2px 8px;
  border: 1px solid #fdba74;
  border-radius: 6px;
  transition: all 0.2s;
  white-space: nowrap;
}

.dropdown-mypage-link:hover {
  background: #ea580c;
  border-color: #ea580c;
  color: white;
}

.dropdown-email {
  font-size: 0.8125rem;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 드롭다운 메뉴 */
.dropdown-menu {
  display: flex;
  flex-direction: column;
  border-top: 1px solid #f3f4f6;
}

.dropdown-item {
  padding: 10px 20px;
  text-decoration: none;
  color: #374151;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.dropdown-item:hover {
  background: #fff7ed;
  color: #ea580c;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
  .header-container {
    gap: 16px;
  }

  .header-search-form {
    max-width: none;
  }

  .btn-write span {
    display: none;
  }

  .btn-write {
    padding: 8px;
  }

  .site-subnav {
    display: none;
  }
}

@media (max-width: 480px) {
  .btn-write {
    display: none;
  }

  .user-menu {
    gap: 4px;
  }
}
