/* Shared header controls and collapsible search on all screen sizes. */
.desktop-market-bar, .desktop-nav-actions {
  display: none;
}

.goldSpotHeader,
.goldSpotHeader li,
.goldSpotHeader span {
  font-family: 'NanumSquare', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}

.desktop-navigation .cbp-hrmenu > ul > li > a {
  font-family: 'NanumSquare', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  font-weight: 700;
  /* font-size: 1.7em; */
}

#header-search-panel {
  display: none;
  box-sizing: border-box;
  width: 100%;
  padding: 0 16px;
}

#header-search-panel.is-open {
  display: block;
}

#header-search-panel #top_menu_1 {
  overflow: visible;
}

#header-search-panel .top_menu_search {
  width: 100%;
  max-width: 560px;
  padding: 0;
  position: relative;
}

#header-search-panel #SearchForm {
  display: block;
  position: relative;
}

#header-search-panel #search {
  box-sizing: border-box;
  width: 100%;
  height: 46px;
  padding: 0 52px 0 16px;
  border: 1px solid #c8c3b9;
  background: #fff;
  color: #171611;
  font-family: inherit;
  border-radius: 0;
}

.header-search-submit {
  position: absolute;
  right: 0;
  top: 0;
  width: 46px;
  height: 46px;
  border: 0;
  background: transparent;
  color: #171611;
}

.header-search-submit svg, .desktop-icon-button svg, #mobile-search-toggle svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.header-search-suggestions {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

#header-search-panel .search_display {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  background: #fff;
  max-height: 60vh;
  overflow-y: auto;
}

.desktop-navigation a:focus-visible, .desktop-icon-button:focus-visible, .desktop-member-links a:focus-visible, #header-search-panel input:focus-visible, .header-search-submit:focus-visible, #mobile-search-toggle:focus-visible {
  outline: 2px solid #b08b42;
  outline-offset: 3px;
}

/* Override the legacy 520px header breakpoint without changing page layouts. */
@media (max-width: 768px) {
  .desktop-market-bar,
  .head_screen.desktop-navigation {
    display: none;
  }

  .goldspot_head,
  header.mobile-navigation {
    display: block;
  }

  header.mobile-navigation .navcontainer {
    position: relative;
    height: 60px;
  }

  header.mobile-navigation #menu {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    margin: 5px 3px;
    font-size: 30px;
    line-height: 40px;
    text-align: center;
    cursor: pointer;
  }

  header.mobile-navigation .logo,
  body > menu .logo,
  body > submenu .logo {
    display: block;
    width: 145px;
    height: 47px;
    margin: 0 auto;
    padding: 6px 0;
  }

  header.mobile-navigation .top_iconbtn {
    position: absolute;
    top: 0;
    right: 0;
  }

  #mobile-search-toggle {
    position: absolute;
    top: 5px;
    left: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #29385f;
  }

  header.mobile-navigation .top_iconbtn .icon {
    float: left;
    width: 32px;
    height: 32px;
    margin: 5px 0;
    font-size: 30px;
    line-height: 40px;
    text-align: center;
    cursor: pointer;
  }
}

@media (min-width: 769px) {
  .desktop-market-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(0, max-content) minmax(220px, 1fr);
    align-items: center;
    gap: 24px;
    min-height: 35px;
    padding: 0 34px;
    background: #29385f;
    color: #c5a45e;
  }

  .desktop-market-bar .head_soptlist {
    display: block !important;
    grid-column: 2;
    grid-row: 1;
    float: none;
    width: auto;
    height: auto;
    background: transparent;
    min-width: 0;
  }

  .desktop-market-bar .goldSpotList {
    width: auto;
    margin: 0;
  }

  .desktop-market-bar .goldSpotHeader {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    width: auto;
    height: auto;
    gap: 0;
  }

  .desktop-market-bar .goldSpotHeader > div {
    float: none;
    width: auto;
    text-align: left;
    color: #fff;
    font-size: 12px;
    line-height: 20px;
    margin: 5px 0;
    padding: 0 24px;
    border-left: 1px solid #3b3425;
    white-space: nowrap;
  }

  .desktop-market-bar .goldSpotHeader > div:first-child {
    padding-left: 0;
    border-left: 0;
  }

  .desktop-market-bar .goldSpotHeader > div:last-child {
    padding-right: 0;
  }

  .desktop-member-links {
    display: flex;
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-items: center;
    flex-shrink: 0;
    gap: 18px;
    font-size: 12px;
    white-space: nowrap;
  }

  .desktop-member-links a {
    color: #eee9df;
  }

  .desktop-member-links a:first-child, .desktop-member-links a:hover {
    color: #c5a45e;
  }

  .desktop-member-links .language-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: background-color 150ms ease;
  }

  .desktop-member-links .language-switch img {
    display: block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
  }

  .desktop-member-links .language-switch:hover,
  .desktop-member-links .language-switch:focus-visible {
    background-color: rgba(255, 255, 255, 0.16);
  }

  /* common_re.js sets an inline max-width on subpages. */
  .head_screen.desktop-navigation {
    display: flex;
    align-items: center;
    gap: 24px;
    box-sizing: border-box;
    width: 100%;
    max-width: none !important;
    min-height: 80px;
    padding: 12px 34px;
    margin: 0;
    overflow: visible;
    background: #fff;
    border-bottom: 1px solid #eae6dd;
  }

  .desktop-navigation .head_middle {
    display: block;
    flex: 0 0 180px;
    order: -1;
    margin: 0;
    width: auto;
    height: auto;
    overflow: visible;
    z-index: auto;
    text-align: left;
  }

  .desktop-navigation .head_middle_logo {
    display: block;
    width: auto;
    padding: 0;
    margin: 0;
    text-align: left;
  }

  .desktop-navigation .head_middle_logo a {
    display: inline-block;
  }

  .desktop-navigation .head_middle_logo img {
    display: block;
    width: 180px;
    max-width: 100%;
    height: auto;
    mix-blend-mode: multiply;
  }

  .desktop-navigation .cbp-hrmenu {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    overflow: visible;
  }

  .desktop-navigation .cbp-hrmenu > ul {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 12px;
  }

  .desktop-navigation .cbp-hrmenu > ul > li {
    height: auto;
  }

  .desktop-navigation .cbp-hrmenu > ul > li > a {
    position: relative;
    padding: 8px 0;
    font-size: 1.4em;
    line-height: 24px;
    white-space: nowrap;
    text-decoration: none;
  }

  .desktop-navigation .cbp-hrmenu > ul > li > a::after {
    content: '';
    position: absolute;
    left: 50%;
    width: 3px;
    bottom: -8px;
    height: 3px;
    border-radius: 2px;
    background: #29385f;
    pointer-events: none;
    opacity: 0;
    transform: translateX(-50%);
    transition: width 250ms ease-in, opacity 180ms ease-in;
  }

  .desktop-navigation .cbp-hrmenu > ul > li > a:hover,
  .desktop-navigation .cbp-hrmenu > ul > li > a:focus-visible {
    color: #a7833f;
    text-decoration: none;
  }

  .desktop-navigation .cbp-hrmenu > ul > li > a:hover::after,
  .desktop-navigation .cbp-hrmenu > ul > li > a:focus-visible::after {
    width: 100%;
    opacity: 1;
    /* Expand immediately from the center with a fast ease-out. */
    transition: opacity 40ms linear, width 200ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .desktop-nav-actions {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 10px;
  }

  .desktop-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 40px;
    height: 40px;
    border: 0;
    padding: 0;
    background: transparent;
    color: #171611;
  }

  .desktop-icon-button:hover, .desktop-icon-button[aria-expanded="true"] {
    color: #a7833f;
  }

  #header-search-panel {
    display: none;
    position: relative;
    background: #fff;
    border-bottom: 1px solid #eae6dd;
    padding: 8px 34px 18px;
  }

  #header-search-panel.is-open {
    display: block;
  }

  #header-search-panel #top_menu_1 {
    overflow: visible;
  }
}

@media (min-width: 1200px) {
  .desktop-navigation .cbp-hrmenu > ul {
    justify-content: center;
    column-gap: 38px; /*메뉴 사이 간격*/
  }

  .desktop-navigation .cbp-hrmenu > ul > li {
    flex: 0 0 auto;
    width: auto;
    margin-left: 0;
    margin-right: 0;
  }
}

@media (min-width: 769px) and (max-width: 1199px) {
  .desktop-market-bar {
    padding: 0 20px;
    gap: 16px;
  }

  .desktop-market-bar .goldSpotHeader > div {
    padding: 0 10px;
    font-size: 11px;
  }

  .desktop-member-links {
    gap: 12px;
  }

  .head_screen.desktop-navigation {
    padding: 12px 20px;
    gap: 16px;
  }

  .desktop-navigation .head_middle {
    flex-basis: 140px;
  }

  .desktop-navigation .head_middle_logo img {
    width: 140px;
  }

  .desktop-navigation .cbp-hrmenu > ul {
    gap: 0 10px;
  }

  .desktop-navigation .cbp-hrmenu > ul > li > a {
    font-size: 14px;
  }

  .desktop-nav-actions {
    gap: 2px;
  }
}
