/**
 * Retro Recordings XR — Tape Machines Page
 *
 * Sticky horizontal brand nav + full-width content panels.
 * Mirrors the console-brands.css architecture exactly.
 *
 * @package    RetroRecordingsXR
 * @since      1.9.0
 */

/* ==========================================================================
   Layout shell — matches .cb-layout (max-width 1280px, no side padding)
   ========================================================================== */

.tm-layout {
    display: flex;
    flex-direction: column;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 0 5rem;
}

/* ==========================================================================
   Search bar
   ========================================================================== */

.tm-search-bar {
    padding: 2.75rem 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

.tm-search-form-wrap {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 640px;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(212, 165, 116, 0.32);
    border-radius: 4px;
    box-shadow: 0 0 0 4px rgba(212, 165, 116, 0.04);
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.tm-search-form-wrap:focus-within {
    border-color: rgba(212, 165, 116, 0.65);
    background: rgba(255, 255, 255, 0.09);
    box-shadow: 0 0 0 4px rgba(212, 165, 116, 0.1);
}

.tm-search-icon {
    display: flex;
    align-items: center;
    padding: 0 0.75rem 0 1.15rem;
    color: rgba(212, 165, 116, 0.5);
    font-size: 1.15rem;
    flex-shrink: 0;
    pointer-events: none;
    user-select: none;
}

.tm-brand-search {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    padding: 0.82rem 1rem 0.82rem 0;
    color: rgba(244, 228, 215, 0.88);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.tm-brand-search::placeholder {
    color: rgba(244, 228, 215, 0.25);
}

.tm-brand-search-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: rgba(232, 160, 84, 0.6);
    white-space: nowrap;
    min-height: 1.1em;
    text-align: center;
}

.tm-brand-search-count.tm-search-noresults {
    color: rgba(232, 100, 84, 0.75);
}

@media (max-width: 700px) {
    .tm-search-bar { padding: 1.75rem 1.25rem 1.25rem; }
    .tm-search-form-wrap { max-width: 100%; }
}

/* ==========================================================================
   Brand navigation bar — matches .cb-sidebar exactly
   ========================================================================== */

.tm-nav-wrap {
    position: sticky;
    top: 52px;
    z-index: 50;
    display: flex;
    align-items: stretch;
}

.tm-sidebar {
    flex: 1;
    min-width: 0;
    background: rgba(26, 26, 26, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(212, 165, 116, 0.15);
    overflow-x: auto;
    overflow-y: hidden;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    padding: 0 2rem;
    scrollbar-width: none;
}

.tm-sidebar::-webkit-scrollbar { display: none; }

.tm-sidebar-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(244, 228, 215, 0.28);
    white-space: nowrap;
    align-self: center;
    padding: 0 1.25rem 0 0;
    margin-right: 0.5rem;
    border-right: 1px solid rgba(212, 165, 116, 0.12);
    flex-shrink: 0;
    display: block;
}

/* ── Brand buttons — same padding as .cb-brand-btn ─────────────────────── */

.tm-brand-btn.tm-hidden {
    display: none;
}

.tm-brand-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-shrink: 0;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    padding: 1.1rem 1.5rem;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 400;
    color: rgba(244, 228, 215, 0.5);
    line-height: 1.2;
    white-space: nowrap;
    text-align: left;
}

/* Flag emoji replaces logo — sized to match logo height (≈22px) */
.tm-brand-btn-flag {
    font-size: 1.35rem;
    line-height: 1;
    margin-bottom: 0.25rem;
    display: block;
}

.tm-brand-btn-name {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.2;
    color: rgba(244, 228, 215, 0.6);
    white-space: nowrap;
}

.tm-brand-btn-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.1em;
    color: rgba(244, 228, 215, 0.25);
    margin-top: 2px;
    font-weight: 400;
    display: block;
}

.tm-brand-btn:hover {
    color: rgba(244, 228, 215, 0.9);
    border-bottom-color: rgba(232, 160, 84, 0.45);
    background: rgba(232, 160, 84, 0.04);
}

.tm-brand-btn:hover .tm-brand-btn-name {
    color: rgba(244, 228, 215, 0.85);
}

.tm-brand-btn.tm-active {
    color: #e8a054;
    border-bottom-color: #e8a054;
    background: rgba(232, 160, 84, 0.06);
    font-weight: 700;
}

.tm-brand-btn.tm-active .tm-brand-btn-name {
    color: rgba(232, 160, 84, 0.9);
}

.tm-brand-btn.tm-active .tm-brand-btn-meta {
    color: rgba(232, 160, 84, 0.5);
}

@media (max-width: 700px) {
    .tm-nav-wrap { top: 48px; }
    .tm-sidebar { padding: 0 0.75rem; }
    .tm-sidebar-label { display: none; }
    .tm-brand-btn { padding: 0.85rem 1rem; }
    .tm-brand-btn-meta { display: none; }
    .tm-brand-btn-flag { font-size: 1.1rem; }
}

/* ==========================================================================
   Panels content area
   ========================================================================== */

.tm-panels {
    padding: 4rem 2.5rem 0;
}

/* ==========================================================================
   Spec table — subtle lines, readable values
   ========================================================================== */

.tm-specs,
.tm-specs tr,
.tm-specs td,
.tm-specs th {
    border-bottom: 1px solid #333333 !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
}

.tm-specs tr:last-child,
.tm-specs tr:last-child td {
    border-bottom: none !important;
}

/* Spec key */
.tm-specs td:first-child {
    font-size: 11px;
    color: rgba(212, 165, 116, 0.55);
}

/* ==========================================================================
   Brand official link — mirrors .cb-brand-official-link exactly
   ========================================================================== */

.tm-brand-official-link {
    display: inline-block;
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(232, 160, 84, 0.45);
    text-decoration: none;
    border-bottom: 1px solid rgba(232, 160, 84, 0.2);
    padding-bottom: 1px;
    transition: color 0.2s, border-color 0.2s;
}

.tm-brand-official-link:hover {
    color: rgba(232, 160, 84, 0.85);
    border-color: rgba(232, 160, 84, 0.5);
    text-decoration: none;
}

/* ==========================================================================
   Machine card — mirrors .cb-console-card layout exactly
   ========================================================================== */

.tm-machine-card {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 0 2rem;
    padding: 1.75rem;
}

.tm-machine-media {
    grid-row: 1 / 20;      /* span all rows so image stays left of all content */
    align-self: start;
}

.tm-machine-content {
    min-width: 0;
}

@media (max-width: 700px) {
    .tm-machine-card {
        grid-template-columns: 1fr;
        padding: 1.25rem;
    }
    .tm-machine-media {
        grid-row: auto;
        margin-bottom: 1.25rem;
    }
}

/* ==========================================================================
   Machine image — thumbnail with lightbox + optional gallery slideshow
   Mirrors .cb-console-image / .cb-console-gallery
   ========================================================================== */

.tm-machine-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 2px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.35);
}

.tm-machine-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.4s ease;
}

.tm-machine-image img:hover {
    transform: scale(1.03);
}

.tm-machine-gallery {
    position: relative;
}

.tm-gallery-trigger {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    cursor: zoom-in;
}

.tm-gallery-trigger:focus-visible {
    outline: 2px solid rgba(232, 160, 84, 0.8);
    outline-offset: 2px;
}

.tm-gallery-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.6rem;
    background: rgba(20, 18, 16, 0.85);
    border: 1px solid rgba(212, 165, 116, 0.35);
    color: rgba(244, 228, 215, 0.92);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: background 0.2s, border-color 0.2s;
    pointer-events: none;
}

.tm-gallery-badge-icon {
    color: rgba(232, 160, 84, 1);
    font-size: 8px;
    line-height: 1;
}

.tm-gallery-trigger:hover .tm-gallery-badge {
    background: rgba(20, 18, 16, 0.95);
    border-color: rgba(232, 160, 84, 0.6);
}

.tm-gallery-item-hidden {
    display: none;
}

/* Placeholder when no image exists */
.tm-machine-placeholder {
    width: 100%;
    aspect-ratio: 4 / 3;
    border: 1px solid rgba(212, 165, 116, 0.1);
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 18, 16, 0.6);
}

/* ==========================================================================
   Brand panels
   ========================================================================== */

.tm-panel {
    display: none;
    animation: tm-panel-in 0.3s ease forwards;
}

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

@keyframes tm-panel-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 700px) {
    .tm-panels { padding: 2rem 1.25rem 0; }
}

/* ==========================================================================
   Brand nav footer — Prev / Next
   ========================================================================== */

.tm-brand-nav-footer {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(212, 165, 116, 0.1);
}

.tm-brand-nav-btn {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex: 1;
    background: rgba(26, 18, 10, 0.5);
    border: 1px solid rgba(212, 165, 116, 0.14);
    border-radius: 2px;
    padding: 0.9rem 1.25rem;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s ease, background 0.2s ease;
    min-width: 0;
}

.tm-brand-nav-btn:hover {
    border-color: rgba(212, 165, 116, 0.35);
    background: rgba(44, 24, 16, 0.6);
}

.tm-brand-nav-btn--next {
    justify-content: flex-end;
    text-align: right;
}

.tm-brand-nav-arrow {
    font-size: 1rem;
    color: rgba(212, 165, 116, 0.4);
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.tm-brand-nav-btn:hover .tm-brand-nav-arrow {
    color: rgba(232, 160, 84, 0.85);
}

.tm-brand-nav-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.tm-brand-nav-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(212, 165, 116, 0.35);
    display: block;
}

.tm-brand-nav-name {
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(244, 228, 215, 0.72);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    transition: color 0.2s ease;
}

.tm-brand-nav-btn:hover .tm-brand-nav-name {
    color: rgba(244, 228, 215, 0.95);
}

@media (max-width: 700px) {
    .tm-brand-nav-footer { gap: 0.5rem; }
    .tm-brand-nav-btn    { padding: 0.75rem 0.85rem; }
    .tm-brand-nav-name   { font-size: 0.82rem; }
}


/* ==========================================================================
   Vintage ads — brand-level strip (below tape-machine cards)
   --------------------------------------------------------------------------
   Horizontal scrollable row of vintage magazine ads per brand. Mirrors the
   cb-vintage-ads pattern from console-brands.css and mic-vintage-ads from
   microphones.css. Each thumbnail opens in GLightbox (grouped by
   tm-brand-ads-<slug> gallery id).
   ========================================================================== */

.tm-vintage-ads {
    margin: 1.4rem 0 2rem;
    padding: 1.1rem 0 1.2rem;
    border-top: 1px solid rgba(212, 165, 116, 0.12);
    border-bottom: 1px solid rgba(212, 165, 116, 0.12);
}

.tm-vintage-ads-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
    padding: 0 0.15rem;
}

.tm-vintage-ads-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #e8a054;
    font-weight: 600;
}

.tm-vintage-ads-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: rgba(244, 228, 215, 0.5);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.tm-vintage-ads-strip {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.2rem 0.1rem 0.6rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 165, 116, 0.3) transparent;
}

.tm-vintage-ads-strip::-webkit-scrollbar { height: 6px; }
.tm-vintage-ads-strip::-webkit-scrollbar-track { background: transparent; }
.tm-vintage-ads-strip::-webkit-scrollbar-thumb {
    background: rgba(212, 165, 116, 0.3);
    border-radius: 3px;
}

.tm-vintage-ad {
    flex: 0 0 auto;
    width: 140px;
    aspect-ratio: 3 / 4;
    position: relative;
    background: #1a1a1a;
    border: 1px solid rgba(212, 165, 116, 0.1);
    border-radius: 2px;
    overflow: hidden;
    cursor: zoom-in;
    scroll-snap-align: start;
    transition: border-color 0.25s, transform 0.25s, filter 0.25s;
    /* Dim by default — ads shouldn't dominate the page, only hint at content */
    filter: brightness(0.72) saturate(0.8) contrast(0.95);
}

.tm-vintage-ad:hover {
    border-color: rgba(232, 160, 84, 0.5);
    transform: translateY(-2px);
    filter: brightness(1) saturate(1) contrast(1);
}

.tm-vintage-ad img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tm-vintage-ad-year {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(20, 18, 16, 0.88);
    color: rgba(244, 228, 215, 0.9);
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.1em;
    padding: 2px 6px;
    border-radius: 2px;
    pointer-events: none;
}

/* Spread (two-page or multi-page) brand-level ad — wider thumbnail */
.tm-vintage-ad--spread {
    width: 240px;            /* ~1.7× the normal 140px */
    aspect-ratio: 3 / 2;     /* landscape to reflect the two-page layout */
    border-color: rgba(232, 160, 84, 0.28); /* subtle gold hint at rest */
    filter: brightness(0.85) saturate(0.9) contrast(0.97);
}

.tm-vintage-ad--spread:hover {
    border-color: rgba(232, 160, 84, 0.7);
}

.tm-vintage-ad-spread-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background: rgba(232, 160, 84, 0.92);
    color: #1a1a1a;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 2px 6px;
    border-radius: 2px;
    pointer-events: none;
    text-transform: uppercase;
}

@media (max-width: 700px) {
    .tm-vintage-ad         { width: 110px; }
    .tm-vintage-ad--spread { width: 190px; }
}

/* ============================================================
   Per-machine ad strip — sits inside .tm-machine-content at the
   bottom of each machine card. Mirrors the consoles page
   cb-console-ads-strip pattern (82px portrait thumbs / 164px
   landscape spread thumbs). Year badge in bottom-right of each
   thumb. Hover lifts + brightens. Grouped per machine via
   tmads-<brand>-<model> so each strip opens its own slideshow.
   ============================================================ */
.tm-machine-ads {
    border-top: 1px solid rgba(212, 165, 116, 0.08);
    margin-top: 1rem;
    padding-top: 0.85rem;
}

.tm-machine-ads-label {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(212, 165, 116, 0.4);
    margin-bottom: 0.55rem;
}

.tm-machine-ads-strip {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.3rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 165, 116, 0.25) transparent;
}

.tm-machine-ad {
    flex: 0 0 auto;
    width: 82px;
    aspect-ratio: 3 / 4;
    position: relative;
    background: #1a1a1a;
    border: 1px solid rgba(212, 165, 116, 0.1);
    border-radius: 2px;
    overflow: hidden;
    cursor: zoom-in;
    transition: border-color 0.25s, transform 0.25s, filter 0.25s;
    filter: brightness(0.72) saturate(0.8) contrast(0.95);
}

.tm-machine-ad:hover,
.tm-machine-ad:focus-visible {
    border-color: rgba(232, 160, 84, 0.5);
    transform: translateY(-2px);
    filter: brightness(1) saturate(1) contrast(1);
    outline: none;
}

.tm-machine-ad img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tm-machine-ad-year {
    position: absolute;
    bottom: 3px;
    right: 3px;
    background: rgba(20, 18, 16, 0.88);
    color: rgba(244, 228, 215, 0.9);
    font-family: 'JetBrains Mono', monospace;
    font-size: 8px;
    letter-spacing: 0.08em;
    padding: 1px 4px;
    border-radius: 2px;
    pointer-events: none;
}

/* Spread (two-page) ad — wider landscape thumb */
.tm-machine-ad--spread {
    width: 164px;        /* ~2× the normal 82px */
    aspect-ratio: 3 / 2;
}

.tm-machine-ad-spread-badge {
    position: absolute;
    top: 3px;
    left: 3px;
    background: rgba(232, 160, 84, 0.85);
    color: #1a120c;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 2px;
    pointer-events: none;
    line-height: 1;
}



/* ==========================================================================
   Service manuals / schematics — direct-link to SP7WK or rrxr mirror
   Mirrors the cb-manual-button pattern from console-brands.css, scoped to
   tape-machines page styles.
   ========================================================================== */
.tm-machine-manuals {
    margin: 18px 0 0;
    padding-top: 14px;
    border-top: 1px solid rgba(212, 165, 116, 0.08);
}

.tm-machine-manuals-label {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(212, 165, 116, 0.55);
    margin-bottom: 10px;
}

.tm-machine-manuals-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

/* Manual button — clearly clickable, distinct from spec rows above */
.tm-manual-button {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.65rem 0.85rem;
    background: rgba(232, 160, 84, 0.08);
    border: 1px solid rgba(232, 160, 84, 0.32);
    border-radius: 3px;
    color: #f4e4d7;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    transition: background 0.18s ease, border-color 0.18s ease,
                transform 0.18s ease, box-shadow 0.18s ease;
}
.tm-manual-button:hover,
.tm-manual-button:focus-visible {
    background: rgba(232, 160, 84, 0.18);
    border-color: rgba(232, 160, 84, 0.65);
    color: #f4e4d7;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(232, 160, 84, 0.18);
    text-decoration: none;
    outline: none;
}

.tm-manual-button-icon {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #e8a054;
    font-size: 0.95rem;
    line-height: 1;
    background: rgba(232, 160, 84, 0.12);
    border-radius: 50%;
    transition: background 0.18s ease;
}
.tm-manual-button:hover .tm-manual-button-icon {
    background: rgba(232, 160, 84, 0.25);
}

.tm-manual-button-label {
    flex: 1 1 auto;
    font-size: 0.83rem;
    line-height: 1.3;
    color: rgba(244, 228, 215, 0.92);
}

.tm-manual-button-ext {
    flex: 0 0 auto;
    padding: 2px 7px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #1a1a1a;
    background: rgba(232, 160, 84, 0.75);
    border-radius: 2px;
    font-weight: 600;
}

/* SP7WK credit beneath the manuals — subtle, italic, half-opacity */
.tm-machine-manuals-credit {
    display: block;
    margin-top: 0.5rem;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 11px;
    font-style: italic;
    line-height: 1.45;
    color: rgba(244, 228, 215, 0.5);
}
.tm-machine-manuals-credit a {
    color: rgba(232, 160, 84, 0.75);
    text-decoration: none;
    border-bottom: 1px dotted rgba(232, 160, 84, 0.4);
    transition: color 0.2s ease, border-color 0.2s ease;
}
.tm-machine-manuals-credit a:hover {
    color: #e8a054;
    border-bottom-color: rgba(232, 160, 84, 0.7);
}

@media (max-width: 600px) {
    .tm-manual-button { padding: 0.6rem 0.7rem; }
    .tm-manual-button-label { font-size: 0.78rem; }
}


/* ==========================================================================
   Thumb-strip — alternative images shown below the hero per machine.
   Horizontal flex + overflow-x scroll + snap, matching the consoles photo
   strip pattern. Each thumb is a GLightbox gallery member.
   ========================================================================== */
.tm-thumb-strip {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    padding: 4px 2px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 165, 116, 0.4) transparent;
}
.tm-thumb-strip::-webkit-scrollbar { height: 6px; }
.tm-thumb-strip::-webkit-scrollbar-track { background: transparent; }
.tm-thumb-strip::-webkit-scrollbar-thumb {
    background: rgba(212, 165, 116, 0.3);
    border-radius: 3px;
}
.tm-thumb-strip::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 165, 116, 0.6);
}

.tm-thumb {
    flex: 0 0 84px;
    display: block;
    width: 84px;
    height: 56px;
    border-radius: 2px;
    overflow: hidden;
    background: #000;
    scroll-snap-align: start;
    border: 1px solid rgba(212, 165, 116, 0.18);
    transition: border-color 0.18s ease, transform 0.18s ease,
                opacity 0.18s ease;
    cursor: pointer;
}
.tm-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease, opacity 0.3s ease;
}
.tm-thumb:hover,
.tm-thumb:focus-visible {
    border-color: rgba(232, 160, 84, 0.55);
    outline: none;
    transform: translateY(-1px);
}
.tm-thumb:hover img,
.tm-thumb:focus-visible img {
    transform: scale(1.06);
    opacity: 0.92;
}

@media (max-width: 600px) {
    .tm-thumb {
        flex: 0 0 70px;
        width: 70px;
        height: 47px;
    }
}
