@charset "UTF-8";
/* Global header, navigation, search, account and mega menu */

/* ============================================================
   헤더
   ============================================================ */
.av-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 100;
  height: var(--av-header-h);
  display: block;
  transition: background-color .3s var(--av-ease), border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.av-header.is-stuck {
  /* .84 로는 뒤를 지나는 44px 마퀴 글자가 비쳐 로고를 갉아먹는다 */
  background: rgba(var(--av-bg-rgb), .94);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--av-line);
}
.av-header.is-menu-open {
  background: rgba(18,18,18,.9);
  backdrop-filter: saturate(145%) blur(18px);
  border-bottom-color: transparent;
}
.av-header.is-menu-open .av-header__bottom {
  border-top-color: rgba(255,255,255,.07);
}
.av-header__inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}
.av-header__top,
.av-header__bottom {
  width: 100%;
  display: flex;
  align-items: center;
}
.av-header__top {
  min-height: 84px;
  padding-block-start: 12px;
  gap: 30px;
}
.av-header__bottom {
  min-height: 58px;
  justify-content: space-between;
  border-top: 0;
}
.av-logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.av-logo__img {
  display: block;
  width: 160px;
  height: auto;
  pointer-events: none;
  transform: translateY(-1.4px);
}

.av-header-search {
  position: relative;
  flex: 1 1 520px;
  max-width: 660px;
  margin-inline: auto;
}
.av-header-search input {
  width: 100%;
  height: 46px;
  padding: 0 50px 0 20px;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: var(--av-radius-pill);
  background: rgba(var(--av-bg-rgb), .42);
  color: var(--av-fg);
  font-size: 1rem;
  outline: none;
  transition: border-color .24s var(--av-ease), background-color .24s var(--av-ease);
}
.av-header-search input::placeholder { color: var(--av-fg-dim); }
.av-header-search input:focus {
  border-color: #E60012;
  background: rgba(var(--av-bg-rgb), .72);
}
.av-header-search button {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: 5px;
  width: 46px;
  height: 46px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  color: var(--av-white);
  transition: color .24s var(--av-ease);
}
.av-header-search:focus-within button,
.av-header-search:has(input:not(:placeholder-shown)) button {
  color: #E60012;
}
.av-header-search:has(input:not(:placeholder-shown)) input {
  border-color: #E60012;
}
.av-header__auth,
.av-header__tools { display: flex; align-items: center; gap: 8px; }
.av-header__auth { flex-shrink: 0; }
.av-header__auth .av-btn {
  height: 42px;
  padding-inline: 20px;
  font-size: .9375rem;
}

.av-gnb { display: flex; align-items: center; gap: 12px; }
.av-gnb__item {
  position: relative;
  height: 58px;
  display: flex;
  align-items: center;
}
.av-gnb__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding-inline: 16px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--av-white);
  border-radius: var(--av-radius-sm);
  transition: color .28s var(--av-ease);
}
.av-gnb__link.is-active { color: var(--av-fg); }
.av-gnb__item:hover > .av-gnb__link { color: var(--av-white); }
.av-gnb__link::after {
  content: "";
  position: absolute;
  inset-inline: 15px;
  bottom: 6px;
  height: 2px;
  background: var(--av-accent);
  border-radius: 2px;
  opacity: 0;
  transform: scaleX(.25);
  transform-origin: center;
  transition: opacity .24s var(--av-ease), transform .32s var(--av-ease);
}
.av-gnb__link.is-active::after,
.av-gnb__item:hover > .av-gnb__link::after,
.av-gnb__item:focus-within > .av-gnb__link::after {
  opacity: 1;
  transform: scaleX(1);
}
.av-gnb__dropdown {
  position: absolute;
  top: 58px;
  left: 0;
  min-width: 132px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 0;
  border: 0;
  border-radius: var(--av-radius-sm);
  background-color: #222222;
  box-shadow: var(--av-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .2s, transform .25s var(--av-ease), visibility .25s;
}
.av-gnb__dropdown a {
  padding: 9px 15px;
  border-radius: 6px;
  color: var(--av-fg-muted);
  font-size: .9375rem;
  white-space: nowrap;
  transition: color .34s var(--av-ease);
}
.av-gnb__dropdown a:hover { color: var(--av-white); }
.av-gnb__item:hover .av-gnb__dropdown,
.av-gnb__item:focus-within .av-gnb__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.av-header.is-menu-open .av-gnb__dropdown {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.av-iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;   /* 터치 타겟 최소 44 */
  border-radius: 50%;
  color: var(--av-white);
  transition: background-color .2s, color .2s;
}
.av-iconbtn:hover { background: var(--av-hover-strong); color: var(--av-fg); }
.av-iconbtn__badge {
  position: absolute;
  transform: translate(12px,-12px);
  min-width: 18px; height: 18px;
  padding-inline: 5px;
  border-radius: 9px;
  background: var(--av-accent);
  color: var(--av-accent-ink);
  font-size: .6875rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.av-header__cart { position: relative; }

.av-header__bottom .av-iconbtn {
  width: 50px;
  height: 50px;
}
.av-header__bottom .av-iconbtn > svg {
  width: 24px;
  height: 24px;
}
.av-header__bottom .av-header__wishlist > svg {
  width: 30px;
  height: 30px;
  stroke-width: 1.6;
}
.av-header__bottom .av-burger > svg {
  width: 25px;
  height: 25px;
}
.av-header__bottom .av-iconbtn:hover {
  background: transparent;
  color: #e60012;
}

.av-account {
  position: relative;
  height: 58px;
  display: flex;
  align-items: center;
}
.av-account__toggle[aria-expanded="true"] {
  background: transparent;
  color: #e60012;
}
.av-account__panel {
  position: absolute;
  top: 58px;
  right: 0;
  width: 286px;
  padding: 16px;
  border: 1px solid var(--av-line);
  border-radius: var(--av-radius);
  background: rgba(var(--av-bg-rgb), .98);
  box-shadow: var(--av-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .2s, transform .25s var(--av-ease), visibility .25s;
}
.av-account.is-open .av-account__panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.av-account__guest,
.av-account__member {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 4px 4px 14px;
}
.av-account__guest strong,
.av-account__member strong { font-size: .95rem; }
.av-account__guest p,
.av-account__member span { color: var(--av-fg-muted); font-size: .8rem; }
.av-account__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.av-account__nav {
  display: flex;
  flex-direction: column;
  padding-block: 8px;
  border-block: 1px solid var(--av-line);
}
.av-account__nav a,
.av-account__logout button {
  width: 100%;
  display: flex;
  align-items: center;
  min-height: 38px;
  padding-inline: 10px;
  border-radius: 6px;
  color: var(--av-fg-muted);
  font-size: .875rem;
  text-align: left;
}
.av-account__nav a:hover,
.av-account__nav a.is-active,
.av-account__logout button:hover {
  color: var(--av-white);
  background: var(--av-hover);
}
.av-account__nav a.is-active::after {
  content: "";
  width: 5px;
  height: 5px;
  margin-inline-start: auto;
  border-radius: 50%;
  background: var(--av-accent);
}
.av-account__logout { padding-top: 8px; }

.av-header__bottom-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.av-burger {
  display: inline-flex;
  flex-shrink: 0;
}
.av-burger[aria-expanded="true"] {
  background: transparent;
  color: #e60012;
}

@media (min-width: 901px) {
  .av-burger { margin-inline-start: -12px; }
  .av-header__tools { margin-inline-end: -12px; }
}

@media (max-width: 1024px) {
  .av-gnb { display: none; }
  .av-header__bottom { justify-content: space-between; }
}

@media (max-width: 900px) {
  .av-header { display: block; }
  .av-header__inner { flex-direction: column; }
  .av-header__top {
    display: flex;
    justify-content: center;
    min-height: 68px;
    padding-block-start: 10px;
  }
  .av-header-search,
  .av-header__auth { display: none; }
  .av-header__bottom {
    position: relative;
    display: block;
    width: 100%;
    /* 검색창 하단 여백 18px: 위쪽 로고와 검색창 사이의 시각적 여백에 맞춘다. */
    min-height: 68px;
    margin-inline-start: 0;
    border-top: 0;
  }
  .av-header__bottom-left,
  .av-header__tools {
    position: absolute;
    bottom: calc(100% - 4px);
    z-index: 2;
    height: 68px;
    align-items: center;
  }
  /* 검색창의 둥근 모서리를 고려해 아이콘을 끝선보다 살짝 안쪽에 배치한다. */
  .av-header__bottom-left { left: -8px; }
  .av-header-search--mobile {
    display: block;
    width: 100%;
    max-width: none;
    margin: 6px 0 0;
  }
  .av-header-search--mobile input {
    height: 44px;
    padding-inline: 18px 44px;
    font-size: .875rem;
    text-overflow: ellipsis;
  }
  .av-header-search--mobile button {
    inset-inline-end: 1px;
    width: 44px;
    height: 44px;
  }
  .av-header__tools { right: -10px; gap: 2px; }
  .av-header__cart,
  .av-header__wishlist { display: none !important; }
  .av-account { height: 68px; }
  .av-logo__img { width: 136px; }
}

/* 전체 메뉴 — 모든 1·2차 메뉴를 한 화면에 펼친다 */
.av-mobilemenu {
  position: fixed;
  inset: var(--av-header-h) 0 auto;
  z-index: 99;
  max-height: calc(100dvh - var(--av-header-h));
  padding-block: 30px;
  background: rgba(18,18,18,.9);
  border-top: 1px solid rgba(255,255,255,.07);
  backdrop-filter: saturate(145%) blur(18px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-18px);
  transition: opacity .3s var(--av-ease), transform .4s var(--av-ease), visibility .4s;
  overflow-y: auto;
}
.av-mobilemenu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.av-megamenu__grid {
  display: flex;
  align-items: flex-start;
  gap: 92px;
  min-height: 142px;
  padding-inline-start: 68px;
}
.av-megamenu__group {
  position: relative;
  flex: 0 0 auto;
  min-width: 0;
  min-height: 142px;
}
.av-megamenu__title {
  position: relative;
  display: inline-flex;
  padding-block-end: 9px;
  color: var(--av-white);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -.02em;
  white-space: nowrap;
  transition: color .28s var(--av-ease);
}
.av-megamenu__title:hover { color: #d23723; }
.av-megamenu__title::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--av-accent);
  opacity: 0;
  transform: scaleX(.25);
  transform-origin: center;
  transition: opacity .24s var(--av-ease), transform .32s var(--av-ease);
}
.av-megamenu__title:focus-visible::after,
.av-megamenu__title.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}
.av-megamenu__sub {
  position: absolute;
  top: 48px;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 13px;
  margin-top: 0;
}
.av-megamenu__sub a {
  color: var(--av-fg-muted);
  font-size: .9rem;
  white-space: nowrap;
  transition: color .2s;
}
.av-megamenu__sub a:hover {
  color: var(--av-white);
}
.av-megamenu__member {
  display: none;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding-top: 24px;
}

@media (min-width: 1025px) {
  .av-megamenu__group:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 0;
    right: -46px;
    width: 1px;
    height: 142px;
    background: rgba(255,255,255,.08);
  }
}

@media (max-width: 1024px) {
  .av-megamenu__grid { flex-wrap: wrap; min-height: 0; row-gap: 36px; padding-inline-start: 0; }
  .av-megamenu__group { flex: 1 1 calc(33.333% - 36px); min-height: 0; }
  .av-megamenu__sub { position: static; margin-top: 20px; }
  .av-megamenu__member { display: flex; }
}
@media (max-width: 640px) {
  .av-mobilemenu { padding-block: 24px 32px; }
  .av-megamenu__grid { gap: 30px 22px; }
  .av-megamenu__group { flex: 1 1 calc(50% - 12px); }
  .av-megamenu__title { font-size: 1.05rem; }
  .av-megamenu__sub { gap: 10px; margin-top: 17px; }
  .av-megamenu__member { justify-content: stretch; }
  .av-megamenu__member .av-btn { flex: 1; }
  .av-account__panel {
    position: fixed;
    top: var(--av-header-h);
    right: var(--av-gutter);
    width: min(286px, calc(100vw - var(--av-gutter) * 2));
  }
}

/* 모바일 전체 메뉴: 상위 메뉴는 세로, 하위 메뉴는 가로 구분형으로 표시한다. */
@media (max-width: 900px) {
  .av-mobilemenu {
    padding-block: 10px 24px;
    overflow-x: hidden;
  }
  .av-megamenu__grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-inline-start: 0;
  }
  .av-megamenu__group {
    flex: 0 0 auto;
    width: 100%;
    min-height: 0;
    padding-block: 15px;
    border-bottom: 1px solid rgba(255,255,255,.1);
  }
  .av-megamenu__title {
    display: inline-flex;
    padding-block-end: 5px;
    font-size: 1.05rem;
  }
  .av-megamenu__sub {
    position: static;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 0;
    margin-top: 8px;
  }
  .av-megamenu__sub a {
    position: relative;
    padding-inline: 10px;
    font-size: .875rem;
    line-height: 1.35;
  }
  .av-megamenu__sub a:first-child { padding-inline-start: 0; }
  .av-megamenu__sub a:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 0;
    width: 1px;
    height: 12px;
    background: rgba(255,255,255,.2);
    transform: translateY(-50%);
  }
  .av-megamenu__member {
    justify-content: stretch;
    padding-top: 18px;
  }
  .av-megamenu__member .av-btn,
  .av-megamenu__member form { flex: 1; }
  .av-megamenu__member form .av-btn { width: 100%; }
}


/* Mega menu: equal columns, content-driven height, hidden scrollbars */
.av-mobilemenu {
  padding-block: 30px 34px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.av-mobilemenu::-webkit-scrollbar { display: none; }
.av-megamenu__sub {
  position: static;
  gap: 10px;
  margin-top: 14px;
}

@media (min-width: 1025px) {
  .av-megamenu__grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    align-items: stretch;
    gap: 0;
    width: min(1060px, 100%);
    min-height: 0;
    padding-inline-start: 68px;
  }
  .av-megamenu__group {
    min-width: 0;
    min-height: 0;
    padding-inline-end: 26px;
  }
  .av-megamenu__group:not(:last-child)::after {
    inset-block: 0;
    right: 18px;
    height: auto;
  }
}

@media (max-width: 1024px) {
  .av-megamenu__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    min-height: 0;
    gap: 36px;
    padding-inline-start: 0;
  }
  .av-megamenu__group {
    min-width: 0;
    min-height: 0;
    padding-inline-end: 0;
  }
  .av-megamenu__sub { margin-top: 20px; }
}

@media (max-width: 640px) {
  .av-megamenu__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px 22px;
  }
  .av-megamenu__sub { margin-top: 17px; }
}

/* Mobile mega menu: one primary menu per row, children inline below it. */
@media (max-width: 900px) {
  .av-mobilemenu {
    padding-block: 10px 24px;
    overflow-x: hidden;
  }
  .av-megamenu__grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    padding-inline-start: 0;
  }
  .av-megamenu__group {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    min-height: 0;
    padding: 12px 0;
    border-bottom: 0;
  }
  .av-megamenu__title {
    display: block;
    width: max-content;
    padding-block-end: 0;
    font-size: 1.2rem;
    line-height: 1.5;
    white-space: nowrap;
  }
  .av-megamenu__sub {
    position: static;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 20px;
    margin-top: 7px;
  }
  .av-megamenu__sub a {
    flex: 0 0 auto;
    padding-inline: 0;
    white-space: nowrap;
  }
  .av-megamenu__sub a:not(:last-child)::after {
    content: none;
    display: none;
  }
}


/* 전체 메뉴의 제목 링크는 유지하고 화살표로 하위 메뉴만 접고 펼친다. */
.av-megamenu__heading {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 4px;
}
.av-megamenu__toggle {
  display: none;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  border-radius: 4px;
}
html[data-theme="light"] .av-megamenu__toggle { color: #121212; }
.av-megamenu__toggle svg {
  width: 26px;
  height: 26px;
  transition: transform .28s ease;
}
.av-megamenu__toggle[aria-expanded="false"] svg { transform: rotate(180deg); }
.av-megamenu__toggle:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.av-megamenu__panel {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows .28s ease;
}
.av-megamenu__panel.is-collapsed { grid-template-rows: 0fr; }
.av-megamenu__panel-inner { min-height: 0; overflow: hidden; }
@media (max-width: 900px) {
  .av-megamenu__toggle { display: grid; }
}
@media (min-width: 901px) {
  .av-megamenu__panel.is-collapsed { grid-template-rows: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .av-megamenu__toggle svg,
  .av-megamenu__panel { transition: none; }
}

/* Header theme and state overrides */
/* 헤더 컬러 모드 스위치 */
.av-theme-toggle-slot {
  width: 48px;
  height: 50px;
  margin-inline-end: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
}
.av-theme-switch {
  --width-of-switch: 3.5em;
  --height-of-switch: 2em;
  --size-of-icon: 1.4em;
  --slider-offset: .3em;
  position: relative;
  display: block;
  width: var(--width-of-switch);
  height: var(--height-of-switch);
  flex: 0 0 auto;
  font-size: 12px;
}
.av-theme-switch .toggle-input {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.av-theme-switch__slider {
  position: absolute;
  inset: 0;
  border-radius: 30px;
  background-color: #f8f8f8;
  box-shadow: inset 0 0 0 1px rgba(18,18,18,.5);
  transition: background-color .4s ease, box-shadow .4s ease;
}
.av-theme-switch__slider::before {
  position: absolute;
  content: "";
  width: var(--size-of-icon);
  height: var(--size-of-icon);
  left: var(--slider-offset);
  top: 50%;
  border-radius: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, #E60012 0%, #fcf145 100%);
  transition: left .4s ease, background-color .4s ease, box-shadow .4s ease;
}
.av-theme-switch__slider::after {
  position: absolute;
  content: "";
  z-index: 1;
  width: 1.05em;
  height: 1.05em;
  top: .22em;
  right: .72em;
  border-radius: 50%;
  background-color: #161616;
  opacity: 0;
  transform: scale(.72);
  transition: opacity .28s ease .08s, transform .4s ease;
  pointer-events: none;
}

.av-theme-switch .toggle-input:checked + .av-theme-switch__slider {
  background-color: #161616;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.5);
}
.av-theme-switch .toggle-input:checked + .av-theme-switch__slider::after {
  opacity: 1;
  transform: scale(1);
}

.av-theme-switch .toggle-input:checked + .av-theme-switch__slider::before {
  left: calc(100% - (var(--size-of-icon) + var(--slider-offset)));
  background: linear-gradient(135deg, #fcf145 0%, #fcf145 58%, #c9bf29 100%);
  box-shadow: inset -3px -3px 4px -2px rgba(121, 112, 0, .5);
}
.av-theme-switch .toggle-input:focus-visible + .av-theme-switch__slider {
  outline: 2px solid #fcf145;
  outline-offset: 3px;
}
@media (hover: hover) {
  .av-theme-switch:hover .av-theme-switch__slider {
    box-shadow: inset 0 0 0 1px rgba(18,18,18,.65);
  }
  .av-theme-switch .toggle-input:checked + .av-theme-switch__slider:hover {
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.65);
  }
}
@media (max-width: 560px) {
  .av-theme-toggle-slot {
    width: 44px;
    flex-basis: 44px;
    margin-inline-end: 6px;
  }
  .av-theme-switch { font-size: 12px; }
}

html[data-theme="dark"] .av-header.is-stuck {
  background-color: rgba(var(--av-bg-rgb), .94);
  border-bottom-color: var(--av-line);
  backdrop-filter: saturate(160%) blur(14px);
}

/* 라이트 모드 헤더: 최상단에서는 기존 다크 스타일, 스크롤 후에만 밝은 글래스로 전환 */
html[data-theme="light"] .av-header.is-stuck:not(.is-menu-open) {
  background-color: rgba(255,255,255,.9);
  border-bottom-color: rgba(18,18,18,.09);
  -webkit-backdrop-filter: saturate(165%) blur(20px);
  backdrop-filter: saturate(165%) blur(20px);
}
html[data-theme="light"] .av-header.is-stuck:not(.is-menu-open) .av-header__bottom {
  border-top-color: rgba(18,18,18,.12);
}
html[data-theme="light"] .av-header.is-stuck:not(.is-menu-open) .av-gnb__link,
html[data-theme="light"] .av-header.is-stuck:not(.is-menu-open) .av-iconbtn,
html[data-theme="light"] .av-header.is-stuck:not(.is-menu-open) .av-header__auth > .av-btn--ghost {
  color: #121212;
}
html[data-theme="light"] .av-header.is-stuck:not(.is-menu-open) .av-iconbtn:hover,
html[data-theme="light"] .av-header.is-stuck:not(.is-menu-open) .av-header__auth > .av-btn--ghost:hover {
  color: #E60012;
}
html[data-theme="light"] .av-header.is-stuck:not(.is-menu-open) .av-header-search input {
  --av-autofill-bg: #fff;
  border-color: rgba(18,18,18,.5);
  background-color: rgba(255,255,255,.34);
  color: #121212;
}
html[data-theme="light"] .av-header.is-stuck:not(.is-menu-open) .av-header-search input::placeholder {
  color: rgba(18,18,18,.58);
}
html[data-theme="light"] .av-header.is-stuck:not(.is-menu-open) .av-header-search button {
  color: #121212;
}
html[data-theme="light"] .av-header.is-stuck:not(.is-menu-open) .av-header-search:focus-within button,
html[data-theme="light"] .av-header.is-stuck:not(.is-menu-open) .av-header-search:has(input:not(:placeholder-shown)) button {
  color: #E60012;
}
html[data-theme="light"] .av-header.is-stuck:not(.is-menu-open) .av-header-search:focus-within input,
html[data-theme="light"] .av-header.is-stuck:not(.is-menu-open) .av-header-search:has(input:not(:placeholder-shown)) input {
  border-color: #E60012;
}

/* 내부 페이지도 스크롤 전에는 투명하고, 스크롤 후에만 위의 화이트 글래스를 쓴다. */
html[data-theme="light"] body.av-inner-page .av-header:not(.is-stuck):not(.is-menu-open) {
  background-color: transparent;
  border-bottom-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
html[data-theme="light"] body.av-inner-page .av-header:not(.is-menu-open) .av-header__bottom {
  border-top-color: rgba(18,18,18,.12);
}
html[data-theme="light"] body.av-inner-page .av-header:not(.is-menu-open) :is(
  .av-gnb__link,
  .av-iconbtn,
  .av-header__auth > .av-btn--ghost
) {
  color: #121212;
}
html[data-theme="light"] body.av-inner-page .av-header:not(.is-menu-open) :is(
  .av-iconbtn:hover,
  .av-header__auth > .av-btn--ghost:hover
) {
  color: #E60012;
}
html[data-theme="light"] body.av-inner-page .av-header:not(.is-menu-open) .av-header-search input {
  --av-autofill-bg: #fff;
  border-color: rgba(18,18,18,.5);
  background-color: rgba(255,255,255,.34);
  color: #121212;
}
html[data-theme="light"] body.av-inner-page .av-header:not(.is-menu-open) .av-header-search input::placeholder {
  color: rgba(18,18,18,.58);
}
html[data-theme="light"] body.av-inner-page .av-header:not(.is-menu-open) .av-header-search button {
  color: #121212;
}
html[data-theme="light"] body.av-inner-page .av-header:not(.is-menu-open) .av-header-search:focus-within button,
html[data-theme="light"] body.av-inner-page .av-header:not(.is-menu-open) .av-header-search:has(input:not(:placeholder-shown)) button {
  color: #E60012;
}
html[data-theme="light"] body.av-inner-page .av-header:not(.is-menu-open) .av-header-search:focus-within input,
html[data-theme="light"] body.av-inner-page .av-header:not(.is-menu-open) .av-header-search:has(input:not(:placeholder-shown)) input {
  border-color: #E60012;
}

/* 헤더 로고는 같은 자리에 포개 투명도만 교차시킨다. */
.av-logo__img {
  transition: opacity .36s var(--av-ease);
}
.av-logo__img--light-top,
.av-logo__img--light-stuck {
  position: absolute;
  inset: 0;
  opacity: 0;
}
html[data-theme="light"] .av-header .av-logo__img--dark { opacity: 0; }
html[data-theme="light"] .av-header .av-logo__img--light-top { opacity: 1; }
html[data-theme="light"] .av-header:is(.is-stuck, .is-menu-open) .av-logo__img--light-top { opacity: 0; }
html[data-theme="light"] .av-header:is(.is-stuck, .is-menu-open) .av-logo__img--light-stuck { opacity: 1; }
html[data-theme="light"] body.av-inner-page .av-header .av-logo__img--light-top { opacity: 0; }
html[data-theme="light"] body.av-inner-page .av-header .av-logo__img--light-stuck { opacity: 1; }

/* 라이트 모드 전체 메뉴는 스크롤 헤더와 같은 밝은 글래스 표면을 쓴다. */
html[data-theme="light"] .av-header.is-menu-open,
html[data-theme="light"] .av-header.is-menu-open + .av-mobilemenu {
  background-color: rgba(255,255,255,.9);
  -webkit-backdrop-filter: saturate(165%) blur(20px);
  backdrop-filter: saturate(165%) blur(20px);
}
html[data-theme="light"] .av-header.is-menu-open {
  border-bottom-color: transparent;
}
html[data-theme="light"] .av-header.is-menu-open .av-header__bottom,
html[data-theme="light"] .av-header.is-menu-open + .av-mobilemenu {
  border-color: rgba(18,18,18,.12);
}
html[data-theme="light"] .av-header.is-menu-open .av-gnb__link,
html[data-theme="light"] .av-header.is-menu-open .av-iconbtn,
html[data-theme="light"] .av-header.is-menu-open .av-header__auth > .av-btn--ghost,
html[data-theme="light"] .av-header.is-menu-open + .av-mobilemenu .av-megamenu__title {
  color: #121212;
}
html[data-theme="light"] .av-header.is-menu-open .av-iconbtn:hover,
html[data-theme="light"] .av-header.is-menu-open .av-header__auth > .av-btn--ghost:hover {
  color: #E60012;
}
html[data-theme="light"] .av-header.is-menu-open + .av-mobilemenu .av-megamenu__sub a {
  color: rgba(18,18,18,.62);
}
html[data-theme="light"] .av-header.is-menu-open + .av-mobilemenu .av-megamenu__title:hover {
  color: #d23723;
}
html[data-theme="light"] .av-header.is-menu-open + .av-mobilemenu .av-megamenu__sub a:hover {
  color: #121212;
}
html[data-theme="light"] .av-header.is-menu-open + .av-mobilemenu .av-megamenu__group:not(:last-child)::after {
  background-color: rgba(18,18,18,.12);
}
html[data-theme="light"] .av-header.is-menu-open .av-header-search input {
  --av-autofill-bg: #fff;
  border-color: rgba(18,18,18,.5);
  background-color: rgba(255,255,255,.34);
  color: #121212;
}
html[data-theme="light"] .av-header.is-menu-open .av-header-search input::placeholder {
  color: rgba(18,18,18,.58);
}
html[data-theme="light"] .av-header.is-menu-open .av-header-search button { color: #121212; }

/* 헤더 로그인은 별도 박스 없이 가벼운 텍스트 버튼으로 표시한다. */
.av-header__auth > .av-btn--ghost {
  padding-inline: 10px;
  border-color: transparent;
  background: transparent;
  background-image: none !important;
  box-shadow: none;
}
.av-header__auth > .av-btn--ghost:hover {
  border-color: transparent;
  background: transparent;
  background-image: none !important;
  color: #E60012;
}


/* 스크롤·메뉴 상태의 글래스 헤더에도 같은 무채색 결을 얹는다. */
.av-header.is-stuck,
.av-header.is-menu-open,
.av-header.is-menu-open + .av-mobilemenu {
  background-image: var(--av-noise-image) !important;
  background-repeat: repeat !important;
  background-size: 180px 180px !important;
  background-blend-mode: soft-light;
}
html[data-theme="light"] .av-header.is-stuck:not(.is-menu-open),
html[data-theme="light"] .av-header.is-menu-open,
html[data-theme="light"] .av-header.is-menu-open + .av-mobilemenu {
  background-image: none !important;
}


/* 공통 카드 그림자보다 뒤에서 적용해 드롭다운 외곽선이 다시 생기지 않게 한다. */
.av-gnb__dropdown {
  border: 0;
  background-color: #222222;
  box-shadow: 0 18px 50px rgba(0,0,0,.34);
}

/* 라이트 모드 서브 메뉴: 메인 최상단을 포함해 항상 동일한 화이트 표면을 쓴다. */
html[data-theme="light"] .av-header:not(.is-menu-open) .av-gnb__dropdown {
  background-color: #fff;
  background-image: none !important;
  box-shadow: 0 0 22px rgba(18,18,18,.14);
}
html[data-theme="light"] .av-header:not(.is-menu-open) .av-gnb__dropdown a {
  color: #121212;
}
html[data-theme="light"] .av-header:not(.is-menu-open) .av-gnb__dropdown a:hover,
html[data-theme="light"] .av-header:not(.is-menu-open) .av-gnb__dropdown a:focus-visible {
  color: #E60012;
}


.av-header-search input { --av-autofill-bg: #121212; }

/* 헤더 검색창은 컬러 모드와 관계없이 동일한 밝은 입력 표면을 사용한다. */
.av-header-search input,
html[data-theme="light"] .av-header.is-stuck:not(.is-menu-open) .av-header-search input,
html[data-theme="light"] body.av-inner-page .av-header:not(.is-menu-open) .av-header-search input,
html[data-theme="light"] .av-header.is-menu-open .av-header-search input {
  --av-autofill-bg: #fff;
  border: 1px solid #121212;
  outline: 0;
  background-color: #fff;
  background-image: none !important;
  box-shadow: none;
  color: #121212;
}
.av-header-search input::placeholder,
html[data-theme="light"] .av-header.is-stuck:not(.is-menu-open) .av-header-search input::placeholder,
html[data-theme="light"] body.av-inner-page .av-header:not(.is-menu-open) .av-header-search input::placeholder,
html[data-theme="light"] .av-header.is-menu-open .av-header-search input::placeholder {
  color: rgba(18,18,18,.5);
  opacity: 1;
}
.av-header-search button,
html[data-theme="light"] .av-header.is-stuck:not(.is-menu-open) .av-header-search button,
html[data-theme="light"] body.av-inner-page .av-header:not(.is-menu-open) .av-header-search button,
html[data-theme="light"] .av-header.is-menu-open .av-header-search button {
  color: #121212;
}
.av-header-search:focus-within input,
.av-header-search:has(input:not(:placeholder-shown)) input {
  border: 1px solid #E60012;
  background-color: #FAFAFA !important;
  background-image: none !important;
  box-shadow: none;
  color: #121212;
}
.av-header-search:focus-within button,
.av-header-search:has(input:not(:placeholder-shown)) button {
  color: #E60012;
}

/* 검색어 지우기 버튼은 브라우저 기본 굵은 X 대신 얇은 고정 아이콘을 쓴다. */
.av-header-search input[type="search"]::-webkit-search-cancel-button {
  width: 16px;
  height: 16px;
  margin-inline-end: 40px;
  -webkit-appearance: none;
  appearance: none;
  background: center / 14px 14px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 4l8 8M12 4l-8 8' fill='none' stroke='%23121212' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
  opacity: 1;
  cursor: pointer;
}

/* 자동완성 선택 후에도 다크 모드의 흰 글자가 검색창으로 상속되지 않게 고정한다. */
.av-header-search input:-webkit-autofill,
.av-header-search input:-webkit-autofill:hover,
.av-header-search input:-webkit-autofill:focus,
.av-header-search input:-webkit-autofill:active {
  -webkit-text-fill-color: #121212 !important;
  caret-color: #121212 !important;
  -webkit-box-shadow: 0 0 0 1000px #FAFAFA inset !important;
  box-shadow: 0 0 0 1000px #FAFAFA inset !important;
}
.av-header-search input:autofill {
  color: #121212 !important;
  caret-color: #121212 !important;
  background-color: #FAFAFA !important;
  box-shadow: 0 0 0 1000px #FAFAFA inset !important;
}

/* Header surfaces participating in the shared noise treatment. */
.av-mobilemenu,
.av-gnb__dropdown,
.av-account__panel {
  background-image: var(--av-noise-image) !important;
  background-repeat: repeat !important;
  background-size: 180px 180px !important;
  background-blend-mode: soft-light;
}
.av-account__panel {
  box-shadow: var(--av-surface-inset);
}

html[data-theme="light"] body.av-inner-page .av-account__nav a:hover,
html[data-theme="light"] body.av-inner-page .av-account__nav a.is-active,
html[data-theme="light"] body.av-inner-page .av-account__logout button:hover {
  color: #121212;
}

/* Mobile header and mega-menu theme contrast. */
@media (max-width: 900px) {
  /* 검색 입력창 자체의 테두리는 유지하고, 그 아래 가로 구분선만 제거. */
  .av-header,
  .av-header.is-stuck,
  .av-header.is-menu-open {
    border-bottom-width: 0;
  }
  .av-mobilemenu { border-top-width: 0; }
  .av-megamenu__group + .av-megamenu__group {
    border-top: 1px solid rgba(255,255,255,.1);
  }
  html[data-theme="light"] .av-mobilemenu .av-megamenu__group + .av-megamenu__group {
    border-top-color: rgba(18,18,18,.1);
  }
  .av-header__tools .av-theme-toggle-slot {
    width: 44px;
    flex-basis: 44px;
    margin-inline-end: 2px;
    transform: translateY(1px);
  }
  .av-header__tools .av-theme-switch { font-size: 11px; }
  html[data-theme="light"] .av-header.is-menu-open + .av-mobilemenu .av-megamenu__group {
    border-bottom-color: rgba(18,18,18,.12);
  }
  html[data-theme="light"] .av-header.is-menu-open + .av-mobilemenu .av-megamenu__sub a:not(:last-child)::after {
    background: rgba(18,18,18,.22);
  }
  html[data-theme="light"] .av-header.is-menu-open + .av-mobilemenu .av-megamenu__member .av-btn--ghost {
    border-color: rgba(18,18,18,.35);
    background: transparent;
    color: #121212;
  }
  html[data-theme="light"] .av-header.is-menu-open + .av-mobilemenu .av-megamenu__member .av-btn--ghost:hover {
    border-color: #121212;
    background: rgba(18,18,18,.06);
    color: #121212;
  }
  html[data-theme="dark"] .av-mobilemenu .av-megamenu__member .av-btn--ghost {
    border-color: rgba(255,255,255,.35);
    background: transparent;
    color: #fff;
  }
  html[data-theme="dark"] .av-mobilemenu .av-megamenu__member .av-btn--ghost:hover {
    border-color: #fff;
    background: rgba(255,255,255,.08);
    color: #fff;
  }
}
