:root {
    --blue: #1070f0;
    --blue-dark: #0b58c4;
    --blue-soft: #eef4ff;
    --ink: #283038;
    --ink-2: #3d4650;
    --muted: #6b7280;
    --line: #e4e7eb;
    --bg: #ffffff;
    --bg-soft: #f4f6f8;
    --card: #ffffff;
    --wrap: 1200px;
    --radius: 10px;
}

* { box-sizing: border-box; }
html { font-size: 15px; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    font-family: Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
    line-height: 1.5;
    overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input { font-family: inherit; }

.wrap {
    width: min(var(--wrap), calc(100% - 32px));
    margin-inline: auto;
}
img, svg, video { max-width: 100%; }
.masthead-inner > *,
.hero-grid > *,
.product-hero > *,
.rank > *,
.footer-grid > * { min-width: 0; }

.topbar {
    background: #f7f7f7;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
    color: var(--muted);
}
.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 7px 0;
}
.topbar-note { min-width: 0; }
.topbar a { color: var(--ink-2); }
.topbar a:hover { color: var(--blue); }
.topbar-links { display: flex; gap: 14px; }

.masthead {
    padding: 14px 0 12px;
}
.masthead-inner {
    display: grid;
    grid-template-columns: 220px 1fr 220px;
    gap: 20px;
    align-items: center;
}
.logo {
    display: flex;
    align-items: center;
    min-width: 0;
}
.logo img {
    height: 42px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
}
.search-form {
    display: flex;
    border: 2px solid var(--ink);
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
}
.search-form input {
    flex: 1;
    min-width: 0;
    border: 0;
    padding: 11px 18px;
    outline: none;
    font-size: 14px;
}
.search-form:focus-within { border-color: var(--blue); }
.search-form button {
    border: 0;
    background: var(--ink);
    color: #fff;
    padding: 0 22px;
    font-weight: 700;
}
.mast-tools {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
}
.mast-tools a {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-2);
}
.mast-tools a:hover { color: var(--blue); }

.catnav {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 20;
}
.catnav-inner {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.catnav-inner::-webkit-scrollbar { display: none; }
.catnav a {
    padding: 13px 14px;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}
.catnav a:hover,
.catnav a.is-on {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

.site-main { background: var(--bg); }

.hero {
    background: #f3f6fb;
    padding: 48px 0 32px;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 40px;
    align-items: center;
}
.kicker {
    display: inline-block;
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
}
.hero h1 {
    font-size: clamp(30px, 4.4vw, 46px);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.18;
    margin: 0 0 14px;
}
.lede {
    color: var(--muted);
    font-size: 15px;
    max-width: 38rem;
    margin: 0 0 20px;
}
.checks {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
    color: var(--ink-2);
    font-size: 14px;
    font-weight: 600;
}
.checks li::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--blue);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.btn-red,
.btn-blue,
.btn-dark,
.btn-ink,
.btn-line {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 14px;
    border: 1px solid transparent;
}
.btn-red,
.btn-blue { background: var(--blue); color: #fff; }
.btn-red:hover,
.btn-blue:hover { background: var(--blue-dark); color: #fff; }
.btn-dark,
.btn-ink { background: var(--ink); color: #fff; }
.btn-dark:hover,
.btn-ink:hover { color: #fff; background: #000; }
.btn-line { background: #fff; border-color: #ccc; color: var(--ink); }
.btn-line:hover { border-color: var(--ink); color: var(--ink); }
.btn-red:disabled,
.btn-blue:disabled,
.btn-dark:disabled,
.btn-ink:disabled { opacity: 0.5; }

.hero-spot {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
}
.hero-spot__photo {
    position: relative;
    background: #eef0f2;
}
.hero-spot__photo img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}
.hero-spot__tag {
    position: absolute;
    left: 14px;
    top: 14px;
    background: var(--blue);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 4px;
}
.hero-spot__body { padding: 18px 20px 20px; }
.hero-spot__name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 4px;
}
.hero-spot__sub {
    color: var(--muted);
    font-size: 13px;
    margin: 0 0 14px;
}
.hero-spot__rows { display: grid; gap: 8px; margin-bottom: 14px; }
.hero-spot__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 13px;
}
.hero-spot__row.is-best {
    border-color: var(--blue);
    background: var(--blue-soft);
}
.hero-spot__row b { font-size: 16px; }
.hero-spot .btn-red { width: 100%; }

.hub-tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.hub-tile {
    position: relative;
    min-height: 180px;
    border-radius: 14px;
    overflow: hidden;
    background: #e8edf3;
    color: #fff;
}
.hub-tile img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}
.hub-tile__body {
    position: absolute;
    inset: auto 0 0 0;
    padding: 16px;
    background: linear-gradient(180deg, transparent, rgba(28, 34, 40, 0.88));
}
.hub-tile strong { display: block; font-size: 18px; letter-spacing: -0.03em; }
.hub-tile span { display: block; font-size: 13px; opacity: 0.9; margin: 4px 0; }
.hub-tile em {
    font-style: normal;
    font-size: 12px;
    font-weight: 800;
    background: var(--blue);
    padding: 3px 8px;
    border-radius: 999px;
}
.hub-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 16px;
}
.hub-tools a {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-2);
}
.hub-tools a:hover { color: var(--blue); }

.section { padding: 48px 0; }
.section-soft { background: var(--bg-soft); }
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 18px;
}
.section-head h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.03em;
}
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.section-head a { color: var(--muted); font-size: 13px; font-weight: 700; }
.section-head a:hover { color: var(--blue); }

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    font-weight: 700;
    font-size: 13px;
}
.chip:hover { border-color: var(--ink); }
.chip i {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #f3f3f3;
    font-style: normal;
    font-size: 12px;
    font-weight: 800;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px 14px;
}
.product-card { display: block; }
.product-card:hover .product-card__title { text-decoration: underline; }
.product-card__media {
    position: relative;
    aspect-ratio: 1;
    background: #f3f3f3;
    border-radius: 8px;
    overflow: hidden;
}
.product-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.badge-market {
    position: absolute;
    left: 8px;
    top: 8px;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 4px;
    background: var(--ink);
    color: #fff;
}
.badge-market.ali { background: #e85d04; }
.badge-market.jp { background: #9b1c31; }
.badge-market.uk { background: #16325c; }
.badge-market.de { background: #365314; }
.badge-market.cp { background: #ae0000; }
.badge-inline { position: static; display: inline-block; }
.badge-path {
    position: absolute;
    right: 8px;
    top: 8px;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 4px;
    background: var(--blue);
    color: #fff;
}
.badge-path.direct { background: var(--ink); }
.badge-path.need { background: var(--blue); }
.badge-path.check { background: var(--ink-2); }
.badge-path.badge-inline { position: static; margin-left: 6px; }
.quote-line {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink-2);
}
.buy-spot {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
    margin: 20px 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}
.buy-spot img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    background: #f3f3f3;
}
.buy-spot__name {
    margin: 10px 0 8px;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.03em;
}
.buy-spot__price { margin: 0 0 6px; font-weight: 800; }
.buy-steps {
    padding-left: 20px;
    margin: 0 0 20px;
}
.buy-steps li { margin: 8px 0; }
.product-card__body { padding: 10px 2px 0; }
.product-card__meta { font-size: 12px; color: var(--muted); }
.product-card__title {
    margin: 4px 0 8px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.02em;
    height: 42px;
    overflow: hidden;
}
.product-card__price {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.03em;
}
.product-card__ship { font-size: 12px; color: var(--muted); margin-top: 2px; }

.rank {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
}
.rank-item {
    display: grid;
    grid-template-columns: 28px 72px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}
.rank-item > div:nth-child(3) { min-width: 0; }
.rank-item strong {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14px;
}
.rank-item img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    background: #f3f3f3;
}
.rank-n { font-weight: 800; color: var(--blue); }
.rank-item span { color: var(--muted); font-size: 12px; }
.rank-price { font-weight: 800; white-space: nowrap; }

.guide-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.guide-row a {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
}
.guide-row a:hover { border-color: var(--ink); }
.guide-row strong { display: block; font-size: 16px; margin-bottom: 6px; }
.guide-row span { color: var(--muted); font-size: 13px; }

.page { padding: 28px 0 48px; }
.page-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 10px;
}
.page-prose { max-width: 42rem; color: var(--ink-2); }
.page-prose a { color: var(--blue); text-decoration: underline; }

.product-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 28px 0 12px;
}
.product-photo {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}
.product-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.crumb a { color: var(--ink-2); }
.price-xl { font-size: 32px; font-weight: 800; letter-spacing: -0.04em; margin: 8px 0 16px; }
.meta-list { list-style: none; padding: 0; margin: 0 0 18px; }
.meta-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
}
.meta-list strong { color: var(--ink); text-align: right; flex-shrink: 0; }
.cta-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.note {
    background: var(--blue-soft);
    border: 1px solid #c5d8fb;
    color: #0b58c4;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13px;
}

.compare-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px;
    margin-top: 16px;
    overflow-x: auto;
}
.compare-card h2 { font-size: 16px; font-weight: 800; margin: 0 0 10px; }
.table-clean { width: 100%; border-collapse: collapse; }
.table-clean th,
.table-clean td { padding: 11px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.table-clean th { font-size: 12px; color: var(--muted); }
.table-clean a { color: var(--blue); font-weight: 700; }

.form-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 22px;
    max-width: 420px;
}
.form-card label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.form-card .form-control { border-radius: 8px; }
.result-pill {
    display: inline-block;
    margin-top: 16px;
    background: var(--ink);
    color: #fff;
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 800;
}

.site-footer {
    background: #1c2228;
    color: #c5ccd3;
    padding: 40px 0 28px;
    font-size: 13px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 24px;
}
.site-footer a { color: #fff; }
.site-footer a:hover { color: #9ec5ff; }
.footer-brand { font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 8px; }
.footer-copy { margin-top: 22px; color: #888; }

@media (max-width: 1100px) {
    .product-grid { grid-template-columns: repeat(4, 1fr); }
    .masthead-inner { grid-template-columns: 180px minmax(0, 1fr) auto; }
    .logo img { max-width: 180px; height: 36px; }
}

@media (max-width: 900px) {
    .wrap { width: min(var(--wrap), calc(100% - 24px)); }
    .masthead-inner {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "logo tools"
            "search search";
        gap: 12px;
    }
    .logo { grid-area: logo; }
    .search-form { grid-area: search; width: 100%; }
    .mast-tools { grid-area: tools; justify-content: flex-end; }
    .product-grid { grid-template-columns: repeat(3, 1fr); }
    .hero { padding: 32px 0 24px; }
    .hero-grid { gap: 20px; }
    .section { padding: 36px 0; }
    .section-head { align-items: start; gap: 8px; }
    .product-hero { gap: 20px; padding-top: 16px; }
    .chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
    .chips::-webkit-scrollbar { display: none; }
    .chip { flex: 0 0 auto; }
}

@media (max-width: 720px) {
    .hero-grid,
    .rank,
    .product-hero,
    .footer-grid,
    .hub-tiles,
    .guide-row,
    .buy-spot { grid-template-columns: 1fr; }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .hero { padding: 24px 0 18px; }
    .hero-spot__photo img { height: 180px; }
}

@media (max-width: 640px) {
    .topbar-links { display: none; }
    .logo { max-width: 58%; }
    .logo img { height: 30px; max-width: 100%; }
    .mast-tools { gap: 12px; flex-shrink: 0; }
    .mast-tools a:last-child { display: none; }
    .search-form input { font-size: 16px; padding: 12px 14px; }
    .search-form button { padding: 0 16px; }
    .catnav a { padding: 12px 10px; }
    .hero h1 { font-size: 28px; }
    .hero-actions { display: grid; }
    .hero-actions a { width: 100%; }
    .cta-row { display: grid; }
    .cta-row .btn-red,
    .cta-row .btn-blue,
    .cta-row .btn-dark,
    .cta-row .btn-ink,
    .cta-row .btn-line { width: 100%; }
    .hub-tiles { gap: 8px; }
    .hub-tile,
    .hub-tile img { min-height: 160px; height: 160px; }
    .section-head h2 { font-size: 20px; }
    .page-title { font-size: 22px; }
    .price-xl { font-size: 26px; }
    .rank-item {
        grid-template-columns: 22px 52px minmax(0, 1fr) auto;
        gap: 8px;
    }
    .rank-item img { width: 52px; height: 52px; }
    .rank-price { font-size: 13px; }
    .product-card__title { font-size: 13px; height: 38px; }
    .product-card__price { font-size: 15px; }
    .form-card { max-width: none; }
    .table-clean th,
    .table-clean td { padding: 10px 6px; font-size: 13px; }
    .footer-grid { gap: 18px; }
}

@media (max-width: 400px) {
    .product-grid { gap: 14px 10px; }
    .badge-market { font-size: 10px; }
}

/* ── 키워드 랭킹 ─────────────────────────────────────────────────────────── */

.kw-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}
.kw-list--compact { border: 0; border-radius: 0; }
.kw-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-top: 1px solid var(--line);
}
.kw-row:first-child { border-top: 0; }
.kw-row:hover { background: var(--bg-soft); }
.kw-rank {
    font-weight: 800;
    font-size: 14px;
    color: var(--muted);
    text-align: center;
}
.kw-list .kw-row:nth-child(-n+3) .kw-rank { color: var(--blue); }
.kw-text {
    font-weight: 700;
    font-size: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.kw-text:hover { color: var(--blue); text-decoration: underline; }
.kw-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
}
.kw-meta em { font-style: normal; }
.kw-up { color: #d83a3a; font-size: 12px; font-weight: 800; }
.kw-new {
    color: #fff;
    background: var(--blue);
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 999px;
}

/* 키워드 랜딩 상단 두 갈래 CTA (알리 = 한국 결제, 아마존 = 배대지) */
.kw-cta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.kw-cta__col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}
.kw-cta__col b { font-size: 22px; letter-spacing: -0.03em; }
.kw-cta__col > span:not([class]) { font-size: 13px; color: var(--muted); }
.kw-cta__col a { margin-top: 4px; }

/* 이미지 없는 카테고리 타일 */
.hub-tile--text {
    min-height: 132px;
    background: var(--bg-soft);
    color: var(--ink);
    border: 1px solid var(--line);
}
.hub-tile--text .hub-tile__body {
    position: static;
    background: none;
    padding: 18px;
}
.hub-tile--text span { color: var(--muted); opacity: 1; }

@media (max-width: 900px) {
    .kw-cta { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .kw-row { grid-template-columns: 28px minmax(0, 1fr) auto; padding: 10px; }
    .kw-text { font-size: 14px; }
    .kw-meta em { display: none; }
}

/* 페이지네이션 */
.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 24px 0 8px;
}
.pager__step {
    padding: 10px 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    font-weight: 700;
    font-size: 14px;
}
.pager__step:hover { border-color: var(--ink); }
.pager__now { font-size: 14px; color: var(--muted); font-weight: 700; }

/* 내부 상태판 */
.status-h2 { font-size: 18px; margin: 28px 0 10px; }
.status-warn { list-style: none; margin: 18px 0; padding: 0; }
.status-warn li {
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    border-left: 4px solid var(--line);
    background: var(--bg-soft);
}
.status-warn li b { margin-right: 8px; font-size: 12px; }
.status-warn__error { border-left-color: #d83a3a; }
.status-warn__warn { border-left-color: #e0952a; }
.status-warn__info { border-left-color: var(--blue); }
.status-list { font-size: 14px; }
.status-code code { word-break: break-all; font-size: 13px; }
