/* ============================================================
   TCMG Member Page — pdb-single-tcmg-member.php
   Palette matched to the live site (tcmg-home.css):
     racing green #003c30 / dark #00271f
     gold #d6b477 / #b8932b
     MG red #953f26
     creams #f8f4ed #e5dec9 / muted grey #5a5a5a
   Type: Georgia serif (same as the rest of the site).
   Sized to sit inside GeneratePress' 1180px content width.
   ============================================================ */

:root {
    --tcmg-green: #003c30;
    --tcmg-green-dark: #00271f;
    --tcmg-gold: #d6b477;
    --tcmg-gold-dark: #b8932b;
    --tcmg-red: #953f26;
    --tcmg-ink: #2c2c2d;
    --tcmg-muted: #5a5a5a;
    --tcmg-rule: #d8cfb4;
    --tcmg-cream: #f8f4ed;
    --tcmg-cream-2: #e5dec9;
    --tcmg-link: var(--tcmg-red);
    --tcmg-card-radius: 4px;
    --tcmg-serif: Georgia, "Times New Roman", Times, serif;
}

.tcmg-member-card {
    /* GP content width is 1180px; stay within it */
    max-width: 1180px;
    margin: 0 auto;
    padding: 2.5rem 2.75rem 3rem;
    background: #fff;
    color: var(--tcmg-ink);
    line-height: 1.65;
}

/* ---- Header: two columns (intro | owner photo) ---- */
.tcmg-member-header {
    /* text flows full-width; the photo floats inside it so meta + bio wrap */
    display: block;
}

.tcmg-member-name {
    font-family: var(--tcmg-serif);
    font-size: 2rem;
    line-height: 1.15;
    color: var(--tcmg-green);
    margin: 0 0 1.25rem;
    padding-bottom: .45rem;
    font-weight: 600;
    letter-spacing: .2px;
    border-bottom: 3px solid var(--tcmg-gold);
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .15rem .9rem;
}
.tcmg-member-name-text { flex: 0 1 auto; }

.tcmg-meta {
    margin: 0 0 1.5rem;
    color: var(--tcmg-muted);
    font-size: 1.05rem;
    line-height: 1.6;
}

/* "Associate Member" label - inline, pushed to the right of the name */
.tcmg-associate-label {
    margin: 0 0 0 auto;
    font-family: var(--tcmg-serif);
    font-size: 1rem;
    font-style: italic;
    font-weight: 400;
    color: var(--tcmg-gold-dark);
    letter-spacing: .02em;
    white-space: nowrap;
}

/* "N more photos available to members" note under a gated car gallery */
.tcmg-photo-locked {
    margin: .25rem 0 1.5rem;
    font-size: .92rem;
    font-style: italic;
    color: var(--tcmg-muted);
}

.tcmg-meta a {
    color: var(--tcmg-link);
    text-decoration: underline;
    word-break: break-word;
}
.tcmg-meta a:hover { color: var(--tcmg-gold-dark); }

.tcmg-about-heading {
    font-family: var(--tcmg-serif);
    font-size: 1.15rem;
    margin: 1.5rem 0 .75rem;
    text-decoration: underline;
    color: var(--tcmg-green);
    font-weight: 600;
}

.tcmg-bio {
    color: var(--tcmg-muted);
    font-size: 1.05rem;
}

/* read-more collapse: remainder paragraphs hidden until expanded. The visible
   preview is real, in-flow text, so it wraps around the photo. */
.tcmg-bio-rest[hidden] { display: none; }

.tcmg-readmore {
    display: block;
    margin: .75rem auto 0;
    background: none;
    border: 0;
    color: var(--tcmg-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: .35rem .5rem;
    font-family: var(--tcmg-serif);
}
.tcmg-readmore:hover { color: var(--tcmg-green); }

/* Member photo: floats RIGHT (per Steve's sketch) so the name, meta and bio
   wrap around it on the left. */
.tcmg-member-photo {
    float: right;
    width: 425px;            /* matches the sketch's landscape proportion */
    max-width: 44%;
    margin: .25rem 0 1rem 1.75rem;
}
.tcmg-member-photo img {
    width: 100%;
    height: auto;
    border-radius: var(--tcmg-card-radius);
    display: block;
}
/* When the member photo is a scroller, the slider chrome owns the radius and
   the inner <img> should fill the slide (no individual rounding). */
.tcmg-slider--member {
    max-width: 100%;
    width: 100%;
    border-radius: var(--tcmg-card-radius);
    margin: 0;
}
.tcmg-slider--member .tcmg-slide-link img { border-radius: 0; aspect-ratio: 16 / 10; }
.tcmg-clear { clear: both; }

/* ---- Dividers ---- */
.tcmg-rule {
    border: 0;
    border-top: 1px solid var(--tcmg-rule);
    margin: 2.5rem 0;
}
.tcmg-rule--car { margin: 2.75rem 0; }

/* ---- "TCs Owned:" ---- */
.tcmg-cars-heading,
.tcmg-car-title {
    font-family: var(--tcmg-serif);
}
.tcmg-cars-heading {
    font-size: 1.6rem;
    color: var(--tcmg-green);
    margin: 0 0 1.5rem;
    font-weight: 600;
    letter-spacing: .2px;
}

.tcmg-car { margin-bottom: .5rem; }

.tcmg-car-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--tcmg-ink);
    margin: 0 0 1rem;
    letter-spacing: .2px;
}

.tcmg-car-specs {
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
    color: var(--tcmg-muted);
    font-size: 1.05rem;
}
.tcmg-car-specs li { margin: 0 0 .85rem; }

.tcmg-reg { display: flex; }
.tcmg-reg-values {
    display: inline-flex;
    flex-direction: column;
    margin-left: .4rem;
}
.tcmg-reg-line { display: block; }

/* ---- Photo thumbnail strip (member-page car photos) ---- */
.tcmg-photo-strip,
.tcmg-car-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 1.5rem 0 2rem;
}
.tcmg-thumb {
    display: block;
    flex: 0 0 auto;            /* don't let flex stretch/shrink the box */
    width: 110px;
    height: 74px;             /* fixed box: verticals are cropped via cover, not tall */
    overflow: hidden;
    border-radius: 3px;
    background: var(--tcmg-cream-2);
    border: 1px solid var(--tcmg-rule);
}
.tcmg-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}
.tcmg-thumb:hover img { transform: scale(1.06); }

/* ---- Per-car photo thumbnails (member page) ----
   These are the theme's own <a class="tcmg-thumb"><img></a> thumbnails inside
   .tcmg-car-thumbs (NOT the Image Expansion Kit — earlier diagnosis corrected
   via the live DOM, June 2026). Each thumbnail is a FIXED-size box so a tall
   photo can't stretch the row, and the WHOLE image is shown inside it
   (object-fit: contain) so nothing is cropped/cut off — per client. Leftover
   space sits on a soft cream backdrop so it reads as intentional.

   The selectors below are intentionally high specificity (.tcmg-car-thumbs
   a.tcmg-thumb, and the img descendant) so this wins even if an OLD test snippet
   — width:120/height:80 + object-fit:cover — is still pasted in
   Appearance > Customize > Additional CSS or PDB > Settings > Custom CSS. That
   leftover snippet should be removed, but this beats it either way. */
.tcmg-car-thumbs a.tcmg-thumb,
.tcmg-car .tcmg-car-thumbs a.tcmg-thumb {
    width: 130px !important;
    height: 92px !important;
    max-height: 92px !important;
    overflow: hidden !important;
    display: inline-block !important;
    background: var(--tcmg-cream) !important;
    border: 1px solid var(--tcmg-rule) !important;
    vertical-align: top;
    border-radius: 3px;
}
.tcmg-car-thumbs a.tcmg-thumb img,
.tcmg-car .tcmg-car-thumbs a.tcmg-thumb img {
    width: 100% !important;
    height: 100% !important;
    max-height: 92px !important;
    object-fit: contain !important;
    background: transparent !important;
}

/* ---- Per-car photo slider (member page) ----
   One photo visible at a time; auto-plays with swipe + arrows + dots.
   Matched to the site's Georgia / racing-green / gold palette. The whole
   thing degrades to a single static image when JS is off or there's one
   photo. The clickable slide still opens the existing lightbox. */
.tcmg-slider {
    position: relative;
    margin: 1.5rem 0 2rem;
    max-width: 560px;          /* sketch proportion; sits left under the notes */
    border-radius: 4px;
    background: var(--tcmg-cream);   /* subtle letterbox behind contained photos */
    border: 1px solid var(--tcmg-rule);
    overflow: hidden;
}
.tcmg-slider-viewport {
    position: relative;
    overflow: hidden;
}
.tcmg-slider-track {
    display: flex;
    /* JS sets transform: translateX(); this transition animates the slide. */
    transition: transform .45s ease;
    will-change: transform;
}
/* No-JS / single-slide fallback: slides simply stack, first one shows. */
.tcmg-slider:not(.is-enhanced) .tcmg-slider-track { display: block; }
.tcmg-slider:not(.is-enhanced) .tcmg-slide:not(.is-active) { display: none; }

.tcmg-slide {
    flex: 0 0 100%;
    width: 100%;
    margin: 0;
}
.tcmg-slide-link {
    display: block;
    width: 100%;
    height: auto;
    border: 0;
    border-radius: 0;
    background: none;
    overflow: hidden;
}
.tcmg-slide-link img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    /* contain (not cover) so the ENTIRE photo shows, portrait included. The box
       keeps a steady size; the photo is centered with neutral letterboxing. */
    object-fit: contain;
    transition: none;          /* override .tcmg-thumb hover-zoom here */
}
.tcmg-slide-link:hover img { transform: none; }

/* Arrows */
.tcmg-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.4rem;
    height: 2.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 39, 31, .62);   /* green-dark, translucent */
    color: var(--tcmg-gold);
    font-family: var(--tcmg-serif);
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    transition: background .15s ease, color .15s ease;
}
.tcmg-slider-arrow:hover { background: var(--tcmg-green); color: #fff; }
.tcmg-slider-arrow:focus-visible {
    outline: 2px solid var(--tcmg-gold);
    outline-offset: 2px;
}
.tcmg-slider-prev { left: .6rem; }
.tcmg-slider-next { right: .6rem; }

/* Dots */
.tcmg-slider-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: .65rem;
    display: flex;
    justify-content: center;
    gap: .4rem;
    z-index: 2;
}
.tcmg-slider-dot {
    width: .55rem;
    height: .55rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .55);
    box-shadow: 0 0 0 1px rgba(0, 39, 31, .35);
    cursor: pointer;
    transition: background .15s ease, transform .15s ease;
}
.tcmg-slider-dot.is-active {
    background: var(--tcmg-gold);
    transform: scale(1.15);
}
.tcmg-slider-dot:focus-visible {
    outline: 2px solid var(--tcmg-gold);
    outline-offset: 2px;
}

/* Arrows/dots only matter when enhanced AND multiple photos exist. */
.tcmg-slider:not(.has-multiple) .tcmg-slider-arrow,
.tcmg-slider:not(.has-multiple) .tcmg-slider-dots,
.tcmg-slider:not(.is-enhanced) .tcmg-slider-arrow,
.tcmg-slider:not(.is-enhanced) .tcmg-slider-dots { display: none; }

/* "n more photos available to members" note under a gated slider */
.tcmg-slider-locked {
    margin: -1rem 0 2rem;
    font-size: .92rem;
    font-style: italic;
    color: var(--tcmg-muted);
}

@media (prefers-reduced-motion: reduce) {
    .tcmg-slider-track { transition: none; }
}

.tcmg-car-notes {
    color: var(--tcmg-muted);
    font-size: 1.05rem;
}
.tcmg-car-notes p { margin: 0 0 1.1rem; }

.tcmg-car--stub .tcmg-car-note {
    color: #999;
    font-style: italic;
}

/* ---- Lightbox ---- */
.tcmg-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .85);   /* transparent black (client request) */
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 4vh 4vw;
}
.tcmg-lightbox.is-open { display: flex; }
.tcmg-lightbox img {
    max-width: 100%;
    max-height: 92vh;
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.tcmg-lightbox-close {
    position: absolute;
    top: 18px;
    right: 26px;
    font-size: 2.4rem;
    line-height: 1;
    color: var(--tcmg-gold);
    background: none;
    border: 0;
    cursor: pointer;
}
.tcmg-lightbox-close:hover { color: #fff; }

/* ---- Responsive ---- */
@media (max-width: 800px) {
    .tcmg-member-card { padding: 1.75rem 1.4rem 2.25rem; }
    .tcmg-member-photo {
        float: none;
        width: 100%;
        max-width: 100%;
        margin: 0 0 1.25rem;
    }
    .tcmg-member-name { font-size: 1.6rem; }
    /* Keep a FIXED thumbnail height on narrow screens too. The previous
       height:auto + aspect-ratio let a portrait/vertical photo grow the row
       (client feedback, June 2026). A fixed box + object-fit:cover on the img
       (set above) crops verticals to a consistent height instead. */
    .tcmg-thumb { width: calc(33.333% - 7px); height: 80px; }
}

/* ============================================================
   TCMG Member Directory (list) — pdb-list-tcmg-members.php
   ============================================================ */

.tcmg-member-directory {
    max-width: 1180px;
    margin: 0 auto;
    padding: 2.5rem 2.75rem 3rem;
    background: #fff;
    color: var(--tcmg-ink);
}

.tcmg-dir-heading {
    font-family: var(--tcmg-serif);
    font-size: 2rem;
    color: var(--tcmg-green);
    margin: 0 0 1.5rem;
    font-weight: 600;
    letter-spacing: .2px;
}

/* Header row: "List of Members" on the left, download button on the right. */
.tcmg-dir-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 0 0 1.5rem;
}
.tcmg-dir-header .tcmg-dir-heading {
    margin: 0;
}
.tcmg-dir-download {
    margin-left: auto;
}
.tcmg-dir-download .tcmg-md-button {
    white-space: nowrap;
}
@media (max-width: 600px) {
    .tcmg-dir-download {
        margin-left: 0;
        width: 100%;
    }
    .tcmg-dir-download .tcmg-md-button {
        display: block;
        text-align: center;
    }
}

.tcmg-dir-search {
    display: flex;
    gap: .5rem;
    align-items: center;
    margin: 0 0 2rem;
    flex-wrap: wrap;
}
.tcmg-dir-search-input {
    flex: 1 1 280px;
    max-width: 420px;
    padding: .6rem .85rem;
    border: 1px solid var(--tcmg-rule);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}
.tcmg-dir-search-input:focus {
    outline: none;
    border-color: var(--tcmg-green);
    box-shadow: 0 0 0 2px rgba(0,60,48,.12);
}
.tcmg-dir-search-btn {
    padding: .6rem 1.25rem;
    background: var(--tcmg-green);
    color: #fff;
    border: 0;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    font-family: var(--tcmg-serif);
}
.tcmg-dir-search-btn:hover { background: var(--tcmg-green-dark); }
.tcmg-dir-clear {
    color: var(--tcmg-muted);
    text-decoration: underline;
    font-size: .95rem;
}

.tcmg-dir-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0 1.5rem;
    /* rows size to their tallest cell; combined with full-height items
       below, this keeps the bottom rules aligned across each row */
    align-items: stretch;
}
.tcmg-dir-item {
    margin: 0;
    display: flex;            /* let the link stretch to fill the cell */
}
.tcmg-dir-link {
    flex: 1;                  /* fill the full cell height */
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .7rem .25rem;
    text-decoration: none;
    color: var(--tcmg-ink);
    border-bottom: 1px solid var(--tcmg-rule);
    transition: color .15s ease;
}
.tcmg-dir-link:hover { color: var(--tcmg-green); }
.tcmg-dir-link:hover .tcmg-dir-name { text-decoration: underline; }

/* Thumbnail / initials avatar */
.tcmg-dir-thumb {
    flex: 0 0 auto;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--tcmg-green);
    border: 1px solid var(--tcmg-rule);
}
.tcmg-dir-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.tcmg-dir-thumb-initials {
    color: var(--tcmg-gold);
    font-family: var(--tcmg-serif);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: .02em;
}
.tcmg-dir-text {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    min-width: 0;             /* allow text to wrap/truncate within the cell */
}
.tcmg-dir-name {
    font-family: var(--tcmg-serif);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
}
.tcmg-dir-given {
    font-size: .95rem;
    font-weight: 600;
    color: var(--tcmg-ink);
    line-height: 1.25;
}
.tcmg-dir-loc {
    font-size: .85rem;
    color: var(--tcmg-muted);
}

.tcmg-dir-empty {
    color: var(--tcmg-muted);
    font-size: 1.05rem;
    padding: 1rem 0;
}

/* "Back to members" link on the single member page when arrived via directory */
.tcmg-back-link {
    display: inline-block;
    margin: 0 0 1.25rem;
    color: var(--tcmg-link);
    text-decoration: none;
    font-size: 1rem;
}
.tcmg-back-link:hover { text-decoration: underline; color: var(--tcmg-green); }
.tcmg-back-link::before { content: "\2039  "; }

@media (max-width: 800px) {
    .tcmg-member-directory { padding: 1.75rem 1.4rem 2.25rem; }
    .tcmg-dir-list { grid-template-columns: 1fr; }
    .tcmg-dir-heading { font-size: 1.6rem; }
    .tcmg-car-directory { padding: 1.75rem 1.4rem 2.25rem; }
    .tcmg-car-list { grid-template-columns: 1fr; }
}

/* ===== Public car directory (Provenance List) ===== */
.tcmg-car-directory {
    background: var(--tcmg-card, #fff);
    border-radius: 10px;
    padding: 2.25rem 2.5rem 2.75rem;
    max-width: 1180px;
    margin: 0 auto;
}
.tcmg-car-intro {
    color: var(--tcmg-muted);
    font-size: 1.02rem;
    margin: 0 0 1.25rem;
    max-width: 640px;
}
.tcmg-car-hint,
.tcmg-car-count,
.tcmg-car-overflow {
    color: var(--tcmg-muted);
    font-size: 1rem;
    margin: 0 0 1.25rem;
}
.tcmg-car-overflow { color: var(--tcmg-red, #953f26); }
.tcmg-car-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}
.tcmg-car-card {
    border: 1px solid var(--tcmg-rule);
    border-top: 3px solid var(--tcmg-gold);
    border-radius: 6px;
    padding: 1.1rem 1.25rem 1.25rem;
    background: var(--tcmg-cream, #f8f4ed);
}
.tcmg-car-chassis {
    font-family: var(--tcmg-serif);
    font-size: 1.25rem;
    color: var(--tcmg-green);
    margin: 0 0 .65rem;
}
.tcmg-car-meta {
    margin: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .25rem .9rem;
    font-size: .95rem;
}
.tcmg-car-meta dt {
    font-weight: 600;
    color: var(--tcmg-ink);
    white-space: nowrap;
}
.tcmg-car-meta dd {
    margin: 0;
    color: var(--tcmg-muted);
}

/* Car directory pagination */
.tcmg-car-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--tcmg-rule);
}
.tcmg-pg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.2rem;
    height: 2.2rem;
    padding: 0 .6rem;
    font-family: var(--tcmg-serif);
    font-size: .95rem;
    text-decoration: none;
    color: var(--tcmg-green);
    border: 1px solid var(--tcmg-rule);
    border-radius: 4px;
    background: #fff;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
a.tcmg-pg:hover {
    background: var(--tcmg-green);
    color: #fff;
    border-color: var(--tcmg-green);
}
.tcmg-pg.is-current {
    background: var(--tcmg-green);
    color: #fff;
    border-color: var(--tcmg-green);
    font-weight: 700;
}
.tcmg-pg.is-disabled {
    color: var(--tcmg-rule);
    border-color: var(--tcmg-rule);
    cursor: default;
}
.tcmg-pg.tcmg-pg-gap {
    border: none;
    background: none;
    min-width: 1.2rem;
    color: var(--tcmg-muted);
}


/* ===== Provenance List redesign: search checklist, list results, detail ===== */

/* Search row (input + button on one line) */
.tcmg-search-row {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    align-items: center;
}

/* Field checklist under the search box */
.tcmg-search-fields {
    border: 1px solid var(--tcmg-rule);
    border-radius: 6px;
    padding: .85rem 1rem 1rem;
    margin: 1rem 0 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem 1.25rem;
}
.tcmg-search-fields legend {
    font-family: var(--tcmg-serif);
    font-weight: 700;
    color: var(--tcmg-green);
    padding: 0 .4rem;
    font-size: .98rem;
}
.tcmg-field-check {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .95rem;
    color: var(--tcmg-ink);
    cursor: pointer;
    white-space: nowrap;
}
.tcmg-field-check input { margin: 0; }
.tcmg-search-fields-hint {
    flex-basis: 100%;
    color: var(--tcmg-muted);
    font-size: .85rem;
    font-style: italic;
    margin-top: .25rem;
}

/* Results as a list/table */
.tcmg-result-list {
    margin-top: 1.5rem;
    border: 1px solid var(--tcmg-rule);
    border-radius: 6px;
    overflow: hidden;
}
.tcmg-result-head,
.tcmg-result-row {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1.4fr 1.6fr 1.1fr;
    gap: 1rem;
    padding: .7rem 1.1rem;
    align-items: baseline;
}
.tcmg-result-head {
    background: var(--tcmg-green);
    color: #fff;
    font-family: var(--tcmg-serif);
    font-size: .9rem;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.tcmg-result-row {
    border-top: 1px solid var(--tcmg-rule);
    font-size: .97rem;
    color: var(--tcmg-muted);
}
.tcmg-result-row:nth-child(even) { background: var(--tcmg-cream, #f8f4ed); }
.tcmg-result-row .tcmg-col-chassis a {
    font-family: var(--tcmg-serif);
    font-weight: 700;
    color: var(--tcmg-green);
    text-decoration: none;
    font-size: 1.02rem;
}
.tcmg-result-row .tcmg-col-chassis a:hover {
    color: var(--tcmg-red, #953f26);
    text-decoration: underline;
}

@media (max-width: 800px) {
    /* Collapse the table into stacked cards on mobile */
    .tcmg-result-head { display: none; }
    .tcmg-result-row {
        grid-template-columns: 1fr;
        gap: .2rem;
        padding: .9rem 1rem;
    }
    .tcmg-result-row span[data-label]::before {
        content: attr(data-label) ": ";
        font-weight: 600;
        color: var(--tcmg-ink);
    }
    .tcmg-result-row span:empty { display: none; }
}

/* Single-car detail page */
.tcmg-car-detail { max-width: 760px; }
.tcmg-detail-head { margin-bottom: 1.25rem; }
.tcmg-detail-title {
    font-family: var(--tcmg-serif);
    font-size: 1.9rem;
    color: var(--tcmg-green);
    margin: 0;
    padding-bottom: .6rem;
    border-bottom: 3px solid var(--tcmg-gold);
}
/* Detail layout (client mockup): spec list LEFT, photo floated RIGHT. The spec
   <dl> is display:grid, which clears the float and forms the left column; long
   names/locations wrap. History clears below, full-width. */
.tcmg-detail-photo {
    float: right;
    width: min(46%, 480px);
    margin: 0 0 1.25rem 1.75rem;
}
.tcmg-detail-photo img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--tcmg-rule);
}
.tcmg-detail-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: .75rem;
    margin-top: .75rem;
}
.tcmg-detail-gallery img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    width: 100%;
}
.tcmg-detail-photo-note {
    margin: .75rem 0 0;
    font-size: .92rem;
    font-style: italic;
    color: var(--tcmg-muted);
}

/* Car detail page now reuses the .tcmg-slider as ONE scrollable photo
   (client feedback). The slider supplies its own frame, so cancel the
   standalone-image border/radius that .tcmg-detail-photo img sets, and use a
   4/3 crop to suit car photos. */
.tcmg-detail-photo .tcmg-slider { margin: 0 0 .25rem; }
.tcmg-detail-photo .tcmg-slider img { border: 0; border-radius: 0; }
.tcmg-slider--car .tcmg-slide-link img { aspect-ratio: 4 / 3; }
.tcmg-detail-specs {
    margin: 0 0 1.5rem;
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: .55rem 1.5rem;
    font-size: 1.02rem;
}
.tcmg-detail-specs dt {
    font-weight: 700;
    color: var(--tcmg-ink);
    white-space: nowrap;
}
.tcmg-detail-specs dd {
    margin: 0;
    color: var(--tcmg-muted);
    overflow-wrap: anywhere;
}
.tcmg-detail-reg {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
.tcmg-detail-notes {
    clear: both;
    border-top: 1px solid var(--tcmg-rule);
    padding-top: 1.25rem;
}
.tcmg-detail-notes-heading {
    font-family: var(--tcmg-serif);
    font-size: 1.2rem;
    color: var(--tcmg-green);
    margin: 0 0 .6rem;
}
.tcmg-detail-notes p {
    color: var(--tcmg-ink);
    line-height: 1.7;
    margin: 0 0 1rem;
}

@media (max-width: 782px) {
    .tcmg-detail-photo { float: none; width: 100%; max-width: 480px; margin: 0 0 1.25rem; }
}

@media (max-width: 560px) {
    .tcmg-detail-specs { grid-template-columns: 1fr; gap: .15rem; }
    .tcmg-detail-specs dt { margin-top: .6rem; }
    .tcmg-detail-title { font-size: 1.5rem; }
}
