.nmf-gallery-wrap {
    width: 100%;
}

.nmf-gallery-intro {
    --nmf-gallery-intro-width: 1120px;
    width: min(100%, var(--nmf-gallery-intro-width));
    max-width: var(--nmf-gallery-intro-width);
    margin-bottom: 34px;
    color: #151218;
}

.nmf-gallery-wrap--intro-center .nmf-gallery-intro {
    margin-right: auto;
    margin-left: auto;
    text-align: center;
}

.nmf-gallery-wrap--intro-right .nmf-gallery-intro {
    margin-left: auto;
    text-align: right;
}

.nmf-gallery-intro__eyebrow {
    display: inline-flex;
    margin-bottom: 12px;
    font-size: 10px;
    line-height: 1;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: rgba(20, 18, 23, .54);
}

.nmf-gallery-intro__title {
    max-width: 100%;
    margin: 0;
    font-size: clamp(34px, 4.7vw, 76px);
    font-weight: 300;
    line-height: .94;
    letter-spacing: -.055em;
    color: currentColor;
}

.nmf-gallery-intro__text {
    max-width: 48em;
    margin: 16px 0 0;
    font-size: 15px;
    line-height: 1.7;
    color: rgba(20, 18, 23, .68);
}

.nmf-gallery-wrap--intro-center .nmf-gallery-intro__text {
    margin-right: auto;
    margin-left: auto;
}

.nmf-gallery-wrap--intro-right .nmf-gallery-intro__text {
    margin-left: auto;
}

.nmf-gallery-carousel {
    --nmf-gallery-visible: 5;
    --nmf-gallery-gap: 18px;
    --nmf-gallery-height: 360px;
    --nmf-gallery-fit: cover;
    --nmf-gallery-position: center center;
    --nmf-gallery-nav-color: #151218;
    --nmf-gallery-nav-bg: rgba(255,255,255,.92);
    --nmf-gallery-nav-hover-color: #151218;
    --nmf-gallery-nav-hover-bg: #ffffff;
    --nmf-gallery-nav-border: rgba(20,18,23,.12);
    --nmf-gallery-nav-radius: 0;
    --nmf-gallery-nav-shadow-opacity: .10;
    --nmf-gallery-arrow-size: 48px;
    --nmf-gallery-arrow-icon-size: 18px;
    --nmf-gallery-arrow-offset: 16px;
    --nmf-gallery-thumb-width: 82px;
    --nmf-gallery-thumb-height: 54px;
    --nmf-gallery-thumb-gap: 10px;
    position: relative;
    width: 100%;
    font-family: inherit;
}

.nmf-gallery-viewport {
    width: 100%;
    overflow: hidden;
}

.nmf-gallery-track {
    display: flex;
    gap: var(--nmf-gallery-gap);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.nmf-gallery-track::-webkit-scrollbar {
    display: none;
}

.nmf-gallery-item {
    position: relative;
    flex: 0 0 calc((100% - (var(--nmf-gallery-gap) * (var(--nmf-gallery-visible) - 1))) / var(--nmf-gallery-visible));
    height: var(--nmf-gallery-height);
    min-width: 0;
    margin: 0;
    overflow: hidden;
    isolation: isolate;
    background: #f3eeeb;
    scroll-snap-align: start;
}

.nmf-gallery-item__image {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: var(--nmf-gallery-fit) !important;
    object-position: var(--nmf-gallery-position) !important;
    transform: scale(1.001);
    transition: transform 1.05s var(--nmf-ease), filter 1.05s var(--nmf-ease);
}

.nmf-gallery-item::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.26) 100%);
    opacity: 0;
    transition: opacity .45s var(--nmf-ease);
}

.nmf-gallery-item__caption {
    position: absolute;
    right: 18px;
    bottom: 16px;
    left: 18px;
    z-index: 2;
    display: block;
    color: #fff;
    font-size: 11px;
    line-height: 1.25;
    letter-spacing: .16em;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .4s var(--nmf-ease), transform .4s var(--nmf-ease);
}

.nmf-gallery-item:hover .nmf-gallery-item__image,
.nmf-gallery-item:focus-within .nmf-gallery-item__image {
    transform: scale(1.055);
    filter: saturate(1.03) contrast(1.02);
}

.nmf-gallery-item:hover::after,
.nmf-gallery-item:focus-within::after,
.nmf-gallery-item:hover .nmf-gallery-item__caption,
.nmf-gallery-item:focus-within .nmf-gallery-item__caption {
    opacity: 1;
    transform: translateY(0);
}

.nmf-gallery-nav {
    position: absolute !important;
    top: calc(var(--nmf-gallery-height) / 2) !important;
    z-index: 8;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: var(--nmf-gallery-arrow-size) !important;
    height: var(--nmf-gallery-arrow-size) !important;
    min-width: var(--nmf-gallery-arrow-size) !important;
    min-height: var(--nmf-gallery-arrow-size) !important;
    padding: 0 !important;
    border: 1px solid var(--nmf-gallery-nav-border) !important;
    border-radius: var(--nmf-gallery-nav-radius) !important;
    background: var(--nmf-gallery-nav-bg) !important;
    color: var(--nmf-gallery-nav-color) !important;
    box-shadow: 0 12px 32px rgba(20,18,23,var(--nmf-gallery-nav-shadow-opacity)) !important;
    font-size: var(--nmf-gallery-arrow-icon-size) !important;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background-color .3s var(--nmf-ease), color .3s var(--nmf-ease), transform .3s var(--nmf-ease), opacity .3s var(--nmf-ease), box-shadow .3s var(--nmf-ease);
    appearance: none;
    -webkit-appearance: none;
}

.nmf-gallery-nav--prev {
    left: var(--nmf-gallery-arrow-offset);
}

.nmf-gallery-nav--next {
    right: var(--nmf-gallery-arrow-offset);
}

.nmf-gallery-nav:hover,
.nmf-gallery-nav:focus-visible {
    background: var(--nmf-gallery-nav-hover-bg) !important;
    color: var(--nmf-gallery-nav-hover-color) !important;
    transform: translateY(-50%) scale(1.04);
    outline: none;
}

.nmf-gallery-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 26px;
}

.nmf-gallery-dot {
    width: 30px;
    height: 1px;
    padding: 7px 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.nmf-gallery-dot::before {
    content: "";
    display: block;
    width: 100%;
    height: 1px;
    background: currentColor;
    color: var(--nmf-gallery-nav-color);
    opacity: .30;
    transition: opacity .3s var(--nmf-ease), transform .3s var(--nmf-ease);
}

.nmf-gallery-dot.is-active::before,
.nmf-gallery-dot:hover::before,
.nmf-gallery-dot:focus-visible::before {
    opacity: .92;
    transform: scaleY(2);
}

.nmf-gallery-thumbs {
    display: flex;
    justify-content: center;
    gap: var(--nmf-gallery-thumb-gap);
    max-width: 100%;
    margin-top: 28px;
    padding: 2px 0 6px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.nmf-gallery-thumb {
    position: relative;
    flex: 0 0 var(--nmf-gallery-thumb-width);
    width: var(--nmf-gallery-thumb-width);
    min-width: 0;
    height: var(--nmf-gallery-thumb-height);
    min-height: 0;
    padding: 0 !important;
    border: 1px solid rgba(20,18,23,.10) !important;
    border-radius: 0;
    overflow: hidden;
    background: #f3eeeb !important;
    scroll-snap-align: center;
    cursor: pointer;
    opacity: .52;
    transform: translateY(0);
    transition: opacity .28s var(--nmf-ease), border-color .28s var(--nmf-ease), transform .28s var(--nmf-ease), box-shadow .28s var(--nmf-ease);
    appearance: none;
    -webkit-appearance: none;
}

.nmf-gallery-thumb img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center center;
    transition: transform .55s var(--nmf-ease), filter .55s var(--nmf-ease);
}

.nmf-gallery-thumb::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--nmf-gallery-nav-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .28s var(--nmf-ease);
}

.nmf-gallery-thumb.is-active,
.nmf-gallery-thumb:hover,
.nmf-gallery-thumb:focus-visible {
    opacity: 1;
    border-color: rgba(20,18,23,.32) !important;
    box-shadow: 0 10px 26px rgba(20,18,23,.08);
    outline: none;
    transform: translateY(-1px);
}

.nmf-gallery-thumb.is-active::after,
.nmf-gallery-thumb:hover::after,
.nmf-gallery-thumb:focus-visible::after {
    transform: scaleX(1);
}

.nmf-gallery-thumb:hover img,
.nmf-gallery-thumb:focus-visible img {
    transform: scale(1.045);
    filter: saturate(1.03) contrast(1.02);
}

@media (max-width: 767px) {
    .nmf-gallery-intro__title {
        font-size: clamp(34px, 12vw, 54px);
    }

    .nmf-gallery-intro__text {
        font-size: 14px;
    }

    .nmf-gallery-nav {
        width: var(--nmf-gallery-arrow-size, 40px);
        height: var(--nmf-gallery-arrow-size, 40px);
        min-width: var(--nmf-gallery-arrow-size, 40px);
        min-height: var(--nmf-gallery-arrow-size, 40px);
        font-size: var(--nmf-gallery-arrow-icon-size, 17px);
    }

    .nmf-gallery-nav--prev {
        left: var(--nmf-gallery-arrow-offset, 10px);
    }

    .nmf-gallery-nav--next {
        right: var(--nmf-gallery-arrow-offset, 10px);
    }

    .nmf-gallery-dots {
        margin-top: 18px;
    }

    .nmf-gallery-thumbs {
        justify-content: flex-start;
        margin-top: 18px;
    }
}


/* v0.5.1 - Gallery Carousel mobile thumbnail sync/hardening */
.nmf-gallery-carousel .nmf-gallery-track,
.nmf-gallery-carousel .nmf-gallery-thumbs {
    max-width: 100%;
}

.nmf-gallery-carousel .nmf-gallery-thumb {
    box-sizing: border-box;
}

.nmf-gallery-carousel .nmf-gallery-thumb:focus-visible,
.nmf-gallery-carousel .nmf-gallery-dot:focus-visible {
    outline: 1px solid currentColor;
    outline-offset: 3px;
}

@media (max-width: 767px) {
    .nmf-gallery-thumbs {
        justify-content: flex-start;
        width: 100%;
        padding: 2px 0 8px;
        scrollbar-width: none;
    }

    .nmf-gallery-thumbs::-webkit-scrollbar {
        display: none;
    }

    .nmf-gallery-thumb {
        flex-basis: var(--nmf-gallery-thumb-width);
    }
}
