/* ═══════════════════
   СТРАНИЦА АВТОМОБИЛЯ
═══════════════════ */

.car-hero { padding: 0 var(--page-pad) 32px; }
.car-hero__inner {
  max-width: var(--content-w);
  margin: 0 auto;
  display: flex;
  gap: 24px;
  align-items: stretch;
}

/* Карточка авто: corner 18, белый фон, border e3eaf0 60%, shadow + blur */
.car-main {
  flex: 1;
  min-width: 0;
  min-height: 460px;
  flex-shrink: 1;
  border-radius: 18px;
  background: #fff;
  border: 2px solid rgba(227, 234, 240, 0.6);
  box-shadow: 0 8px 32px rgba(19,28,41,.08), 0 2px 8px rgba(19,28,41,.04);
  backdrop-filter: blur(8px);
  display: flex;
  overflow: hidden;
}

/* Левая зона */
.car-main__visual {
  flex: 1;
  min-width: 0;
  padding: 22px 20px 18px 24px;
  display: flex;
  flex-direction: column;
  background: url('../img/sections/car-detail/mask-group.svg') center / cover no-repeat;
}
.car-main__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.car-main__name {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark);
}
/* Бейдж акции: 173×34, corner 48, bg #E3FBDF, текст #0DAD38 */
.car-main__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 173px;
  height: 34px;
  padding: 0 14px;
  border-radius: 48px;
  background: #E3FBDF;
  color: #0DAD38;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Фото машины */
.car-main__img {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  padding: 8px 0;
}
.car-main__img img {
  max-width: 100%;
  max-height: 245px;
  object-fit: contain;
}

/* Цвета */
.car-main__colors {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.car-main__colors-label {
  font-size: 14px;
  font-weight: 600;
  color: #000;
  white-space: nowrap;
}
/* Чип цвета: 31×20, corner 20 */
.car-swatch {
  width: 31px;
  height: 20px;
  border-radius: 20px;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform .18s;
}
.car-swatch--white  { border: 2px solid #369D70; }
.car-swatch--active { outline: 2px solid #369D70; outline-offset: 2px; }
.car-swatch:hover:not(.car-swatch--active) { transform: scale(1.1); }

/* Блоки характеристик */
.car-main__specs {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.car-spec-block {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border-radius: 33px;
  background: #fff;
  font-size: 14px;
  color: var(--dark);
  white-space: nowrap;
  flex-shrink: 0;
}
/* разгон: 233px; расход: hug */
.car-spec-block--wide { width: 233px; }
/* текст блока: medium */
.car-spec-block span { font-weight: 500; }
/* цифры: 16px, #0C78ED */
.spec-val { font-size: 16px; font-weight: 700; color: #0C78ED; }
.icon-blue {
  filter: brightness(0) saturate(100%)
    invert(24%) sepia(86%) saturate(1540%)
    hue-rotate(204deg) brightness(94%) contrast(98%);
}

/* Правая зона: цены */
.car-main__pricing {
  width: 278px;
  flex-shrink: 0;
  padding: 20px 24px 20px 24px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
}
/* Вертикальная линия — короче краёв */
.car-main__pricing::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12%;
  height: 76%;
  width: 1.5px;
  background: rgba(227, 234, 240, 0.85);
}
.car-price-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 0;
}
.car-price-label {
  font-size: 14px;
  font-weight: 400;
  color: #000;
  line-height: 1.35;
}
/* Цена: 28px, жирная */
.car-price-val {
  font-size: 28px;
  font-weight: 800;
  color: var(--dark);
}
.car-price-val--green { color: var(--green); }
.car-price-val--red   { color: var(--red); }
/* Полоска-разделитель */
.car-price-divider {
  height: 1px;
  background: rgba(227, 234, 240, 0.9);
  width: 100%;
  margin: 18px 0;
}

/* Sidebar — обёртка двух блоков */
.car-sidebar {
  width: 396px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Блок 1: Телефон — 396×78, corner 20, градиент F6F6F6→#FFF, stroke F0E6E3 */
.car-sidebar__phone-card {
  width: 100%;
  min-height: 78px;
  border-radius: 20px;
  background: linear-gradient(to right, #F6F6F6 0%, #FFFFFF 77%, #FFFFFF 100%);
  border: 1px solid #F0E6E3;
  box-shadow: 0 4px 16px rgba(19,28,41,.07), 0 1px 4px rgba(19,28,41,.04);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  flex-shrink: 0;
}
.car-sidebar__call-icon {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
}
.car-sidebar__call-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.car-sidebar__call-label {
  font-size: 14px;
  font-weight: 600;
  color: #000;
  line-height: 1.3;
}
.car-sidebar__call-phone {
  font-size: 26px;
  font-weight: 700;
  color: #0DAD38;
  line-height: 1.2;
  letter-spacing: -.5px;
}

/* Блок 2: Форма — 396×342, corner 20, тот же градиент и stroke */
.car-sidebar__form-card {
  width: 100%;
  min-height: 342px;
  flex: 1;
  border-radius: 20px;
  background: linear-gradient(to right, #F6F6F6 0%, #FFFFFF 77%, #FFFFFF 100%);
  border: 1px solid #F0E6E3;
  box-shadow: 0 4px 16px rgba(19,28,41,.07), 0 1px 4px rgba(19,28,41,.04);
  display: flex;
  flex-direction: column;
}
.car-sidebar__title {
  font-size: 24px;
  font-weight: 700;
  color: #131C29;
  padding: 24px 20px 0;
  line-height: 1.25;
}
.car-sidebar__sub {
  font-size: 16px;
  font-weight: 400;
  color: #1D2032;
  padding: 6px 20px 16px;
}
.car-sidebar__form {
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.car-sidebar__btn {
  width: 100%;
  padding: 13px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Roboto', sans-serif;
  cursor: pointer;
  transition: opacity .2s;
  margin-top: 2px;
}
.car-sidebar__btn:hover { opacity: .88; }
.car-sidebar__form .promo-form__check { padding: 0; }

.car-configs { padding: 0 var(--page-pad) 48px; }
.car-configs__inner { max-width: var(--content-w); margin: 0 auto; }

.car-configs__tabs {
  display: flex;
  gap: 48px;
  margin-bottom: 28px;
}
/* Таб: Bold 28px, анимированная полоска по ширине текста */
.car-tab {
  position: relative;
  background: none;
  border: none;
  padding: 0 0 10px;
  font-size: 28px;
  font-weight: 700;
  font-family: 'Roboto', sans-serif;
  color: #9a9a9a;
  cursor: pointer;
  transition: color .25s;
}
.car-tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: var(--red);
  border-radius: 3px;
  transition: width .35s cubic-bezier(.16, 1, .3, 1);
}
.car-tab--active { color: #1D2032; }
.car-tab--active::after { width: 100%; }
.car-tab:hover:not(.car-tab--active) { color: var(--dark); }
.car-tab-panel--hidden { display: none; }

/* Двигатель: без обводки, Semibold 20 чёрный */
.car-configs__engine {
  display: block;
  font-size: 20px;
  font-weight: 600;
  color: #000;
  margin-bottom: 14px;
}

/* Config table — без рамок */
.config-table {
  width: 100%;
  border: none;
  border-radius: 0;
  overflow: visible;
  margin-bottom: 8px;
}
.config-table__head,
.config-row {
  display: grid;
  grid-template-columns: 230px 155px 195px 268px 265px 52px;
  align-items: center;
}
.config-table__head {
  background: transparent;
  border-bottom: none;
  margin-bottom: 6px;
}
.config-th {
  padding: 0 10px 8px;
  font-size: 14px;
  font-weight: 400;
  color: #797979;
  white-space: nowrap;
}
.config-th--main { padding-left: 0; }
.config-th--dl { text-align: center; padding-right: 0; }

/* Строка: 1180×62, corner 4, белый, тень */
.config-row {
  height: 62px;
  border-top: none;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(19,28,41,.06), 0 1px 3px rgba(19,28,41,.04);
  margin-bottom: 6px;
}
.config-cell { padding: 0 10px; font-size: 14px; }
.config-cell--main {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-left: 18px;
}
.config-cell--dl { display: flex; align-items: center; justify-content: center; padding: 0; }

/* Чекбокс — интерактивный, с красной рамкой */
.config-cb-label {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.config-cb { display: none; }
.config-check {
  width: 24px;
  height: 24px;
  border: 1.5px solid var(--red);
  border-radius: 5px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 65%;
  transition: background-color .15s;
}
.config-cb:checked + .config-check {
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='11' viewBox='0 0 14 11' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 5.2L5 9.5L13 1' stroke='%23e60000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.config-name {
  font-size: 16px;
  font-weight: 400;
  color: #172419;
}
.config-toggle {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform .3s, background .2s;
  color: var(--red);
  flex-shrink: 0;
}
.config-toggle svg { width: 18px; height: 18px; }
.config-toggle:hover { background: rgba(230,0,0,.07); }
.config-row--open .config-toggle { transform: rotate(180deg); }

.config-price-old { font-size: 14px; font-weight: 400; color: #9a9a9a; text-decoration: line-through; white-space: nowrap; }
.config-price { font-size: 18px; font-weight: 600; color: #9A1212; white-space: nowrap; }
.config-monthly { font-size: 16px; font-weight: 500; color: #2B73ED; white-space: nowrap; }

.config-submit {
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 12px;
  width: 238px;
  height: 40px;
  font-size: 16px;
  font-weight: 400;
  font-family: 'Lato', sans-serif;
  cursor: pointer;
  white-space: nowrap;
}

.config-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  opacity: .7;
  transition: opacity .2s;
  margin-left: auto;
}
.config-download img {
  width: 34px;
  height: 34px;
  filter: brightness(0) saturate(100%) invert(51%) sepia(68%) saturate(537%) hue-rotate(91deg) brightness(97%) contrast(97%);
}
.config-download:hover { opacity: 1; }

.config-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  background: #fff;
  max-height: 0;
  overflow: hidden;
  padding: 0 20px;
  transition: max-height .45s ease, padding .45s ease;
  border-top: none;
}
.config-features--visible {
  max-height: 1400px;
  padding: 22px 20px;
}
.config-features__title {
  font-size: 16px;
  font-weight: 700;
  color: #000;
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 10px;
}
.config-features__list { display: flex; flex-direction: column; gap: 6px; }
.config-features__list li {
  font-size: 14px;
  font-weight: 400;
  color: #000;
  line-height: 1.4;
  padding-left: 12px;
  position: relative;
}
.config-features__list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #000;
}

.car-configs__compare { display: flex; justify-content: flex-start; margin-top: 28px; }
.car-configs__compare-btn {
  background: none;
  border: 2px solid #E60000;
  border-radius: 55px;
  width: 245px;
  height: 45px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Roboto', sans-serif;
  color: #9A1212;
  cursor: pointer;
}

.car-specs-table {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.car-specs-row {
  display: flex;
  justify-content: space-between;
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.car-specs-row:last-child { border-bottom: none; }
.car-specs-row span:first-child { color: var(--gray); }
.car-specs-row span:last-child { font-weight: 600; color: var(--dark); }

/* Галерея */
.car-gallery { padding: 0 var(--page-pad) 48px; }
.car-gallery__inner { max-width: var(--content-w); margin: 0 auto; }
.car-gallery__title {
  font-size: 26px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 20px;
}
.gallery-slider {
  position: relative;
  background: #f0f3f8;
  border-radius: 16px;
  overflow: hidden;
}
.gallery-slides {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #e4e8f0;
}
.gallery-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .55s ease;
}
.gallery-slide--active { opacity: 1; }
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.gallery-arrow--left  { left: 20px; }
.gallery-arrow--right { right: 20px; }
.gallery-arrow img { width: 96px; height: 96px; display: block; }

/* Сегментированный прогресс поверх изображения */
.gallery-segs {
  position: absolute;
  bottom: 14px;
  left: 24px;
  right: 24px;
  z-index: 3;
  display: flex;
  gap: 5px;
}
.gallery-seg {
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,.35);
  border-radius: 1px;
  position: relative;
  overflow: hidden;
}
.gallery-seg--active::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--red);
  transform-origin: left center;
  transform: scaleX(0);
  animation: seg-fill 10s linear forwards;
}
.gallery-seg--done::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--red);
}
@keyframes seg-fill {
  to { transform: scaleX(1); }
}

.gallery-thumbs { display: flex; gap: 12px; }
