/* ===========================
   Cropick — search.css
   =========================== */

/* ── 검색 오버레이 ── */
.search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,.45);
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
}
.search-overlay.open { display: flex; }

.search-box {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 680px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 160px);
}

/* 검색 입력창 */
.search-box__input-row {
  display: flex;
  align-items: center;
  padding: 18px 20px;
  gap: 12px;
  border-bottom: 1px solid #E8E8E8;
  flex-shrink: 0;
}
.search-box__icon {
  color: #888;
  flex-shrink: 0;
}
.search-box__input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 17px;
  font-family: 'Noto Sans KR', sans-serif;
  color: #1A1A1A;
  background: transparent;
}
.search-box__input::placeholder { color: #bbb; }
.search-box__clear {
  background: none;
  border: none;
  font-size: 18px;
  color: #bbb;
  cursor: pointer;
  padding: 0 4px;
  transition: color .2s;
  display: none;
}
.search-box__clear.visible { display: block; }
.search-box__clear:hover { color: #444; }

/* 결과 영역 */
.search-results {
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: #E8E8E8 transparent;
}
.search-results::-webkit-scrollbar { width: 4px; }
.search-results::-webkit-scrollbar-thumb { background: #E8E8E8; border-radius: 2px; }

/* 초기 안내 */
.search-hint {
  padding: 32px 24px;
  text-align: center;
  color: #aaa;
  font-size: 14px;
}
.search-hint__icon { font-size: 32px; margin-bottom: 10px; }

/* 결과 그룹 */
.search-group { padding: 0; }
.search-group__title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px 8px;
  font-size: 12px;
  font-weight: 700;
  color: #888;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-bottom: 1px solid #F0F0F0;
}
.search-group__badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 50px;
  color: #fff;
}
.badge-market   { background: #3A9E2F; }
.badge-campaign { background: #3D2B1F; }

/* 결과 아이템 */
.search-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  cursor: pointer;
  transition: background .15s;
  text-decoration: none;
  color: inherit;
}
.search-item:hover { background: #F6FAF5; }
.search-item__thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: #eee;
  flex-shrink: 0;
}
.search-item__thumb-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #F0F0F0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.search-item__body { flex: 1; min-width: 0; }
.search-item__name {
  font-size: 14px;
  font-weight: 600;
  color: #1A1A1A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.search-item__name mark {
  background: none;
  color: #3A9E2F;
  font-weight: 800;
}
.search-item__sub {
  font-size: 12px;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-item__type {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 50px;
  white-space: nowrap;
  flex-shrink: 0;
}
.type-market   { background: #EBF7E9; color: #2D7D24; border: 1px solid #c5e8be; }
.type-region   { background: #FFF3E0; color: #E65100; border: 1px solid #FFD0A0; }
.type-delivery { background: #E3F2FD; color: #1565C0; border: 1px solid #90CAF9; }
.type-insta {
  background: linear-gradient(135deg, #feda75 0%, #fa7e1e 20%, #d62976 50%, #962fbf 75%, #4f5bd5 100%);
  color: #fff;
  border: none;
  position: relative;
}
.type-blog     { background: #F3E5F5; color: #6A1B9A; border: 1px solid #CE93D8; }

/* 결과 없음 */
.search-empty {
  padding: 40px 24px;
  text-align: center;
  color: #aaa;
  font-size: 14px;
}
.search-empty__icon { font-size: 36px; margin-bottom: 10px; }

/* 하단 바 */
.search-box__footer {
  padding: 10px 20px;
  border-top: 1px solid #F0F0F0;
  font-size: 12px;
  color: #bbb;
  text-align: center;
  flex-shrink: 0;
}

/* ── 인스타그램 아이콘 (CSS로 로고 구현) ── */
.insta-icon {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: linear-gradient(135deg, #feda75 0%, #fa7e1e 25%, #d62976 50%, #962fbf 75%, #4f5bd5 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}
.insta-icon::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  position: absolute;
}
.insta-icon::after {
  content: "";
  width: 2.5px;
  height: 2.5px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  top: 2px;
  right: 2px;
}


/* ════════════════════════════════
   MOBILE — search.css
════════════════════════════════ */
@media (max-width: 768px) {
  .search-overlay { padding-top: 16px; align-items: flex-start; }
  .search-box { border-radius: 12px; max-height: calc(100vh - 32px); margin: 0 12px; }
  .search-box__input { font-size: 15px; }
}

/* ════════════════════════════════
   HAMBURGER + DRAWER
════════════════════════════════ */

/* 햄버거 버튼 — PC에서는 숨김 */
.navbar__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px; height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: 8px;
  border-radius: 8px;
  transition: background .2s;
}
.navbar__hamburger:hover { background: var(--bg-soft, #F6FAF5); }
.navbar__hamburger span {
  display: block;
  width: 20px; height: 2px;
  background: #555;
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}

/* 드로어 오버레이 */
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 1100;
}
.drawer-overlay.open { display: block; }

/* 드로어 패널 */
.drawer {
  position: fixed;
  top: 0; left: 0;
  width: 280px; height: 100%;
  background: #fff;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform .3s cubic-bezier(.22,1,.36,1);
  box-shadow: 4px 0 24px rgba(0,0,0,.12);
}
.drawer.open { transform: translateX(0); }

.drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #E8E8E8;
  flex-shrink: 0;
}
.drawer__header img { height: 28px; width: auto; object-fit: contain; }
.drawer__close {
  width: 32px; height: 32px;
  background: none; border: none;
  font-size: 18px; color: #888;
  cursor: pointer;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.drawer__close:hover { background: #f5f5f5; }

.drawer__nav {
  display: flex;
  flex-direction: column;
  padding: 12px 0;
  flex: 1;
  overflow-y: auto;
}
.drawer__nav a {
  font-size: 16px;
  font-weight: 500;
  color: #444;
  padding: 14px 24px;
  text-decoration: none;
  transition: background .15s, color .15s;
  border-left: 3px solid transparent;
}
.drawer__nav a:hover { background: #F6FAF5; color: #1A1A1A; }
.drawer__nav a.active {
  color: var(--primary, #3A9E2F);
  font-weight: 700;
  border-left-color: var(--primary, #3A9E2F);
  background: rgba(58,158,47,.05);
}

.drawer__actions {
  padding: 16px 24px 32px;
  border-top: 1px solid #E8E8E8;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.drawer__actions a {
  font-size: 14px;
  font-weight: 500;
  color: #888;
  text-decoration: none;
  padding: 8px 0;
  transition: color .2s;
}
.drawer__actions a:hover { color: #1A1A1A; }
.drawer__login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary, #3A9E2F);
  color: #fff !important;
  border-radius: 8px;
  padding: 12px 0 !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  transition: background .2s;
}
.drawer__login:hover { background: var(--primary-dark, #2D7D24); }

/* 모바일에서만 햄버거 표시 */
@media (max-width: 768px) {
  .navbar__hamburger { display: flex; }
}

