:root {
  --color-primary: #242a46;
  --color-text: #0076ff;
  --color-secondary: #f2f2f2;
  --offer-red: #ff2c2c;
  --offer-green: #4fd32f;
  --offer-grey: #888888;
  --loading-color-default: #eff1f4;
  --loading-color-secondary: #9ca3af;
}

@font-face {
  font-display: swap;
  font-family: SF Pro Display;
  font-style: normal;
  font-weight: 300;
  src: url(/fonts/SFProDisplay-Light.woff) format("woff");
}
@font-face {
  font-display: swap;
  font-family: SF Pro Display;
  font-style: normal;
  font-weight: 400;
  src: url(/fonts/SFProDisplay-Regular.woff2) format("woff2"),
  url(/fonts/SFProDisplay-Regular.woff) format("woff");
}
@font-face {
  font-display: swap;
  font-family: SF Pro Display;
  font-style: normal;
  font-weight: 600;
  src: url(/fonts/SFProDisplay-Semibold.woff2) format("woff2"),
  url(/fonts/SFProDisplay-Semibold.woff) format("woff");
}
@font-face {
  font-display: swap;
  font-family: SF Pro Display;
  font-style: normal;
  font-weight: 500;
  src: url(/fonts/SFProDisplay-Medium.woff2) format("woff2"),
  url(/fonts/SFProDisplay-Medium.woff) format("woff");
}
@font-face {
  font-display: swap;
  font-family: SF Pro Text;
  font-style: normal;
  font-weight: 200;
  src: url(/fonts/SFProText-Light.woff2) format("woff2"),
  url(/fonts/SFProText-Light.woff) format("woff");
}
@font-face {
  font-display: swap;
  font-family: SF Pro Text;
  font-style: normal;
  font-weight: 300;
  src: url(/fonts/SFProText-Regular.woff2) format("woff2"),
  url(/fonts/SFProText-Regular.woff) format("woff");
}
@font-face {
  font-display: swap;
  font-family: SF Pro Text;
  font-style: normal;
  font-weight: 400;
  src: url(/fonts/SFProText-Medium.woff2) format("woff2"),
  url(/fonts/SFProText-Medium.woff) format("woff");
}
@font-face {
  font-display: swap;
  font-family: SF Pro Text;
  font-style: normal;
  font-weight: 600;
  src: url(/fonts/SFProText-Semibold.woff2) format("woff2"),
  url(/fonts/SFProText-Semibold.woff) format("woff");
}
@font-face {
  font-family: DIN;
  font-style: normal;
  font-weight: light;
  src: url(/fonts/DINCondensed-Light.ttf) format("truetype");
}
@font-face {
  font-family: DIN;
  font-style: normal;
  font-weight: bold;
  src: url(/fonts/DINCondensed-Regular.ttf) format("truetype");
}

* {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #eff1f4;
  color: var(--color-primary);
  font-family: SF Pro Display, sans-serif;
  font-size: 18px;
  line-height: 1;
  min-width: 320px;
}

body,
html {
  height: 100%;

  /*Не давать браузеру менять текстовый масштаб*/
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

img {
  max-height: 100%;
  max-width: 100%;
}


/* ===== MAIN (2 columns, like original spacing) ===== */

.main {
  height: auto;
  margin: 0 auto;
  display: grid;
  gap: 16px;

  /* desktop */
  max-width: 1048px;
  grid-template-columns: 774px 250px; /* 250 + 500 + 16gap */
  /*grid-template-columns: minmax(0, 1fr) 250px;*/
  align-items: start;
}

/* убираем старые костыли */
.main::before,
.main::after {
  content: none !important;
  display: none !important;
}

/* LEFT = основной контент */
.main > .main-left {
  width: 100% !important;
  max-width: none !important;   /* важно */
  min-width: 0;
  padding: 0;                   /* ← КЛЮЧЕВОЕ ИЗМЕНЕНИЕ */
}

/* RIGHT = правая колонка */
.main > .main-right {
  width: 100% !important;
  max-width: 250px !important;
  min-width: 0;
  padding: 0;                   /* ← КЛЮЧЕВОЕ ИЗМЕНЕНИЕ */

  grid-column: auto !important;
  order: 0 !important;
}

/* FOOTER WRAPPER (same centering logic as .main) */
.footer{
  display: block;

  max-width: 1048px;
  margin: 16px auto;        /* <- центрирование, чтобы не было сдвига влево */
  padding: 0 0 24px;
  box-sizing: border-box;
}

/* ===== <=1080: правая колонка вниз ===== */
@media (max-width: 1080px) {
  .main {
    max-width: 774px;
    grid-template-columns: 1fr;
  }

  .main > .main-right {
    max-width: 100% !important;
    grid-column: 1 / -1 !important;
  }

  .footer{
    max-width: 774px;
  }
}

/* ===== <=805: мобильная логика ===== */
@media (max-width: 805px) {
  .main {
    max-width: 532px;
    gap: 0;
  }

  .main > .main-right {
    padding: 0;
    padding-left: 16px;
    padding-right: 16px;
    margin: 0;
    margin-top: 16px; /* ← вот он, отступ между блоками */
  }

  .main > .main-left {
    margin-top: 16px;
  }

  .footer{
    margin: 8px auto;
    max-width: 532px;
    padding: 0 16px 16px;     /* <- безопаснее, чем margin */
  }
}

/* страховка, если где-то остался */
.main > .main-center {
  display: none !important;
}
