/*
 * Purpose-built styling for public WEL inventory detail pages.
 *
 * This stylesheet is imported before the shared inventory stylesheet, so the
 * single-listing rules intentionally use body-scoped selectors and !important
 * where required to stay authoritative over older shared layout rules.
 */

/* Remove generic WordPress/theme title and date chrome from inventory singles. */
body.single-wel_inventory article.type-wel_inventory > header,
body.single-wel_inventory article.wel_inventory > header,
body.single-wel_inventory article:has(.wel-inventory-detail) > header,
body.single-wel_inventory article.type-wel_inventory > footer,
body.single-wel_inventory article.wel_inventory > footer,
body.single-wel_inventory .entry-title,
body.single-wel_inventory .entry-meta,
body.single-wel_inventory .post-meta,
body.single-wel_inventory .post-date,
body.single-wel_inventory .posted-on,
body.single-wel_inventory time.entry-date,
body.single-wel_inventory article.type-wel_inventory > h1,
body.single-wel_inventory article.wel_inventory > h1,
body.single-wel_inventory article.type-wel_inventory > time,
body.single-wel_inventory article.wel_inventory > time,
body.single-wel_inventory main h1:not(.wel-inventory-detail__title),
body.single-wel_inventory main > time,
body.single-wel_inventory main .post_info,
body.single-wel_inventory main .post-info,
body.single-wel_inventory main .published,
body.single-wel_inventory main .entry-date,
body.single-wel_inventory main .date,
body.single-wel_inventory main .page-title,
body.single-wel_inventory main .post-title,
body.single-wel_inventory main .post-date-wrap,
body.single-wel_inventory main .post-meta-date {
    display: none !important;
}

/* Let the repository-owned detail surface use the page body while the theme
 * continues to own the global header and footer. */
body.single-wel_inventory #primary,
body.single-wel_inventory #main {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body.single-wel_inventory article:has(.wel-inventory-detail),
body.single-wel_inventory article:has(.wel-inventory-detail) > .entry-content,
body.single-wel_inventory article:has(.wel-inventory-detail) > .post-content,
body.single-wel_inventory article:has(.wel-inventory-detail) > .content {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.single-wel_inventory .wel-inventory-detail {
    --wel-navy: #0c2d59;
    --wel-blue: #223a82;
    --wel-sky: #46a9f5;
    --wel-ink: #4b4d56;
    --wel-muted: #4b4d56;
    --wel-line: #dfe5eb;
    --wel-soft: #f6f8fa;
    --wel-white: #fff;

    box-sizing: border-box;
    width: min(960px, calc(100% - 64px)) !important;
    max-width: 960px !important;
    margin: 0 auto !important;
    padding: clamp(2.25rem, 3.5vw, 3.5rem) 0 clamp(4.5rem, 8vw, 7rem) !important;
    color: var(--wel-ink);
    font-family: "Titillium Web", Arial, sans-serif;
}

body.single-wel_inventory .wel-inventory-detail *,
body.single-wel_inventory .wel-inventory-detail *::before,
body.single-wel_inventory .wel-inventory-detail *::after {
    box-sizing: border-box;
}

/* Desktop hero: keep the image clearly primary without letting it dominate the
 * viewport. The tighter shell is deliberate founder feedback at 100% zoom. */
body.single-wel_inventory .wel-inventory-detail--with-gallery {
    display: grid !important;
    grid-template-columns: minmax(0, 1.04fr) minmax(17rem, 0.96fr) !important;
    grid-template-rows: auto auto auto auto !important;
    column-gap: clamp(2rem, 4vw, 3.25rem) !important;
    row-gap: 0.8rem !important;
    align-items: start !important;
}

body.single-wel_inventory .wel-inventory-detail--with-gallery > .wel-inventory-detail__header {
    grid-column: 2 !important;
    grid-row: 1 !important;
    min-width: 0;
    margin: 0 !important;
    align-self: end;
}

body.single-wel_inventory .wel-inventory-detail--with-gallery > .wel-inventory-detail__gallery {
    grid-column: 1 !important;
    grid-row: 1 / span 3 !important;
    min-width: 0;
    margin: 0 !important;
}

/* Flatten the information wrapper so description/actions can stay beside the
 * image while the resource section can span beneath the whole hero. */
body.single-wel_inventory .wel-inventory-detail--with-gallery > .wel-inventory-detail__info {
    display: contents !important;
}

body.single-wel_inventory .wel-inventory-detail--with-gallery .wel-inventory-detail__info > .wel-inventory-detail__description {
    grid-column: 2 !important;
    grid-row: 2 !important;
    min-width: 0;
}

body.single-wel_inventory .wel-inventory-detail--with-gallery .wel-inventory-detail__info > .wel-inventory-detail__actions {
    grid-column: 2 !important;
    grid-row: 3 !important;
    min-width: 0;
}

body.single-wel_inventory .wel-inventory-detail--with-gallery .wel-inventory-detail__info > .wel-inventory-detail__resources {
    grid-column: 1 / -1 !important;
    grid-row: 4 !important;
    width: 100% !important;
    max-width: none !important;
}

body.single-wel_inventory .wel-inventory-detail__header {
    margin: 0 !important;
}

/* The customer specifically requested removing the category kicker. */
body.single-wel_inventory .wel-inventory-detail__kicker {
    display: none !important;
}

body.single-wel_inventory .wel-inventory-detail__title {
    display: block !important;
    max-width: 12ch !important;
    margin: 0 !important;
    color: var(--wel-navy) !important;
    font-family: "Russo One", Impact, sans-serif !important;
    font-size: clamp(2.15rem, 3.25vw, 3.25rem) !important;
    font-weight: 400 !important;
    line-height: 1.02 !important;
    letter-spacing: -0.03em !important;
}

/* Gallery: primary image plus a restrained vertically scrollable thumbnail rail. */
body.single-wel_inventory .wel-inventory-detail__gallery {
    display: grid !important;
    grid-template-columns: clamp(88px, 7vw, 108px) minmax(0, 1fr) !important;
    grid-template-rows: auto !important;
    gap: clamp(0.85rem, 1.5vw, 1.1rem) !important;
    align-items: start !important;
    container-type: inline-size;
}

body.single-wel_inventory .wel-inventory-detail__stage {
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    aspect-ratio: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
}

body.single-wel_inventory .wel-inventory-detail__main-image {
    display: block !important;
    flex: 0 1 auto !important;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 520px !important;
    /*
     * Keep the full photograph visible, but cap oversized source images so a
     * single listing photo does not dominate the page. The WEL corner cut now
     * follows the photograph itself instead of a larger empty 4:3 canvas.
     */
    object-fit: contain !important;
    object-position: center !important;
    margin: auto !important;
    background: transparent !important;
    clip-path: polygon(
        14px 0,
        100% 0,
        100% calc(100% - 14px),
        calc(100% - 14px) 100%,
        0 100%,
        0 14px
    ) !important;
}

body.single-wel_inventory .wel-inventory-detail__thumbs {
    grid-column: 1 !important;
    grid-row: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.7rem !important;
    width: 100% !important;
    max-height: clamp(280px, 28vw, 450px) !important;
    margin: 0 !important;
    padding: 0 0.35rem 0 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-block: contain;
    scrollbar-width: thin;
    /*
     * Reserve scrollbar space even when the rail only barely overflows.
     * Without a stable gutter, Windows/Chrome can repeatedly add/remove the
     * scrollbar at certain zoom levels. That changes the thumbnail width,
     * which changes each 4:3 thumbnail's height and can create a rapid
     * overflow/reflow loop.
     */
    scrollbar-gutter: stable;
}

body.single-wel_inventory .wel-inventory-detail__thumb {
    position: relative;
    flex: 0 0 auto;
    width: 100% !important;
    aspect-ratio: 4 / 3;
    margin: 0 !important;
    padding: 4px !important;
    overflow: hidden;
    border: 2px solid var(--wel-line) !important;
    border-radius: 0 !important;
    background: var(--wel-white) !important;
    box-shadow: 0 2px 8px rgba(12, 45, 89, 0.06);
    cursor: pointer;
}

body.single-wel_inventory .wel-inventory-detail__thumb::after {
    content: "";
    position: absolute;
    inset: 4px;
    box-shadow: inset 0 0 0 1px rgba(12, 45, 89, 0.08);
    pointer-events: none;
}

body.single-wel_inventory .wel-inventory-detail__thumb:hover,
body.single-wel_inventory .wel-inventory-detail__thumb:focus-visible {
    border-color: var(--wel-sky) !important;
}

body.single-wel_inventory .wel-inventory-detail__thumb.is-selected,
body.single-wel_inventory .wel-inventory-detail__thumb[aria-pressed="true"] {
    border-color: var(--wel-navy) !important;
}

body.single-wel_inventory .wel-inventory-detail__thumb:focus-visible,
body.single-wel_inventory .wel-inventory-detail a:focus-visible {
    outline: 3px solid var(--wel-sky) !important;
    outline-offset: 3px !important;
}

body.single-wel_inventory .wel-inventory-detail__thumb-image {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
}

/* Right-side listing information. */
body.single-wel_inventory .wel-inventory-detail__description {
    max-width: none !important;
    margin: 0 !important;
    padding-top: 1.1rem !important;
    border-top: 1px solid var(--wel-line) !important;
    color: var(--wel-ink) !important;
    font-size: 1rem !important;
    line-height: 1.64 !important;
}

body.single-wel_inventory .wel-inventory-detail__description > :first-child {
    margin-top: 0 !important;
}

body.single-wel_inventory .wel-inventory-detail__description > :last-child {
    margin-bottom: 0 !important;
}

body.single-wel_inventory .wel-inventory-detail__actions {
    margin: 0 !important;
    padding-top: 0.1rem !important;
}

body.single-wel_inventory .wel-inventory-detail__cta {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: fit-content !important;
    max-width: 100% !important;
    min-width: 15rem !important;
    min-height: 46px !important;
    margin: 0 !important;
    padding: 0.85rem 1.35rem !important;
    border: 0 !important;
    clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%) !important;
    background: var(--wel-blue) !important;
    color: var(--wel-white) !important;
    font-family: "Russo One", Impact, sans-serif !important;
    font-size: 0.86rem !important;
    font-weight: 400 !important;
    line-height: 1.1 !important;
    text-align: center !important;
    text-decoration: none !important;
}

body.single-wel_inventory .wel-inventory-detail__cta::after {
    content: " →";
    white-space: pre;
}

body.single-wel_inventory .wel-inventory-detail__cta:hover,
body.single-wel_inventory .wel-inventory-detail__cta:focus-visible {
    background: var(--wel-sky) !important;
    color: var(--wel-navy) !important;
}

/* Supporting resources deliberately sit below the hero so buyers encounter the
 * equipment first, then financing/warranty/other supporting information while
 * continuing down the page. */
body.single-wel_inventory .wel-inventory-detail__resources {
    margin-top: clamp(3rem, 5vw, 4.5rem) !important;
    padding-top: clamp(2rem, 3vw, 2.75rem) !important;
    border-top: 2px solid var(--wel-navy) !important;
}

body.single-wel_inventory .wel-inventory-detail__resources h2 {
    margin: 0 0 1rem !important;
    color: var(--wel-navy) !important;
    font-family: "Russo One", Impact, sans-serif !important;
    font-size: clamp(1.5rem, 2.2vw, 2rem) !important;
    font-weight: 400 !important;
    line-height: 1.1 !important;
}

body.single-wel_inventory .wel-inventory-detail__resource-links {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.85rem !important;
}

body.single-wel_inventory .wel-inventory-detail__resource-link {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 1rem !important;
    min-height: 98px !important;
    padding: 1rem 1.1rem !important;
    border: 1px solid var(--wel-line) !important;
    background: var(--wel-white) !important;
    color: var(--wel-blue) !important;
    line-height: 1.25 !important;
    text-decoration: none !important;
}

body.single-wel_inventory .wel-inventory-detail__resource-brand {
    display: flex !important;
    align-items: center !important;
    gap: 0.9rem !important;
    min-width: 0 !important;
}

body.single-wel_inventory .wel-inventory-detail__resource-logo-wrap {
    display: grid !important;
    place-items: center !important;
    flex: 0 0 96px !important;
    min-height: 54px !important;
    padding: 0.45rem !important;
    border: 1px solid var(--wel-line) !important;
    background: #fff !important;
}

body.single-wel_inventory .wel-inventory-detail__resource-logo {
    display: block !important;
    width: 100% !important;
    max-width: 88px !important;
    height: 40px !important;
    object-fit: contain !important;
}

body.single-wel_inventory .wel-inventory-detail__resource-copy {
    display: grid !important;
    gap: 0.3rem !important;
    min-width: 0 !important;
}

body.single-wel_inventory .wel-inventory-detail__resource-copy strong {
    color: inherit !important;
    font-size: 1rem !important;
    font-weight: 800 !important;
}

body.single-wel_inventory .wel-inventory-detail__resource-copy > span:not(.screen-reader-text) {
    color: var(--wel-muted) !important;
    font-size: 0.84rem !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
}

body.single-wel_inventory .wel-inventory-detail__resource-arrow {
    flex: 0 0 auto !important;
    font-size: 1.2rem !important;
}

body.single-wel_inventory .wel-inventory-detail__resource-link:hover,
body.single-wel_inventory .wel-inventory-detail__resource-link:focus-visible {
    border-color: var(--wel-navy) !important;
    background: var(--wel-navy) !important;
    color: var(--wel-white) !important;
}

body.single-wel_inventory .wel-inventory-detail__resource-link:hover .wel-inventory-detail__resource-copy > span:not(.screen-reader-text),
body.single-wel_inventory .wel-inventory-detail__resource-link:focus-visible .wel-inventory-detail__resource-copy > span:not(.screen-reader-text) {
    color: rgba(255, 255, 255, 0.82) !important;
}

/* One-image/no-gallery listings degrade to a straightforward single-column
 * detail without empty thumbnail controls. */
body.single-wel_inventory .wel-inventory-detail:not(.wel-inventory-detail--with-gallery) .wel-inventory-detail__info {
    position: static !important;
    max-width: 680px !important;
    margin-top: 2rem !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

@media (max-width: 56rem) {
    body.single-wel_inventory .wel-inventory-detail {
        width: min(100% - 32px, 740px) !important;
        padding-top: 2rem !important;
    }

    body.single-wel_inventory .wel-inventory-detail--with-gallery {
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: auto auto auto auto auto !important;
        gap: 1.4rem !important;
    }

    body.single-wel_inventory .wel-inventory-detail--with-gallery > .wel-inventory-detail__header {
        grid-column: 1 !important;
        grid-row: 1 !important;
    }

    body.single-wel_inventory .wel-inventory-detail--with-gallery > .wel-inventory-detail__gallery {
        grid-column: 1 !important;
        grid-row: 2 !important;
    }

    body.single-wel_inventory .wel-inventory-detail--with-gallery .wel-inventory-detail__info > .wel-inventory-detail__description {
        grid-column: 1 !important;
        grid-row: 3 !important;
    }

    body.single-wel_inventory .wel-inventory-detail--with-gallery .wel-inventory-detail__info > .wel-inventory-detail__actions {
        grid-column: 1 !important;
        grid-row: 4 !important;
    }

    body.single-wel_inventory .wel-inventory-detail--with-gallery .wel-inventory-detail__info > .wel-inventory-detail__resources {
        grid-column: 1 !important;
        grid-row: 5 !important;
    }

    body.single-wel_inventory .wel-inventory-detail__title {
        max-width: none !important;
    }

    body.single-wel_inventory .wel-inventory-detail__gallery {
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: auto auto !important;
        gap: 0.8rem !important;
    }

    body.single-wel_inventory .wel-inventory-detail__stage {
        grid-column: 1 !important;
        grid-row: 1 !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
    }

    body.single-wel_inventory .wel-inventory-detail__thumbs {
        grid-column: 1 !important;
        grid-row: 2 !important;
        flex-direction: row !important;
        width: 100% !important;
        max-height: none !important;
        padding: 0.1rem 0 0.35rem !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        overscroll-behavior-inline: contain;
        scrollbar-gutter: auto;
    }

    body.single-wel_inventory .wel-inventory-detail__thumb {
        flex: 0 0 84px !important;
        width: 84px !important;
    }

    body.single-wel_inventory .wel-inventory-detail__resources {
        margin-top: 2.5rem !important;
    }
}

@media (max-width: 40rem) {
    body.single-wel_inventory .wel-inventory-detail {
        width: calc(100% - 28px) !important;
        padding-top: 1.5rem !important;
        padding-bottom: 3.5rem !important;
    }

    body.single-wel_inventory .wel-inventory-detail__title {
        font-size: clamp(2rem, 10vw, 2.9rem) !important;
    }

    body.single-wel_inventory .wel-inventory-detail__description {
        padding-top: 1rem !important;
    }

    body.single-wel_inventory .wel-inventory-detail__cta {
        width: 100% !important;
        min-width: 0 !important;
    }

    body.single-wel_inventory .wel-inventory-detail__thumb {
        flex-basis: 76px !important;
        width: 76px !important;
    }

    body.single-wel_inventory .wel-inventory-detail__resource-links {
        grid-template-columns: 1fr !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.single-wel_inventory .wel-inventory-detail__main-image {
        scroll-behavior: auto;
    }
}

/* Let the shared buyer-resource promotion replace the legacy link-card treatment. */
body.single-wel_inventory .wel-inventory-detail__resources.wel-buyer-resources {
    max-width: none !important;
    margin-top: clamp(3rem, 5vw, 4.5rem) !important;
    padding-top: 0 !important;
    border-top: 0 !important;
}

body.single-wel_inventory .wel-inventory-detail__resources .wel-buyer-resource h2 {
    margin: 0 !important;
    color: var(--wel-white) !important;
    font-size: clamp(1.8rem, 3vw, 2.7rem) !important;
    line-height: 1.08 !important;
}

body.single-wel_inventory .wel-inventory-detail__resources .wel-buyer-resource__eyebrow {
    margin: 0 0 0.65rem !important;
    color: #b9dfff !important;
}

body.single-wel_inventory .wel-inventory-detail__resources .wel-buyer-resource__description {
    margin: 0.85rem 0 1.35rem !important;
    color: #e5edf6 !important;
}

body.single-wel_inventory .wel-inventory-detail__resources .wel-buyer-resource__contact {
    max-width: none !important;
    margin: 0.85rem 0 1.35rem !important;
    padding-top: 0.85rem !important;
    border-top: 1px solid rgba(255, 255, 255, 0.28) !important;
    color: #e5edf6 !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    line-height: 1.55 !important;
}

/* Detail-page visual trial: bring the listing surface closer to WEL's homepage
 * composition while keeping the change isolated and easy to revert. */
body.single-wel_inventory .wel-inventory-detail__header::before {
    content: "";
    display: block;
    width: 72px;
    height: 5px;
    margin: 0 0 1rem;
    background: #8f9398;
}

body.single-wel_inventory .wel-buyer-resources--compact {
    display: block !important;
    margin-top: clamp(4rem, 7vw, 6rem) !important;
    padding-top: clamp(2rem, 3vw, 2.75rem) !important;
    border-top: 1px solid var(--wel-line) !important;
}

body.single-wel_inventory .wel-buyer-resources--compact .wel-buyer-resources__intro {
    max-width: 720px;
    margin: 0 0 1.6rem;
}

body.single-wel_inventory .wel-buyer-resources--compact .wel-buyer-resources__intro h2 {
    margin: 0 !important;
    color: var(--wel-navy) !important;
    font-family: "Russo One", Impact, sans-serif !important;
    font-size: clamp(1.9rem, 2.8vw, 2.65rem) !important;
    font-weight: 400 !important;
    line-height: 1.08 !important;
    letter-spacing: -0.02em !important;
}

body.single-wel_inventory .wel-buyer-resources--compact .wel-buyer-resources__lead {
    max-width: 660px;
    margin: 0.7rem 0 0 !important;
    color: var(--wel-muted) !important;
    font-size: 1rem !important;
    line-height: 1.6 !important;
}

body.single-wel_inventory .wel-buyer-resources--compact .wel-buyer-resources__grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: clamp(1rem, 2vw, 1.35rem) !important;
}

body.single-wel_inventory .wel-buyer-resources--compact .wel-buyer-resource,
body.single-wel_inventory .wel-buyer-resources--compact .wel-buyer-resource:nth-child(even) {
    position: relative;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 118px !important;
    gap: clamp(1.25rem, 2.2vw, 1.8rem) !important;
    align-items: center !important;
    min-width: 0;
    min-height: 310px;
    padding: clamp(1.8rem, 3vw, 2.35rem) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-top: 4px solid var(--wel-sky) !important;
    background: var(--wel-navy) !important;
    color: var(--wel-white) !important;
    box-shadow: 0 16px 34px rgba(12, 45, 89, 0.13);
}

body.single-wel_inventory .wel-buyer-resources--compact .wel-buyer-resource:nth-child(even) {
    background: var(--wel-blue) !important;
}

body.single-wel_inventory .wel-buyer-resources--compact .wel-buyer-resource__copy {
    max-width: none !important;
}

body.single-wel_inventory .wel-buyer-resources--compact .wel-buyer-resource__eyebrow {
    margin-bottom: 0.55rem !important;
    color: #b9dfff !important;
}

body.single-wel_inventory .wel-buyer-resources--compact .wel-buyer-resource h2 {
    margin: 0 !important;
    color: var(--wel-white) !important;
    font-size: clamp(1.55rem, 2.2vw, 2.15rem) !important;
    line-height: 1.08 !important;
}

body.single-wel_inventory .wel-buyer-resources--compact .wel-buyer-resource__description {
    margin: 0.8rem 0 1.3rem !important;
    color: #e5edf6 !important;
    font-size: 0.95rem !important;
    line-height: 1.58 !important;
}

body.single-wel_inventory .wel-buyer-resources--compact .wel-buyer-resource__cta {
    min-height: 44px !important;
    padding: 0.8rem 1.2rem !important;
    background: var(--wel-white) !important;
    color: var(--wel-blue) !important;
}

body.single-wel_inventory .wel-buyer-resources--compact .wel-buyer-resource__media {
    width: 118px !important;
    min-height: 88px !important;
    padding: 0.8rem !important;
    border: 1px solid rgba(12, 45, 89, 0.12) !important;
    background: var(--wel-white) !important;
}

body.single-wel_inventory .wel-buyer-resources--compact .wel-buyer-resource:first-child .wel-buyer-resource__media {
    border-color: rgba(255, 255, 255, 0.18) !important;
    background: #08264e !important;
}

body.single-wel_inventory .wel-buyer-resources--compact .wel-buyer-resource__logo {
    width: auto !important;
    max-width: 100% !important;
    max-height: 68px !important;
    height: auto !important;
    object-fit: contain !important;
}

@media (min-width: 56.0625rem) {
    body.single-wel_inventory .wel-inventory-detail {
        width: min(1180px, calc(100% - 72px)) !important;
        max-width: 1180px !important;
        padding-top: clamp(2.75rem, 4vw, 4.25rem) !important;
    }

    body.single-wel_inventory .wel-inventory-detail--with-gallery {
        grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.85fr) !important;
        column-gap: clamp(2.75rem, 5vw, 5rem) !important;
        row-gap: 1rem !important;
    }

    body.single-wel_inventory .wel-inventory-detail__title {
        max-width: 11ch !important;
        font-size: clamp(2.5rem, 3.6vw, 3.7rem) !important;
    }

    body.single-wel_inventory .wel-inventory-detail__gallery {
        grid-template-columns: clamp(96px, 7.5vw, 112px) minmax(0, 1fr) !important;
        gap: 1.1rem !important;
    }

    body.single-wel_inventory .wel-inventory-detail__stage {
        overflow: visible !important;
        background: transparent !important;
        clip-path: none !important;
    }

    body.single-wel_inventory .wel-inventory-detail__main-image {
        max-width: 100% !important;
        max-height: 520px !important;
    }

    body.single-wel_inventory .wel-inventory-detail__thumbs {
        /*
         * Keep the vertical rail no taller than the 4:3 stage beside it.
         * The second gallery track is the container width minus the thumbnail
         * track and gap, so 75% of that width is the stage height.
         */
        max-height: calc((100cqw - clamp(96px, 7.5vw, 112px) - 1.1rem) * 0.75) !important;
    }

    body.single-wel_inventory .wel-inventory-detail__cta {
        width: 100% !important;
        min-width: 0 !important;
    }
}

@media (max-width: 760px) {
    body.single-wel_inventory .wel-buyer-resources--compact .wel-buyer-resources__grid {
        grid-template-columns: 1fr !important;
    }

    body.single-wel_inventory .wel-buyer-resources--compact .wel-buyer-resource,
    body.single-wel_inventory .wel-buyer-resources--compact .wel-buyer-resource:nth-child(even) {
        grid-template-columns: 1fr !important;
        min-height: 0;
    }

    body.single-wel_inventory .wel-buyer-resources--compact .wel-buyer-resource__media {
        grid-row: 1 !important;
        width: 118px !important;
    }

    body.single-wel_inventory .wel-buyer-resources--compact .wel-buyer-resource__cta {
        width: 100% !important;
    }
}

