/* Model landing pages (AGSAMAG-399) — DENZA B8 / DENZA Z9GT, after
   denza.com/my/product-detail/<model>. Rendered as a "Models" child category's
   CMS landing block, so the category page chrome is flattened to full width. */
body:has(.dz-ml) .page-main,
body.dz-model-landing-page .page-main {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
}
body:has(.dz-ml) .breadcrumbs,
body:has(.dz-ml) .page-title-wrapper,
body:has(.dz-ml) .sidebar,
body.dz-model-landing-page .breadcrumbs,
body.dz-model-landing-page .page-title-wrapper,
body.dz-model-landing-page .sidebar { display: none; }
/* as a category landing block the page sits above the (empty) product columns */
body.catalog-category-view:has(.dz-ml) .columns { display: none; }
body:has(.dz-ml) .columns .column.main {
    width: 100%;
    float: none;
    margin: 0;
    padding: 0;
}
body:has(.dz-ml) .category-view,
body:has(.dz-ml) .category-cms,
body.dz-model-landing-page .category-view,
body.dz-model-landing-page .category-cms {
    max-width: none;
    margin: 0;
    padding: 0;
}
body:has(.dz-ml) [data-content-type='row'][data-appearance='contained'] { max-width: none; }
body:has(.dz-ml) [data-content-type='row'] > [data-element='inner'] { margin: 0; padding: 0; }
body:has(.dz-ml) .ammenu-menu-wrapper { margin-bottom: 0; }

.dz-ml {
    --dz-ml-ink: #111;
    --dz-ml-muted: #5c5c5c;
    --dz-ml-gutter: 80px;
    width: 100%;
    color: var(--dz-ml-ink);
    overflow-x: clip; /* not hidden: that would stop the pinned (sticky) features section */
}
/* denza.com's font is HYQiHeiX1 (commercial); Noto Sans is the closest open match.
   The theme sets URW Form Expand on every element, some with !important. */
.dz-ml, .dz-ml * { font-family: 'Noto Sans', Arial, 'Helvetica Neue', Helvetica, sans-serif !important; }
.dz-ml *, .dz-ml *::before, .dz-ml *::after { box-sizing: border-box; }
.dz-ml h1, .dz-ml h2, .dz-ml h3, .dz-ml p { margin: 0; }

/* ---------- media + placeholders ---------- */
.dz-ml img { display: block; max-width: 100%; }
.dz-ml .dz-ml__cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.dz-ml .dz-ml__ph {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 200px;
    background: linear-gradient(135deg, #3a4048 0%, #1d2126 100%);
    color: rgba(255, 255, 255, .45);
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}
.dz-ml .dz-ml__ph.dz-ml__cover { min-height: 0; }
.dz-ml .dz-ml__ph span { padding: 12px 16px; }

/* ---------- buttons ---------- */
.dz-ml__buttons { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 40px; }
/* denza.com .dz-btn: 40px pill, 16px text; "default" white, "primary" blue */
.dz-ml .dz-ml__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 24px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 400;
    white-space: nowrap;
    text-decoration: none !important;
    transition: background-color .2s, color .2s;
}
.dz-ml .dz-ml__btn--default { background: #fff; color: #000 !important; }
.dz-ml .dz-ml__btn--default:hover { background: #d5deee; color: #033391 !important; }
.dz-ml .dz-ml__btn--primary { background: #4c75c4; color: #fff !important; }
.dz-ml .dz-ml__btn--primary:hover { background: #7091d0; color: #fff !important; }

/* ---------- full-bleed sections (hero / video / slides / closing) ---------- */
.dz-ml__hero,
.dz-ml__video,
.dz-ml__slides,
.dz-ml__closing {
    position: relative;
    height: min(100vh, 900px);
    min-height: 560px;
    background: #1d2126;
    color: #fff;
    overflow: hidden;
}
.dz-ml__hero::after,
.dz-ml__slides::after,
.dz-ml__closing::after,
.dz-ml__tile::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(to top, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, 0) 45%);
}
.dz-ml__hero::after {
    background: linear-gradient(to right, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, 0) 60%);
}

.dz-ml__hero-text {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: var(--dz-ml-gutter);
    max-width: min(900px, calc(100% - 2 * var(--dz-ml-gutter)));
    transform: translateY(-50%);
}
.dz-ml .dz-ml__hero-text .dz-ml__hero-title {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 1.5px;
    color: #fff !important; /* theme forces h1 navy */
}
.dz-ml--b8 .dz-ml__hero-text .dz-ml__hero-title { font-size: 38px; }
.dz-ml__hero-logo { width: clamp(200px, 16.25vw, 312px); height: auto; margin-bottom: 16px; filter: brightness(0) invert(1); }
.dz-ml .dz-ml__hero-text .dz-ml__hero-sub {
    margin-top: 16px;
    font-size: clamp(16px, 1.25vw, 24px);
    line-height: 1.5;
    letter-spacing: 1.5px;
    color: #fff;
}

/* video: plays muted in place; the frame insets as the section scrolls away */
.dz-ml__video { --dz-ml-inset: 0px; background: #fff; }
.dz-ml__video-frame {
    position: absolute;
    inset: 0 var(--dz-ml-inset) var(--dz-ml-inset);
    overflow: hidden;
    background: #1d2126;
}
.dz-ml__video-frame video { width: 100%; height: 100%; }
.dz-ml .dz-ml__watch {
    position: absolute;
    z-index: 1;
    right: var(--dz-ml-gutter);
    bottom: 56px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 0;
    border: 0;
    background: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}
.dz-ml__play {
    position: relative;
    width: 44px;
    height: 44px;
    border: 1.5px solid #fff;
    border-radius: 50%;
}
.dz-ml__play::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 54%;
    border-style: solid;
    border-width: 7px 0 7px 12px;
    border-color: transparent transparent transparent #fff;
    transform: translate(-50%, -50%);
}
.dz-ml .dz-ml__watch:hover .dz-ml__play { background: rgba(255, 255, 255, .15); }

.dz-ml__watch[aria-pressed="true"] .dz-ml__play::after {
    /* sound on: pause-style bars */
    left: 50%;
    width: 10px;
    height: 14px;
    border-width: 0 3px;
    border-color: #fff;
}

/* ---------- exterior (colour switcher + specs) ---------- */
.dz-ml__exterior {
    display: grid;
    grid-template-columns: minmax(280px, 420px) 1fr;
    grid-template-areas:
        "text  stage"
        ".     swatches"
        "foot  foot";
    gap: 24px 48px;
    padding: 80px var(--dz-ml-gutter) 64px;
    background: linear-gradient(180deg, #f4f5f7 0%, #fff 100%);
}
/* backdrop image (denza.com: ColorOption/b8bg-pc3.jpg) */
.dz-ml__exterior.has-bg { background-size: cover; background-position: center; }
.dz-ml__exterior-text { grid-area: text; align-self: center; }
.dz-ml .dz-ml__exterior-title {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: 400;
    color: var(--dz-ml-ink);
}
.dz-ml__series { font-weight: 700; letter-spacing: 2px; }
.dz-ml__series-logo { width: clamp(180px, 13.3vw, 256px); height: auto; }
.dz-ml__exterior-label { padding-left: 28px; border-left: 1px solid #293241; font-size: clamp(28px, 2vw, 38px); line-height: 1.1; }
.dz-ml__exterior-title:has(.dz-ml__series-logo) { gap: 28px; }
.dz-ml .dz-ml__exterior-text p { font-size: clamp(15px, 1vw, 19px); line-height: 1.5; color: #293241; }

.dz-ml__colour-stage { grid-area: stage; position: relative; display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.dz-ml__colour-car {
    grid-area: 1 / 1;
    opacity: 0;
    transition: opacity .35s ease;
    pointer-events: none;
}
.dz-ml__colour-car.is-active { opacity: 1; pointer-events: auto; }
.dz-ml__colour-car img { width: 100%; height: auto; }
.dz-ml .dz-ml__colour-car .dz-ml__ph { aspect-ratio: 16 / 7; min-height: 0; }

.dz-ml__swatches {
    grid-area: swatches;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px 44px;
    padding-bottom: 32px; /* room for the selected colour's name */
}
.dz-ml .dz-ml__swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 0;
    border: 0;
    background: none;
    color: var(--dz-ml-muted);
    font-size: 12px;
    cursor: pointer;
}
.dz-ml__swatch-dot {
    width: 32px;
    height: 32px;
    border-radius: 16px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1);
    transition: width .25s ease;
}
.dz-ml__swatch-name {
    position: absolute; /* the name sits under the dot without widening the row */
    top: 100%;
    left: 50%;
    margin-top: 10px;
    transform: translateX(-50%);
    visibility: hidden;
    white-space: nowrap;
}
.dz-ml .dz-ml__swatch.is-active { color: #293241; }
.dz-ml__swatch.is-active .dz-ml__swatch-dot { width: 64px; } /* denza.com: selected swatch is a pill */
.dz-ml__swatch.is-active .dz-ml__swatch-name { visibility: visible; }

.dz-ml__exterior-foot {
    grid-area: foot;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding-top: 32px;
}

/* specs strip (exterior + closing) */
.dz-ml .dz-ml__specs {
    display: flex;
    flex-wrap: wrap;
    gap: 24px 64px;
    margin: 0;
}
.dz-ml__spec { display: flex; flex-direction: column-reverse; gap: 6px; }
.dz-ml .dz-ml__spec dt { margin: 0; font-size: 14px; font-weight: 400; color: var(--dz-ml-muted); }
.dz-ml .dz-ml__spec dd { margin: 0; }
/* figures are set in the theme's URW Form Expand, as on denza.com (overrides the page's Noto Sans) */
.dz-ml .dz-ml__spec dd strong,
.dz-ml .dz-ml__spec dd span { font-family: 'URWFormExpand', 'Noto Sans', Arial, sans-serif !important; }
.dz-ml__spec strong { font-size: 40px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.dz-ml__spec span { font-size: 16px; }
/* exterior strip: label on top, denza.com sizes */
.dz-ml__exterior .dz-ml__spec { flex-direction: column; }
.dz-ml .dz-ml__exterior .dz-ml__spec dt { font-size: clamp(13px, .73vw, 14px); color: #293241; }
.dz-ml__exterior .dz-ml__spec dd { color: #293241; }
.dz-ml__exterior .dz-ml__spec strong { font-size: clamp(32px, 2.6vw, 50px); }
.dz-ml__exterior .dz-ml__spec span { margin-left: 12px; font-size: clamp(13px, .78vw, 15px); font-weight: 700; }
.dz-ml__exterior .dz-ml__specs { flex: 1; justify-content: space-around; }
@media (min-width: 768px) {
    .dz-ml__exterior-foot .dz-ml__btn { order: -1; } /* denza.com: button left of the figures */
}

/* ---------- single full-bleed slide (several = pinned, see features) ---------- */
.dz-ml__caption {
    position: absolute;
    z-index: 1;
    left: 7.1vw;
    right: var(--dz-ml-gutter);
    bottom: 5.3vh;
    max-width: 900px;
}
/* same type as the pinned slides (denza.com) */
.dz-ml .dz-ml__caption h2 { font-size: clamp(22px, 1.875vw, 36px); font-weight: 300 !important; line-height: 1.65; color: #fff; }
.dz-ml .dz-ml__caption p { margin-top: 6px; font-size: clamp(14px, .94vw, 18px); font-weight: 400 !important; line-height: 1.55; color: rgba(255, 255, 255, .9); }
.dz-ml .dz-ml__caption .dz-ml__note,
.dz-ml .dz-ml__fslide-text .dz-ml__note { margin-top: 12px; font-size: clamp(12px, .73vw, 14px); color: rgba(255, 255, 255, .75) !important; }


/* features: pinned while scrolling — one 70vh scroll step per slide, slides cross-fade */
.dz-ml__features {
    position: relative;
    height: calc(100vh + (var(--dz-ml-steps) - 1) * 70vh);
    background: #1d2126;
}
.dz-ml__features-pin {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
}
.dz-ml__fslide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .6s ease;
}
.dz-ml__fslide.is-active { opacity: 1; }
.dz-ml__fslide::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(to top, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, 0) 40%);
}
.dz-ml__features-bg { position: absolute; inset: 0; }
/* denza.com sizes (scale with the viewport): title 1.875vw light, text .94vw, 7.1vw from the left */
.dz-ml__fslide-text {
    position: absolute;
    z-index: 1;
    left: 7.1vw;
    right: var(--dz-ml-gutter);
    bottom: 5.3vh;
    max-width: 900px;
}
.dz-ml .dz-ml__fslide-text h3 {
    font-size: clamp(22px, 1.875vw, 36px);
    font-weight: 300 !important;
    line-height: 1.65;
    color: #fff !important;
}
.dz-ml .dz-ml__fslide-text p {
    margin-top: 6px;
    font-size: clamp(14px, .94vw, 18px);
    font-weight: 400 !important;
    line-height: 1.55;
    color: #fff !important;
}

/* ---------- split tiles ---------- */
.dz-ml__split { display: grid; grid-template-columns: 1fr 1fr; }
.dz-ml__tile {
    position: relative;
    aspect-ratio: 960 / 494; /* denza.com: close-up crops, two per row */
    background: #1d2126;
    color: #fff;
    overflow: hidden;
}
/* dark veil + centred title; on hover both fade out to show the photo clean (denza.com) */
.dz-ml__tile::after { background: rgba(0, 0, 0, .5); transition: opacity .4s ease; }
.dz-ml__tile-text {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 28%;
    right: 8%;
    transform: translateY(-50%);
    transition: opacity .4s ease;
}
.dz-ml .dz-ml__tile-text h3 { font-size: clamp(20px, 1.875vw, 36px); font-weight: 300 !important; line-height: 1.65; color: #fff; }
.dz-ml .dz-ml__tile-text p { margin-top: 8px; font-size: clamp(13px, .94vw, 18px); line-height: 1.55; color: rgba(255, 255, 255, .9); }
@media (hover: hover) {
    .dz-ml__tile:hover::after,
    .dz-ml__tile:hover .dz-ml__tile-text { opacity: 0; }
}

/* ---------- closing specs ---------- */
.dz-ml__closing-text {
    position: absolute;
    z-index: 1;
    left: var(--dz-ml-gutter);
    right: var(--dz-ml-gutter);
    bottom: 80px;
    max-width: 960px;
}
.dz-ml .dz-ml__closing-text h2 { margin-bottom: 32px; font-size: 40px; font-weight: 700; color: #fff; }
.dz-ml .dz-ml__closing-text h3 { margin-top: 40px; font-size: 22px; font-weight: 600; color: #fff; }
.dz-ml .dz-ml__closing-text p { margin-top: 12px; max-width: 760px; font-size: 15px; line-height: 1.7; color: rgba(255, 255, 255, .9); }
.dz-ml__closing .dz-ml__spec dt { color: rgba(255, 255, 255, .8); }

/* ---------- tablet / mobile ---------- */
@media (max-width: 1024px) {
    .dz-ml { --dz-ml-gutter: 40px; }
    .dz-ml__exterior { grid-template-columns: minmax(0, 1fr); grid-template-areas: "text" "stage" "swatches" "foot"; }
}

@media (max-width: 767px) {
    .dz-ml { --dz-ml-gutter: 20px; }

    .dz-ml__hero,
    .dz-ml__video,
    .dz-ml__slides,
    .dz-ml__closing { height: 85vh; min-height: 520px; }
    .dz-ml__video { height: 56vw; min-height: 240px; }

    .dz-ml__hero::after { background: linear-gradient(to top, rgba(0, 0, 0, .65) 0%, rgba(0, 0, 0, 0) 60%); }
    .dz-ml__hero-text { top: auto; bottom: 48px; right: var(--dz-ml-gutter); transform: none; }
    .dz-ml .dz-ml__hero-text .dz-ml__hero-title,
    .dz-ml--b8 .dz-ml__hero-text .dz-ml__hero-title { font-size: 28px; }
    .dz-ml .dz-ml__hero-text .dz-ml__hero-sub { font-size: 15px; }
    .dz-ml__hero-logo { width: 180px; margin-bottom: 12px; }
    .dz-ml__buttons { margin-top: 28px; }
    .dz-ml__buttons .dz-ml__btn { flex: 1 1 100%; }

    .dz-ml .dz-ml__watch { bottom: 20px; font-size: 14px; }
    .dz-ml__play { width: 36px; height: 36px; }

    .dz-ml__exterior { padding: 48px var(--dz-ml-gutter) 40px; gap: 24px; }
    .dz-ml .dz-ml__exterior-title { font-size: 22px; }
    .dz-ml__swatches { gap: 16px 20px; }
    .dz-ml .dz-ml__swatch { font-size: 12px; }
    .dz-ml__exterior-foot { flex-direction: column; align-items: stretch; }
    .dz-ml .dz-ml__specs { gap: 20px 28px; }
    .dz-ml__spec strong,
    .dz-ml__exterior .dz-ml__spec strong { font-size: 28px; }
    .dz-ml__series-logo { width: 150px; }
    .dz-ml__exterior-title:has(.dz-ml__series-logo) { gap: 16px; }
    .dz-ml__exterior-label { padding-left: 16px; font-size: 22px; }
    .dz-ml__spec span { font-size: 13px; }
    .dz-ml .dz-ml__spec dt { font-size: 12px; }

    .dz-ml__caption { left: var(--dz-ml-gutter); bottom: 48px; }
    .dz-ml .dz-ml__caption p br { display: none; }

    .dz-ml__fslide-text { left: var(--dz-ml-gutter); bottom: 48px; }
    .dz-ml .dz-ml__fslide-text p { margin-top: 12px; }
    .dz-ml .dz-ml__fslide-text p br { display: none; }

    .dz-ml__split { grid-template-columns: 1fr; }
    .dz-ml__tile { aspect-ratio: 960 / 494; }
    .dz-ml__tile-text { left: 20px; right: 20px; }

    .dz-ml__closing { height: auto; min-height: 85vh; }
    .dz-ml__closing-text { bottom: 40px; }
    .dz-ml .dz-ml__closing-text h2 { font-size: 28px; margin-bottom: 24px; }
    .dz-ml .dz-ml__closing-text h3 { margin-top: 28px; font-size: 18px; }
    .dz-ml .dz-ml__closing-text p { font-size: 14px; }
}

/* The theme forces .column.main p / headings to dark text with !important —
   keep text on the dark, full-bleed sections light. */
.dz-ml .dz-ml__hero-text .dz-ml__hero-sub,
.dz-ml .dz-ml__caption h2,
.dz-ml .dz-ml__tile-text h3,
.dz-ml .dz-ml__closing-text h2,
.dz-ml .dz-ml__closing-text h3 { color: #fff !important; }
.dz-ml .dz-ml__caption p,
.dz-ml .dz-ml__tile-text p,
.dz-ml .dz-ml__closing-text p { color: rgba(255, 255, 255, .9) !important; }
.dz-ml .dz-ml__caption .dz-ml__note { color: rgba(255, 255, 255, .75) !important; }
@media (max-width: 767px) {
    .dz-ml .dz-ml__hero-text .dz-ml__hero-sub br { display: none; }
}
