/* Mobile refinements shared by the model pages. */
@media (max-width: 620px) {
  .jm-mobile [data-jm-section="m1-3"] .op-ph,
  .swift-m [data-sw-section="m-3"] .g4,
  .wr-m [data-wr-section="m-3-3"] .g4,
  .r4-m [data-4r-section="m-mmain-3"] .g4,
  .lc-m [data-lc-section="m-main-4"] .g4 {
    column-gap: 12px !important;
    row-gap: 12px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    height: auto !important;
  }

  .r4-m [data-4r-section="m-mmain-3"] .g4 figure {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    line-height: 0;
  }

  .r4-m [data-4r-section="m-mmain-3"] .g4 figure > img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
  }

  .r4-m [data-4r-section="m-mmain-3"] .g4 figure > figcaption {
    left: 0;
    right: 0;
    top: 0;
    max-height: 78%;
    overflow: hidden;
    line-height: 1.4;
    padding: 12px 12px 24px;
    background: linear-gradient(180deg, rgba(14,14,15,.86) 0%, rgba(14,14,15,.44) 68%, rgba(14,14,15,0) 100%) !important;
  }

  /* Keep the Wrangler review photo, gradient and text clipped to the image on mobile. */
  .wr-m [data-wr-section="m-3-3"] .g4 figure {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    line-height: 0;
  }

  .wr-m [data-wr-section="m-3-3"] .g4 figure > img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
  }

  .wr-m [data-wr-section="m-3-3"] .g4 figure > figcaption {
    left: 0;
    right: 0;
    top: 0;
    box-sizing: border-box;
    max-height: 100%;
    overflow: hidden;
    padding: 10px 10px 18px;
    font-size: clamp(11px, 3vw, 13px) !important;
    line-height: 1.3;
    background: linear-gradient(180deg, rgba(14,14,15,.86) 0%, rgba(14,14,15,.5) 68%, rgba(14,14,15,0) 100%) !important;
  }

  .jm-mobile-extra {
    padding: 56px 0;
    background: #f2f1ec;
    color: #0e0e0f;
  }

  .jm-mobile-extra h2 {
    margin: 0 0 18px;
    font-size: clamp(28px, 8vw, 36px);
    line-height: 1.04;
    overflow-wrap: anywhere;
  }

  .jm-mobile-eyebrow {
    margin: 0 0 12px;
    color: #c8102e;
    font-size: 11px;
  }

  .jm-mobile-lead,
  .jm-mobile-extra > .wrap > p:not(.jm-mobile-eyebrow) {
    margin: 0 0 22px;
    color: #55555a;
    font-size: 15px;
    line-height: 1.65;
  }

  .jm-mobile-upgrade-grid { display: grid; gap: 14px; }
  .jm-mobile-upgrade-grid article {
    padding: 22px 18px;
    background: #fff;
    border: 1px solid #dad9d4;
  }
  .jm-mobile-upgrade-grid h3,
  .jm-mobile-process h3 {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: 1.15;
  }
  .jm-mobile-upgrade-grid article > p { margin: 0 0 12px; color: #55555a; font-size: 13px; line-height: 1.5; }
  .jm-mobile-upgrade-grid ul,
  .jm-mobile-finance ul { margin: 0; padding-left: 20px; color: #55555a; font-size: 14px; line-height: 1.55; }
  .jm-mobile-upgrade-grid li + li,
  .jm-mobile-finance li + li { margin-top: 7px; }
  .jm-mobile-catalog { width: 100%; margin-top: 18px; }

  .jm-mobile-realizations { padding-top: 0; }
  .jm-mobile-realizations h2 { margin-bottom: 8px; }
  .jm-mobile-realization-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 0 12px;
  }
  .jm-mobile-realization-grid img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
  }
  .jm-mobile-link-row { display: flex; justify-content: flex-end; margin-top: 18px; }
  .jm-mobile-link-row a,
  .jm-mobile-finance-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    color: #c8102e;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .04em;
    text-decoration: none;
    text-transform: uppercase;
  }

  .jm-mobile-process { background: #fff; }
  .jm-mobile-process ol { list-style: none; counter-reset: mobile-step; margin: 0; padding: 0; border-top: 1px solid #dad9d4; }
  .jm-mobile-process ol li { counter-increment: mobile-step; padding: 22px 0; border-bottom: 1px solid #dad9d4; }
  .jm-mobile-process ol li::before { content: "0" counter(mobile-step); display: block; margin-bottom: 10px; color: #c8102e; font: 700 13px "IBM Plex Mono", monospace; }
  .jm-mobile-process ol p { margin: 0; color: #55555a; font-size: 14px; line-height: 1.65; }
  .jm-mobile-costs { margin-top: 22px; padding: 20px; border-left: 4px solid #c8102e; background: #f2f1ec; }
  .jm-mobile-costs strong { color: #c8102e; font-size: 14px; }
  .jm-mobile-costs p { margin: 9px 0 0; font-size: 14px; line-height: 1.6; }

  .jm-mobile-finance { background: #1f355f; color: #fff; }
  .jm-mobile-finance .jm-mobile-eyebrow { color: rgba(255,255,255,.65); }
  .jm-mobile-finance .jm-mobile-lead,
  .jm-mobile-finance ul { color: rgba(255,255,255,.92) !important; }
  .jm-mobile-finance-link { margin-top: 18px; color: #fff !important; }
}
