@import url("/static/fonts/fonts.css");

/* jpdoll.shop 독립몰 (크몽 121596)
   참고 사이트(humnoid.com)의 배치와 리듬을 그대로 두고, 표면만 검정으로 뒤집었다.

   포인트 색은 참고 사이트의 주황(#FF4800)이 아니라 **고객 로고의 보라**를 쓴다.
   로고 PNG 의 평행사변형 면에서 뽑은 값이 #6D0CB1 (H 275.3deg, S .873, L .371).
   그런데 이 값은 검정 위 대비가 2.34:1 밖에 안 나와 글자색으로 못 쓴다. 그래서
   같은 색상각에서 밝기만 올린 #A96BEE (L .68, 검정 대비 6.02:1) 를 글자/테두리용으로
   따로 둔다. 채움(버튼 배경)에는 원본 보라를 쓰고 그 위에 흰 글자를 얹는다(8.97:1). */
:root {
  --bg: #000000;
  --surface: #0c0c0c;
  --surface-2: #141414;
  --line: #242424;
  --line-soft: #1a1a1a;
  --fg: #ffffff;
  --fg-muted: #9a9a9a;
  /* 검정 위 대비 7.46:1. 예전 값 #6C6C6C 는 4.00:1 로 AA(4.5:1) 미달이라 올렸다.
     푸터 카피라이트 / 약관 링크 / 19+ 문구 / section__eyebrow / pcard__sub / pcard__was 가 전부 이 토큰을 쓴다. */
  --fg-dim: #9a9a9a;
  --brand: #6d0cb1;      /* 로고에서 뽑은 원본 보라. 채움 전용 */
  --accent: #a96bee;     /* 같은 색상각을 밝힌 값. 검정 위 글자/테두리용 */
  --sans: "Inter", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --wrap: 1400px;
  --gut: 40px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  word-break: keep-all;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }

/* ---------------------------------------------------------------- 공지바 */
.notice {
  position: relative;
  background: #000;
  border-bottom: 1px solid var(--line-soft);
  height: 34px;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.notice__track {
  white-space: nowrap;
  font-size: 12px;
  color: #cfcfcf;
  letter-spacing: 0.01em;
  animation: notice-scroll 32s linear infinite;
  padding-left: 100%;
}
.notice__track span { padding-right: 6rem; }
@keyframes notice-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}
.notice__close {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: #8a8a8a; cursor: pointer; font-size: 15px; line-height: 1;
}
@media (prefers-reduced-motion: reduce) {
  .notice__track { animation: none; padding-left: 0; text-align: center; width: 100%; }
}

/* ---------------------------------------------------------------- 헤더 */
.header {
  position: relative;
  z-index: 30;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}
.header--overlay { position: absolute; left: 0; right: 0; border-bottom: 0; background: transparent; backdrop-filter: none; }
.header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 62px;
}
.header__nav, .header__util { display: flex; align-items: center; gap: 22px; font-size: 13px; }
.header__util { justify-content: flex-end; }
.header__nav a, .header__util a { color: #e6e6e6; transition: color .15s; }
.header__nav a:hover, .header__util a:hover { color: var(--accent); }
.wordmark { display: block; text-align: center; }
.wordmark img { height: 26px; width: auto; margin: 0 auto; }
.wordmark--text {
  font-weight: 700; letter-spacing: 0.28em; font-size: 17px;
  text-indent: 0.28em; white-space: nowrap;
}
.footer__logo { height: 30px; width: auto; margin-bottom: 16px; }
.cartbadge { position: relative; display: inline-block; }
.cartbadge__n {
  position: absolute; top: -7px; right: -10px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: var(--brand); color: #fff; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.burger { display: none; background: none; border: 0; color: #fff; font-size: 20px; cursor: pointer; padding: 0; }

/* ---------------------------------------------------------------- 히어로 */
.hero { position: relative; height: 783px; background: #000; overflow: hidden; }
.hero__slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .7s ease;
  background-size: cover; background-position: center;
}
.hero__slide.is-active { opacity: 1; }
.hero__slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.75) 0%, rgba(0,0,0,.35) 45%, rgba(0,0,0,.15) 100%);
}
.hero__body {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; justify-content: flex-end;
  max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut) 132px;
}
.hero__title { font-size: 40px; font-weight: 700; margin: 0 0 14px; line-height: 1.18; max-width: 620px; }
.hero__sub { font-size: 14px; color: #c9c9c9; margin: 0 0 26px; max-width: 520px; }
.btn-pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 148px; height: 44px; padding: 0 26px; border-radius: 999px;
  background: #fff; color: #000; font-size: 13px; font-weight: 600; border: 0; cursor: pointer;
  transition: background .15s, color .15s;
}
.btn-pill:hover { background: var(--brand); color: #fff; }
.hero__arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 44px; height: 44px; background: none; border: 0; color: #fff; font-size: 26px; cursor: pointer; opacity: .7;
}
.hero__arrow:hover { opacity: 1; }
.hero__arrow--prev { left: 16px; }
.hero__arrow--next { right: 16px; }
.hero__dots { position: absolute; right: var(--gut); bottom: 44px; z-index: 3; display: flex; gap: 9px; }
.hero__dot { width: 8px; height: 8px; border-radius: 50%; border: 0; background: rgba(255,255,255,.35); cursor: pointer; padding: 0; }
.hero__dot.is-active { background: #fff; }
.hero--empty { display: flex; align-items: center; justify-content: center; }

/* ---------------------------------------------------------------- 카테고리 3분할 */
.cat3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: var(--line-soft); }
.cat3__tile { position: relative; height: 478px; overflow: hidden; background: var(--surface); display: block; }
.cat3__img { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform .6s ease; }
.cat3__tile:hover .cat3__img { transform: scale(1.045); }
.cat3__tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 40%, rgba(0,0,0,.82) 100%); }
.cat3__body { position: absolute; left: 32px; right: 32px; bottom: 34px; z-index: 2; }
.cat3__name { font-size: 26px; font-weight: 700; margin: 0 0 8px; }
.cat3__copy { font-size: 12.5px; color: #bdbdbd; margin: 0; max-width: 340px; }

/* ---------------------------------------------------------------- 섹션 */
.section { padding: 84px 0 76px; }
.section__head { text-align: center; margin-bottom: 40px; }
.section__eyebrow { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--fg-dim); margin: 0 0 10px; }
.section__title { font-size: 24px; font-weight: 700; margin: 0; letter-spacing: -0.02em; }

/* ---------------------------------------------------------------- 상품 그리드 */
.pgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px 26px; }
.pcard { display: block; }
.pcard__thumb {
  position: relative; aspect-ratio: 1 / 1; background: var(--surface-2);
  overflow: hidden; border: 1px solid var(--line-soft);
}
.pcard__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.pcard:hover .pcard__thumb img { transform: scale(1.05); }
.pcard__ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--fg-dim); font-size: 12px; }
.pcard__flag {
  position: absolute; left: 10px; top: 10px; z-index: 2;
  background: var(--brand); color: #fff; font-size: 10px; font-weight: 700;
  padding: 3px 7px; letter-spacing: .04em;
}
.pcard__flag--soldout { background: #333; }
.pcard__name { font-size: 13px; font-weight: 500; margin: 14px 0 4px; line-height: 1.45; }
.pcard__sub { font-size: 11.5px; color: var(--fg-dim); margin: 0 0 8px; }
.pcard__price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pcard__off { color: var(--accent); font-weight: 700; font-size: 13px; }
.pcard__now { font-weight: 700; font-size: 13.5px; }
.pcard__was { color: var(--fg-dim); font-size: 12px; text-decoration: line-through; }

.more-wrap { display: flex; justify-content: center; margin-top: 52px; }
.btn-round {
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line);
  background: transparent; color: #fff; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .15s, border-color .15s;
}
.btn-round:hover { background: var(--brand); border-color: var(--brand); }

/* ---------------------------------------------------------------- MD Choice */
.md { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 60px; align-items: start; }
.md__gallery { }
.md__main { aspect-ratio: 1 / 1; background: var(--surface-2); border: 1px solid var(--line-soft); overflow: hidden; }
.md__main img { width: 100%; height: 100%; object-fit: cover; }
.md__thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.md__thumb { width: 62px; height: 62px; border: 1px solid var(--line); background: var(--surface-2); padding: 0; cursor: pointer; overflow: hidden; }
.md__thumb img { width: 100%; height: 100%; object-fit: cover; }
.md__thumb.is-active { border-color: var(--accent); }
.md__title { font-size: 22px; font-weight: 700; margin: 0 0 12px; line-height: 1.4; }
.md__price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 22px; }
.md__box { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 16px 0; margin-bottom: 18px; }
.md__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.md__row-name { font-size: 12.5px; color: var(--fg-muted); flex: 1; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); }
.qty button { width: 30px; height: 30px; background: none; border: 0; color: #fff; cursor: pointer; font-size: 14px; }
.qty input { width: 42px; height: 30px; background: none; border: 0; color: #fff; text-align: center; font-size: 13px; }
.md__total { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 20px; }
.md__total-label { font-size: 12px; letter-spacing: .12em; color: var(--fg-muted); }
.md__total-value { font-size: 20px; font-weight: 700; }
.md__actions { display: flex; gap: 8px; }
.btn-buy {
  flex: 1; height: 52px; background: #fff; color: #000; border: 0; font-size: 14px; font-weight: 700; cursor: pointer;
  transition: background .15s, color .15s;
}
.btn-buy:hover { background: var(--brand); color: #fff; }
.btn-icon {
  width: 52px; height: 52px; border: 1px solid var(--line); background: transparent; color: #fff;
  cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center;
}
.btn-icon:hover { border-color: var(--accent); color: var(--accent); }

/* ---------------------------------------------------------------- 푸터 */
.footer { border-top: 1px solid var(--line-soft); background: #050505; padding: 62px 0 46px; margin-top: 40px; }
.footer__cols { display: grid; grid-template-columns: 1.3fr 1fr 1.8fr 1fr auto; gap: 34px; }
.footer__wordmark { font-weight: 700; letter-spacing: .26em; font-size: 15px; margin-bottom: 16px; }
.footer__copy { font-size: 11.5px; color: var(--fg-dim); }
.footer__h { font-size: 12px; font-weight: 700; margin: 0 0 14px; letter-spacing: .02em; color: #fff; }
/* 참고 사이트는 흰 배경 위 회색이라 그대로 쓰면 검정 위에서 안 읽힌다. 대비를 올린 회색을 쓴다. */
.footer__list { list-style: none; margin: 0; padding: 0; font-size: 12px; color: #b4b4b4; }
.footer__list li { margin-bottom: 7px; line-height: 1.65; }
.footer__list a { color: #b4b4b4; }
.footer__list a:hover { color: var(--accent); }
.footer__cs-phone { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 8px; color: #fff; }
.footer__cs-hours { font-size: 12px; color: #b4b4b4; white-space: pre-line; line-height: 1.7; }
.biz { font-size: 12px; color: #b4b4b4; line-height: 1.8; }
.biz b { color: #d8d8d8; font-weight: 500; }
.biz a.biz__check { color: var(--accent); text-decoration: underline; margin-left: 4px; }
.footer__bottom { margin-top: 42px; padding-top: 20px; border-top: 1px solid var(--line-soft); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 11.5px; color: var(--fg-dim); }
.footer__policies { display: flex; gap: 16px; flex-wrap: wrap; }
.footer__policies a:hover { color: var(--accent); }

/* ---------------------------------------------------------------- 공용 폼/페이지 */
.page { padding: 54px 0 80px; }
.page__title { font-size: 26px; font-weight: 700; margin: 0 0 6px; }
.page__lead { color: var(--fg-muted); font-size: 13px; margin: 0 0 34px; }
.crumbs { font-size: 11.5px; color: var(--fg-dim); margin-bottom: 12px; }
.crumbs a:hover { color: var(--accent); }

.filters { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 30px; padding-bottom: 16px; border-bottom: 1px solid var(--line-soft); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 7px 15px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; color: #ddd; }
.chip.is-active, .chip:hover { border-color: var(--accent); color: var(--accent); }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; color: var(--fg-muted); margin-bottom: 6px; }
.field input[type=text], .field input[type=tel], .field input[type=email], .field input[type=password],
.field input[type=number], .field select, .field textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--line); color: var(--fg);
  padding: 11px 13px; font-size: 13px; font-family: inherit; border-radius: 2px;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--accent); }
.field .hint { font-size: 11.5px; color: var(--fg-dim); margin-top: 5px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 22px; border: 1px solid var(--line); background: transparent; color: #fff;
  font-size: 13px; font-weight: 500; cursor: pointer; border-radius: 2px;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn--primary { background: #fff; color: #000; border-color: #fff; font-weight: 700; }
.btn--primary:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn--accent { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
.btn--accent:hover { filter: brightness(1.1); color: #fff; }
.btn--block { width: 100%; }
.btn--lg { height: 54px; font-size: 14px; }

.alert { padding: 13px 16px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; margin-bottom: 22px; border-radius: 2px; }
.alert--error { border-color: #a33; color: #ff9d8a; }
.alert--ok { border-color: #2b6; color: #8ce8b0; }
.alert--warn { border-color: #7a5b17; color: #f0c674; }

.empty { text-align: center; padding: 90px 0; color: var(--fg-dim); }

/* 표 */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 13px 12px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: middle; }
.table th { font-size: 11.5px; color: var(--fg-muted); font-weight: 500; letter-spacing: .04em; }
.table td.num, .table th.num { text-align: right; }

/* 장바구니/주문 요약 */
.summary { border: 1px solid var(--line); background: var(--surface); padding: 24px; border-radius: 2px; }
.summary__row { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 11px; color: var(--fg-muted); }
.summary__row b { color: #fff; font-weight: 500; }
.summary__total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 15px; margin-top: 15px; }
.summary__total span { font-size: 12px; letter-spacing: .1em; color: var(--fg-muted); }
.summary__total b { font-size: 21px; }
.cols-cart { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 40px; align-items: start; }

.linei { display: flex; gap: 14px; align-items: center; }
.linei__img { width: 68px; height: 68px; object-fit: cover; background: var(--surface-2); border: 1px solid var(--line-soft); flex: none; }
.linei__name { font-size: 13px; }
.linei__meta { font-size: 11.5px; color: var(--fg-dim); }

/* 상품 상세 */
.pd { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.pd__desc { margin-top: 70px; border-top: 1px solid var(--line-soft); padding-top: 40px; }
.pd__desc h3 { font-size: 15px; margin: 0 0 18px; }
.pd__desc p { color: #c4c4c4; font-size: 13.5px; line-height: 1.9; margin: 0 0 14px; }
.badge { display: inline-block; font-size: 10px; letter-spacing: .08em; padding: 3px 8px; border: 1px solid var(--line); color: var(--fg-muted); margin-bottom: 12px; }

/* 성인 확인 */
.adult { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.adult__box { max-width: 460px; width: 100%; border: 1px solid var(--line); background: var(--surface); padding: 44px 36px; text-align: center; border-radius: 3px; }
.adult__mark { font-size: 34px; font-weight: 700; color: var(--accent); margin-bottom: 18px; letter-spacing: -0.03em; }
.adult__box h1 { font-size: 18px; margin: 0 0 12px; }
.adult__box p { font-size: 13px; color: var(--fg-muted); margin: 0 0 26px; line-height: 1.8; }
.adult__actions { display: flex; gap: 10px; }
.adult__actions form { flex: 1; }

/* 스크롤 등장. 참고 사이트와 같은 수준(IntersectionObserver + opacity/translate)만 쓴다.
   애니메이션 라이브러리를 넣지 않는다.

   **숨기는 규칙은 반드시 .js 아래에만 둔다.** 기본값을 opacity:0 으로 두면
   자바스크립트가 죽거나 IntersectionObserver 가 안 도는 환경(스크린샷 렌더러,
   일부 인앱 브라우저, 크롤러)에서 상품이 통째로 안 보인다. 실제로 배포 직후
   전체 페이지 스크린샷에서 접힘 아래가 전부 까맣게 나왔다. 되돌리지 말 것. */
.reveal { opacity: 1; transform: none; }
html.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
html.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------------------------------------------------------------- 반응형 */
@media (max-width: 1100px) {
  :root { --gut: 24px; }
  .pgrid { grid-template-columns: repeat(3, 1fr); gap: 32px 20px; }
  .footer__cols { grid-template-columns: 1fr 1fr 1fr; }
}

@media (max-width: 860px) {
  .header__inner { grid-template-columns: auto 1fr auto; height: 56px; }
  .header__nav { display: none; }
  .header__nav.is-open {
    display: flex; position: absolute; top: 56px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: #0a0a0a; border-bottom: 1px solid var(--line); padding: 8px 24px 16px;
  }
  .header__nav.is-open a { padding: 12px 0; width: 100%; border-bottom: 1px solid var(--line-soft); }
  .burger { display: block; }
  .header__util { gap: 16px; }
  .header__util .util-text { display: none; }
  .wordmark img { height: 21px; }
  .wordmark--text { font-size: 15px; }

  .hero { height: 520px; }
  .hero__body { padding-bottom: 92px; }
  .hero__title { font-size: 27px; }
  .hero__sub { font-size: 13px; }
  .hero__arrow { display: none; }
  .hero__dots { left: var(--gut); right: auto; bottom: 34px; }

  .cat3 { grid-template-columns: 1fr; }
  .cat3__tile { height: 300px; }
  .cat3__name { font-size: 21px; }

  .section { padding: 56px 0 50px; }
  .pgrid { grid-template-columns: repeat(2, 1fr); gap: 28px 14px; }

  .md { grid-template-columns: 1fr; gap: 30px; }
  .pd { grid-template-columns: 1fr; gap: 30px; }
  .cols-cart { grid-template-columns: 1fr; gap: 26px; }
  .row2 { grid-template-columns: 1fr; }

  .footer__cols { grid-template-columns: 1fr; gap: 30px; }
  .table th:nth-child(n+4), .table td:nth-child(n+4) { display: none; }
}
