/* Model pages: a consistent, readable phone layout. */
@media (max-width: 767px) {
  html:has(.model-subnav) { scroll-padding-top: 136px; }
  .inner-page #main .model-subnav {
    top: 64px;
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 56px;
    padding: 4px 20px;
    background: #fff;
    border-bottom: 1px solid #e4e6e8;
    box-shadow: 0 3px 12px #11111106;
  }
  .model-subnav strong {
    flex: none;
    margin: 0;
    font-size: 16px;
    line-height: 1.3;
    white-space: nowrap;
  }
  .model-subnav > div {
    flex: 1;
    min-width: 0;
    gap: 20px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    font-size: 15px;
    font-weight: 600;
    scrollbar-width: none;
  }
  .model-subnav a {
    display: inline-flex;
    align-items: center;
    flex: none;
    min-height: 44px;
    white-space: nowrap;
  }

  /* Flowing content keeps EU5's image, copy and controls independent. */
  .product-intro:not(.x55-intro) {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    height: auto;
    padding: 32px 0 28px;
  }
  .product-intro:not(.x55-intro) .product-intro-copy { display: contents; }
  .product-intro:not(.x55-intro) .product-intro-copy > p {
    order: 0;
    margin: 0 20px 8px;
    text-align: right;
    direction: rtl;
    font-size: 17px;
    line-height: 1.45;
  }
  .product-intro:not(.x55-intro) .product-intro-copy > h1 {
    order: 1;
    margin: 0 20px 12px;
    text-align: right;
    font-size: clamp(60px, 18vw, 76px);
    line-height: 1;
    font-weight: 700;
  }
  .product-intro:not(.x55-intro) .product-intro-copy > h1 + p {
    order: 2;
    margin-bottom: 0;
    color: #565b60;
    font-size: 18px;
  }
  .product-intro:not(.x55-intro) .product-intro-car {
    order: 3;
    position: relative;
    inset: auto;
    align-self: center;
    width: 116%;
    max-width: none;
    height: auto;
    margin: -48px 0 -44px;
    transform: none;
  }
  .product-intro:not(.x55-intro) .intro-colors {
    order: 4;
    align-self: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 20px 16px;
  }
  .product-intro:not(.x55-intro) .intro-swatch {
    position: relative;
    width: 44px;
    height: 44px;
    flex: none;
    background: transparent;
    box-shadow: none;
    border: 0;
    outline: none;
  }
  .product-intro:not(.x55-intro) .intro-swatch::before {
    content: "";
    position: absolute;
    inset: 7px;
    border: 1px solid #00000020;
    border-radius: 50%;
    background: var(--swatch);
  }
  .product-intro:not(.x55-intro) .intro-swatch.active::before {
    box-shadow: 0 0 0 3px #fff, 0 0 0 4px #4c5358;
  }
  .product-intro:not(.x55-intro) .intro-swatch:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 1px;
  }
  .product-intro:not(.x55-intro) .intro-actions {
    order: 5;
    padding: 0 20px;
    justify-content: center;
  }
  .product-intro:not(.x55-intro) .intro-actions .outline-button {
    width: 100%;
    max-width: 360px;
    min-height: 48px;
    margin: 0;
    padding: 12px 16px;
    border-radius: 28px;
    font-size: 16px;
    line-height: 1.4;
  }

  .x55-intro.product-intro {
    min-height: calc(100svh - 144px);
    padding: 28px 0 30px;
  }
  .x55-intro .x55-heading { padding: 0 20px; }
  .x55-intro .x55-eyebrow { font-size: 20px; margin-bottom: 10px; }
  .x55-intro h1 { font-size: clamp(64px, 18vw, 76px); margin-bottom: 14px; }
  .x55-intro .x55-tagline { font-size: 17px; }
  .x55-intro .product-status { font-size: 14px; margin-top: 6px; }
  .x55-intro .x55-controls { padding: 0 20px; }
  .x55-intro .intro-colors { margin-bottom: 16px; }
  .x55-intro .intro-actions { gap: 10px; }
  .x55-intro .intro-actions .outline-button {
    min-height: 48px;
    padding: 10px 8px;
    font-size: 15px;
    line-height: 1.35;
    white-space: normal;
  }

  /* A wide photograph keeps the complete X7 visible on a narrow screen. */
  .inner-page #main .product-hero.product-x7 {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    background: #171e25;
  }
  .product-x7 .product-hero-copy {
    order: 0;
    position: relative;
    inset: auto;
    max-width: none;
    width: 100%;
    padding: 30px 20px 28px;
    text-align: right;
  }
  .product-x7 .product-hero-copy h1 { font-size: clamp(64px, 18vw, 76px); }
  .product-x7 .product-hero-copy p { font-size: 19px; line-height: 1.5; margin: 14px 0 20px; }
  .product-x7 .product-hero-copy .pill {
    min-height: 48px;
    padding: 11px 22px;
    font-size: 16px;
    line-height: 1.4;
  }
  .product-x7 .product-hero-img {
    order: 1;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: 62% center;
  }

  .model-overview.content-width { padding: 44px 0; }
  .model-overview .eyebrow { font-size: 14px; margin-bottom: 12px; }
  .model-overview h2 { font-size: clamp(27px, 7vw, 32px); line-height: 1.3; font-weight: 600; }
  .model-overview > p { font-size: 17px; line-height: 1.8; margin-top: 20px; color: #565b60; }
  .product-metrics { gap: 28px 20px; padding: 36px 20px; }
  .product-metrics > div { min-width: 0; max-width: none; }
  .product-metrics strong { font-size: clamp(32px, 9vw, 38px); line-height: 1.15; }
  .product-metrics span { font-size: 14px; line-height: 1.5; margin-top: 8px; color: #61666a; }
  .product-video img { aspect-ratio: 16 / 10; }
  .product-video .play-disc { width: 56px; height: 56px; font-size: 21px; }
  .product-video .video-caption {
    bottom: 16px;
    padding: 0 20px;
    font-size: 16px;
    line-height: 1.4;
    text-shadow: 0 1px 8px #000;
  }

  .product-photo:not(.photo-localized) > img {
    min-height: 0;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
  }
  .product-photo .photo-copy,
  .product-photo.photo-localized .photo-copy,
  .product-photo.photo-localized.right .photo-copy,
  .product-photo.photo-localized.top .photo-copy {
    padding: 26px 20px 30px;
  }
  .product-photo .photo-copy h2,
  .product-photo.photo-localized .photo-copy h2,
  .product-photo.photo-localized.top .photo-copy h2 {
    font-size: clamp(25px, 6.6vw, 29px);
    line-height: 1.3;
    font-weight: 600;
    margin-bottom: 12px;
  }
  .product-photo .photo-copy p,
  .product-photo.photo-localized .photo-copy p {
    font-size: 17px;
    line-height: 1.75;
    color: #e3e5e6;
  }
  .product-photo.photo-localized:not(.bottom-left):not(.top) { padding-top: 60%; }
  .product-gallery { grid-template-columns: 1fr; gap: 4px; }
  .product-gallery img,
  .product-gallery button:last-child:nth-child(odd) img,
  .product-gallery:has(button:nth-child(4)) button:last-child:nth-child(odd) img {
    aspect-ratio: 16 / 10;
  }
  .product-gallery button > span { width: 38px; height: 38px; padding: 9px; }

  .spec-section.content-width { padding: 44px 0 48px; }
  .spec-section .spec-heading { align-items: flex-start; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
  .spec-section .spec-heading h2 { font-size: 30px; line-height: 1.3; font-weight: 600; }
  .spec-section .eyebrow { font-size: 14px; }
  .spec-section .spec-heading .outline-button { min-height: 44px; font-size: 14px; padding: 10px 16px; }
  .spec-section .spec-note { font-size: 14px; line-height: 1.75; color: #61666a; margin-bottom: 24px; }
  .spec-section .spec-group summary { gap: 18px; min-height: 60px; font-size: 18px; line-height: 1.4; padding: 18px 0; }
  .spec-section .spec-group summary::after { flex: none; }
  .spec-section .spec-group table { table-layout: fixed; }
  .spec-section .spec-group th,
  .spec-section .spec-group td { padding: 14px 10px; font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
  .spec-section .spec-group th { width: 52%; color: #262b30; font-weight: 500; }
  .spec-section .spec-group td { width: 48%; color: #555b60; }
  .spec-section .source-link { font-size: 14px; line-height: 1.6; }
  .spec-section .source-link a { display: inline-block; padding: 10px 0; }
  .spec-section + .cta-band { padding: 38px 20px 40px; }
  .spec-section + .cta-band h2 { font-size: 28px; line-height: 1.3; font-weight: 600; }
  .spec-section + .cta-band p { font-size: 17px; line-height: 1.6; color: #61666a; }
  .spec-section + .cta-band > a { min-height: 48px; width: 100%; max-width: 360px; margin-top: 24px; font-size: 16px; }
}

@media (max-width: 359px) {
  .inner-page #main .model-subnav { padding-inline: 16px; gap: 12px; }
  .model-subnav strong { font-size: 15px; }
  .model-subnav > div { gap: 18px; }
  .x55-intro .intro-colors,
  .product-intro:not(.x55-intro) .intro-colors { gap: 2px; }
  .x55-intro .intro-actions .outline-button { font-size: 14px; }
  .spec-section .spec-group th,
  .spec-section .spec-group td { padding-inline: 8px; }
}
