/* ===== Garage Videos section =====
   All internal class names are deliberately scoped under .garage-section
   to avoid collisions with other modules that also use .garage-* names
   (FitmentsGarage's My Garage header, MegaMenu's garage trigger, etc.). */
.garage-section {
    --garage-accent: var(--theme-color, #3B7DFF);
    --garage-bg: #0b0c0e;
    --garage-bg-2: #15171b;
    --garage-bg-3: #1d2026;
    --garage-text: #f6f7f8;
    --garage-text-dim: #9aa0a8;
    --garage-line: rgba(255,255,255,0.08);
    background: linear-gradient(180deg, #0b0c0e 0%, #0e1014 100%);
    color: var(--garage-text);
    padding: clamp(48px, 8vw, 96px) 0;
    overflow: hidden;
    position: relative;
}
.garage-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(60% 50% at 70% 0%, rgba(255,255,255,0.04), transparent 60%);
    pointer-events: none;
}
.garage-section .garage-inner {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 48px);
}

/* Header */
.garage-section .garage-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: clamp(32px, 5vw, 56px);
    padding-bottom: 24px;
    border-bottom: 1px solid var(--garage-line);
}
.garage-section .garage-heading-block { display: flex; flex-direction: column; gap: 8px; }
.garage-section .garage-eyebrow {
    font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
    font-size: 12px;
    letter-spacing: 0.25em;
    color: var(--garage-accent);
    text-transform: uppercase;
}
.garage-section .garage-title {
    margin: 0;
    font-family: inherit;
    font-weight: 800;
    font-size: clamp(28px, 4vw, 52px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--garage-text);
    text-transform: uppercase;
}
.garage-section .garage-subscribe {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #ff0033;
    color: #fff;
    padding: 12px 20px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: transform 0.18s ease, background 0.18s ease;
}
.garage-section .garage-subscribe:hover { background: #d40029; transform: translateY(-1px); color: #fff; text-decoration: none; }
.garage-section .garage-yt-icon { display: inline-flex; }

/* Main split */
.garage-section .garage-main {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: clamp(20px, 3vw, 40px);
    align-items: stretch;
}
@media (max-width: 960px) {
    .garage-section .garage-main { grid-template-columns: 1fr; }
}

/* Video pane */
.garage-section .garage-video-pane {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.garage-section .garage-video-frame {
    background: var(--garage-bg-2);
    border: 1px solid var(--garage-line);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}
.garage-section .garage-iframe-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
}
.garage-section .garage-iframe-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
.garage-section .garage-video-meta { display: flex; flex-direction: column; gap: 14px; }
.garage-section .garage-video-title {
    margin: 0;
    font-size: clamp(20px, 2.2vw, 26px);
    font-weight: 700;
    color: var(--garage-text);
    line-height: 1.25;
}
.garage-section .garage-stats { display: flex; gap: 18px; flex-wrap: wrap; color: var(--garage-text-dim); font-size: 14px; }
.garage-section .garage-stat strong { color: var(--garage-text); font-weight: 700; }
.garage-section .garage-stat-hidden { display: none; }
.garage-section .garage-watch-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    color: var(--garage-accent);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.1em;
    text-decoration: none;
    padding: 10px 0;
    border-bottom: 1px solid transparent;
    transition: border-color 0.18s ease, color 0.18s ease;
}
.garage-section .garage-watch-link:hover { border-bottom-color: var(--garage-accent); color: var(--garage-accent); text-decoration: none; }

/* Parts pane */
.garage-section .garage-parts-pane {
    background: var(--garage-bg-2);
    border: 1px solid var(--garage-line);
    border-radius: 16px;
    padding: clamp(20px, 2.5vw, 28px);
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: 700px;
    overflow: hidden;
}
.garage-section .garage-parts-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.garage-section .garage-parts-heading-block { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.garage-section .garage-add-all-btn {
    background: var(--garage-accent);
    border: 1px solid var(--garage-accent);
    color: #0b0c0e;
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}
.garage-section .garage-add-all-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.garage-section .garage-add-all-btn.is-loading { opacity: 0.6; cursor: progress; }
.garage-section .garage-add-all-btn.is-success { background: #1f8a3b; border-color: #1f8a3b; color: #fff; }
.garage-section .garage-add-all-plus { font-size: 14px; line-height: 1; }
.garage-section .garage-parts-msg {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    color: var(--garage-text-dim);
    min-height: 0;
}
.garage-section .garage-parts-msg:empty { display: none; }
.garage-section .garage-parts-msg.is-warn { color: var(--garage-accent); }
.garage-section .garage-parts-eyebrow {
    font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
    font-size: 11px;
    letter-spacing: 0.25em;
    color: var(--garage-accent);
    text-transform: uppercase;
}
.garage-section .garage-parts-title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--garage-text);
}

.garage-section .garage-parts-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    flex: 1 1 auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.garage-section .garage-parts-list::-webkit-scrollbar { width: 6px; }
.garage-section .garage-parts-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 6px; }

.garage-section .garage-part {
    display: grid;
    grid-template-columns: 32px 72px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--garage-line);
}
.garage-section .garage-part:last-child { border-bottom: none; }
.garage-section .garage-part-num {
    font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
    font-size: 12px;
    color: var(--garage-text-dim);
    letter-spacing: 0.1em;
}
.garage-section .garage-part-thumb {
    position: relative;
    display: block;
    width: 72px;
    height: 72px;
    background: var(--garage-bg-3);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
}
.garage-section .garage-part-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.garage-section .garage-part-ts {
    position: absolute;
    left: 4px;
    bottom: 4px;
    background: rgba(0,0,0,0.78);
    color: var(--garage-accent);
    font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.04em;
}
.garage-section .garage-part-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.garage-section .garage-part-brand {
    font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
    font-size: 10px;
    color: var(--garage-text-dim);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.garage-section .garage-part-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--garage-text);
    text-decoration: none;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.garage-section .garage-part-name:hover { color: var(--garage-accent); text-decoration: none; }
.garage-section .garage-part-price { color: var(--garage-accent); font-weight: 700; font-size: 14px; }

.garage-section .garage-add-btn {
    background: transparent;
    border: 1px solid var(--garage-line);
    color: var(--garage-text);
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.1em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.garage-section .garage-add-btn:hover { background: var(--garage-accent); border-color: var(--garage-accent); color: #0b0c0e; transform: translateY(-1px); }
.garage-section .garage-add-btn.is-loading { opacity: 0.6; cursor: progress; }
.garage-section .garage-add-btn.is-success { background: #1f8a3b; border-color: #1f8a3b; color: #fff; }
.garage-section .garage-add-plus { font-size: 14px; line-height: 1; }

/* Rail */
.garage-section .garage-rail {
    margin-top: clamp(24px, 4vw, 48px);
    border-top: 1px solid var(--garage-line);
    padding-top: clamp(20px, 3vw, 32px);
}
.garage-section .garage-rail-track {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
    scroll-snap-type: x proximity;
}
.garage-section .garage-rail-track::-webkit-scrollbar { height: 6px; }
.garage-section .garage-rail-track::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 6px; }

.garage-section .garage-rail-card {
    flex: 0 0 240px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: transparent;
    border: 1px solid var(--garage-line);
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    text-align: left;
    color: var(--garage-text);
    transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
    scroll-snap-align: start;
}
.garage-section .garage-rail-card:hover { border-color: rgba(255,255,255,0.18); transform: translateY(-2px); background: rgba(255,255,255,0.02); }
.garage-section .garage-rail-card.is-active { border-color: var(--garage-accent); background: rgba(59,125,255,0.08); }

.garage-section .garage-rail-thumb-wrap {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--garage-bg-3);
}
.garage-section .garage-rail-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.garage-section .garage-rail-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.45) 100%);
    opacity: 0.85;
    transition: opacity 0.18s ease;
}
.garage-section .garage-rail-card:hover .garage-rail-play { opacity: 1; }

.garage-section .garage-rail-meta { display: flex; flex-direction: column; gap: 4px; }
.garage-section .garage-rail-title {
    color: var(--garage-text);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.garage-section .garage-rail-views { color: var(--garage-text-dim); font-size: 11px; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; letter-spacing: 0.08em; }
