/* 상단 프로모션 바 — Figma 11772:778 (site_key별 확장 가능) */
:root {
  --promo-bar-height: 0px;
}

body.has-promotion-bar {
  --promo-bar-height: max(2.5rem, var(--vw-40));
}

.promotion-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  width: 100%;
  background-color: var(--promotion-bar-bg, #00b894);
  color: var(--promotion-bar-fg, #fff);
  transition: transform var(--chrome-dur, 0.52s) var(--chrome-ease, cubic-bezier(0.22, 1, 0.36, 1));
}

.promotion-bar__inner {
  display: grid;
  grid-template-columns: max(2rem, var(--vw-24)) 1fr auto;
  align-items: center;
  gap: max(0.5rem, var(--vw-8));
  min-height: max(2.5rem, var(--vw-40));
}

.promotion-bar__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max(1.5rem, var(--vw-24));
  height: max(1.5rem, var(--vw-24));
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.promotion-bar__close:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.promotion-bar__message {
  margin: 0;
  text-align: center;
  font-size: max(0.8125rem, var(--font-14));
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.promotion-bar__cta {
  justify-self: end;
  color: inherit;
  font-size: max(0.8125rem, var(--font-14));
  font-weight: 400;
  line-height: 1.4;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.promotion-bar__cta--placeholder {
  display: block;
  width: max(3.75rem, var(--vw-60));
  visibility: hidden;
  pointer-events: none;
}

.promotion-bar__cta:hover {
  opacity: 0.9;
}

/* fixed GNB 오프셋 — 스토어·기타 사이트 공통 클래스 */
body.has-promotion-bar .gnb-wrap {
  top: var(--promo-bar-height);
}

@media (max-width: 767px) {
  .promotion-bar__inner {
    grid-template-columns: max(1.5rem, var(--vw-20)) 1fr;
    grid-template-areas:
      "close message"
      "cta cta";
    padding-top: 6px;
    padding-bottom: 6px;
    min-height: auto;
  }

  .promotion-bar__close {
    grid-area: close;
  }

  .promotion-bar__message {
    grid-area: message;
    text-align: left;
    font-size: max(0.75rem, var(--font-14));
  }

  .promotion-bar__cta {
    grid-area: cta;
    justify-self: end;
    padding-top: 2px;
  }

  .promotion-bar__cta--placeholder {
    display: none;
  }
}
