/* —— 인증 —— */
.m-auth {
  min-height: 100dvh;
  padding: max(28px, var(--m-safe-top)) 20px calc(28px + var(--m-safe-bottom));
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.m-auth__card {
  width: min(100%, 400px);
  padding: 28px 22px 26px;
  border-radius: calc(var(--m-card-radius) + 6px);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--mall-shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.72);
}

.m-auth__logo {
  max-width: min(200px, 72vw);
  max-height: 36px;
  margin: 0 auto 18px;
  object-position: center;
}

.m-auth__title {
  margin: 0 0 6px;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--mall-ink);
}

.m-auth__lead {
  margin: 0 0 22px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--mall-muted);
  line-height: 1.5;
}

.m-profile-welcome-eyebrow {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mall-stone);
  text-align: center;
}

.m-profile-welcome-lead {
  margin: 0 0 14px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: color-mix(in srgb, var(--mall-ink) 72%, var(--mall-muted));
  text-align: center;
  word-break: keep-all;
}

.m-profile-welcome-lead--order {
  text-align: left;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--mall-muted);
}

.m-profile-skip {
  margin-top: 10px;
}

.m-auth__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 20px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(42, 47, 53, 0.06);
  border: 1px solid var(--mall-card-border);
}

.m-auth__tabs button {
  min-height: 42px;
  border-radius: 11px;
  border: none;
  background: transparent;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--mall-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.m-auth__tabs button.is-active {
  background: var(--mall-surface-elevated);
  color: var(--mall-ink);
  box-shadow: var(--mall-shadow-sm);
}

.m-auth--inline {
  min-height: auto;
  align-items: flex-start;
  padding: 12px 0 calc(24px + var(--m-safe-bottom));
}

.m-auth__card--flat {
  width: 100%;
  max-width: none;
  padding: 0 20px 24px;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

/* —— 카탈로그 —— */
/* PC 몰처럼 좌우 끝까지 풀블리드·직각(카드 테두리·그림자 없음) */
.m-catalog-hero {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0;
  min-height: clamp(120px, 36vw, 168px);
  border-radius: 0;
  overflow: hidden;
  color: #fff;
  box-shadow: none;
  isolation: isolate;
}

.m-catalog-hero__media {
  position: absolute;
  inset: 0;
  background: #0c120f;
}

.m-catalog-hero__slide {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  animation: eibe-mall-hero-slide var(--hero-cycle, 35s) ease-in-out infinite;
  animation-delay: calc(var(--hero-step, 7s) * var(--hero-slide-index, 0));
  transform: translateZ(0);
  backface-visibility: hidden;
}

.m-catalog-hero__slide.mall-hero-slide--empty {
  display: none !important;
  animation: none !important;
}

.m-catalog-hero__media.mall-hero-media--static .m-catalog-hero__slide:not(.mall-hero-slide--empty) {
  animation: none !important;
  opacity: 1 !important;
}

.m-catalog-hero__media.mall-hero-media--slideshow-frozen .m-catalog-hero__slide {
  animation-play-state: paused !important;
}

/* 비활성 뷰(상세·장바구니 등) — 히어로 슬라이드쇼 GPU 합성 중단 */
.m-view:not(.is-active) .m-catalog-hero__slide {
  animation-play-state: paused;
}

.m-catalog-hero__slide--1 { --hero-slide-index: 0; }
.m-catalog-hero__slide--2 { --hero-slide-index: 1; }
.m-catalog-hero__slide--3 { --hero-slide-index: 2; }
.m-catalog-hero__slide--4 { --hero-slide-index: 3; }
.m-catalog-hero__slide--5 { --hero-slide-index: 4; }

@media (prefers-reduced-motion: reduce) {
  .m-catalog-hero__slide {
    animation: none !important;
    opacity: 0 !important;
  }

  .m-catalog-hero__slide--1 {
    opacity: 1 !important;
  }
}

.m-catalog-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    transparent 0%,
    transparent 58%,
    rgba(250, 250, 249, 0.2) 82%,
    var(--mall-surface) 100%
  );
}

@media (prefers-reduced-motion: reduce) {
  .m-catalog-hero__slide {
    animation: none;
    opacity: 0;
  }

  .m-catalog-hero__slide--1 {
    opacity: 1;
  }
}

.m-catalog {
  padding: 4px 14px 12px;
}

/* —— 사이트 푸터 (PC mall-site-footer 동일 정보) —— */
.m-site-footer {
  padding: 16px 16px calc(var(--m-nav-offset) + var(--m-scroll-gap) + 12px);
  border-top: 1px solid rgba(20, 24, 22, 0.08);
  background: var(--mall-surface);
}

.m-view[data-view="cart"] .m-site-footer {
  padding-bottom: calc(var(--m-nav-offset) + var(--m-cta-stack, 68px) + var(--m-scroll-gap) + 12px);
}

.m-site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.m-site-footer__meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  max-width: 36rem;
  font-size: 0.7rem;
  line-height: 1.4;
  color: var(--mall-muted);
}

.m-site-footer__line {
  margin: 0;
}

.m-site-footer__num {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.m-site-footer__addr {
  word-break: keep-all;
}

.m-site-footer__nav {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 10px;
}

.m-site-footer__sep {
  color: rgba(53, 58, 66, 0.45);
  font-size: 0.74rem;
  user-select: none;
}

.m-site-footer__link {
  border: 0;
  padding: 0;
  background: none;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--mall-green-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.m-site-footer__copy {
  margin: 0;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(20, 24, 22, 0.45);
  width: 100%;
}

.m-detail-brand-site-link {
  margin-bottom: 8px;
}

.m-detail .detail-brand-site-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--mall-muted);
  text-decoration: none;
}

.m-detail .detail-brand-site-link:hover {
  color: var(--mall-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.m-detail .detail-brand-site-link__icon {
  flex-shrink: 0;
  opacity: 0.72;
}

.m-product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 340px) {
  .m-product-grid {
    grid-template-columns: 1fr;
  }
}

.m-product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--m-card-radius);
  background: var(--mall-surface);
  border: 1px solid var(--mall-card-border);
  box-shadow: var(--mall-card-shadow);
}

.m-product-card:active {
  transform: none;
}

.m-product-card__visual {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--mall-card-visual-bg);
  border-bottom: 1px solid var(--mall-card-divider);
  overflow: hidden;
}

.m-product-card--soldout {
  opacity: 0.88;
}

.m-product-card--soldout .m-product-card__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(20, 24, 22, 0.34);
  pointer-events: none;
  z-index: 1;
}

.m-product-card__soldout-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  padding: 8px 18px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  background: rgba(139, 58, 58, 0.92);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
  pointer-events: none;
}

.m-product-card--soldout .m-product-card__img {
  opacity: 0.75;
  filter: grayscale(0.3);
}

.m-product-card--soldout .m-btn[disabled] {
  opacity: 0.65;
  background: #8b8f96;
  border-color: #8b8f96;
}

.m-product-card__hit {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  box-sizing: border-box;
  border: none;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.m-product-image-frame {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 0;
  overflow: hidden;
  line-height: 0;
}

.m-product-card__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  padding: 0;
  box-sizing: border-box;
  border-radius: 0;
}

.m-product-card__badge-stack {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.m-product-card__badge {
  position: absolute;
  margin: 0;
  line-height: 1.2;
  word-break: keep-all;
  pointer-events: none;
}

.m-product-card__badge--brand {
  top: 0;
  left: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: min(58%, 7rem);
  min-height: 1.5rem;
  padding: 0.28rem 0.5rem 0.28rem 0.4rem;
  border-end-end-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 3px 12px rgba(53, 58, 66, 0.1);
  filter: drop-shadow(2px 2px 2px rgba(20, 24, 22, 0.06));
}

.m-product-card__badge--brand::before,
.m-product-card__badge--brand::after {
  content: "";
  position: absolute;
  width: 0.65rem;
  height: 0.65rem;
  background-color: inherit;
  mask-image: radial-gradient(
    circle at 100% 100%,
    transparent 0.65rem,
    #000 calc(0.65rem + 1px)
  );
}

.m-product-card__badge--brand::before {
  top: 0;
  left: 100%;
}

.m-product-card__badge--brand::after {
  top: 100%;
  left: 0;
}

.m-product-card__badge-brand-img {
  display: block;
  max-height: 0.9rem;
  max-width: 3rem;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: left center;
}

.m-product-card__badge-brand-text {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mall-stone);
}

.m-product-card__badge--staff {
  top: 0;
  right: 0;
  left: auto;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: min(58%, 7rem);
  min-height: 1.5rem;
  padding: 0.28rem 0.4rem 0.28rem 0.5rem;
  border-end-start-radius: 0.65rem;
  border-radius: 0;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
  color: var(--mall-accent-deal);
  background: rgba(255, 255, 255, 0.97);
  border: none;
  box-shadow: 0 3px 12px rgba(53, 58, 66, 0.1);
  filter: drop-shadow(-2px 2px 2px rgba(20, 24, 22, 0.06));
}

.m-product-card__badge--staff::before,
.m-product-card__badge--staff::after {
  content: "";
  position: absolute;
  width: 0.65rem;
  height: 0.65rem;
  background-color: inherit;
  mask-image: radial-gradient(
    circle at 0% 100%,
    transparent 0.65rem,
    #000 calc(0.65rem + 1px)
  );
}

.m-product-card__badge--staff::before {
  top: 0;
  right: 100%;
}

.m-product-card__badge--staff::after {
  top: 100%;
  right: 0;
}

.m-product-card__body {
  padding: 13px 14px 10px;
  flex: 1;
  min-width: 0;
}

.m-product-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px 10px;
  min-width: 0;
}

.m-product-card__head .m-product-card__brand {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.m-product-card__brand {
  margin: 0 0 3px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--mall-stone);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.m-product-card__name {
  margin: 0 0 6px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.02em;
}

.m-product-card__name-hit {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: keep-all;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  /* PC .product-card__title 과 동일 — 1·2줄 제목 높이 통일 */
  min-height: 2.5375rem; /* 0.875rem × 1.45 × 2줄 */
  min-height: calc(2 * 1lh);
}

/* 가격: 정가(취소선) → 할인가 + %·절약액 */
.m-product-card__prices {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.m-product-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--mall-card-divider);
  min-height: 2.75rem;
  align-content: flex-start;
}

.m-product-card__stock,
.m-product-card__limit,
.m-product-card__ship {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 3px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.02em;
  word-break: keep-all;
}

.m-product-card__stock {
  font-weight: 700;
}

.m-product-card__stock--low {
  color: #9a5b14;
  background: rgba(210, 140, 40, 0.12);
}

.m-product-card__stock--ok {
  color: #166534;
  background: rgba(22, 163, 74, 0.08);
}

.m-product-card__stock--out {
  color: #8b3a3a;
  background: rgba(180, 60, 60, 0.1);
}

.m-product-card__limit {
  color: var(--mall-muted);
  background: transparent;
  border: 1px solid var(--mall-card-divider);
}

.m-product-card__ship {
  color: var(--mall-muted);
  background: rgba(64, 70, 80, 0.04);
}

.m-product-card__retail-line,
.m-product-card__purchase-line {
  margin: 0;
  line-height: 1.2;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
}

.m-product-card__price-kind {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--mall-muted);
}

.m-product-card__retail-plain {
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--mall-ink);
  font-variant-numeric: tabular-nums;
}

.m-product-card__retail {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--mall-muted);
  text-decoration: line-through;
  letter-spacing: -0.02em;
}

.m-product-card__purchase-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 6px;
}

.m-product-card__purchase-line .m-product-card__price-kind {
  color: var(--mall-accent-deal);
}

.m-product-card__purchase {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--mall-accent-deal);
  font-variant-numeric: tabular-nums;
}

.m-product-card__save-meta,
.m-product-card__save-amt {
  display: none;
}

.m-product-card__pct--head {
  flex-shrink: 0;
  margin-top: 1px;
}

.m-product-card__save-meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.m-product-card__pct {
  display: inline-grid;
  place-items: center;
  box-sizing: border-box;
  height: 1.375rem;
  min-width: 2.125rem;
  padding: 0 8px;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1;
  color: var(--mall-accent-deal);
  border-radius: 3px;
  background: var(--mall-accent-deal-soft);
  border: 1px solid rgba(154, 92, 69, 0.12);
  letter-spacing: 0;
}

.m-product-card__save-amt {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--mall-accent-deal);
  letter-spacing: -0.02em;
}

.m-product-card__foot {
  display: grid;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--mall-card-divider);
  margin-top: 2px;
  min-width: 0;
}

.m-product-card__foot-options {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.m-product-card__foot-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px;
  width: 100%;
  margin-left: 0;
  align-items: stretch;
}

.m-product-card__foot [data-buy],
.m-product-card__foot [data-add],
#viewCatalog .m-product-card [data-buy],
#viewCatalog .m-product-card [data-add] {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 8px 12px;
  font-weight: 600;
}

/* 카탈로그 구매·담기 — 얇은 아웃라인(기존 담기 버튼과 동일 톤) */
.m-product-card__foot [data-buy],
.m-product-card__foot [data-add],
#viewCatalog .m-product-card [data-buy],
#viewCatalog .m-product-card [data-add] {
  background: transparent;
  border: 1px solid var(--mall-card-border);
  color: var(--mall-muted);
  box-shadow: none;
}
.m-product-card__foot select,
.m-product-card__option-select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 38px;
  padding: 8px 28px 8px 10px;
  border: 1px solid var(--mall-card-divider);
  border-radius: 10px;
  font-size: max(var(--m-input-font-size, 16px), 0.8125rem);
  background: rgba(255, 255, 255, 0.92);
  color: var(--mall-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box;
}

.m-product-card__foot [data-buy]:active:not(:disabled),
.m-product-card__foot [data-add]:active:not(:disabled),
#viewCatalog .m-product-card [data-buy]:active:not(:disabled),
#viewCatalog .m-product-card [data-add]:active:not(:disabled) {
  background: var(--mall-warm);
  border-color: var(--mall-card-border-hover);
  color: var(--mall-ink);
  box-shadow: none;
}

.m-product-card__foot [data-add].is-await-option:not(:disabled),
.m-product-card__foot [data-buy].is-await-option:not(:disabled),
#mCtaDock #mDetailAdd.is-await-option:not(:disabled) {
  opacity: 0.78;
}

/* —— 카탈로그 카드 stagger reveal —— */
#viewCatalog.m-reveal-ready .m-product-card {
  opacity: 0;
  translate: 0 12px;
  transition: opacity 0.32s ease, translate 0.32s ease;
  transition-delay: var(--m-reveal-delay, 0ms);
}
#viewCatalog.m-reveal-ready .m-product-card.is-revealed {
  opacity: 1;
  translate: 0 0;
  content-visibility: auto;
  contain-intrinsic-size: auto 300px;
}
@media (prefers-reduced-motion: reduce) {
  #viewCatalog.m-reveal-ready .m-product-card,
  #viewCatalog.m-reveal-ready .m-product-card.is-revealed {
    opacity: 1 !important;
    translate: none !important;
    transition: none !important;
  }
}

/* —— 상세 —— */
.m-detail {
  padding-bottom: calc(var(--m-nav-offset, 62px) + var(--m-cta-stack, 68px) + var(--m-scroll-gap) + 16px);
  background: var(--mall-page);
}

.m-gallery {
  position: relative;
  background: #fff;
  aspect-ratio: 1;
  overflow: hidden;
}

.m-detail-soldout-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  transform: translate(-50%, -50%);
  padding: 10px 22px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  background: rgba(139, 58, 58, 0.92);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  line-height: 1;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
  pointer-events: none;
}

.m-detail--soldout .m-gallery__frame img,
.m-detail--soldout .m-gallery__slide img {
  opacity: 0.72;
  filter: grayscale(0.35);
}

.m-detail-soldout-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(180, 60, 60, 0.28);
  background: rgba(180, 60, 60, 0.1);
  font-size: 0.82rem;
  font-weight: 600;
  color: #8b3a3a;
}

.m-detail-soldout-alert__pill {
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: 999px;
  background: #b44a4a;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.m-detail-stock-out {
  color: #b44a4a;
  font-weight: 800;
}

.m-detail-stock-low {
  color: #9a5b14;
  font-weight: 700;
}

.m-detail-stock-ok {
  color: #166534;
  font-weight: 700;
}

.m-detail--soldout #mDetailAdd:disabled {
  background: #8b8f96;
  border-color: #8b8f96;
  opacity: 0.72;
}

.m-gallery__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  height: 100%;
  scrollbar-width: none;
}

.m-gallery__track::-webkit-scrollbar {
  display: none;
}

.m-gallery__slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  box-sizing: border-box;
}

.m-gallery__frame {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 0;
  overflow: hidden;
  line-height: 0;
}

.m-gallery__frame img,
.m-gallery__slide img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
}

.m-gallery .m-product-card__badge-stack {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.m-gallery .m-product-card__badge--staff {
  display: none !important;
}

.m-gallery__dots {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.m-gallery__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, background 0.2s ease;
}

.m-gallery__dot.is-active {
  transform: scale(1.25);
  background: var(--mall-charcoal-deep);
  border-color: transparent;
}

.m-detail__body img {
  display: block;
  max-width: 100%;
  border-radius: var(--m-product-img-radius);
  border: 1px solid var(--mall-line);
}

.m-detail__body {
  margin: 12px 16px 0;
  padding: 18px 16px;
  border-radius: var(--m-card-radius);
  background: var(--mall-surface-elevated);
  border: 1px solid var(--mall-line);
  box-shadow: var(--mall-shadow-sm);
}

.m-detail__brand {
  margin: 0 0 6px;
}

.m-detail__prices {
  margin: 0 0 14px;
}

/* 상세 — 옵션 선택 (컬러 등) 강조 패널 */
.m-detail__options {
  margin: 0 0 16px;
  padding: 14px 14px 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8f7f4 0%, #f2f0eb 100%);
  border: 1.5px solid rgba(20, 24, 22, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.m-detail__options-heading {
  margin: 0 0 4px;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--mall-ink);
}

.m-detail__options-hint {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--mall-muted);
}

.m-detail__option-block + .m-detail__option-block {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(20, 24, 22, 0.1);
}

.m-detail__option-label {
  display: block;
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--mall-charcoal, var(--mall-ink));
}

.m-detail__option-select-wrap {
  position: relative;
}

.m-detail__option-select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 14px;
  width: 8px;
  height: 8px;
  margin-top: -2px;
  border-right: 2px solid var(--mall-charcoal, #2a2f2c);
  border-bottom: 2px solid var(--mall-charcoal, #2a2f2c);
  transform: translateY(-50%) rotate(45deg);
  pointer-events: none;
  opacity: 0.72;
}

.m-detail__body .m-detail-option {
  width: 100%;
  min-height: 50px;
  margin: 0;
  padding: 13px 40px 13px 14px;
  border: 1.5px solid rgba(20, 24, 22, 0.18);
  border-radius: 12px;
  font: inherit;
  font-size: max(var(--m-input-font-size, 16px), 0.98rem);
  font-weight: 700;
  color: var(--mall-ink);
  background: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
}

.m-detail__body .m-detail-option:invalid {
  color: var(--mall-muted);
  font-weight: 600;
  border-color: var(--mall-charcoal, #3d4540);
  background: #fff;
}

.m-detail__body .m-detail-option:valid {
  border-color: rgba(20, 24, 22, 0.22);
  color: var(--mall-ink);
}

.m-detail__body .m-detail-option:focus {
  outline: none;
  border-color: var(--mall-charcoal);
  box-shadow: 0 0 0 3px var(--mall-focus-ring);
}

.m-detail__body h3 {
  margin: 16px 0 8px;
  font-size: 0.9rem;
  font-weight: 700;
}

.m-detail__section-title {
  margin: 0 0 10px;
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--mall-ink);
}

.m-detail__lead {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.58;
  color: var(--mall-ink);
  background: linear-gradient(180deg, #f8f7f5 0%, #f3f2ef 100%);
  border: 1px solid rgba(20, 24, 22, 0.06);
}

.m-detail__quick-meta {
  margin: 16px 0 0;
  padding: 12px 14px;
  list-style: none;
  border-radius: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 8px;
  background: linear-gradient(180deg, #f8f7f5 0%, #f3f2ef 100%);
  border: 1px solid rgba(20, 24, 22, 0.06);
}

.m-detail__quick-meta li {
  min-width: 0;
}

.m-detail__quick-meta li span {
  display: block;
  margin-bottom: 3px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--mall-muted);
}

.m-detail__quick-meta li strong {
  display: block;
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--mall-ink);
  line-height: 1.35;
  word-break: keep-all;
}

.m-detail__specs {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--mall-line);
}

.m-detail__spec-panel {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(20, 24, 22, 0.07);
  background: #fff;
  box-shadow: var(--mall-shadow-sm);
}

.m-detail__spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.m-detail__spec-table th,
.m-detail__spec-table td {
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--mall-line);
}

.m-detail__spec-table tr:last-child th,
.m-detail__spec-table tr:last-child td {
  border-bottom: none;
}

.m-detail__spec-table th {
  width: 34%;
  min-width: 96px;
  font-weight: 600;
  color: var(--mall-muted);
  background: #faf9f7;
}

.m-detail__spec-table td {
  color: var(--mall-ink);
  font-weight: 600;
  line-height: 1.45;
}

.m-detail__article,
.m-detail__figure-block {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--mall-line);
}

.m-detail__article h3,
.m-detail__figure-block h3 {
  margin: 0 0 10px;
}

.m-detail__block + .m-detail__block {
  margin-top: 12px;
}

.m-detail__block h4 {
  margin: 0 0 4px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--mall-ink);
}

.m-detail__block p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--mall-muted);
}

.m-detail__figure {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: var(--m-product-img-radius);
  border: 1px solid var(--mall-line);
  image-rendering: auto;
}

.m-detail__article--rich .detail-rich-html {
  width: 100%;
  line-height: 0;
}

.m-detail__article--rich .detail-rich-html img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.m-detail__article--rich .detail-rich-html iframe {
  display: block;
  width: 100%;
  border: 0;
  background: #000;
}

.m-detail__article--rich .detail-rich-html > div {
  max-width: 100%;
}

.m-detail__article--rich .detail-rich-html img[loading="lazy"] {
  background: #f0eeeb;
}

/* —— 장바구니 —— */
.m-cart-list {
  padding: 12px 16px 12px;
  display: grid;
  gap: 12px;
}

.m-cart-item {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border-radius: var(--m-card-radius);
  background: var(--mall-surface-elevated);
  border: 1px solid var(--mall-line);
  box-shadow: var(--mall-shadow-sm);
  align-items: start;
}

.m-cart-item img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 12px;
  background: var(--mall-warm);
  flex-shrink: 0;
}

.m-cart-item__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.m-cart-item__name {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--mall-ink);
}

.m-cart-item__meta {
  margin: 2px 0 0;
  font-size: 0.8rem;
  line-height: 1.4;
}

.m-cart-notice {
  padding: 14px 16px;
  border-radius: var(--m-card-radius);
  background: linear-gradient(135deg, #fffbeb 0%, #fff8e6 100%);
  border: 1px solid #f0dfa8;
  font-size: 0.88rem;
  line-height: 1.5;
}

.m-cart-notice strong {
  display: block;
  margin-bottom: 4px;
  color: #92400e;
}

.m-cart-item__unit {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin: 6px 0 2px;
  font-size: 0.82rem;
}

.m-cart-item__retail {
  text-decoration: line-through;
  color: var(--mall-muted);
  font-weight: 500;
}

.m-cart-item__unit-price {
  font-size: 0.95rem;
  color: var(--mall-ink);
}

.m-cart-item__pct {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--mall-accent-deal-soft);
  color: var(--mall-accent-deal);
  font-size: 0.72rem;
  font-weight: 700;
}

.m-cart-item__line-total {
  margin: 0 0 4px;
  font-size: 0.95rem;
  text-align: right;
}

.m-cart-item__line-total strong {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--mall-ink);
}

.m-cart-summary {
  margin-top: 4px;
  padding: 16px;
  border-radius: var(--m-card-radius);
  background: var(--mall-surface-elevated);
  border: 1px solid var(--mall-line);
  box-shadow: var(--mall-shadow-sm);
}

.m-cart-summary__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 0.88rem;
  color: var(--mall-muted);
}

.m-cart-summary__row b {
  color: var(--mall-ink);
  font-weight: 700;
  white-space: nowrap;
}

.m-cart-summary__row--discount b {
  color: var(--mall-accent-deal);
}

.m-cart-summary__row--discount em {
  font-style: normal;
  font-weight: 800;
  color: var(--mall-accent-deal);
}

.m-cart-summary__row--reserve {
  visibility: hidden;
}

.m-cart-summary__row--total {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--mall-line);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--mall-ink);
}

.m-cart-summary__row--total b {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.m-qty-stepper {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0 0;
  width: 100%;
}

.m-qty-stepper__group {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.m-qty-stepper__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid var(--mall-line);
  border-radius: 10px;
  background: var(--mall-warm);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--mall-ink);
  cursor: pointer;
  line-height: 1;
  box-sizing: border-box;
}

.m-qty-stepper__btn:active {
  background: var(--mall-surface);
  border-color: var(--mall-card-border-hover);
}

.m-qty-stepper__input {
  flex: 0 0 48px;
  width: 48px;
  min-width: 48px;
  max-width: 48px;
  min-height: 34px;
  height: 34px;
  text-align: center;
  border: 1px solid var(--mall-line);
  border-radius: 10px;
  font: inherit;
  font-size: max(var(--m-input-font-size, 16px), 0.9rem);
  font-weight: 600;
  padding: 0 4px;
  box-sizing: border-box;
  -moz-appearance: textfield;
  appearance: textfield;
}

.m-qty-stepper__input::-webkit-outer-spin-button,
.m-qty-stepper__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.m-qty-stepper__remove {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 7px 12px;
  min-height: 34px;
  border: 1px solid var(--mall-card-border);
  border-radius: 10px;
  background: var(--mall-surface-elevated);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--mall-muted);
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset;
}

.m-qty-stepper__remove:active {
  background: var(--mall-warm);
  border-color: var(--mall-card-border-hover);
  color: var(--mall-ink);
}

/* —— 결제 (4단계 위저드) —— */
.m-checkout {
  padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(var(--m-safe-bottom) + 88px)
    max(16px, env(safe-area-inset-left, 0px));
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.m-checkout--wizard {
  flex: 1;
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.m-checkout--wizard .m-bank-wizard-panels.is-wizard-frame-fixed {
  margin-bottom: 12px;
  flex: 1 1 auto;
  min-height: min(var(--wizard-frame-height, 280px), 100%);
}

.m-bank-wizard-panel {
  min-width: 0;
  max-width: 100%;
}

.m-bank-wizard-lead {
  margin: 0 0 12px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--mall-muted);
  min-height: 2.6em;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.m-bank-wizard-track {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2px;
  margin: 0 0 16px;
  padding: 6px 0 2px;
  list-style: none;
  max-width: 100%;
  overflow: visible;
}

.m-bank-wizard-dot {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 0.62rem;
  line-height: 1.25;
  color: var(--mall-muted);
  position: relative;
}

.m-bank-wizard-dot::after {
  content: "";
  position: absolute;
  top: 13px;
  left: calc(50% + 16px);
  right: calc(-50% + 16px);
  height: 2px;
  background: var(--mall-line);
  z-index: 0;
}

.m-bank-wizard-dot:last-child::after {
  display: none;
}

.m-bank-wizard-dot.is-done::after {
  background: var(--mall-charcoal);
  opacity: 0.35;
}

.m-bank-wizard-dot-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0 auto 5px;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--mall-warm);
  border: 2px solid var(--mall-line);
  color: var(--mall-muted);
  position: relative;
  z-index: 1;
}

.m-bank-wizard-dot.is-done .m-bank-wizard-dot-num {
  border-color: var(--mall-charcoal-deep);
  background: var(--mall-charcoal-deep);
  color: transparent;
  font-size: 0;
}

.m-bank-wizard-dot.is-done .m-bank-wizard-dot-num::after {
  content: "✓";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
}

.m-bank-wizard-dot.is-current .m-bank-wizard-dot-num {
  border-color: var(--mall-charcoal-deep);
  background: var(--mall-charcoal-deep);
  color: #fff;
}

.m-bank-wizard-dot-label {
  display: block;
  padding: 0 1px;
}

.m-bank-wizard-panel-title {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 800;
}

.m-bank-wizard-panel-desc {
  margin: 0 0 12px;
  font-size: 0.86rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.m-checkout-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 10px;
  font-size: 0.9rem;
}

.m-checkout-total strong {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--mall-ink);
}

.m-checkout-order-lines {
  margin: 0 0 10px;
  padding-left: 18px;
  font-size: 0.86rem;
  line-height: 1.45;
}

.m-checkout-rows {
  display: grid;
  gap: 4px;
}

.m-checkout-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-size: 0.86rem;
}

.m-checkout-order-id {
  margin: 0 0 12px;
  font-size: 0.9rem;
}

.m-checkout-order-id code {
  font-size: 1rem;
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.m-checkout-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--mall-muted);
}

.m-checkout-mono {
  font-family: ui-monospace, monospace;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.m-bank-proof-label {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.m-bank-proof-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.m-bank-proof-hint {
  position: relative;
  z-index: 0;
  display: flex;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  text-align: center;
  cursor: pointer;
}

.m-bank-proof-preview-wrap {
  margin-top: 10px;
}

.m-bank-proof-preview {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--mall-line);
  background: #fff;
}

.m-bank-proof-err {
  margin-top: 8px;
  font-size: 0.84rem;
  color: #b42318;
}

.m-bank-proof-err--hint {
  color: var(--mall-muted);
}

.m-order-proof {
  margin: 12px 0;
}

.m-order-proof__label {
  margin: 0 0 6px;
  font-size: 0.82rem;
}

.m-order-proof__thumb {
  display: block;
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--mall-line);
  background: #fff;
}

.cash-receipt-customer {
  margin: 12px 0;
  padding: 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--mall-line);
}

.cash-receipt-customer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.cash-receipt-customer__title {
  margin: 0;
  font-size: 0.82rem;
  color: var(--mall-muted);
}

.cash-receipt-customer__pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}

.cash-receipt-customer--pending .cash-receipt-customer__pill {
  background: #fff7ed;
  color: #b45309;
  border: 1px solid #fed7aa;
}

.cash-receipt-customer--done .cash-receipt-customer__pill {
  background: #ecfdf3;
  color: #027a48;
  border: 1px solid #abefc6;
}

.cash-receipt-customer__row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.86rem;
  margin-bottom: 6px;
}

.cash-receipt-customer__row span {
  color: var(--mall-muted);
}

.cash-receipt-customer__row code {
  font-size: 0.85rem;
  background: #f0f2f7;
  padding: 2px 6px;
  border-radius: 4px;
}

.cash-receipt-customer__when {
  margin: 6px 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
}

.cash-receipt-apply__hint {
  margin: 0 0 8px;
  font-size: 0.82rem;
  line-height: 1.55;
}

.cash-receipt-customer__pill--apply {
  background: #eff6ff;
  color: #1e4a8a;
  border: 1px solid #bfdbfe;
}

.cash-receipt-apply .cash-receipt-customer__title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--mall-ink);
}

.cash-receipt-apply__toolbar {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.cash-receipt-apply__select {
  flex: 1 1 0;
  min-width: 0;
  min-height: var(--m-tap-target, 44px);
  margin: 0;
  padding: 10px 32px 10px 12px;
  border: 1px solid var(--mall-card-border);
  border-radius: 12px;
  background: var(--mall-surface-elevated) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: var(--mall-charcoal-deep);
  font: inherit;
  font-size: var(--m-input-font-size, 16px);
  line-height: 1.3;
  appearance: none;
  cursor: pointer;
}

.cash-receipt-apply__id {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  font-size: 0.86rem;
  font-weight: 600;
}

.cash-receipt-apply__id input {
  width: 100%;
  min-height: var(--m-tap-target, 44px);
  font-size: var(--m-input-font-size, 16px);
  border-radius: 12px;
  border: 1px solid var(--mall-card-border);
  padding: 10px 12px;
  background: var(--mall-surface-elevated);
}

.cash-receipt-apply .cash-receipt-err {
  margin: 8px 0 0;
  font-size: 0.8rem;
}

.cash-receipt-apply__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto;
  min-width: 84px;
  min-height: var(--m-tap-target, 44px);
  margin: 0;
  padding: 11px 14px;
  white-space: nowrap;
  border: 1px solid var(--mall-card-border);
  border-radius: 12px;
  background: var(--mall-surface-elevated);
  color: var(--mall-charcoal-deep);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  cursor: pointer;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
}

.cash-receipt-apply__submit:active:not(:disabled) {
  background: var(--mall-warm);
  border-color: var(--mall-card-border-hover);
}

.cash-receipt-apply__submit:disabled {
  opacity: 0.72;
  cursor: wait;
}

.cash-receipt-apply__msg {
  margin: 8px 0 0;
  font-size: 0.8rem;
  line-height: 1.45;
}

.cash-receipt-apply__msg--err {
  color: #b5345c;
  font-weight: 600;
}

.m-checkout-review {
  padding: 14px 16px;
  border-radius: var(--m-card-radius);
  background: var(--mall-warm);
  border: 1px solid var(--mall-line);
}

.m-checkout-review-proof {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--mall-line);
  display: grid;
  gap: 8px;
}

.m-checkout-review-thumb {
  width: 100%;
  max-height: 160px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--mall-line);
  background: #fff;
}

.m-checkout__section--flush {
  margin-bottom: 0;
  box-shadow: none;
}

.m-checkout-wizard-actions {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 46;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px max(14px, env(safe-area-inset-right, 0px)) calc(10px + var(--m-safe-bottom))
    max(14px, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid var(--mall-line);
  box-shadow: 0 -8px 24px rgba(15, 22, 18, 0.08);
}

.m-checkout-wizard-actions .m-btn {
  flex: 1;
  min-width: 0;
  min-height: 44px;
}

.m-checkout-wizard-actions .m-btn.is-hidden:not(.wizard-nav-btn--hidden) {
  display: none !important;
}

.m-checkout-wizard-actions .m-btn.wizard-nav-btn--hidden {
  flex: 1;
}

.m-view[data-view="profile"] .m-mypage,
.m-view[data-view="signup"] .m-auth--inline {
  padding-bottom: calc(var(--m-safe-bottom) + 24px);
}

.m-checkout__section {
  margin-bottom: 14px;
  padding: 18px 16px;
  border-radius: var(--m-card-radius);
  background: var(--mall-surface-elevated);
  border: 1px solid var(--mall-line);
  box-shadow: var(--mall-shadow-sm);
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.m-checkout__section h2 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 800;
}

.m-checkout__bank {
  padding: 14px;
  border-radius: 12px;
  background: var(--mall-warm);
  border: 1px solid var(--mall-card-border);
  font-size: 0.9rem;
  line-height: 1.55;
  max-width: 100%;
  min-width: 0;
}

.m-checkout__bank .m-btn,
.m-checkout__copy-btn {
  width: 100%;
  max-width: 100%;
  margin-top: 12px;
  white-space: normal;
  line-height: 1.35;
  text-align: center;
}

.m-checkout__section--bank-wrap {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.m-checkout__bank strong {
  color: var(--mall-ink);
}

/* —— 마이 —— */
.m-mypage {
  padding: 8px 16px 12px;
}

.m-mypage__profile {
  margin-bottom: 16px;
  padding: 16px;
  border-radius: var(--m-card-radius);
  background: var(--mall-surface-elevated);
  border: 1px solid var(--mall-line);
  box-shadow: var(--mall-shadow-sm);
}

.m-mypage__profile strong {
  font-size: 1.05rem;
  font-weight: 800;
}

.m-seg {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(42, 47, 53, 0.06);
  border: 1px solid var(--mall-card-border);
}

.m-seg button {
  flex: 1;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 11px;
  border: none;
  background: transparent;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--mall-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.m-seg button.is-active {
  background: var(--mall-surface-elevated);
  color: var(--mall-ink);
  box-shadow: var(--mall-shadow-sm);
}

.m-order-notice {
  margin: 0 0 12px;
  padding: 12px 14px;
  font-size: 0.8rem;
  line-height: 1.5;
  border-radius: 10px;
  border: 1px solid var(--mall-line);
  background: #fff;
  color: var(--mall-muted);
}

.m-mypage-cancel-notice {
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--mall-line);
  background: #fff;
  box-shadow: var(--mall-shadow-sm);
}

.m-mypage-cancel-notice__text {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--mall-ink);
  word-break: keep-all;
}

.m-mypage-cancel-notice__brands {
  margin: 12px 0 0;
  padding: 12px 0 0;
  list-style: none;
  border-top: 1px solid var(--mall-line);
}

.m-mypage-cancel-notice__brands li {
  padding: 5px 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--mall-muted);
}

.m-mypage-cancel-notice__brands strong {
  font-weight: 700;
  color: var(--mall-ink);
}

.m-order-card {
  padding: 16px;
  margin-bottom: 12px;
  border-radius: var(--m-card-radius);
  background: var(--mall-surface-elevated);
  border: 1px solid var(--mall-line);
  box-shadow: var(--mall-shadow-sm);
}

.m-order-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--mall-line);
}

.m-order-statement-dl {
  margin-top: 0;
  font-size: 0.84rem;
}

.m-order-card-actions .m-order-statement-dl {
  margin-top: 0;
}

.m-order-card > .m-order-statement-dl {
  margin-top: 12px;
}

.m-order-cancel-btn {
  min-height: var(--m-tap-target, 44px);
  font-size: 0.88rem;
  font-weight: 700;
}

.m-order-cancel-btn.m-btn--danger {
  background: #fff;
  color: var(--danger, #cc406d);
  border: 1px solid rgba(204, 64, 109, 0.42);
  box-shadow: none;
}

.m-order-cancel-btn.m-btn--danger:active:not(:disabled) {
  background: rgba(204, 64, 109, 0.06);
  color: var(--danger-hover, #b5345c);
  border-color: rgba(204, 64, 109, 0.55);
  box-shadow: none;
}

.m-order-cancel-btn:disabled {
  opacity: 0.72;
  cursor: wait;
}

/* 주문 취소 확인 모달 — 모바일은 main.css 미로드 → PC 공용 클래스 보완 */
html.m-app-root body.customer-order-cancel-open {
  overflow: hidden;
}

html.m-app-root .customer-order-cancel-backdrop.checkout-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--m-z-sheet, 1100);
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) 16px max(16px, env(safe-area-inset-bottom, 0px));
  background: rgba(12, 20, 36, 0.45);
  opacity: 0;
  transition: opacity 0.22s ease;
}

html.m-app-root .customer-order-cancel-backdrop.checkout-modal-backdrop.is-open {
  opacity: 1;
}

html.m-app-root .customer-order-cancel-panel.checkout-modal-panel {
  width: min(420px, 100%);
  max-height: min(88dvh, 640px);
  overflow: auto;
  background: #fff;
  border-radius: var(--m-sheet-radius, 18px);
  padding: 20px 18px;
  box-shadow: var(--mall-shadow-lg);
  transform: translateY(10px);
  transition: transform 0.24s var(--m-ease-out, ease);
}

html.m-app-root .customer-order-cancel-backdrop.is-open .customer-order-cancel-panel {
  transform: translateY(0);
}

html.m-app-root .customer-order-cancel-backdrop .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--m-tap-target, 44px);
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

html.m-app-root .customer-order-cancel-backdrop .btn-ghost {
  background: var(--mall-surface-elevated);
  color: var(--mall-charcoal);
  border-color: var(--mall-card-border);
}

html.m-app-root .customer-order-cancel-backdrop .btn-danger {
  background: var(--danger, #cc406d);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(204, 64, 109, 0.22);
}

html.m-app-root .customer-order-cancel-actions {
  flex-direction: column-reverse;
  align-items: stretch;
}

html.m-app-root .customer-order-cancel-actions .btn {
  width: 100%;
}

html.m-app-root .customer-order-cancel-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.84em;
  background: rgba(20, 24, 22, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html.m-app-root .customer-order-cancel-backdrop.checkout-modal-backdrop,
  html.m-app-root .customer-order-cancel-panel.checkout-modal-panel {
    transition: none;
    transform: none;
  }
}

.m-order-card .order-status {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--mall-card-border);
  color: var(--mall-charcoal-deep);
  font-size: 0.75rem;
  font-weight: 700;
}

.m-order-card-extras {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.m-order-card-extras__receipt > .cash-receipt-customer,
.m-order-card-extras__ship > .tracking-box {
  margin-top: 0;
}

.m-order-card .tracking-box {
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--mall-line);
  box-shadow: var(--mall-shadow-sm);
}

.m-order-card .tracking-box h4 {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--mall-ink);
}

.m-order-card .tracking-row {
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--mall-muted);
}

.m-order-card .tracking-row strong {
  color: var(--mall-ink);
  font-weight: 600;
}

.m-order-card .tracking-row + .tracking-row {
  margin-top: 4px;
}

.m-order-card .tracking-row code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  color: var(--mall-ink);
  font-weight: 600;
  background: rgba(20, 24, 22, 0.04);
  padding: 2px 6px;
  border-radius: 4px;
}

.m-flow-step {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 4px 6px 0 0;
  font-size: 0.7rem;
  color: var(--mall-muted);
}

.m-flow-step span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #d5dbe6;
}

.m-flow-step.is-done,
.m-flow-step.is-current {
  color: var(--mall-ink);
  font-weight: 600;
}

.m-flow-step.is-done span,
.m-flow-step.is-current span {
  background: var(--mall-charcoal-deep);
}

.m-catalog-grid-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px 20px 12px;
}

.m-catalog-grid-status.hidden {
  display: none;
}

.m-catalog-grid-status__ring {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(42, 47, 54, 0.12);
  border-top-color: var(--mall-ink, #2a2f36);
  border-radius: 50%;
  animation: m-boot-spin 0.75s linear infinite;
}

.m-catalog-grid-status__text {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--mall-muted, #6b7280);
  letter-spacing: -0.02em;
}

.m-catalog-boot-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: min(52vh, 420px);
  padding: 32px 20px;
}

.m-catalog-boot-loader__ring {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(42, 47, 54, 0.12);
  border-top-color: var(--mall-ink, #2a2f36);
  border-radius: 50%;
  animation: m-boot-spin 0.75s linear infinite;
}

.m-catalog-boot-loader__text {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--mall-muted, #6b7280);
  letter-spacing: -0.02em;
}

.m-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--mall-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* PC 몰 empty state 와 동형 — 카탈로그·장바구니·마이페이지 (scripts/mall-empty-states.js) */
.mall-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: clamp(220px, 36vh, 360px);
  padding: clamp(28px, 6vw, 44px) 16px;
  text-align: center;
  border: none;
  background: transparent;
  box-shadow: none;
}

.m-product-grid .mall-empty-state {
  grid-column: 1 / -1;
}

.mall-empty-state__visual {
  position: relative;
  width: 64px;
  height: 64px;
  margin-bottom: 4px;
  display: grid;
  place-items: center;
  color: var(--mall-ink);
}

.mall-empty-state__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--mall-card-border);
  background: var(--mall-surface);
  box-shadow: var(--mall-card-shadow);
}

.mall-empty-state__glyph {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  opacity: 0.72;
}

.mall-empty-state__eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--mall-muted);
}

.mall-empty-state__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--mall-ink);
  letter-spacing: -0.03em;
}

.mall-empty-state__desc {
  margin: 0;
  max-width: 34ch;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--mall-muted);
}

.mall-empty-state__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 280px;
  margin-top: 10px;
}

.mall-empty-state__cta {
  width: 100%;
}

.m-cart-empty-state {
  padding-top: 12px;
  padding-bottom: 24px;
}

.m-mypage-empty-state {
  margin-top: 4px;
}

.m-sentinel {
  height: 1px;
}

.m-profile-hint {
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: 12px;
  border: 1px dashed var(--mall-card-border-hover);
  background: var(--mall-warm);
  font-size: 0.86rem;
  line-height: 1.5;
}

.m-success {
  padding: 48px 24px;
  text-align: center;
}

.m-success h2 {
  margin: 0 0 10px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--mall-ink);
}

.m-success .m-success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--mall-warm);
  border: 1px solid var(--mall-card-border);
  color: var(--mall-charcoal-deep);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
}

/* iOS Safari — 입력 포커스 시 font-size<16px 이면 페이지가 확대되어 하단 탭이 가려짐 (핀치 축소 필요).
 * viewport maximum-scale=1 은 접근성·확대 불가라 쓰지 않고, 입력 글자 크기만 16px 이상으로 통일. */
html.m-app-root input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]),
html.m-app-root select,
html.m-app-root textarea {
  font-size: var(--m-input-font-size, 16px);
}

/* —— 모바일 UI polish (CSS only · PC 토큰 정합) —— */
.m-catalog {
  background: var(--mall-page);
}

.m-product-card__foot select,
.m-product-card__option-select {
  border-color: var(--mall-card-border);
  background: #fff;
}

.m-product-card__foot select:focus,
.m-product-card__option-select:focus {
  outline: none;
  border-color: var(--mall-charcoal);
  box-shadow: 0 0 0 2px var(--mall-focus-ring);
}

.m-cart-item,
.m-mypage__profile,
.m-order-card,
.m-detail__body,
.m-checkout__section {
  border-color: var(--mall-card-border);
  box-shadow: var(--mall-card-shadow);
}

.m-checkout-wizard-actions .m-btn--primary {
  min-width: 108px;
  font-weight: 700;
}

.m-profile-hint {
  border-color: var(--mall-card-border-hover);
}

.m-sheet {
  border: 1px solid var(--mall-card-border);
  border-bottom: none;
}

.m-sheet__handle {
  background: rgba(42, 47, 53, 0.14);
}
