/* ROX Motor clone — model pages (ROX 01, ROX ADAMAS). Loaded after main.css.
   Vertical rhythm follows the original: 40px / 64px block spacing (mobile / ≥960),
   32px / 48px inner padding. */

html { scroll-padding-top: 80px; }

/* ---------- Typography helpers ---------- */
.m-h3 { font-family: var(--f-display); font-size: 26px; line-height: 1.2; letter-spacing: -.2px; font-weight: var(--fw-thin); }
.m-h4 { font-family: var(--f-display); font-size: 20px; line-height: 1.2; font-weight: var(--fw-light); }
@media (min-width: 600px) { .m-h3 { font-size: 32px; letter-spacing: -.4px; } .m-h4 { font-size: 24px; } }
@media (min-width: 960px) { .m-h4 { font-size: 26px; line-height: 1.1; letter-spacing: -.2px; } }
@media (min-width: 1720px) { .m-h3 { font-size: 40px; } .m-h4 { font-size: 32px; } }

/* list with gold square bullets */
.mlist { padding-left: 32px; }
.mlist li { position: relative; }
.mlist li + li { margin-top: 16px; }
.mlist li::before { content: ""; position: absolute; left: -25px; top: 6px; width: 10px; height: 10px; border: 2px solid var(--gold); }
@media (min-width: 960px) { .mlist li + li { margin-top: 24px; } }

.mtext { color: var(--t1); }
.mtext > * + * { margin-top: 16px; }
.mtext__note { font-size: 14px; line-height: 1.4; color: var(--t2); }

.btn_white { border-color: var(--white); }
.btn_white:hover, .btn_white:active { background: var(--white); border-color: var(--white); color: var(--bg); }

/* ---------- Hero ---------- */
.mhero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; background: var(--bg); }
.mhero__media { position: absolute; inset: 0; }
.mhero__media picture, .macc__img picture, .macc__img-m picture { height: 100%; }
.mhero__media img { width: 100%; height: 100%; object-fit: cover; }
.mhero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(16, 16, 16, .35) 0, rgba(16, 16, 16, 0) 15.38%),
    linear-gradient(180deg, rgba(16, 16, 16, 0) 55%, rgba(16, 16, 16, .45) 100%);
}
.mhero__content { position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; padding-bottom: 80px; }
.mhero__wrap { max-width: 640px; }
.mhero__logo { display: block; width: auto; height: 24px; margin-bottom: 16px; }
.mhero__caption { margin-bottom: 16px; color: var(--t1); }
.mhero__text { margin-top: 16px; }
.mhero__links { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.mhero__links .btn { width: 100%; }
.mhero__wrap > * { animation: m-rise .9s var(--ease) both; }
.mhero__wrap > :nth-child(2) { animation-delay: .08s; }
.mhero__wrap > :nth-child(3) { animation-delay: .16s; }
.mhero__wrap > :nth-child(4) { animation-delay: .24s; }
@keyframes m-rise { from { opacity: 0; transform: translateY(40px); } }
@media (min-width: 600px) {
  .mhero__links { flex-direction: row; }
  .mhero__links .btn { width: auto; }
}
@media (min-width: 960px) {
  .mhero__content { padding-bottom: 64px; }
  .mhero__wrap { max-width: 50%; padding-right: 16px; }
  .mhero__logo, .mhero__caption { margin-bottom: 24px; }
  .mhero__text { margin-top: 24px; }
  .mhero__links { margin-top: 36px; }
}

/* ---------- Model sub-navigation ---------- */
.mnav { position: relative; z-index: 990; height: 64px; }
.mnav__bar { position: relative; height: 64px; background: var(--bg); box-shadow: 0 4px 8px rgba(10, 10, 10, .07); }
.mnav.is-stuck .mnav__bar { position: fixed; top: var(--mnav-top, 0px); left: 0; right: 0; transition: top .3s ease-in-out; }
.mnav__inner { position: relative; display: flex; align-items: center; height: 100%; }
.mnav__name { display: none; }
.mnav__toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; height: 100%; font-size: 14px; line-height: 1.4; text-align: left; }
.mnav__toggle .icon { transition: transform .3s var(--ease); }
.mnav.is-open .mnav__toggle .icon { transform: rotate(180deg); }
.mnav__panel {
  position: fixed;
  left: 0;
  right: 0;
  top: auto;
  max-height: calc(100vh - 128px);
  max-height: calc(100dvh - 128px);
  overflow-y: auto;
  padding: 16px var(--pad) 32px;
  background: var(--bg);
  border-top: 1px solid var(--line);
  box-shadow: 0 8px 8px -8px rgba(16, 19, 22, .2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .25s ease, transform .25s ease, visibility 0s .25s;
}
.mnav__bar .mnav__panel { position: absolute; top: 100%; }
.mnav.is-open .mnav__panel { opacity: 1; visibility: visible; transform: none; transition: opacity .25s ease, transform .25s ease; }
.mnav__list { display: flex; flex-direction: column; gap: 8px; }
.mnav__link { position: relative; display: inline-flex; align-items: center; padding: 9px 0; font-size: 14px; line-height: 1.4; color: var(--white); transition: color .2s; }
.mnav__link.is-active { color: var(--t2); }
.mnav__btns { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.mnav__btn.btn { width: 100%; min-height: 42px; padding: 14px 24px; font-size: 10px; letter-spacing: .04em; }
.mnav__more[hidden] { display: none; }
@media (min-width: 960px) {
  .mnav__name { display: block; flex: none; margin-right: 32px; font-size: 20px; line-height: 1.4; font-weight: var(--fw-light); white-space: nowrap; }
  .mnav__toggle { display: none; }
  .mnav__bar .mnav__panel {
    position: static;
    display: flex;
    align-items: center;
    gap: 60px;
    flex: 1;
    min-width: 0;
    height: 100%;
    max-height: none;
    overflow: visible;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
  }
  .mnav__list { flex: 1; flex-direction: row; align-items: stretch; gap: 0; min-width: 0; height: 100%; }
  .mnav__item { flex: none; display: flex; margin-right: 32px; }
  .mnav__item.is-hidden { display: none; }
  .mnav__link { height: 100%; padding: 0; font-size: 16px; line-height: 1.3; white-space: nowrap; }
  .mnav__link::after, .mnav__more-btn::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 6px;
    height: 2px;
    background: var(--gold);
    transform: scaleX(0);
    transition: transform .25s var(--ease);
  }
  .mnav__link:hover::after, .mnav__link.is-active::after, .mnav__more.is-active > .mnav__more-btn::after, .mnav__more-btn:hover::after { transform: scaleX(1); }
  .mnav__more { position: relative; flex: none; display: flex; }
  .mnav__more-btn { position: relative; display: flex; align-items: center; gap: 8px; height: 100%; font-size: 16px; line-height: 1.3; white-space: nowrap; }
  .mnav__more-btn .icon { transition: transform .3s var(--ease); }
  .mnav__more.is-open .mnav__more-btn .icon { transform: rotate(180deg); }
  .mnav__more-list {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 152px;
    padding: 4px 0;
    background: var(--bg);
    box-shadow: 0 16px 24px rgba(0, 0, 0, .35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .2s ease, transform .2s ease, visibility 0s .2s;
  }
  .mnav__more.is-open .mnav__more-list { opacity: 1; visibility: visible; transform: none; transition: opacity .2s ease, transform .2s ease; }
  .mnav__more-list .mnav__link { display: flex; padding: 16px 24px; }
  .mnav__more-list .mnav__link::after { display: none; }
  .mnav__more-list .mnav__link:hover { color: var(--gold); }
  .mnav__btns { flex: none; flex-direction: row; margin: 0 0 0 auto; }
  .mnav__btn.btn { width: auto; }
}

/* ---------- Header (h1 + subtitle) ---------- */
.mhead { margin: 40px 0; text-align: center; }
.mhead__inner { max-width: 864px; margin: 0 auto; }
.mhead__sub { margin-top: 24px; }
.mhead_360 { padding-top: 24px; }
.mhead_360 .mhead__sub { max-width: 820px; margin-left: auto; margin-right: auto; }
.mhead__slogan { margin-top: 40px; }
.mpage_rox-adamas .mslider + .mslider { padding-top: 0; }
@media (min-width: 960px) {
  .mhead { margin: 64px 0; }
  .mhead__sub { margin-top: 36px; }
  .mhead_360 { padding-top: 36px; }
  .mhead__slogan { max-width: 720px; margin: 64px auto 0; }
}

/* ---------- Media + accordion ---------- */
.macc { margin: 40px 0; }
.macc__grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.macc__media { display: none; }
.macc__item { border-bottom: 1px solid var(--line); }
.macc__h { margin: 0; font: inherit; }
.macc__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; width: 100%; padding: 16px 0; text-align: left; transition: color .2s; }
.macc__head:hover { color: var(--gold); }
.macc__icon { position: relative; flex: none; width: 24px; height: 24px; }
.macc__icon::before, .macc__icon::after { content: ""; position: absolute; left: 3px; right: 3px; top: 11px; height: 2px; background: currentColor; transition: transform .3s var(--ease); }
.macc__icon::after { transform: rotate(90deg); }
.macc__item.is-open .macc__icon::after { transform: rotate(0); }
.macc__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.macc__item.is-open .macc__body { grid-template-rows: 1fr; }
.macc__body-inner { min-height: 0; overflow: hidden; visibility: hidden; transition: visibility 0s .45s; }
.macc__item.is-open .macc__body-inner { visibility: visible; transition-delay: 0s; }
.macc__img-m { aspect-ratio: 16 / 9; overflow: hidden; background: var(--card); }
.macc__img-m img { width: 100%; height: 100%; object-fit: cover; }
.macc__text { padding: 16px 0; }
.macc__text .mtext__note { margin-top: 16px; font-style: italic; }
@media (min-width: 960px) {
  .macc { margin: 64px 0; }
  .macc__grid { grid-template-columns: minmax(0, 608fr) minmax(0, 656fr); column-gap: 48px; align-items: start; }
  .macc__media { display: block; position: relative; grid-column: 2; grid-row: 1; aspect-ratio: 1; overflow: hidden; background: var(--card); }
  .macc__list { grid-column: 1; grid-row: 1; }
  .macc_img-left .macc__grid { grid-template-columns: minmax(0, 656fr) minmax(0, 608fr); }
  .macc_img-left .macc__media { grid-column: 1; }
  .macc_img-left .macc__list { grid-column: 2; }
  .macc__img { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; }
  .macc__img.is-active { opacity: 1; }
  .macc__img img { width: 100%; height: 100%; object-fit: cover; }
  .macc__img-m { display: none; }
  .macc__text { padding: 12px 0 24px; }
}

/* ---------- Full-screen section header ---------- */
.mfull { position: relative; background: var(--bg); }
.mfull__head { position: relative; z-index: 1; }
.mfull__title { padding: 32px 0 40px; text-align: center; text-transform: uppercase; }
.mfull__head_empty { height: 72px; }
.mfull__media { position: relative; aspect-ratio: 390 / 220; overflow: hidden; background: var(--bg-2); }
.mfull__media img, .mfull__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mfull__content { position: relative; padding: 32px 0; }
.mfull__wrap { position: relative; }
.mfull__text { margin-top: 8px; color: var(--t1); }
@media (min-width: 960px) {
  .mfull { display: flex; flex-direction: column; height: calc(100vh - 64px); height: calc(100svh - 64px); min-height: 560px; overflow: hidden; }
  .mfull__media { position: absolute; inset: 0; aspect-ratio: auto; }
  .mfull__head::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(48, 60, 72, .4) 0, rgba(48, 60, 72, 0) 100%); }
  .mfull__head_empty::before { display: none; }
  .mfull__title { position: relative; padding: 48px 0 56px; text-align: left; }
  .mfull__head_empty { height: 104px; }
  .mfull__content { margin-top: auto; padding: 48px 0; }
  .mfull__content::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, .8) 0, rgba(0, 0, 0, 0) 100%); }
  .mfull__wrap { max-width: calc((100% + 32px) / 2 - 32px); }
  .mfull__text { margin-top: 12px; }
}

/* ---------- 360° viewer ---------- */
.m360 {
  position: relative;
  height: 490px;
  overflow: hidden;
  background: #1b1e21 url("https://perxis-widgets.website.yandexcloud.net/rox/widget-360/latest/media/img/bg.4db8.jpg") center / cover no-repeat;
  -webkit-user-select: none;
  user-select: none;
}
.m360::before, .m360::after { content: ""; position: absolute; left: 0; right: 0; z-index: 1; pointer-events: none; }
.m360::before { top: 0; height: 30%; background: linear-gradient(180deg, rgba(10, 10, 10, .85) 0, rgba(10, 10, 10, 0) 100%); }
.m360::after { bottom: 0; height: 45%; background: linear-gradient(0deg, rgba(10, 10, 10, .75) 0, rgba(10, 10, 10, 0) 100%); }
@media (min-width: 600px) { .m360 { height: clamp(490px, 55.56vw, 900px); } }
.m360__panel { position: absolute; inset: 0; }
.m360__panel[hidden] { display: none; }
.m360__tabs { position: absolute; z-index: 4; top: 32px; left: 0; right: 0; }
.m360__tablist { display: flex; gap: 32px; }
.m360__tab { position: relative; padding-bottom: 8px; font-size: 18px; line-height: 24px; color: var(--white); transition: color .2s; }
.m360__tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(247, 249, 250, .12); transition: background-color .3s; }
.m360__tab[aria-selected="true"]::after { background: var(--gold); }
.m360__tab:hover { color: var(--gold); }
.m360__stage { position: absolute; inset: 0; overflow: hidden; cursor: grab; touch-action: pan-y; outline-offset: -4px; }
.m360__stage.is-dragging { cursor: grabbing; }
.m360__frame { position: absolute; left: 50%; top: 50%; width: calc(100% + 100px); max-width: none; height: auto; aspect-ratio: 1; transform: translate(-50%, calc(-50% + 25px)); pointer-events: none; -webkit-user-drag: none; }
.m360__stage_int { cursor: default; }
.m360__int-img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; animation: m-fade .5s ease; }
@keyframes m-fade { from { opacity: 0; } }
.m360__splash { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; width: 100%; background: rgba(10, 10, 10, .43); transition: opacity .4s ease, visibility 0s .4s; }
.m360__splash-circle { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 120px; height: 120px; border-radius: 50%; background: var(--white); color: var(--bg); font-size: 16px; line-height: 1.2; transition: transform .3s var(--ease); }
.m360__splash-circle .icon { width: 32px; height: 32px; }
.m360__splash:hover .m360__splash-circle { transform: scale(1.06); }
.m360.is-started .m360__splash { opacity: 0; visibility: hidden; }
.m360__panel_ext .m360__colors { transition: filter .4s ease; }
.m360:not(.is-started) .m360__panel_ext .m360__colors { filter: brightness(.6); }
.m360:not(.is-started) .m360__panel_ext .m360__colors:hover, .m360:not(.is-started) .m360__panel_ext .m360__colors:focus-within { filter: none; }
.m360__footer { position: absolute; z-index: 3; left: 0; right: 0; bottom: 32px; pointer-events: none; }
.m360__footer-row { display: flex; flex-direction: column; gap: 16px; }
.m360__colors, .m360__modes { pointer-events: auto; }
.m360__color-name { margin-bottom: 16px; font-family: var(--f-display); font-size: 18px; line-height: 1.2; font-weight: var(--fw-light); color: var(--t3); }
.m360__swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.m360__swatch { width: 52px; height: 52px; padding: 0; border: 2px solid transparent; border-radius: 2px; transition: border-color .2s; }
.m360__swatch img { display: block; width: 100%; height: 100%; object-fit: cover; }
.m360__swatch:hover { border-color: var(--gold-soft); }
.m360__swatch[aria-pressed="true"] { border-color: var(--gold); }
.m360__modes { display: flex; overflow-x: auto; scrollbar-width: none; border-radius: 4px; background: rgba(247, 249, 250, .2); backdrop-filter: blur(4px); }
.m360__modes::-webkit-scrollbar { display: none; }
.m360__mode { flex: none; min-height: 44px; padding: 0 16px; border: 1px solid transparent; border-radius: 4px; font-size: 11px; line-height: 1.2; letter-spacing: 1px; text-transform: uppercase; white-space: nowrap; color: rgba(247, 249, 250, .75); transition: color .2s, background-color .2s, border-color .2s; }
.m360__mode:hover { color: var(--white); }
.m360__mode[aria-pressed="true"] { border-color: rgba(247, 249, 250, .7); background: rgba(10, 10, 10, .35); color: var(--white); }
.m360.is-loading .m360__stage { cursor: progress; }
@media (min-width: 600px) {
  .m360__footer-row { flex-direction: row; align-items: flex-end; justify-content: space-between; }
}
@media (min-width: 960px) {
  .m360__tabs { top: 48px; }
  .m360__tab { font-size: 20px; line-height: 26px; }
  .m360__frame { width: calc(100% + 300px); transform: translate(-50%, calc(-50% + 50px)); }
  .m360__footer { bottom: 48px; }
  .m360__color-name { margin-bottom: 24px; font-size: 24px; }
  .m360__swatches { gap: 24px; }
  .m360__mode { min-height: 52px; padding: 0 32px; font-size: 12px; }
}

/* ---------- Media + text slider ---------- */
.mslider { position: relative; padding: 40px 0; overflow: hidden; background: var(--bg); }
.mslider__track { display: flex; transition: transform .6s var(--ease); will-change: transform; touch-action: pan-y; }
.mslider.is-dragging .mslider__track { transition: none; }
.mslide { flex: 0 0 100%; display: flex; min-width: 0; padding: 0 var(--pad); }
.mslide__card { display: flex; flex-direction: column; width: 100%; max-width: calc(1720px - var(--pad) * 2); margin: 0 auto; }
.mslide__media { position: relative; margin: 0 calc(var(--pad) * -1); aspect-ratio: 3 / 2; overflow: hidden; background: var(--bg-2); }
.mslide__media img, .mslide__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; }
.mslide__body { flex: 1; margin: 0 calc(var(--pad) * -1); padding: 32px var(--pad) 88px; background: rgba(247, 249, 250, .07); }
.mslide__title { margin-bottom: 16px; }
.mslider__navwrap { position: absolute; left: 0; right: 0; bottom: 40px; pointer-events: none; }
.mslider__nav { display: flex; align-items: center; justify-content: center; gap: 24px; height: 88px; }
.mslider__btn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: -8px; pointer-events: auto; color: var(--white); transition: color .2s; }
.mslider__btn:hover { color: var(--gold); }
.mslider__count { min-width: 40px; text-align: center; font-family: var(--f-display); font-size: 18px; line-height: 1.3; font-weight: var(--fw-light); letter-spacing: -.2px; color: var(--t2); }
.mslider__cur { color: var(--gold); }
.mslider__sep { margin: 0 2px; }
@media (min-width: 960px) {
  .mslider { padding: 64px 0; }
  .mslide__card { flex-direction: row; }
  .mslide__media, .mslide__body { flex: 0 0 50%; margin: 0; }
  .mslide__media { aspect-ratio: 656 / 433; }
  .mslider_swap .mslide__media { order: 2; }
  .mslide__body { padding: 48px 48px 124px; }
  .mslide__title { margin-bottom: 24px; }
  .mslider__navwrap { bottom: 64px; }
  .mslider__nav { justify-content: flex-start; width: 50%; height: auto; padding: 48px; }
  .mslider:not(.mslider_swap) .mslider__nav { margin-left: 50%; }
  .mslider__count { font-size: 24px; line-height: 1.2; }
}

/* ---------- Trims (ROX 01) ---------- */
.mtrims { padding: 40px 0; }
.mtrims__title, .mcards__title { text-align: center; }
.mtrims__title { margin-bottom: 80px; }
.mtrim__img { aspect-ratio: 3 / 2; overflow: hidden; }
.mtrim__img img { width: 100%; height: 100%; object-fit: cover; }
.mtrim__title { margin-top: 24px; }
.mtrim__list { margin-top: 16px; }
@media (min-width: 960px) {
  .mtrims { padding: 64px 0; }
  .mtrims__title { margin-bottom: 128px; }
  .mtrims__wrap { max-width: calc((100% + 32px) / 12 * 10 - 32px); margin: 0 auto; }
  .mtrims__wrap .carousel__track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mtrim__title { margin-top: 30px; }
  .mtrim__list { margin-top: 24px; }
}

/* ---------- Trims with prices (ROX ADAMAS) ---------- */
.mcards { margin: 40px 0; }
.mcards__title { margin-bottom: 40px; }
.mcard__img { aspect-ratio: 16 / 9; overflow: hidden; }
.mcard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.mcard:hover .mcard__img img { transform: scale(1.04); }
.mcard__title { margin-top: 16px; }
.mcard__price { margin-top: 8px; }
.mcard__text { margin-top: 16px; }
.mbtns { display: flex; flex-direction: column; gap: 16px; margin-top: 40px; }
.mbtns .btn { justify-content: flex-start; }
@media (min-width: 600px) { .mbtns { flex-direction: row; justify-content: center; } .mbtns .btn { justify-content: center; } }
@media (min-width: 960px) {
  .mcards { margin: 64px 0; }
  .mcards__title { margin-bottom: 64px; }
  .mcard__title { margin-top: 24px; }
  .mcard__price { margin-top: 12px; }
  .mcard__text { margin-top: 24px; }
  .mbtns { margin-top: 64px; }
}

/* ---------- Cars in stock (light block) ---------- */
.mstock { padding: 40px 0; background: #f7f9fa; color: var(--bg); }
.mstock__title { text-align: center; }
.mstock__carousel { position: relative; margin-top: 40px; }
.mstock__track {
  position: relative;
  display: flex;
  gap: 16px;
  margin: 0 calc(var(--pad) * -1);
  padding: 0 var(--pad) 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--pad);
  scrollbar-width: none;
  list-style: none;
}
.mstock__track::-webkit-scrollbar { display: none; }
.mstock__item { flex: 0 0 100%; display: flex; scroll-snap-align: start; }
.mstock__arrow { display: none; }
.mstock__dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.mstock__dot { width: 8px; height: 8px; background: #d3d6d9; transition: background-color .3s; }
.mstock__dot.is-active { background: var(--gold); }
.mstock__more { margin-top: 32px; text-align: center; }
.mstock__btn.btn { min-height: 50px; padding: 16px 24px; color: var(--bg); border-width: 2px; }
.mstock__btn.btn:hover { color: var(--bg); }
@media (min-width: 600px) { .mstock__item { flex-basis: calc(50% - 8px); } }
@media (min-width: 960px) {
  .mstock { padding: 64px 0 40px; }
  .mstock__carousel { margin-top: 64px; }
  .mstock__track { margin: 0; padding: 0 0 8px; scroll-padding: 0; }
  .mstock__item { flex-basis: calc((100% - 32px) / 3); }
  .mstock__dots { display: none; }
  .mstock__arrow {
    position: absolute;
    top: 96px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background: #fff;
    color: var(--bg);
    box-shadow: 0 4px 16px rgba(10, 10, 10, .12);
    transition: opacity .2s, background-color .2s;
  }
  .mstock__arrow:hover { background: var(--gold); }
  .mstock__arrow[disabled] { opacity: 0; pointer-events: none; }
  .mstock__arrow_prev { left: -52px; }
  .mstock__arrow_next { right: -52px; }
}
@media (min-width: 1280px) { .mstock__item { flex-basis: calc((100% - 48px) / 4); } }

.scard { position: relative; display: flex; flex-direction: column; width: 100%; overflow: hidden; border-radius: 8px; background: #fff; color: var(--bg); transition: box-shadow .3s; }
.scard:hover { box-shadow: 0 8px 24px rgba(10, 10, 10, .08); }
.scard__gallery { position: relative; display: block; aspect-ratio: 4 / 3; }
.scard__gallery img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.scard__gallery img.is-active { opacity: 1; }
/* Studio frames of the 360° set (1:1, car in the middle) — cropped with --zoom like the /cars/ catalogue */
.scard__gallery_frames { overflow: hidden; background: #f3f5f7; }
.scard__gallery_frames img { inset: auto; left: 50%; top: 50%; width: calc(var(--zoom, 1.8) * 100%); max-width: none; height: auto; aspect-ratio: 1; object-fit: contain; transform: translate(-50%, -50%); }
.mstock__demo { margin-top: 16px; font-size: 12px; color: #6f7579; text-align: center; }
.scard__badges { position: absolute; z-index: 1; top: 10px; left: 10px; right: 10px; display: flex; flex-wrap: wrap; gap: 4px; }
.scard__badge { padding: 2px 10px; border: 1px solid var(--bg); border-radius: 2px; background: #fff; font-size: 12px; line-height: 16px; }
.scard__badge_dark { background: var(--bg); color: #fff; }
.scard__bars { position: absolute; left: 8px; right: 8px; bottom: 0; display: flex; gap: 6px; }
.scard__bars span { flex: 1; height: 2px; background: #e3e6e8; transition: background-color .2s; }
.scard__bars span.is-active { background: #6f7579; }
.scard__body { display: flex; flex-direction: column; align-items: flex-start; padding: 20px 16px 24px; }
.scard__name { font-family: var(--f-display); font-size: 22px; line-height: 1.2; font-weight: var(--fw-light); }
.scard__trim { margin-top: 4px; font-size: 15px; line-height: 1.4; color: #3d4246; }
.scard__specs { display: flex; flex-direction: column; gap: 4px; margin-top: 16px; font-size: 14px; line-height: 1.45; color: #6f7579; }
.scard__spec { display: flex; align-items: flex-start; gap: 6px; }
.scard__spec .icon { width: 16px; height: 16px; margin-top: 2px; color: var(--bg); }
.scard__status { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; padding: 3px 8px; border-radius: 12px; background: #eef0f2; font-size: 12px; line-height: 16px; }
.scard__status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #33c24d; }
.scard__price { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.scard__now { font-size: 18px; line-height: 1.3; }
.scard__price .icon { width: 16px; height: 16px; }
.scard__old { font-size: 12px; color: #8a8f94; }
.scard__place { display: flex; align-items: flex-start; gap: 6px; margin-top: 16px; font-size: 12px; line-height: 1.4; color: #6f7579; }
.scard__place .icon { width: 16px; height: 16px; color: var(--bg); }

/* ---------- Test-drive form ---------- */
.mform { padding: 40px 0; }
.mform__grid { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 32px; }
.mform__intro { grid-row: 1; }
.mform__side { grid-row: 2; }
.mform__note { grid-row: 3; font-size: 12px; line-height: 1.4; color: var(--t3); }
.mform__caption { margin-bottom: 32px; color: var(--t3); }
.mform__text { margin-top: 24px; font-size: 16px; line-height: 1.4; font-weight: var(--fw-light); color: var(--t2); }
.mform__text p + p { margin-top: 16px; }
@media (min-width: 960px) {
  .mform { padding: 64px 0; }
  .mform__grid { grid-template-columns: 48.2% 40.2%; grid-template-rows: auto 1fr; column-gap: 7.6%; row-gap: 0; }
  .mform__intro { grid-column: 1; grid-row: 1; }
  .mform__note { grid-column: 1; grid-row: 2; align-self: end; padding-bottom: 22px; font-size: 14px; }
  .mform__side { grid-column: 2; grid-row: 1 / span 2; }
  .mform__caption { margin-bottom: 48px; }
  .mform__text { margin-top: 36px; font-size: 20px; line-height: 1.3; }
  .mform__text p + p { margin-top: 24px; }
}

.tdf { display: grid; gap: 24px; }
.tdf__check + .tdf__check { margin-top: 4px; }
.tdf__field { position: relative; display: block; }
.tdf__input {
  display: block;
  width: 100%;
  height: 48px;
  padding: 12px 16px;
  border: 1px solid rgba(247, 249, 250, .23);
  border-radius: 4px;
  background: rgba(247, 249, 250, .07);
  color: var(--white);
  font: inherit;
  font-size: 16px;
  line-height: 22px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color .2s, background-color .2s;
}
select.tdf__input { padding-right: 48px; cursor: pointer; }
select.tdf__input option { background: var(--bg-2); color: var(--white); }
.tdf__input:hover { border-color: rgba(247, 249, 250, .43); }
.tdf__input:focus { border-color: var(--gold); }
.tdf__input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.tdf__input:disabled { opacity: .5; cursor: not-allowed; }
.tdf__label { position: absolute; left: 17px; top: 13px; right: 48px; overflow: hidden; font-size: 16px; line-height: 22px; white-space: nowrap; text-overflow: ellipsis; color: var(--t2); pointer-events: none; transition: opacity .15s; }
input.tdf__input:not(:placeholder-shown) + .tdf__label, .tdf__field.has-value .tdf__label { opacity: 0; }
.tdf__chevron.icon { position: absolute; right: 12px; top: 12px; pointer-events: none; color: var(--white); transition: opacity .2s; }
.tdf__input:disabled ~ .tdf__chevron { opacity: .4; }
.tdf__error { display: none; margin-top: 6px; font-size: 12px; line-height: 1.3; color: #ff7b7b; }
.tdf__field.is-invalid .tdf__input { border-color: #e5484d; }
.tdf__field.is-invalid .tdf__error { display: block; }
.tdf__check { position: relative; display: flex; align-items: center; gap: 16px; font-size: 12px; line-height: 1.4; color: var(--t2); cursor: pointer; }
.tdf__check input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.tdf__box { display: flex; flex: none; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid rgba(247, 249, 250, .23); border-radius: 4px; background: rgba(247, 249, 250, .07); color: var(--gold); transition: border-color .2s; }
.tdf__box .icon { width: 18px; height: 18px; opacity: 0; transition: opacity .15s; }
.tdf__check input:checked + .tdf__box .icon { opacity: 1; }
.tdf__check input:focus-visible + .tdf__box { outline: 2px solid var(--gold); outline-offset: 2px; }
.tdf__check:hover .tdf__box { border-color: rgba(247, 249, 250, .5); }
.tdf__check a { color: var(--white); text-decoration: underline; text-underline-offset: 2px; }
.tdf__check a:hover { color: var(--gold); }
.tdf__check.is-invalid .tdf__box { border-color: #e5484d; }
.tdf__check.is-invalid { color: #ff9b9b; }
.tdf__submit.btn { justify-self: stretch; min-height: 66px; margin-top: 16px; padding: 27px 36px; }
@media (min-width: 600px) { .tdf__submit.btn { justify-self: start; } }
@media (min-width: 960px) { .tdf__check { font-size: 14px; } }
.tdf-done { padding: 40px 24px; border: 1px solid var(--line); border-radius: 4px; background: rgba(247, 249, 250, .07); text-align: center; outline: none; }
.tdf-done[hidden] { display: none; }
.tdf-done__icon { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; margin-bottom: 24px; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); }
.tdf-done__icon .icon { width: 32px; height: 32px; }
.tdf-done__text { margin: 16px auto 32px; max-width: 420px; color: var(--t2); }

/* ---------- Shared blocks reused from the homepage ---------- */
.mdisclaimer.disclaimer { padding-top: 0; }
.mpage .flow { padding-bottom: 40px; }
@media (min-width: 960px) { .mpage .flow { padding-bottom: 64px; } }

@media (prefers-reduced-motion: reduce) {
  .mhero__wrap > * { animation: none; }
  .mslider__track { transition: none; }
}
