/* Responsive layout corrections, 15 October 2026. Loaded after the theme. */
html body :is(.wrapper, section) :is(h1, h2, h3) {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

/* Shared service carousels also occur outside the main wrapper. */
html body :is(.swiper-service, .swiper-our-addresses, .swiper-services) {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

/* Keep forms and mobile navigation clear; restore the chat when they close. */
body:has(.modal[aria-hidden="false"], dialog[open], .nbr-header-mobile-menu--open) #jcont {
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Keep the product summary, tabs and content as separate visual groups. */
html body.nbr-vehicle-product .wrapper .page__product-page {
    padding-top: 40px;
}
html body.nbr-vehicle-product .wrapper .product__box {
    gap: 24px;
}
html body.nbr-vehicle-product .wrapper .product__box-btns > div > .btn-main {
    flex: 1 1 0;
    min-width: 0;
}
html body.nbr-vehicle-product .wrapper .product__box-btns > .btn-dark-blue {
    min-height: 52px;
    padding: 14px 16px;
    line-height: 1.35;
    white-space: normal;
}

/* The artwork contains lettering: retain its intrinsic ratio, without cropping. */
html body .wrapper .product-page__cards {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    align-self: flex-start;
    flex: 0 0 296px;
    width: 296px;
    max-width: 100%;
    gap: 16px;
}
html body .wrapper .product-page__card {
    display: block;
    min-width: 0;
}
html body .wrapper :is(.product-page__card, .company__img, .preview-img__inner, .about-series__img) picture {
    display: block;
}
html body .wrapper :is(.product-page__card, .company__img, .preview-img__inner, .about-series__img) img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

@media (max-width: 1240px) {
    html body .wrapper .product-page__cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        flex: none;
        width: 100%;
        max-width: 816px;
        margin-inline: auto;
    }
}
@media (max-width: 768px) {
    html body .wrapper .nbr-header-mobile-menu {
        right: 0 !important;
        width: min(330px, calc(100vw - 48px)) !important;
        max-height: calc(100dvh - 92px) !important;
    }
}
@media (max-width: 760px) {
    html body.nbr-vehicle-product .wrapper .page__product-page {
        padding-top: 28px;
    }
    html body.nbr-vehicle-product .wrapper .product__box {
        gap: 20px;
    }
}
@media (max-width: 600px) {
    html body .wrapper .product-page__cards {
        grid-template-columns: minmax(0, 1fr);
        max-width: 400px;
        margin-inline: auto;
    }
    html body.nbr-vehicle-product .wrapper .page__product-page .product-page__tabs {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr);
        overflow: visible !important;
    }
    html body.nbr-vehicle-product .wrapper .page__product-page .product-page__tab {
        display: flex !important;
        align-items: center;
        justify-content: center;
        min-width: 0;
        min-height: 48px !important;
        padding: 12px 10px !important;
        white-space: normal !important;
        line-height: 1.3 !important;
    }
    html body .wrapper :is(.product__info, .product-page__charact-box) ul li {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) !important;
        align-items: start !important;
        gap: 8px 16px !important;
    }
    html body .wrapper :is(.product__info, .product-page__charact-box) ul li > span:first-child {
        grid-column: 1 !important;
        max-width: none !important;
    }
    html body .wrapper :is(.product__info, .product-page__charact-box) ul li > span:nth-child(2) {
        display: none !important;
    }
    html body .wrapper :is(.product__info, .product-page__charact-box) ul li > span:last-child {
        grid-column: 2 !important;
        min-width: 0 !important;
        max-width: none !important;
        text-align: right !important;
        overflow-wrap: anywhere !important;
    }

    /* Let labels wrap while the existing arrow square keeps its touch target. */
    html body :is(.wrapper, section, .modal__body) :is(.btn-main, .btn-dark-blue).nbr-nbr4-cta:has(> span:first-child:not(.nbr-link-label)),
    html body .wrapper .page__request .request__inner .request__form > .nbr-cf7-row-callback .btn-main {
        min-width: 0 !important;
        max-width: 100% !important;
        min-height: 52px;
        height: auto;
        gap: 12px !important;
        padding: 4px 4px 4px 16px !important;
        white-space: normal !important;
        text-wrap: wrap !important;
        line-height: 1.25 !important;
    }
    html body :is(.wrapper, section, .modal__body) :is(.btn-main, .btn-dark-blue).nbr-nbr4-cta:has(> span:first-child:not(.nbr-link-label)) > span:first-child:not(:last-child),
    html body .wrapper .page__request .request__inner .request__form > .nbr-cf7-row-callback .btn-main > span:first-child {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        white-space: normal !important;
        text-wrap: wrap !important;
        overflow-wrap: anywhere !important;
        line-height: 1.25 !important;
    }
    html body :is(.wrapper, section, .modal__body) :is(.btn-main, .btn-dark-blue).nbr-nbr4-cta:has(> span:first-child:not(.nbr-link-label)) > span:last-child:not(:first-child) {
        flex-shrink: 0;
    }
}
