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

:root {
  --ink: #1a1a1a;
  --ink-2: #555;
  --ink-3: #999;
  --line: #ececec;
  --bg-soft: #f5f5f5;
  --accent: #1a1a1a;   /* 할인율 (브랜드: 검정·회색·흰색만 사용) */
  --brand: #1a1a1a;    /* 메인 버튼 */
  --maxw: 480px;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { background: #ebebeb; }
body {
  font-family: "Pretendard", -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--ink); background: #fff; max-width: var(--maxw); margin: 0 auto; min-height: 100vh;
  font-size: 14px; line-height: 1.5; letter-spacing: -0.01em; position: relative;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 공지 바 ---------- */
.notice { background: var(--ink); color: #fff; height: 32px; overflow: hidden; font-size: 12px; text-align: center; }
.notice-track { animation: notice 8s infinite; }
.notice-track span { display: block; height: 32px; line-height: 32px; }
@keyframes notice { 0%, 42% { transform: translateY(0); } 50%, 92% { transform: translateY(-32px); } 100% { transform: translateY(0); } }

/* ---------- 헤더 ---------- */
.hd { display: grid; grid-template-columns: 88px 1fr 88px; align-items: center; height: 52px; padding: 0 8px; background: #fff; position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line); }
.hd-left { display: flex; }
.hd-right { display: flex; justify-content: flex-end; }
.logo { font-weight: 800; font-size: 18px; letter-spacing: 0.02em; text-align: center; white-space: nowrap; }
.hd-title { font-weight: 700; font-size: 16px; text-align: center; }
.icon-btn { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; position: relative; }
.cart-count { position: absolute; top: 5px; right: 3px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 10px; font-style: normal; display: flex; align-items: center; justify-content: center; padding: 0 4px; font-weight: 700; }

.cats { display: flex; gap: 22px; overflow-x: auto; padding: 0 16px; height: 44px; align-items: center; border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 52px; z-index: 29; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cats a { white-space: nowrap; font-size: 14px; color: var(--ink-2); height: 44px; line-height: 44px; }
.cats a.on { color: var(--ink); font-weight: 700; box-shadow: inset 0 -2px 0 var(--ink); }

/* ---------- 드로어 ---------- */
.drawer-dim { position: fixed; inset: 0; background: rgba(0,0,0,.4); opacity: 0; pointer-events: none; transition: .2s; z-index: 90; }
.drawer-dim.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; bottom: 0; left: max(0px, calc(50% - var(--maxw)/2)); width: min(300px, 80vw); background: #fff; z-index: 91; transform: translateX(-110%); transition: transform .25s; overflow-y: auto; padding-bottom: 40px; }
.drawer.open { transform: translateX(0); }
.drawer-hd { display: flex; justify-content: space-between; align-items: center; padding: 8px 8px 8px 20px; border-bottom: 1px solid var(--line); }
.drawer-sec { font-size: 12px; color: var(--ink-3); padding: 20px 20px 6px; }
.drawer a { display: block; padding: 11px 20px; font-size: 15px; }

/* ---------- 배너 ---------- */
.banner { position: relative; }
.banner-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.banner-track::-webkit-scrollbar { display: none; }
.banner-slide { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 4 / 5; position: relative; display: flex; align-items: flex-end; padding: 28px 22px; overflow: hidden; }
.banner-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner-slide .bn-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(0,0,0,.25); font-size: 13px; }
.banner-text { position: relative; color: #fff; }
.banner-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0) 55%); }
.banner-text h2 { font-size: 28px; line-height: 1.25; font-weight: 800; white-space: pre-line; }
.banner-text p { margin-top: 8px; font-size: 14px; color: rgba(255,255,255,.85); }
.banner-dots { position: absolute; right: 16px; bottom: 16px; background: rgba(0,0,0,.45); color: #fff; font-size: 11px; padding: 2px 9px; border-radius: 10px; }

/* ---------- 섹션 ---------- */
.sec { padding: 32px 16px 8px; }
.sec-hd { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.sec-hd h3 { font-size: 18px; font-weight: 800; }
.sec-hd span { font-size: 12px; color: var(--ink-3); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); border-radius: 20px; padding: 8px 14px; font-size: 13px; background: #fff; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- 상품 그리드 ---------- */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 10px; }
.card { display: block; }
.card .thumb { aspect-ratio: 3 / 4; overflow: hidden; background: var(--bg-soft); position: relative; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .badge { position: absolute; top: 8px; left: 8px; background: #fff; font-size: 10px; font-weight: 800; padding: 2px 6px; letter-spacing: .04em; }
.card .nm { margin-top: 10px; font-size: 13px; color: var(--ink); line-height: 1.4; }
.card .pr { margin-top: 4px; font-size: 14px; }
.card .pr .dc { color: var(--accent); font-weight: 800; margin-right: 4px; }
.card .pr b { font-weight: 800; }
.card .org { font-size: 12px; color: var(--ink-3); text-decoration: line-through; }
.card .sz { margin-top: 6px; font-size: 11px; color: var(--ink-2); background: var(--bg-soft); display: inline-block; padding: 1px 6px; }
.empty { padding: 60px 0; text-align: center; color: var(--ink-3); }

/* 자리표시 이미지 */
.ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; text-align: center; color: rgba(0,0,0,.32); font-size: 12px; line-height: 1.4; }
.ph small { font-size: 10px; }

/* ---------- 상품 상세 ---------- */
.pd-gallery { position: relative; }
.pd-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.pd-track::-webkit-scrollbar { display: none; }
.pd-slide { flex: 0 0 100%; aspect-ratio: 3 / 4; scroll-snap-align: start; }
.pd-slide img { width: 100%; height: 100%; object-fit: cover; }
.pd-count { position: absolute; right: 14px; bottom: 14px; background: rgba(0,0,0,.45); color: #fff; font-size: 11px; padding: 2px 9px; border-radius: 10px; }
.pd-info { padding: 20px 16px; border-bottom: 8px solid var(--bg-soft); }
.pd-name { font-size: 18px; font-weight: 700; line-height: 1.35; }
.pd-org { margin-top: 10px; font-size: 13px; color: var(--ink-3); text-decoration: line-through; }
.pd-price { font-size: 22px; font-weight: 800; }
.pd-price .dc { color: var(--accent); margin-right: 6px; }
.pd-meta { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; display: grid; grid-template-columns: 64px 1fr; row-gap: 8px; font-size: 13px; }
.pd-meta dt { color: var(--ink-3); }
.pd-points { margin-top: 18px; background: var(--bg-soft); padding: 14px 16px; border-radius: 6px; }
.pd-points h4 { font-size: 13px; margin-bottom: 6px; }
.pd-points li { font-size: 13px; color: var(--ink-2); list-style: none; padding-left: 14px; position: relative; margin-top: 3px; }
.pd-points li::before { content: "✓"; position: absolute; left: 0; color: var(--ink); font-weight: 700; }

.tabs { display: grid; grid-template-columns: repeat(4, 1fr); position: sticky; top: 52px; background: #fff; z-index: 20; border-bottom: 1px solid var(--line); }
.tabs button { height: 46px; font-size: 14px; color: var(--ink-3); }
.tabs button.on { color: var(--ink); font-weight: 700; box-shadow: inset 0 -2px 0 var(--ink); }
.tab-sec { padding: 28px 16px; border-bottom: 8px solid var(--bg-soft); scroll-margin-top: 100px; }
.tab-sec h4 { font-size: 16px; font-weight: 800; margin-bottom: 14px; }
.detail-img { aspect-ratio: 3 / 4; margin-bottom: 12px; }
.detail-copy { text-align: center; padding: 22px 0 30px; }
.detail-copy strong { display: block; font-size: 19px; font-weight: 800; line-height: 1.4; margin-bottom: 8px; }
.detail-copy p { color: var(--ink-2); font-size: 14px; }
table.size { width: 100%; border-collapse: collapse; font-size: 13px; text-align: center; }
table.size th, table.size td { border-bottom: 1px solid var(--line); padding: 10px 4px; }
table.size th { background: var(--bg-soft); font-weight: 600; }
.note { font-size: 12px; color: var(--ink-3); margin-top: 10px; }
.info-list { font-size: 13px; color: var(--ink-2); }
.info-list p { margin-bottom: 6px; }

/* 하단 고정 바 */
.bottom-bar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: var(--maxw); background: #fff; border-top: 1px solid var(--line); padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); display: flex; gap: 8px; z-index: 40; }
.btn { height: 52px; border-radius: 6px; font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 1; }
.btn-dark { background: var(--brand); color: #fff; }
.btn-line { border: 1px solid #cfcfcf; background: #fff; }
.btn-icon { flex: 0 0 52px; border: 1px solid #cfcfcf; }
.btn:disabled { background: #cfcfcf; cursor: default; }
.pad-bottom { height: 90px; }

/* 옵션 시트 */
.sheet-dim { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 60; opacity: 0; pointer-events: none; transition: .2s; }
.sheet-dim.open { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; left: 50%; bottom: 0; width: 100%; max-width: var(--maxw); transform: translate(-50%, 105%); background: #fff; border-radius: 16px 16px 0 0; z-index: 61; transition: transform .25s; padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); max-height: 85vh; overflow-y: auto; }
.sheet.open { transform: translate(-50%, 0); }
.sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: #ddd; margin: 0 auto 14px; }
.opt-label { font-size: 13px; font-weight: 700; margin: 12px 0 8px; }
.opt-row { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { min-width: 56px; height: 40px; padding: 0 14px; border: 1px solid #d5d5d5; border-radius: 6px; font-size: 14px; }
.opt.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); font-weight: 700; }
.sel-box { margin-top: 18px; background: var(--bg-soft); border-radius: 6px; padding: 14px; display: none; }
.sel-box.show { display: block; }
.sel-top { display: flex; justify-content: space-between; font-size: 13px; }
.sel-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.qty { display: inline-flex; border: 1px solid #d5d5d5; border-radius: 4px; background: #fff; }
.qty button { width: 32px; height: 32px; font-size: 16px; }
.qty span { width: 36px; text-align: center; line-height: 32px; font-size: 14px; }
.sheet-total { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 0 12px; }
.sheet-total b { font-size: 20px; font-weight: 800; }
.sheet-btns { display: flex; gap: 8px; }

/* ---------- 장바구니 / 주문 ---------- */
.page-sec { padding: 20px 16px; border-bottom: 8px solid var(--bg-soft); }
.page-sec h3 { font-size: 16px; font-weight: 800; margin-bottom: 14px; }
.line { display: grid; grid-template-columns: 84px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line .thumb { aspect-ratio: 3 / 4; overflow: hidden; background: var(--bg-soft); }
.line .thumb img { width: 100%; height: 100%; object-fit: cover; }
.line .nm { font-size: 14px; font-weight: 600; padding-right: 26px; }
.line .op { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.line .row { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.line .price { font-weight: 800; }
.line-wrap { position: relative; }
.line-del { position: absolute; right: 0; top: 12px; width: 26px; height: 26px; color: var(--ink-3); }
.line-del svg { width: 18px; height: 18px; }
.sum { font-size: 14px; }
.sum div { display: flex; justify-content: space-between; padding: 5px 0; }
.sum .dc { color: var(--accent); }
.sum .total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; font-size: 16px; font-weight: 800; }
.sum .total b { font-size: 20px; }
.free-msg { font-size: 12px; color: var(--ink-2); background: var(--bg-soft); padding: 8px 10px; border-radius: 4px; margin-top: 10px; }

.field { margin-bottom: 10px; }
.field label { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 5px; }
.field input, .field select { width: 100%; height: 46px; border: 1px solid #d5d5d5; border-radius: 6px; padding: 0 12px; font: inherit; font-size: 15px; background: #fff; }
.field-row { display: flex; gap: 8px; }
.field-row .btn-line { flex: 0 0 96px; height: 46px; font-size: 13px; font-weight: 600; border-radius: 6px; }
.pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pay { height: 52px; border: 1px solid #d5d5d5; border-radius: 6px; font-size: 14px; }
.pay.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); font-weight: 700; }
.agree { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--ink-2); }
.agree input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--ink); }

/* ---------- Fake Door ---------- */
.soon { padding: 56px 24px 32px; text-align: center; }
.soon-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--bg-soft); display: flex; align-items: center; justify-content: center; margin: 0 auto 22px; }
.soon-icon svg { width: 30px; height: 30px; }
.soon h2 { font-size: 22px; font-weight: 800; line-height: 1.35; }
.soon p { margin-top: 12px; color: var(--ink-2); font-size: 14px; line-height: 1.6; }
.soon-box { margin: 24px 0 0; background: var(--bg-soft); border-radius: 8px; padding: 14px 16px; text-align: left; font-size: 13px; color: var(--ink-2); }
.soon-box li { list-style: none; padding-left: 14px; position: relative; margin: 3px 0; }
.soon-box li::before { content: "·"; position: absolute; left: 2px; font-weight: 800; }
.survey { padding: 8px 24px 24px; }
.survey h4 { font-size: 15px; font-weight: 800; margin-bottom: 12px; text-align: center; }
.survey .opt-row { justify-content: center; }
.survey .opt { height: auto; padding: 10px 14px; text-align: left; }
.survey-done { text-align: center; color: var(--ink-2); font-size: 13px; padding: 8px 0; display: none; }
.soon-actions { padding: 8px 24px 40px; display: flex; flex-direction: column; gap: 8px; }
.soon-actions .btn { flex: none; width: 100%; }

/* ---------- 푸터 ---------- */
.ft { padding: 32px 16px 40px; background: var(--bg-soft); margin-top: 40px; font-size: 12px; color: var(--ink-3); }
.ft-logo { font-weight: 800; color: var(--ink); letter-spacing: .06em; font-size: 15px; margin-bottom: 12px; }
.ft-links { display: flex; gap: 14px; margin-bottom: 12px; color: var(--ink-2); }
.ft-biz { line-height: 1.7; margin-bottom: 10px; }

/* ---------- 토스트 / 디버그 ---------- */
#toast { position: fixed; left: 50%; bottom: 100px; transform: translate(-50%, 20px); background: rgba(20,20,20,.92); color: #fff; padding: 11px 18px; border-radius: 22px; font-size: 13px; opacity: 0; pointer-events: none; transition: .2s; z-index: 100; white-space: nowrap; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#debug-log { position: fixed; left: 8px; bottom: 84px; opacity: .85; z-index: 200; background: rgba(0,0,0,.78); color: #e0e0e0; font: 11px/1.45 ui-monospace, monospace; padding: 8px 10px; border-radius: 6px; max-width: 230px; pointer-events: none; }
#debug-log b { color: #fff; display: block; margin-bottom: 2px; }

/* ---------- v2: 가치제안 / 고민별 / 태그 ---------- */
.vp { padding: 40px 20px 8px; text-align: center; }
.vp-eyebrow { font-size: 11px; letter-spacing: .18em; color: var(--ink-3); font-weight: 700; }
.vp-title { margin-top: 10px; font-size: 24px; line-height: 1.35; font-weight: 800; }
.vp-desc { margin-top: 14px; font-size: 14px; line-height: 1.7; color: var(--ink-2); }
.vp-desc b { color: var(--ink); }
.concern-list { display: flex; flex-direction: column; gap: 10px; }
.concern { display: grid; grid-template-columns: 56px 1fr 20px; gap: 14px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.concern img { width: 56px; height: 72px; object-fit: cover; border-radius: 6px; }
.concern svg { width: 18px; height: 18px; color: var(--ink-3); }
.cc-q { font-size: 15px; font-weight: 700; line-height: 1.4; }
.cc-a { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.tag { display: inline-block; margin-top: 10px; font-size: 11px; font-weight: 700; color: #555; background: #f0f0f0; padding: 3px 7px; border-radius: 3px; line-height: 1.45; }
.pd-info .tag { margin-top: 0; margin-bottom: 8px; font-size: 12px; }
.pd-info .pd-price { margin-top: 10px; }
.card .nm { margin-top: 6px; }
.pd-photos { padding: 0 0 8px; }
.pd-photos img { width: 100%; margin-bottom: 6px; }
.ft-tag { margin-bottom: 12px; }
a.btn { text-decoration: none; }
