@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable.min.css');

/* =============================================================
   바른코드 — 밝고 담백한 커머스 UI
   원칙: 흰 배경 · 얇은 선 · 그림자 최소 · 상품이 주인공
   ============================================================= */
:root {
  --bg:      #FFFFFF;
  --bg-soft: #F7F8F9;
  --text:    #17181C;
  --text-2:  #5C616B;
  --text-3:  #8E939D;
  --line:    #EAECEF;
  --line-2:  #F2F3F5;
  --brand:   #2B6BF3;
  --brand-d: #1A54D4;
  --brand-s: #EEF4FF;
  --sale:    #E5484D;
  --ok:      #12A47A;
  --ok-s:    #E9F8F3;
  --warn-s:  #FFF7E8;
  --warn-t:  #8A6100;

  --r:    10px;
  --r-sm: 7px;
  --maxw: 1120px;
  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont,
          system-ui, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 15px; line-height: 1.6;
  letter-spacing: -.011em; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.025em; line-height: 1.35; }
p { margin: 0 0 .7em; }
table { border-collapse: collapse; width: 100%; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── 헤더 ─────────────────────────────────────────────── */
.site-header {
  background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50;
}
.site-header .wrap { display: flex; align-items: center; gap: 22px; height: 60px; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 18.5px; font-weight: 800; letter-spacing: -.04em; }
.logo .mark {
  width: 26px; height: 26px; border-radius: 7px; flex: none; background: var(--brand);
  color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 800;
}
.gnb { display: flex; gap: 2px; flex: 1; }
.gnb a { padding: 7px 11px; border-radius: 7px; font-size: 14.5px; font-weight: 500; color: var(--text-2); }
.gnb a:hover { background: var(--bg-soft); color: var(--text); }
.gnb a.on { color: var(--text); font-weight: 700; }
.hd-act { display: flex; align-items: center; gap: 4px; }
.hd-act a, .hd-act button {
  padding: 7px 11px; border-radius: 7px; border: 0; background: none;
  font-size: 14px; font-weight: 500; color: var(--text-2); cursor: pointer; white-space: nowrap;
}
.hd-act a:hover, .hd-act button:hover { background: var(--bg-soft); color: var(--text); }
.hd-cart { display: inline-flex; align-items: center; gap: 6px; }
.hd-cart b {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--brand);
  color: #fff; font-size: 11.5px; font-weight: 700; display: grid; place-items: center;
}
.nav-toggle { display: none; }

/* 설정 미입력 경고 */
.config-alert { background: #FFF3F3; color: #B4232A; border-bottom: 1px solid #FFD9D9; font-size: 13px; padding: 8px 20px; text-align: center; }
.config-alert code { background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 4px; }

/* ── 안내 바 ──────────────────────────────────────────── */
.notice-bar {
  background: var(--ok-s); color: #0B6B4F; font-size: 13.5px; font-weight: 600;
  padding: 9px 20px; text-align: center; border-bottom: 1px solid #D6F0E7;
}

/* ── 페이지 헤드 ──────────────────────────────────────── */
.page-head { padding: 34px 0 20px; }
.page-head h1 { font-size: 23px; }
.page-head p { color: var(--text-2); font-size: 14.5px; margin: 7px 0 0; }
.section { padding: 30px 0 56px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.sec-head h2 { font-size: 19px; }
.sec-head a { color: var(--text-2); font-size: 14px; font-weight: 600; }
.sec-head a:hover { color: var(--brand); }

/* ── 버튼 ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 18px; border-radius: var(--r-sm); border: 1px solid transparent;
  background: var(--bg-soft); color: var(--text); font-size: 14.5px; font-weight: 600;
  cursor: pointer; transition: .13s; white-space: nowrap;
}
.btn:hover { background: #EFF1F3; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-d); }
.btn-line { background: #fff; border-color: var(--line); }
.btn-line:hover { background: var(--bg-soft); }
.btn-lg { padding: 14px 24px; font-size: 15.5px; border-radius: 9px; }
.btn-sm { padding: 8px 12px; font-size: 13.5px; }
.btn-block { width: 100%; }

/* ── 상품 그리드 / 카드 ───────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 26px 20px; }
.card { display: flex; flex-direction: column; }
.card-img {
  position: relative; aspect-ratio: 460 / 215; border-radius: var(--r);
  overflow: hidden; background: var(--bg-soft); border: 1px solid var(--line);
}
.card-img img, .card-img svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.card:hover .card-img { border-color: #D9DDE2; }
.card:hover .card-img img { transform: scale(1.025); }
.card-img img { transition: transform .25s ease; }
.tag {
  position: absolute; top: 8px; left: 8px; background: rgba(23,24,28,.82); color: #fff;
  font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 5px; backdrop-filter: blur(3px);
}
.tag.instant { background: var(--ok); }
.card-body { padding: 11px 2px 0; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.card-name {
  font-size: 14.5px; font-weight: 600; line-height: 1.4; min-height: 2.8em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-price { display: flex; align-items: baseline; gap: 7px; margin-top: auto; padding-top: 2px; }
.card-price .off { color: var(--sale); font-size: 15px; font-weight: 800; }
.card-price .now { font-size: 17px; font-weight: 800; letter-spacing: -.03em; }
.card-price .was { color: var(--text-3); font-size: 13px; text-decoration: line-through; }
.card-act { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 9px; }

/* ── 상품 상세 ────────────────────────────────────────── */
.crumb { font-size: 12.5px; color: var(--text-3); padding: 16px 0 0; display: flex; gap: 6px; flex-wrap: wrap; }
.crumb a:hover { color: var(--brand); }
.detail { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: start; padding: 24px 0 10px; }
.detail-img { border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 460/215; background: var(--bg-soft); }
.detail-img img, .detail-img svg { width: 100%; height: 100%; object-fit: cover; }
.detail h1 { font-size: 22px; margin-bottom: 8px; }
.detail .lead { color: var(--text-2); font-size: 14.5px; margin-bottom: 18px; }
.price-row { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; padding-bottom: 4px; }
.price-row .off { color: var(--sale); font-size: 22px; font-weight: 800; }
.price-row .now { font-size: 27px; font-weight: 800; letter-spacing: -.035em; }
.price-row .was { color: var(--text-3); font-size: 14.5px; text-decoration: line-through; }
.vat { color: var(--text-3); font-size: 12.5px; margin-bottom: 18px; }

.spec { font-size: 13.5px; border-top: 1px solid var(--line); margin-bottom: 18px; }
.spec tr { border-bottom: 1px solid var(--line-2); }
.spec th, .spec td { padding: 9px 2px; text-align: left; vertical-align: top; }
.spec th { width: 92px; color: var(--text-3); font-weight: 500; }

.qty-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.qty button { width: 34px; height: 36px; border: 0; background: #fff; cursor: pointer; font-size: 16px; color: var(--text-2); }
.qty button:hover { background: var(--bg-soft); }
.qty input { width: 44px; height: 36px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; font-weight: 700; }
.qty-total { margin-left: auto; text-align: right; }
.qty-total small { display: block; font-size: 12px; color: var(--text-3); }
.qty-total strong { font-size: 20px; font-weight: 800; letter-spacing: -.03em; }
.buy-row { display: grid; grid-template-columns: 1fr 1.5fr; gap: 8px; }

/* 상세 하단 설명 */
.detail-more { max-width: 760px; padding: 42px 0 60px; border-top: 1px solid var(--line); margin-top: 36px; }
.detail-more h2 { font-size: 17px; margin: 30px 0 10px; }
.detail-more h2:first-child { margin-top: 0; }
.detail-more ul, .detail-more ol { padding-left: 19px; margin: 0 0 12px; color: var(--text-2); }
.detail-more li { margin-bottom: 5px; }
.detail-more p { color: var(--text-2); }

/* ── 알림 박스 ────────────────────────────────────────── */
.note { border-radius: var(--r-sm); padding: 13px 15px; font-size: 13.5px; line-height: 1.65; margin-bottom: 14px; }
.note strong { display: block; margin-bottom: 3px; font-size: 13.5px; }
.note ul { margin: 5px 0 0; padding-left: 17px; }
.note.info { background: var(--brand-s); color: #1B4EAE; }
.note.ok   { background: var(--ok-s);    color: #0B6B4F; }
.note.warn { background: var(--warn-s);  color: var(--warn-t); }
.note.bad  { background: #FFF3F3;        color: #B4232A; }
.note a { text-decoration: underline; font-weight: 600; }

/* ── 폼 ───────────────────────────────────────────────── */
.panel { border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 16px; }
.panel-hd { padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.panel-hd h2 { font-size: 15px; }
.panel-hd p { font-size: 12.5px; color: var(--text-3); margin: 2px 0 0; }
.panel-bd { padding: 18px; }

.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 5px; }
.field label .req { color: var(--sale); margin-left: 2px; }
.field input[type=text], .field input[type=email], .field input[type=tel],
.field input[type=password], .field textarea, .field select {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #fff; font-size: 14.5px; transition: .12s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(43,107,243,.12);
}
.field .hint { font-size: 12.5px; color: var(--text-3); margin-top: 4px; }
.field .err { font-size: 12.5px; color: var(--sale); margin-top: 4px; display: none; font-weight: 600; }
.field.invalid input, .field.invalid select { border-color: var(--sale); }
.field.invalid .err { display: block; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.check { display: flex; gap: 8px; align-items: flex-start; padding: 7px 0; font-size: 13.5px; cursor: pointer; }
.check input { margin: 3px 0 0; width: 15px; height: 15px; flex: none; accent-color: var(--brand); cursor: pointer; }
.check a { color: var(--brand); text-decoration: underline; }
.check.all { border-bottom: 1px solid var(--line); padding-bottom: 11px; margin-bottom: 3px; font-weight: 700; font-size: 14.5px; }
.check .must { color: var(--sale); font-weight: 700; }

.pay-methods { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 7px; }
.pay-methods label { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px 6px; text-align: center; cursor: pointer; font-size: 13.5px; font-weight: 500; }
.pay-methods label:hover { border-color: #CFD5DC; }
.pay-methods input { display: none; }
.pay-methods label:has(input:checked) { border-color: var(--brand); background: var(--brand-s); color: var(--brand-d); font-weight: 700; }

/* ── 장바구니 / 주문 ──────────────────────────────────── */
.cols { display: grid; grid-template-columns: 1fr 330px; gap: 28px; align-items: start; padding-bottom: 60px; }
.summary { position: sticky; top: 80px; }
.sline { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; color: var(--text-2); }
.sline.total { border-top: 1px solid var(--line); margin-top: 7px; padding-top: 12px; font-size: 15px; color: var(--text); font-weight: 700; }
.sline.total strong { font-size: 21px; font-weight: 800; letter-spacing: -.03em; }

.citem { display: grid; grid-template-columns: 108px 1fr auto; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line-2); align-items: center; }
.citem:last-child { border-bottom: 0; }
.citem .ci-img { border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 460/215; }
.citem .ci-img img, .citem .ci-img svg { width: 100%; height: 100%; object-fit: cover; }
.citem .ci-name { font-size: 14px; font-weight: 600; line-height: 1.4; }
.citem .ci-meta { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.citem .ci-right { text-align: right; }
.citem .ci-price { font-weight: 800; font-size: 15px; }
.link-del { background: none; border: 0; color: var(--text-3); font-size: 12.5px; cursor: pointer; text-decoration: underline; padding: 3px 0; }
.link-del:hover { color: var(--sale); }

.mini { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: 13.5px; border-bottom: 1px solid var(--line-2); }
.mini:last-of-type { border-bottom: 0; }
.mini b { display: block; font-weight: 600; line-height: 1.4; }
.mini small { color: var(--text-3); font-size: 12px; }

.empty { text-align: center; padding: 60px 20px; color: var(--text-3); }
.empty h3 { font-size: 16px; color: var(--text); margin-bottom: 5px; }

/* ── 결과 / 주문상세 ──────────────────────────────────── */
.result { max-width: 600px; margin: 40px auto 70px; text-align: center; }
.result-ico { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 16px; font-size: 24px; }
.result-ico.ok { background: var(--ok-s); color: var(--ok); }
.result-ico.wait { background: var(--warn-s); color: #B8860B; }
.result-ico.no { background: #FFF3F3; color: var(--sale); }
.result h1 { font-size: 21px; margin-bottom: 8px; }
.result > p { color: var(--text-2); font-size: 14.5px; }

.obox { background: var(--bg-soft); border-radius: var(--r); padding: 18px; margin: 20px 0; text-align: left; }
.obox dl { display: grid; grid-template-columns: 88px 1fr; gap: 8px 12px; margin: 0; font-size: 13.5px; }
.obox dt { color: var(--text-3); }
.obox dd { margin: 0; font-weight: 600; }

.pill { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.pill.pending { background: var(--bg-soft); color: var(--text-2); }
.pill.paid { background: var(--brand-s); color: var(--brand-d); }
.pill.delivering { background: var(--warn-s); color: var(--warn-t); }
.pill.delivered { background: var(--ok-s); color: #0B6B4F; }
.pill.cancelled, .pill.failed { background: #FFF3F3; color: #B4232A; }

.code-row { display: flex; align-items: center; gap: 10px; padding: 13px 15px; background: var(--text); color: #fff; border-radius: var(--r-sm); margin-bottom: 8px; flex-wrap: wrap; }
.code-row .cr-name { font-size: 12.5px; color: rgba(255,255,255,.6); width: 100%; }
.code-row .cr-key { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 15.5px; font-weight: 700; letter-spacing: .05em; flex: 1; word-break: break-all; }
.code-row .btn { background: rgba(255,255,255,.15); color: #fff; }
.code-row .btn:hover { background: rgba(255,255,255,.25); }

/* ── 문서(약관) ───────────────────────────────────────── */
.doc { max-width: 760px; margin: 0 auto; padding: 6px 0 70px; }
.doc h2 { font-size: 16.5px; margin: 30px 0 10px; }
.doc h3 { font-size: 14.5px; margin: 18px 0 6px; }
.doc p, .doc li { color: var(--text-2); font-size: 14.5px; }
.doc ul, .doc ol { padding-left: 19px; }
.doc li { margin-bottom: 5px; }
.doc table { font-size: 13.5px; margin: 12px 0 18px; }
.doc th, .doc td { border: 1px solid var(--line); padding: 9px 11px; text-align: left; vertical-align: top; }
.doc th { background: var(--bg-soft); font-weight: 600; width: 30%; }
.doc .rev { font-size: 13px; color: var(--text-3); border-top: 1px solid var(--line); padding-top: 13px; margin-top: 28px; }

/* ── Q&A 아코디언 ─────────────────────────────────────── */
.qa { border-bottom: 1px solid var(--line); }
.qa > button { width: 100%; text-align: left; background: none; border: 0; padding: 15px 30px 15px 0; font-size: 14.5px; font-weight: 600; cursor: pointer; position: relative; color: var(--text); }
.qa > button::after { content: '+'; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 17px; color: var(--text-3); font-weight: 400; }
.qa.open > button::after { content: '−'; }
.qa .a { display: none; padding: 0 0 16px; color: var(--text-2); font-size: 14px; }
.qa.open .a { display: block; }
.qa .a a { color: var(--brand); text-decoration: underline; }

/* ── 푸터 ─────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 32px 0 40px; margin-top: 40px; font-size: 12.5px; color: var(--text-3); }
.f-nav { display: flex; gap: 16px; flex-wrap: wrap; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.f-nav a { font-size: 13px; font-weight: 500; color: var(--text-2); }
.f-nav a:hover { color: var(--text); }
.f-nav a.b { font-weight: 700; color: var(--text); }
.f-biz { line-height: 1.85; }
.f-biz .cs { color: var(--text); font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.f-biz a { text-decoration: underline; }
.f-copy { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 11.5px; }

/* ── 토스트 / 로딩 ────────────────────────────────────── */
.toast-wrap { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 7px; align-items: center; pointer-events: none; }
.toast { background: var(--text); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 600; animation: tin .2s ease-out; }
.toast.err { background: var(--sale); }
@keyframes tin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; } }
.spin { width: 16px; height: 16px; border: 2.5px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: sp .7s linear infinite; display: inline-block; }
.spin.d { border-color: rgba(0,0,0,.12); border-top-color: var(--brand); }
@keyframes sp { to { transform: rotate(360deg); } }
.sk { background: var(--bg-soft); border-radius: var(--r); animation: pulse 1.4s ease infinite; }
@keyframes pulse { 50% { opacity: .55; } }

/* ── 반응형 ───────────────────────────────────────────── */
@media (max-width: 940px) {
  .detail { grid-template-columns: 1fr; gap: 22px; }
  .detail-img { max-width: 460px; }
  .cols { grid-template-columns: 1fr; }
  .summary { position: static; }
}
@media (max-width: 720px) {
  body { font-size: 14.5px; }
  .site-header .wrap { height: 54px; gap: 10px; }
  .gnb {
    position: fixed; inset: 54px 0 auto; background: #fff; flex-direction: column;
    padding: 8px 14px 16px; gap: 0; display: none; border-bottom: 1px solid var(--line);
  }
  .gnb.open { display: flex; }
  .gnb a { padding: 12px 8px; font-size: 15px; }
  .nav-toggle { display: inline-flex; order: -1; font-size: 17px; padding: 6px 8px; }
  .hd-act .lbl { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 20px 12px; }
  .card-name { font-size: 13.5px; min-height: 2.8em; }
  .card-act { grid-template-columns: 1fr; }
  .card-act .btn:first-child { display: none; }
  .buy-row { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .citem { grid-template-columns: 92px 1fr; }
  .citem .ci-right { grid-column: 2; text-align: left; display: flex; justify-content: space-between; align-items: center; }
  .page-head { padding: 24px 0 16px; }
  .section { padding: 22px 0 44px; }
  .obox dl { grid-template-columns: 78px 1fr; }
}

@media print {
  .site-header, .site-footer, .btn, .toast-wrap, .config-alert, .notice-bar { display: none !important; }
  body { font-size: 11pt; }
  .wrap { max-width: none; padding: 0; }
}
