/* ============================================================
   РУБИНСТО — СТО и шиномонтаж, Тольятти
   Светлая премиальная тема: слоновая кость, графит, рубин
   Шрифты: Playfair Display (заголовки) + Manrope (текст)
   ============================================================ */
:root {
  --bg: #f7f4ef;          /* слоновая кость */
  --bg-alt: #efe9df;      /* тёплый песочный */
  --card: #ffffff;
  --line: #e4ddd1;
  --line-strong: #d6cdbf;
  --text: #1b1712;        /* графит */
  --muted: #71695e;
  --accent: #9b1d33;      /* рубин */
  --accent-dark: #7a1426;
  --accent-soft: rgba(155, 29, 51, .07);
  --dark: #17130f;        /* футер */
  --radius: 10px;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --shadow: 0 20px 50px -24px rgba(27, 23, 18, .18);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section--alt { background: var(--bg-alt); }

/* ---------- Типографика секций ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.eyebrow::before { content: ''; width: 26px; height: 1px; background: var(--accent); }
.section-title {
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: .01em;
}
.section-sub { color: var(--muted); max-width: 640px; margin-top: 12px; font-size: 16px; }
.section-head { margin-bottom: 54px; max-width: 720px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head--center .eyebrow::before { display: none; }
.section-head--center .section-sub { margin-left: auto; margin-right: auto; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 32px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: .25s;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: var(--sans);
}
.btn--solid { background: var(--accent); color: #fff; }
.btn--solid:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 14px 28px -14px rgba(155,29,51,.55); }
.btn--outline { border-color: var(--text); color: var(--text); }
.btn--outline:hover { background: var(--text); color: var(--bg); }
.btn--ghost { border-color: var(--line-strong); color: var(--muted); }
.btn--ghost:hover { color: var(--text); border-color: var(--text); }
.btn--full { width: 100%; }
.btn[disabled] { opacity: .6; cursor: wait; }

.btn-arrow { display: inline-flex; align-items: center; gap: 10px; color: var(--accent); font-weight: 800; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
.btn-arrow:hover { gap: 16px; }
.btn-arrow::after { content: '→'; transition: .2s; }

/* ---------- Шапка ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(247, 244, 239, .88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: .3s;
}
.header--scrolled { background: rgba(247,244,239,.97); box-shadow: 0 10px 30px -18px rgba(27,23,18,.25); }
.header__inner { display: flex; align-items: center; gap: 30px; height: 76px; }

.logo { display: flex; flex-direction: column; line-height: 1.05; }
.logo__text { font-family: var(--serif); font-size: 24px; font-weight: 600; letter-spacing: .06em; }
.logo__text b { color: var(--accent); font-weight: 700; }
.logo__sub { font-size: 10px; font-weight: 700; color: var(--muted); letter-spacing: .2em; text-transform: uppercase; margin-top: 2px; }

.nav { display: flex; gap: 28px; margin-left: auto; align-items: center; }
.nav__link { font-size: 14px; font-weight: 700; color: var(--muted); transition: .2s; letter-spacing: .02em; }
.nav__link:hover { color: var(--text); }
.nav__link--active { color: var(--accent); }
.nav__phone { font-weight: 800; white-space: nowrap; font-size: 15px; }
.header__cta { padding: 12px 24px; font-size: 12px; }

.burger { display: none; background: none; border: none; cursor: pointer; width: 34px; height: 26px; position: relative; }
.burger span { position: absolute; left: 0; width: 100%; height: 2px; background: var(--text); transition: .3s; }
.burger span:nth-child(1) { top: 0; } .burger span:nth-child(2) { top: 11px; } .burger span:nth-child(3) { top: 22px; }
.burger--open span:nth-child(1) { transform: translateY(11px) rotate(45deg); }
.burger--open span:nth-child(2) { opacity: 0; }
.burger--open span:nth-child(3) { transform: translateY(-11px) rotate(-45deg); }

/* ---------- Главный экран ---------- */
.hero { padding: 150px 0 60px; }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero__title {
  font-family: var(--serif);
  font-size: clamp(34px, 4.6vw, 56px);
  font-weight: 600;
  line-height: 1.08;
  margin: 18px 0 22px;
}
.hero__title em { font-style: italic; color: var(--accent); }
.hero__text { color: var(--muted); font-size: 17px; max-width: 480px; margin-bottom: 34px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero__meta { display: flex; gap: 28px; margin-top: 42px; flex-wrap: wrap; }
.hero__meta-item { display: flex; flex-direction: column; gap: 2px; }
.hero__meta-item b { font-family: var(--serif); font-size: 24px; font-weight: 600; }
.hero__meta-item span { color: var(--muted); font-size: 13px; }

.hero__media { position: relative; }
.hero__media::before {
  content: '';
  position: absolute;
  inset: 26px -26px -26px 26px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  z-index: 0;
  opacity: .5;
}
.hero__media img {
  position: relative;
  z-index: 1;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 4.6;
  object-fit: cover;
}
.hero__badge {
  position: absolute;
  z-index: 2;
  left: 22px; bottom: 22px;
  background: var(--dark);
  color: #f4efe7;
  padding: 14px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}
.hero__badge b { color: #e8c15a; }

/* Страницный (внутренний) герой */
.page-hero { padding: 170px 0 70px; background: linear-gradient(180deg, var(--bg-alt), var(--bg)); border-bottom: 1px solid var(--line); }
.page-hero .crumbs { font-size: 13px; color: var(--muted); margin-bottom: 26px; letter-spacing: .04em; }
.page-hero .crumbs a { color: var(--muted); }
.page-hero .crumbs a:hover { color: var(--accent); }

/* ---------- Статистика ---------- */
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: .3s; }
.stat:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.stat__img { height: 180px; overflow: hidden; }
.stat__img img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85); transition: .5s; }
.stat:hover .stat__img img { transform: scale(1.05); }
.stat__value { font-family: var(--serif); font-size: 30px; font-weight: 600; padding: 20px 22px 2px; }
.stat__label { color: var(--muted); font-size: 14px; padding: 0 22px 22px; }

/* ---------- Услуги ---------- */
.services__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: .3s;
  display: flex;
  flex-direction: column;
}
.service:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.service__img { height: 200px; overflow: hidden; }
.service__img img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.9); transition: .5s; }
.service:hover .service__img img { transform: scale(1.06); }
.service h3 { font-family: var(--serif); font-size: 21px; font-weight: 600; padding: 22px 24px 8px; line-height: 1.25; }
.service p { color: var(--muted); font-size: 14px; padding: 0 24px; flex: 1; }
.service__price { padding: 18px 24px 24px; color: var(--accent); font-weight: 800; font-size: 15px; letter-spacing: .02em; }
.service__price small { color: var(--muted); font-weight: 500; }
.section-cta { display: flex; gap: 14px; justify-content: center; margin-top: 48px; flex-wrap: wrap; }

/* ---------- Выделенный блок (запчасти со скидкой и т.п.) ---------- */
.highlight {
  background: linear-gradient(120deg, #211a15, #38241f);
  color: #f4efe7;
  border-radius: 14px;
  padding: 48px;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 40px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.highlight::after {
  content: '';
  position: absolute;
  right: -80px; top: -80px;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(155,29,51,.55), transparent 70%);
}
.highlight h3 { font-family: var(--serif); font-size: clamp(24px, 3vw, 34px); font-weight: 600; margin-bottom: 12px; position: relative; z-index: 1; }
.highlight p { color: #c9c1b6; position: relative; z-index: 1; }
.highlight b { color: #e8c15a; }
.highlight__side { position: relative; z-index: 1; display: grid; gap: 12px; justify-items: start; }
.highlight__tag { font-size: 12px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: #e8c15a; }

/* ---------- Прайс ---------- */
.prices__table { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.price-row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; padding: 17px 26px; border-bottom: 1px solid var(--line); font-size: 15px; align-items: center; }
.price-row:last-child { border-bottom: none; }
.price-row--head { background: var(--bg-alt); font-weight: 800; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.price-row div:nth-child(2), .price-row div:nth-child(3) { font-weight: 700; text-align: center; white-space: nowrap; }
.prices__note { color: var(--muted); font-size: 13px; margin-top: 16px; }
.prices__note b { color: var(--accent); }

/* ---------- Преимущества ---------- */
.advantages__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.adv { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 30px; transition: .3s; }
.adv:hover { border-color: var(--accent); transform: translateY(-4px); }
.adv__num { font-family: var(--serif); font-size: 15px; color: var(--accent); letter-spacing: .1em; margin-bottom: 16px; }
.adv h3 { font-family: var(--serif); font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.adv p { color: var(--muted); font-size: 14px; }

/* ---------- Отзывы ---------- */
.reviews__slider { display: flex; gap: 20px; overflow: hidden; }
.review {
  flex: 0 0 calc(33.333% - 14px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.review__stars { color: var(--accent); letter-spacing: .2em; font-size: 16px; }
.review p { color: #45403a; font-size: 15px; flex: 1; }
.review__author { font-weight: 800; }
.review__car { color: var(--muted); font-size: 13px; }
.reviews__nav { display: flex; gap: 12px; justify-content: center; margin-top: 34px; }
.slider-btn {
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: none; color: var(--text);
  font-size: 18px; cursor: pointer; transition: .25s;
}
.slider-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Заявка (форма) ---------- */
.request__card {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.request__info {
  padding: 52px 44px;
  background: linear-gradient(165deg, #241b16, #3a2027);
  color: #f4efe7;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.request__info .eyebrow { color: #e8c15a; }
.request__info .eyebrow::before { background: #e8c15a; }
.request__info h2 { font-family: var(--serif); font-size: clamp(26px, 3vw, 36px); font-weight: 600; line-height: 1.15; }
.request__info p { color: #c9c1b6; font-size: 15px; }
.request__points { list-style: none; display: grid; gap: 10px; font-size: 14px; color: #ded6c9; }
.request__points li { padding-left: 26px; position: relative; }
.request__points li::before { content: '✓'; position: absolute; left: 0; color: #e8c15a; font-weight: 800; }
.request__phone { margin-top: auto; font-size: 24px; font-weight: 800; color: #e8c15a; }
.request__hours { color: #9d948a; font-size: 13px; }

.request__form { padding: 52px 44px; display: grid; gap: 18px; align-content: start; }
.form-group { display: grid; gap: 6px; }
.form-group label { font-size: 12px; font-weight: 800; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }
.form-group input, .form-group select, .form-group textarea {
  background: #fcfaf7;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 14px 16px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  transition: .2s;
  width: 100%;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-group input.error, .form-group select.error { border-color: var(--accent); }
.form-group textarea { resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.form-note {
  display: flex;
  gap: 12px;
  background: var(--accent-soft);
  border: 1px solid rgba(155,29,51,.18);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: #6d4550;
}
.form-note::before { content: 'ⓘ'; color: var(--accent); font-weight: 800; }

.form-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); cursor: pointer; }
.form-consent input { accent-color: var(--accent); margin-top: 3px; }
.form-status { font-size: 14px; min-height: 20px; font-weight: 600; }
.form-status--ok { color: #1e7d43; }
.form-status--err { color: var(--accent); }

/* ---------- Контакты ---------- */
.contacts__grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; }
.contacts__info { display: grid; gap: 24px; align-content: start; }
.contact-item h4 { font-family: var(--serif); font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.contact-item p { color: var(--muted); font-size: 15px; }
.contact-item a:hover { color: var(--accent); }
.contacts__socials { display: flex; gap: 10px; }
.contacts__socials a {
  width: 46px; height: 46px;
  border: 1px solid var(--line-strong); border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 800; transition: .25s;
}
.contacts__socials a:hover { border-color: var(--accent); color: var(--accent); }
.contacts__map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); min-height: 380px; box-shadow: var(--shadow); }
.contacts__map iframe { display: block; }

/* ---------- Подвал ---------- */
.footer { background: var(--dark); color: #b5aca0; padding: 56px 0 34px; margin-top: 40px; }
.footer a { color: #d8d0c5; }
.footer a:hover { color: #e8c15a; }
.footer__top { display: grid; grid-template-columns: 1.2fr 2fr; gap: 40px; padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer__logo { font-family: var(--serif); font-size: 26px; color: #f4efe7; letter-spacing: .05em; }
.footer__logo b { color: #e8c15a; }
.footer__tag { color: #8d857a; font-size: 13px; margin-top: 8px; max-width: 320px; }
.footer__nav { display: grid; grid-template-columns: repeat(4, auto); gap: 8px 40px; justify-content: end; align-content: start; font-size: 14px; }
.footer__nav a { display: block; padding: 4px 0; }
.footer__nav span { display: block; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: #8d857a; margin-bottom: 8px; }
.footer__bottom { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; padding-top: 26px; font-size: 13px; }
.footer__bottom .spacer { flex: 1; }

/* ---------- Модалка ---------- */
.modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(23,19,15,.55); backdrop-filter: blur(5px);
  display: none; place-items: center; padding: 20px;
}
.modal--open { display: grid; }
.modal__box { background: var(--card); border-radius: 14px; max-width: 560px; padding: 40px; position: relative; box-shadow: var(--shadow); }
.modal__box h3 { font-family: var(--serif); margin-bottom: 14px; }
.modal__box p { color: var(--muted); font-size: 14px; }
.modal__close { position: absolute; top: 12px; right: 18px; background: none; border: none; color: var(--muted); font-size: 28px; cursor: pointer; }
.modal__close:hover { color: var(--text); }

/* ---------- Магазин двигателей ---------- */
.store__filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.chip {
  padding: 10px 20px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: none; color: var(--muted); font-family: var(--sans);
  font-size: 13px; font-weight: 700; cursor: pointer; transition: .2s;
}
.chip:hover { color: var(--text); border-color: var(--text); }
.chip--active { background: var(--accent); border-color: var(--accent); color: #fff; }

.store__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.store__loading { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 40px 0; }

.product {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: .3s;
}
.product:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: transparent; }
.product__img { height: 170px; margin: -26px -24px 4px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.product__img img { width: 100%; height: 100%; object-fit: cover; transition: .5s; }
.product:hover .product__img img { transform: scale(1.05); }
.product__badge {
  position: absolute;
  top: 36px; left: 24px;
  font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px; z-index: 1;
}
.product__badge--available { background: rgba(30,125,67,.9); color: #fff; }
.product__badge--order     { background: rgba(23,19,15,.85); color: #e8c15a; }
.product__badge--out       { background: rgba(107,114,128,.85); color: #fff; }
.product h3 { font-family: var(--serif); font-size: 20px; font-weight: 600; line-height: 1.25; }
.product__specs { color: var(--muted); font-size: 13px; display: grid; gap: 3px; }
.product__specs b { color: var(--text); font-weight: 700; }
.product__desc { color: var(--muted); font-size: 14px; flex: 1; }
.product__price-row { display: flex; align-items: baseline; gap: 10px; }
.product__price { font-family: var(--serif); font-size: 26px; font-weight: 700; color: var(--accent); }
.product__price small { font-family: var(--sans); font-size: 13px; color: var(--muted); font-weight: 500; }
.product__old { text-decoration: line-through; color: var(--muted); font-size: 15px; }
.product .btn { margin-top: 6px; }

/* ---------- Плавающий звонок ---------- */
.float-call {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: none; place-items: center; font-size: 22px;
  box-shadow: 0 12px 30px -8px rgba(155,29,51,.6);
}

/* ---------- Анимация появления ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.reveal--visible { opacity: 1; transform: none; }

/* ---------- Адаптив ---------- */
@media (max-width: 1024px) {
  .services__grid, .advantages__grid { grid-template-columns: repeat(2, 1fr); }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .store__grid { grid-template-columns: repeat(2, 1fr); }
  .review { flex: 0 0 calc(50% - 10px); }
  .hero__grid { grid-template-columns: 1fr; gap: 44px; }
  .hero__media { max-width: 520px; }
  .hero__media::before { inset: 20px -18px -18px 20px; }
  .request__card { grid-template-columns: 1fr; }
  .contacts__grid { grid-template-columns: 1fr; }
  .highlight { grid-template-columns: 1fr; padding: 36px 28px; }
  .footer__top { grid-template-columns: 1fr; }
  .footer__nav { justify-content: start; }
}

@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .hero { padding: 130px 0 40px; }
  .page-hero { padding: 140px 0 50px; }
  .nav {
    position: fixed; top: 0; right: -100%; width: min(320px, 84vw); height: 100vh;
    background: var(--card); flex-direction: column; align-items: flex-start;
    padding: 96px 32px 32px; gap: 22px; transition: right .35s; z-index: 99;
    border-left: 1px solid var(--line);
    box-shadow: -20px 0 60px -30px rgba(27,23,18,.4);
  }
  .nav--open { right: 0; }
  .header__cta { display: none; }
  .burger { display: block; margin-left: auto; z-index: 101; }
  .services__grid, .advantages__grid, .stats__grid { grid-template-columns: 1fr; }
  .store__grid { grid-template-columns: 1fr; }
  .review { flex: 0 0 100%; }
  .price-row { grid-template-columns: 1fr; gap: 2px; }
  .price-row div:nth-child(2), .price-row div:nth-child(3) { text-align: left; font-weight: 600; color: var(--accent); white-space: normal; }
  .price-row--head { display: none; }
  .request__info, .request__form { padding: 36px 26px; }
  .form-row { grid-template-columns: 1fr; }
  .float-call { display: grid; }
  .hero__meta { gap: 20px; }
}
