/* =========================================================
   EVCompareHub Car Detail - single table ready
   ========================================================= */

:root {
    --bg: #f6f7f8;
    --card: #ffffff;
    --text: #171717;
    --muted: #70757a;
    --line: #e5e7eb;
    --green: #16896b;
    --green-dark: #0f6d55;
    --green-soft: #eaf6f1;
    --green-softer: #f4fbf7;
    --red-soft: #fff2f2;
    --yellow-soft: #fff7e8;
    --shadow:  0 2px 5px rgba(0, 0, 0, 0.1);
    --radius: 18px;
    --container: 1320px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

body.no-scroll {
    overflow: hidden;
}

img {
    max-width: 100%;
    display: block;
}
html, body {
  background: #ffffff !important;
  color: #111111 !important;
  color-scheme: light;
}

body.ev-page,
.ev-page,
.site,
.site-main,
main,
.page-shell,
.evch-page-wrap {
  background: #ffffff !important;
  color: #111111 !important;
}
a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.container {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}

.header-inner {
    min-height: 72px;
    display: grid;
    grid-template-columns: 240px 1fr 300px;
    align-items: center;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border: 2px solid var(--green);
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--green);
    font-size: 20px;
    flex: 0 0 auto;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 1.35rem;
    letter-spacing: 0.01em;
}

.brand-text small {
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

.desktop-nav {
    display: flex;
    justify-content: center;
    gap: 26px;
    min-width: 0;
}

.desktop-nav a {
    color: #111;
    font-weight: 500;
    white-space: nowrap;
}

.desktop-nav a:hover {
    color: var(--green);
}

/*.header-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #0d1117;
    border-radius: 14px;
    padding: 8px 10px 8px 14px;
}*/

.header-search input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    color: #fff;
    min-width: 0;
}

.header-search input::placeholder {
    color: rgba(255,255,255,0.65);
}

.header-search button {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: rgba(255,255,255,0.08);
    color: #fff;
    cursor: pointer;
}

.mobile-menu-btn,
.mobile-menu {
    display: none;
}

/* Main */
.page-main {
    /*padding: 18px 0 100px;*/
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 12px;
}

.breadcrumb a:hover {
    color: var(--green);
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 0px 1px rgba(0, 0, 0, 0.1) !important;
}
@media (max-width: 768px) {
  .card {
/*    border: none;
    box-shadow: 0 0px 0px rgba(0, 0, 0, 0) !important;*/
  }
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr) 340px;
    gap: 16px;
    align-items: start;
}

.hero-card {
    padding: 14px;
}

/*.score-badge-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.score-badge {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
}

.score-badge-label {
    display: inline-flex;
    align-self: flex-start;
    background: var(--green);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 8px;
}

.score-badge-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    color: #111;
}

.score-badge-value small {
    font-size: 1.25rem;
    color: var(--green);
}

.best-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--yellow-soft);
    color: #93601f;
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 0.92rem;
    font-weight: 600;
}*/

.hero-media {
    margin: 12px 0 6px;
    /*aspect-ratio: 16 / 9;*/
    border-radius: 14px;
    overflow: hidden;
    /*background: linear-gradient(180deg, #fafafa, #f2f4f5);*/
    display: grid;
    place-items: center;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.eyebrow {
    color: #1f2937;
    font-size: 1rem;
    font-weight: 600;
}

.hero-copy h1 {
        margin: 4px 0 4px;
    font-size: 2rem;
    line-height: 1.08;
    letter-spacing: -0.03em;
    font-weight: 800;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 10px 0 8px;
}

.pill {
    display: inline-flex;
    align-items: center;
    background: #f3f4f6;
    color: #374151;
    font-size: 0.92rem;
    padding: 6px 10px;
    border-radius: 999px;
}

.pill-soft {
    background: #eef8f4;
    color: var(--green-dark);
}

.price-block {
    margin: 10px 0 16px;
}

.price-main {
        font-size: 2rem;
    font-weight: 800;
    line-height: 1.05;
}

.price-sub {
    color: var(--muted);
    margin-top: 4px;
}

.spec-chips {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.spec-chip {
    background: var(--green-softer);
    border: 1px solid #dcefe7;
    border-radius: 14px;
    padding: 12px 10px;
    text-align: center;
}

.spec-chip strong {
    display: block;
    font-size: 1rem;
    color: var(--green-dark);
    line-height: 1.1;
}

.spec-chip span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
}

.benefit-box {
    margin-top: 12px;
    background: var(--green-soft);
    border: 1px solid #dcefe7;
    border-radius: 14px;
    padding: 12px 14px;
}

.benefit-main {
    font-weight: 700;
    color: #0f513f;
}

.benefit-sub {
    color: #46685d;
    margin-top: 4px;
    font-size: 0.95rem;
}

.hero-bottom-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 12px;
    align-items: stretch;
}

.inner-card {
    border-radius: 16px;
    box-shadow: none;
}

.hero-card .loan-card,
.hero-card .score-card {
    /*padding: 14px;*/
    width: 100%;
}

.hero-card .loan-card h2,
.hero-card .score-card h2 {
    font-size: 1.1rem;
}

/* Specs */
.specs-card {
    padding: 12px;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-bottom: 14px;
}

.tab-btn {
        border: 1px solid var(--line);
    background: #f7f7f7;
    color: #222;
    border-radius: 10px;
    padding: 10px 4px;
    font-weight: 600;
    cursor: pointer;
}

.tab-btn.active {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.spec-group + .spec-group {
    margin-top: 18px;
}

.spec-group h2,
.description-card h2 {
    margin: 0 0 10px;
    font-size: 1.35rem;
}
@media (max-width: 1180px) {
    .spec-group h2{
        text-align: center;
    }
}
.spec-list {
    border-top: 1px solid var(--line);
}

.spec-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    align-items: center;
}

.spec-row span {
    color: #4b5563;
    font-size: 0.88rem;
    line-height: 1.45;
}

.spec-row strong {
    text-align: right;
}

.spec-list.simple {
    margin-top: 8px;
}

.insight-box {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 10px;
    background: var(--green-soft);
    border: 1px solid #dcefe7;
    border-radius: 14px;
    padding: 12px;
    margin: 12px 0;
}

.insight-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(22,137,107,0.12);
    display: grid;
    place-items: center;
    font-size: 1.3rem;
}

.insight-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.insight-copy strong {
    color: #114d3d;
     font-size: 0.88rem;
}

.insight-copy span {
    color: #4e685f;
        font-size: 0.88rem;
}

/* Right rail */
.right-rail {
    display: grid;
    gap: 16px;
}

.gallery-card,
.fit-card,
.compare-card,
.description-card {
    padding: 12px;
}

.compare-card
{
    /*height: 1742px;*/
}

.gallery-card h2,
.fit-card h2,
.compare-card h2,
.loan-card h2,
.score-card h2 {
    margin: 0;
    font-size: 1.35rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.gallery-item {
    border: 0;
    padding: 0;
    background: #f3f4f6;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1 / 1;
}

.gallery-item.is-main {
    grid-column: span 3;
    aspect-ratio: 16 / 9;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}

.gallery-item:hover img {
    transform: scale(1.03);
}

.gallery-view-all {
    width: 100%;
    margin-top: 10px;
    border: 1px solid var(--line);
    background: #f8faf9;
    border-radius: 12px;
    padding: 11px 12px;
    cursor: pointer;
    font-weight: 600;
        color: #000;
}

.fit-grid {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.fit-box {
    border-radius: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    font-size: 14px;
}

.fit-box h3 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.fit-box ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.fit-box li {
    color: #374151;
}

.fit-box.is-good {
    background: var(--green-softer);
    border-color: #dcefe7;
}

.fit-box.is-bad {
    background: var(--red-soft);
    border-color: #f2dddd;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.section-head a,
.text-btn,
.section-head span {
    color: var(--green);
    font-weight: 700;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.placeholder-thumb {
    display: grid;
    place-items: center;
    color: var(--green);
    font-weight: 800;
}

.description-card {
    margin-top: 16px;
}

.description-body {
    color: #4b5563;
    line-height: 1.7;
}

.loan-rows {
    display: grid;
    gap: 6px;
    margin-top: 10px;
}

.loan-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.loan-row span {
    color: var(--muted);
}

.loan-row strong {
    font-size: 1.06rem;
}

.form-group {
    margin-top: 10px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
}

.form-group input[type="range"] {
    width: 100%;
    accent-color: var(--green);
}

.form-group input[type="number"] {
    width: 100%;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 14px;
    outline: 0;
    background: #fff;
}

.term-buttons {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin-top: 10px;
}

.term-btn {
        border: 1px solid var(--line);
    background: #fff;
    border-radius: 10px;
    height: 40px;
    cursor: pointer;
    font-weight: 700;
    color: #888;
}

.term-btn.active {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.monthly-box {
    margin-top: 12px;
    background: #edf8f3;
    border: 1px solid #dcefe7;
    border-radius: 16px;
    padding: 14px;
    text-align: center;
}

.monthly-box span {
    display: block;
    color: #37554a;
}

.monthly-box strong {
    display: block;
    margin-top: 4px;
    font-size: 1.7rem;
    line-height: 1.1;
    color: var(--green-dark);
}

.monthly-box small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
}

.primary-cta,
.secondary-cta {
    min-height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    font-weight: 800;
}

.primary-cta {
    width: 100%;
    margin-top: 12px;
    background: var(--green);
    color: #fff;
}

.primary-cta:hover {
    background: var(--green-dark);
}

.secondary-cta {
    background: #fff;
    color: var(--green);
    border: 1px solid #cde7dd;
}

.score-list {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.score-row {
    display: grid;
    grid-template-columns: 86px 1fr 34px;
    gap: 8px;
    align-items: center;
}

.score-row span {
    font-weight: 600;
    color: #374151;
    font-size: 0.92rem;
}

.score-row strong {
    text-align: right;
}

.score-bar {
    height: 8px;
    border-radius: 999px;
    background: #e7f0ec;
    overflow: hidden;
}

.score-bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2ca77d, #16896b);
}

.score-circle {
    width: 128px;
    height: 128px;
    border-radius: 50%;
    margin: 20px auto 10px;
    background: conic-gradient(var(--green) 0deg, var(--green) 310deg, #e4efe9 310deg 360deg);
    display: grid;
    place-items: center;
}

.score-circle-inner {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: #fff;
    display: grid;
    place-items: center;
    text-align: center;
}

.score-circle-inner strong {
    display: block;
    font-size: 1.6rem;
    line-height: 1;
}

.score-circle-inner span {
    color: var(--muted);
    font-size: 0.9rem;
}

.score-label {
    text-align: center;
    font-weight: 800;
    color: var(--green-dark);
}

.score-details {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--line);
    display: grid;
    gap: 8px;
    color: #4b5563;
    font-size: 0.88rem;
    line-height: 1.45;
}

.site-footer {
    background: #101418;
    color: rgba(255,255,255,0.88);
    padding: 28px 0 100px;
    margin-top: 28px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 24px;
}

.footer-inner strong {
    display: block;
    margin-bottom: 8px;
    color: #fff;
}

.footer-inner p {
    margin: 0;
    color: rgba(255,255,255,0.72);
}

.mobile-sticky-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,0.96);
    border-top: 1px solid rgba(0,0,0,0.08);
    backdrop-filter: blur(8px);
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0,0,0,0.82);
    display: grid;
    place-items: center;
    padding: 20px;
}

.lightbox img {
    max-width: min(1200px, 100%);
    max-height: 88vh;
    border-radius: 16px;
}

.lightbox-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.16);
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
}

@media (max-width: 1440px) {
    :root {
        --container: 1280px;
    }

    .header-inner {
        grid-template-columns: 220px 1fr 270px;
        gap: 16px;
    }

    .desktop-nav {
        gap: 20px;
        font-size: 0.96rem;
    }

    .hero-grid {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) 320px;
    }

    .hero-copy h1 {
        font-size: clamp(1.8rem, 2.3vw, 2.5rem);
    }
}

@media (min-width: 768px) and (max-width: 900px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .header-inner {
        grid-template-columns: 1fr auto;
    }

    .mobile-menu-btn {
        display: inline-flex;
        width: 42px;
        height: 42px;
        border: 1px solid var(--line);
        border-radius: 10px;
        background: #fff;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 1.2rem;
    }

    .mobile-menu {
        display: none;
        padding: 0 16px 14px;
        border-top: 1px solid var(--line);
        background: #fff;
    }

    .mobile-menu.open {
        display: grid;
    }

    .mobile-menu a {
        padding: 11px 0;
        border-bottom: 1px solid #f0f0f0;
        font-weight: 500;
    }

    .hero-grid {
        grid-template-columns: 1fr;
    }
    .right-rail {
        grid-template-columns: 1fr 1fr;
    }

    .hero-bottom-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .container {
        width: min(100% - 20px, 100%);
    }

    .page-main {
        padding-bottom: 110px;
    }

    .breadcrumb {
        font-size: 12px;
    }

    .hero-card,
    .specs-card,
    .gallery-card,
    .fit-card,
    .compare-card,
    .loan-card,
    .score-card,
    .description-card {
        /*padding: 14px;*/
        border-radius: 16px;
        height: unset;
    }

    .score-badge-value {
        font-size: 26px;
    }

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

    .price-main {
        font-size: 26px;
    }

    .spec-chips,
    .hero-bottom-grid,
    .right-rail,
    .fit-grid,
    .form-grid,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .tab-btn {
        white-space: nowrap;
        flex: 0 0 auto;
    }

    .spec-row {
        /*grid-template-columns: 1fr;*/
        gap: 4px;
    }

    .spec-row strong {
        text-align: left;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-item.is-main {
        grid-column: span 2;
    }

    .compare-item {
        grid-template-columns: 78px 1fr;
    }

    .term-buttons {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .score-row {
        grid-template-columns: 90px 1fr 40px;
        gap: 10px;
    }

    .mobile-sticky-cta {
        display: grid;
    }

    .site-footer {
        padding-bottom: 112px;
    }
}


html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

.container,
.hero-grid,
.hero-card,
.specs-card,
.right-rail,
.hero-copy,
.hero-bottom-grid,
.spec-chips,
.score-row,
.compare-item,
.header-inner,
.brand,
.brand-text {
    min-width: 0;
}

.hero-copy h1 {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.spec-chip strong,
.price-main,
.score-badge-value {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.hero-media,
.gallery-item,
.compare-thumb,
.monthly-box,
.benefit-box,
.insight-box {
    max-width: 100%;
}

.gallery-group-title {
    margin-top: 12px;
    margin-bottom: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1f2937;
}

.gallery-group-title-second {
    margin-top: 14px;
}

.gallery-grid-secondary .gallery-item {
    aspect-ratio: 1 / 1;
}
.compare-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.compare-item {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 12px;
    background: #fff;
    transition: 0.2s ease;
}

.compare-item:hover {
    border-color: #d5dbd8;
    transform: translateY(-1px);
}

.compare-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;   /* ดันรูปลงล่าง */
    justify-content: center;
}

.compare-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.placeholder-thumb {
    font-weight: 800;
    font-size: 18px;
    color: var(--green);
}

.compare-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.compare-badge {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    padding: 5px 8px;
    border-radius: 999px;
    margin-bottom: 2px;
}

.compare-badge-direct {
    background: #edf3ff;
    color: #4f6fd6;
}

.compare-badge-value {
    background: #eef8f1;
    color: #3b8f5a;
}

.compare-badge-performance {
    background: #f3f1ff;
    color: #6b5bd2;
}

.compare-copy strong {
    display: block;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 800;
    color: #1f2937;
}

.compare-copy span {
    display: block;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 800;
    color: #111827;
}

.compare-copy small {
    display: block;
    font-size: 12px;
    line-height: 1.4;
    color: #6b7280;
}

.compare-reason {
    font-size: 12px;
    line-height: 1.45;
    color: #6b746f;
    margin-top: 2px;
}
.pros-cons-card {
  padding: 16px;
      margin-top: 20px;
}

.pros-cons-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

/* Desktop */
@media (min-width: 768px) {
  .pros-cons-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.pros-box,
.cons-box {
  padding: 16px;
  border-radius: 12px;
  height: 100%;
}

.pros-box {
  background: #eaf6f1;
}

.cons-box {
  background: #fdecec;
}

/* Fix list spacing */
.pros-box ul,
.cons-box ul {
  margin: 0;
  padding-left: 16px;
}

.pros-box li,
.cons-box li {
  margin-bottom: 8px;
  line-height: 1.5;
  font-size: 14px;
}

/* Make number standout */
.pros-box strong {
  font-weight: 600;
  color: #0a7a5c;
}
/*.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 16px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.2px;
    border: 1px solid transparent;
}

.hero-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    flex: 0 0 8px;
}

.hero-badge-range {
    background: #eaf4ef;
    color: #2b7a63;
    border: 1px solid #d8e9e1;
}
.hero-badge-value {
    background: #f7efe3;
    color: #a96a1f;
    border: 1px solid #ead9bc;
}

.hero-badge-popular {
    background: #2f4a68;
    color: #fff;
    border: 1px solid #2f4a68;
}*/
.hero-topline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.hero-badges {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.hero-badges .result-badge {
    display: inline-flex;
    align-self: flex-start;
}

.card-score-circle {
    width: 56px;
    height: 56px;
    border: 3px solid var(--green);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--green);
    background: #fff;
    flex: 0 0 auto;
}
.price-installment {
    margin-top: 6px;
    font-size: 1rem;
    font-weight: 700;
    color: #4b5563;
}
.result-badge {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.82rem;
    line-height: 1;
    font-weight: 700;
    white-space: nowrap;
}

.result-badge-gold {
    background: var(--yellow-soft);
    color: #94611f;
}

.result-badge-green {
    background: var(--green-soft);
    color: var(--green-dark);
}

.result-badge-blue {
    background: #334e74;
    color: #fff;
}
@media (max-width: 767px) {
    .hero-topline {
        margin-bottom: 8px;
    }

    .card-score-circle {
        width: 52px;
        height: 52px;
        font-size: 1.2rem;
    }

    .price-installment {
        font-size: 0.95rem;
    }
}
/* ===== Car Detail Mobile Compare CTA ===== */

.detail-mobile-compare-cta {
    z-index: 1200;
}

.detail-mobile-compare-cta button {
    border: 1px solid #cde7dd;
    cursor: pointer;
}

.detail-mobile-compare-cta .secondary-cta {
    width: 100%;
    color: var(--green-dark);
    background: #fff;
}

.detail-mobile-compare-cta .secondary-cta.is-active {
    background: var(--green-soft);
    color: var(--green-dark);
    border-color: #b9dfd1;
}

.detail-mobile-compare-cta .primary-cta {
    margin-top: 0;
}

@media (max-width: 767px) {
    .detail-compare-actions {
        display: none;
    }
}
/* ===== Car Detail Mobile Compare CTA ===== */

.detail-mobile-compare-cta {
    z-index: 1200;
}

.detail-mobile-compare-cta button {
    border: 1px solid #cde7dd;
    cursor: pointer;
}

.detail-mobile-compare-cta .secondary-cta {
    width: 100%;
    color: var(--green-dark);
    background: #fff;
}

.detail-mobile-compare-cta .secondary-cta.is-active {
    background: var(--green-soft);
    color: var(--green-dark);
    border-color: #b9dfd1;
}

.detail-mobile-compare-cta .primary-cta {
    margin-top: 0;
}

/* ซ่อนปุ่ม compare ใน hero บน mobile เพราะมี bottom CTA แล้ว */
@media (max-width: 767px) {
    .detail-compare-actions {
        display: none;
    }
}

/* ถ้าเลือก compare แล้ว ให้ซ่อน bottom CTA ปกติ */
@media (max-width: 767px) {
    body.has-compare-selection .detail-mobile-compare-cta {
        display: none !important;
    }
}

/* ===== Product Detail Compare Sticky Bar ===== */

.compare-sticky {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 1300;
    width: min(620px, calc(100% - 24px));
    background: rgba(255,255,255,0.98);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 22px;
    box-shadow: 0 18px 40px rgba(0,0,0,0.14);
    display: grid;
    grid-template-columns: 92px 1fr auto 34px;
    gap: 12px;
    align-items: center;
    padding: 12px 16px;
    backdrop-filter: blur(10px);
}

.compare-sticky[hidden] {
    display: none !important;
}

.compare-sticky-car img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
}

.compare-sticky-text {
    min-width: 0;
}

.compare-sticky-text strong {
    display: block;
    font-size: 1.18rem;
    line-height: 1.1;
    font-weight: 800;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.compare-sticky-link {
    color: var(--green);
    font-weight: 800;
    font-size: 1rem;
    white-space: nowrap;
}

.compare-sticky-link.is-disabled {
    opacity: 0.72;
}

.compare-sticky-close {
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: #4b5563;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

@media (max-width: 767px) {
    .compare-sticky {
        bottom: calc(12px + env(safe-area-inset-bottom));
        width: calc(100% - 20px);
        grid-template-columns: 74px 1fr auto 28px;
        gap: 8px;
        padding: 10px 12px;
        border-radius: 18px;
    }

    .compare-sticky-text strong {
        font-size: 1rem;
    }

    .compare-sticky-link {
        font-size: 0.9rem;
    }

    .compare-sticky-close {
        width: 28px;
        height: 28px;
        font-size: 1.8rem;
    }
}

@media (max-width: 420px) {
    .compare-sticky {
        grid-template-columns: 62px 1fr auto 26px;
        gap: 7px;
        padding: 9px 10px;
    }

    .compare-sticky-text strong {
        font-size: 0.92rem;
    }

    .compare-sticky-link {
        font-size: 0.82rem;
    }
}
/* ===== Prevent two bottom bars overlapping on product detail ===== */

@media (max-width: 767px) {

    body.has-compare-selection .compare-sticky {
        display: grid;
    }
}
@media (max-width: 767px) {
    .page-main {
        padding-bottom: 120px;
    }

    .site-footer {
        padding-bottom: 120px;
    }
}
/* =========================================================
   Product Detail Compare Actions - Desktop + Mobile
   ========================================================= */

.detail-compare-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-top: 14px;
    align-items: center;
}

.detail-compare-btn,
.detail-compare-secondary {
    min-height: 46px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    font-weight: 800;
    font-size: 0.95rem;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.detail-compare-btn {
    border: 1px solid var(--green);
    background: var(--green);
    color: #fff;
}

.detail-compare-btn:hover {
    background: var(--green-dark);
    border-color: var(--green-dark);
    color: #fff;
}

.detail-compare-btn.is-active {
    background: #111827;
    border-color: #111827;
    color: #fff;
}

.detail-compare-btn.is-active .detail-compare-icon {
    display: none;
}

.detail-compare-secondary {
    border: 1px solid #e5e7eb;
    background: #fff;
    color: var(--green-dark);
}

.detail-compare-secondary:hover {
    background: #f8faf9;
    border-color: #cde7dd;
    color: var(--green-dark);
}

/* mobile มี bottom CTA อยู่แล้ว จึงซ่อนปุ่มใน hero */
@media (max-width: 767px) {
    .detail-compare-actions {
        display: none !important;
    }
}
/* =========================================================
   Product Detail Compare CTA State
   ========================================================= */

@media (max-width: 767px) {
    /* default: ยังไม่เลือกอะไร ให้โชว์ CTA เริ่มต้น */
    body:not(.has-compare-selection) .detail-mobile-compare-cta {
        display: grid !important;
    }

    /* มีคันที่เลือกแล้ว แต่คันปัจจุบันยังไม่ได้เลือก = ต้องโชว์ปุ่มให้เพิ่มคันนี้ */
    body.detail-can-add-current .detail-mobile-compare-cta {
        display: grid !important;
    }

    /* คันปัจจุบันถูกเลือกแล้ว = ซ่อน CTA แล้วใช้ compare-sticky แทน */
    body.detail-current-selected .detail-mobile-compare-cta {
        display: none !important;
    }

    /* ครบ 2 คัน = ซ่อน CTA แล้วใช้ compare-sticky */
    body.has-compare-selection:not(.detail-can-add-current) .detail-mobile-compare-cta {
        display: none !important;
    }

    /* ถ้าอยู่หน้า product ของคันที่ยังไม่ได้เลือก และมี 1 คันรออยู่ ให้ซ่อน compare-sticky เพื่อไม่ให้ชน CTA */
    body.detail-can-add-current .compare-sticky {
        display: none !important;
    }
}
/* =========================================================
   Mobile Product CTA - Match Desktop Style
   ========================================================= */

@media (max-width: 767px) {
    .detail-mobile-compare-cta {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
        background: rgba(255,255,255,0.96);
        border-top: 1px solid rgba(0,0,0,0.08);
        box-shadow: 0 -10px 30px rgba(0,0,0,0.08);
        backdrop-filter: blur(10px);
    }

    .detail-mobile-compare-cta .secondary-cta,
    .detail-mobile-compare-cta .primary-cta {
        min-height: 48px;
        border-radius: 14px;
        font-size: 0.95rem;
        font-weight: 800;
        line-height: 1.15;
        text-align: center;
        padding: 0 12px;
        margin: 0;
        text-decoration: none;
        box-shadow: none;
    }

    /* ปุ่มหลัก: เพิ่มเข้าเปรียบเทียบ */
    .detail-mobile-compare-cta .secondary-cta {
        background: var(--green);
        border: 1px solid var(--green);
        color: #fff !important;
    }

    .detail-mobile-compare-cta .secondary-cta:hover,
    .detail-mobile-compare-cta .secondary-cta:focus,
    .detail-mobile-compare-cta .secondary-cta:active {
        background: var(--green-dark);
        border-color: var(--green-dark);
        color: #fff !important;
    }

    /* ตอนคันนี้ถูกเลือกแล้ว */
    .detail-mobile-compare-cta .secondary-cta.is-active {
        background: #111827;
        border-color: #111827;
        color: #fff !important;
    }

    /* ปุ่มรอง: เลือกรุ่นอื่น */
    .detail-mobile-compare-cta .primary-cta {
        background: #fff;
        border: 1px solid #cde7dd;
        color: var(--green-dark) !important;
    }

    .detail-mobile-compare-cta .primary-cta:hover,
    .detail-mobile-compare-cta .primary-cta:focus,
    .detail-mobile-compare-cta .primary-cta:active {
        background: #f8faf9;
        border-color: #b9dfd1;
        color: var(--green-dark) !important;
    }
}

/* =========================================================
   Product Detail - Medium Layout Fix
   901px - 1180px
   Keep hero + specs 2 columns, move lower rail full width
   ========================================================= */

/* =========================================================
   SAFE RESPONSIVE PATCH - Car Detail
   Desktop unchanged / Medium fixed / Mobile restored
   ========================================================= */


/* 901 - 1180px: Tesla browser / tablet landscape / small laptop */
@media (min-width: 901px) and (max-width: 1180px) {

    .container {
        width: 100%;
        max-width: 100%;
        padding-left: 18px;
        padding-right: 18px;
    }

    /*
      HTML จริงของหน้านี้:
      .hero-grid มี 3 children:
      1) .hero-card
      2) .specs-card
      3) .right-rail

      ดังนั้นช่วงกลางต้องจัดเป็น:
      row 1: hero-card | specs-card
      row 2: right-rail เต็มแถว
    */
    .hero-grid {
        display: grid !important;
        grid-template-columns: minmax(0, 60%) minmax(320px, 40%) !important;
        gap: 18px !important;
        align-items: start;
        width: 100%;
        max-width: 100%;
    }

    .hero-card {
        grid-column: 1 !important;
        min-width: 0;
        width: 100%;
    }

    .specs-card {
        grid-column: 2 !important;
        min-width: 0;
        width: 100%;
        height: unset;
    }

    .right-rail {
        grid-column: 1 / -1 !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        gap: 18px !important;
        width: 100%;
        max-width: 100%;
        align-items: start;
    }

    .gallery-card {
        grid-column: 1 !important;
    }

    .fit-card {
        grid-column: 2 !important;
    }

    .compare-card {
        grid-column: 1 / -1 !important;
    }

    .compare-grid {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 14px !important;
    }

    .compare-item {
        grid-template-columns: 105px minmax(0, 1fr) !important;
        min-width: 0;
    }

    .compare-thumb {
        aspect-ratio: 4 / 3;
    }

    .hero-media {
        aspect-ratio: 16 / 9;
        margin: 8px 0 6px;
    }

    .hero-image {
        width: 100%;
        height: 100%;
        max-height: 390px;
        object-fit: contain;
    }

    .hero-copy h1 {
        font-size: clamp(1.5rem, 2.1vw, 2rem);
    }

    .price-main {
        font-size: clamp(1.55rem, 2.2vw, 2rem);
    }

    .pros-cons-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}


/* 768 - 900px: tablet portrait */
@media (min-width: 768px) and (max-width: 900px) {

    .hero-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .hero-card,
    .specs-card,
    .right-rail {
        grid-column: 1 / -1 !important;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        height: unset;
    }

    .right-rail {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 16px !important;
    }

    .compare-card {
        grid-column: 1 / -1 !important;
    }

    .compare-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}


/* <= 767px: mobile hard reset */
@media (max-width: 767px) {

    .container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .hero-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .hero-card,
    .specs-card,
    .right-rail,
    .gallery-card,
    .fit-card,
    .compare-card,
    .description-card,
    .pros-cons-card {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .right-rail {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .hero-media {
        width: 100% !important;
        /*aspect-ratio: 16 / 9 !important;*/
        min-height: 0 !important;
        max-height: none !important;
        margin: 8px 0 6px !important;
    }

    .hero-image {
        width: 100% !important;
        height: 100% !important;
        max-height: none !important;
        object-fit: contain !important;
        display: block !important;
    }

    .hero-copy h1 {
        font-size: 26px !important;
        line-height: 1.15 !important;
    }

    .price-main {
        font-size: 26px !important;
        line-height: 1.15 !important;
    }

    .spec-chips {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .hero-bottom-grid {
        grid-template-columns: 1fr !important;
    }

    .form-grid {
        grid-template-columns: 1fr !important;
    }

    .term-buttons {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    }

    .score-row {
        grid-template-columns: 90px minmax(0, 1fr) 40px !important;
        gap: 10px !important;
    }

    .compare-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .compare-item {
        display: grid !important;
        grid-template-columns: 78px minmax(0, 1fr) !important;
        gap: 12px !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .compare-thumb {
        width: 78px !important;
        aspect-ratio: 1 / 1 !important;
    }

    .compare-copy {
        min-width: 0 !important;
    }

    .compare-copy strong,
    .compare-copy span,
    .compare-copy small,
    .compare-reason {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .pros-cons-grid {
        grid-template-columns: 1fr !important;
    }

    .compare-sticky {
        width: calc(100% - 20px) !important;
        max-width: calc(100% - 20px) !important;
        grid-template-columns: 62px minmax(0, 1fr) auto 26px !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        bottom: calc(12px + env(safe-area-inset-bottom)) !important;
    }
}
/* =========================================================
   Product Detail - Compact 3 Columns
   901px - 1180px
   Keep desktop-like layout for Tesla browser / tablet landscape
   ========================================================= */

@media (min-width: 901px) and (max-width: 1180px) {

    .container {
        width: 100%;
        max-width: 100%;
        padding-left: 18px;
        padding-right: 18px;
    }

    .hero-grid {
        display: grid !important;
        grid-template-columns: minmax(0, 44%) minmax(300px, 32%) minmax(240px, 24%) !important;
        gap: 14px !important;
        align-items: start !important;
        width: 100%;
        max-width: 100%;
    }

    .hero-card {
        grid-column: 1 !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    .specs-card {
        grid-column: 2 !important;
        min-width: 0 !important;
        width: 100% !important;
        height: unset;
    }

    .right-rail {
        grid-column: 3 !important;
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .gallery-card,
    .fit-card,
    .compare-card {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .description-card,
    .pros-cons-card {
        width: 100%;
        max-width: 100%;
    }

    .hero-card {
        padding: 12px;
    }

    .specs-card,
    .gallery-card,
    .fit-card,
    .compare-card {
        padding: 12px;
    }

    .hero-media {
        aspect-ratio: 16 / 9;
        margin: 8px 0 6px;
    }

    .hero-image {
        width: 100%;
        height: 100%;
        max-height: 340px;
        object-fit: contain;
    }

    .hero-copy h1 {
        font-size: clamp(1.45rem, 2vw, 1.85rem);
        line-height: 1.12;
    }

    .price-main {
        font-size: clamp(1.55rem, 2vw, 1.9rem);
    }

    .price-installment {
        font-size: 0.95rem;
    }

    .spec-chips {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 8px;
    }

    .spec-chip {
        padding: 10px 8px;
    }

    .spec-chip strong {
        font-size: 0.92rem;
    }

    .spec-chip span {
        font-size: 0.82rem;
    }

    .detail-compare-actions {
        grid-template-columns: 1fr auto;
        gap: 8px;
    }

    .detail-compare-btn,
    .detail-compare-secondary {
        min-height: 42px;
        padding: 0 12px;
        font-size: 0.9rem;
    }

    .spec-group h2,
    .gallery-card h2,
    .fit-card h2,
    .compare-card h2,
    .loan-card h2,
    .score-card h2 {
        font-size: 1.15rem;
    }

    .spec-row {
        gap: 10px;
        padding: 8px 0;
    }

    .spec-row span,
    .spec-row strong {
        font-size: 0.86rem;
    }

    .insight-box {
        grid-template-columns: 34px 1fr;
        gap: 8px;
        padding: 10px;
    }

    .insight-icon {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        font-size: 1rem;
    }

    .insight-copy strong,
    .insight-copy span {
        font-size: 0.82rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .gallery-item {
        border-radius: 9px;
    }

    .gallery-group-title {
        font-size: 0.88rem;
        margin-top: 10px;
        margin-bottom: 6px;
    }

    .gallery-view-all {
        padding: 9px 10px;
        font-size: 0.9rem;
    }

    .fit-box {
        padding: 11px;
        font-size: 0.86rem;
    }

    .fit-box li {
        line-height: 1.45;
    }

    .compare-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .compare-item {
        grid-template-columns: 76px minmax(0, 1fr) !important;
        gap: 10px !important;
        padding: 10px !important;
        border-radius: 14px;
    }

    .compare-thumb {
        width: 76px;
        aspect-ratio: 4 / 3;
        border-radius: 10px;
    }

    .compare-copy strong {
        font-size: 0.9rem;
        line-height: 1.25;
    }

    .compare-copy span {
        font-size: 0.82rem;
    }

    .compare-copy small,
    .compare-reason {
        font-size: 0.76rem;
    }

    .score-row {
        grid-template-columns: 82px minmax(0, 1fr) 32px;
        gap: 8px;
    }

    .score-circle {
        width: 108px;
        height: 108px;
    }

    .score-circle-inner {
        width: 82px;
        height: 82px;
    }

    .pros-cons-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .compare-sticky {
        width: min(620px, calc(100vw - 36px));
        max-width: calc(100vw - 36px);
        bottom: 18px;
    }
}
.ev-discontinued-notice {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
}
/* =========================================================
   Tesla Referral Promotion Block
   ========================================================= */

.sales-cta-box {
    margin-top: 16px;
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, #fff7e6 0%, #fffdf7 48%, #eefaf5 100%);
    border: 1px solid #f3d18a;
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(180, 120, 30, 0.10);
}

.sales-cta-box::before {
    content: "PROMOTION";
    position: absolute;
    top: 12px;
    right: -34px;
    transform: rotate(35deg);
    background: #d49124;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
    padding: 5px 36px;
}

.sales-cta-copy {
    min-width: 0;
    padding-right: 54px;
}

.sales-cta-copy strong {
    display: block;
    font-size: 1.08rem;
    font-weight: 900;
    color: #7a3f00;
    line-height: 1.35;
}

.sales-cta-copy strong::before {
    content: "⚡ ";
}

.sales-cta-copy span {
    display: block;
    margin-top: 5px;
    font-size: 0.92rem;
    color: #3f3424;
    line-height: 1.5;
}

.sales-cta-copy small {
    display: block;
    margin-top: 5px;
    font-size: 0.78rem;
    color: #7a6b58;
    line-height: 1.45;
}

.sales-cta-btn {
    min-height: 50px;
    border-radius: 14px;
    padding: 0 18px;
    background: linear-gradient(135deg, #f5a623 0%, #d97706 100%);
    color: #fff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1rem;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(217, 119, 6, 0.28);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.sales-cta-btn::after {
    content: " →";
    margin-left: 4px;
}

.sales-cta-btn:hover {
    filter: brightness(0.98);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(217, 119, 6, 0.34);
    color: #fff !important;
}

@media (max-width: 767px) {
    .sales-cta-box {
        margin-top: 16px;
        padding: 16px 14px;
        border-radius: 18px;
    }

    .sales-cta-copy {
        padding-right: 44px;
    }

    .sales-cta-copy strong {
        font-size: 1.02rem;
    }

    .sales-cta-copy span {
        font-size: 0.9rem;
    }

    .sales-cta-btn {
        width: 100%;
        min-height: 52px;
        font-size: 1rem;
    }
}
/* =========================================================
   Desktop CTA spacing refinement
   ========================================================= */

@media (min-width: 768px) {
    .sales-cta-box {
        margin-top: 14px;
        margin-bottom: 14px;
        padding: 14px;
        gap: 10px;
    }

    .sales-cta-copy strong {
        font-size: 0.96rem;
        line-height: 1.35;
    }

    .sales-cta-copy span {
        font-size: 0.84rem;
        line-height: 1.45;
    }

    .sales-cta-copy small {
        font-size: 0.74rem;
    }

    .sales-cta-btn {
        min-height: 42px;
        font-size: 0.88rem;
        border-radius: 12px;
    }

    .detail-compare-actions {
        margin-top: 10px;
        padding-top: 2px;
    }

    .detail-compare-btn,
    .detail-compare-secondary {
        min-height: 42px;
        font-size: 0.88rem;
        border-radius: 12px;
    }
}
@media (min-width: 768px) {
    .detail-compare-btn {
        background: #eef8f4;
        color: var(--green-dark);
        border-color: #cde7dd;
    }

    .detail-compare-btn:hover {
        background: var(--green);
        color: #fff;
        border-color: var(--green);
    }
}
/* =========================================================
   Car Detail - Compare Pair Recommendations
   ========================================================= */

.compare-pair-card {
    padding: 12px;
}

.compare-pair-card .section-head {
    align-items: flex-start;
    margin-bottom: 12px;
}

.compare-pair-card .section-head h2 {
    margin: 0;
}

.compare-pair-subtitle {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.compare-pair-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.compare-pair-item {
    display: block;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.compare-pair-item:hover {
    transform: translateY(-1px);
    border-color: #cde7dd;
    box-shadow: 0 8px 20px rgba(16, 24, 40, .06);
}

.compare-pair-images {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 34px 1fr;
    gap: 6px;
    align-items: center;
    margin-bottom: 9px;
}

.compare-pair-shot {
    height: 78px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 12px;
    background: #f8faf9;
}

.compare-pair-shot img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scale(0.92);
}

.compare-pair-vs {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #111827;
    color: #ffffff;
    font-size: 10px;
    font-weight: 900;
}

.compare-pair-copy {
    min-width: 0;
}

.compare-pair-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 7px;
}

.compare-pair-badges span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--green-soft);
    color: var(--green-dark);
    font-size: 11px;
    line-height: 1;
    font-weight: 800;
}

.compare-pair-badges span:nth-child(2) {
    background: #f3f4f6;
    color: #334155;
}

.compare-pair-copy strong {
    display: block;
    color: #111827;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 900;
}

.compare-pair-prices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin: 8px 0;
}

.compare-pair-prices span {
    min-width: 0;
    padding: 7px 8px;
    border-radius: 10px;
    background: #f8faf9;
    border: 1px solid #edf0f2;
    color: #111827;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 800;
    text-align: center;
}

.compare-pair-copy small {
    display: block;
    color: #667085;
    font-size: 12px;
    line-height: 1.45;
}

@media (min-width: 901px) and (max-width: 1180px) {
    .compare-pair-shot {
        height: 68px;
    }

    .compare-pair-copy strong {
        font-size: 13px;
    }

    .compare-pair-copy small {
        font-size: 11px;
    }
}

@media (max-width: 767px) {
    .compare-pair-card {
        padding: 14px;
    }

    .compare-pair-shot {
        height: 82px;
    }

    .compare-pair-copy strong {
        font-size: 15px;
    }
}
/* =========================================================
   Car Detail - Contextual Internal Links
   ========================================================= */

.detail-context-links-card {
    margin-top: 16px;
    padding: 16px;
}

.detail-context-links-card .section-head {
    align-items: flex-start;
    margin-bottom: 12px;
}

.detail-context-links-card h2 {
    margin: 0;
    font-size: 1.35rem;
}

.detail-context-subtitle {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.detail-context-link-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-context-link-grid a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 13px;
    border-radius: 999px;
    border: 1px solid #dcefe7;
    background: #f8faf9;
    color: var(--green-dark);
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.detail-context-link-grid a:hover {
    background: var(--green-soft);
    border-color: #cde7dd;
    transform: translateY(-1px);
}

@media (max-width: 767px) {
    .detail-context-links-card {
        padding: 14px;
        margin-top: 14px;
    }

    .detail-context-links-card h2 {
        font-size: 1.15rem;
        line-height: 1.35;
    }

    .detail-context-subtitle {
        font-size: 13px;
    }

    .detail-context-link-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .detail-context-link-grid a {
        width: 100%;
        justify-content: center;
        min-height: 42px;
        border-radius: 12px;
    }
}
/* =========================================================
   Car Detail - Charging Map CTA
   ========================================================= */

.ev-detail-charging-cta {
    margin: 12px 0 12px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid #cde7dd;
    background: linear-gradient(135deg, #eef8f4 0%, #ffffff 56%, #f7fbf9 100%);
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    box-shadow: 0 8px 20px rgba(16, 24, 40, .05);
}

.ev-detail-charging-cta__icon {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #174b35;
    color: #fff;
    font-size: 19px;
    box-shadow: 0 8px 18px rgba(23, 75, 53, .18);
}

.ev-detail-charging-cta__copy {
    min-width: 0;
}

.ev-detail-charging-cta__copy strong {
    display: block;
    color: #0f513f;
    font-size: 1rem;
    line-height: 1.35;
    font-weight: 900;
}

.ev-detail-charging-cta__copy span {
    display: block;
    margin-top: 4px;
    color: #3f5f55;
    font-size: .86rem;
    line-height: 1.5;
}

.ev-detail-charging-cta__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.ev-detail-charging-cta__meta small {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #dcefe7;
    color: #174b35;
    font-size: 11px;
    line-height: 1;
    font-weight: 800;
}

.ev-detail-charging-cta__btn {
    grid-column: 1 / -1;
    min-height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    background: #174b35;
    color: #fff !important;
    font-size: .9rem;
    line-height: 1;
    font-weight: 900;
    text-decoration: none;
    transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}

.ev-detail-charging-cta__btn::after {
    content: " →";
    margin-left: 4px;
}

.ev-detail-charging-cta__btn:hover {
    background: #0f6d55;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(23, 75, 53, .20);
}

@media (min-width: 768px) {
    .ev-detail-charging-cta {
        margin-top: 12px;
        margin-bottom: 12px;
        padding: 13px;
        gap: 10px;
    }

    .ev-detail-charging-cta__icon {
        width: 38px;
        height: 38px;
        font-size: 17px;
    }

    .ev-detail-charging-cta__copy strong {
        font-size: .94rem;
    }

    .ev-detail-charging-cta__copy span {
        font-size: .82rem;
    }

    .ev-detail-charging-cta__btn {
        min-height: 40px;
        font-size: .86rem;
    }
}

@media (max-width: 767px) {
    .ev-detail-charging-cta {
        margin-top: 14px;
        padding: 14px;
        border-radius: 18px;
    }

    .ev-detail-charging-cta__copy strong {
        font-size: 1.02rem;
    }

    .ev-detail-charging-cta__copy span {
        font-size: .9rem;
    }

    .ev-detail-charging-cta__btn {
        min-height: 48px;
        font-size: .95rem;
    }
}
/* =========================================================
   Car Detail Desktop Safe Fix
   Restore stable 3-column layout + remove stair-step height
   ========================================================= */

@media (min-width: 1181px) {

    .hero-grid {
        display: grid !important;
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) 320px !important;
        grid-template-areas: none !important;
        gap: 16px !important;
        align-items: start !important;
    }

    .hero-card {
        grid-column: auto !important;
        grid-area: auto !important;
        display: block !important;
        min-height: 0 !important;
        height: auto !important;
        padding: 14px !important;
    }

    .specs-card {
        grid-column: auto !important;
        grid-area: auto !important;
        min-height: 0 !important;
        height: auto !important;
        padding: 12px !important;
    }

    .right-rail {
        grid-column: auto !important;
        grid-area: auto !important;
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        align-self: start !important;
        position: sticky;
        top: 86px;
    }

    .hero-media {
        display: grid !important;
        place-items: center !important;
        margin: 12px 0 6px !important;
        aspect-ratio: auto !important;
        min-height: 0 !important;
        max-height: none !important;
    }

    .hero-image {
        width: 100% !important;
        height: auto !important;
        max-height: 340px !important;
        object-fit: contain !important;
    }

    .hero-topline {
        display: flex !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        gap: 10px !important;
        margin-bottom: 10px !important;
    }

    .hero-copy {
        display: block !important;
    }

    .hero-bottom-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        margin-top: 12px !important;
    }

    .sales-cta-box,
    .ev-detail-charging-cta,
    .detail-compare-actions {
        grid-column: auto !important;
    }

    .description-card,
    .pros-cons-card,
    .detail-context-links-card {
        max-width: none !important;
    }
}