/*
Theme Name: Coupang Onepage
Description: 쿠팡파트너스 단일 상품 소개용 원페이지 테마. 플러그인 없이 커스터마이저(외모 → 사용자 정의)에서 상품 정보만 입력하면 완성됩니다.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: coupang-onepage
*/

:root {
  --ink: #17202c;
  --ink-soft: #4b5563;
  --ink-muted: #8b95a1;
  --line: #e6e9ef;
  --bg: #ffffff;
  --bg-alt: #f7f8fa;
  --price: #e03131;
  --cta: #2b5ce6;
  --cta-dark: #1e46bd;
  --good-bg: #eef7ee;
  --good-text: #23662b;
  --bad-bg: #fdeeee;
  --bad-text: #9c2b2b;
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; height: 60px;
}
.site-logo {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 16px;
  min-width: 0; flex: 1;
}
.site-logo span {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.site-logo img, .site-logo svg { width: 26px; height: 26px; flex-shrink: 0; border-radius: 6px; }
.header-cta {
  font-size: 14px; font-weight: 600; color: #fff;
  background: var(--cta); padding: 8px 16px; border-radius: 999px;
  transition: background .15s ease;
  white-space: nowrap; flex-shrink: 0;
}
.header-cta:hover { background: var(--cta-dark); }

/* ---------- hero ---------- */
.hero { padding: 44px 0 36px; text-align: center; }
.badge {
  display: inline-block; font-size: 13px; font-weight: 700;
  color: var(--cta); background: #eaf0fe;
  padding: 4px 12px; border-radius: 999px; margin-bottom: 14px;
}
.hero h1 { font-size: 28px; line-height: 1.35; letter-spacing: -.02em; }
.hero .subtitle { margin-top: 8px; font-size: 17px; color: var(--ink-soft); }

.gallery { margin: 28px auto 0; max-width: 480px; }
.gallery-main {
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: #fff; aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
}
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 10px; }
.gallery-thumbs button {
  width: 64px; height: 64px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; cursor: pointer; overflow: hidden; padding: 0;
}
.gallery-thumbs button.active { border-color: var(--cta); box-shadow: 0 0 0 2px rgba(43,92,230,.15); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; }

.rating { margin-top: 20px; font-size: 15px; color: var(--ink-soft); }
.rating .stars { color: #f5a623; letter-spacing: 2px; margin-right: 6px; }
.rating strong { color: var(--ink); font-size: 16px; }

.price-box { margin-top: 14px; }
.price-original {
  font-size: 15px; color: var(--ink-muted); text-decoration: line-through;
}
.price-row {
  display: flex; align-items: baseline; justify-content: center; gap: 10px; margin-top: 2px;
}
.discount { font-size: 24px; font-weight: 800; color: var(--price); }
.price-label { font-size: 15px; color: var(--ink-soft); }
.price { font-size: 34px; font-weight: 800; color: var(--price); letter-spacing: -.02em; }
.price small { font-size: 20px; font-weight: 700; }

.cta-btn {
  display: block; max-width: 480px; margin: 26px auto 0;
  background: var(--cta); color: #fff; text-align: center;
  font-size: 17px; font-weight: 700; padding: 17px 20px;
  border-radius: var(--radius);
  transition: background .15s ease, transform .1s ease;
}
.cta-btn:hover { background: var(--cta-dark); }
.cta-btn:active { transform: scale(.985); }
.cta-disclosure {
  margin-top: 18px; font-size: 13px; color: var(--ink-soft); text-align: center; line-height: 1.8;
}
.cta-note { margin-top: 10px; font-size: 13px; color: var(--ink-muted); text-align: center; line-height: 1.8; }

/* ---------- sections ---------- */
.section { padding: 40px 0; border-top: 1px solid var(--line); }
.section-alt { background: var(--bg-alt); }
.section h2 {
  font-size: 21px; letter-spacing: -.01em; margin-bottom: 20px;
  display: flex; align-items: center; gap: 8px;
}
.section h2::before {
  content: ""; width: 4px; height: 18px; border-radius: 2px; background: var(--cta);
}

/* specs */
.spec-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.spec-table tr { border-bottom: 1px solid var(--line); }
.spec-table tr:last-child { border-bottom: none; }
.spec-table th {
  text-align: left; font-weight: 500; color: var(--ink-soft);
  padding: 12px 8px; width: 34%; white-space: nowrap;
}
.spec-table td { padding: 12px 8px; font-weight: 600; }

/* pros & cons */
.pc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pc-card { border-radius: var(--radius); padding: 20px; font-size: 15px; }
.pc-card.good { background: var(--good-bg); }
.pc-card.bad { background: var(--bad-bg); }
.pc-card h3 { font-size: 15px; margin-bottom: 12px; }
.pc-card.good h3 { color: var(--good-text); }
.pc-card.bad h3 { color: var(--bad-text); }
.pc-card ul { list-style: none; }
.pc-card li { padding: 4px 0 4px 22px; position: relative; }
.pc-card.good li::before { content: "✓"; position: absolute; left: 0; color: var(--good-text); font-weight: 700; }
.pc-card.bad li::before { content: "✕"; position: absolute; left: 0; color: var(--bad-text); font-weight: 700; }

/* targets */
.target-list { list-style: none; display: grid; gap: 10px; }
.target-list li {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 16px 13px 44px; font-size: 15px; font-weight: 500; position: relative;
}
.target-list li::before {
  content: "👍"; position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
}

/* review body */
.review-body { font-size: 16px; color: #2c3540; }
.review-body p { margin-bottom: 1.1em; }
.review-body h3 { font-size: 18px; margin: 1.6em 0 .6em; }
.review-body img { border-radius: 12px; margin: 1em 0; }

/* final cta */
.final-cta { text-align: center; padding: 48px 0 56px; }
.final-cta p.lead { font-size: 19px; font-weight: 700; margin-bottom: 4px; }
.final-cta p.sub { font-size: 15px; color: var(--ink-soft); }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line); background: var(--bg-alt);
  padding: 28px 0 110px; text-align: center;
}
.disclosure {
  font-size: 13px; color: var(--ink-soft); background: #fff;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 16px; display: inline-block; margin-bottom: 14px;
}
.copyright { font-size: 12px; color: var(--ink-muted); }

/* ---------- sticky mobile cta ---------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: rgba(255,255,255,.95); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 12px;
}
.sticky-cta .sc-price { font-size: 17px; font-weight: 800; color: var(--price); white-space: nowrap; }
.sticky-cta a {
  flex: 1; background: var(--cta); color: #fff; text-align: center;
  font-size: 15px; font-weight: 700; padding: 13px 10px; border-radius: 12px;
}
.sticky-cta a:hover { background: var(--cta-dark); }

@media (min-width: 768px) {
  .hero h1 { font-size: 34px; }
  .site-footer { padding-bottom: 28px; }
  .sticky-cta { display: none; }
}

@media (max-width: 520px) {
  .pc-grid { grid-template-columns: 1fr; }
  .price { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cta-btn, .header-cta { transition: none; }
}
