/* reptitude — 공통 스타일 (원본 디자인: ../Product Page.dc.html) */
:root {
  --or: #E8430F;
  --or-dark: #C9360A;
  --or-soft: #E9A88F;
  --gr: #1F7A45;
  --gr-soft: #DDF0E1;
  --ink: #1D3B2A;
  --bg: #F6F0E4;
  --paper: #FFFDF8;
  --line: #E3D9C4;
  --muted: #5C6B60;
  --peach: #FFB089;
  --display: Archivo, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); -webkit-font-smoothing: antialiased; }
body {
  min-height: 100vh;
  color: var(--ink);
  font-family: 'Pretendard Variable', Pretendard, system-ui, sans-serif;
}
body.sheet-open { overflow: hidden; }
body.has-sticky { padding-bottom: 84px; }
a { color: var(--or); }
a:hover { color: var(--gr); }
button { font: inherit; }
input::placeholder, textarea::placeholder { color: #B9AE98; }
[hidden] { display: none !important; }

.wrap { max-width: 1280px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.label {
  font-family: var(--display); font-weight: 800; font-size: 12px;
  letter-spacing: .06em; color: var(--or);
}
.display {
  margin: 0; font-family: var(--display); font-weight: 900; font-stretch: 88%;
  text-transform: uppercase; color: var(--or); line-height: .88; letter-spacing: -.02em;
}

/* ---------- header ---------- */
.test-bar {
  background: var(--ink); color: #FFE08A; text-align: center; font-size: 12px; font-weight: 700;
  padding: 6px 12px; line-height: 1.4;
}
.marquee {
  background: var(--gr); color: var(--bg); overflow: hidden; white-space: nowrap;
  font-family: var(--display); font-weight: 800; font-size: 11px; letter-spacing: .04em;
  padding: 7px 0; text-transform: uppercase;
}
.marquee-track { display: flex; width: max-content; animation: mq 28s linear infinite; }
.marquee-track span { padding: 0 28px; }
@keyframes mq { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.topbar {
  max-width: 1280px; margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.logo {
  border: 2px solid var(--or); border-radius: 12px; padding: 2px 14px 4px;
  font-family: var(--display); font-weight: 900; font-stretch: 115%; font-size: 24px;
  letter-spacing: -.02em; color: var(--or); line-height: 1.1; text-decoration: none;
}
.logo span, .footer-logo span { color: var(--gr); }
.logo:hover { color: var(--or); }
.topnav { display: flex; gap: 8px; }
.pill-link {
  border: 2px solid var(--or); background: transparent; color: var(--or); border-radius: 999px;
  padding: 6px 14px; font-family: var(--display); font-weight: 800; font-size: 13px;
  letter-spacing: .02em; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.pill-link:hover { background: var(--or); color: var(--paper); }
/* 좁은 휴대폰 화면: 로고·버튼을 조금 줄여서 한 줄에 들어가게 */
@media (max-width: 420px) {
  .topbar { gap: 8px; padding-left: 12px; padding-right: 12px; }
  .logo { font-size: 20px; padding: 2px 10px 4px; white-space: nowrap; }
  .topnav { gap: 6px; }
  .topbar .pill-link { padding: 6px 10px; font-size: 12px; }
}

/* ---------- buttons ---------- */
.btn-primary {
  height: 56px; border-radius: 999px; border: 0; background: var(--or); color: var(--paper);
  font-family: var(--display); font-weight: 900; font-size: 17px; letter-spacing: .02em;
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
  cursor: pointer; width: 100%; text-decoration: none;
}
.btn-primary:hover { background: var(--or-dark); color: var(--paper); }
.btn-primary:disabled { background: var(--or-soft); cursor: default; }
.btn-primary.center { justify-content: center; }
.btn-outline {
  height: 52px; border-radius: 999px; border: 2px solid var(--or); background: transparent;
  color: var(--or); font-family: var(--display); font-weight: 900; font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; width: 100%; text-decoration: none;
}
.btn-outline:hover { background: var(--or); color: var(--paper); }
.chip {
  height: 46px; border-radius: 999px; border: 2px solid var(--or); background: transparent;
  color: var(--or); font-family: var(--display); font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; padding: 0 8px;
}
.chip.on { border-color: var(--gr); background: var(--gr-soft); color: var(--gr); }
.chip:disabled { opacity: .4; cursor: default; }
.swatch { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--ink); flex: none; }

/* ---------- product ---------- */
.product { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
.gallery {
  flex: 1 1 440px; min-width: 0; background: #fff; border-radius: 22px; padding: 16px;
  display: flex; flex-direction: column; gap: 14px;
}
/* 사진이 1장(버튼 숨김)이면 사진이 카드 높이를 꽉 채우게 */
.gallery:has(.thumbs[hidden]) .gallery-main { flex: 1 0 auto; }
.gallery-main { position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: 14px; overflow: hidden; }
.gallery-main > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.gallery-main img { object-fit: cover; }
.gallery-main picture img { display: block; width: 100%; height: 100%; }
.img-placeholder {
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px;
  background: #F1ECE1; border: 1.5px dashed #CFC4AE; border-radius: inherit;
  color: #8C8270; font-family: var(--mono); font-size: 13px;
}
.thumbs { display: flex; justify-content: center; gap: 8px; }
.thumbs button {
  width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line); background: #fff;
  color: var(--ink); font-family: var(--mono); font-size: 11px; cursor: pointer;
}
.thumbs button.on { border-color: var(--or); background: var(--or); color: var(--paper); }

.buybox {
  flex: 1 1 380px; min-width: 0; border: 2px solid var(--or); border-radius: 22px;
  padding: clamp(18px, 3vw, 28px); display: flex; flex-direction: column; gap: 18px; background: var(--paper);
}
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge {
  border-radius: 999px; padding: 3px 10px; font-family: var(--display); font-weight: 800;
  font-size: 11px; letter-spacing: .04em; background: var(--gr); color: var(--bg);
}
.badge.line { background: transparent; border: 1.5px solid var(--gr); color: var(--gr); padding: 2px 10px; }
.product-title { font-size: clamp(44px, 7vw, 76px); }
.price { font-family: var(--display); font-weight: 800; font-size: 24px; color: var(--or); }
.desc { margin: 0; font-size: 15px; line-height: 1.65; text-wrap: pretty; }
.spacer { flex: 1; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.color-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.qty {
  display: flex; align-items: center; border: 2px solid var(--or); border-radius: 999px;
  height: 46px; overflow: hidden;
}
.qty button {
  width: 48px; height: 100%; border: 0; background: transparent; color: var(--or);
  font-size: 22px; font-weight: 700; cursor: pointer;
}
.qty output { min-width: 36px; text-align: center; font-family: var(--display); font-weight: 800; font-size: 17px; }
.total-label { font-size: 12px; color: #6B7A6F; text-align: right; }
.total { font-family: var(--display); font-weight: 900; font-size: 22px; text-align: right; }
.note-green { text-align: center; font-size: 12px; color: var(--gr); font-weight: 600; }
.load-error { color: var(--or); font-weight: 600; }

/* ---------- details ---------- */
.details { padding-top: clamp(48px, 8vw, 96px); padding-bottom: 24px; display: flex; flex-direction: column; gap: 28px; }
.details h2 { font-size: clamp(44px, 8vw, 96px); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.detail-img { aspect-ratio: 4 / 5; position: relative; border-radius: 22px; overflow: hidden; }
.detail-img > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* 베이스/포인트 드롭다운 (메인 사이트) */
.pickers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.picker { position: relative; display: flex; flex-direction: column; gap: 6px; }
.picker-label { font-family: var(--display); font-weight: 800; font-size: 11px; letter-spacing: .06em; color: var(--muted); }
.picker-btn {
  display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px; width: 100%;
  border: 2px solid var(--or); border-radius: 999px; background: var(--paper); color: var(--ink);
  font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; text-align: left;
}
.picker-btn[aria-expanded="true"] { border-color: var(--gr); background: var(--gr-soft); }
.picker-btn .swatch { width: 18px; height: 18px; }
.picker-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-chev { color: var(--or); font-size: 13px; }
.picker-list {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30;
  max-height: 280px; overflow-y: auto; padding: 6px;
  background: var(--paper); border: 2px solid var(--gr); border-radius: 16px;
  box-shadow: 0 10px 28px rgba(29, 59, 42, .18);
}
.picker-list button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 10px; border: 0; border-radius: 10px;
  background: none; color: var(--ink); font: inherit; font-size: 15px; cursor: pointer; text-align: left;
}
.picker-list button:hover { background: var(--bg); }
.picker-list button[aria-selected="true"] { background: var(--gr-soft); color: var(--gr); font-weight: 700; }
.picker-list button:disabled { color: var(--muted); cursor: default; background: none; }
.picker-list button:disabled .swatch { opacity: .35; }
.picker-list .sold { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--or); border: 1.5px solid var(--or-soft); border-radius: 999px; padding: 1px 8px; }
.picker-list .swatch { width: 18px; height: 18px; }

.made-note { margin: 2px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--bg); font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.made-note b { color: var(--ink); }
.made-note a { color: var(--gr); }

/* 앱 체험 데모 (메인 사이트 상세) — 화면은 390×844 로 그린 뒤 appdemo.js 가 휴대폰 크기에 맞춰 축소 */
.app-demo { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 28px 16px 20px; background: #fff; border-radius: 22px; }
.phone { width: min(300px, 100%); padding: 9px; border-radius: 46px; background: #F4F4F2; box-shadow: inset 0 0 0 1.5px #E2E2DE, 0 18px 40px rgba(29, 59, 42, .16), 0 2px 6px rgba(0, 0, 0, .08); }
.phone-screen { position: relative; aspect-ratio: 390 / 844; border-radius: 38px; overflow: hidden; background: #FAF9F6; }
.phone-screen iframe { position: absolute; top: 0; left: 0; width: 390px; height: 844px; border: 0; transform-origin: 0 0; }
.phone-tap { display: none; }
.app-demo-foot { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.phone-exit { border: 0; background: none; padding: 0; font: inherit; font-size: 12px; color: var(--gr); text-decoration: underline; cursor: pointer; }
/* 터치 화면: 처음엔 자동 시연 + 손가락은 페이지 스크롤, 탭하면 직접 조작 */
@media (hover: none) {
  .phone-tap {
    display: flex; position: absolute; inset: 0; align-items: flex-end; justify-content: center; padding-bottom: 18%;
    border: 0; background: transparent; cursor: pointer; touch-action: pan-y;
  }
  .phone-tap span { background: rgba(29, 59, 42, .82); color: #fff; font-size: 13px; font-weight: 700; padding: 9px 16px; border-radius: 999px; box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
  .phone-tap[hidden] { display: none; }
}

/* 3D 색 조합해보기 */
.color-lab { border: 2px solid var(--gr); border-radius: 22px; background: var(--paper); overflow: hidden; display: flex; flex-direction: column; }
.lab-stage { position: relative; flex: 1; min-height: 340px; background: #EFE8DA; }
.lab-stage model-viewer { position: absolute; inset: 0; width: 100%; height: 100%; --poster-color: transparent; }
.lab-tag {
  position: absolute; top: 14px; left: 14px; background: var(--gr); color: var(--paper); border-radius: 999px;
  padding: 3px 12px; font-family: var(--display); font-weight: 800; font-size: 12px; letter-spacing: .06em; pointer-events: none;
}
.lab-hint { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; font-size: 12px; color: var(--muted); pointer-events: none; }
.lab-controls { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; }
.lab-val { color: var(--gr); }
.lab-swatches { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.lab-sw { width: 34px; height: 34px; padding: 3px; border-radius: 50%; border: 2px solid transparent; background: none; cursor: pointer; }
.lab-sw span { display: block; width: 100%; height: 100%; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.lab-sw[aria-pressed="true"] { border-color: var(--ink); }
.card { border: 2px solid var(--or); border-radius: 22px; padding: 24px; background: var(--paper); display: flex; flex-direction: column; gap: 12px; }
.card h3 { margin: 0; font-family: var(--display); font-weight: 900; font-size: 22px; color: var(--or); text-transform: uppercase; }
.card p { margin: 0; font-size: 15px; line-height: 1.7; text-wrap: pretty; }
.specs { border: 2px solid var(--gr); border-radius: 22px; padding: 8px 24px; background: var(--paper); }
.specs div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1.5px solid var(--line); font-size: 14px; }
.specs div:last-child { border-bottom: 0; }
.specs dt { font-family: var(--display); font-weight: 800; color: var(--gr); letter-spacing: .04em; }
.specs dd { margin: 0; text-align: right; }

.infos {
  background: var(--gr); color: var(--bg); border-radius: 22px; padding: clamp(22px, 4vw, 36px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 24px;
}
.infos h4 { margin: 0 0 8px; font-family: var(--display); font-weight: 900; font-size: 18px; text-transform: uppercase; color: var(--peach); }
.infos p { margin: 0; font-size: 14px; line-height: 1.65; }

/* ---------- footer ---------- */
.footer { padding-top: 24px; padding-bottom: 32px; }
.footer-box {
  border: 2px solid var(--or); border-radius: 22px; padding: clamp(22px, 4vw, 36px);
  display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-end; background: var(--paper);
}
.footer-logo {
  font-family: var(--display); font-weight: 900; font-stretch: 115%; font-size: clamp(56px, 10vw, 110px);
  line-height: .8; letter-spacing: -.04em; color: var(--or);
}
.footer-info { font-size: 12px; line-height: 1.8; color: var(--muted); max-width: 440px; }

/* ---------- sticky buy bar (mobile) ---------- */
.sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: var(--bg); border-top: 2px solid var(--or);
  transform: translateY(calc(100% + 4px)); transition: transform .3s ease; pointer-events: none;
}
.sticky.show { transform: none; pointer-events: auto; }
.sticky .btn-primary { height: 52px; font-size: 16px; padding: 0 22px; }

/* ---------- checkout sheet ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 50; background: rgba(29, 59, 42, .45);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; transition: opacity .3s ease;
}
.overlay.open { opacity: 1; }
.sheet {
  width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; background: var(--bg);
  border: 2px solid var(--or); border-radius: 22px;
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 18px;
  transform: translateY(32px); transition: transform .3s ease;
}
.overlay.open .sheet { transform: none; }
/* 내용이 길어 스크롤될 때 버튼 등이 납작하게 눌리지 않도록 */
.sheet > * { flex-shrink: 0; }
@media (max-width: 759px) {
  .overlay { align-items: flex-end; padding: 0; }
  .sheet { border-radius: 22px 22px 0 0; transform: translateY(100%); }
}
/* 움직임 줄이기 설정을 켠 사용자에게는 애니메이션 없이 */
@media (prefers-reduced-motion: reduce) {
  .sticky, .overlay, .sheet { transition: none; }
}
.sheet-title { font-size: 34px; line-height: 1; }
.close-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--or); background: transparent;
  color: var(--or); font-size: 18px; font-weight: 700; cursor: pointer; flex: none;
}
.summary { background: var(--paper); border-radius: 16px; padding: 14px; display: flex; gap: 12px; align-items: center; }
.summary-swatch { width: 52px; height: 52px; border-radius: 12px; border: 1.5px solid var(--ink); flex: none; }
.summary-name { font-family: var(--display); font-weight: 800; font-size: 15px; text-transform: uppercase; }
.summary-sub { font-size: 13px; color: var(--muted); }
.summary-price { font-family: var(--display); font-weight: 900; font-size: 17px; margin-left: auto; }
.field-group { display: flex; flex-direction: column; gap: 8px; }
.input {
  height: 48px; border-radius: 12px; border: 2px solid var(--line); background: var(--paper);
  padding: 0 14px; font: inherit; font-size: 15px; color: var(--ink); outline: none; width: 100%; min-width: 0;
}
.input:focus { border-color: var(--gr); }
.input.bad { border-color: var(--or); }
.input[readonly] { background: #F3EEE3; cursor: pointer; }
.zip-row { display: flex; gap: 6px; }
.zip-row .input { flex: 1; }
.zip-btn {
  flex: none; height: 48px; border-radius: 12px; border: 2px solid var(--gr); background: var(--gr-soft);
  color: var(--gr); font-weight: 700; font-size: 14px; padding: 0 14px; cursor: pointer;
}
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; cursor: pointer; line-height: 1.5; }
.agree input { width: 20px; height: 20px; accent-color: var(--gr); margin: 0; flex: none; }
.agree.bad { color: var(--or); }
.agree-detail { font-size: 12px; color: var(--muted); }
.agree-detail summary { cursor: pointer; }
.agree-detail table { border-collapse: collapse; margin-top: 8px; width: 100%; }
.agree-detail th, .agree-detail td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.agree-detail th { background: var(--paper); white-space: nowrap; }
.toss-box { background: #fff; border-radius: 16px; overflow: hidden; min-height: 120px; }
.form-error { color: var(--or); font-size: 14px; font-weight: 600; margin: 0; }

/* ---------- simple pages (success / fail / order) ---------- */
.page { max-width: 560px; margin: 0 auto; padding: 24px 16px 48px; display: flex; flex-direction: column; gap: 18px; }
.page-title { font-size: clamp(40px, 9vw, 56px); }
.panel { background: var(--paper); border: 2px solid var(--or); border-radius: 22px; padding: 22px 20px; display: flex; flex-direction: column; gap: 14px; }
.order-no-box { background: var(--gr); color: var(--bg); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.order-no-box .label { color: var(--peach); }
.order-no { font-family: var(--mono); font-size: 20px; word-break: break-all; }
.kv { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; padding: 10px 0; border-bottom: 1.5px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); flex: none; }
.kv dd { margin: 0; text-align: right; word-break: break-all; }
.muted { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 0; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.steps div {
  text-align: center; padding: 10px 4px; border-radius: 999px; border: 2px solid var(--line);
  font-size: 13px; font-weight: 700; color: #A99F8B;
}
.steps div.done { border-color: var(--gr); background: var(--gr-soft); color: var(--gr); }
.status-canceled { text-align: center; padding: 12px; border-radius: 999px; background: #F3E2DA; color: var(--or); font-weight: 700; }
.copy-row { display: flex; gap: 6px; }
.copy-row .input { flex: 1; font-size: 12px; font-family: var(--mono); }
.recent { display: flex; flex-wrap: wrap; gap: 6px; }
.recent button { font-family: var(--mono); font-size: 13px; }

/* ---------- footer links / policy pages ---------- */
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 8px; }
.footer-links a { color: var(--ink); text-decoration: none; }
.footer-links a:hover { color: var(--or); text-decoration: underline; }
.policy { max-width: 760px; }
.policy .panel { gap: 0; font-size: 14px; line-height: 1.75; }
.policy h2 { margin: 22px 0 6px; font-size: 16px; color: var(--ink); }
.policy h2:first-child { margin-top: 0; }
.policy p, .policy ol, .policy ul { margin: 0 0 8px; }
.policy ol, .policy ul { padding-left: 20px; }
.policy table { border-collapse: collapse; width: 100%; margin: 4px 0 8px; font-size: 13px; }
.policy th, .policy td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.policy th { background: var(--bg); white-space: nowrap; }
.policy .table-scroll { overflow-x: auto; margin: 4px 0 8px; }
.policy .table-scroll table { margin: 0; min-width: 560px; }
.policy-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.policy-tabs a.on { background: var(--or); color: var(--paper); }
