/* 바이크 닥터 통합몰 — 데모 스타일시트
   외부 폰트/이미지 없음. 이미지 자리는 CSS 그라디언트 플레이스홀더. */

:root {
  --page: #F3F5F7;
  --surface: #FFFFFF;
  --surface-2: #FAFBFC;
  --ink: #151C24;
  --ink-2: #3C4854;
  --muted: #5C6875;   /* 2026-08-31 #6B7784→#5C6875: 틴트 배경(#EEF1F4·#F3F5F7·#FAFBFC) 위에서도 4.5:1 이상 (최저 5.02:1) */
  --line: #E1E6EB;
  --line-strong: #C9D1D9;

  --navy: #16232F;
  --navy-2: #22354A;
  /* 브랜드 옐로 — 역할별 토큰. 옐로는 채움 전용이며 밝은 배경 위 글자색으로 쓰지 않는다
     (#F9CA12 on #FFF = 1.56:1). 채움 위 글자는 --signal-ink, 밝은 배경 위 옐로 계열 글자는 --signal-text. */
  --signal: #F9CA12;        /* 채움: CTA · 활성 칩 · 배지 · 장식 바/점 (brand/README.md Signal) */
  --signal-ink: #172331;    /* signal 채움 위 글자 (10.21:1) */
  --signal-text: #765800;   /* 밝은 배경 위 옐로 계열 글자·테두리 (흰색 6.63:1 · page 6.07:1) */
  --signal-soft: #FDEDB9;   /* 틴트 배경 (badge-warn) */
  --signal-hover: #E5B800;  /* CTA hover/눌림 채움 (잉크 글자 8.47:1) */
  --danger: #B3261E;
  --danger-soft: #FBECEA;
  --ok: #1C6B45;
  --ok-soft: #E9F4EE;
  --info: #1C5C93;
  --info-soft: #E9F1F8;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(21, 28, 36, .06), 0 4px 14px rgba(21, 28, 36, .05);
  --maxw: 1280px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--page);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
button { font-family: inherit; font-size: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; letter-spacing: -.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- 헤더 ---------- */
.site-header {
  background: var(--navy);
  color: #EDF1F5;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .2);
}
.header-row {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 62px;
}
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-mark {
  width: 34px; height: 34px;
  display: block;
  flex: none;
  object-fit: contain;
}
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.brand-sub { display: block; font-size: 11px; color: #9BAAB8; font-weight: 500; letter-spacing: .02em; }

.main-nav { display: flex; gap: 4px; margin-left: 8px; flex: 1; }
.main-nav a {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: #C6D2DD;
}
.main-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.main-nav a.on { background: rgba(255, 255, 255, .12); color: #fff; }

.header-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.bike-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .16);
  color: #E6EDF3;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.bike-pill:hover { background: rgba(255, 255, 255, .18); }
.bike-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); flex: none; }
.bike-pill.unset .dot { background: #7D8A97; }

.cart-btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--signal);
  color: var(--signal-ink);
  border: 0;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.cart-count {
  background: var(--signal-ink);
  color: var(--signal);
  border-radius: 999px;
  padding: 0 7px;
  font-size: 12px;
  min-width: 20px;
  text-align: center;
}

/* ---------- 내 바이크 선택 바 ---------- */
.fitbar { background: #1E2E3D; color: #DCE5EC; border-top: 1px solid rgba(255,255,255,.07); }
.fitbar-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 0; }
.fitbar-label { font-size: 13px; font-weight: 700; color: #9FB0BF; flex: none; }
.bike-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.bike-chip {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .14);
  color: #D3DDE6;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.bike-chip:hover { background: rgba(255, 255, 255, .14); }
.bike-chip.on { background: var(--signal); border-color: var(--signal); color: var(--signal-ink); }
.fitbar-note { font-size: 12px; color: #8FA0AF; margin-left: auto; }

/* ---------- 공통 블록 ---------- */
main { padding: 28px 0 56px; }
.section { margin-bottom: 40px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 14px; flex-wrap: wrap;
}
.section-head h2 { font-size: 20px; font-weight: 700; }
.section-head .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.more-link { font-size: 13px; font-weight: 600; color: var(--info); }
.more-link:hover { text-decoration: underline; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span { margin: 0 6px; color: var(--line-strong); }

/* ---------- 배지 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--signal-soft); color: var(--signal-text); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-mute { background: #EEF1F4; color: var(--muted); }
.badge-solid { background: var(--navy); color: #fff; }

/* ---------- 히어로 ---------- */
.hero {
  background: linear-gradient(135deg, #16232F 0%, #24384C 60%, #2E4A63 100%);
  color: #EAF0F5;
  border-radius: 14px;
  padding: 32px;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 28px;
  margin-bottom: 40px;
}
.hero h1 { font-size: 27px; font-weight: 700; margin-bottom: 10px; }
.hero p.lead { color: #B7C6D3; font-size: 15px; max-width: 46ch; }
.hero-points { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.hero-point {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
}
.hero-point b { display: block; font-size: 13px; color: #fff; margin-bottom: 2px; }
.hero-point span { color: #A9BBC9; font-size: 12px; }

.hero-panel {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius);
  padding: 18px;
}
.hero-panel h3 { font-size: 14px; color: #A9BBC9; font-weight: 700; margin-bottom: 12px; }
.hero-bike-name { font-size: 18px; font-weight: 700; color: #fff; }
.hero-bike-meta { font-size: 13px; color: #9EB0BF; margin-top: 4px; }
.hero-select { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.hero-select button {
  text-align: left;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .14);
  color: #DBE4EB;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}
.hero-select button:hover { background: rgba(255, 255, 255, .15); }
.hero-select button.on { background: var(--signal); border-color: var(--signal); color: var(--signal-ink); }

/* ---------- 그리드 ---------- */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

/* ---------- 이미지 플레이스홀더 ---------- */
.ph {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: linear-gradient(140deg, hsl(var(--h), 30%, 88%), hsl(var(--h), 24%, 72%));
  display: grid;
  place-items: center;
}
.ph::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(115deg, rgba(255,255,255,.18) 0 12px, rgba(255,255,255,0) 12px 30px);
}
.ph-ring {
  width: 54%; aspect-ratio: 1; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .55);
  background: radial-gradient(circle at 34% 30%, rgba(255,255,255,.5), rgba(255,255,255,0) 62%);
  position: relative; z-index: 1;
}
.ph-tag {
  position: absolute; z-index: 2; bottom: 8px; left: 8px;
  background: rgba(21, 28, 36, .72);
  color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px;
}
.ph-card { aspect-ratio: 4 / 3; }
.ph-lg { aspect-ratio: 4 / 3; border-radius: var(--radius); }

/* ---------- 상품 카드 ---------- */
.pcard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow);
  transition: border-color .12s ease, transform .12s ease;
}
a.pcard:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.pcard.incompatible { opacity: .55; filter: grayscale(1); }
.pcard-brand { font-size: 12px; color: var(--muted); font-weight: 600; }
.pcard-name { font-size: 14px; font-weight: 700; line-height: 1.45; min-height: 2.9em; }
.pcard-fit { display: flex; gap: 6px; flex-wrap: wrap; }

.price-split { border-top: 1px dashed var(--line); padding-top: 9px; }
.price-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--ink-2); }
.price-row + .price-row { margin-top: 3px; }
.price-row .k { color: var(--muted); }
.price-row .v { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price-row.total { border-top: 1px solid var(--line); margin-top: 7px; padding-top: 7px; font-size: 14px; }
.price-row.total .v { font-size: 16px; }
.price-main { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.labor-tag { font-size: 12px; color: var(--signal-text); font-weight: 700; }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  min-height: 42px;
}
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); }
.btn-accent { background: var(--signal); border-color: var(--signal); color: var(--signal-ink); }
.btn-accent:hover { background: var(--signal-hover); border-color: var(--signal-hover); }
.btn-block { width: 100%; }
.btn-lg { min-height: 50px; font-size: 15px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-ghost { background: transparent; border-color: var(--line-strong); }

/* ---------- 필터 사이드바 ---------- */
.list-layout { display: grid; grid-template-columns: 250px 1fr; gap: 24px; align-items: start; }
.filters { position: sticky; top: 78px; }
.filter-group { border-bottom: 1px solid var(--line); padding: 14px 16px; }
.filter-group:last-child { border-bottom: 0; }
.filter-group h4 { font-size: 13px; font-weight: 700; margin-bottom: 9px; color: var(--ink-2); }
.filter-opt {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; padding: 4px 0; cursor: pointer; color: var(--ink-2);
}
.filter-opt input { width: 16px; height: 16px; accent-color: var(--navy); cursor: pointer; }
.filter-head {
  padding: 14px 16px; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
}
.filter-head h3 { font-size: 14px; font-weight: 700; }
.filter-reset { font-size: 12px; color: var(--info); background: none; border: 0; cursor: pointer; font-weight: 600; }

.list-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-bottom: 14px; flex-wrap: wrap;
}
.result-count { font-size: 14px; color: var(--ink-2); }
.result-count b { font-weight: 800; }
.sort-select {
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 8px 10px; background: var(--surface); font-size: 13px; font-weight: 600; cursor: pointer;
  min-height: 38px;
}

/* ---------- 호환 배너 ---------- */
.fit-banner {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-radius: var(--radius);
  border: 1px solid; margin-bottom: 18px;
}
.fit-banner .fb-icon {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 800; font-size: 15px; color: #fff;
}
.fit-banner b { display: block; font-size: 15px; }
.fit-banner p { font-size: 13px; margin-top: 2px; }
.fit-ok { background: var(--ok-soft); border-color: #BFDDCD; color: var(--ok); }
.fit-ok .fb-icon { background: var(--ok); }
.fit-no { background: var(--danger-soft); border-color: #EBC7C3; color: var(--danger); }
.fit-no .fb-icon { background: var(--danger); }
.fit-unknown { background: var(--info-soft); border-color: #C6DCEE; color: var(--info); }
.fit-unknown .fb-icon { background: var(--info); }
.fit-banner .fb-body { flex: 1; }
.fit-banner .btn { margin-top: 10px; }

/* ---------- PDP ---------- */
.pdp { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.pdp-title { font-size: 24px; font-weight: 700; margin: 6px 0 8px; }
.pdp-brand { font-size: 13px; color: var(--muted); font-weight: 600; }
.pdp-summary { color: var(--ink-2); font-size: 14px; margin-bottom: 18px; }

.price-box { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.price-box-head {
  background: var(--surface-2); padding: 10px 16px;
  font-size: 12px; font-weight: 700; color: var(--muted);
  border-bottom: 1px solid var(--line); letter-spacing: .02em;
}
.price-box-body { padding: 14px 16px; }
.pline { display: flex; justify-content: space-between; align-items: baseline; padding: 5px 0; }
.pline .k { font-size: 14px; color: var(--ink-2); min-width: 0; }
.pline .k small { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.pline .v { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pline.sum { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; }
.pline.sum .v { font-size: 22px; font-weight: 800; }
.pline.muted .v { color: var(--muted); }

.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0 0; }
.mode-opt {
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  cursor: pointer;
  background: var(--surface);
  text-align: left;
}
.mode-opt b { display: block; font-size: 14px; font-weight: 700; }
.mode-opt span { font-size: 12px; color: var(--muted); }
.mode-opt.on { border-color: var(--navy); background: #F2F6FA; box-shadow: inset 0 0 0 1px var(--navy); }
.mode-opt:disabled { opacity: .5; cursor: not-allowed; }

.slot-block { margin-top: 16px; }
.slot-block h4 { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.slot-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.slot {
  border: 1px solid var(--line-strong); background: var(--surface);
  border-radius: var(--radius-sm); padding: 8px 11px;
  font-size: 13px; font-weight: 600; cursor: pointer; min-height: 38px;
}
.slot:hover { background: var(--surface-2); }
.slot.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.slot.full { opacity: .4; text-decoration: line-through; cursor: not-allowed; }

.stock-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.stock-table th, .stock-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.stock-table th { font-size: 12px; color: var(--muted); font-weight: 700; background: var(--surface-2); }
.stock-table td:last-child, .stock-table th:last-child { text-align: right; }

.spec-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.spec-table th {
  text-align: left; width: 140px; padding: 10px 14px;
  background: var(--surface-2); color: var(--ink-2); font-weight: 600;
  border-bottom: 1px solid var(--line); font-size: 13px;
}
.spec-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); }

.review { border-bottom: 1px solid var(--line); padding: 14px 0; }
.review:last-child { border-bottom: 0; }
.review-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 5px; }
.review-user { font-weight: 700; font-size: 14px; }
.review-meta { font-size: 12px; color: var(--muted); }
.stars { color: var(--signal-text); font-size: 13px; letter-spacing: .06em; }
.review p { font-size: 14px; color: var(--ink-2); }

/* ---------- 패키지 ---------- */
.pkg-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow);
}
.pkg-card .pkg-name { font-size: 16px; font-weight: 700; }
.pkg-card > .btn { margin-top: auto; }
.pkg-card .pkg-total { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pkg-card .pkg-total small { font-size: 13px; font-weight: 600; color: var(--muted); }
.pkg-inc { font-size: 13px; color: var(--ink-2); display: flex; flex-direction: column; gap: 5px; }
.pkg-inc li { display: flex; gap: 7px; align-items: flex-start; }
.pkg-inc li::before { content: "✓"; color: var(--ok); font-weight: 800; flex: none; }

.checklist { display: flex; flex-direction: column; gap: 2px; }
.checklist li {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px;
}
.checklist li:last-child { border-bottom: 0; }
.check-mark {
  width: 20px; height: 20px; border-radius: 50%; background: var(--ok-soft); color: var(--ok);
  display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: none; margin-top: 1px;
}

/* ---------- 중고 ---------- */
.used-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: border-color .12s ease, transform .12s ease;
}
a.used-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.used-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.used-model { font-size: 16px; font-weight: 700; }
.used-meta { font-size: 13px; color: var(--muted); }
.used-price { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: auto; }
.used-tags { display: flex; gap: 5px; flex-wrap: wrap; }

.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px;
  width: 2px; background: var(--line);
}
.tl-item { position: relative; padding: 0 0 20px 0; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: -22px; top: 5px;
  width: 14px; height: 14px; border-radius: 50%;
  border: 3px solid var(--surface);
  background: var(--line-strong);
  box-shadow: 0 0 0 1px var(--line-strong);
}
.tl-item.verified .tl-dot { background: var(--ok); box-shadow: 0 0 0 1px var(--ok); }
.tl-date { font-size: 12px; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.tl-title { font-size: 14px; font-weight: 700; margin: 2px 0 4px; }
.tl-sign { font-size: 12px; color: var(--muted); }
.tl-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; }

.dvi-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px;
}
.dvi-row:last-child { border-bottom: 0; }
.dvi-name { flex: 1; font-weight: 600; }
.dvi-memo { font-size: 12px; color: var(--muted); font-weight: 500; display: block; }

/* ---------- 장바구니 ---------- */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.cart-item { display: grid; grid-template-columns: 92px 1fr auto; gap: 14px; padding: 16px; border-bottom: 1px solid var(--line); }
.cart-item:last-child { border-bottom: 0; }
.cart-item .ph { width: 92px; height: 74px; }
.cart-name { font-weight: 700; font-size: 15px; }
.cart-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.cart-lines { margin-top: 8px; font-size: 13px; display: flex; flex-direction: column; gap: 3px; }
.cart-line { display: flex; gap: 8px; }
.cart-line .k { color: var(--muted); min-width: 74px; }
.cart-line .v { font-weight: 700; font-variant-numeric: tabular-nums; }
.cart-right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.qty button { width: 34px; height: 34px; border: 0; background: var(--surface); cursor: pointer; font-weight: 800; color: var(--ink-2); }
.qty button:hover { background: var(--surface-2); }
.qty span { width: 36px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.link-danger { background: none; border: 0; color: var(--danger); font-size: 13px; font-weight: 600; cursor: pointer; padding: 0; }
.link-danger:hover { text-decoration: underline; }

.summary-box { position: sticky; top: 78px; }
.summary-box .sb-head { padding: 14px 16px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 15px; }
.summary-box .sb-body { padding: 16px; }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty h3 { font-size: 17px; color: var(--ink); margin-bottom: 6px; }

/* ---------- 체크아웃 ---------- */
.checkout-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-row label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.form-row input, .form-row select, .form-row textarea {
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: 14px; font-family: inherit; background: var(--surface);
  min-height: 42px;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { outline: 2px solid var(--info); outline-offset: -1px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

.notice {
  background: var(--info-soft); border: 1px solid #C6DCEE; color: #17456E;
  border-radius: var(--radius); padding: 14px 16px; font-size: 13px;
}
.notice b { display: block; margin-bottom: 3px; font-size: 14px; }

.done-hero { text-align: center; padding: 34px 24px 26px; }
.done-mark {
  width: 58px; height: 58px; border-radius: 50%; background: var(--ok); color: #fff;
  display: grid; place-items: center; font-size: 27px; margin: 0 auto 14px;
}
.done-hero h1 { font-size: 22px; margin-bottom: 6px; }
.done-hero p { color: var(--muted); font-size: 14px; }
.order-no {
  display: inline-block; margin-top: 14px;
  background: var(--surface-2); border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm); padding: 9px 16px;
  font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; letter-spacing: .04em;
}

.kv-list { display: flex; flex-direction: column; }
.kv { display: flex; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv .k { width: 116px; color: var(--muted); font-weight: 600; flex: none; }
.kv .k.wide { width: 152px; white-space: nowrap; }
.kv .v { font-weight: 600; }

/* ---------- 정보 카드 ---------- */
.info-card { padding: 18px; }
.info-card h3 { font-size: 16px; margin-bottom: 8px; }
.info-card p { font-size: 14px; color: var(--ink-2); }
.center-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.center-item:last-child { border-bottom: 0; }
.center-name { font-weight: 700; font-size: 14px; }
.center-meta { font-size: 13px; color: var(--muted); }

.pad { padding: 18px; }
.pad-sm { padding: 14px 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }

/* ---------- 푸터 / 데모 고지 ---------- */
.demo-strip {
  background: #2A2018; color: #F0DCC4;
  border-top: 1px solid #4A3A2A;
  font-size: 13px; font-weight: 600;
  padding: 10px 0;
}
.demo-strip .wrap { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.demo-strip .tagmark {
  background: var(--signal); color: var(--signal-ink); border-radius: var(--radius-sm);
  padding: 2px 9px; font-size: 12px; font-weight: 800;
}
.site-footer { background: var(--navy); color: #93A5B4; padding: 26px 0 34px; font-size: 13px; }
.footer-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer b { color: #D7E1E9; display: block; margin-bottom: 6px; font-size: 14px; }
.footer-brand { display: flex; gap: 16px; align-items: flex-start; }
.footer-logo { width: 96px; height: 96px; flex: none; display: block; object-fit: contain; }
.site-footer li { padding: 2px 0; }
.site-footer a:hover { color: #fff; }

/* ---------- 반응형 ---------- */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .list-layout { grid-template-columns: 210px 1fr; }
  .cart-layout, .checkout-layout { grid-template-columns: 1fr 300px; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 24px; }
  .pdp { grid-template-columns: 1fr; gap: 22px; }
  .list-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
  .summary-box { position: static; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .main-nav { display: none; }
}
@media (max-width: 620px) {
  .wrap { padding: 0 14px; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .header-row { height: auto; padding: 10px 0; flex-wrap: wrap; gap: 10px; }
  .brand { flex: 1; }
  .header-actions { width: 100%; }
  .bike-pill { flex: 1; justify-content: center; }
  .hero h1 { font-size: 22px; }
  .form-grid { grid-template-columns: 1fr; }
  .mode-switch { grid-template-columns: 1fr; }
  .cart-item { grid-template-columns: 68px 1fr; }
  .cart-item .ph { width: 68px; height: 56px; }
  .cart-right { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
  .fitbar-note { margin-left: 0; }
  .spec-table th { width: 104px; }
}

/* ============================================================
   모션 · 인터랙션 레이어 (2026-08-31 추가)
   원칙: transform / opacity 만 사용. 이동량 12px 이내.
        모든 모션은 <html class="motion-ready"> 가 붙었을 때만 동작.
        prefers-reduced-motion: reduce 이면 motion-ready 를 붙이지 않으므로
        정보·상태는 즉시·동일하게 표시된다.
   ============================================================ */

:root {
  /* 모션 토큰 */
  --dur-micro: 120ms;   /* 눌림 · 캐럿 등 즉각 피드백 */
  --dur-ui: 180ms;      /* 표준: 카드 · 버튼 색/그림자/transform (160~200ms) */
  --dur-reveal: 260ms;  /* 섹션 진입 reveal */
  --dur-panel: 240ms;   /* 아코디언 · 패널 펼침 */
  --ease: cubic-bezier(.22, .68, 0, 1);
  --ease-soft: cubic-bezier(.33, 1, .68, 1);
  --stagger: 45ms;      /* 계단식 지연 1칸 */
  --lift: -2px;
  --shadow-lift: 0 2px 4px rgba(21, 28, 36, .07), 0 10px 24px rgba(21, 28, 36, .10);
  --reveal-shift: 12px; /* 진입 이동량 상한 */
}

/* ---------- 앵커 이동 ---------- */
html { scroll-behavior: auto; }
.motion-ready { scroll-behavior: smooth; }
.section, .fitbar, .hero, [id] { scroll-margin-top: 96px; }

/* ---------- 섹션 진입 reveal (1회) ---------- */
.motion-ready [data-reveal] { opacity: 0; will-change: opacity, transform; }
.motion-ready [data-reveal="up"],
.motion-ready [data-reveal="item"] {
  transform: translate3d(0, var(--reveal-shift), 0);
  transition:
    opacity var(--dur-reveal) var(--ease-soft) calc(var(--i, 0) * var(--stagger)),
    transform var(--dur-reveal) var(--ease) calc(var(--i, 0) * var(--stagger));
}
.motion-ready [data-reveal="banner"] {
  transform: translate3d(0, 8px, 0) scale(.985);
  transition:
    opacity var(--dur-reveal) var(--ease-soft),
    transform var(--dur-reveal) var(--ease);
}
.motion-ready [data-reveal].is-visible {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* 호환 배너 강조: 진입 직후 테두리 링이 한 번 번졌다 사라짐 */
.fit-banner { position: relative; }
.fit-banner::after {
  content: "";
  position: absolute; inset: -1px;
  border-radius: var(--radius);
  border: 2px solid currentColor;
  opacity: 0;
  pointer-events: none;
}
.motion-ready .fit-banner[data-reveal].is-visible::after {
  animation: bdRing 620ms var(--ease-soft) 160ms 1;
}
@keyframes bdRing {
  0%   { opacity: 0;   transform: scale(1); }
  35%  { opacity: .55; transform: scale(1); }
  100% { opacity: 0;   transform: scale(1.012); }
}

/* ---------- 카드 · 버튼 전환 통일 (180ms) ---------- */
.pcard, .used-card, .pkg-card, .card {
  transition:
    border-color var(--dur-ui) var(--ease-soft),
    box-shadow var(--dur-ui) var(--ease-soft),
    transform var(--dur-ui) var(--ease);
}
a.pcard:hover, a.used-card:hover, a.pkg-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lift);
  transform: translateY(var(--lift));
}
a.pcard:active, a.used-card:active, a.pkg-card:active { transform: translateY(0); }
.pcard.incompatible { transition: opacity var(--dur-ui) var(--ease-soft), filter var(--dur-ui) var(--ease-soft); }

.btn, .slot, .mode-opt, .bike-chip, .bike-pill, .cart-btn, .sort-select, .filter-reset, .more-link {
  transition:
    background-color var(--dur-ui) var(--ease-soft),
    border-color var(--dur-ui) var(--ease-soft),
    color var(--dur-ui) var(--ease-soft),
    box-shadow var(--dur-ui) var(--ease-soft),
    transform var(--dur-micro) var(--ease);
}
.btn:not(:disabled):active,
.slot:not(:disabled):active,
.mode-opt:not(:disabled):active,
.bike-chip:active { transform: translateY(1px); }
.btn-primary:hover, .btn-accent:hover { box-shadow: var(--shadow-lift); }

.main-nav a { transition: background-color var(--dur-ui) var(--ease-soft), color var(--dur-ui) var(--ease-soft); }
.filter-opt { transition: color var(--dur-ui) var(--ease-soft); }
.filter-opt:hover { color: var(--ink); }

/* 키보드 포커스는 모션과 무관하게 항상 보이게 */
.btn:focus-visible, .slot:focus-visible, .mode-opt:focus-visible,
.bike-chip:focus-visible, .cart-btn:focus-visible, .acc-head:focus-visible,
a.pcard:focus-visible, a.used-card:focus-visible, a.pkg-card:focus-visible {
  outline: 2px solid var(--info);
  outline-offset: 2px;
}

/* ---------- 스크롤 진행 표시 (현재 위치) ---------- */
.scroll-prog {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px;
  background: rgba(255, 255, 255, .08);
  overflow: hidden;
}
.scroll-prog span {
  display: block; height: 100%;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* ---------- 헤더 장바구니 배지 펄스 ---------- */
.cart-count { transition: background-color var(--dur-ui) var(--ease-soft); display: inline-block; }
.motion-ready .cart-count.bump { animation: bdBump 420ms var(--ease) 1; }
@keyframes bdBump {
  0%   { transform: scale(1); }
  38%  { transform: scale(1.32); }
  70%  { transform: scale(.96); }
  100% { transform: scale(1); }
}
/* 링은 box-shadow 로만 그린다 — 레이아웃·스크롤 폭에 영향을 주지 않는다.
   (가상 요소를 버튼 밖으로 내밀면 375px 헤더에서 가로 스크롤이 생긴다) */
.cart-btn.bump { background: var(--signal-hover); }
.motion-ready .cart-btn.bump { animation: bdRipple 560ms var(--ease-soft) 1; }
@keyframes bdRipple {
  0%   { box-shadow: 0 0 0 0 rgba(249, 202, 18, .55); }
  100% { box-shadow: 0 0 0 9px rgba(249, 202, 18, 0); }
}

/* 담기 버튼 성공 상태 — 문구·너비는 그대로 두고 색만 바뀐다.
   (글리프를 넣으면 375px 에서 버튼 콘텐츠가 넘쳐 가로 스크롤이 생긴다) */
.btn.is-added { background: var(--ok); border-color: var(--ok); color: #fff; }
.motion-ready .btn.is-added { animation: bdPop 300ms var(--ease) 1; }
@keyframes bdPop {
  0%   { transform: scale(.985); }
  55%  { transform: scale(1.012); }
  100% { transform: scale(1); }
}

/* ---------- PDP: 부품가 / 공임 분리 영역 강화 ---------- */
.price-box { transition: box-shadow var(--dur-ui) var(--ease-soft); }
.price-box-body .pline { position: relative; padding-left: 10px; }
.price-box-body .pline::before {
  content: "";
  position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 3px; border-radius: 2px;
  background: var(--line);
}
.price-box-body .pline:nth-of-type(1)::before { background: var(--navy); }
.price-box-body .pline:nth-of-type(2)::before { background: var(--signal); }
.price-box-body .pline.muted::before { background: var(--line-strong); }
.price-box-body .pline.sum {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 12px 12px 12px 10px;
}
.price-box-body .pline.sum::before { background: linear-gradient(180deg, var(--navy), var(--signal)); }
/* 금액이 바뀌면 값만 한 번 깜빡 */
.motion-ready .pline .v.flash { animation: bdFlash 460ms var(--ease-soft) 1; }
@keyframes bdFlash {
  0%   { transform: translate3d(0, 4px, 0); opacity: .25; }
  100% { transform: none; opacity: 1; }
}

/* 배송만 / 센터 장착 전환 */
.mode-opt { position: relative; overflow: hidden; }
.mode-opt.on { border-color: var(--navy); background: #F2F6FA; }
.motion-ready .mode-opt.on { animation: bdModeOn var(--dur-ui) var(--ease) 1; }
@keyframes bdModeOn {
  0%   { transform: scale(.985); }
  100% { transform: scale(1); }
}
/* 예약 슬롯 블록은 센터 장착일 때만 노출 — 나타날 때 한 번 미끄러져 들어옴 */
.motion-ready .slot-block:not([hidden]) { animation: bdPanelIn var(--dur-panel) var(--ease) 1; }
@keyframes bdPanelIn {
  0%   { opacity: 0; transform: translate3d(0, -6px, 0); }
  100% { opacity: 1; transform: none; }
}
.motion-ready .slot.on { animation: bdModeOn var(--dur-micro) var(--ease) 1; }

/* ---------- 인증중고: 타임라인 · DVI 아코디언 ---------- */
.motion-ready .timeline .tl-item[data-reveal] .tl-dot { transition: transform var(--dur-ui) var(--ease) calc(var(--i, 0) * var(--stagger) + 80ms); transform: scale(.4); }
.motion-ready .timeline .tl-item[data-reveal].is-visible .tl-dot { transform: scale(1); }

.acc { border: 0; }
.acc-head {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-weight: 700; font-size: 14px; color: var(--ink);
  cursor: pointer; min-height: 46px; text-align: left;
  transition: background-color var(--dur-ui) var(--ease-soft), border-color var(--dur-ui) var(--ease-soft);
}
.acc-head:hover { background: #F1F4F7; border-color: var(--line-strong); }
.acc-caret { color: var(--muted); font-size: 12px; transition: transform var(--dur-panel) var(--ease); display: inline-block; }
.acc.is-open .acc-caret { transform: rotate(180deg); }
.acc-panel { display: grid; grid-template-rows: 1fr; transition: grid-template-rows var(--dur-panel) var(--ease-soft); }
.acc:not(.is-open) .acc-panel { grid-template-rows: 0fr; }
.acc-inner { overflow: hidden; min-height: 0; }
.acc-inner > .card { border-top-left-radius: 0; border-top-right-radius: 0; border-top: 0; }

/* ---------- 주문 확정: 체크마크 ---------- */
.motion-ready .done-mark { animation: bdDone 480ms var(--ease) 1; }
@keyframes bdDone {
  0%   { transform: scale(.6); opacity: 0; }
  60%  { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.motion-ready .order-no { animation: bdFlash 520ms var(--ease-soft) 220ms both; }

/* ---------- PDP 하단 고정 구매 바 ---------- */
.buybar {
  position: fixed; left: 0; bottom: 0;
  width: 100%; max-width: 100vw;
  overflow: hidden;
  z-index: 50;
  background: rgba(22, 35, 47, .97);
  border-top: 1px solid rgba(255, 255, 255, .12);
  color: #EAF0F5;
  padding: 10px 0;
  transform: translate3d(0, 110%, 0);
  opacity: 0;
  pointer-events: none;
}
.motion-ready .buybar {
  transition: transform var(--dur-ui) var(--ease), opacity var(--dur-ui) var(--ease-soft);
}
.buybar.on { transform: none; opacity: 1; pointer-events: auto; }
.buybar .wrap { display: flex; align-items: center; gap: 14px; }
.buybar .bb-info { min-width: 0; flex: 1; }
.buybar .bb-name {
  display: block; font-size: 13px; font-weight: 700; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.buybar .bb-sum { display: block; font-size: 12px; color: #A9BBC9; }
.buybar .bb-sum b { color: #fff; font-size: 15px; font-variant-numeric: tabular-nums; }
.buybar .btn { flex: none; min-width: 150px; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html, .motion-ready { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .timeline .tl-item .tl-dot { transform: none !important; }
  .buybar { transition: none !important; }
}

@media (max-width: 620px) {
  .buybar .btn { min-width: 118px; }
  .buybar .wrap { gap: 10px; }
  .buybar .bb-name { font-size: 12px; }
  .section, .fitbar, .hero, [id] { scroll-margin-top: 140px; }
}

/* ============================================================
   디자인 에셋 통합 (2026-08-31)
   - 이미지는 그라디언트 플레이스홀더 "위에" 얹는다. 실패하면 app.js 가
     img 를 제거하고 .has-img 를 떼므로 그라디언트가 그대로 남는다.
   - .ph 계열은 전부 aspect-ratio 로 높이가 고정돼 있어 로드 전후 레이아웃 시프트 0.
   - 전부 로컬 파일. 외부 CDN/폰트/이미지 참조 없음.
   ============================================================ */

.ph-img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* 로드 전에는 배경 그라디언트가 그대로 보이도록 투명 */
  background: transparent;
}
/* 이미지가 붙은 타일에서는 링·사선 오버레이를 감춘다 (실패 시 다시 나타남) */
.ph.has-img .ph-ring { display: none; }
.ph.has-img::after { display: none; }
.ph-tag { z-index: 3; }

/* 차량 이미지는 1:1 스튜디오 컷이라 정사각 타일에서 잘리지 않는다 */
.ph-square { aspect-ratio: 1 / 1; }

/* 이미지 타일은 카드 배경보다 살짝 눌러 카드 경계를 유지 */
.pcard .ph.has-img, .pkg-card .ph.has-img, .used-card .ph.has-img {
  box-shadow: inset 0 0 0 1px rgba(21, 28, 36, .06);
}

/* ---------- 홈 히어로 ---------- */
/* 이미지는 CSS 배경 레이어다. 파일이 없거나 실패하면 그 레이어만 빠지고
   아래의 원래 그라디언트가 그대로 그려진다(추가 fallback 코드 불필요). */
.hero {
  background-image:
    linear-gradient(105deg,
      rgba(11, 15, 20, .96) 0%,
      rgba(13, 20, 28, .93) 34%,
      rgba(16, 28, 40, .72) 56%,
      rgba(20, 36, 52, .44) 78%,
      rgba(22, 40, 58, .32) 100%),
    url("img/hero-shop.jpg"),
    linear-gradient(135deg, #16232F 0%, #24384C 60%, #2E4A63 100%);
  background-size: cover, cover, cover;
  background-position: center, right center, center;
  background-repeat: no-repeat;
}

@media (max-width: 900px) {
  /* 1열로 접히면 카피가 이미지 위에 올라오므로 오버레이를 세로로 더 강하게 */
  .hero {
    background-image:
      linear-gradient(180deg,
        rgba(12, 18, 25, .95) 0%,
        rgba(14, 24, 34, .91) 55%,
        rgba(16, 28, 40, .88) 100%),
      url("img/hero-shop.jpg"),
      linear-gradient(135deg, #16232F 0%, #24384C 60%, #2E4A63 100%);
    background-position: center, center right, center;
  }
}
