/* ── Header GIF (TractorGuru) ── */
.mf-gif-promo-item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: transparent !important;
    box-shadow: none;
    border: none;
    padding: 0;
    list-style: none;
}

.mf-gif-promo-desktop {
    position: static;
    transform: none;
    margin: 0 12px 0 0;
    padding: 0;
    align-self: center;
    flex-shrink: 0;
    display: none;
    align-items: center;
    justify-content: center;
}

@media (min-width: 992px) {
    .mf-gif-promo-desktop {
        display: flex;
    }
}

.mf-gif-mobile-slot {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    pointer-events: none;
}

.mf-gif-mobile-slot .mf-gif-promo-mobile {
    pointer-events: auto;
}

.mf-gif-promo-mobile {
    position: static;
    transform: none;
    margin: 0;
    display: flex;
}

@media (min-width: 992px) {
    .mobile-head-wrap .mf-gif-promo-mobile,
    .mf-gif-mobile-slot .mf-gif-promo-desktop {
        display: none;
    }
}

.MF_GIF_TG {
    display: block;
    padding: 0 !important;
    margin: 0;
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    cursor: pointer;
    line-height: 0;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
}

.MF_GIF_TG:focus,
.MF_GIF_TG:active,
.MF_GIF_TG:hover {
    outline: none !important;
    border: 0 !important;
    box-shadow: none !important;
}

.MF_GIF_TG img {
    display: block;
    width: auto;
    height: auto;
    max-width: 130px;
    max-height: 54px;
    object-fit: contain;
    background: transparent !important;
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}

@media (max-width: 991px) {
    .MF_GIF_TG img {
        max-width: 100px;
        max-height: 38px;
    }
}

@media (max-width: 380px) {
    .MF_GIF_TG img {
        max-width: 86px;
        max-height: 35px;
    }
}

/* ── Video modal ── */
.mf-gif-video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
}

.mf-gif-video-modal.mf-gif-manual {
    background: rgba(0, 0, 0, 0.45);
}

.mf-gif-video-modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.mf-gif-video-modal .modal-dialog {
    max-width: 600px;
    width: calc(100% - 40px);
    margin: 1rem auto;
    position: relative;
    pointer-events: none;
}

.mf-gif-video-modal .modal-content {
    border: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(36, 39, 44, 0.18);
    background: #fff;
    pointer-events: auto;
    position: relative;
}

.mf-gif-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px 10px;
    border-bottom: 1px solid #f0f0f0;
}

.mf-gif-modal-heading {
    flex: 1;
    min-width: 0;
}

.mf-gif-modal-title {
    font-size: 16px;
    font-weight: 700;
    color: #24272c;
    line-height: 1.35;
}

.mf-gif-modal-subtitle {
    margin-top: 2px;
    font-size: 13px;
    font-weight: 500;
    color: #8c8c8c;
    line-height: 1.3;
}

.mf-gif-modal-close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: 0;
    background: #f5f5f5;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease;
}

.mf-gif-modal-close:hover {
    background: #ebebeb;
}

.mf-gif-modal-close img {
    display: block;
    width: 18px;
    height: 18px;
}

.mf-gif-modal-body {
    padding: 14px 20px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mf-gif-video-wrap {
    position: relative;
    width: 88%;
    max-width: 520px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.mf-gif-video-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #000;
}

.mf-gif-video-player::-webkit-media-controls-enclosure {
    overflow: hidden;
}

.mf-gif-cta-wrap {
    margin-top: 14px;
    width: 88%;
    max-width: 400px;
}

.mf-gif-video-modal .mf-gif-cta {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 48px;
    line-height: 48px;
    padding: 0 16px;
    border: 0;
    color: #fff !important;
    background-color: #d2232a;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    overflow: hidden;
    transition: background-color 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.mf-gif-video-modal .mf-gif-cta:hover,
.mf-gif-video-modal .mf-gif-cta:focus {
    background-color: #b81c22;
    color: #fff !important;
    outline: none;
}

.mf-gif-video-modal .mf-gif-cta.animated-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 60px;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.35) 0,
        rgba(255, 255, 255, 0.45) 38px,
        transparent 38px,
        transparent 45px,
        rgba(255, 255, 255, 0.45) 45px,
        rgba(255, 255, 255, 0.45) 60px
    );
    transform: skewX(-25deg) translateX(-100%);
    animation: mfGifShimmer 1.4s infinite linear;
    will-change: transform;
    pointer-events: none;
    z-index: 0;
}

@keyframes mfGifShimmer {
    0% {
        transform: skewX(-25deg) translateX(-100%);
    }
    100% {
        transform: skewX(-25deg) translateX(600%);
    }
}

@media (max-width: 767px) {
    .mf-gif-video-modal.show {
        align-items: flex-end;
    }

    .mf-gif-video-modal .modal-dialog {
        max-width: none;
        width: 100%;
        margin: auto 0 0;
        min-height: auto;
    }

    .mf-gif-video-modal .modal-content {
        border-radius: 24px 24px 0 0;
    }

    .mf-gif-modal-header {
        padding: 12px 14px 10px;
    }

    .mf-gif-modal-title {
        font-size: 15px;
    }

    .mf-gif-modal-subtitle {
        font-size: 12px;
    }

    .mf-gif-modal-body {
        padding: 12px 14px 16px;
    }

    .mf-gif-video-wrap {
        width: 100%;
        max-width: 100%;
        aspect-ratio: auto;
        min-height: 50vh;
        height: 50vh;
        border-radius: 8px;
    }

    .mf-gif-cta-wrap {
        width: 100%;
        max-width: 100%;
        margin-top: 14px;
    }

    .mf-gif-video-modal .mf-gif-cta {
        height: 46px;
        line-height: 46px;
        font-size: 14px;
    }
}

@media (max-width: 380px) {
    .mf-gif-modal-title {
        font-size: 13px;
    }
}
