/*
Theme Name:   Astra Child - 뭐살까
Theme URI:    https://shop.soinvu.com
Description:  뭐살까 전용 테마
Author:       뭐살까
Template:     astra
Version:      2.0.0
Text Domain:  mwosalkka
*/

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;600;700;800&display=swap');

/* ━━ 변수 ━━ */
:root {
  --blue:      #2563EB;
  --blue-dark: #1D4ED8;
  --blue-pale: #EFF6FF;
  --blue-light:#DBEAFE;
  --text:      #1E293B;
  --muted:     #64748B;
  --border:    #E2E8F0;
  --bg:        #F8FAFC;
  --white:     #FFFFFF;
  --coupang:   #FF6600;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

/* ━━ 리셋 ━━ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans KR', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a   { color: var(--blue); }

/* ━━ 레이아웃 공통 ━━ */
.wrap        { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 820px;  margin: 0 auto; padding: 0 24px; }
.section     { padding: 60px 0; }
.sec-white   { background: var(--white); border-top: 1px solid var(--border); }
.sec-pale    { background: var(--blue-pale); }
.sec-header  { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.sec-title   { font-size: 21px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.see-all     { font-size: 13px; color: var(--blue); text-decoration: none; font-weight: 500; }
.see-all:hover { text-decoration: underline; }

/* ━━ 헤더 ━━ */
#mw-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  position: sticky; top: 0; z-index: 999;
  width: 100%;
}
.mw-header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; gap: 32px;
}
.mw-logo { display: flex; align-items: center; gap: 9px; text-decoration: none; flex-shrink: 0; }
.mw-logo-text { font-size: 21px; font-weight: 800; color: var(--blue); letter-spacing: -.5px; }
.mw-nav { display: flex; align-items: center; gap: 2px; flex: 1; list-style: none; margin: 0; padding: 0; }
.mw-nav li { margin: 0; padding: 0; display: flex; align-items: center; }
.mw-nav a {
  display: flex; align-items: center;
  text-decoration: none; color: var(--muted);
  font-size: 14px; font-weight: 500; padding: 6px 14px;
  border-radius: 20px; transition: all .15s; line-height: 1;
}
/* 워드프레스 관리자바 있을 때 헤더 위치 보정 */
body.admin-bar #mw-header { top: 32px; }
@media screen and (max-width: 782px) { body.admin-bar #mw-header { top: 46px; } }
.mw-nav a:hover,
.mw-nav .current-menu-item a { background: var(--blue-pale); color: var(--blue); font-weight: 600; }

/* ━━ 히어로 ━━ */
.mw-hero {
  background: linear-gradient(135deg, #1D4ED8 0%, #2563EB 55%, #3B82F6 100%);
  padding: 80px 24px 72px; text-align: center; color: var(--white);
}
.mw-hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3);
  padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 600;
  margin-bottom: 22px;
}
.mw-hero h1 {
  font-size: 52px; font-weight: 800; letter-spacing: -1.5px;
  line-height: 1.15; margin-bottom: 16px; color: var(--white);
}
.mw-hero h1 em { color: #93C5FD; font-style: normal; }
.mw-hero p     { font-size: 16px; opacity: .85; line-height: 1.7; margin-bottom: 36px; color: var(--white); }
.mw-hero-cats  { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.mw-hero-cat {
  background: rgba(255,255,255,.14); border: 1.5px solid rgba(255,255,255,.28);
  color: var(--white); padding: 10px 22px; border-radius: 28px;
  font-size: 14px; font-weight: 600; text-decoration: none; transition: all .2s;
}
.mw-hero-cat:hover { background: var(--white); color: var(--blue); }

/* ━━ LIVE 뱃지 ━━ */
.live-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: #EF4444; color: #fff;
  font-size: 10px; font-weight: 700; padding: 3px 9px 3px 7px; border-radius: 12px;
}
.live-badge::before {
  content: ''; width: 6px; height: 6px; background: #fff;
  border-radius: 50%; animation: blink 1.4s infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }

/* ━━ 랭킹 카드 ━━ */
.rank-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.rank-card {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid var(--border); overflow: hidden;
  transition: transform .2s, box-shadow .2s; position: relative;
}
.rank-card:hover { transform: translateY(-5px); box-shadow: 0 16px 40px rgba(37,99,235,.13); }
.rank-num {
  position: absolute; top: 14px; left: 14px;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; z-index: 2;
}
.n1 { background: #F59E0B; color: #fff; }
.n2 { background: #94A3B8; color: #fff; }
.n3 { background: #CD7C2F; color: #fff; }
.rank-img {
  width: 100%; height: 190px;
  background: linear-gradient(135deg, var(--blue-pale), var(--blue-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 64px; overflow: hidden;
}
.rank-img img { width: 100%; height: 100%; object-fit: cover; }
.rank-body    { padding: 18px; }
.rank-cat     { font-size: 11px; font-weight: 600; color: var(--blue); margin-bottom: 6px; }
.rank-name    { font-size: 14px; font-weight: 700; line-height: 1.5; margin-bottom: 10px; }
.rank-stars   { display: flex; align-items: center; gap: 5px; margin-bottom: 12px; }
.stars        { color: #F59E0B; font-size: 13px; }
.rating       { font-size: 12px; color: var(--muted); }
.rank-price   { font-size: 20px; font-weight: 800; margin-bottom: 14px; }
.rank-price small { font-size: 13px; color: var(--muted); font-weight: 400; }

/* ━━ 쿠팡 버튼 ━━ */
.btn-coupang {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; background: var(--coupang); color: #fff; border: none;
  padding: 12px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 700; text-decoration: none;
  transition: background .2s; cursor: pointer; font-family: inherit;
}
.btn-coupang:hover { background: #E55A00; color: #fff; }

/* ━━ 카테고리 카드 ━━ */
.cat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.cat-card {
  background: var(--white); border-radius: 16px; padding: 26px 22px;
  display: flex; align-items: center; gap: 16px;
  border: 1.5px solid var(--border); text-decoration: none; transition: all .2s;
}
.cat-card:hover { border-color: var(--blue); box-shadow: 0 4px 18px rgba(37,99,235,.1); transform: translateY(-2px); }
.cat-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--blue-pale); display: flex; align-items: center;
  justify-content: center; font-size: 26px; flex-shrink: 0;
}
.cat-info h3 { font-size: 16px; font-weight: 700; margin-bottom: 5px; color: var(--text); }
.cat-info p  { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* ━━ 포스트 카드 ━━ */
.post-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
.post-card {
  background: var(--white); border-radius: var(--radius-md); overflow: hidden;
  border: 1px solid var(--border); text-decoration: none;
  display: block; transition: all .2s;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.07); }
.post-thumb { width: 100%; height: 145px; overflow: hidden; background: linear-gradient(135deg, var(--blue-pale), var(--blue-light)); }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.post-card:hover .post-thumb img { transform: scale(1.04); }
.post-thumb-empty { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 46px; }
.post-body  { padding: 14px; }
.post-tag   { display: inline-block; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 6px; margin-bottom: 8px; }
.tag-compare { background: var(--blue-light); color: #1D4ED8; }
.tag-rank    { background: #FEF3C7; color: #92400E; }
.tag-review  { background: #D1FAE5; color: #065F46; }
.post-title { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.5; margin-bottom: 8px; }
.post-date  { font-size: 11px; color: var(--muted); }

/* ━━ 단일 글 ━━ */
.article-wrap { max-width: 820px; margin: 0 auto; padding: 0 24px; }
.article-header { padding: 40px 0 28px; border-bottom: 1px solid var(--border); margin-bottom: 32px; }
.article-cats  { display: flex; gap: 8px; margin-bottom: 14px; }
.article-cat   { font-size: 12px; font-weight: 600; color: var(--blue); background: var(--blue-pale); padding: 3px 10px; border-radius: 8px; text-decoration: none; }
.article-title { font-size: 28px; font-weight: 800; line-height: 1.35; letter-spacing: -.5px; margin-bottom: 14px; }
.article-meta  { display: flex; align-items: center; gap: 16px; font-size: 13px; color: var(--muted); }

/* 쿠팡 구매 박스 */
.buy-box {
  background: var(--blue-pale); border: 1.5px solid var(--blue-light);
  border-radius: 16px; padding: 24px; margin: 28px 0; display: flex; align-items: center; gap: 20px;
}
.buy-box-img { width: 80px; height: 80px; border-radius: 12px; object-fit: cover; background: var(--white); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 36px; }
.buy-box-info { flex: 1; }
.buy-box-name  { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.buy-box-price { font-size: 22px; font-weight: 800; color: var(--blue); margin-bottom: 10px; }
.buy-box-price small { font-size: 14px; color: var(--muted); font-weight: 400; }
.buy-box .btn-coupang { width: auto; padding: 11px 24px; font-size: 14px; border-radius: 10px; }

/* 본문 */
.article-content { font-size: 15px; line-height: 1.85; }
.article-content h2 { font-size: 20px; font-weight: 800; margin: 36px 0 14px; border-left: 3px solid var(--blue); padding-left: 12px; }
.article-content h3 { font-size: 17px; font-weight: 700; margin: 28px 0 10px; }
.article-content p  { margin-bottom: 16px; }
.article-content ul, .article-content ol { margin: 14px 0 14px 20px; }
.article-content li { margin-bottom: 6px; }
.article-content strong { color: var(--text); }
.article-content table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; }
.article-content table th { background: var(--blue); color: #fff; padding: 10px 14px; text-align: left; font-weight: 700; }
.article-content table td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.article-content table tr:hover td { background: var(--blue-pale); }

/* 관련글 */
.related-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-top: 16px; }

/* ━━ 아카이브 ━━ */
.archive-header { background: linear-gradient(135deg, #1D4ED8, #2563EB); color: #fff; padding: 48px 24px 40px; }
.archive-header h1 { font-size: 28px; font-weight: 800; color: #fff; margin-bottom: 8px; }
.archive-header p  { font-size: 14px; opacity: .85; color: #fff; }
.archive-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }

/* ━━ 페이지네이션 ━━ */
.mw-pagination { display: flex; justify-content: center; gap: 6px; margin-top: 48px; }
.mw-pagination a,
.mw-pagination span {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px;
  font-size: 14px; font-weight: 600; text-decoration: none; transition: all .15s;
  border: 1.5px solid var(--border); color: var(--muted); background: var(--white);
}
.mw-pagination a:hover,
.mw-pagination .current { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ━━ 쿠팡 고지문 ━━ */
.disclosure {
  background: #F1F5F9; border-top: 1px solid var(--border);
  padding: 14px 24px; text-align: center;
  font-size: 11px; color: var(--muted); line-height: 1.6;
}

/* ━━ 푸터 ━━ */
#mw-footer { background: #0F172A; color: #94A3B8; padding: 52px 24px 32px; }
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-top   { display: flex; gap: 60px; margin-bottom: 40px; }
.footer-brand { flex: 1; }
.footer-logo-text { font-size: 20px; font-weight: 800; color: #fff; display: block; margin-bottom: 10px; }
.footer-desc  { font-size: 13px; color: #475569; line-height: 1.7; }
.footer-links { display: flex; gap: 48px; }
.footer-col h4 { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 14px; }
.footer-col a  { display: block; font-size: 12px; color: #475569; text-decoration: none; margin-bottom: 9px; transition: color .2s; }
.footer-col a:hover { color: #93C5FD; }
.footer-bottom { border-top: 1px solid #1E293B; padding-top: 20px; display: flex; justify-content: space-between; font-size: 12px; color: #334155; }

/* ━━ 반응형 ━━ */
@media (max-width: 1024px) {
  .post-grid   { grid-template-columns: repeat(3,1fr); }
  .footer-top  { flex-direction: column; gap: 32px; }
  .footer-links{ flex-wrap: wrap; gap: 32px; }
}
@media (max-width: 768px) {
  .mw-hero h1  { font-size: 36px; }
  .rank-grid   { grid-template-columns: 1fr; }
  .cat-grid    { grid-template-columns: 1fr; }
  .post-grid   { grid-template-columns: repeat(2,1fr); }
  .archive-grid{ grid-template-columns: repeat(2,1fr); }
  .related-grid{ grid-template-columns: 1fr; }
  .buy-box     { flex-direction: column; text-align: center; }
  .article-title { font-size: 22px; }
  .mw-nav      { display: none; }
}
@media (max-width: 480px) {
  .post-grid   { grid-template-columns: 1fr; }
  .archive-grid{ grid-template-columns: 1fr; }
}
