.mbiv-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 0;
    position: relative;
    font-family: inherit;
}

.mbiv-section *,
.mbiv-section *::before,
.mbiv-section *::after {
    box-sizing: border-box;
}

/* =========================================================
   MBIV LIGHTBOX ALIGNMENT FIX
   ========================================================= */

.mbiv-modal {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.mbiv-backdrop {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
}

.mbiv-modal-shell {
    position: fixed !important;
    inset: 0 !important;

    width: 100vw !important;
    max-width: none !important;
    height: 100vh !important;

    margin: 0 !important;
    padding: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    overflow: visible !important;
}

/* Keep the actual video/card centered */
.mbiv-modal-shell .mbiv-modal-content,
.mbiv-modal-shell .mbiv-video-modal,
.mbiv-modal-shell .mbiv-modal-video {
    margin: 0 auto !important;
}

/* Close button */
.mbiv-close {
    position: absolute !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 20 !important;
}

/* Arrows */
.mbiv-modal-arrow {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 20 !important;
}

.mbiv-modal-prev {
    left: 24px !important;
}

.mbiv-modal-next {
    margin-right: 20% !important;
}

.mbiv-title {
    margin: 0 0 20px;
    font-size: 28px;
    font-style: normal;
    line-height: normal;
    font-weight: 600;
    color: #333;
}

.mbiv-error {
    padding: 18px;
    border-radius: 10px;
    background: #fff4f4;
    color: #b42318;
}

.mbiv-slider {
    position: relative;
}

.mbiv-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.mbiv-track::-webkit-scrollbar {
    display: none;
}

/* =========================
   HOMEPAGE CARD
========================= */

.mbiv-video-card {
    flex: 0 0 288px;
    width: 288px;
    cursor: pointer;
    outline: none;
}

.mbiv-card-media {
    position: relative;
    width: 100%;
    height: 506px;
    overflow: hidden;
    border-radius: 16px;
    background: #eee;
}

.mbiv-card-media::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 34%;
    background: linear-gradient(to top, rgba(0, 0, 0, .28), transparent);
    pointer-events: none;
}

.mbiv-card-media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.mbiv-play {
    position: absolute;
    z-index: 4;
    left: 50%;
    top: 50%;
    width: 62px;
    height: 62px;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .18));
}

.mbiv-play svg {
    width: 62px;
    height: 62px;
    display: block;
}

.mbiv-item-pill {
    position: absolute;
    z-index: 5;
    right: 19px;
    bottom: 16px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
    border-radius: 8px;
    border: 1px solid #EEE;
    background: rgba(255, 255, 255, 0.80);
    color: #333;
    height: 32px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .16);

}

.mbiv-item-thumbs img:first-child {
    position: relative;
    left: 0;
    z-index: 2;
}

.mbiv-item-thumbs-count {
    font-size: 14px;
    line-height: normal;
    font-weight: 500;
    white-space: nowrap;
}

.mbiv-item-thumbs img:nth-child(2) {
    position: relative;
    left: -7px;
    z-index: 1;
}

.mbiv-item-pill b {
    font-size: 18px;
    line-height: 1;
    font-weight: 400;
}

.mbiv-item-thumbs {
    max-width: 38px;
    display: flex;
    align-items: center;
}

.mbiv-item-thumbs img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 40px;
    background: #EEE;
    border: 1px solid #D1D1D1;
    margin-right: -3px;
}

.mbiv-card-copy {
    padding-top: 12px;
}

.mbiv-card-copy h3 {
    margin: 0;
    color: #333;
    font-size: 16px;
    font-style: normal;
    line-height: normal;
    font-weight: 400;
}

.mbiv-author-row {
    display: flex;
    /* align-items: center; */
    gap: 8px;
    margin-top: 8px;
    color: #646464;
    font-size: 14px;
    line-height: 20px;
}

.mbiv-video-icon {
    display: flex;
    align-items: center;
}

.mbiv-social {
    position: relative;
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 1.5px solid #555;
    border-radius: 50%;
}

.mbiv-social.instagram::before {
    content: "";
    position: absolute;
    width: 5px;
    height: 5px;
    border: 1px solid #555;
    border-radius: 2px;
    left: 3px;
    top: 3px;
}

.mbiv-social.instagram::after {
    content: "";
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: #555;
    right: 2px;
    top: 2px;
}

.mbiv-social.youtube {
    width: 16px;
    border-radius: 4px;
}

.mbiv-social.youtube::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 3px;
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
    border-left: 5px solid #555;
}

/* arrows */
.mbiv-slider-arrow {
    position: absolute;
    z-index: 10;
    top: calc(50% - 30px);
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #222;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .16);
    font-size: 29px;
    line-height: 38px;
    cursor: pointer;
}

.mbiv-slider-prev {
    left: -20px
}

.mbiv-slider-next {
    right: -20px
}

.mbiv-slider-arrow:hover {
    box-shadow: 0 6px 22px rgba(0, 0, 0, .22);
}

/* =========================
   VIDEO MODAL
========================= */

.mbiv-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
}

.mbiv-modal.is-open {
    display: block;
}

.mbiv-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.50);
    backdrop-filter: blur(1px);
}

.mbiv-modal-shell {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mbiv-modal-card {
    position: relative;
    width: 330px;
    height: min(590px, calc(100vh - 40px));
    overflow: hidden;
    border-radius: 13px;
    background: #111;
    box-shadow: 0 22px 70px rgba(0, 0, 0, .55);
}

.mbiv-video-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    overflow: hidden;
}

.mbiv-play-toggle {
    position: absolute;
    inset: 0;
    z-index: 18;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    pointer-events: auto;
}

.mbiv-play-toggle-icon {
    display: grid;
    place-items: center;
    opacity: 1;
    transition: opacity .15s ease;
    pointer-events: none;
}

.mbiv-play-toggle-icon svg {
    display: block;
    width: 60px;
    height: 60px;
}

.mbiv-play-toggle.is-playing .mbiv-play-toggle-icon {
    opacity: 0;
}

.mbiv-video-iframe,
.mbiv-video-element {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
    object-fit: cover;
}

.mbiv-close {
    display: none !important;
}

.mbiv-close-mweb {
    position: relative;
    z-index: 100;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
    font-size: 23px;
    line-height: 40px;
    pointer-events: auto;
    cursor: pointer;
}

@media (max-width: 767px) {

    .mbiv-modal-controls {
        pointer-events: auto !important;
        top: 23px;
        display: flex;
        justify-content: space-between;
    }

    .mbiv-close-mweb {
        width: 44px;
        height: 44px;
    }
}

.mbiv-modal-card::after {
    content: "";
    position: absolute;
    z-index: 9;
    left: 0;
    right: 0;
    bottom: 0;
    height: 38%;
    background: linear-gradient(to top, rgba(0, 0, 0, .84), rgba(0, 0, 0, 0));
    pointer-events: none;
}

.mbiv-modal-bottom-content {
    position: absolute;
    z-index: 20;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 16px;
    flex-direction: column;
}

/* product cards sit over video */
.mbiv-modal-products {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 1px 16px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

/* End spacer so the last card can sit inset from the right edge when scrolled fully. */
.mbiv-modal-products::after {
    content: '';
    flex: 0 0 16px;
    width: 16px;
    min-width: 16px;
    height: 1px;
    pointer-events: none;
}

.mbiv-modal-products::-webkit-scrollbar {
    display: none;
}

.mbiv-product {
    min-height: 100px;
    padding: 8px 12px;
    border-radius: 10px;
    background: #fff;
    max-width: 284px;
    color: #222;
    width: 71%;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .2);
}

/* One product: fill the row, keep the same 16px side inset as the slider. */
.mbiv-modal-products.is-single {
    padding-right: 16px;
    overflow-x: hidden;
}

.mbiv-modal-products.is-single::after {
    display: none;
    flex: 0;
    width: 0;
    min-width: 0;
}

.mbiv-modal-products.is-single .mbiv-product {
    width: 100%;
    max-width: none;
    flex: 1 1 auto;
    min-width: 0;
}

.mbiv-product-top {
    display: flex;
    gap: 8px;
    min-height: 52px;
}

.mbiv-product-image {
    width: 72px;
    height: 72px;
    display: block;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.mbiv-product-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.mbiv-product-details {
    min-width: 0;
    flex: 1;
    color: #222;
    text-decoration: none;
}

.mbiv-product-name {
    display: block;
    width: 100%;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    color: #333;
    line-height: normal;
    font-weight: 500;
}

.mbiv-product-flavor {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    line-height: normal;
    color: #646464;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mbiv-price-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    white-space: nowrap;
    overflow: hidden;
}

.mbiv-price-row strong {
    font-size: 14px;
    font-weight: 500;
    line-height: normal;
    color: #333;

}

.mbiv-price-row del {
    color: #646464;
    font-size: 12px;
    font-weight: 400;
    line-height: normal;
    text-decoration-line: line-through;


}

.mbiv-price-row span {
    font-size: 14px;
    font-weight: 500;
    line-height: normal;
    color: #333;
}

.mbiv-add-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    margin-top: 8px;
    padding: 12px 20px;
    border-radius: 18px;
    background: #ffbc00;
    color: #131313;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    line-height: normal;
}

.mbiv-modal-meta {
    color: #fff;
    padding: 0 16px 24px;
}

.mbiv-modal-meta h3 {
    margin: 0;
    font-size: 22px;
    line-height: 26px;
    font-weight: 400;
    color: #fff;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mbiv-modal-author-name {
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
}

.mbiv-modal-author {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
}

.mbiv-modal-author>span {
    display: flex;
    align-items: center;

}

.mbiv-modal-author .mbiv-social {
    border-color: #fff;
}

.mbiv-modal-author .mbiv-social.instagram::before {
    border-color: #fff;
}

.mbiv-modal-author .mbiv-social.instagram::after {
    background: #fff;
}

.mbiv-modal-author .mbiv-social.youtube::after {
    border-left-color: #fff;
}

.mbiv-modal-arrow {
    position: absolute;
    z-index: 25;
    top: 50%;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    transform: translateY(-50%);
    background: #fff;
    color: #222;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .22);
    cursor: pointer;
}

.mbiv-modal-prev {
    margin-left: -415px
}

.mbiv-modal-next {
    margin-left: 415px
}

.mbiv-lock {
    overflow: hidden !important;
}

.mbiv-data {
    display: none !important;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width:1100px) {
    .mbiv-section {
        max-width: 940px;
    }

    .mbiv-video-card {
        flex-basis: 205px;
        width: 205px;
    }

    .mbiv-card-media {
        height: 360px;
    }

    .mbiv-modal-prev {
        margin-left: -390px
    }

    .mbiv-modal-next {
        margin-left: 390px
    }
}

@media (max-width:767px) {

    .mbiv-title {
        font-size: 20px;
        margin-bottom: 14px;
    }

    .mbiv-track {
        gap: 10px;
    }

    .mbiv-video-card {
        flex-basis: 168px;
        width: 168px;
    }

    .mbiv-card-media {
        height: 295px;
        border-radius: 10px;
    }


    .mbiv-item-thumbs img {
        width: 22px;
        height: 22px;
    }

    .mbiv-card-copy h3 {
        font-size: 11px;
    }

    .mbiv-author-row {
        font-size: 9px;
    }

    .mbiv-slider-arrow {
        display: none;
    }

    .mbiv-modal-card {
        width: 100vw;
        height: 100dvh;
        border-radius: 0;
    }

    .mbiv-modal-prev {
        left: 8px;
        margin-left: 0;
    }

    .mbiv-modal-next {
        right: 8px;
        margin-left: 0;
    }

    .mbiv-modal-arrow {
        width: 40px;
        height: 40px;
        font-size: 28px;
    }

    .mbiv-close {
        top: 10px;
        right: 10px;
    }

    .mbiv-modal-products {
        left: 0;
        right: 0;
        bottom: 105px;
        padding-left: 16px;
    }

    .mbiv-modal-products::after {
        flex-basis: 16px;
        width: 16px;
        min-width: 16px;
    }

    .mbiv-product {
        flex-basis: 224px;
    }
}

/* v1.6.0: screenshot-style centered carousel modal */
.mbiv-modal-shell {
    width: min(1100px, calc(100vw - 40px));
    overflow: visible
}

.mbiv-modal-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible
}

.mbiv-modal-card {
    position: relative;
    z-index: 10;
    width: min(495px, calc((100vh - 20px) * 9 / 16));
    flex: 0 0 min(495px, calc((100vh - 20px) * 9 / 16));
    aspect-ratio: 9 / 16;
    height: auto;
    border-radius: 14px;
    overflow: hidden;
    background: transparent;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .5);
}

.mbiv-side-card {
    position: relative;
    z-index: 4;
    width: 330px;
    flex: 0 0 330px;
    height: min(660px, 80vh);
    border-radius: 14px;
    overflow: hidden;
    background: #222;
    transform: scale(.92);
    box-shadow: 0 16px 55px rgba(0, 0, 0, .35);
    pointer-events: none
}

.mbiv-side-prev {
    margin-right: -55px
}

.mbiv-side-next {
    margin-left: -55px
}

.mbiv-side-media {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat
}

.mbiv-side-shade {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .18)
}

.mbiv-side-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #fff;
    color: #111;
    font-size: 20px;
    padding-left: 3px
}

.mbiv-side-title {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    color: #fff;
    font-size: 17px;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .7)
}

.mbiv-modal-prev {
    left: -20px
}

.mbiv-modal-next {
    right: -20px
}

@media(max-width:900px) {
    .mbiv-side-card {
        display: none
    }

    .mbiv-modal-shell {
        width: 100vw
    }

    .mbiv-modal-card {
        width: min(495px, calc(92vw));
        flex-basis: min(495px, calc(92vw));
        aspect-ratio: 9 / 16;
        height: auto;
    }

    .mbiv-modal-prev {
        left: 8px
    }

    .mbiv-modal-next {
        right: 8px
    }
}

/* =========================================================
   v1.7.0 — MOBILE FIGMA MATCH
========================================================= */

@media (max-width:767px) {

    /* Homepage section — edge-to-edge track (same as trending) */
    .mbiv-section {
        width: 100%;
        max-width: none;
        margin: 32px 0 24px;
        padding: 0;
        overflow: visible;
    }

    .mbiv-title {
        margin: 0 0 16px;
        padding: 0 16px;
        font-size: 20px;
        line-height: normal;
        font-weight: 600;
        color: #333;
        box-sizing: border-box;
    }

    .mbiv-slider {
        width: 100vw;
        max-width: 100vw;
        margin-left: calc(50% - 50vw);
        overflow: visible;
        position: relative;
    }

    .mbiv-track {
        display: flex;
        flex-wrap: nowrap;
        align-items: stretch;
        gap: 12px;
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .mbiv-track::-webkit-scrollbar {
        display: none;
    }

    /* 16px before first + after last */
    .mbiv-track::before,
    .mbiv-track::after {
        content: '';
        flex: 0 0 16px;
        width: 16px;
        min-width: 16px;
        height: 1px;
        pointer-events: none;
    }

    /* ~1.2 slides; 16px left on every snap except last */
    .mbiv-video-card {
        flex: 0 0 calc(100vw - 54px);
        width: calc(100vw - 54px);
        max-width: calc(100vw - 54px);
        scroll-snap-align: start;
        scroll-margin-left: 16px;
    }

    .mbiv-video-card:last-child {
        scroll-margin-left: 0;
    }

    .mbiv-card-media {
        width: 100%;
        height: auto;
        aspect-ratio: 285 / 506;
        border-radius: 16px;
    }


    .mbiv-item-pill {
        right: 16px;
        bottom: 16px;
        height: 32px;
        padding: 4px 6px;
        border-radius: 8px;
        gap: 4px;
        font-size: 14px;
        font-weight: 500;
        line-height: normal;
        box-shadow: 0 2px 9px rgba(0, 0, 0, .16);
    }

    .mbiv-item-thumbs img {
        width: 24px;
        height: 24px;
        border-radius: 40px;
    }

    .mbiv-card-copy {
        padding-top: 12px;
    }

    .mbiv-card-copy h3 {
        font-size: 16px;
        min-height: 0;
        font-weight: 400;
    }

    .mbiv-author-row {
        gap: 8px;
        font-size: 14px;
    }

    .mbiv-author-row .mbiv-social {
        width: 14px;
        height: 14px;
    }

    /* No arrows on the homepage mobile carousel. */
    .mbiv-slider-arrow {
        display: none !important;
    }

    /* =====================================================
       MOBILE VIDEO POPUP
       Figma: 13px side margin, ~373px wide on a 399px viewport.
    ===================================================== */

    .mbiv-modal {
        background: transparent;
    }

    .mbiv-backdrop {
        background: rgba(0, 0, 0, .88);
    }

    .mbiv-modal-shell {
        width: 100%;
        height: 100dvh;
        padding: 0 13px 14px;
        display: flex;
        align-items: flex-end;
        justify-content: center;
        overflow: hidden;
    }

    .mbiv-modal-carousel {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: flex-end;
        justify-content: center;
        overflow: hidden;
    }

    .mbiv-side-card {
        display: none !important;
    }

    .mbiv-modal-card {
        width: min(100%, calc((100dvh - 14px) * 9 / 16));
        max-width: 373px;
        flex: 0 0 min(100%, calc((100dvh - 14px) * 9 / 16));
        height: auto;
        aspect-ratio: 9 / 16;
        max-height: none;
        min-height: 0;
        border-radius: 0;
        overflow: hidden;
        background: transparent;
        box-shadow: none;
    }

    .mbiv-video-wrap {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        overflow: hidden;
        background: transparent;
    }

    .mbiv-video-iframe,
    .mbiv-video-element {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .mbiv-close {
        top: 10px;
        right: 10px;
        width: 30px;
        height: 30px;
        background: rgba(0, 0, 0, .42);
        font-size: 22px;
    }

    /* Hide popup navigation arrows on mobile — Figma uses a single
       focused video rather than the desktop 3-card carousel. */
    .mbiv-modal-arrow {
        display: none !important;
    }

    /* Product area: first card inset left; last card insets right when scrolled. */
    .mbiv-modal-products {
        left: 0;
        right: 0;
        bottom: 108px;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0 0 1px 16px;
    }

    .mbiv-modal-products::after {
        flex-basis: 16px;
        width: 16px;
        min-width: 16px;
    }


    .mbiv-product-top {
        gap: 8px;
        min-height: 64px;
    }

    .mbiv-product-image {
        width: 72px;
        height: 72px;
        border-radius: 7px;
    }




    .mbiv-add-cart {
        height: 36px;
        margin-top: 8px;
        border-radius: 40px;
        font-size: 12px;
    }

    /* Bottom title/author block */
    .mbiv-modal-meta {
        left: 15px;
        right: 15px;
        bottom: 20px;
    }
}

/* Small phones: keep the Figma proportions but fit the viewport. */
@media (max-width:380px) {
    .mbiv-video-card {
        flex-basis: calc(100vw - 30px);
        width: calc(100vw - 30px);
    }

    .mbiv-card-media {
        width: 100%;
        height: auto;
        aspect-ratio: 9 / 16;
    }

    .mbiv-modal-card {
        width: calc(100vw - 20px);
        max-width: calc(100vw - 20px);
        flex-basis: calc(100vw - 20px);
        min-height: 0;
        height: auto;
        aspect-ratio: 9 / 16;
    }

}


/* =========================================================
   v1.7.2 — MODAL PLAYER / PROGRESS / FIXED ACTIONS
========================================================= */

.mbiv-modal-card {
    position: relative;
}

.mbiv-modal-topbar {
    position: absolute;
    z-index: 31;
    top: 12px;
    left: 18px;
    right: 18px;
    pointer-events: none;
}

.mbiv-progress-track {
    width: 100%;
    height: 4px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, .34);
}

.mbiv-progress-fill {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: #fff;
    transform: scaleX(0);
    transform-origin: left center;
    will-change: transform;
}

.mbiv-modal-controls {
    position: absolute;
    top: 24px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
}

.mbiv-mute {
    pointer-events: auto;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.mbiv-mute svg {
    display: block;

    @media (min-width: 786px) {
        width: 32px;
        height: 32px;
    }
}

/* Keep the close control independent of the player iframe. */
.mbiv-close {
    top: 12px !important;
    right: 12px !important;
    width: 40px !important;
    height: 40px !important;
    z-index: 35 !important;
    font-size: 27px !important;
    line-height: 40px !important;
}

/* Product cards use a stable vertical layout so Add to Cart never drifts. */
.mbiv-product {
    display: flex;
    flex-direction: column;
}

.mbiv-product-top {
    flex: 1 1 auto;
}

.mbiv-add-cart {
    flex: 0 0 auto;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

/* Desktop navigation stays locked to the viewport, rather than moving
   with the product-card horizontal scroll. */
@media (min-width: 901px) {

    .mbiv-modal-prev,
    .mbiv-modal-next {
        position: fixed !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        margin: 0 !important;
        z-index: 40 !important;
    }

    .mbiv-modal-prev {
        left: max(24px, calc(50% - 545px)) !important;
    }

    .mbiv-modal-next {
        left: min(calc(100vw - 72px), calc(50% + 505px)) !important;
        right: auto !important;
    }
}

@media (max-width: 767px) {
    .mbiv-modal-topbar {
        top: 13px;
        left: 16px;
        right: 16px;
    }

    .mbiv-progress-track {
        height: 3px;
    }

    .mbiv-modal-controls {
        top: 23px;
        justify-content: space-between;
        display: flex;
    }

    .mbiv-mute {
        width: 44px;
        height: 44px;
    }

    .mbiv-close {
        display: none;
    }

    .mbiv-product {
        display: flex;
        flex-direction: column;
    }

    .mbiv-add-cart {
        width: 100%;
    }
}

/* =========================================================
   v1.7.5 — FIGMA MODAL RATIO: 400 x 711
   Exact design ratio used in the Figma reference.
========================================================= */
.mbiv-modal-card {
    width: 400px !important;
    height: 711px !important;
    max-width: 400px !important;
    max-height: 711px !important;
    flex: 0 0 400px !important;
    aspect-ratio: auto !important;
    background: transparent !important;
}

.mbiv-video-wrap {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: transparent !important;
    overflow: hidden !important;
}

.mbiv-video-iframe,
.mbiv-video-element {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
}

@media (max-height: 740px) and (min-width: 768px) {
    .mbiv-modal-card {
        height: calc(100vh - 30px) !important;
        width: calc((100vh - 30px) * 400 / 711) !important;
        max-width: calc((100vh - 30px) * 400 / 711) !important;
        max-height: calc(100vh - 30px) !important;
        flex-basis: calc((100vh - 30px) * 400 / 711) !important;
    }
}

@media (max-width: 767px) {
    .mbiv-modal-card {
        width: min(400px, calc(100vw - 20px)) !important;
        height: min(711px, calc((100vw - 20px) * 711 / 400)) !important;
        max-width: calc(100vw - 20px) !important;
        max-height: calc(100dvh - 14px) !important;
        flex: 0 0 auto !important;
        aspect-ratio: 400 / 711 !important;
    }
}


/* =========================================================
   v1.7.6 — FIGMA MODAL / BUTTON / SMOOTH PROGRESS
========================================================= */

/* Keep the modal itself at the exact Figma 400 × 711 frame. */
.mbiv-modal-card {
    width: 400px !important;
    height: 711px !important;
    max-width: 400px !important;
    max-height: 711px !important;
    flex: 0 0 400px !important;
    aspect-ratio: 400 / 711 !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    background: transparent !important;
}

/* Video must fill the complete Figma frame. */
.mbiv-video-wrap,
.mbiv-video-iframe,
.mbiv-video-element {
    width: 100% !important;
    height: 100% !important;
}

.mbiv-video-iframe,
.mbiv-video-element {
    display: block !important;
    border: 0 !important;
}

/* Never allow theme link/button states to recolor Add to Cart. */
.mbiv-add-cart,
.mbiv-add-cart:hover,
.mbiv-add-cart:focus,
.mbiv-add-cart:focus-visible,
.mbiv-add-cart:active,
.mbiv-add-cart:visited {
    background: #ffbc00 !important;
    background-color: #ffbc00 !important;
    color: #111 !important;
    text-decoration: none !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.mbiv-add-cart {
    cursor: pointer;
    transition: none !important;
}

/* Smooth, continuously animated progress bar. */
.mbiv-progress-fill {
    transition: none !important;
    transform: scaleX(0);
    transform-origin: left center;
    will-change: transform;
}

@media (max-width: 767px) {
    .mbiv-modal-shell {
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
    }

    .mbiv-modal-carousel {
        align-items: center !important;
        justify-content: center !important;
    }

    .mbiv-modal-card {
        width: min(400px, calc(100vw - 20px)) !important;
        height: min(711px, calc((100vw - 20px) * 711 / 400)) !important;
        max-width: calc(100vw - 20px) !important;
        max-height: calc(100dvh - 20px) !important;
        flex: 0 0 auto !important;
        aspect-ratio: 400 / 711 !important;
    }
}

@media (min-width: 768px) and (max-height: 740px) {
    .mbiv-modal-card {
        height: calc(100vh - 30px) !important;
        width: calc((100vh - 30px) * 400 / 711) !important;
        max-width: calc((100vh - 30px) * 400 / 711) !important;
        max-height: calc(100vh - 30px) !important;
        flex-basis: calc((100vh - 30px) * 400 / 711) !important;
    }
}

/* =========================================================
   v1.7.7 — MOBILE FULLSCREEN + LOCKED NAV BUTTON STATES
========================================================= */

/* Keep modal navigation buttons visually identical on hover,
   focus, keyboard focus and touch/press. */
.mbiv-modal-arrow,
.mbiv-modal-arrow:hover,
.mbiv-modal-arrow:focus,
.mbiv-modal-arrow:focus-visible,
.mbiv-modal-arrow:active {
    background: #fff !important;
    background-color: #fff !important;
    color: #222 !important;
    border: 0 !important;
    outline: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .22) !important;
    -webkit-tap-highlight-color: transparent !important;
    transform: translateY(-50%) !important;
}

.mbiv-modal-arrow::-moz-focus-inner {
    border: 0 !important;
}

@media (max-width: 767px) {

    /* Full-screen mobile modal — no 400x711 restriction. */
    .mbiv-modal-shell {
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        height: 100dvh !important;
        min-height: 100vh !important;
        padding: 0 !important;
        margin: 0 !important;
        align-items: stretch !important;
        justify-content: stretch !important;
        overflow: hidden !important;
    }

    .mbiv-modal-carousel {
        width: 100vw !important;
        height: 100dvh !important;
        min-height: 100vh !important;
        align-items: stretch !important;
        justify-content: stretch !important;
        overflow: hidden !important;
    }

    .mbiv-modal-card {
        width: 100vw !important;
        max-width: none !important;
        height: 100dvh !important;
        max-height: none !important;
        min-height: 100vh !important;
        flex: 0 0 100vw !important;
        aspect-ratio: auto !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .mbiv-video-wrap {
        width: 100% !important;
        height: 100% !important;
        inset: 0 !important;
    }

    .mbiv-video-iframe,
    .mbiv-video-element {
        width: 100% !important;
        height: 100% !important;
        min-width: 100% !important;
        min-height: 100% !important;
    }

    .mbiv-modal-topbar {
        left: 16px !important;
        right: 16px !important;
        top: max(10px, env(safe-area-inset-top)) !important;
        z-index: 50 !important;
    }

    .mbiv-modal-controls {
        top: calc(max(23px, env(safe-area-inset-top)) + 10px) !important;
        z-index: 51 !important;
    }
}


/* =========================================================
   v1.7.8 — MOBILE FULLSCREEN VIDEO + PRODUCT SWIPE
========================================================= */
@media (max-width: 767px) {

    html.mbiv-lock,
    body.mbiv-lock {
        overflow: hidden !important;
        width: 100% !important;
    }

    .mbiv-modal,
    .mbiv-modal.is-open {
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        height: 100dvh !important;
        min-height: 100dvh !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    .mbiv-backdrop {
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        height: 100dvh !important;
    }

    .mbiv-modal-shell,
    .mbiv-modal-carousel,
    .mbiv-modal-card {
        width: 100vw !important;
        height: 100dvh !important;
        min-width: 100vw !important;
        min-height: 100dvh !important;
        max-width: none !important;
        max-height: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .mbiv-modal-shell,
    .mbiv-modal-carousel {
        display: flex !important;
        align-items: stretch !important;
        justify-content: stretch !important;
        overflow: hidden !important;
    }

    .mbiv-modal-card {
        position: relative !important;
        flex: 0 0 100vw !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        overflow: hidden !important;
        background: #000 !important;
    }

    /* Cloudflare iframe cannot use object-fit like a <video> element.
       Give it a true 9:16 viewport, then crop only the excess viewport
       area so the vertical video itself remains undistorted. */
    .mbiv-video-wrap {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        overflow: hidden !important;
        background: #000 !important;
    }

    .mbiv-video-iframe {
        position: absolute !important;
        left: 50% !important;
        top: 50% !important;
        width: min(100vw, calc(100dvh * 400 / 711)) !important;
        height: min(100dvh, calc(100vw * 711 / 400)) !important;
        transform: translate(-50%, -50%) !important;
        border: 0 !important;
        display: block !important;
        background: #000 !important;
    }

    /* Native video can fill the viewport using cover without changing its
       intrinsic dimensions. */
    .mbiv-video-element {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    /* Products must be horizontally swipeable on mobile. */
    .mbiv-modal-products {
        left: 0 !important;
        right: 0 !important;
        bottom: 108px !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        width: auto !important;
        max-width: none !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-x !important;
        overscroll-behavior-x: contain !important;
        scrollbar-width: none !important;
        padding: 0 0 2px 16px !important;
        gap: 8px !important;
    }

    .mbiv-modal-products::after {
        content: '' !important;
        flex: 0 0 16px !important;
        width: 16px !important;
        min-width: 16px !important;
        height: 1px !important;
        pointer-events: none !important;
    }

    .mbiv-modal-products::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }

    .mbiv-product {
        flex: 0 0 257px !important;
        width: 257px !important;
        min-width: 257px !important;
    }

    .mbiv-modal-products.is-single {
        padding: 0 16px 2px 16px !important;
        overflow-x: hidden !important;
    }

    .mbiv-modal-products.is-single::after {
        display: none !important;
        flex: 0 0 0 !important;
        width: 0 !important;
        min-width: 0 !important;
    }

    .mbiv-modal-products.is-single .mbiv-product {
        flex: 1 1 auto !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
    }

    /* Keep all click/touch states visually identical. */
    .mbiv-modal-arrow,
    .mbiv-modal-arrow:hover,
    .mbiv-modal-arrow:focus,
    .mbiv-modal-arrow:focus-visible,
    .mbiv-modal-arrow:active,
    .mbiv-modal-arrow:visited {
        background: #fff !important;
        background-color: #fff !important;
        color: #222 !important;
        border-color: transparent !important;
        opacity: 1 !important;
        filter: none !important;
    }

    .mbiv-add-cart,
    .mbiv-add-cart:hover,
    .mbiv-add-cart:focus,
    .mbiv-add-cart:focus-visible,
    .mbiv-add-cart:active,
    .mbiv-add-cart:visited {
        background: #ffbc00 !important;
        background-color: #ffbc00 !important;
        color: #111 !important;
        opacity: 1 !important;
        filter: none !important;
    }
}