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

:root {
  --bg: #faf7f5;
  --surface: #ffffff;
  --ink: #241a18;
  --body-text: #4a3d3a;
  --muted: #8a7b77;
  --line: #ece3e0;
  --accent: #e01e26;
  --accent-ink: #b3131a;
  --accent-soft: #fdeceb;
  --rocket: #0b5fd0;
  --rocket-soft: #e8f3ff;
  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont,
          'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17110f;
    --surface: #211a18;
    --ink: #f1e9e7;
    --body-text: #d2c4c1;
    --muted: #9c8d89;
    --line: #362b28;
    --accent: #ff5a5f;
    --accent-ink: #ff8a8d;
    --accent-soft: #3a2020;
    --rocket: #6ab0ff;
    --rocket-soft: #172a3d;
  }
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body-text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}

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

a { color: inherit; }

/* ── 헤더 ───────────────────────────────────────────────── */

.site-header {
  padding-block: 36px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.brand {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-transform: uppercase;
}

.tagline {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
  text-wrap: balance;
}

/* ── 배너 슬롯 ───────────────────────────────────────────── */

.banner-slot {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

/* ── 본문 ───────────────────────────────────────────────── */

main.wrap { padding-block: 32px 60px; }

.notice {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
}

.empty-state {
  padding: 48px 24px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
}

.empty-state p { margin: 0 0 6px; font-size: 15px; }
.empty-sub { font-size: 13.5px; opacity: 0.85; }

.category-group { margin-bottom: 40px; }

.category-group h2 {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--accent);
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--line);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .15s, transform .15s, border-color .15s;
}

.product-card:hover {
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
  transform: translateY(-2px);
}

.product-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-link img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--bg);
}

.product-image-fallback {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--bg);
}

.product-body { padding: 12px 14px 6px; }

.product-name {
  margin: 0 0 6px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.badge-rocket {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 6px;
  border-radius: 8px;
  background: var(--rocket-soft);
  color: var(--rocket);
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
}

.product-price {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--accent);
}

.product-footer {
  padding: 8px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-cta {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-ink);
  text-decoration: none;
}

.product-detail {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
}

.product-cta:hover, .product-detail:hover { text-decoration: underline; }

/* ── 푸터 ───────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 24px 40px;
  color: var(--muted);
  font-size: 12.5px;
}

.site-footer p { margin: 0 0 6px; }
.site-footer a { color: var(--muted); text-decoration: underline; }
.footer-note { opacity: 0.85; }

/* ── 약관 페이지 (privacy.html) ─────────────────────────── */

.legal-page {
  padding-block: 32px 60px;
  max-width: 640px;
}

.legal-page section { margin-bottom: 28px; }

.legal-page h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 10px;
}

.legal-page p {
  margin: 0 0 8px;
  font-size: 14.5px;
  color: var(--body-text);
}

.legal-page ul {
  margin: 8px 0 0;
  padding-left: 20px;
  font-size: 14.5px;
  color: var(--body-text);
  line-height: 1.9;
}

/* ── 모바일 ─────────────────────────────────────────────── */

@media (max-width: 480px) {
  .tagline { font-size: 20px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
}
