* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 32px 60px;
}

.hero {
  padding: 50px 0;
  padding-top: 150px;
  text-align: center;
  background-color: #090b0b;
}

.title {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 16px;
  line-height: 1.2;
}

.lead {
  font-size: 1.05rem;
  color: #b0b0b0;
  margin: 0 auto;
  line-height: 1.6;
  max-width: 820px;
}

.section-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.model-section {
  margin-bottom: 40px;
}

.model-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.model-btn {
  position: relative;
  padding: 20px 16px 16px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  font-weight: 700;
  font-size: 1rem;
  color: #dbdbdb;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.model-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}
.model-btn--active {
  background: rgba(240, 124, 46, 0.08);
  border-color: transparent;
  border-bottom-color: #ff9549;
  color: #ff9549;
}
.model-btn--active .model-btn__name {
  color: #ff9549;
}

.model-btn__img {
  width: 100%;
  max-width: 160px;
  height: 80px;
  object-fit: contain;
  display: block;
}
.model-btn__name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: color 0.25s;
}

.complect-section {
  margin-bottom: 40px;
}

.complect-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.complect-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 8px;
  border: 2px solid #252c2c;
  background: #252c2c;
  font-weight: 600;
  font-size: 0.9rem;
  color: #dbdbdb;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
}
.complect-btn svg {
  opacity: 0;
  color: #ff9549;
}
.complect-btn:hover {
  background: #313a3a;
  color: #ffffff;
}
.complect-btn--active {
  border-color: #ff9549;
}
.complect-btn--active svg {
  opacity: 1;
}

.dealer-section {
  margin-bottom: 40px;
}

.dealer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
}

.dealer-select {
  flex: 1;
  min-width: 240px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.06);
  font-family: inherit;
  color: #a0a0a0;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a0a0a0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
  transition: border-color 0.2s;
}
.dealer-select:focus {
  outline: none;
  border-color: #ff9549;
  color: #ffffff;
}
.dealer-select option {
  background: #1e2222;
  color: #dbdbdb;
}

.btn-nearby {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 32px;
  background: #ff9549;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.1s;
  font-family: inherit;
  white-space: nowrap;
}
.btn-nearby:hover {
  background: #d96a22;
}
.btn-nearby:active {
  transform: scale(0.97);
}
.btn-nearby__icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.map-wrapper {
  margin-top: 24px;
  width: 100%;
  height: 400px;
  overflow: hidden;

  max-height: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.4s ease 0.1s,
    visibility 0s linear 0.6s;

  background: #252c2c;
}

.map-wrapper.is-visible {
  max-height: 400px;
  opacity: 1;
  visibility: visible;
  transition:
    max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.4s ease,
    visibility 0s linear 0s;
}

.map-layout {
  display: flex;
  width: 100%;
  height: 100%;
  position: relative;
}

.dealer-sidebar {
  width: 360px;
  background: #1e2222;
  display: flex;
  flex-direction: column;
  z-index: 2;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  overflow-y: auto;
}

.sidebar-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ff9549;
  text-decoration: none;
  font-size: 0.9rem;
  cursor: pointer;
  transition: opacity 0.2s;
}
.back-link:hover {
  opacity: 0.8;
}
.back-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.dealer-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dealer-item {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: background 0.2s;
}
.dealer-item:hover {
  background: rgba(255, 255, 255, 0.03);
}
.dealer-item.active {
  background: rgba(255, 149, 73, 0.08);
}

.dealer-item__name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dealer-item__arrow {
  color: #ff9549;
  font-size: 1.2rem;
  line-height: 1;
}

.dealer-item__address {
  font-size: 0.9rem;
  color: #a0a0a0;
  margin-bottom: 12px;
  line-height: 1.4;
}

.dealer-item__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
}
.meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #888;
}
.meta-row a {
  color: #ff9549;
  text-decoration: none;
}
.meta-row a:hover {
  text-decoration: underline;
}

.dealer-details-view {
  display: none;
  padding: 24px;
  flex-direction: column;
  height: 100%;
}
.dealer-details-view.active {
  display: flex;
}

.details-name {
    margin-top: 20px;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 24px;
}

.details-info-block {
  margin-bottom: 20px;
}
.details-label {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.details-value {
  font-size: 1rem;
  color: #dbdbdb;
}
.details-value.link {
  color: #ff9549;
  text-decoration: none;
}

.map-container {
  flex: 1;
  position: relative;
  background: #2a2f2f;
}

#yandex-map {
  width: 100%;
  height: 400px;
  position: absolute;
  top: 0;
  left: 0;
}

.contact-section {
  margin-bottom: 32px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 20px;
}
.contact-grid__full {
  grid-column: 1 / -1;
}

.form-group {
    position: relative;
  display: flex;
  flex-direction: column;
}
.form-group__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #a1a5a5;
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}
.form-group__required {
  color: #ff9549;
  margin-left: 2px;
}
.form-group__input,
.form-group__textarea {
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.06);
  font-family: inherit;
  color: #ffffff;
  transition:
    border 0.2s,
    box-shadow 0.2s;
  width: 100%;
}
.form-group__input::placeholder,
.form-group__textarea::placeholder {
  color: #666666;
}
.form-group__input:focus,
.form-group__textarea:focus {
  outline: none;
  border-color: #ff9549;
}
.form-group__input:hover,
.form-group__textarea:hover {
  outline: none;
  border-color: #ff9549;
}
.form-group__textarea {
  resize: vertical;
  min-height: 90px;
}

/* Стили для валидации */
.form-group__input.error {
  border-color: #ff4444;
  background: rgba(255, 68, 68, 0.08);
}
.form-group__input.error:focus {
  border-color: #ff4444;
  box-shadow: 0 0 0 3px rgba(255, 68, 68, 0.15);
}

.form-group__error {
        position: absolute;
    bottom: -20px;
  font-size: 12px;
  color: #ff4444;
  margin-top: 6px;
  min-height: 20px;
  display: block;
  transition: opacity 0.2s;
}

.btn-submit {
  display: block;
  background: #ff9549;
  min-width: 200px;
  margin: 0 auto;
  border: none;
  padding: 15px 32px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.1s;
  text-align: center;
  letter-spacing: 0.3px;
  font-family: inherit;
}
.btn-submit:hover {
  background: #d96a22;
}
.btn-submit:active {
  transform: scale(0.97);
}

.consent-section {
  margin-top: 32px;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.consent-label {
    position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: #a0a0a0;
  cursor: pointer;
  line-height: 1.4;
}
.consent-label .form-group__error {
    position: static;
}
.consent-label__checkbox {
  width: 18px;
  height: 18px;
  accent-color: #ff9549;
  cursor: pointer;
  margin-top: 2px;
  flex-shrink: 0;
}
.consent-label__link {
  color: #ff9549;
  text-decoration: underline;
}

.footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: #666666;
}
.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  align-items: center;
}
.footer__link {
  color: #a0a0a0;
  text-decoration: none;
  font-weight: 500;
}
.footer__link:hover {
  color: #ff9549;
}
.footer__copy {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.85rem;
  color: #555555;
}

@media (max-width: 860px) {
  .model-grid,
  .complect-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
  .contact-grid__full {
    grid-column: 1;
  }

  .title {
    font-size: 1.8rem;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .dealer-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-nearby {
    justify-content: center;
  }

  .map-wrapper {
    height: auto;
  }
  .map-wrapper.is-visible {
    max-height: 800px;
    min-height: 600px;
  }

  .map-layout {
    flex-direction: column;
  }

  .dealer-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    max-height: 400px;
  }

  .map-container {
    height: 350px;
    min-height: 350px;
  }
}

@media (max-width: 586px) {
    .container {
        padding: 40px 15px;
    }
    
  .model-grid,
  .complect-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .model-btn,
  .complect-btn {
    padding: 12px 10px;
    font-size: 0.85rem;
  }
  
  .hero {
      padding: 80px 0 0;
  }

  .lead {
    padding: 14px 16px;
    font-size: 0.95rem;
  }

  .title {
    font-size: 1.5rem;
  }
}
