/* =========================================================
   EVCompareHub - Topchart Page CSS
   File: /ev/topchart.css
   Purpose: NotebookSpec-style ranking hub, matched to EVCompareHub theme
========================================================= */

:root {
    --tc-bg: #f5f6f7;
    --tc-card: #ffffff;
    --tc-text: #151515;
    --tc-muted: #667085;
    --tc-border: #e7e9ee;
    --tc-line: #edf0f5;
    --tc-primary: #27845f;
    --tc-primary-dark: #176346;
    --tc-orange: #f47b20;
    --tc-red: #d8432e;
    --tc-dark: #111111;
    --tc-soft-green: #edf8f2;
    --tc-radius: 16px;
    --tc-shadow: 0 8px 20px rgba(15, 23, 42, .045);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Sarabun", "Noto Sans Thai", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--tc-bg);
    color: var(--tc-text);
    font-size: 14px;
    line-height: 1.55;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

/* =========================================================
   Page Layout
========================================================= */

.tc-page {
    max-width: 1040px;
    margin: 0 auto;
    padding: 14px 14px 44px;
}

.tc-breadcrumb {
    color: #7a7f89;
    font-size: 12px;
    margin: 0 0 10px;
}

.tc-breadcrumb a {
    color: #7a7f89;
}

/* =========================================================
   Hero
========================================================= */

.tc-hero {
    display: grid;
    grid-template-columns: 1fr 140px;
    gap: 16px;
    align-items: center;
    background: linear-gradient(135deg, #102017 0%, #174b35 100%);
    color: #fff;
    border-radius: 18px;
    padding: 22px 24px;
    margin-bottom: 16px;
    box-shadow: var(--tc-shadow);
    overflow: hidden;
}

.tc-kicker {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 800;
    margin-bottom: 8px;
}

.tc-hero h1 {
    margin: 0 0 6px;
    font-size: clamp(26px, 3.3vw, 38px);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.tc-hero p {
    margin: 0;
    color: rgba(255, 255, 255, .82);
    line-height: 1.65;
    max-width: 760px;
    font-size: 13px;
    font-weight: 500;
}

.tc-hero-stat {
    background: rgba(255, 255, 255, .11);
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 14px;
    padding: 15px 12px;
    text-align: center;
}

.tc-hero-stat strong {
    display: block;
    font-size: 28px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.tc-hero-stat span {
    display: block;
    margin-top: 5px;
    color: rgba(255, 255, 255, .78);
    font-size: 11px;
    font-weight: 700;
}

/* =========================================================
   Shared Cards
========================================================= */

.tc-main-ranking,
.tc-mini-box,
.tc-seo-box {
    background: var(--tc-card);
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius);
    box-shadow: var(--tc-shadow);
}

.tc-main-ranking {
    padding: 16px;
    margin-bottom: 14px;
}

.tc-section-title {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--tc-line);
    padding-bottom: 12px;
    margin-bottom: 14px;
}

.tc-section-title h2,
.tc-mini-head h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.tc-section-title p,
.tc-mini-head p {
    margin: 3px 0 0;
    color: var(--tc-muted);
    font-size: 12px;
    line-height: 1.55;
    font-weight: 500;
}

/* =========================================================
   Main Ranking: Winner + List
========================================================= */

.tc-ranking-layout {
    display: grid;
    grid-template-columns: 41% 1fr;
    gap: 18px;
}

.tc-winner {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tc-winner-img {
    position: relative;
    display: block;
    background:
        radial-gradient(circle at 50% 70%, rgba(39, 132, 95, .16), transparent 34%),
        linear-gradient(135deg, #f8fafc, #eef3f1);
    border-radius: 28px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid #edf0f5;
}

.tc-winner-img::after {
    content: "";
    position: absolute;
    left: 12%;
    right: 12%;
    bottom: 16%;
    height: 22px;
    background: rgba(15, 23, 42, .12);
    filter: blur(18px);
    border-radius: 999px;
    z-index: 0;
}

.tc-winner-img img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    padding: 10px;
    transform: scale(1.04);
}

.tc-crown {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 56px;
    height: 56px;
    border-radius: 50% 50% 45% 45%;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .55), transparent 28%),
        linear-gradient(135deg, #ffb238 0%, #f47b20 45%, #d8432e 100%);
    color: #fff;
    font-size: 24px;
    font-weight: 950;
    box-shadow:
        0 14px 26px rgba(216, 67, 46, .28),
        inset 0 0 0 3px rgba(255, 255, 255, .28);
    z-index: 2;
}

.tc-crown::before {
    content: "TOP";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #111827;
    color: #fff;
    border-radius: 999px;
    padding: 2px 7px;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .05em;
}

.tc-crown::after {
    content: "";
    position: absolute;
    bottom: -9px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 18px;
    height: 18px;
    background: #d8432e;
    border-radius: 3px;
    z-index: -1;
}

.tc-winner-body {
    text-align: center;
    padding: 14px 8px 2px;
}

.tc-winner-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    padding: 5px 11px;
    border-radius: 999px;
    background: var(--tc-soft-green);
    color: var(--tc-primary);
    font-size: 11px;
    font-weight: 900;
}

.tc-brand {
    color: var(--tc-primary);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.tc-winner h3 {
    margin: 3px 0 8px;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 900;
}

.tc-price {
    color: var(--tc-red);
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.tc-winner-meta,
.tc-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tc-winner-meta {
    justify-content: center;
    margin-top: 9px;
}

.tc-winner-meta span,
.tc-row-meta span {
    background: #f2f4f7;
    color: #344054;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 800;
}

.tc-action-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.tc-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 999px;
    padding: 8px 13px;
    font-size: 12px;
    font-weight: 900;
    border: 1px solid var(--tc-border);
}

.tc-btn.dark {
    background: #111827;
    color: #fff;
    border-color: #111827;
}

.tc-btn.light {
    background: #f7f8fa;
    color: #111827;
}

/* Ranking list */
.tc-ranking-list {
    display: grid;
}

.tc-rank-row {
    position: relative;
    display: grid;
    grid-template-columns: 34px 86px 1fr 58px;
    gap: 12px;
    align-items: center;
    padding: 12px 10px;
    border-bottom: 1px solid var(--tc-line);
    border-radius: 14px;
    transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.tc-rank-row:hover {
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, .055);
}

.tc-rank-row:last-child {
    border-bottom: 0;
}

.tc-rank-row:nth-child(1),
.tc-rank-row:nth-child(2),
.tc-rank-row:nth-child(3) {
    background: linear-gradient(90deg, rgba(244, 123, 32, .075), rgba(255, 255, 255, 0));
}

.tc-rank-row:nth-child(1)::before,
.tc-rank-row:nth-child(2)::before,
.tc-rank-row:nth-child(3)::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 3px;
    border-radius: 999px;
    background: var(--tc-orange);
}

.tc-row-rank {
    position: relative;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 24%, rgba(255, 255, 255, .72), transparent 27%),
        linear-gradient(135deg, #f2f4f7, #e5e7eb);
    color: #344054;
    display: grid;
    place-items: center;
    font-weight: 950;
    font-size: 12px;
    box-shadow:
        0 4px 10px rgba(15, 23, 42, .08),
        inset 0 0 0 2px rgba(255, 255, 255, .65);
}

.tc-rank-row:nth-child(1) .tc-row-rank {
    background:
        radial-gradient(circle at 30% 24%, rgba(255, 255, 255, .72), transparent 27%),
        linear-gradient(135deg, #ffcf5a 0%, #f59e0b 48%, #ea580c 100%);
    color: #fff;
}

.tc-rank-row:nth-child(2) .tc-row-rank {
    background:
        radial-gradient(circle at 30% 24%, rgba(255, 255, 255, .72), transparent 27%),
        linear-gradient(135deg, #d9e2ec 0%, #94a3b8 48%, #64748b 100%);
    color: #fff;
}

.tc-rank-row:nth-child(3) .tc-row-rank {
    background:
        radial-gradient(circle at 30% 24%, rgba(255, 255, 255, .72), transparent 27%),
        linear-gradient(135deg, #f6c99b 0%, #c56a2c 48%, #92400e 100%);
    color: #fff;
}

.tc-row-img {
    background: linear-gradient(135deg, #f8fafc, #eef3f1);
    border-radius: 999px;
    aspect-ratio: 16 / 10;
    display: block;
    overflow: hidden;
    border: 1px solid #edf0f5;
}

.tc-row-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    padding: 4px 7px;
    transition: transform .2s ease;
}

.tc-rank-row:hover .tc-row-img img {
    transform: scale(1.05);
}

.tc-row-main {
    min-width: 0;
}

.tc-row-main h3 {
    margin: 2px 0 5px;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 900;
}

.tc-row-meta span {
    padding: 3px 7px;
    font-size: 10px;
}

.tc-row-views {
    text-align: right;
}

.tc-row-views strong {
    display: block;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.tc-row-views span {
    color: var(--tc-muted);
    font-size: 10px;
    font-weight: 800;
}

/* =========================================================
   Category Mini Rankings
========================================================= */

.tc-category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.tc-mini-box {
    padding: 14px;
}

.tc-mini-box.tc-wide {
    grid-column: 1 / -1;
}

.tc-mini-head {
    border-bottom: 1px solid var(--tc-line);
    padding-bottom: 10px;
    margin-bottom: 6px;
}

.tc-mini-list {
    display: grid;
}

.tc-mini-row {
    position: relative;
    display: grid;
    grid-template-columns: 30px 1fr 50px;
    gap: 10px;
    align-items: center;
    padding: 10px 8px;
    border-bottom: 1px solid var(--tc-line);
    border-radius: 12px;
    transition: background .18s ease, transform .18s ease;
}

.tc-mini-row:hover {
    background: #f8fafc;
    transform: translateX(2px);
}

.tc-mini-row:last-child {
    border-bottom: 0;
}

.tc-mini-rank {
    position: relative;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 30% 24%, rgba(255, 255, 255, .72), transparent 27%),
        linear-gradient(135deg, #f2f4f7, #e5e7eb);
    color: #344054;
    font-weight: 950;
    font-size: 11px;
    box-shadow:
        0 3px 8px rgba(15, 23, 42, .07),
        inset 0 0 0 2px rgba(255, 255, 255, .65);
}

.tc-mini-row:first-child .tc-mini-rank {
    background:
        radial-gradient(circle at 30% 24%, rgba(255, 255, 255, .72), transparent 27%),
        linear-gradient(135deg, #111827 0%, #174b35 100%);
    color: #fff;
}

.tc-mini-main {
    min-width: 0;
}

.tc-mini-main strong {
    display: block;
    font-size: 12px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 900;
}

.tc-mini-main span {
    display: block;
    margin-top: 2px;
    color: var(--tc-muted);
    font-size: 10px;
    font-weight: 700;
}

.tc-mini-view {
    text-align: right;
    font-weight: 900;
    color: var(--tc-primary);
    font-size: 12px;
}

.tc-empty {
    color: var(--tc-muted);
    background: #f9fafb;
    border: 1px dashed var(--tc-border);
    border-radius: 12px;
    padding: 14px;
    text-align: center;
    font-size: 12px;
}

/* =========================================================
   SEO Box
========================================================= */

.tc-seo-box {
    margin-top: 14px;
    padding: 18px;
    line-height: 1.8;
    color: #374151;
}

.tc-seo-box h2,
.tc-seo-box h3 {
    color: #111827;
}

.tc-seo-box h2 {
    margin-top: 0;
    font-size: 19px;
    font-weight: 900;
}

.tc-seo-box h3 {
    font-size: 16px;
    font-weight: 900;
}

.tc-internal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tc-internal-links a {
    display: inline-flex;
    padding: 7px 11px;
    border-radius: 999px;
    background: #f2f4f7;
    font-size: 12px;
    font-weight: 850;
    color: #374151;
}

/* =========================================================
   Responsive
========================================================= */

@media (max-width: 860px) {
    .tc-hero {
        grid-template-columns: 1fr;
    }

    .tc-hero-stat {
        text-align: left;
    }

    .tc-ranking-layout {
        grid-template-columns: 1fr;
    }

    .tc-category-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .tc-page {
        padding: 10px 8px 36px;
    }

    .tc-hero {
        border-radius: 16px;
        padding: 18px;
    }

    .tc-hero h1 {
        font-size: 28px;
    }

    .tc-main-ranking,
    .tc-mini-box {
        border-radius: 14px;
        padding: 12px;
    }

    .tc-section-title {
        display: block;
    }

    .tc-rank-row {
        grid-template-columns: 30px 68px 1fr;
        gap: 8px;
        align-items: start;
        padding: 10px 6px;
    }

    .tc-row-views {
        grid-column: 3 / 4;
        text-align: left;
        display: flex;
        gap: 5px;
        align-items: baseline;
    }

    .tc-row-main h3 {
        font-size: 12px;
    }

    .tc-row-meta span {
        font-size: 10px;
    }

    .tc-mini-row {
        grid-template-columns: 26px 1fr 46px;
    }

    .tc-crown {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
}
/* =========================================================
   EVCompareHub Topchart - Simple Home-style Ranking Override
   วางท้าย topchart.css เพื่อ override medal/ribbon เดิม
========================================================= */

/* Reset ranking fancy effects */
.tc-crown::before,
.tc-crown::after,
.tc-rank-row::before,
.tc-mini-rank::before,
.tc-mini-rank::after,
.tc-row-rank::before,
.tc-row-rank::after {
    display: none !important;
    content: none !important;
}

/* Main card ให้เรียบแบบ Home */
.tc-main-ranking,
.tc-mini-box,
.tc-seo-box {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
}

/* Header ของ section ให้ใกล้หน้า Home */
.tc-section-title,
.tc-mini-head {
    border-bottom: 1px solid #edf0f5;
}

.tc-section-title h2,
.tc-mini-head h2 {
    color: #1f2937;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0;
}

.tc-section-title p,
.tc-mini-head p {
    color: #667085;
    font-size: 15px;
    font-weight: 500;
}

/* อันดับ 1: ใช้กล่องส้มเรียบ ๆ แบบ Home */
.tc-crown {
    position: absolute;
    top: 0;
    left: 0;
    right: auto;
    width: 44px;
    height: 44px;
    border-radius: 0;
    background: #f47b20;
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 22px;
    font-weight: 900;
    box-shadow: none;
    z-index: 3;
}

/* รูปอันดับ 1 ให้เหมือน card รถหน้า Home มากขึ้น */
.tc-winner-img {
    position: relative;
    background: #fff;
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.tc-winner-img::after {
    display: none;
}

.tc-winner-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    padding: 14px;
    transform: none;
}

/* Winner body */
.tc-winner-body {
    padding: 14px 8px 4px;
    text-align: center;
}

.tc-winner-tag {
    background: #edf8f2;
    color: #3f8f67;
    border-radius: 999px;
    padding: 5px 11px;
    font-size: 13px;
    font-weight: 800;
}

.tc-brand {
    color: #3f8f67;
    font-size: 11px;
    font-weight: 800;
}

.tc-winner h3 {
    color: #111827;
    font-size: 20px;
    line-height: 1.35;
    font-weight: 800;
}

.tc-price {
    color: #d8432e;
    font-size: 24px;
    font-weight: 900;
}

/* ปุ่มเรียบแบบหน้า Home */
.tc-btn {
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    box-shadow: none;
}

.tc-btn.dark {
    background: #111827;
    border-color: #111827;
    color: #fff;
}

.tc-btn.light {
    background: #fff;
    border-color: #e5e7eb;
    color: #1f2937;
}

/* Ranking row แบบ simple list */
.tc-rank-row {
    position: relative;
    display: grid;
    grid-template-columns: 44px 92px 1fr 70px;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #edf0f5;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none;
    transition: background .18s ease;
}

.tc-rank-row:hover {
    background: #f8fafc !important;
    transform: none;
    box-shadow: none;
}

.tc-rank-row:last-child {
    border-bottom: 0;
}

/* เลขอันดับแถวขวา: ส้มเรียบ ไม่ใช่เหรียญ */
.tc-row-rank {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f47b20 !important;
    color: #fff !important;
    display: grid;
    place-items: center;
    font-size: 14px;
    font-weight: 900;
    box-shadow: none !important;
}

/* อันดับ 4+ ให้ลดความเด่น */
.tc-rank-row:nth-child(n+4) .tc-row-rank {
    background: #f2f4f7 !important;
    color: #1f2937 !important;
}

/* รูปรถใน list ให้เรียบ ไม่มี capsule แปลก ๆ */
.tc-row-img {
    background: #fff;
    border: 0;
    border-radius: 12px;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tc-row-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
    transform: none !important;
    transition: none;
}

/* Text ใน row */
.tc-row-main h3 {
    margin: 2px 0 6px;
    color: #111827;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 800;
}

.tc-row-meta {
    gap: 6px;
}

.tc-row-meta span,
.tc-winner-meta span {
    background: #f2f4f7;
    color: #344054;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 700;
}

.tc-row-views {
    text-align: right;
}

.tc-row-views strong {
    display: block;
    color: #1f2937;
    font-size: 18px;
    font-weight: 900;
}

.tc-row-views span {
    color: #667085;
    font-size: 11px;
    font-weight: 700;
}

/* Mini ranking box แบบหน้า Home */
.tc-category-grid {
    gap: 14px;
}

.tc-mini-box {
    padding: 16px;
}

.tc-mini-row {
    display: grid;
    grid-template-columns: 34px 1fr 54px;
    gap: 10px;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid #edf0f5;
    border-radius: 0;
    background: transparent;
    transition: background .18s ease;
}

.tc-mini-row:hover {
    background: #f8fafc;
    transform: none;
}

.tc-mini-row:last-child {
    border-bottom: 0;
}

/* Mini rank: simple number */
.tc-mini-rank {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: #f47b20 !important;
    color: #fff !important;
    display: grid;
    place-items: center;
    font-size: 16px;
    font-weight: 900;
    box-shadow: none !important;
}

.tc-mini-row:nth-child(n+4) .tc-mini-rank {
    background: #f2f4f7 !important;
    color: #1f2937 !important;
}

.tc-mini-main strong {
    color: #111827;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 800;
}

.tc-mini-main span {
    color: #667085;
    font-size: 11px;
    font-weight: 600;
}

.tc-mini-view {
    color: #3f8f67;
    font-size: 13px;
    font-weight: 900;
    text-align: right;
}

/* Hero ยังคงโทนเขียว แต่ให้เรียบลง */
.tc-hero {
    background: linear-gradient(135deg, #102017 0%, #174b35 100%);
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
}

.tc-kicker {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.14);
    color: #fff;
}

/* Mobile */
@media (max-width: 860px) {
    .tc-ranking-layout {
        grid-template-columns: 1fr;
    }

    .tc-rank-row {
        grid-template-columns: 38px 82px 1fr 58px;
    }
}

@media (max-width: 560px) {
    .tc-rank-row {
        grid-template-columns: 32px 72px 1fr;
        gap: 8px;
        padding: 11px 0;
    }

    .tc-row-rank {
        width: 28px;
        height: 28px;
        font-size: 12px;
        border-radius: 7px;
    }

    .tc-row-views {
        grid-column: 3 / 4;
        text-align: left;
        display: flex;
        gap: 5px;
        align-items: baseline;
    }

    .tc-row-main h3 {
        font-size: 13px;
    }

    .tc-row-meta span {
        font-size: 10px;
        padding: 4px 7px;
    }

    .tc-mini-row {
        grid-template-columns: 30px 1fr 48px;
    }

    .tc-crown {
        width: 38px;
        height: 38px;
        font-size: 24px;
    }
}
/* =========================================================
   Topchart font-size align with Search page
   Append at END of /ev/topchart.css
========================================================= */

html,
body {
    font-family: Inter, "Sarabun", "Noto Sans Thai", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #ffffff !important;
    color: #111111 !important;
    font-size: 14px;
    line-height: 1.5;
    color-scheme: light;
}

.tc-page {
    max-width: 1320px;
    width: min(1320px, calc(100% - 32px));
    padding: 0px 0 40px;
}

/* Breadcrumb ให้เล็กเหมือน Search */
.tc-breadcrumb {
    font-size: 12px;
    color: #70757a;
    margin-bottom: 10px;
}

/* Hero ให้ไม่ใหญ่เกิน Search */
.tc-hero {
    border-radius: 18px;
    padding: 22px 24px;
    margin-bottom: 16px;
}

.tc-kicker {
    font-size: 11px;
    font-weight: 800;
}

.tc-hero h1 {
    font-size: 2rem;
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.tc-hero p {
    font-size: 15px;
    line-height: 1.65;
}

/* Section title ให้ใกล้ Search */
.tc-section-title h2,
.tc-mini-head h2 {
    font-size: 22px;
    line-height: 1.35;
    font-weight: 800;
    color: #1f2937;
}

.tc-section-title p,
.tc-mini-head p {
font-size: 15px;
    line-height: 1.55;
    color: #667085;
}

/* Main ranking card */
.tc-main-ranking {
    padding: 16px;
    border-radius: 14px;
    box-shadow: 0 0 1px rgba(0,0,0,0.1);
}

/* Winner card */
.tc-winner h3 {
    font-size: 21px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.tc-price {
    font-size: 1.35rem;
    line-height: 1.2;
    font-weight: 800;
}

.tc-winner-meta span {
    font-size: 14px;
    padding: 4px 8px;
    font-weight: 700;
}

.tc-btn {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 800;
}

/* Ranking row: ใกล้ search result compact */
.tc-rank-row {
    grid-template-columns: 38px 92px 1fr 70px;
    gap: 10px;
    padding: 10px 0;
}

.tc-row-rank {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 800;
}

.tc-row-img {
    border-radius: 6px;
}

.tc-row-main h3 {
    font-size: 18px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin: 2px 0 6px;
}

.tc-brand {
    font-size: 14px;
    font-weight: 800;
}

.tc-row-meta span {
    font-size: 14px;
    padding: 4px 8px;
    font-weight: 700;
}

.tc-row-views strong {
    font-size: 18px;
    font-weight: 800;
}

.tc-row-views span {
    font-size: 14px;
}

/* Mini boxes */
.tc-category-grid {
    gap: 14px;
}

.tc-mini-box {
    padding: 14px;
    border-radius: 14px;
    box-shadow: 0 0 1px rgba(0,0,0,0.1);
}

.tc-mini-row {
    grid-template-columns: 30px 1fr 48px;
    gap: 10px;
    padding: 9px 0;
}

.tc-mini-rank {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
}

.tc-mini-main strong {
    font-size: 16px;
    line-height: 1.35;
    font-weight: 800;
}

.tc-mini-main span {
    font-size: 14px;
    color: #667085;
}

.tc-mini-view {
        font-size: 15px;
    font-weight: 800;
}

/* SEO box */
.tc-seo-box {
    padding: 20px 22px;
    border-radius: 16px;
    box-shadow: 0 0 1px rgba(0,0,0,0.1);
}

.tc-seo-box h2 {
    font-size: 20px;
    line-height: 1.35;
    font-weight: 800;
}

.tc-seo-box h3 {
    font-size: 17px;
    line-height: 1.35;
    font-weight: 800;
}

.tc-seo-box p {
    font-size: 14px;
    line-height: 1.75;
}

/* Live vote spacing ให้เหมือน Search */
.evch-live-vote-bar,
.live-vote-bar {
    width: min(1320px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

/* Mobile align with Search */
@media (max-width: 767px) {
    .tc-page {
        width: min(100% - 20px, 100%);
        padding: 10px 0 36px;
    }

    .tc-hero {
        padding: 18px;
        border-radius: 16px;
    }

    .tc-hero h1 {
        font-size: 26px;
    }

    .tc-hero p {
        font-size: 15px;
    }

    .tc-section-title h2,
    .tc-mini-head h2 {
        font-size: 18px;
    }

    .tc-rank-row {
        grid-template-columns: 30px 72px 1fr;
        gap: 8px;
        padding: 10px 0;
    }

    .tc-row-rank {
        width: 26px;
        height: 26px;
        font-size: 16px;
    }

    .tc-row-main h3 {
        font-size: 20px;
        line-height: 1.25;
    }

    .tc-row-views {
        grid-column: 3 / 4;
        text-align: left;
        display: flex;
        gap: 5px;
        align-items: baseline;
    }

    .tc-row-meta span {
                font-size: 13px;
        padding: 4px 8px;
    }

    .tc-winner h3 {
        font-size: 24px;
    }

    .tc-price {
        font-size: 1.2rem;
    }

    .tc-mini-row {
        grid-template-columns: 28px 1fr 46px;
    }

    .evch-live-vote-bar,
    .live-vote-bar {
        width: min(100% - 20px, 100%);
    }
}
/* =========================================================
   Topchart winner card compact fix
   ลดพื้นที่ว่างฝั่งอันดับ 1
========================================================= */

.tc-ranking-layout {
    align-items: start;
}

.tc-winner {
    height: auto !important;
    min-height: 0 !important;
    justify-content: flex-start !important;
}

.tc-winner-img {
    max-height: 260px;
    aspect-ratio: 16 / 8.5;
}

.tc-winner-img img {
    max-height: 260px;
    object-fit: contain;
}

.tc-winner-body {
    padding-top: 10px;
}

/* จำกัดความสูงโซนซ้าย ไม่ให้ดูโล่งเกิน */
.tc-ranking-layout > div:first-child {
    position: sticky;
    top: 72px;
    align-self: start;
}

/* ถ้าไม่อยาก sticky ให้ลบ block ด้านบนได้ */

/* Desktop กลาง ๆ ให้รูปรถไม่กินที่เกิน */
@media (min-width: 861px) {
    .tc-ranking-layout {
        grid-template-columns: 38% 1fr;
        gap: 22px;
    }

    .tc-winner-img {
        max-height: 240px;
    }

    .tc-winner-img img {
        max-height: 240px;
    }
}

/* Mobile ไม่ sticky */
@media (max-width: 860px) {
    .tc-ranking-layout > div:first-child {
        position: static;
    }

    .tc-winner-img {
        max-height: none;
        aspect-ratio: 16 / 9;
    }
}
@media (min-width: 861px) {
    .tc-main-ranking {
        padding: 18px;
    }

    .tc-winner {
        background: #fff;
        border: 1px solid #edf0f5;
        border-radius: 16px;
        padding: 12px;
    }

    .tc-winner-img {
        background: #fff;
        border-radius: 12px;
    }

    .tc-ranking-list {
        background: #fff;
    }
}
/* A010 - Mini ranking view period label */
.tc-mini-view {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    line-height: 1.15;
}

.tc-mini-view strong {
    color: #3f8f67;
    font-size: 15px;
    font-weight: 900;
}

.tc-mini-view span {
    color: #667085;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 560px) {
    .tc-mini-view strong {
        font-size: 13px;
    }

    .tc-mini-view span {
        font-size: 10px;
    }
}
/* =========================================================
   Topchart - Contextual Internal Links
========================================================= */

.tc-context-link-block {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.tc-context-link-group {
    padding: 14px;
    border: 1px solid #e7ebf0;
    border-radius: 14px;
    background:
        radial-gradient(circle at top left, rgba(39, 132, 95, .08), transparent 36%),
        #ffffff;
}

.tc-context-link-group h4 {
    margin: 0 0 10px;
    color: #0f6d55;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 900;
}

.tc-context-link-group .tc-internal-links {
    margin-top: 0;
}

.tc-context-link-group .tc-internal-links a {
    min-height: 38px;
    align-items: center;
    background: #f8faf9;
    border: 1px solid #edf0f2;
    color: #1f2937;
}

.tc-context-link-group .tc-internal-links a:hover {
    background: #eaf6f1;
    border-color: #cde7dd;
    color: #0f6d55;
}

@media (max-width: 767px) {
    .tc-context-link-group {
        padding: 12px;
        border-radius: 12px;
    }

    .tc-context-link-group h4 {
        font-size: 14px;
    }

    .tc-context-link-group .tc-internal-links {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .tc-context-link-group .tc-internal-links a {
        justify-content: center;
        width: 100%;
        border-radius: 12px;
    }
}
/* =========================================================
   Topchart - Category Heading for Budget / Body Sections
========================================================= */

.tc-category-heading {
    grid-column: 1 / -1;
    padding: 16px 18px;
    margin-top: 2px;
    border: 1px solid #e7ebf0;
    border-radius: 16px;
    background:
        radial-gradient(circle at top left, rgba(39, 132, 95, .08), transparent 34%),
        #ffffff;
    box-shadow: 0 0 1px rgba(0,0,0,0.08);
}

.tc-category-heading h2 {
    margin: 0;
    color: #1f2937;
    font-size: 22px;
    line-height: 1.35;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.tc-category-heading p {
    margin: 4px 0 0;
    color: #667085;
    font-size: 15px;
    line-height: 1.6;
    font-weight: 500;
}

@media (max-width: 767px) {
    .tc-category-heading {
        padding: 14px;
        border-radius: 14px;
    }

    .tc-category-heading h2 {
        font-size: 18px;
    }

    .tc-category-heading p {
        font-size: 14px;
    }
}