/*
Theme Name: 만물상 김만덕
Theme URI: https://5060play.com/
Author: 5060play
Description: 피부·패션·노트북·태블릿·생활가전 상품을 빠르게 비교하는 한국어 제휴 콘텐츠용 경량 테마입니다.
Version: 1.0.3
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: manmul-kimmandeok
*/

:root {
  --mk-ink: #18212b;
  --mk-muted: #66717f;
  --mk-paper: #fffdf8;
  --mk-canvas: #f4f0e8;
  --mk-card: #ffffff;
  --mk-line: #ded8cd;
  --mk-brand: #b64231;
  --mk-brand-dark: #7e261b;
  --mk-accent: #096b68;
  --mk-accent-soft: #e5f3ef;
  --mk-gold: #d8a443;
  --mk-warn: #fff3d9;
  --mk-shadow: 0 16px 44px rgba(42, 34, 23, .09);
  --mk-radius: 22px;
  --mk-content: 780px;
  --mk-wide: 1180px;
  /* Compatibility aliases for the existing printer/laptop finder plugins. */
  --life-bg: var(--mk-canvas);
  --life-surface: var(--mk-card);
  --life-text: var(--mk-ink);
  --life-muted: var(--mk-muted);
  --life-line: var(--mk-line);
  --life-brand: var(--mk-accent);
  --life-brand-dark: #064c4a;
  --life-soft: var(--mk-accent-soft);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--mk-canvas);
  color: var(--mk-ink);
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.72;
  word-break: keep-all;
  text-rendering: optimizeLegibility;
}
a { color: var(--mk-accent); text-underline-offset: .18em; }
img { max-width: 100%; height: auto; }
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid var(--mk-gold); outline-offset: 3px; }

.screen-reader-text,
.mk-skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.mk-skip-link:focus {
  z-index: 9999;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  margin: 0;
  padding: 10px 14px;
  clip: auto;
  background: var(--mk-ink);
  color: #fff;
  border-radius: 10px;
}
.mk-shell { width: min(var(--mk-wide), calc(100% - 36px)); margin-inline: auto; }

/* Header */
.mk-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--mk-paper);
  background: color-mix(in srgb, var(--mk-paper) 95%, transparent);
  border-bottom: 1px solid var(--mk-line);
  backdrop-filter: blur(14px);
}
.admin-bar .mk-site-header { top: 32px; }
.mk-header-row { min-height: 78px; display: flex; align-items: center; gap: 22px; }
.mk-brand { display: flex; align-items: center; gap: 11px; color: var(--mk-ink); text-decoration: none; margin-right: auto; }
.mk-brand-seal {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  border-radius: 50%;
  background: var(--mk-brand);
  color: #fff8e9;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 900;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.28);
}
.mk-brand-copy { display: flex; flex-direction: column; line-height: 1.22; }
.mk-brand-copy strong { font-size: 1.18rem; letter-spacing: -.04em; }
.mk-brand-copy span { margin-top: 3px; color: var(--mk-muted); font-size: .72rem; }
.mk-main-nav ul { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.mk-main-nav a { display: block; padding: 9px 11px; color: var(--mk-ink); font-size: .88rem; font-weight: 750; text-decoration: none; border-radius: 10px; }
.mk-main-nav a:hover { background: var(--mk-accent-soft); color: var(--mk-accent); }
.mk-header-search { display: flex; min-width: 250px; }
.mk-header-search label { flex: 1; }
.mk-header-search input {
  width: 100%;
  min-height: 42px;
  padding: 9px 13px;
  background: #fff;
  color: var(--mk-ink);
  border: 1px solid var(--mk-line);
  border-right: 0;
  border-radius: 12px 0 0 12px;
}
.mk-header-search button {
  min-width: 46px;
  border: 0;
  border-radius: 0 12px 12px 0;
  background: var(--mk-ink);
  color: #fff;
  cursor: pointer;
}
.mk-menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--mk-line); border-radius: 12px; background: #fff; color: var(--mk-ink); cursor: pointer; }

/* Hero and controls */
.mk-hero { overflow: hidden; position: relative; padding: 76px 0 60px; background: var(--mk-paper); border-bottom: 1px solid var(--mk-line); }
.mk-hero::after {
  position: absolute;
  right: max(4vw, calc((100vw - var(--mk-wide)) / 2));
  top: 28px;
  width: 310px;
  height: 310px;
  border: 1px solid rgba(182,66,49,.18);
  border-radius: 50%;
  box-shadow: inset 0 0 0 34px var(--mk-paper), inset 0 0 0 35px rgba(9,107,104,.14);
  content: "萬物";
  display: grid;
  place-items: center;
  color: rgba(182,66,49,.08);
  font-family: Georgia, serif;
  font-size: 5rem;
  font-weight: 900;
  transform: rotate(-8deg);
  pointer-events: none;
}
.mk-hero-copy { position: relative; z-index: 1; max-width: 760px; }
.mk-eyebrow { color: var(--mk-brand); font-size: .82rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.mk-hero h1 { margin: 9px 0 14px; font-size: clamp(2.25rem, 5.5vw, 4.35rem); line-height: 1.08; letter-spacing: -.07em; }
.mk-hero p { max-width: 670px; margin: 0; color: var(--mk-muted); font-size: 1.08rem; }
.mk-hero-search { display: flex; max-width: 640px; margin-top: 26px; filter: drop-shadow(0 10px 22px rgba(44,37,26,.08)); }
.mk-hero-search label { flex: 1; }
.mk-hero-search input { width: 100%; min-height: 56px; padding: 14px 18px; border: 1px solid var(--mk-line); border-right: 0; border-radius: 16px 0 0 16px; background: #fff; color: var(--mk-ink); }
.mk-hero-search button { padding: 0 22px; border: 0; border-radius: 0 16px 16px 0; background: var(--mk-brand); color: #fff; font-weight: 900; cursor: pointer; }
.mk-category-strip { background: var(--mk-paper); border-bottom: 1px solid var(--mk-line); }
.mk-category-chips { display: flex; gap: 9px; padding: 17px 0; overflow-x: auto; scrollbar-width: none; }
.mk-category-chips::-webkit-scrollbar { display: none; }
.mk-chip { flex: 0 0 auto; padding: 8px 14px; border: 1px solid var(--mk-line); border-radius: 999px; background: #fff; color: var(--mk-ink); font-size: .86rem; font-weight: 800; text-decoration: none; }
.mk-chip:hover, .mk-chip.is-current { border-color: var(--mk-accent); background: var(--mk-accent-soft); color: var(--mk-accent); }
.mk-main { padding: 44px 0 76px; }
.mk-results-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 24px; }
.mk-results-head h1, .mk-results-head h2 { margin: 0; font-size: clamp(1.55rem, 3vw, 2.15rem); letter-spacing: -.045em; }
.mk-results-head p { margin: 5px 0 0; color: var(--mk-muted); font-size: .9rem; }
.mk-sort { display: flex; gap: 7px; flex-wrap: wrap; }
.mk-sort a { padding: 8px 13px; border: 1px solid var(--mk-line); border-radius: 999px; background: var(--mk-card); color: var(--mk-muted); font-size: .8rem; font-weight: 800; text-decoration: none; }
.mk-sort a:hover, .mk-sort a.is-current { border-color: var(--mk-ink); background: var(--mk-ink); color: #fff; }

/* Product cards */
.mk-product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.mk-product-card { position: relative; overflow: hidden; display: flex; flex-direction: column; min-width: 0; background: var(--mk-card); border: 1px solid var(--mk-line); border-radius: var(--mk-radius); box-shadow: var(--mk-shadow); transition: transform .2s ease, box-shadow .2s ease; }
.mk-product-card:hover { transform: translateY(-3px); box-shadow: 0 20px 52px rgba(42,34,23,.14); }
.mk-card-media { display: block; position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #eee8df; }
.mk-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .28s ease; }
.mk-product-card:hover .mk-card-media img { transform: scale(1.025); }
.mk-card-placeholder { display: grid; place-items: center; width: 100%; height: 100%; padding: 24px; color: var(--mk-muted); text-align: center; font-weight: 900; background: linear-gradient(145deg, #f1eadc, #e4eee9); }
.mk-discount-badge { position: absolute; top: 13px; left: 13px; padding: 6px 10px; border-radius: 999px; background: var(--mk-brand); color: #fff; font-size: .76rem; font-weight: 950; box-shadow: 0 6px 18px rgba(126,38,27,.28); }
.mk-card-body { display: flex; flex: 1; flex-direction: column; padding: 19px; }
.mk-card-cat { margin-bottom: 7px; color: var(--mk-accent); font-size: .76rem; font-weight: 900; }
.mk-card-title { margin: 0; font-size: 1.13rem; line-height: 1.42; letter-spacing: -.035em; }
.mk-card-title a { color: var(--mk-ink); text-decoration: none; }
.mk-card-summary { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; margin: 10px 0 14px; color: var(--mk-muted); font-size: .88rem; line-height: 1.62; }
.mk-price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.mk-price { color: var(--mk-ink); font-size: 1.22rem; font-weight: 950; letter-spacing: -.03em; }
.mk-original-price { color: #9a9da3; font-size: .78rem; text-decoration: line-through; }
.mk-card-foot { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--mk-line); }
.mk-card-meta { color: var(--mk-muted); font-size: .74rem; }
.mk-card-link { color: var(--mk-brand); font-size: .82rem; font-weight: 900; text-decoration: none; }
.mk-empty { grid-column: 1 / -1; padding: 42px; border: 1px dashed var(--mk-line); border-radius: var(--mk-radius); background: var(--mk-card); color: var(--mk-muted); text-align: center; }
.mk-pagination { margin-top: 36px; }
.mk-pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.mk-pagination a, .mk-pagination span { display: grid; min-width: 42px; min-height: 42px; place-items: center; padding: 7px 12px; border: 1px solid var(--mk-line); border-radius: 11px; background: #fff; color: var(--mk-ink); text-decoration: none; }
.mk-pagination .current { background: var(--mk-ink); color: #fff; }
.mk-pagination ul { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.mk-price-note { margin: 22px 0 0; color: var(--mk-muted); font-size: .78rem; }

/* Article */
.mk-article-shell { width: min(var(--mk-content), calc(100% - 32px)); margin-inline: auto; }
.mk-article { margin: 34px auto 72px; padding: clamp(24px, 5vw, 56px); background: var(--mk-paper); border: 1px solid var(--mk-line); border-radius: 28px; box-shadow: var(--mk-shadow); }
.mk-breadcrumb { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; color: var(--mk-muted); font-size: .8rem; }
.mk-breadcrumb a { color: var(--mk-muted); text-decoration: none; }
.mk-article-header h1 { margin: 0; font-size: clamp(2rem, 6vw, 3.25rem); line-height: 1.22; letter-spacing: -.06em; }
.mk-post-meta { display: flex; gap: 12px; flex-wrap: wrap; margin: 15px 0 26px; color: var(--mk-muted); font-size: .8rem; }
.mk-featured { overflow: hidden; margin: 0 0 28px; border-radius: 19px; background: #eee8df; }
.mk-featured img { display: block; width: 100%; }
.mk-affiliate-notice { margin: 22px 0; padding: 15px 17px; border-left: 4px solid var(--mk-brand); border-radius: 12px; background: var(--mk-warn); color: #5e4720; font-size: .86rem; line-height: 1.6; }
.mk-affiliate-notice strong { color: var(--mk-brand-dark); }
.mk-product-summary { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; margin: 24px 0 32px; padding: 21px; border: 1px solid var(--mk-line); border-radius: 18px; background: #fff; }
.mk-product-summary h2 { margin: 0 0 7px; font-size: 1.25rem; letter-spacing: -.04em; }
.mk-product-summary p { margin: 0; color: var(--mk-muted); font-size: .9rem; }
.mk-summary-price { margin-top: 8px; color: var(--mk-ink); font-size: 1.3rem; font-weight: 950; }
.mk-cta { display: inline-flex; justify-content: center; align-items: center; min-height: 50px; padding: 12px 19px; border: 0; border-radius: 13px; background: var(--mk-brand); color: #fff; font-weight: 950; text-decoration: none; box-shadow: 0 10px 24px rgba(126,38,27,.2); transition: background .2s ease, transform .2s ease; }
.mk-cta:hover { background: var(--mk-brand-dark); color: #fff; transform: translateY(-1px); }
.mk-content { font-size: 1rem; }
.mk-content > p:first-child { color: #3f4854; font-size: 1.08rem; }
.mk-content h2 { scroll-margin-top: 100px; margin: 2.35em 0 .75em; font-size: 1.7rem; line-height: 1.38; letter-spacing: -.045em; }
.mk-content h2::before { display: block; width: 38px; height: 5px; margin-bottom: 12px; border-radius: 999px; background: var(--mk-brand); content: ""; }
.mk-content h3 { margin: 1.9em 0 .65em; font-size: 1.25rem; letter-spacing: -.035em; }
.mk-content p { margin: 1em 0; }
.mk-content ul, .mk-content ol { padding-left: 1.4em; }
.mk-content li { margin: .42em 0; }
.mk-content figure { margin: 1.7em 0; }
.mk-content figcaption { margin-top: 7px; color: var(--mk-muted); font-size: .76rem; text-align: center; }
.mk-content blockquote { margin: 1.5em 0; padding: 14px 18px; border-left: 4px solid var(--mk-accent); border-radius: 0 12px 12px 0; background: var(--mk-accent-soft); }
.mk-content table, .mk-spec-table { width: 100%; margin: 1.5em 0; border-collapse: separate; border-spacing: 0; overflow: hidden; border: 1px solid var(--mk-line); border-radius: 14px; font-size: .9rem; }
.mk-content th, .mk-content td, .mk-spec-table th, .mk-spec-table td { padding: 12px 13px; border-right: 1px solid var(--mk-line); border-bottom: 1px solid var(--mk-line); text-align: left; vertical-align: top; }
.mk-content th, .mk-spec-table th { width: 30%; background: #f4efe6; font-weight: 900; }
.mk-content tr:last-child > *, .mk-spec-table tr:last-child > * { border-bottom: 0; }
.mk-content tr > *:last-child, .mk-spec-table tr > *:last-child { border-right: 0; }
.mk-pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin: 1.5em 0; }
.mk-pros, .mk-cons { padding: 18px; border: 1px solid var(--mk-line); border-radius: 14px; background: #fff; }
.mk-pros { border-top: 4px solid var(--mk-accent); }
.mk-cons { border-top: 4px solid var(--mk-brand); }
.mk-pros h3, .mk-cons h3 { margin-top: 0; }
.mk-recommend-box, .mk-buy-check { margin: 1.5em 0; padding: 19px; border-radius: 15px; }
.mk-recommend-box { background: var(--mk-accent-soft); }
.mk-buy-check { border: 1px solid var(--mk-line); background: #fff; }
.mk-recommend-box h3, .mk-buy-check h3 { margin-top: 0; }
.mk-content .wp-block-button__link { display: inline-flex; min-height: 50px; align-items: center; justify-content: center; padding: 12px 20px; border-radius: 13px; background: var(--mk-brand); color: #fff; font-weight: 950; box-shadow: 0 10px 24px rgba(126,38,27,.2); }
.mk-toc { margin: 27px 0 34px; border: 1px solid var(--mk-line); border-radius: 15px; background: #fff; }
.mk-toc summary { padding: 15px 18px; cursor: pointer; font-weight: 900; list-style: none; }
.mk-toc summary::-webkit-details-marker { display: none; }
.mk-toc summary::after { float: right; color: var(--mk-brand); content: "+"; }
.mk-toc[open] summary::after { content: "−"; }
.mk-toc ol { margin: 0; padding: 0 24px 18px 44px; }
.mk-toc a { color: var(--mk-ink); text-decoration: none; }
.mk-bottom-cta { margin-top: 36px; padding: 22px; border-radius: 17px; background: var(--mk-ink); color: #fff; text-align: center; }
.mk-bottom-cta p { margin: 0 0 13px; color: #d4d9dd; font-size: .87rem; }
.mk-related { margin-top: 42px; padding-top: 28px; border-top: 1px solid var(--mk-line); }
.mk-related h2 { margin: 0 0 16px; font-size: 1.3rem; }
.mk-related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mk-related-card { padding: 14px; border: 1px solid var(--mk-line); border-radius: 13px; background: #fff; }
.mk-related-card a { color: var(--mk-ink); font-size: .87rem; font-weight: 850; line-height: 1.45; text-decoration: none; }

/* Footer and utility */
.mk-site-footer { padding: 46px 0; border-top: 1px solid var(--mk-line); background: var(--mk-ink); color: #cbd0d5; font-size: .82rem; }
.mk-footer-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; }
.mk-site-footer strong { color: #fff; font-size: 1rem; }
.mk-site-footer p { margin: 7px 0 0; }
.mk-footer-menu { display: flex; justify-content: flex-end; gap: 14px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.mk-footer-menu a { color: #e7e9eb; text-decoration: none; }
.mk-copyright { grid-column: 1 / -1; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.15); color: #9ca4ad; }
.alignwide { max-width: 980px; margin-left: 50%; transform: translateX(-50%); width: calc(100vw - 40px); }
.alignfull { max-width: none; margin-left: 50%; transform: translateX(-50%); width: 100vw; }

@media (max-width: 980px) {
  .mk-main-nav, .mk-header-search { display: none; }
  .mk-menu-toggle { display: inline-grid; place-items: center; }
  .mk-main-nav.is-open { display: block; position: absolute; top: 78px; left: 18px; right: 18px; padding: 12px; border: 1px solid var(--mk-line); border-radius: 14px; background: #fff; box-shadow: var(--mk-shadow); }
  .mk-main-nav.is-open ul { flex-direction: column; }
  .mk-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 782px) { .admin-bar .mk-site-header { top: 46px; } }
@media (max-width: 680px) {
  body { font-size: 16px; word-break: normal; }
  .mk-shell { width: min(var(--mk-wide), calc(100% - 24px)); }
  .mk-header-row { min-height: 70px; }
  .mk-brand-copy span { display: none; }
  .mk-main-nav.is-open { top: 70px; }
  .mk-hero { padding: 50px 0 42px; }
  .mk-hero::after { right: -110px; top: 18px; width: 240px; height: 240px; font-size: 3.7rem; }
  .mk-hero-search input { min-height: 52px; }
  .mk-results-head { align-items: stretch; flex-direction: column; }
  .mk-sort { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .mk-sort a { flex: 0 0 auto; }
  .mk-product-grid { grid-template-columns: 1fr; }
  .mk-article-shell { width: min(var(--mk-content), calc(100% - 18px)); }
  .mk-article { margin-top: 16px; padding: 24px 17px 34px; border-radius: 19px; }
  .mk-article-header h1 { font-size: 2rem; }
  .mk-product-summary { grid-template-columns: 1fr; }
  .mk-product-summary .mk-cta { width: 100%; }
  .mk-content h2 { font-size: 1.45rem; }
  .mk-content table, .mk-spec-table { display: block; overflow-x: auto; white-space: nowrap; }
  .mk-pros-cons { grid-template-columns: 1fr; }
  .mk-related-grid { grid-template-columns: 1fr; }
  .mk-footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .mk-footer-menu { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
