/**
 * 브랜드별 띠배너 — PC 몰 (브랜드 스트립 아래 · 카탈로그 위)
 * 고정 높이 + cover — 여백·지저분한 배경 없이 슬롯을 꽉 채움 (권장 비율 4:1 전후)
 */

#mallWrap {
  --mall-brand-band-h: 300px;
  --mall-brand-band-max-w: 1440px;
}

#mallWrap .mall-brand-band-stage {
  scroll-margin-top: var(--mall-sticky-stack, 280px);
  width: 100%;
  padding: clamp(10px, 1.6vw, 18px) clamp(12px, 1.8vw, 20px);
  box-sizing: border-box;
}

#mallWrap .mall-brand-band-stage[hidden] {
  display: none !important;
}

#mallWrap .mall-brand-band {
  display: block;
  width: min(100%, calc(100vw - 32px));
  max-width: var(--mall-brand-band-max-w);
  height: var(--mall-brand-band-h);
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  background: var(--mall-surface, #fff);
  border: 1px solid rgba(15, 22, 18, 0.08);
  box-shadow: 0 6px 20px rgba(15, 22, 18, 0.06);
}

#mallWrap .mall-brand-band__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  user-select: none;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.24s ease;
}

#mallWrap .mall-brand-band--image:not([hidden]) .mall-brand-band__img:not([src]),
#mallWrap .mall-brand-band--image:not([hidden]) .mall-brand-band__img[src=""] {
  opacity: 0;
}

body.mall-flip-detail-open #mallWrap .mall-brand-band-stage,
#mallWrap.hidden .mall-brand-band-stage {
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 1200px) {
  #mallWrap {
    --mall-brand-band-h: 240px;
    --mall-brand-band-max-w: 100%;
  }
}

#mallWrap .mall-brand-band--image[hidden],
#mallWrap .mall-brand-band--all[hidden] {
  display: none !important;
}

#mallWrap .mall-brand-band-stage[data-mode="all"] .mall-brand-band--all {
  display: flex;
}

#mallWrap .mall-brand-band-stage[data-mode="image"] .mall-brand-band--image {
  display: block;
}

/* ── 히어로 · 편집샵 크롬 (PC·모바일 공통) ── */

.mall-hero-editorial__mast {
  position: absolute;
  top: clamp(14px, 2.6vh, 24px);
  left: 50%;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: clamp(0.55rem, 1.4vw, 0.85rem);
  transform: translateX(-50%);
  pointer-events: none;
  user-select: none;
  opacity: 1;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.mall-hero-editorial__mast--typing-active,
.mall-hero-editorial__mast--typing-done {
  opacity: 1;
  transform: translateX(-50%);
}

.mall-hero-editorial__rule {
  display: block;
  flex-shrink: 0;
  width: clamp(3rem, 11vw, 5rem);
  height: 1px;
  background: rgba(15, 22, 18, 0.14);
  opacity: 0;
  transform: scaleX(0.35);
  transform-origin: center;
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.mall-hero-editorial__mast--typing-done .mall-hero-editorial__rule {
  opacity: 1;
  transform: scaleX(1);
}

.mall-hero-editorial__line {
  margin: 0;
  font-size: clamp(0.72rem, 1.15vw, 0.8125rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.14em;
  text-indent: 0.14em;
  text-transform: uppercase;
  color: rgba(53, 58, 66, 0.72);
  white-space: nowrap;
}

.mall-hero-editorial__mast--typing-done .mall-hero-editorial__line {
  color: var(--mall-charcoal-deep, #353a42);
}

.mall-hero-editorial__text {
  display: inline;
}

.mall-hero-editorial__caret {
  display: inline-block;
  width: 1.5px;
  height: 0.82em;
  margin-left: 0.06em;
  vertical-align: -0.05em;
  background: currentColor;
  opacity: 0;
  transform: scaleY(0.6);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.mall-hero-editorial__mast--typing-active .mall-hero-editorial__caret {
  opacity: 0.72;
  transform: scaleY(1);
  animation: mall-typing-caret-burst 0.5s step-end infinite;
}

.mall-hero-editorial__mast--typing-done .mall-hero-editorial__caret {
  opacity: 0;
  transform: scaleY(0.4);
  animation: none;
}

/* ── 전체 브랜드 · 쉬어가는 타이포 슬롯 (PC) ── */

#mallWrap .mall-brand-band.brand-band-all {
  --brand-band-all-bg: var(--mall-surface, #fff);
  align-items: center;
  justify-content: center;
  width: min(100%, calc(100vw - 32px));
  max-width: var(--mall-brand-band-max-w, 1440px);
  height: var(--mall-brand-band-h, 300px);
  margin: 0 auto;
  overflow: hidden;
  background: var(--brand-band-all-bg);
  border: none;
  border-top: 1px solid rgba(15, 22, 18, 0.06);
  border-bottom: 1px solid rgba(15, 22, 18, 0.06);
  box-shadow: none;
}

.brand-band-all__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.75rem, 2vh, 1.15rem);
  width: 100%;
  height: 100%;
  padding: clamp(20px, 3.5vh, 36px) 1.5rem;
  box-sizing: border-box;
  text-align: center;
  user-select: none;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.brand-band-all--typing-active .brand-band-all__copy,
.brand-band-all--typing-done .brand-band-all__copy {
  transform: none;
}

.brand-band-all__copy--typing-done {
  opacity: 1;
}

.brand-band-all__rule {
  display: block;
  width: clamp(4rem, 22vw, 8.5rem);
  height: 1px;
  background: rgba(15, 22, 18, 0.14);
  opacity: 0;
  transform: scaleX(0.3);
  transform-origin: center;
  transition:
    opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

.brand-band-all__copy--typing-done .brand-band-all__rule {
  opacity: 1;
  transform: scaleX(1);
}

.brand-band-all__title {
  margin: 0;
  font-size: clamp(1.85rem, calc(var(--mall-brand-band-h, 300px) * 0.13), 2.65rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  text-transform: uppercase;
  color: var(--mall-charcoal-deep, #353a42);
}

.brand-band-all--typing-done .brand-band-all__title {
  letter-spacing: 0.32em;
  text-indent: 0.32em;
}

.brand-band-all__title-text {
  display: inline;
}

.brand-band-all__caret {
  display: inline-block;
  width: 2px;
  height: 0.82em;
  margin-left: 0.06em;
  vertical-align: -0.06em;
  background: currentColor;
  opacity: 0;
  transform: scaleY(0.55);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.brand-band-all__caret--sub {
  opacity: 0;
}

.brand-band-all--typing-active:not(.brand-band-all--typing-phase-sub) .brand-band-all__caret--title {
  opacity: 0.68;
  transform: scaleY(1);
  animation: mall-typing-caret-burst 0.52s step-end infinite;
}

.brand-band-all--typing-phase-sub .brand-band-all__caret--title {
  opacity: 0;
  transform: scaleY(0.45);
  animation: none;
}

.brand-band-all--typing-phase-sub .brand-band-all__caret--sub {
  opacity: 0.55;
  transform: scaleY(1);
  animation: mall-typing-caret-burst 0.56s step-end infinite;
}

.brand-band-all--typing-done .brand-band-all__caret {
  opacity: 0;
  transform: scaleY(0.35);
  animation: none;
}

.brand-band-all__sub {
  margin: 0;
  min-height: 1.25em;
  max-width: min(36rem, 92vw);
  font-size: clamp(0.72rem, 1.2vw, 0.82rem);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(53, 58, 66, 0.55);
  opacity: 0;
  transform: none;
  transition: opacity 0.28s ease;
}

.brand-band-all__sub--visible {
  opacity: 1;
}

.brand-band-all--typing-done .brand-band-all__sub {
  color: rgba(53, 58, 66, 0.72);
}

@keyframes mall-typing-caret-burst {
  0%,
  100% {
    opacity: 0.78;
  }
  50% {
    opacity: 0.12;
  }
}

@keyframes mall-typing-caret-pulse {
  0%,
  100% {
    opacity: 0.72;
    transform: scaleY(1);
  }
  48% {
    opacity: 0.18;
    transform: scaleY(0.88);
  }
  52% {
    opacity: 0.42;
  }
}

@keyframes brand-band-all-caret-blink {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 0.08;
  }
}

@keyframes brand-band-all-breathe {
  0%,
  100% {
    opacity: 0.9;
  }
  50% {
    opacity: 1;
  }
}

/* ── 글자별 등장 — opacity + scale(확대→축소), blur 없음 ── */

.mall-typing-char {
  display: inline-block;
  vertical-align: baseline;
  opacity: 0;
  transform: scale3d(1.12, 1.12, 1);
  transform-origin: 50% 92%;
  backface-visibility: hidden;
}

.mall-typing-char--show {
  animation: mall-typing-char-pop 0.24s cubic-bezier(0.34, 1.15, 0.64, 1) forwards;
}

.mall-typing-host--burst .mall-typing-char--show {
  animation-duration: 0.2s;
}

.brand-band-all--typing-active:not(.brand-band-all--typing-phase-sub) .brand-band-all__title {
  animation: mall-typing-host-prime 0.44s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.brand-band-all--typing-phase-sub .brand-band-all__sub {
  animation: mall-typing-host-prime 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.mall-hero-editorial__mast--typing-active .mall-hero-editorial__line {
  animation: mall-typing-host-prime 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes mall-typing-char-pop {
  0% {
    opacity: 0;
    transform: scale3d(1.12, 1.12, 1);
  }
  42% {
    opacity: 1;
    transform: scale3d(1.06, 1.06, 1);
  }
  100% {
    opacity: 1;
    transform: scale3d(1, 1, 1);
  }
}

@keyframes mall-typing-host-prime {
  0% {
    transform: scale3d(1.038, 1.038, 1);
  }
  50% {
    transform: scale3d(0.988, 0.988, 1);
  }
  100% {
    transform: scale3d(1, 1, 1);
  }
}

.brand-band-all--typing-done .mall-typing-char,
.mall-hero-editorial__mast--typing-done .mall-typing-char {
  opacity: 1;
  transform: none;
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .mall-hero-editorial__mast .mall-hero-editorial__rule {
    opacity: 1;
    transform: none;
  }

  .mall-hero-editorial__mast {
    opacity: 1;
    transform: translateX(-50%);
    transition: none;
  }

  .mall-typing-char,
  .mall-typing-char--show {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .brand-band-all--typing-active .brand-band-all__title,
  .brand-band-all--typing-phase-sub .brand-band-all__sub,
  .mall-hero-editorial__mast--typing-active .mall-hero-editorial__line {
    animation: none;
    transform: none;
  }

  .brand-band-all__sub {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .brand-band-all__copy--typing-done {
    opacity: 1;
  }

  .brand-band-all__rule {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .mall-hero-editorial__caret,
  .brand-band-all__caret {
    display: none;
  }

  .brand-band-all--typing-done .brand-band-all__title {
    letter-spacing: 0.32em;
    text-indent: 0.32em;
  }
}

@media (max-width: 900px) {
  #mallWrap .mall-brand-band-stage {
    display: none !important;
  }
}
