/* Major Drive — visual language of major-auto.ru */
:root {
  --ma-blue: #0093E7;
  --ma-blue-dark: #0077c2;
  --ma-ink: #121212;
  --ma-muted: #6b7280;
  --ma-line: #e5e7eb;
  --ma-bg: #ffffff;
  --ma-soft: #f5f7fa;
  --ma-ok: #16a34a;
  --ma-link: #0093E7;
  --ma-font: "Inter", system-ui, sans-serif;
  --ma-max: 1280px;
}
* { box-sizing: border-box; }
body.ma-body { margin: 0; font-family: var(--ma-font); color: var(--ma-ink); background: var(--ma-bg); min-height: 100vh; line-height: 1.45; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.ma-wrap { width: min(var(--ma-max), calc(100% - 2rem)); margin: 0 auto; }

.ma-demos { background: #0b1b2b; font-size: 0.72rem; }
.ma-demos__inner { display: flex; flex-wrap: wrap; gap: 0.55rem; padding: 0.35rem 0; }
.ma-demos a { color: #93a7bb; }
.ma-demos a.is-active, .ma-demos a:hover { color: #fff; }

.ma-header { border-bottom: 1px solid var(--ma-line); background: #fff; position: sticky; top: 0; z-index: 40; }
.ma-header__row { display: grid; grid-template-columns: auto 1fr auto; gap: 1.25rem; align-items: center; padding: 1rem 0; }
.ma-logo { font-size: 1.55rem; font-weight: 800; letter-spacing: 0.06em; color: #111; }
.ma-nav { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; font-size: 0.9rem; font-weight: 500; }
.ma-nav a:hover { color: var(--ma-blue); }
.ma-header__right { display: grid; justify-items: end; gap: 0.25rem; }
.ma-header__icons { display: flex; align-items: center; gap: 0.45rem; }
.ma-phone { font-weight: 700; font-size: 0.95rem; white-space: nowrap; }
.ma-ico { color: var(--ma-blue); width: 28px; height: 28px; display: grid; place-items: center; }

.ma-main { min-height: 50vh; padding-bottom: 2rem; background: var(--ma-soft); }
.ma-alert { margin: 1rem 0 0; padding: 0.85rem 1rem; border-radius: 12px; background: #fff; }
.ma-alert--ok { color: #14532d; }
.ma-alert--err { color: #9f1239; }

.ma-home { padding: 1.25rem 0 0.5rem; }
.ma-home__grid { display: grid; grid-template-columns: 1fr 280px; gap: 1rem; align-items: start; }
.ma-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 0; margin-bottom: 1rem;
  border-radius: 14px; overflow: hidden; box-shadow: 0 6px 18px rgba(0,147,231,.12);
}
.ma-stat {
  padding: 1.15rem 1rem; display: grid; gap: 0.3rem; min-height: 100px; align-content: center;
}
.ma-stat strong { font-size: 1.85rem; font-weight: 800; line-height: 1; }
.ma-stat span { font-size: 0.86rem; font-weight: 650; }
.ma-stat--outline { background: #fff; color: var(--ma-blue); }
.ma-stat--blue { background: var(--ma-blue); color: #fff; }
.ma-stat--dark { background: #0077c2; color: #fff; }
.ma-stat:nth-child(4) { background: #035f9c; color: #fff; }

.ma-side { display: grid; gap: 0.75rem; }
.ma-side__card {
  background: #fff; border: 1px solid #cfe8f8; border-radius: 14px; padding: 1rem 1.05rem; display: grid; gap: 0.25rem;
}
.ma-side__card strong { font-size: 0.98rem; }
.ma-side__card span { color: var(--ma-muted); font-size: 0.84rem; }

.ma-panel-block { background: #fff; border-radius: 16px; padding: 1.2rem; box-shadow: 0 8px 24px rgba(15,23,42,.04); }
.ma-section { padding: 1.4rem 0; }
.ma-section__head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1rem; }
.ma-section__head h1, .ma-section__head h2 { margin: 0; font-size: 1.35rem; font-weight: 800; }
.ma-link { color: var(--ma-link); font-weight: 700; }
.ma-muted { color: var(--ma-muted); }
.ma-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 0.85rem; }
.ma-card { background: #fff; border: 1px solid var(--ma-line); border-radius: 14px; overflow: hidden; }
.ma-card:hover { box-shadow: 0 8px 20px rgba(0,147,231,.12); }
.ma-card__media { display: grid; place-items: center; min-height: 150px; background: #f8fafc; padding: 0.75rem; }
.ma-card__media img { max-height: 120px; width: auto; object-fit: contain; }
.ma-card__placeholder { color: #93c5fd; font-weight: 800; }
.ma-card__body { padding: 0.8rem 0.9rem 1rem; display: grid; gap: 0.25rem; }
.ma-card__title { font-weight: 700; font-size: 0.9rem; min-height: 2.4em; }
.ma-card__price { font-size: 1.15rem; font-weight: 800; }
.ma-card__stock { font-size: 0.78rem; color: var(--ma-ok); font-weight: 600; }
.ma-card__stock--out { color: var(--ma-muted); }

.ma-brands { background: #fff; padding: 2rem 0; margin-top: 1rem; border-top: 1px solid var(--ma-line); }
.ma-brands h2 { margin: 0 0 1rem; font-size: 1.35rem; }
.ma-brands__grid { display: grid; grid-template-columns: 1fr 220px; gap: 1.5rem; }
.ma-brands__cars { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 0.35rem 1rem; font-size: 0.88rem; }
.ma-brands__cars a:hover, .ma-brands__moto a:hover { color: var(--ma-blue); }
.ma-brands__moto { border-left: 1px solid var(--ma-line); padding-left: 1.2rem; display: grid; gap: 0.35rem; align-content: start; }
.ma-brands__moto h3 { margin: 0 0 0.4rem; font-size: 0.95rem; }

.ma-page { padding: 1.25rem 0 2rem; }
.ma-crumbs { display: flex; gap: 0.4rem; flex-wrap: wrap; color: var(--ma-muted); font-size: 0.86rem; margin-bottom: 0.85rem; }
.ma-page__head { display: flex; justify-content: space-between; gap: 1rem; align-items: end; margin-bottom: 1.1rem; flex-wrap: wrap; }
.ma-page__head h1 { margin: 0 0 0.25rem; font-size: clamp(1.5rem, 2.4vw, 2rem); }
.ma-catalog-switch { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.ma-catalog-switch__item { padding: 0.4rem 0.75rem; border-radius: 999px; border: 1px solid var(--ma-line); background: #fff; font-size: 0.8rem; font-weight: 700; }
.ma-catalog-switch__item.is-active { background: var(--ma-blue); border-color: var(--ma-blue); color: #fff; }
.ma-rooms { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 0.85rem; margin-bottom: 1rem; }
.ma-room { min-height: 140px; border-radius: 14px; background: #0b1b2b center/cover; color: #fff; display: flex; align-items: flex-end; padding: 1rem; font-weight: 800; position: relative; overflow: hidden; }
.ma-room::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,.65)); }
.ma-room__title { position: relative; z-index: 1; }
.ma-room--plain { background: #fff; color: var(--ma-ink); border: 1px solid var(--ma-line); }
.ma-room--plain::after { display: none; }
.ma-subchips { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.ma-subchips a { background: #fff; border: 1px solid var(--ma-line); border-radius: 999px; padding: 0.35rem 0.75rem; font-size: 0.84rem; }
.ma-catalog-layout { display: grid; grid-template-columns: 260px 1fr; gap: 1.1rem; align-items: start; }
.ma-filters { background: #fff; border: 1px solid var(--ma-line); border-radius: 14px; padding: 1rem; position: sticky; top: 80px; }
.ma-filters h3 { margin: 0 0 0.75rem; }
.ma-filters label { display: grid; gap: 0.3rem; margin-bottom: 0.75rem; font-size: 0.84rem; font-weight: 600; }
.ma-filters input, .ma-filters select, .ma-toolbar select, .ma-input {
  border: 1px solid var(--ma-line); border-radius: 10px; padding: 0.55rem 0.65rem; background: #fff; width: 100%; box-sizing: border-box;
}
.ma-toolbar { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: 0.9rem; flex-wrap: wrap; }
.ma-product { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; background: #fff; border: 1px solid var(--ma-line); border-radius: 16px; padding: 1.25rem; }
.ma-product__gallery { background: #f8fafc; border-radius: 14px; min-height: 320px; display: grid; place-items: center; padding: 1rem; }
.ma-product__gallery img { max-height: 360px; width: auto; object-fit: contain; }
.ma-product__price { font-size: 1.8rem; font-weight: 800; margin: 0.75rem 0; }
.ma-label { display: block; font-size: 0.84rem; font-weight: 650; margin: 0.7rem 0 0.3rem; }
.ma-panel { background: #fff; border: 1px solid var(--ma-line); border-radius: 14px; padding: 1.25rem; max-width: 560px; }
.ma-btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.75rem 1.2rem; border-radius: 12px; font-weight: 700; border: 0; cursor: pointer; }
.ma-btn--primary { background: var(--ma-blue); color: #fff; }
.ma-btn--ghost { background: #fff; border: 1px solid var(--ma-line); }
.ma-form-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1rem; }
.ma-list { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.45rem; }
.ma-check { display: flex; gap: 0.5rem; align-items: center; }

.ma-footer { background: #0b1b2b; color: #b7c5d4; padding: 2.2rem 0 1.2rem; margin-top: 0; }
.ma-footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 1.25rem; }
.ma-footer__col { display: grid; gap: 0.45rem; align-content: start; }
.ma-footer__col h3 { margin: 0 0 0.35rem; color: #fff; font-size: 0.95rem; }
.ma-footer a { color: #93a7bb; }
.ma-footer a:hover { color: #fff; }
.ma-footer__text { margin: 0.4rem 0 0.6rem; color: #7f91a5; font-size: 0.88rem; max-width: 34ch; }
.ma-footer__phone { color: #fff !important; font-size: 1.2rem; font-weight: 800; }
.ma-footer__bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid #1e334d; color: #7f91a5; font-size: 0.82rem; }
.ma-logo--footer { color: #7ec8f5; font-weight: 800; letter-spacing: 0.06em; }

@media (max-width: 1100px) {
  .ma-home__grid, .ma-brands__grid, .ma-catalog-layout, .ma-product, .ma-footer__grid { grid-template-columns: 1fr; }
  .ma-stats, .ma-grid, .ma-brands__cars { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ma-brands__moto { border-left: 0; padding-left: 0; border-top: 1px solid var(--ma-line); padding-top: 1rem; }
  .ma-nav { display: none; }
}
@media (max-width: 760px) {
  .ma-header__row { grid-template-columns: 1fr; }
  .ma-stats { grid-template-columns: 1fr 1fr; }
}
