:root {
  --ink: #131a2a;
  --sub: #5d667a;
  --line: #e6e8ee;
  --bg: #f6f7f9;
  --card: #fff;
  --navy: #14213d;
  --accent: #e4572e;
  --accent-dark: #c4431d;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { font-family: Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; color: var(--ink); background: var(--bg); line-height: 1.6; word-break: keep-all; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

.top { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 20px; height: 70px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; line-height: 1.15; white-space: nowrap; }
.logo small { display: block; font-weight: 500; font-size: 11px; color: var(--sub); }
.logo-mark { width: 38px; height: 38px; border-radius: 10px; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 14px; letter-spacing: .5px; }
.search { flex: 1; }
.search input { width: 100%; height: 44px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); outline: none; }
.search input:focus { border-color: var(--navy); background: #fff; }
.cart-btn { height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--navy); color: #fff; cursor: pointer; white-space: nowrap; font-weight: 700; }
.cart-btn b { display: inline-block; min-width: 20px; margin-left: 6px; border-radius: 999px; background: var(--accent); font-size: 12px; text-align: center; padding: 0 6px; }

.hero { background: linear-gradient(135deg, #101a33 0%, #1d2f57 100%); color: #fff; }
.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; padding-top: 54px; padding-bottom: 54px; }
.eyebrow { color: #ffb199; font-weight: 700; letter-spacing: 2px; font-size: 13px; }
.hero h1 { font-size: 38px; line-height: 1.3; margin: 10px 0 14px; letter-spacing: -.8px; }
.lead { color: #c9d1e4; max-width: 520px; }
.hero-actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 46px; padding: 0 22px; border-radius: 10px; border: 1px solid transparent; font-weight: 700; cursor: pointer; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); }
.btn.kakao { background: #fee500; color: #191919; }
.btn.kakao[hidden] { display: none; }
.btn.ghost { border-color: #c3c9d8; background: transparent; }
.hero .btn.ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.steps { list-style: none; display: grid; gap: 12px; }
.steps li { display: flex; gap: 14px; align-items: center; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 14px 18px; }
.steps b { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; background: #fff; color: var(--navy); display: grid; place-items: center; }
.steps strong { display: block; }
.steps span { font-size: 13px; color: #c9d1e4; }

main { padding-top: 28px; padding-bottom: 20px; scroll-margin-top: 70px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.chip { flex: 0 0 auto; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 8px 16px; cursor: pointer; text-align: left; line-height: 1.3; }
.chip strong { display: block; font-size: 14px; }
.chip span { font-size: 11px; color: var(--sub); }
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip.on span { color: #c9d1e4; }
.list-head { display: flex; align-items: baseline; gap: 10px; margin: 24px 0 14px; }
.list-head h2 { font-size: 22px; }
.list-head span { color: var(--sub); font-size: 14px; }
.list-head select { margin-left: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; background: #fff; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: 0 12px 28px rgba(19,26,42,.10); transform: translateY(-2px); }
.thumb { position: relative; border: 0; background: #fff; border-bottom: 1px solid var(--line); height: 210px; min-width: 0; cursor: pointer; display: grid; place-items: center; }
.thumb img { position: absolute; inset: 0; height: 100%; width: 100%; object-fit: contain; padding: 8px; }
.noimg { color: var(--sub); font-size: 13px; }
.badge { position: absolute; left: 12px; top: 12px; z-index: 1; font-size: 11px; font-weight: 700; background: var(--accent); color: #fff; border-radius: 6px; padding: 2px 8px; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.brand { font-size: 11px; font-weight: 700; color: var(--sub); letter-spacing: .8px; }
.card h3 { font-size: 20px; line-height: 1.2; }
.title { font-size: 13px; color: var(--sub); }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tags i { font-style: normal; font-size: 11px; background: var(--bg); border-radius: 6px; padding: 2px 8px; color: var(--sub); }
.card-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price { font-weight: 800; font-size: 17px; }
.price small { font-weight: 500; font-size: 11px; color: var(--sub); margin-left: 3px; }
.price.ask { font-size: 14px; color: var(--sub); font-weight: 600; }
.add { border: 1px solid var(--navy); background: #fff; border-radius: 8px; padding: 6px 14px; cursor: pointer; font-weight: 700; font-size: 13px; }
.add:hover { background: var(--navy); color: #fff; }

.empty { text-align: center; padding: 50px 0; color: var(--sub); }
.empty p { margin-bottom: 14px; }
.help { margin-top: 30px; margin-bottom: 40px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; max-width: 1120px; }
.help p { color: var(--sub); }
footer { background: #101626; color: #b9c0d1; padding: 34px 0 40px; font-size: 13px; }
footer strong { color: #fff; font-size: 15px; }
.fine { margin-top: 14px; color: #7f889d; font-size: 12px; }

.scrim { position: fixed; inset: 0; background: rgba(10,15,28,.5); z-index: 30; }
.modal { position: fixed; z-index: 40; left: 50%; top: 50%; transform: translate(-50%, -50%); align-content: start; width: min(780px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: auto; background: #fff; border-radius: 18px; display: grid; grid-template-columns: 280px 1fr; }
.modal .thumb { height: auto; min-height: 300px; cursor: default; border-bottom: 0; }
.modal-body { padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.modal h3 { font-size: 28px; line-height: 1.2; }
.sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.sizes button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 7px 14px; cursor: pointer; }
.sizes button.on { border-color: var(--navy); background: var(--navy); color: #fff; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; width: max-content; }
.qty button { width: 34px; height: 34px; border: 0; background: var(--bg); cursor: pointer; }
.qty input { width: 56px; height: 34px; border: 0; text-align: center; }
.docs { display: flex; gap: 14px; font-size: 13px; color: var(--navy); text-decoration: underline; }
.x { border: 0; background: none; font-size: 26px; cursor: pointer; line-height: 1; color: var(--sub); }
.xbar { grid-column: 1 / -1; position: sticky; top: 0; height: 0; z-index: 2; display: flex; justify-content: flex-end; }
.xbar .x { margin: 10px 12px 0 0; width: 34px; height: 34px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); }
.detail { grid-column: 1 / -1; border-top: 1px solid var(--line); padding: 8px 28px 28px; }
.detail section { padding: 18px 0; border-bottom: 1px solid var(--line); }
.detail section:last-child { border-bottom: 0; padding-bottom: 0; }
.detail h4 { font-size: 16px; margin-bottom: 8px; }
.detail p, .detail li, .detail td, .detail th { font-size: 14px; }
.detail ul, .detail ol { padding-left: 20px; margin-top: 6px; }
.detail .uses { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; counter-reset: use; }
.detail .uses li { counter-increment: use; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.detail .uses li::before { content: "예시 " counter(use); display: block; font-size: 11px; font-weight: 800; color: var(--accent); margin-bottom: 4px; }
.detail table { width: 100%; border-collapse: collapse; }
.detail th, .detail td { text-align: left; border-bottom: 1px solid var(--line); padding: 7px 10px; }
.detail th { width: 38%; background: var(--bg); font-weight: 700; }
.detail .note { font-size: 12px; color: var(--sub); margin-top: 8px; }

.drawer { position: fixed; z-index: 40; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); background: #fff; overflow: auto; padding: 18px 20px 30px; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.line { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; border-bottom: 1px solid var(--line); padding: 12px 0; }
.line .meta { font-size: 12px; color: var(--sub); }
.line .del { border: 0; background: none; color: var(--sub); font-size: 12px; cursor: pointer; text-decoration: underline; justify-self: end; }
.sum { padding: 12px 0; font-size: 14px; color: var(--sub); }
.sum b { color: var(--ink); font-size: 18px; }
#orderForm { display: grid; gap: 8px; }
#orderForm input, #orderForm textarea { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; width: 100%; }
#orderForm .invalid { border-color: var(--accent); }
.msg { font-size: 12px; color: var(--accent-dark); }
.toast { position: fixed; z-index: 50; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; border-radius: 999px; padding: 10px 20px; font-size: 14px; white-space: nowrap; }

@media (max-width: 760px) {
  .top-row { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; gap: 10px; justify-content: space-between; }
  .search { order: 3; flex: 1 0 100%; }
  .hero-grid { grid-template-columns: 1fr; gap: 24px; padding-top: 32px; padding-bottom: 32px; }
  .hero h1 { font-size: 27px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .thumb { height: 150px; }
  .card-body { padding: 10px 12px 12px; }
  .card h3 { font-size: 17px; }
  .card-foot { flex-direction: column; align-items: stretch; }
  .help { margin-left: 20px; margin-right: 20px; }
  .modal { grid-template-columns: 1fr; }
  .modal .thumb { min-height: 180px; }
  .modal .thumb { height: 220px; }
  .detail { padding: 4px 18px 22px; }
  .detail .uses { grid-template-columns: 1fr; }
}

.card .packs { font-size: 12px; color: var(--sub); margin: 2px 0 6px; }
.card .packs b { color: var(--ink); margin-right: 4px; }
.compare { padding-top: 40px; padding-bottom: 40px; scroll-margin-top: 80px; }
.compare h2 { font-size: 24px; }
.compare > p { color: var(--sub); font-size: 14px; margin-bottom: 14px; }
.compare-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.compare-tabs button { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 14px; cursor: pointer; font-size: 14px; }
.compare-tabs button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.compare table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; font-size: 13.5px; }
.compare th, .compare td { padding: 11px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.compare thead th { background: var(--navy); color: #fff; white-space: nowrap; }
.compare td ul { list-style: none; }
.compare .model { border: 0; background: none; cursor: pointer; font-weight: 800; text-decoration: underline; white-space: nowrap; }
@media (max-width: 760px) {
  .compare thead { display: none; }
  .compare table, .compare tbody, .compare tr, .compare td { display: block; width: 100%; }
  .compare table { background: none; }
  .compare tr { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; padding: 8px 0; }
  .compare td { border: 0; padding: 4px 14px; display: grid; grid-template-columns: 74px 1fr; gap: 8px; }
  .compare td::before { content: attr(data-th); color: var(--sub); font-size: 12px; }
}

.card { cursor: pointer; }
.tags i.cert { background: #e6f4ec; color: #0b6b3a; font-weight: 700; }
[data-design="dark"] .tags i.cert { background: #143524; color: #7fe0a8; }
.tags i.sea { background: #fdebd8; color: #a14a00; font-weight: 700; }
[data-design="dark"] .tags i.sea { background: #3d2a12; color: #ffc078; }

/* 접근성: 모바일에서 누르기 쉬운 크기(최소 40px) + 키보드 포커스 표시 */
@media (max-width: 760px) {
  .chip, .sizes button, .compare-tabs button, .cart-btn, .btn, .add, .x { min-height: 40px; }
  .qty button { width: 40px; height: 40px; }
  .docs a { display: inline-block; padding: 8px 4px; }
}
:focus-visible { outline: 3px solid #1f4fd8; outline-offset: 2px; }
.alt-contact { margin: 10px 0 0; font-size: 13px; line-height: 1.7; color: var(--sub); }
.alt-contact a { color: var(--navy); font-weight: 600; text-decoration: underline; padding: 4px 2px; }
.modal:focus, .drawer:focus { outline: none; }
.seo-list { margin-top: 28px; }
.seo-list details { background: var(--card, #fff); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; }
.seo-list summary { cursor: pointer; font-weight: 700; }
.seo-list h3 { font-size: 15px; margin: 18px 0 6px; }
.seo-list ul { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.8; color: var(--sub); }
.seo-list li strong { color: inherit; }
