/* =========================================================================
 *  STYLE  —  테마 색상은 config.js 에서 CSS 변수로 주입됩니다.
 *  (색상만 바꾸려면 config.js 의 theme 값을 수정하세요)
 * ========================================================================= */

:root {
  --c-primary: #2563eb;
  --c-primary-dark: #1d4ed8;
  --c-accent: #f59e0b;
  --c-bg: #f8fafc;
  --c-surface: #ffffff;
  --c-text: #1e293b;
  --c-text-muted: #64748b;
  --radius: 16px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 20px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
}

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

body {
  font-family: "Pretendard", "Noto Sans KR", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--c-surface);
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  max-width: 1100px;
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; }
.brand .logo { font-size: 1.6rem; }
.brand-tagline { font-size: 0.8rem; color: var(--c-text-muted); font-weight: 500; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark));
  color: #fff;
  padding: 56px 20px 64px;
  text-align: center;
}
.hero h1 { font-size: 2.1rem; font-weight: 800; margin-bottom: 12px; letter-spacing: -0.02em; }
.hero p { font-size: 1.05rem; opacity: 0.92; margin-bottom: 28px; }

.search-box {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  background: #fff;
  border-radius: 999px;
  padding: 6px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}
.search-box input {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 20px;
  font-size: 1rem;
  border-radius: 999px;
  background: transparent;
  color: var(--c-text);
}
.search-box button {
  background: var(--c-accent);
  color: #fff;
  border: none;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  font-size: 1rem;
  transition: filter 0.2s;
}
.search-box button:hover { filter: brightness(0.94); }

/* ---------- Categories ---------- */
.category-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 24px 20px 8px;
}
.cat-chip {
  background: var(--c-surface);
  border: 1px solid #e2e8f0;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  color: var(--c-text-muted);
}
.cat-chip:hover { border-color: var(--c-primary); color: var(--c-primary); }
.cat-chip.active {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
}

/* ---------- Card Grid ---------- */
.section-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin: 32px 0 4px;
}
.result-meta { color: var(--c-text-muted); font-size: 0.9rem; margin-bottom: 20px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}
.card {
  background: var(--c-surface);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  border: 1px solid #eef2f7;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card-cat {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--c-primary);
  margin-bottom: 8px;
}
.card h3 { font-size: 1.12rem; font-weight: 700; margin-bottom: 10px; letter-spacing: -0.01em; }
.card p { color: var(--c-text-muted); font-size: 0.92rem; flex: 1; }
.card-footer {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  align-items: center;
}
.badge {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--c-primary);
  font-weight: 600;
}
.badge.time { background: #f1f5f9; color: var(--c-text-muted); }

.no-result {
  text-align: center;
  padding: 60px 20px;
  color: var(--c-text-muted);
}
.no-result .big { font-size: 3rem; margin-bottom: 12px; }

/* ---------- Ad Slot ---------- */
.ad-slot {
  margin: 28px 0;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}
.ad-placeholder {
  width: 100%;
  min-height: 90px;
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.85rem;
  background: #f8fafc;
}

/* ---------- Detail Page ---------- */
.detail-wrap { padding: 40px 0 60px; }
.breadcrumb { font-size: 0.88rem; color: var(--c-text-muted); margin-bottom: 20px; }
.breadcrumb a:hover { color: var(--c-primary); }

.detail-header h1 { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 12px; }
.detail-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.detail-intro {
  background: #eff6ff;
  border-left: 4px solid var(--c-primary);
  padding: 16px 20px;
  border-radius: 8px;
  color: #334155;
  margin-bottom: 32px;
}

.steps { list-style: none; counter-reset: step; }
.step {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid #eef2f7;
}
.step-num {
  counter-increment: step;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.step-num::before { content: counter(step); }
.step-body h4 { font-size: 1.05rem; margin-bottom: 4px; }
.step-body p { color: var(--c-text-muted); }

.tips-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 20px 24px;
  margin: 28px 0;
}
.tips-box h3 { font-size: 1.05rem; margin-bottom: 10px; color: #b45309; }
.tips-box ul { padding-left: 20px; color: #78350f; }
.tips-box li { margin-bottom: 6px; }

/* ---------- Warning Box ---------- */
.warning-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 4px solid #ef4444;
  border-radius: 12px;
  padding: 18px 22px;
  margin: 24px 0;
}
.warning-box h3 { font-size: 1.05rem; margin-bottom: 10px; color: #b91c1c; }
.warning-box ul { padding-left: 20px; color: #7f1d1d; }
.warning-box li { margin-bottom: 6px; }

/* ---------- Experience Box (운영자 경험담) ---------- */
.experience-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 18px 22px;
  margin: 24px 0;
}
.experience-box .exp-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #15803d;
  background: #dcfce7;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.experience-box p { color: #14532d; font-style: italic; }

/* ---------- FAQ ---------- */
.faq-section { margin: 36px 0; }
.faq-section h3 { font-size: 1.25rem; margin-bottom: 16px; }
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: var(--c-surface);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 4px 20px;
  transition: box-shadow 0.2s;
}
.faq-item[open] { box-shadow: var(--shadow); }
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  padding: 14px 0;
  list-style: none;
  position: relative;
  padding-right: 28px;
  color: var(--c-text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  color: var(--c-primary);
  font-weight: 400;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p { color: var(--c-text-muted); padding: 0 0 16px; line-height: 1.7; }

/* ---------- Products (Affiliate) ---------- */
.products-section { margin: 36px 0; }
.products-section h3 { font-size: 1.25rem; margin-bottom: 6px; }
.products-note { font-size: 0.85rem; color: var(--c-text-muted); margin-bottom: 18px; }
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.product-card {
  background: var(--c-surface);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
}
.product-card .p-badge {
  align-self: flex-start;
  font-size: 0.72rem;
  background: var(--c-accent);
  color: #fff;
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 700;
  margin-bottom: 10px;
}
.product-card h4 { font-size: 1.02rem; margin-bottom: 6px; }
.product-card .p-desc { color: var(--c-text-muted); font-size: 0.88rem; flex: 1; margin-bottom: 12px; }
.product-card .p-price { font-weight: 800; color: var(--c-text); margin-bottom: 12px; }
.product-card .p-cta {
  display: block;
  text-align: center;
  background: var(--c-primary);
  color: #fff;
  padding: 10px;
  border-radius: 8px;
  font-weight: 700;
  transition: background 0.2s;
}
.product-card .p-cta:hover { background: var(--c-primary-dark); }

.affiliate-disclosure {
  font-size: 0.78rem;
  color: #94a3b8;
  background: #f1f5f9;
  padding: 12px 16px;
  border-radius: 8px;
  margin-top: 20px;
}

/* ---------- Legal / Static Pages ---------- */
.page-updated { color: var(--c-text-muted); font-size: 0.88rem; margin-bottom: 8px; }
.legal-content { max-width: 760px; }
.legal-content h3 {
  font-size: 1.12rem;
  font-weight: 700;
  margin: 28px 0 10px;
  color: var(--c-text);
}
.legal-content p { color: #334155; margin-bottom: 12px; }
.legal-content ul { padding-left: 22px; margin-bottom: 14px; color: #334155; }
.legal-content li { margin-bottom: 6px; }
.legal-content a { color: var(--c-primary); text-decoration: underline; }
.legal-content strong { color: var(--c-text); }

/* ---------- Related ---------- */
.related-section { margin-top: 44px; }
.related-section h3 { font-size: 1.2rem; margin-bottom: 16px; }

/* ---------- Footer ---------- */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 40px 20px 32px;
  margin-top: 40px;
}
.footer-inner { max-width: 1100px; margin: 0 auto; text-align: center; }
.footer-brand { font-weight: 800; font-size: 1.1rem; color: #fff; margin-bottom: 10px; }
.footer-links { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.footer-links a { font-size: 0.9rem; color: #94a3b8; }
.footer-links a:hover { color: #fff; }
.footer-copy { font-size: 0.82rem; color: #64748b; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .hero h1 { font-size: 1.6rem; }
  .hero { padding: 40px 20px 48px; }
  .brand-tagline { display: none; }
  .card-grid { grid-template-columns: 1fr; }
  .search-box button { padding: 12px 18px; }
}
