/*
Theme Name: Classic Car History
Theme URI: https://classic-car-history.com/
Description: Custom child theme for Classic Car History, based on Kadence.
Author: Classic Car History
Version: 1.5.0
Template: kadence
Text Domain: classic-car-history
*/

:root {
    --cch-navy: #0a1724;
    --cch-navy-2: #102536;
    --cch-ink: #17202a;
    --cch-muted: #68747f;
    --cch-line: #e3e7ea;
    --cch-paper: #f5f2eb;
    --cch-cream: #f5f2eb;
    --cch-red: #b52a20;
    --cch-white: #fff;
}

.cch-site-header {
    background: var(--cch-navy);
    color: #fff;
    position: relative;
    z-index: 20;
}

.cch-site-header-inner {
    max-width: 1220px;
    min-height: 74px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.cch-brand {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 11px;
    line-height: 1;
}

.cch-brand-mark {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255,255,255,.55);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 16px;
}

.cch-brand-text {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.cch-brand-text small {
    display: block;
    font-size: 9px;
    letter-spacing: .18em;
    opacity: .68;
    margin-top: 4px;
}

.cch-main-nav {
    display: flex;
    align-items: center;
    gap: 25px;
}

.cch-main-nav a {
    color: rgba(255,255,255,.9);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.cch-main-nav a:hover {
    color: #fff;
}

.cch-car-page {
    color: var(--cch-ink);
    background: #fff;
    font-family: inherit;
}

.cch-car-wrap {
    max-width: 1220px;
    margin: 0 auto;
    padding: 30px 24px 80px;
}

.cch-breadcrumbs {
    color: var(--cch-muted);
    font-size: 12px;
    margin-bottom: 18px;
}

.cch-breadcrumbs a {
    color: inherit;
}

.cch-car-header {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    align-items: flex-end;
    margin-bottom: 24px;
}

.cch-car-title {
    margin: 0;
    font-size: clamp(38px, 5.2vw, 64px);
    line-height: .98;
    letter-spacing: -.04em;
    color: var(--cch-navy);
}

.cch-car-subtitle {
    margin: 12px 0 0;
    color: var(--cch-muted);
    font-size: 17px;
}

.cch-taxonomy {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 15px;
}

.cch-pill {
    display: inline-block;
    padding: 6px 10px;
    background: #f0f2f4;
    border-radius: 99px;
    color: var(--cch-ink);
    text-decoration: none;
    font-size: 11px;
    font-weight: 800;
}

.cch-car-hero {
    background: linear-gradient(135deg, var(--cch-navy), var(--cch-navy-2));
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0;
    min-height: 390px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cch-car-hero img {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 7;
    object-fit: cover;
}

.cch-car-hero-placeholder {
    width: 100%;
    min-height: 390px;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 30px;
    color: #fff;
}

.cch-car-hero-placeholder strong {
    display: block;
    font-size: 42px;
    letter-spacing: -.03em;
}

.cch-car-hero-placeholder span {
    display: block;
    margin-top: 8px;
    color: rgba(255,255,255,.65);
    font-size: 13px;
}

.cch-car-tabs {
    display: flex;
    gap: 27px;
    overflow-x: auto;
    border-bottom: 1px solid var(--cch-line);
    margin-bottom: 38px;
}

.cch-car-tabs a {
    color: var(--cch-ink);
    text-decoration: none;
    font-weight: 800;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 16px 0;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}

.cch-car-tabs a:first-child {
    color: var(--cch-red);
    border-bottom-color: var(--cch-red);
}

.cch-car-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(290px, .75fr);
    gap: 48px;
}

.cch-car-section {
    margin-bottom: 46px;
}

.cch-car-section h2 {
    color: var(--cch-navy);
    font-size: 25px;
    margin: 0 0 17px;
    letter-spacing: -.02em;
}

.cch-car-content {
    font-size: 17px;
    line-height: 1.8;
}

.cch-quick-facts {
    border: 1px solid var(--cch-line);
    border-radius: 10px;
    padding: 22px;
    background: #fff;
    position: sticky;
    top: 25px;
}

.cch-quick-facts h2 {
    font-size: 17px;
    margin-bottom: 10px;
}

.cch-fact {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid var(--cch-line);
    font-size: 13px;
}

.cch-fact:last-child {
    border-bottom: 0;
}

.cch-fact strong {
    text-align: right;
    color: var(--cch-navy);
}

.cch-spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.cch-spec-table th,
.cch-spec-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--cch-line);
    text-align: left;
}

.cch-spec-table th {
    font-weight: 800;
    width: 38%;
    color: var(--cch-navy);
}

.cch-site-footer {
    background: var(--cch-navy);
    color: rgba(255,255,255,.7);
    padding: 35px 24px;
    font-size: 12px;
}

.cch-site-footer-inner {
    max-width: 1220px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.cch-site-footer a {
    color: rgba(255,255,255,.85);
}

@media (max-width: 850px) {
    .cch-main-nav {
        display: none;
    }

    .cch-car-header,
    .cch-car-grid {
        display: block;
    }

    .cch-quick-facts {
        margin-top: 30px;
        position: static;
    }

    .cch-car-wrap {
        padding-left: 16px;
        padding-right: 16px;
    }

    .cch-car-hero,
    .cch-car-hero-placeholder {
        min-height: 260px;
    }

    .cch-car-hero-placeholder strong {
        font-size: 30px;
    }

    .cch-site-footer-inner {
        display: block;
    }
}

/* CCH v1.4 detailed vehicle sections */
.cch-engine-card {
    margin: 0 0 28px;
}

.cch-engine-card h3 {
    margin-bottom: 12px;
}

.cch-gallery-carousel {
    max-width: 1100px;
    margin: 0 auto;
    outline: none;
}

.cch-gallery-viewport {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    background: var(--cch-navy);
    box-shadow: 0 18px 44px rgba(11, 31, 51, .16);
}

.cch-gallery-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.cch-gallery-slide {
    position: absolute;
    inset: 0;
    z-index: 0;
    margin: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity .55s ease;
}

.cch-gallery-slide.is-active {
    z-index: 1;
    opacity: 1;
    pointer-events: auto;
}

.cch-gallery-image,
.cch-gallery-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cch-gallery-slide figcaption {
    position: absolute;
    z-index: 2;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 42px 22px 18px;
    color: #fff;
    font-size: 14px;
    line-height: 1.45;
    background: linear-gradient(transparent, rgba(11, 31, 51, .86));
}

.cch-gallery-arrow {
    position: absolute;
    z-index: 3;
    top: 50%;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 50%;
    color: #fff;
    background: rgba(11, 31, 51, .82);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background .2s ease, transform .2s ease;
}

.cch-gallery-arrow:hover,
.cch-gallery-arrow:focus-visible {
    background: var(--cch-red);
    transform: translateY(-50%) scale(1.06);
}

.cch-gallery-prev {
    left: 18px;
}

.cch-gallery-next {
    right: 18px;
}

.cch-gallery-dots {
    display: flex;
    justify-content: center;
    gap: 9px;
    margin-top: 16px;
}

.cch-gallery-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #b9bdc1;
    cursor: pointer;
    transition: width .2s ease, border-radius .2s ease, background .2s ease;
}

.cch-gallery-dots button[aria-current="true"] {
    width: 28px;
    border-radius: 99px;
    background: var(--cch-red);
}

.cch-gallery-arrow:focus-visible,
.cch-gallery-dots button:focus-visible {
    outline: 3px solid var(--cch-cream);
    outline-offset: 3px;
}

.cch-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 800px) {
    .cch-gallery-viewport {
        border-radius: 10px;
    }

    .cch-gallery-arrow {
        width: 42px;
        height: 42px;
    }

    .cch-gallery-prev {
        left: 10px;
    }

    .cch-gallery-next {
        right: 10px;
    }

    .cch-gallery-slide figcaption {
        padding: 36px 15px 13px;
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cch-gallery-slide {
        transition: none;
    }
}

/* CCH v1.5 vehicle values */
.cch-values-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 17px;
}

.cch-values-heading h2 {
    margin-bottom: 0;
}

.cch-values-updated {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    border: 1px solid var(--cch-line);
    border-radius: 99px;
    color: var(--cch-muted);
    background: var(--cch-paper);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
}

.cch-values-summary {
    max-width: 900px;
    margin: 0 0 20px;
    color: var(--cch-muted);
    font-size: 16px;
    line-height: 1.7;
}

.cch-values-table-wrap {
    overflow-x: auto;
    margin: 0 0 24px;
    border: 1px solid var(--cch-line);
    border-radius: 12px;
}

.cch-values-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    font-size: 14px;
}

.cch-values-table th,
.cch-values-table td {
    padding: 15px 14px;
    border-bottom: 1px solid var(--cch-line);
    text-align: left;
    vertical-align: top;
}

.cch-values-table thead th {
    color: #fff;
    background: var(--cch-navy);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.cch-values-table tbody tr:nth-child(even) {
    background: #faf9f6;
}

.cch-values-table tbody tr:last-child th,
.cch-values-table tbody tr:last-child td {
    border-bottom: 0;
}

.cch-values-table tbody th {
    color: var(--cch-navy);
    font-weight: 800;
}

.cch-values-table a {
    color: var(--cch-red);
    font-weight: 700;
}

.cch-values-disclaimer {
    margin: 24px 0 0;
    padding: 15px 17px;
    border-left: 3px solid var(--cch-red);
    color: var(--cch-muted);
    background: var(--cch-paper);
    font-size: 13px;
    line-height: 1.65;
}

@media (max-width: 600px) {
    .cch-values-heading {
        display: block;
    }

    .cch-values-heading h2 {
        margin-bottom: 10px;
    }
}
