/*
 * TekCheck Design System
 * P0: Color palette, Badge system, Spacing
 */

/* ── Design Tokens ── */
:root {
  /* Primary: 딥 네이비 (신뢰, 전문) */
  --tc-primary: #1e293b;       /* slate-800 */
  --tc-primary-light: #334155; /* slate-700 */

  /* Accent: 가격/CTA */
  --tc-accent: #2563eb;        /* blue-600 */
  --tc-accent-light: #dbeafe;  /* blue-100 */
  --tc-accent-dark: #1d4ed8;   /* blue-700 */

  /* Deal: 할인/절약 */
  --tc-deal: #dc2626;          /* red-600 */
  --tc-deal-light: #fef2f2;    /* red-50 */

  /* Drop: 가격 하락 */
  --tc-drop: #059669;          /* emerald-600 */
  --tc-drop-light: #ecfdf5;    /* emerald-50 */

  /* Section spacing */
  --tc-section-y: 2rem;        /* py-8 */
  --tc-section-y-lg: 3rem;     /* py-12 */
  --tc-card-px: 1.25rem;       /* px-5 */
}

/* ── Badge System ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  border-radius: 0.375rem;
  line-height: 1.5;
  white-space: nowrap;
}

.badge-cheapest {
  background-color: var(--tc-accent-light);
  color: var(--tc-accent-dark);
}

.badge-discount {
  background-color: var(--tc-deal-light);
  color: var(--tc-deal);
}

.badge-drop {
  background-color: var(--tc-drop);
  color: white;
}

.badge-official {
  background-color: #f0fdf4;
  color: #15803d;
}

.badge-soldout {
  background-color: #f3f4f6;
  color: #6b7280;
}

/* ── Section Spacing ── */
.section-gap {
  padding-top: var(--tc-section-y);
  padding-bottom: var(--tc-section-y);
}

.section-gap-lg {
  padding-top: var(--tc-section-y-lg);
  padding-bottom: var(--tc-section-y-lg);
}

/* ── Guide Content (LLM 생성 HTML 스타일링) ── */
.guide-content h2 { font-size: 1.25rem; font-weight: 800; margin-top: 2rem; margin-bottom: 0.75rem; padding-bottom: 0.5rem; border-bottom: 1px solid #e2e8f0; }
.guide-content h3 { font-size: 1.05rem; font-weight: 700; margin-top: 1.5rem; margin-bottom: 0.5rem; }
.guide-content p { margin-bottom: 0.75rem; font-size: 0.9375rem; line-height: 1.7; color: #334155; }
.guide-content ul, .guide-content ol { margin-bottom: 0.75rem; padding-left: 1.25rem; }
.guide-content li { margin-bottom: 0.25rem; font-size: 0.9375rem; color: #334155; }
.guide-content strong { color: #1e293b; }
.guide-content table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.875rem; }
.guide-content th, .guide-content td { padding: 0.6rem 0.75rem; border: 1px solid #e2e8f0; text-align: left; }
.guide-content th { background: #f8fafc; font-weight: 600; }
.guide-content a { color: var(--tc-accent); text-decoration: underline; text-underline-offset: 2px; }
.guide-content a:hover { color: var(--tc-accent-dark); }
.guide-content img { max-width: 100%; height: auto; border-radius: 0.75rem; margin: 1rem 0; }
.guide-content details { margin: 0.75rem 0; }
.guide-content summary { font-size: 0.8125rem; color: #94a3b8; cursor: pointer; }

/* ── Guide Card System (LLM 생성 카드 UI) ── */
.guide-content .card { background: white; border-radius: 14px; margin-bottom: 14px; overflow: hidden; border: 1px solid #e2e8f0; }
.guide-content .card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
.guide-content .product { padding: 20px; }
.guide-content .rank { font-size: 12px; font-weight: 800; color: #2563eb; margin-bottom: 2px; }
.guide-content .pname { font-size: 17px; font-weight: 800; margin: 0 0 2px; border: none; padding: 0; }
.guide-content .pbrand { font-size: 13px; color: #64748b; margin-bottom: 14px; }

.guide-content .price-area { margin-bottom: 14px; }
.guide-content .price-now { font-size: 24px; font-weight: 800; color: #1e293b; }
.guide-content .price-info { font-size: 13px; color: #64748b; margin-top: 2px; }
.guide-content .price-info s { color: #94a3b8; }
.guide-content .price-info .red { color: #dc2626; font-weight: 700; }

.guide-content .summary-text { font-size: 14px; color: #334155; margin-bottom: 14px; line-height: 1.7; }

.guide-content .tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 16px; }
.guide-content .tag { background: #f1f5f9; color: #475569; font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 99px; }

.guide-content .stores { border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; margin-bottom: 14px; }
.guide-content .store-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; font-size: 13.5px; }
.guide-content .store-row:not(:last-child) { border-bottom: 1px solid #f1f5f9; }
.guide-content .store-row.best { background: #f0f9ff; }
.guide-content .store-name { font-weight: 600; }
.guide-content .store-price { font-weight: 700; }
.guide-content .store-diff { font-size: 12px; color: #94a3b8; margin-left: 6px; }
.guide-content .store-tag { font-size: 10px; font-weight: 700; color: #2563eb; background: #dbeafe; padding: 2px 7px; border-radius: 99px; margin-left: 6px; }

.guide-content .cta-row { display: flex; gap: 8px; margin-bottom: 6px; }
.guide-content .cta { flex: 1; display: block; text-align: center; padding: 12px; border-radius: 10px; font-size: 14px; font-weight: 700; text-decoration: none; }
.guide-content .cta-primary { background: #1e293b; color: white; }
.guide-content .cta-primary:hover { background: #334155; color: white; }
.guide-content .cta-secondary { background: #f1f5f9; color: #475569; }
.guide-content .cta-secondary:hover { background: #e2e8f0; color: #1e293b; }

.guide-content .summary-section { padding: 20px; }
.guide-content .summary-section h2 { font-size: 17px; font-weight: 800; margin: 0 0 14px; border: none; padding: 0; }
.guide-content .srow { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid #f1f5f9; font-size: 13.5px; }
.guide-content .srow:last-of-type { border: none; }
.guide-content .srow-card { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid #f1f5f9; }
.guide-content .srow-card:last-child { border: none; }
.guide-content a.srow-link { flex: 1; display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; border-radius: 8px; padding: 8px; margin: 0 -8px; min-width: 0; }
.guide-content a.srow-link:hover { background: #f0f9ff; color: inherit; }
.guide-content .sinfo { flex: 1; min-width: 0; }
.guide-content .sone-liner { display: block; font-size: 12px; color: #94a3b8; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guide-content .sprice-area { text-align: right; flex-shrink: 0; }
.guide-content .sbtn { display: inline-block; padding: 6px 14px; border-radius: 8px; font-size: 12.5px; font-weight: 700; text-decoration: none; flex-shrink: 0; text-align: center; min-width: 48px; }
.guide-content .sbtn-buy { background: #1e293b; color: white; }
.guide-content .sbtn-buy:hover { background: #334155; color: white; }
.guide-content .sbtn-soldout { background: #f1f5f9; color: #94a3b8; cursor: default; }
.guide-content .srank { font-weight: 800; color: #2563eb; min-width: 20px; }
.guide-content .sname { flex: 1; }
.guide-content .sprice { font-weight: 700; }
.guide-content .sdisc { font-size: 12px; color: #dc2626; font-weight: 700; }

.guide-content .tip-section { padding: 20px; }
.guide-content .tip-section h2 { font-size: 17px; font-weight: 800; margin: 0 0 14px; border: none; padding: 0; }
.guide-content .tip-item { margin-bottom: 12px; font-size: 14px; }
.guide-content .tip-label { font-weight: 700; color: #2563eb; }

.guide-content .spec-text { font-size: 13.5px; color: #475569; margin-bottom: 10px; line-height: 1.7; }
.guide-content .vs-note { font-size: 13px; color: #64748b; margin-bottom: 14px; padding: 8px 12px; background: #f8fafc; border-radius: 8px; border-left: 3px solid #2563eb; }
.guide-content .scomment { font-size: 12.5px; color: #64748b; margin: -4px 0 8px 30px; }
.guide-content .forecast { font-size: 14px; color: #475569; margin-top: 16px; padding: 16px 20px; background: #f8fafc; border-radius: 10px; line-height: 1.7; }

.guide-content .product-img { width: 100%; aspect-ratio: 4/3; background: #f8fafc; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid #f1f5f9; }
.guide-content .product-img img { max-width: 60%; max-height: 80%; object-fit: contain; border-radius: 0; margin: 0; }
