﻿/* ── Machine Merk Hover – Figma Design ──────────────────────────────── */
/* Red accent used for active indicators */
:root {
    --mmh-red: #D92B2B;
    --mmh-text: #1a1a1a;
    --mmh-muted: #888;
    --mmh-line: #e8e8e8;
}
.machine-hover-filter {
    font-family: inherit;
    width: 100%;
}
/* ═══════════════════════════════════════════════════════════════════════
   DESKTOP  ≥ 768px  —  3 columns side by side
   ═══════════════════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
    .machine-hover-filter {
        display: grid;
        align-items: start;
        grid-template-columns: auto 1fr;
    }
    /* Brand column stays narrow */
    .brand-list {
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    /* Panel holds the two text columns */
    .hover-panel {
        display: grid !important;
        grid-template-columns: 220px 1fr;
        align-items: start;
        padding-left: 40px;
        min-height: 100%;
    }
    .voertuigsoort {
        display: flex;
        flex-direction: column;
        border-left: 1px solid var(--mmh-line);
        padding-left: 32px;
    }
    .model {
        display: grid;
        grid-template-columns: 1fr 1fr;
        border-left: 1px solid var(--mmh-line);
        padding-left: 32px;
    }
    /* ── Brand items ─────────────────────────────────────────────────── */
    .brand-item {
        position: relative;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        min-height: 76px;
        padding: 8px 32px 8px 0;
        transition: opacity 0.15s;
    }
    .brand-item:not(.mmh-active) {
        opacity: 0.55;
    }
    .brand-item:hover {
        opacity: 1;
    }
    /* Red right-pointing triangle for active brand */
    .brand-item.mmh-active {
        opacity: 1;
    }
    .brand-item.mmh-active::after {
        content: '';
        position: absolute;
        right: -10px;
        top: 50%;
        transform: translateY(-50%);
        width: 0;
        height: 0;
        border-top: 9px solid transparent;
        border-bottom: 9px solid transparent;
        border-left: 10px solid var(--mmh-red);
    }
    /* ── Type buttons ────────────────────────────────────────────────── */
    .mmh-type-btn {
        position: relative;
        display: block;
        width: 100%;
        text-align: left;
        background: none;
        border: none;
        padding: 12px 32px 12px 0;
        font-size: 16px;
        font-weight: 400;
        color: var(--mmh-muted);
        cursor: pointer;
        text-transform: capitalize;
        line-height: 1.4;
        min-height: 47px;
        transition: color 0.12s;
        border-bottom: 1px solid var(--mmh-line);
    }
    .mmh-type-btn:first-child { border-top: 1px solid var(--mmh-line); }
    .mmh-type-btn:hover {
        color: var(--mmh-text);
    }
    .mmh-type-btn.mmh-active {
        font-weight: 700;
        color: var(--mmh-text);
    }
    /* Red right-pointing triangle for active type */
    .mmh-type-btn.mmh-active::after {
        content: '';
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        width: 0;
        height: 0;
        border-top: 7px solid transparent;
        border-bottom: 7px solid transparent;
        border-left: 8px solid var(--mmh-red);
    }
    /* ── Model links ─────────────────────────────────────────────────── */
    .mmh-model-btn {
        display: block;
        padding: 12px 0;
        font-size: 16px;
        font-weight: 400;
        color: var(--mmh-muted);
        text-decoration: none;
        text-transform: capitalize;
        min-height: 47px;
        line-height: 1.4;
        transition: color 0.12s;
        border-bottom: 1px solid var(--mmh-line);
    }
    .mmh-model-btn:first-child { border-top: 1px solid var(--mmh-line); }
    .mmh-model-btn:hover {
        color: var(--mmh-red);
        text-decoration: none;
    }
}
/* ═══════════════════════════════════════════════════════════════════════
   MOBILE  < 768px  —  step-by-step navigation
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
    .machine-hover-filter {
        overflow: hidden;
        position: relative;
    }
    /* Mobile: horizontal slider with 3 panels */
    .mmh-mobile-slider {
        display: flex;
        width: 300%;
        transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .mmh-mobile-slider[data-step="1"] { transform: translateX(0); }
    .mmh-mobile-slider[data-step="2"] { transform: translateX(-33.333%); }
    .mmh-mobile-slider[data-step="3"] { transform: translateX(-66.666%); }
    .mmh-mobile-step {
        width: calc(100% / 3);
        flex-shrink: 0;
        box-sizing: border-box;
        padding-bottom: 16px;
    }
    /* Back nav */
    .mmh-back {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: none;
        border: none;
        padding: 0 0 14px;
        font-size: 14px;
        font-weight: 600;
        color: var(--mmh-red);
        cursor: pointer;
        letter-spacing: .3px;
    }
    .mmh-back::before {
        content: '←';
        font-size: 16px;
    }
    .mmh-breadcrumb {
        font-size: 13px;
        color: var(--mmh-muted);
        margin-bottom: 12px;
        text-transform: capitalize;
    }
    /* Brand grid on mobile */
    .brand-list {
        /* display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px; */
    }
    .brand-item {
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 64px;
        padding: 10px 8px;
        border: 2px solid var(--mmh-line);
        border-radius: 10px;
        background: #fafafa;
        transition: border-color 0.15s, background 0.15s;
        -webkit-tap-highlight-color: transparent;
    }
    .brand-item.mmh-active,
    .brand-item:hover {
        border-color: var(--mmh-red);
        background: #fff;
    }
    /* Type list on mobile */
    .mmh-type-btn {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        text-align: left;
        background: none;
        border: none;
        border-bottom: 1px solid var(--mmh-line);
        padding: 14px 0;
        font-size: 15px;
        font-weight: 500;
        color: var(--mmh-text);
        cursor: pointer;
        text-transform: capitalize;
        -webkit-tap-highlight-color: transparent;
    }
    .mmh-type-btn:first-child { border-top: 1px solid var(--mmh-line); }
    .mmh-type-btn::after {
        content: '›';
        font-size: 22px;
        color: var(--mmh-red);
        line-height: 1;
    }
    /* Model list on mobile */
    .mmh-model-btn {
        display: flex;
        align-items: center;
        padding: 13px 0;
        font-size: 15px;
        font-weight: 500;
        color: var(--mmh-text);
        text-decoration: none;
        text-transform: capitalize;
        border-bottom: 1px solid var(--mmh-line);
        -webkit-tap-highlight-color: transparent;
    }
    .mmh-model-btn:first-child { border-top: 1px solid var(--mmh-line); }
    .mmh-model-btn:hover {
        color: var(--mmh-red);
        text-decoration: none;
    }
    /* Hide the old hover-panel wrapper; mobile uses the slider */
    .hover-panel { display: none !important; }
}
/* ── Shared image / text inside brand-item ──────────────────────────── */
.brand-item img {
    max-height: 44px;
    max-width: 120px;
    object-fit: contain;
    display: block;
    pointer-events: none;
}
.brand-item span {
    font-weight: 700;
    font-size: 14px;
    color: var(--mmh-text);
    text-align: center;
}
