/* 공용 부품 모양(js/ui/*). 숫자는 Theme.swift·Chrome.swift·Mall.swift 값 그대로(pt = CSS px). W1 소유 */

/* 사진 */
.mt-photo { background-repeat: no-repeat; background-position: 50% 50%; background-size: cover; overflow: hidden; }

/* 아이콘 */
.mt-icon { display: block; flex: 0 0 auto; overflow: visible; }
[dir="rtl"] .mt-icon.flip-rtl { transform: scaleX(-1); }

/* 누름(PressScale) */
.mt-press { transition: transform 0.14s var(--ease-mt); }
.mt-press:active { transform: scale(var(--press, 0.97)); }

/* 유리(GlassBG / Liquid Glass 근사) */
.mt-glass {
  background: rgba(247, 247, 245, 0.62);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  backdrop-filter: blur(18px) saturate(1.6);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12), inset 0 0 0 0.5px rgba(255, 255, 255, 0.7);
}

/* 주 버튼 PrimaryCTA */
.mt-cta {
  width: 100%; min-height: 60px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  background: var(--mt-ink); color: var(--mt-paper);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.30);
}
.mt-cta .mt-cta-t { padding: 0 10px; text-align: center; }
.mt-cta:disabled { background: var(--mt-disabled); box-shadow: none; cursor: default; }
/* Btn line / small */
.mt-btn { min-height: 60px; padding: 0 20px; border-radius: 999px; width: 100%; white-space: nowrap; display: flex; align-items: center; justify-content: center; }
.mt-btn.small { width: auto; }
.mt-btn.fill { background: var(--mt-ink); color: var(--mt-paper); }
.mt-btn.line { background: var(--mt-paper); color: var(--mt-ink); box-shadow: inset 0 0 0 1.5px var(--mt-line); }
.mt-btn:disabled { opacity: 0.5; }

/* Chip */
.mt-chip { flex: 1 1 0; padding: 0 12px; border-radius: 999px; background: var(--mt-paper); color: var(--mt-ink); box-shadow: inset 0 0 0 1.5px var(--mt-line); text-align: center; }
.mt-chip.on { background: var(--mt-ink); color: var(--mt-paper); box-shadow: none; }
/* ChipBtn */
.mt-chipbtn { height: 44px; padding: 0 16px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; background: var(--mt-paper); color: var(--mt-ink); box-shadow: inset 0 0 0 1.5px var(--mt-line); }
.mt-chipbtn.on { background: var(--mt-ink); color: var(--mt-paper); box-shadow: none; }
.mt-chipbtn .dot { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6); }

/* Seg */
.mt-seg { position: relative; display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(17, 17, 16, 0.06); }
.mt-seg-b { position: relative; z-index: 1; flex: 1 1 0; border-radius: 999px; color: var(--mt-ink2); font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; }
.mt-seg-b.on { color: var(--mt-ink); font-weight: 800; }
.mt-seg-pill { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; border-radius: 999px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); opacity: 0; transition: transform 0.34s cubic-bezier(0.3, 1.25, 0.5, 1); }

/* TextLink */
.mt-textlink { min-height: 48px; padding: 0 12px; text-decoration: underline; text-underline-offset: 3px; }
.mt-textlink.exit { display: block; margin: 0 auto; }

/* 글자 */
.mt-lab { color: var(--mt-melona-ink); }
.mt-h2 { margin: 0; color: var(--mt-ink); line-height: 1.28; }
.mt-cap { margin: 0; color: var(--mt-mut); line-height: 1.4; }
.mt-lead { margin: 0; color: var(--mt-ink2); line-height: 1.38; }
.mt-subline { display: flex; align-items: center; gap: 4px; color: var(--mt-melona-ink); }
.mt-tag { display: inline-block; padding: 6px 12px; border-radius: 16px; color: var(--mt-ink); }
.mt-tag.dark { background: rgba(17, 17, 16, 0.85); color: var(--mt-paper); border-radius: 999px; }
.mt-tag.glass { background: rgba(247, 247, 245, 0.62); -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12), inset 0 0 0 0.5px rgba(255, 255, 255, 0.7); }
.mt-minitag { display: inline-block; padding: 3px 6px; border-radius: 4px; white-space: nowrap; line-height: 1.2; color: var(--mt-ink); background: #fff; }
.mt-minitag.lime { background: var(--mt-melona); }
.mt-minitag.ink { background: var(--mt-ink); color: #fff; }
.mt-minitag.line { background: transparent; color: #555; box-shadow: inset 0 0 0 1px #C9C9C6; }

/* Foot */
.mt-foot { flex: 0 0 auto; display: flex; flex-direction: column; gap: 8px; padding: 30px 20px calc(6px + var(--sab)); background: linear-gradient(to bottom, rgba(237, 237, 235, 0) 0%, var(--mt-bg) 16%); }
.mt-foot-tail { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mt-foot-pick { padding: 2px 8px; border-radius: 999px; background: var(--mt-melona); color: var(--mt-ink); white-space: nowrap; }
.mt-foot-text { color: var(--mt-ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mt-foot-row { display: flex; gap: 8px; }

/* 머리 줄 부품 */
.mt-back { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--mt-ink); flex: 0 0 auto; }
.mt-homebtn { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--mt-ink); flex: 0 0 auto; }
.mt-iconbtn { position: relative; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--mt-ink); flex: 0 0 auto; }
.mt-cart-badge { position: absolute; top: 5px; right: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--mt-ink); color: #fff; display: flex; align-items: center; justify-content: center; letter-spacing: 0; line-height: 1; }
.mt-logo { min-width: 44px; min-height: 44px; padding: 0 4px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.mt-logo-img { display: block; background: var(--mt-ink); -webkit-mask: url("../img/mt_logo.webp") center / contain no-repeat; mask: url("../img/mt_logo.webp") center / contain no-repeat; }

/* 쇼핑몰 상단 MallTop */
.mt-malltop { flex: 0 0 auto; height: 48px; padding: 0 10px; display: flex; align-items: center; gap: 2px; }
.mt-malltop .sp, .mt-shophead .sp, .mt-bar-row .sp { flex: 1 1 auto; min-width: 4px; }
/* 쇼핑 머리(ListView) */
.mt-shophead { flex: 0 0 auto; height: 52px; padding: 0 10px; display: flex; align-items: center; gap: 2px; }
.mt-shophead .t { padding-left: 6px; white-space: nowrap; }

/* 흐름 머리 Bar */
.mt-bar { flex: 0 0 auto; padding: var(--sat) 16px 6px 14px; display: flex; flex-direction: column; gap: 4px; }
.mt-bar.solid { background: var(--mt-bg); }
.mt-bar-row { height: 52px; display: flex; align-items: center; gap: 10px; }
.mt-bar-row.step { gap: 6px; }
.mt-bar-title { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; min-width: 0; overflow: hidden; }
.mt-pricechip { height: 36px; padding: 0 9px; border-radius: 18px; display: flex; align-items: center; gap: 5px; white-space: nowrap; flex: 0 0 auto; }
.mt-pricechip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mt-melona); box-shadow: inset 0 0 0 1px rgba(17, 17, 16, 0.35); }
.mt-bar-prog { display: flex; gap: 4px; }
.mt-bar-prog span { flex: 1 1 0; height: 4px; border-radius: 2px; background: rgba(17, 17, 16, 0.14); overflow: hidden; }
.mt-bar-prog span.done { background: var(--mt-ink); }
.mt-bar-prog span.cur { background: linear-gradient(to left, var(--mt-ink) 2px, var(--mt-melona) 2px); }

/* 하단 탭 MallTabBar: 위 6 · 옆 4 · 아래 2 + 안전 영역, 흰 불투명, 위 1px 선 */
.mt-tabbar { position: relative; z-index: var(--z-tabbar); flex: 0 0 auto; display: flex; align-items: flex-end; padding: 6px 4px calc(2px + var(--sab)); background: #fff; box-shadow: inset 0 1px 0 var(--mt-line); }
.mt-tab { flex: 1 1 0; min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--mt-tab-off); }
.mt-tab.on { color: var(--mt-ink); }
.mt-tab span { white-space: nowrap; line-height: 13px; }
.mt-tab .mt-icon { width: 26px; height: 26px; margin: -1px 0 -2px; }
.mt-tab.make { justify-content: flex-end; color: var(--mt-ink); }
.mt-tab-make { width: 56px; height: 56px; border-radius: 50%; background: var(--mt-ink); color: #fff; display: flex; align-items: center; justify-content: center; margin-top: -14px; box-shadow: 0 5px 16px rgba(0, 0, 0, 0.25); }
.mt-tab-make .mt-icon { width: 31px; height: 31px; }

/* 떠 있는 탭바 FloatingTabBar */
.mt-ftabbar { display: flex; height: 64px; padding: 4px; margin: 0 16px; border-radius: 32px; }
.mt-ftab { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 999px; color: var(--mt-ink2); }
.mt-ftab.on { color: var(--mt-ink); background: rgba(17, 17, 16, 0.08); }

/* 토스트 */
.mt-toast-layer { position: absolute; inset: 0; z-index: var(--z-toast); pointer-events: none; display: flex; justify-content: center; }
.mt-toast { position: absolute; left: 20px; right: 20px; margin: 0 auto; width: fit-content; max-width: calc(100% - 40px); padding: 12px 18px; border-radius: 999px; background: rgba(17, 17, 16, 0.92); color: var(--mt-paper); text-align: center; opacity: 0; transition: opacity 0.25s var(--ease-io); }
.mt-toast.show { opacity: 1; }

/* 시트 */
.mt-sheet-layer { position: absolute; inset: 0; z-index: var(--z-sheet); pointer-events: none; }
.mt-sheet-wrap { position: absolute; inset: 0; pointer-events: auto; }
.mt-sheet-dim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.25); opacity: 0; transition: opacity 0.35s var(--ease-io); }
.mt-sheet { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; background: var(--mt-bg); border-radius: 38px 38px 0 0; box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.12); transform: translateY(105%); transition: transform 0.42s cubic-bezier(0.2, 0.9, 0.25, 1); padding-bottom: var(--sab); overflow: hidden; }
.mt-sheet.d-large { top: var(--sat); }   /* 앱 큰 시트 윗변 = 안전 영역 위(62pt) [실측 ref/result-fitsheet·tryon-sheet] */
.mt-sheet.d-medium { height: 52%; }
.mt-sheet.d-auto { max-height: calc(100% - var(--sat) - 10px); }
.mt-sheet-grab { flex: 0 0 auto; width: 36px; height: 5px; border-radius: 3px; background: rgba(17, 17, 16, 0.2); margin: 5px auto 0; }
.mt-sheet-wrap.open .mt-sheet-dim { opacity: 1; }
.mt-sheet-wrap.open .mt-sheet { transform: none; }
.mt-sheet-wrap.closing .mt-sheet { transform: translateY(105%); }
.mt-sheet-wrap.closing .mt-sheet-dim { opacity: 0; }
.mt-dialog-wrap { position: absolute; inset: 0; pointer-events: auto; background: rgba(0, 0, 0, 0.4); display: flex; align-items: center; padding: 0 28px; opacity: 0; transition: opacity 0.2s; }
.mt-dialog-wrap.open { opacity: 1; }
.mt-dialog { width: 100%; padding: 20px; border-radius: 18px; background: var(--mt-paper); }

/* 상품 카드 가격 */
.mt-cardprice { display: flex; align-items: baseline; gap: 3px; white-space: nowrap; }
.mt-cardprice .pct { color: var(--mt-sale); }
.mt-cardprice .now { color: var(--mt-ink); }
.mt-cardprice .was { color: #5E5E5A; text-decoration: line-through; }

/* 찜 하트 */
.mt-heart { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--mt-ink); }
.mt-heart.card { color: #fff; filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.35)); }
.mt-heart.card.on { color: var(--mt-sale); }
.mt-heart.glass { border-radius: 50%; }

.mt-divider { height: 1px; background: var(--mt-line); }
