/* Gamja shop — modern search overlay / typeahead */
.gn-search-panel {
  display: none;
  position: absolute;
  left: 0; right: 0;
  top: calc(100% + 6px);
  z-index: 9700;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,.12);
  overflow: hidden;
  text-align: left;
}
.gn-search-panel.is-open { display: block; }
.gn-search-panel__sec { padding: 12px 14px 8px; border-bottom: 1px solid #f3f3f3; }
.gn-search-panel__sec:last-child { border-bottom: 0; }
.gn-search-panel__hd {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px; font-size: 12px; font-weight: 700; color: #888; letter-spacing: .02em;
}
.gn-search-panel__hd button {
  border: 0; background: transparent; color: #be4444; font-size: 12px; cursor: pointer; padding: 0;
}
.gn-search-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gn-search-chips a,
.gn-search-panel .gn-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 10px; border-radius: 999px;
  background: #faf6fa; color: #555; font-size: 12px;
  text-decoration: none !important; border: 1px solid #f0e4ef;
}
.gn-search-chips a:hover,
.gn-search-panel .gn-chip:hover { background: #f3e8f2; color: #be4444; }
.gn-search-panel .gn-chip.is-recent { background: #f7f7f7; border-color: #eee; }
.gn-search-panel .gn-chip .x {
  border: 0; background: transparent; color: #aaa; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 0 0 2px;
}

.gn-suggest-list { list-style: none; margin: 0; padding: 0; }
.gn-suggest-list li a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 4px; text-decoration: none !important; color: #333; border-radius: 8px;
}
.gn-suggest-list li a:hover,
.gn-suggest-list li.is-active a { background: #faf6fa; }
.gn-suggest-list img {
  width: 44px; height: 44px; object-fit: cover; border-radius: 8px; background: #f5f5f5; flex-shrink: 0;
}
.gn-suggest-list .meta { min-width: 0; flex: 1; }
.gn-suggest-list .name {
  display: block; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gn-suggest-list .name mark { background: transparent; color: #be4444; font-weight: 700; padding: 0; }
.gn-suggest-list .price { display: block; margin-top: 2px; font-size: 12px; color: #be4444; font-weight: 700; }
.gn-suggest-list .price .was { color: #bbb; font-weight: 400; text-decoration: line-through; margin-left: 6px; }
.gn-suggest-list .kw-row {
  display: flex; align-items: center; gap: 8px; padding: 8px 4px; font-size: 13px; color: #333;
  text-decoration: none !important; border-radius: 8px;
}
.gn-suggest-list .kw-row:hover { background: #faf6fa; color: #be4444; }
.gn-suggest-list .kw-row i { color: #ccc; width: 16px; text-align: center; }
.gn-suggest-foot {
  display: block; padding: 12px 14px; text-align: center; font-size: 13px; font-weight: 600;
  color: #be4444; text-decoration: none !important; background: #faf6fa;
}
.gn-suggest-empty { padding: 18px 8px; text-align: center; color: #aaa; font-size: 13px; }

/* desktop header search shell */
#hd .hd_sch .sch_frm { position: relative; }
#hd .hd_sch .sch_frm .gn-search-panel { min-width: 360px; }

/* mobile full search sheet */
.gn-msearch {
  /* base; mobile overrides in media query */
}
.gn-msearch .gn-msearch__inner { position: relative; }
.gn-msearch .gn-search-panel {
  position: relative; top: 8px; left: 0; right: 0;
  box-shadow: none; border-radius: 10px;
}

/* search results page */
.gn-search-page .gn-search-hero { margin: 8px 0 18px; }
.gn-search-hero__box {
  display: flex; align-items: center; gap: 8px;
  border: 2px solid #be4444; border-radius: 999px; padding: 4px 6px 4px 16px; background: #fff;
}
.gn-search-hero__box > .fa { color: #be4444; font-size: 16px; }
.gn-search-hero__box input {
  flex: 1; border: 0; outline: none; height: 42px; font-size: 16px; background: transparent; min-width: 0;
}
.gn-search-hero__clear {
  width: 28px; height: 28px; border: 0; border-radius: 50%; background: #eee; color: #666; cursor: pointer; font-size: 16px;
}
.gn-search-hero__go {
  border: 0; border-radius: 999px; background: #be4444; color: #fff;
  height: 40px; padding: 0 20px; font-size: 14px; font-weight: 700; cursor: pointer;
}
.gn-search-page .gn-search-chips { margin-bottom: 20px; align-items: center; }
.gn-search-chips__label { font-size: 12px; color: #999; font-weight: 700; margin-right: 4px; }
.gn-search-related {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 0 0 16px; font-size: 13px; color: #888;
}
.gn-search-related a {
  padding: 5px 10px; border-radius: 999px; border: 1px solid #eee; color: #555; text-decoration: none !important; background: #fff;
}
.gn-search-related a:hover { border-color: #be4444; color: #be4444; }
.gn-search-empty { text-align: center; padding: 56px 16px; }
.gn-search-empty__tit { margin: 0 0 8px; font-size: 18px; font-weight: 700; color: #333; }
.gn-search-empty__desc { margin: 0; color: #999; font-size: 14px; line-height: 1.5; }
.gn-search-empty__actions { margin-top: 20px; display: flex; gap: 8px; justify-content: center; }

@media (max-width: 980px) {
  .gn-msearch {
    display: none;
    position: fixed;
    top: var(--gn-mbar-h, 52px); left: 0; right: 0; bottom: auto;
    z-index: 10040;
    padding: 10px 12px 12px;
    background: #fff;
    border-bottom: 1px solid #eee;
    max-height: calc(100vh - var(--gn-mbar-h, 52px));
    overflow: auto;
  }
  .gn-msearch.is-open { display: block; }
  .gn-msearch form {
    display: flex; border: 2px solid var(--gn-accent, #be4444); border-radius: 10px; overflow: hidden; background: #fff;
  }
  .gn-msearch input {
    flex: 1; border: 0; height: 44px; padding: 0 12px; font-size: 15px; outline: none; min-width: 0;
  }
  .gn-msearch .gn-msearch__clear {
    width: 36px; border: 0; background: transparent; color: #999; font-size: 18px; cursor: pointer;
  }
  .gn-msearch button[type="submit"] {
    width: 48px; border: 0; background: var(--gn-accent, #be4444); color: #fff; font-size: 16px;
  }
}
