@charset "UTF-8";
/* 공통 상단바 (common/header.jsp). 각 페이지의 크롤링 CSS와 섞이지 않도록 #agn-header 아래로만 적용 */

#agn-header {
  --agn-height: 44px;
  --agn-bg: rgba(250, 250, 252, 0.8);
  --agn-bg-open: #fafafc;
  --agn-text: rgba(0, 0, 0, 0.8);
  --agn-text-strong: #000;
  --agn-muted: #6e6e73;
  --agn-content-width: 1024px;
  --agn-ease: cubic-bezier(0.4, 0, 0.6, 1);
  position: relative;
  /* 페이지의 리본(할부 배너, z-index 9998)·로컬 내비(9997)보다 위: 메가메뉴가 내려오면 배너를 덮는다 (Apple 전역 내비와 같음) */
  z-index: 9999;
  font-family: "SF Pro KR", "SF Pro Text", "SF Pro Icons", "Apple SD Gothic Neo", "Malgun Gothic", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
}

#agn-header *,
#agn-header *::before,
#agn-header *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

#agn-header ul {
  list-style: none;
}

#agn-header a,
#agn-header a:hover,
#agn-header a:focus {
  text-decoration: none;
}

#agn {
  position: relative;
  z-index: 2;
  height: var(--agn-height);
  background: var(--agn-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  transition: background-color 0.32s var(--agn-ease);
}

#agn-header.is-open #agn {
  background: var(--agn-bg-open);
}

#agn .agn-content {
  max-width: var(--agn-content-width);
  height: var(--agn-height);
  margin: 0 auto;
  padding: 0 22px;
}

#agn .agn-list {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

#agn .agn-item {
  position: relative;
  height: 100%;
}

#agn .agn-link {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--agn-text);
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.32s var(--agn-ease);
}

#agn .agn-link:hover,
#agn .agn-item.is-open > .agn-link,
#agn .agn-link.is-current {
  color: var(--agn-text-strong);
}

#agn .agn-link svg {
  display: block;
  fill: currentColor;
}

#agn .agn-link:focus-visible {
  outline: 2px solid #0071e3;
  outline-offset: -2px;
  border-radius: 4px;
}

/* 로그인한 사용자 프로필 (장바구니 오른쪽) */
#agn .agn-profile {
  gap: 6px;
  max-width: 140px;
}

#agn .agn-profile-photo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  background: #d2d2d7;
}

#agn .agn-profile-initial {
  font-size: 11px;
  font-weight: 600;
  color: #fff;
}

#agn .agn-profile-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 메뉴가 열렸을 때 아래 페이지를 흐리게 덮는 막 */
#agn-header .agn-curtain {
  position: fixed;
  top: var(--agn-height);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  background: rgba(232, 232, 237, 0.4);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.32s var(--agn-ease), visibility 0.32s step-end;
}

#agn-header.is-open .agn-curtain {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.32s var(--agn-ease), visibility 0s;
}

/* 모바일 메뉴 버튼 */
#agn .agn-item-menutrigger {
  display: none;
}

#agn .agn-menutrigger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0 14px;
  border: 0;
  background: none;
  color: var(--agn-text);
  cursor: pointer;
}

#agn .agn-menutrigger-bar {
  display: block;
  width: 16px;
  height: 1.2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.24s var(--agn-ease);
}

#agn-header.is-mobile-open .agn-menutrigger-bar:first-child {
  transform: translateY(3.6px) rotate(45deg);
}

#agn-header.is-mobile-open .agn-menutrigger-bar:last-child {
  transform: translateY(-3.6px) rotate(-45deg);
}

#agn .agn-mobile {
  display: none;
}

@media (max-width: 833px) {
  #agn .agn-content {
    padding: 0 16px;
  }

  #agn .agn-list {
    justify-content: flex-end;
  }

  #agn .agn-item-apple {
    margin-right: auto;
  }

  #agn .agn-item-menu {
    display: none;
  }

  #agn .agn-item-search .agn-link,
  #agn .agn-item-bag .agn-link {
    padding: 0 12px;
  }

  #agn .agn-item-menutrigger {
    display: block;
  }

  /* 작은 화면에서는 프로필 사진만 */
  #agn .agn-profile-name {
    display: none;
  }

  #agn .agn-mobile {
    position: absolute;
    top: var(--agn-height);
    left: 0;
    right: 0;
    height: calc(100vh - var(--agn-height));
    overflow-y: auto;
    background: var(--agn-bg-open);
    padding: 16px 48px 48px;
  }

  #agn-header.is-mobile-open .agn-mobile {
    display: block;
  }

  #agn-header.is-mobile-open #agn {
    background: var(--agn-bg-open);
  }

  #agn .agn-mobile a {
    display: block;
    padding: 6px 0;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.14;
    letter-spacing: 0.007em;
    color: #333336;
  }
}

/* 스크롤해야 나타나는 로컬 내비(LocalnavTrigger 페이지: Mac mini, iMac, MacBook Neo 등):
   Apple 은 main 을 로컬 내비 높이만큼 끌어올려 숨은 로컬 내비 자리를 비우지 않는다 → 리본 배너가 상단바 바로 아래 붙는다.
   (Apple 식은 --r-globalnav-height 를 쓰는데 우리 상단바에는 그 값이 없어 식 전체가 무효가 되어 52px 틈이 생겼다) */
body[data-component-list~="LocalnavTrigger"] > main {
  margin-top: calc(var(--r-localnav-height, 52px) * -1);
}

/* 일부 Apple 페이지 CSS(iPhone, iPhone 17, Apple Music 개요)는 "body{opacity:0}" 으로 화면 전체를 숨겨 두고
   Apple 스크립트가 준비되면 보이게 한다. 우리 페이지에는 그 스크립트가 없어 화면이 통째로 비어 보였다. */
html body { opacity: 1; }
