/* Opt-in layout for generated showroom sections. Legacy content is untouched. */
.showroom-content:has(> .showroom-source-frame) { width: 100%; max-width: none; padding: 0; }
.showroom-source-frame { display: block; width: 100%; min-height: 900px; border: 0; background: #fff; }
.showroom-content[data-showroom-scope] { display: block; width: 100%; max-width: none; min-width: 0; padding: 0; }

/* Source CSS supplies geometry. The host site's brand tokens supply styling. */
.showroom-content[data-showroom-scope][data-showroom-theme="1"] {
    color: inherit;
    background: transparent;
    font-family: var(--text-font-family, "Outfit", Arial, sans-serif);
    line-height: 1.5;
}

/* Selected editorial rows own their spacing even when source spacer blocks are omitted. */
.showroom-content[data-showroom-scope] [data-showroom-editorial-row="1"] {
    margin-bottom: clamp(2rem, 4vw, 4rem) !important;
}
/* Keep the model description after removing manufacturer powertrain navigation. */
.showroom-content [data-showroom-layout="model-introduction"] .wl-modelindex-wrapper__container {
    display: block !important;
}
.showroom-content [data-showroom-layout="model-introduction"] .wl-modelindex-wrapper__container > div {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) !important;
    gap: clamp(1.5rem, 3vw, 3rem) !important;
    width: 100% !important;
}
.showroom-content [data-showroom-layout="model-introduction"] :is(.wl-modelindex-wrapper__modal, .wl-modelindex-wrapper__price) {
    min-width: 0;
    padding: 0 !important;
}
.showroom-content [data-showroom-layout="model-introduction"] .wl-modelindex-wrapper__modal h1 {
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.15;
    overflow-wrap: anywhere;
}
.showroom-content [data-showroom-layout="model-introduction"] .wl-engin-info :is(h1, h2, h3, p) {
    font-size: 1.125rem;
    line-height: 1.4;
    margin-top: .75rem;
}
@media (max-width: 700px) {
    .showroom-content [data-showroom-layout="model-introduction"] .wl-modelindex-wrapper__container > div {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}
.showroom-content[data-showroom-scope][data-showroom-theme="1"] *:not(:where([data-showroom-action], [data-showroom-action] *)),
.showroom-content[data-showroom-scope][data-showroom-theme="1"] *:not(:where([data-showroom-action], [data-showroom-action] *))::before,
.showroom-content[data-showroom-scope][data-showroom-theme="1"] *:not(:where([data-showroom-action], [data-showroom-action] *))::after { box-sizing: border-box; }
.showroom-content[data-showroom-scope][data-showroom-theme="1"] :is(h1, h2, h3, h4, h5, h6):not(:where([data-showroom-media-overlay] *)) {
    color: var(--primary, #000);
    font-family: var(--headings-font-family, Arial, sans-serif);
}
.showroom-content[data-showroom-scope][data-showroom-theme="1"] :is(p, li, span, strong, em) {
    font-family: inherit;
}
.showroom-content[data-showroom-scope][data-showroom-theme="1"] a[href]:not([data-showroom-action]):not(:where([data-showroom-media-overlay] *)) {
    color: var(--secondary, #4dabc8);
}
/* Photo overlays retain source contrast; headings inherit the source text surface. */
.showroom-content:where([data-showroom-scope][data-showroom-theme="1"]) :where([data-showroom-media-overlay="1"]) :is(h1, h2, h3, h4, h5, h6, p, li, span, strong, em, a):not(:where([data-showroom-action], [data-showroom-action] *)) {
    color: inherit;
}
.showroom-content [data-showroom-media-overlay="1"] .hme-performance__features {
    list-style: none;
    padding-inline: 0;
}
/* Actions use .prettybutton / .prettybutton2 from the public site, including its responsive rules. */
.showroom-content [data-showroom-action="1"] { pointer-events: auto; }
.showroom-content[data-showroom-scope][data-showroom-theme="1"] img,
.showroom-content[data-showroom-scope][data-showroom-theme="1"] video {
    max-width: 100%;
}
.showroom-section {
    --showroom-section-space: clamp(2.5rem, 5vw, 4.5rem);
    display: flow-root;
    margin-block: 0 var(--showroom-section-space);
    min-width: 0;
    width: 100%;
}
.showroom-section.showroom-spacing-compact { --showroom-section-space: clamp(1.5rem, 3vw, 2.5rem); }
.showroom-section.showroom-spacing-spacious { --showroom-section-space: clamp(3.5rem, 7vw, 6rem); }
.showroom-section.showroom-alignment-center { text-align: center; }
.showroom-section.showroom-alignment-start { text-align: start; }
.showroom-section.showroom-width-reading,
.showroom-section.showroom-width-wide,
.showroom-section.showroom-width-full { width: 100%; max-width: 100%; box-sizing: border-box; }
.showroom-section.showroom-alignment-center { margin-inline: auto; }
.showroom-section > :first-child,
.showroom-section .grid-element > :first-child { margin-top: 0; }
.showroom-section > :last-child,
.showroom-section .grid-element > :last-child { margin-bottom: 0; }
.showroom-section > p + p,
.showroom-section .grid-element > p + p { margin-top: 1em; }
.showroom-section > :is(h2, h3, h4, h5, h6) { margin-bottom: 1rem; }
.showroom-section.showroom-treatment-introduction > p { font-size: 1.125em; line-height: 1.6; }
.showroom-section.showroom-treatment-introduction > h2 { font-size: clamp(2rem, 3.5vw, 3rem); line-height: 1.2; }
.showroom-section > .content-grid { gap: clamp(1.25rem, 2.5vw, 2rem); margin-bottom: 0; }
.showroom-section > .content-grid > .grid-element { min-width: 0; padding: 0; }
.showroom-section.showroom-grid-alignment-top > .content-grid > .grid-element.text { justify-content: flex-start; }
.showroom-section.showroom-grid-alignment-middle > .content-grid > .grid-element.text { justify-content: center; }
.showroom-section img, .showroom-section video { max-width: 100%; height: auto; }
.showroom-section .grid-element > img { display: block; width: 100%; margin-bottom: 1rem; }
.showroom-section > .content-grid.columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.showroom-section > .content-grid.columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.showroom-section > .content-grid.columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) {
    .showroom-section > .content-grid.columns-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .showroom-section > .content-grid { grid-template-columns: minmax(0, 1fr) !important; }
}

/* Restore semantic list markers removed by legacy resets, within new sections only. */
.showroom-section ul.showroom-list { list-style: disc outside; padding-inline-start: 1.5em; margin-block: 1em; }
.showroom-section ol.showroom-list { list-style: decimal outside; padding-inline-start: 1.5em; margin-block: 1em; }
.showroom-section .showroom-list > li { display: list-item; padding: 0; margin-block: .35em; }

/* Stacked media retains the source section's full-width vertical composition. */
.showroom-section > .showroom-stacked-media { width: 100%; margin-block: clamp(1.5rem, 3vw, 3rem); }
.showroom-section > .showroom-stacked-media img,
.showroom-section > .showroom-stacked-media video { display: block; width: 100%; height: auto; }
.showroom-content .showroom-media-placeholder {
    display: block;
    padding: 1.5rem;
    border: 1px dashed #8d949b;
    background: #f5f6f7;
    color: #454b52;
    text-align: center;
}

/* Captured full-screen stories must size to the available column, not the viewport. */
.showroom-content [data-showroom-layout="cinematic"],
.showroom-content [data-showroom-layout="cinematic"] :is(.wl-teaserfullscreen-wrapper, .wl-teaserfullscreen-wrapper--container, .wl-teaserfullscreen-wrapper__container-media, picture, img) {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
}
.showroom-content [data-showroom-layout="cinematic"] .wl-teaserfullscreen-wrapper {
    width: 100% !important;
    left: auto !important;
    transform: none !important;
}
.showroom-content [data-showroom-layout="cinematic"] .wl-teaserfullscreen-wrapper--container {
    gap: 0 !important;
}
.showroom-content [data-showroom-layout="cinematic"] :is(picture, img) {
    display: block;
    width: 100% !important;
    object-fit: contain !important;
    transform: none !important;
}
.showroom-content [data-showroom-layout="cinematic"] .wl-teaserfullscreen-wrapper--container__content {
    padding: clamp(1rem, 4vw, 4rem) !important;
    align-self: start;
    min-width: 0;
}
.showroom-content [data-showroom-layout="cinematic"] .wl-headline {
    font-size: clamp(1.5rem, 3.5vw, 3.5rem) !important;
    line-height: 1.15 !important;
    overflow-wrap: anywhere;
}
/* Overlay copy participates in sizing, so longer translations cannot be clipped. */
.showroom-content .gridwithbackground__wrapper[data-showroom-layout="text-surface"] {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
}
.showroom-content .gridwithbackground__wrapper[data-showroom-layout="text-surface"] > :is(.gridwithbackground_media-container, .gridwithbackground__content--overlay) {
    grid-area: 1 / 1;
    position: relative !important;
    inset: auto !important;
    height: auto !important;
    max-height: none !important;
    min-width: 0;
    width: 100% !important;
}
.showroom-content .gridwithbackground__wrapper[data-showroom-layout="text-surface"] > .gridwithbackground__content--overlay {
    overflow: visible !important;
    padding-block: 1.5rem;
    transform: none !important;
    margin: 0 !important;
}
.showroom-content .gridwithbackground__wrapper[data-showroom-layout="text-surface"] > .gridwithbackground_media-container {
    position: absolute !important;
    inset: 0 !important;
    height: 100% !important;
}
.showroom-content .gridwithbackground__wrapper[data-showroom-layout="text-surface"] > .gridwithbackground_media-container :is(div, picture, img) {
    height: 100% !important;
    width: 100%;
    object-fit: cover;
}
.showroom-content [data-showroom-tooltip-note="1"] {
    font-size: .85em;
    white-space: normal;
}

.showroom-content .gridwithbackground__wrapper[data-showroom-layout="text-surface"] > .gridwithbackground__content--overlay > .aem-Grid {
    margin-inline: 0 !important;
    width: 100% !important;
}
