:root {
  /* Палитра взята из исходной темы сайта. */
  --brand-main: #0275d8;
  --brand-deep: #014884;
  --brand-hover: #0b3f73;
  --brand-heading: #2b76b6;
  --brand-pale: #e8f1ff;
  --brand-mist: #f8fbff;
  --brand-border: #c6d7ee;
  --gear-yellow: #f6df37;
  --ink: #1a2433;
  --muted: #5c6f8f;
  --line: #d7e0ec;
  --paper: #ffffff;
  --radius: 16px;
  --shadow: 0 12px 30px rgba(13, 30, 67, .1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, var(--brand-pale) 0, var(--brand-mist) 360px, #fff 100%);
  font-family: "Segoe UI", Frutiger, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

a { color: var(--brand-main); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-hover); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  color: #fff;
  background: linear-gradient(180deg, #248bce 0, var(--brand-main) 42%, var(--brand-deep) 100%);
  box-shadow: 0 3px 12px rgba(1, 72, 132, .22);
}

.office-bar { color: var(--brand-main); background: #f8fbff; border-bottom: 1px solid rgba(1, 72, 132, .12); }

.office-bar__inner,
.site-header__main,
.primary-nav,
.site-footer > div {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.office-bar__inner { display: flex; min-height: 38px; flex-wrap: wrap; gap: 8px 22px; align-items: center; padding: 5px 0; font-size: 13px; }
.office-location { display: flex; flex-wrap: wrap; gap: 7px 10px; align-items: center; color: #3e4c63; }
.office-location__dot { width: 8px; height: 8px; flex: 0 0 auto; background: var(--brand-main); border-radius: 50%; box-shadow: 0 0 0 4px rgba(2, 117, 216, .12); }
.office-location a { padding: 3px 9px; color: var(--brand-deep); background: var(--brand-pale); border: 1px solid var(--brand-border); border-radius: 999px; font-weight: 700; text-decoration: none; }
.support-button { display: inline-grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; margin-left: auto; color: var(--brand-main); background: #fff; border: 1px solid var(--brand-border); border-radius: 50%; box-shadow: 0 3px 9px rgba(13, 30, 67, .08); }
.support-button:hover { color: #fff; background: var(--brand-main); }
.support-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.site-header__main {
  display: grid;
  grid-template-columns: 180px minmax(270px, 1fr) auto;
  gap: 30px;
  align-items: center;
  min-height: 108px;
}

.brand { display: flex; width: 176px; align-items: center; }
.brand img { display: block; width: 176px; height: auto; max-height: 80px; object-fit: contain; }

.site-header__search > p {
  margin: 0 0 8px;
  color: #fff;
  font-size: clamp(19px, 2.4vw, 26px);
  line-height: 1.1;
  letter-spacing: .01em;
}

.site-header__search form { display: grid; grid-template-columns: 1fr auto; gap: 10px; }

.site-header input[type="search"] {
  width: 100%;
  min-height: 43px;
  padding: 10px 15px;
  color: var(--ink);
  background: #fff;
  border: 2px solid rgba(255, 255, 255, .55);
  border-radius: 13px;
  font: inherit;
}

.site-header input[type="search"]::placeholder { color: #90a0b5; }

button,
input[type="button"],
input[type="submit"] {
  min-height: 42px;
  padding: 9px 18px;
  color: var(--brand-deep);
  background: var(--gear-yellow);
  border: 1px solid #ddc832;
  border-radius: 11px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  box-shadow: 0 2px 0 rgba(1, 72, 132, .12);
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}

button:hover,
input[type="button"]:hover,
input[type="submit"]:hover {
  background: #ffe95c;
  box-shadow: 0 5px 12px rgba(1, 72, 132, .2);
  transform: translateY(-1px);
}

.site-header__actions { display: flex; flex-wrap: nowrap; align-items: center; align-self: center; justify-content: flex-end; gap: 8px; font-size: 13px; }
.site-header__actions a { display: inline-flex; min-height: 38px; align-items: center; padding: 7px 11px; color: #fff; border: 1px solid rgba(255, 255, 255, .42); border-radius: 9px; font-weight: 600; line-height: 1; text-decoration: none; white-space: nowrap; }
.site-header__actions a:hover { color: var(--brand-deep); background: #fff; }
.site-header__actions a:last-child { background: rgba(255, 255, 255, .12); }

.primary-nav { display: flex; flex-wrap: wrap; gap: 0; border-top: 1px solid rgba(255, 255, 255, .2); scrollbar-width: none; }
.primary-nav::-webkit-scrollbar { display: none; }
.primary-nav a { padding: 12px 15px; color: #fff; border-left: 1px solid rgba(255, 255, 255, .12); text-decoration: none; font-size: 14px; }
.primary-nav a:first-child { border-left: 0; }
.primary-nav a:hover { color: var(--brand-deep); background: var(--gear-yellow); }

.floating-cart {
  position: fixed;
  top: 58%;
  right: 0;
  bottom: auto;
  z-index: 30;
  display: flex;
  width: 74px;
  min-height: 82px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 8px;
  color: var(--brand-deep);
  background: var(--gear-yellow);
  border: 1px solid #ddc832;
  border-right: 0;
  border-radius: 15px 0 0 15px;
  box-shadow: 0 10px 28px rgba(1, 72, 132, .3);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.floating-cart:hover { color: var(--brand-deep); background: #ffe95c; box-shadow: 0 13px 34px rgba(1, 72, 132, .36); transform: translateY(-2px); }
.floating-cart__icon { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.floating-cart__count { position: absolute; top: 6px; right: 6px; display: inline-grid; width: 20px; height: 20px; place-items: center; color: #fff; background: var(--brand-deep); border-radius: 50%; font-size: 10px; }

body > hr { display: none; }
body > p { width: min(1180px, calc(100% - 48px)); margin: 20px auto 0; color: var(--muted); font-size: 14px; }
body > p a { color: var(--muted); }

main { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 10px 0 62px; }

main > h1 {
  max-width: 940px;
  margin: 0;
  color: var(--brand-heading);
  font-size: clamp(31px, 4.4vw, 48px);
  font-weight: 400;
  line-height: 1.12;
}

main > p { margin: 8px 0 0; }
main > p small { display: inline-block; padding: 3px 9px; color: var(--muted); background: rgba(232, 241, 255, .85); border: 1px solid var(--brand-border); border-radius: 999px; font-size: 11px; }

main > div {
  min-width: 0;
  margin-top: 22px;
  padding: clamp(22px, 3vw, 38px);
  overflow: hidden;
  background: rgba(255, 255, 255, .97);
  border: 1px solid rgba(198, 215, 238, .9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

main > div h1,
main > div h2,
main > div h3,
main > div h4 { color: var(--brand-heading); font-weight: 400; line-height: 1.2; }
main > div h1 { font-size: clamp(27px, 3vw, 36px); }
main > div h2 { margin-top: 2rem; font-size: clamp(22px, 2.4vw, 30px); }
main > div h3 { font-size: 20px; }
main > div p { max-width: 82ch; color: #2f3e54; }
main > div img { display: block; max-width: 100%; height: auto !important; border-radius: 10px; }
main > div a[style*="text-decoration"] { color: inherit !important; text-decoration: none !important; }
main > div nav[aria-label="breadcrumb"] ol,
main > div ul,
main > div ol { padding-left: 1.25rem; }
main > div nav[aria-label="breadcrumb"] ol { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0 0 22px; color: var(--muted); font-size: 14px; }

main > div article {
  height: 100%;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--brand-border);
  border-radius: 13px;
  box-shadow: 0 5px 16px rgba(13, 30, 67, .07);
  transition: box-shadow .18s ease, transform .18s ease;
}

main > div article:hover { box-shadow: 0 11px 22px rgba(1, 72, 132, .16); transform: translateY(-2px); }
main > div article img { width: 100%; min-height: 150px; object-fit: cover; border-radius: 0; }
main > div article > div:last-child,
main > div article > p:last-child { padding: 13px 15px 16px; color: var(--brand-deep); font-weight: 700; }

@supports selector(:has(*)) {
  main > div section > div:has(> a > article) { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; }
}

main > div table { display: block; width: 100%; overflow-x: auto; border-spacing: 0; border-collapse: separate; border: 1px solid var(--brand-border); border-radius: 12px; }
main > div th,
main > div td { min-width: 130px; padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
main > div th { color: var(--brand-deep); background: var(--brand-pale); font-size: 13px; font-weight: 700; }
main > div tr:last-child td { border-bottom: 0; }

input,
select,
textarea { width: 100%; padding: 10px 12px; color: var(--ink); background: #fff; border: 1px solid #a1a1a1; border-radius: 8px; font: inherit; }
input:focus,
select:focus,
textarea:focus { outline: 3px solid rgba(2, 117, 216, .18); border-color: var(--brand-main); }

main form { display: grid; gap: 15px; max-width: 720px; padding: 22px; background: var(--brand-mist); border: 1px solid var(--brand-border); border-radius: 13px; }
main form label { display: grid; gap: 6px; color: #2f3e54; font-weight: 600; }
.static-request-form { padding: 0; background: transparent; border: 0; }
.static-request-form > h2 { margin-top: 0; }

main > div button:not(.site-header button) { margin: 3px; color: var(--brand-deep); background: #fff; border: 1px solid var(--brand-main); box-shadow: none; }
main > div button:not(.site-header button):hover { color: var(--brand-deep); background: var(--gear-yellow); }
main > div blockquote { margin: 24px 0; padding: 18px 22px; color: #2f3e54; background: var(--brand-pale); border-left: 4px solid var(--brand-main); border-radius: 0 10px 10px 0; }
main > div code { padding: 2px 5px; color: var(--brand-deep); background: var(--brand-pale); border-radius: 4px; font-size: .9em; }

.site-footer { padding: 36px 0; color: #c6d7ee; background: var(--brand-deep); border-top: 4px solid var(--brand-main); }
.site-footer h2 { margin: 0 0 16px; color: #fff; font-size: 18px; font-weight: 400; }
.site-footer ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 7px 20px; max-width: 900px; margin: 0; padding: 0; list-style: none; }
.site-footer a { color: #e8f1ff; text-decoration: none; }
.site-footer a:hover { color: var(--gear-yellow); }
.site-footer p { margin: 22px 0 0; color: #9bb8dc; font-size: 13px; }

.home-page { padding-top: 26px; }

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 28px;
  align-items: stretch;
  padding: clamp(26px, 4vw, 52px);
  color: var(--ink);
  background: linear-gradient(135deg, #fff 0, #f0f7ff 100%);
  border: 1px solid var(--brand-border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand-main);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.home-hero h1,
.home-page h2 {
  color: var(--brand-heading);
  font-weight: 400;
  line-height: 1.14;
}

.home-hero h1 { max-width: 720px; margin: 0; font-size: clamp(34px, 5vw, 56px); }
.home-hero__content > p:not(.eyebrow) { max-width: 720px; margin: 18px 0 0; color: #2f3e54; font-size: 18px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 9px 17px;
  color: var(--brand-deep);
  background: #fff;
  border: 1px solid var(--brand-main);
  border-radius: 10px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.button:hover { color: var(--brand-deep); background: var(--brand-pale); box-shadow: 0 4px 12px rgba(1, 72, 132, .14); transform: translateY(-1px); }
.button--primary { border-color: #ddc832; background: var(--gear-yellow); }
.button--primary:hover { background: #ffe95c; }

.trust-list { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 30px 0 0; }
.trust-list div { min-width: 112px; }
.trust-list dt { color: var(--brand-deep); font-size: 23px; font-weight: 700; }
.trust-list dd { margin: 0; color: var(--muted); font-size: 13px; }

.office-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  color: #fff;
  background: linear-gradient(160deg, var(--brand-main), var(--brand-deep));
  border-radius: 14px;
}

.office-card p { color: #e8f1ff; }
.office-card p:first-child { margin: 0 0 10px; font-size: 13px; }
.office-card h2 { margin: 0; color: #fff; font-size: 28px; }
.office-card a { display: inline-flex; align-self: flex-start; margin-top: auto; padding: 9px 14px; color: var(--brand-deep); background: var(--gear-yellow); border-radius: 9px; font-weight: 700; text-decoration: none; }

.selection-panel {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  margin-top: 24px;
  padding: 30px;
  background: var(--brand-deep);
  border-radius: 16px;
}

.selection-panel h2 { margin: 0; color: #fff; font-size: 30px; }
.selection-panel p:not(.eyebrow) { margin-bottom: 0; color: #dceaff; }
.selection-panel .eyebrow { color: var(--gear-yellow); }

.vehicle-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: none;
  padding: 0;
  background: transparent;
  border: 0;
}

.vehicle-form label { color: #e8f1ff; }
.vehicle-form .button { align-self: end; color: var(--brand-deep); }

.home-section { margin-top: 48px; }
.section-heading { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-size: 32px; }
.section-heading > a { font-weight: 700; }

.home-category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.home-category-grid a { display: grid; gap: 6px; min-height: 122px; padding: 20px; color: var(--brand-deep); background: #fff; border: 1px solid var(--brand-border); border-radius: 13px; box-shadow: 0 5px 16px rgba(13, 30, 67, .06); text-decoration: none; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.home-category-grid a:hover { color: var(--brand-deep); border-color: var(--brand-main); box-shadow: 0 11px 22px rgba(1, 72, 132, .14); transform: translateY(-2px); }
.home-category-grid strong { font-size: 18px; }
.home-category-grid span { color: var(--muted); font-size: 14px; }

.popular-models { padding: 30px; background: var(--brand-mist); border: 1px solid var(--brand-border); border-radius: 16px; }
.model-links { display: flex; flex-wrap: wrap; gap: 10px; }
.model-links a { padding: 9px 13px; color: var(--brand-deep); background: #fff; border: 1px solid var(--brand-border); border-radius: 999px; text-decoration: none; }
.model-links a:hover { color: var(--brand-deep); background: var(--gear-yellow); border-color: #ddc832; }

.home-promo { display: flex; align-items: center; justify-content: space-between; gap: 26px; margin-top: 48px; padding: 30px; background: linear-gradient(90deg, #fffce0, #fff); border: 1px solid #eadb80; border-radius: 16px; }
.home-promo h2 { margin: 0; font-size: 30px; }
.home-promo p:not(.eyebrow) { margin-bottom: 0; color: #4d5260; }

@media (max-width: 900px) {
  .site-header__main { grid-template-columns: 176px 1fr; gap: 20px; padding: 12px 0; }
  .site-header__actions { grid-column: 2; justify-content: flex-start; max-width: none; }
  .home-hero,
  .selection-panel { grid-template-columns: 1fr; }
  .office-card { min-height: 230px; }
  .home-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .office-bar__inner,
  .site-header__main,
  .primary-nav,
  .site-footer > div,
  body > p,
  main { width: min(100% - 32px, 1180px); }
  body { padding-bottom: 78px; }
  .office-bar__inner { flex-wrap: nowrap; gap: 10px; padding: 8px 0; font-size: 12px; }
  .office-location { gap: 5px 8px; }
  .office-location::before { color: #3e4c63; content: "Ваш город:"; font-weight: 600; }
  .office-location > span:not(.office-location__dot) { display: none; }
  .support-button { margin-left: auto; }
  .site-header__main { display: grid; grid-template-columns: 145px minmax(0, 1fr); gap: 10px 12px; padding: 14px 0; }
  .brand { width: 145px; margin: 0; }
  .brand img { width: 145px; }
  .site-header__search > p { font-size: 19px; }
  .site-header__search { grid-column: 1 / -1; }
  .site-header__search form { grid-template-columns: 1fr auto; }
  .site-header__actions { grid-column: 2; grid-row: 1; justify-content: flex-end; margin: 0; }
  .site-header__actions a { min-height: 34px; padding: 6px 8px; font-size: 12px; }
  .primary-nav { overflow-x: auto; flex-wrap: nowrap; }
  .primary-nav a { flex: 0 0 auto; padding: 10px 12px; font-size: 13px; }
  .floating-cart { top: auto; right: 12px; bottom: 12px; left: auto; width: 58px; min-height: 58px; padding: 8px; border-right: 1px solid #ddc832; border-radius: 50%; }
  .floating-cart__label { display: none; }
  .floating-cart__count { top: -3px; right: -2px; width: 21px; height: 21px; }
  body > p { margin-top: 16px; }
  main { padding-bottom: 44px; }
  main > div { padding: 20px; border-radius: 12px; }
  main form { padding: 16px; }
  .home-page { padding-top: 18px; }
  .home-hero { gap: 22px; padding: 22px; border-radius: 13px; }
  .home-hero h1 { font-size: 34px; }
  .home-hero__content > p:not(.eyebrow) { font-size: 16px; }
  .trust-list { gap: 12px 20px; }
  .selection-panel { gap: 20px; padding: 22px; border-radius: 13px; }
  .selection-panel h2,
  .section-heading h2,
  .home-promo h2 { font-size: 26px; }
  .vehicle-form { grid-template-columns: 1fr; }
  .home-category-grid { grid-template-columns: 1fr; }
  .home-promo { display: block; margin-top: 32px; padding: 22px; }
  .home-promo .button { margin-top: 18px; }
}
