/**
 * EIBE 몰·로그인 통일 호버 (index.html)
 * — 텍스트/버튼 scale 금지 · soft lift · 상단 라이트 캐치
 */

#mallWrap {
  --mall-hover-dur: 0.32s;
  --mall-hover-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --mall-hover-lift: -3px;
  --mall-hover-lift-sm: -1px;
  --mall-hover-shadow:
    0 2px 8px rgba(15, 22, 18, 0.05),
    0 0 0 1px rgba(64, 70, 80, 0.07);
  --mall-hover-shadow-soft: 0 2px 8px rgba(15, 22, 18, 0.05);
  --mall-hover-line: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.85) 42%,
    rgba(20, 24, 22, 0.08) 50%,
    rgba(255, 255, 255, 0.85) 58%,
    transparent 100%
  );
}

/* ── 눌림: scale 대신 1px 하강 (글씨 안 깨짐) ── */
.auth-gate .btn:active:not(:disabled),
.auth-gate .auth-submit:active {
  transform: translateY(1px);
}

#mallWrap :is(
  .btn,
  button,
  .chip,
  .filter-reset,
  .brand-mall-card,
  .brand-mall-nav,
  .product-card__btn
):active:not(:disabled) {
  transform: translateY(1px);
}

#mallWrap .btn-mall-expand:active {
  transform: translateY(1px);
}

/* main.css 레거시 transform 호버 무력화 */
#mallWrap .product-card:hover {
  transform: none;
}

#mallWrap .chip:active {
  transform: translateY(1px);
}

/* ── 상품 카드: 테두리 링 + 이미지 글래스 스윕 1회 (이동·scale·중앙 음영 없음) ── */
#mallWrap .product-card.product-card--commerce {
  position: relative;
}

#mallWrap
  .product-card.product-card--commerce:not(.product-card--soldout):not(.product-card--skeleton)
  .product-card__visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  /* 넓고 옅은 밴드 — 날카로운 하이라이트 대신 유리 빛 번짐 */
  background: linear-gradient(
    102deg,
    transparent 0%,
    transparent 28%,
    rgba(255, 255, 255, 0.06) 38%,
    rgba(255, 255, 255, 0.28) 50%,
    rgba(255, 255, 255, 0.06) 62%,
    transparent 72%,
    transparent 100%
  );
  transform: translateX(-115%) skewX(-6deg);
  opacity: 0;
  will-change: transform, opacity;
}

#mallWrap .product-card.product-card--commerce {
  transition:
    border-color 0.42s cubic-bezier(0.45, 0.05, 0.25, 1),
    box-shadow 0.42s cubic-bezier(0.45, 0.05, 0.25, 1);
}

#mallWrap .product-card.product-card--commerce:hover {
  translate: none;
  transform: none;
  border-color: var(--mall-card-border-hover);
  box-shadow: var(--mall-hover-shadow);
}

/* 호버 시 카드·텍스트 이동/스윕 없음 — 서브픽셀 깨짐 방지 */
#mallWrap
  .product-card.product-card--commerce:not(.product-card--soldout):not(.product-card--skeleton):hover
  .product-card__visual::before {
  animation: none;
  opacity: 0;
}

@keyframes mall-card-glass-sweep {
  0% {
    transform: translateX(-115%) skewX(-6deg);
    opacity: 0;
  }
  18% {
    opacity: 0.72;
  }
  82% {
    opacity: 0.72;
  }
  100% {
    transform: translateX(115%) skewX(-6deg);
    opacity: 0;
  }
}

#mallWrap .product-card.product-card--commerce .product-card__visual,
#mallWrap .product-card.product-card--commerce:hover .product-card__visual {
  box-shadow: none;
  filter: none;
}

#mallWrap .product-card.product-card--commerce .product-card__visual,
#mallWrap .product-card.product-card--commerce:hover .product-image-frame,
#mallWrap .product-card.product-card--commerce:hover .product-image-hit .product-image,
#mallWrap .product-card:hover .product-image-hit .product-image {
  transform: none;
}

#mallWrap .product-card.product-card--commerce:hover .product-image-frame {
  filter: none;
}

#mallWrap .product-card__body,
#mallWrap .product-card__actions {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── 칩·필터: 브랜드 카드와 동일 — lift 없이 테두리·얕은 그림자만 ── */
#mallWrap .chip-wrap--premium .chip {
  transition:
    background var(--mall-hover-dur) var(--mall-hover-ease),
    color var(--mall-hover-dur) var(--mall-hover-ease),
    border-color var(--mall-hover-dur) var(--mall-hover-ease),
    box-shadow var(--mall-hover-dur) var(--mall-hover-ease);
}

#mallWrap .chip-wrap--premium .chip:hover:not(.active) {
  background: rgba(255, 255, 255, 0.92);
  color: var(--mall-ink);
  box-shadow: var(--mall-hover-shadow-soft);
}

#mallWrap .filter-section .chip-wrap--premium .chip:hover:not(.active) {
  border-color: rgba(15, 27, 51, 0.12);
}

#mallWrap .chip-wrap--premium .chip.active {
  box-shadow: 0 1px 4px rgba(15, 22, 18, 0.08);
}

/* ── 브랜드 카드: 가벼운 틴트·테두리만 (lift·볼록 inset 없음) ── */
#mallWrap #brandMallStrip .brand-mall-card:hover {
  border-color: rgba(255, 255, 255, 0.48);
  box-shadow: 0 2px 8px rgba(15, 22, 18, 0.05);
}

#mallWrap #brandMallStrip .brand-mall-card:hover::before {
  background: var(--mall-brand-glass-tint-hover);
}

#mallWrap #brandMallStrip .brand-mall-nav:hover {
  border-color: rgba(255, 255, 255, 0.48);
  color: var(--mall-ink);
  box-shadow: 0 2px 8px rgba(15, 22, 18, 0.05);
}

#mallWrap #brandMallStrip .brand-mall-nav:hover::before {
  background: var(--mall-brand-glass-tint-hover);
}

#mallWrap #brandMallStrip .brand-mall-card.active::before {
  background: var(--mall-brand-glass-tint-active);
}

/* ── 톱바·카드 액션 버튼: 그림자만 ── */
#mallWrap .product-card__actions .product-card__btn:hover {
  box-shadow: 0 4px 14px rgba(15, 22, 18, 0.08);
}

#mallWrap .btn-mall-icon-ghost:hover:not(.btn-mall-expand) {
  box-shadow: var(--mall-hover-shadow-soft);
}

/* 담기 확인 pop — 짧은 scale 유지(텍스트 변형 최소) */
#mallWrap .product-card__actions .product-card__btn--add.is-added {
  animation: mall-add-confirm 0.28s var(--mall-hover-ease);
}

@keyframes mall-add-confirm {
  0% {
    opacity: 0.88;
    box-shadow: 0 0 0 0 rgba(64, 70, 80, 0.12);
  }
  100% {
    opacity: 1;
    box-shadow: 0 0 0 4px rgba(64, 70, 80, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  #mallWrap
    .product-card.product-card--commerce:not(.product-card--soldout):not(.product-card--skeleton)
    .product-card__visual::before,
  #mallWrap
    .product-card.product-card--commerce:not(.product-card--soldout):not(.product-card--skeleton):hover
    .product-card__visual::before {
    opacity: 0;
    animation: none;
  }
  #mallWrap .product-card.product-card--commerce:hover {
    translate: none;
    transform: none;
  }
  #mallWrap .chip-wrap--premium .chip:hover,
  #mallWrap .filter-reset:hover,
  #mallWrap #brandMallStrip .brand-mall-card:hover {
    translate: none;
  }
  #mallWrap .product-card__actions .product-card__btn--add.is-added {
    animation: none;
  }
}
