/* 킹고몰 — 킹콩백화점 CI(#E61B53) 기반 디자인 토큰 */
:root {
  --brand: #E61B53;
  --brand-strong: #C40E42;
  --brand-soft: #FDEEF2;
  --ink: #1C151A;
  --ink-2: #4A3F45;
  --muted: #75676E;
  --paper: #FFFFFF;
  --ground: #FAF6F8;
  --line: #EDE3E7;
  --card: #FFFFFF;
  --good: #0E8A5F;
  --good-soft: #E7F5EF;
  --warn: #B26A00;
  --warn-soft: #FBF1DE;
  --shadow: 0 1px 2px rgba(28, 21, 26, .05), 0 8px 24px rgba(28, 21, 26, .06);
  --radius: 14px;
  --radius-s: 9px;
}
/* 다크 모드 자동 전환은 사용하지 않음 — 브랜드 라이트 테마 고정 (2026-07-23 사용자 요청) */

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  background: var(--ground);
  color: var(--ink);
  line-height: 1.55;
  font-size: 15px;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- 헤더 ---------- */
.topbar {
  background: var(--brand);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .01em;
}
.topbar .wrap { display: flex; gap: 18px; padding: 7px 20px; align-items: center; }
.topbar span { opacity: .92; }

header.site {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
header.site .wrap {
  display: flex; align-items: center; gap: 22px; padding: 14px 20px;
}
.logo { display: flex; align-items: baseline; gap: 8px; flex-shrink: 0; }
.logo strong {
  font-size: 23px; font-weight: 800; letter-spacing: -.02em; color: var(--brand);
}
.logo small {
  font-size: 10.5px; font-weight: 700; letter-spacing: .14em;
  color: var(--muted); text-transform: uppercase;
}
nav.main { display: flex; gap: 4px; }
nav.main a {
  padding: 7px 12px; border-radius: 999px; font-weight: 600; font-size: 14.5px;
  color: var(--ink-2);
}
nav.main a:hover { background: var(--brand-soft); color: var(--brand); }
nav.main a.on { background: var(--brand-soft); color: var(--brand); }

.search { flex: 1; max-width: 340px; margin-left: auto; position: relative; }
.search input {
  width: 100%; padding: 9px 14px 9px 38px;
  border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--ground); color: var(--ink);
}
.search input::placeholder { color: var(--muted); }
.search input:focus { border-color: var(--brand); outline: none; background: var(--paper); }
.search svg { position: absolute; left: 13px; top: 50%; translate: 0 -50%; color: var(--muted); }

.hactions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.hbtn {
  position: relative; display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: 14px;
  color: var(--ink-2);
}
.hbtn:hover { background: var(--ground); }
.cart-n {
  position: absolute; top: 0; right: 2px;
  min-width: 17px; height: 17px; padding: 0 4px;
  background: var(--brand); color: #fff; border-radius: 999px;
  font-size: 10.5px; font-weight: 800; line-height: 17px; text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ---------- 공통 ---------- */
main { padding: 28px 0 72px; }
.section-h {
  display: flex; align-items: baseline; gap: 12px;
  margin: 36px 0 16px;
}
.section-h h2 { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.section-h a { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.section-h a:hover { color: var(--brand); }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .01em;
  padding: 3px 8px; border-radius: 6px;
}
.badge.return { background: var(--warn-soft); color: var(--warn); }
.badge.stockb { background: var(--good-soft); color: var(--good); }
.badge.gb     { background: var(--brand-soft); color: var(--brand); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 12px 20px; border-radius: var(--radius-s);
  font-weight: 700; font-size: 15px; transition: filter .15s, background .15s;
}
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-strong); }
.btn.ghost { background: var(--paper); border: 1.5px solid var(--line); color: var(--ink); }
.btn.ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.price { font-variant-numeric: tabular-nums; }
.krw { font-weight: 800; }

/* ---------- 히어로: 공동구매 ---------- */
.hero {
  margin-top: 4px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.hero-copy { padding: 38px 36px; display: flex; flex-direction: column; gap: 14px; }
.hero-eyebrow {
  font-size: 12px; font-weight: 800; letter-spacing: .16em; color: var(--brand);
}
.hero-copy h1 {
  font-size: clamp(24px, 3.4vw, 34px); font-weight: 800;
  letter-spacing: -.025em; line-height: 1.25; text-wrap: balance;
}
.hero-copy p.sub { color: var(--muted); font-size: 15px; max-width: 42ch; }
.hero-cta { display: flex; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.hero-gb {
  background: var(--brand-soft);
  padding: 32px 30px;
  display: flex; flex-direction: column; justify-content: center; gap: 12px;
  border-left: 1px solid var(--line);
}
.hero-gb .gb-name { font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.hero-gb .gb-title { font-size: 13px; color: var(--muted); }

.progress {
  height: 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  overflow: hidden;
}
.progress > i {
  display: block; height: 100%; border-radius: 999px;
  background: var(--brand);
  transition: width .6s cubic-bezier(.2, .8, .2, 1);
}
.gb-stats {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.gb-stats b { color: var(--brand); font-size: 17px; }

/* ---------- 정책 스트립 ---------- */
.policy {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-top: 18px;
}
.policy .p {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; display: flex; align-items: center; gap: 12px;
  font-size: 13.5px;
}
.policy .p b { display: block; font-size: 14px; }
.policy .p span { color: var(--muted); font-size: 12.5px; }
.policy .ic {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center;
}

/* ---------- 카테고리 칩 ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 7px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  background: var(--paper); border: 1.5px solid var(--line); color: var(--ink-2);
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ---------- 상품 그리드 ---------- */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 18px;
}
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: translate .15s, box-shadow .15s;
  display: flex; flex-direction: column;
}
.card:hover { translate: 0 -3px; box-shadow: var(--shadow); }
.thumb {
  aspect-ratio: 1 / .82; position: relative;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--brand-soft), var(--ground));
}
.thumb .mono {
  font-size: 42px; font-weight: 800; color: var(--brand); opacity: .35;
  letter-spacing: -.03em;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .flag {
  position: absolute; top: 10px; left: 10px;
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  color: var(--ink-2); backdrop-filter: blur(4px);
}
.thumb .soldout {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: color-mix(in srgb, var(--ink) 45%, transparent);
  color: #fff; font-weight: 800; font-size: 16px; letter-spacing: .05em;
}
.card-b { padding: 13px 15px 16px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.card-b .brandname { font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: .03em; }
.card-b .pname {
  font-size: 14.5px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.7em;
}
.priceline { display: flex; align-items: baseline; gap: 7px; margin-top: auto; }
.priceline .pct { color: var(--brand); font-weight: 800; font-size: 16px; }
.priceline .now { font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
.priceline .was { color: var(--muted); font-size: 12.5px; text-decoration: line-through; }
.card .mini-progress { margin-top: 4px; }
.mini-progress .progress { height: 6px; }
.mini-progress .t {
  display: flex; justify-content: space-between;
  font-size: 11.5px; color: var(--muted); margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.badges { display: flex; gap: 5px; flex-wrap: wrap; }

/* ---------- 상세 ---------- */
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; margin-top: 10px; align-items: start; }
.detail > * { min-width: 0; }
.detail .thumb { border-radius: var(--radius); border: 1px solid var(--line); aspect-ratio: 1/.9; width: 100%; }
.d-info { display: flex; flex-direction: column; gap: 14px; }
.d-info h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.3; text-wrap: balance; }
.d-price { display: flex; align-items: baseline; gap: 10px; padding: 14px 0; border-block: 1px solid var(--line); }
.d-price .pct { color: var(--brand); font-weight: 800; font-size: 24px; }
.d-price .now { font-size: 27px; font-weight: 800; letter-spacing: -.01em; }
.d-price .was { color: var(--muted); text-decoration: line-through; }
.d-meta { display: grid; grid-template-columns: 92px 1fr; gap: 7px 14px; font-size: 13.5px; }
.d-meta dt { color: var(--muted); font-weight: 600; }
.d-meta dd { color: var(--ink-2); }
.qty {
  display: inline-flex; align-items: center; border: 1.5px solid var(--line);
  border-radius: var(--radius-s); overflow: hidden; width: fit-content;
}
.qty button { width: 38px; height: 40px; font-size: 18px; color: var(--muted); }
.qty button:hover { background: var(--ground); color: var(--brand); }
.qty b { min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; }
.d-actions { display: flex; gap: 10px; margin-top: 4px; }
.d-actions .btn { flex: 1; padding-block: 14px; }
.gb-panel {
  background: var(--brand-soft); border-radius: var(--radius);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 10px;
}
.gb-panel .t { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.gb-panel b.big { color: var(--brand); font-size: 18px; font-variant-numeric: tabular-nums; }
.notice {
  background: var(--ground); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; font-size: 13px; color: var(--muted); line-height: 1.7;
}
.notice b { color: var(--ink-2); }

/* ---------- 폼/카트/체크아웃 ---------- */
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.narrow { max-width: 420px; margin: 30px auto 0; }
.mid { max-width: 720px; margin: 10px auto 0; }
.panel h1 { font-size: 21px; font-weight: 800; margin-bottom: 18px; letter-spacing: -.01em; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.field small { color: var(--muted); font-size: 12px; }
.field input, .field select {
  padding: 11px 13px; border: 1.5px solid var(--line); border-radius: var(--radius-s);
  background: var(--paper); color: var(--ink); width: 100%;
}
.field input:focus, .field select:focus { border-color: var(--brand); outline: none; }
.form-foot { margin-top: 18px; font-size: 13.5px; color: var(--muted); text-align: center; }
.form-foot a { color: var(--brand); font-weight: 700; }

.cart-row {
  display: grid; grid-template-columns: 64px 1fr auto auto; gap: 14px;
  align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line);
}
.cart-row .thumb { width: 64px; height: 64px; aspect-ratio: 1; border-radius: 10px; }
.cart-row .thumb .mono { font-size: 20px; }
.cart-row .n { font-weight: 600; font-size: 14px; }
.cart-row .s { color: var(--muted); font-size: 12.5px; }
.cart-row .x { color: var(--muted); font-size: 13px; padding: 6px; }
.cart-row .x:hover { color: var(--brand); }
.sumline {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 16px 0 4px; font-size: 15px;
}
.sumline .total { font-size: 22px; font-weight: 800; }
.free-tag { color: var(--good); font-weight: 700; font-size: 13px; }

/* ---------- 주문 ---------- */
.order-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; margin-bottom: 14px;
}
.order-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.order-h .no { font-weight: 700; font-size: 14px; }
.order-h .dt { color: var(--muted); font-size: 12.5px; }
.status-pill {
  font-size: 12.5px; font-weight: 800; padding: 5px 11px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand);
}
.status-pill.done { background: var(--good-soft); color: var(--good); }
.status-pill.grey { background: var(--ground); color: var(--muted); }
.order-items { margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.order-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: 13.5px; flex-wrap: wrap; gap: 8px;
}
.pickup-code {
  background: var(--brand); color: #fff; border-radius: var(--radius-s);
  padding: 10px 16px; font-weight: 800; letter-spacing: .2em; font-size: 17px;
  font-variant-numeric: tabular-nums;
}
.timeline { display: flex; gap: 0; margin: 16px 0 4px; }
.tstep { flex: 1; text-align: center; position: relative; font-size: 11.5px; color: var(--muted); }
.tstep::before {
  content: ""; display: block; width: 11px; height: 11px; border-radius: 50%;
  background: var(--line); margin: 0 auto 6px; position: relative; z-index: 1;
}
.tstep::after {
  content: ""; position: absolute; top: 5px; left: -50%; width: 100%; height: 2px;
  background: var(--line);
}
.tstep:first-child::after { display: none; }
.tstep.on { color: var(--brand); font-weight: 700; }
.tstep.on::before { background: var(--brand); }
.tstep.on::after { background: var(--brand); }

/* ---------- 기타 ---------- */
.empty {
  text-align: center; padding: 70px 20px; color: var(--muted);
}
.empty b { display: block; font-size: 17px; color: var(--ink-2); margin-bottom: 6px; }
.toast {
  position: fixed; bottom: 26px; left: 50%; translate: -50% 0; z-index: 100;
  background: var(--ink); color: var(--paper);
  padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 14px;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none;
  transition: opacity .25s, translate .25s;
}
.toast.show { opacity: 1; translate: -50% -6px; }
.skel { animation: pulse 1.4s ease-in-out infinite; background: var(--line); border-radius: var(--radius); }
@keyframes pulse { 50% { opacity: .5; } }

footer.site {
  border-top: 1px solid var(--line); background: var(--paper);
  padding: 34px 0 44px; color: var(--muted); font-size: 12.5px; line-height: 1.8;
}
footer.site .cols { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
footer.site strong { color: var(--ink-2); font-size: 14px; letter-spacing: -.01em; }
footer.site img { height: 18px; opacity: .75; margin-top: 6px; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .hero-gb { border-left: 0; border-top: 1px solid var(--line); }
  .policy { grid-template-columns: 1fr; }
  .detail { grid-template-columns: 1fr; gap: 20px; }
  nav.main { display: none; }
  header.site .wrap { gap: 10px; padding: 12px 14px; }
  .logo small { display: none; }
  .search { max-width: none; min-width: 0; }
  .search input { min-width: 0; }
  .hbtn { padding: 8px 7px; }
  .hbtn span.lbl { display: none; }
  .cart-row { grid-template-columns: 52px 1fr auto; }
  .cart-row .rowprice { grid-column: 2 / -1; text-align: right; }
}
