.contact-sales {
  padding: 72px 0 80px;
  background-color: #fff;
  position: relative;
  overflow: hidden;
}

.contact-sales-map {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -44%);
  width: 80%;
  max-width: 1100px;
  pointer-events: none;
  user-select: none;
  opacity: 1;
}

.contact-sales-header {
  text-align: center;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.contact-sales-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.contact-sales-title-line {
  display: block;
  width: 56px;
  height: 2px;
  background: #c8c8c8;
  flex-shrink: 0;
}

.contact-sales-title {
  font-size: 30px;
  font-weight: 700;
  color: #121212;
  margin: 0;
  white-space: nowrap;
}

.contact-sales-subtitle {
  font-size: 15px;
  color: #999;
  margin: 0;
  letter-spacing: 0.01em;
}

.contact-sales-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: relative;
  z-index: 1;
  margin-top: 36px;
}

.contact-sales-region {
  padding: 32px 28px 36px;
  text-align: center;
  border-right: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.contact-sales-region:last-child {
  border-right: none;
}

.contact-region-code {
  font-size: 28px;
  font-weight: 800;
  color: #111;
  margin: 0 0 10px;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.contact-region-name {
  font-size: 14px;
  color: #888;
  margin: 0 0 28px;
  line-height: 1.5;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-region-email-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-bottom: 28px;
}

.contact-region-email-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.contact-region-email {
  font-size: 14px;
  color: #2878ff;
  text-decoration: none;
  transition: color 0.15s;
  word-break: break-all;
}

.contact-region-email:hover {
  color: #1a5fd4;
  text-decoration: underline;
}

.contact-region-messengers {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.contact-messenger-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  line-height: 0;
}

.contact-messenger-icon {
  width: 36px;
  height: 36px;
  display: block;
  transition:
    transform 0.15s,
    opacity 0.15s;
  border-radius: 50%;
}

.contact-messenger-btn:hover .contact-messenger-icon {
  transform: scale(1.12);
  opacity: 0.9;
}

.contact-qr-popup {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 100px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
  padding: 5px;
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 0.15s,
    transform 0.15s;
  transform: translateX(-50%) translateY(4px);
}

.contact-qr-popup::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #ddd;
}

.contact-qr-popup::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #fff;
  z-index: 1;
}

.contact-messenger-btn:hover .contact-qr-popup,
.contact-messenger-btn:focus .contact-qr-popup {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.contact-qr-popup-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.contact-qr-popup-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #bbb;
  text-align: center;
  line-height: 1.3;
}

.contact-messenger-btn.no-qr .contact-qr-popup {
  display: none;
}

@media (max-width: 900px) {
  .contact-sales {
    padding: 52px 0 60px;
  }

  .contact-sales-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-sales-region {
    border-right: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
  }

  .contact-sales-region:nth-child(2n) {
    border-right: none;
  }

  .contact-sales-region:nth-last-child(-n + 2) {
    border-bottom: none;
  }

  .contact-sales-map {
    width: 140%;
  }
}

@media (max-width: 560px) {
  .contact-sales {
    padding: 40px 0 50px;
  }

  .contact-sales-title {
    font-size: 22px;
  }

  .contact-sales-title-line {
    width: 36px;
  }

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

  .contact-sales-region {
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
    padding: 28px 20px 32px;
  }

  .contact-sales-region:last-child {
    border-bottom: none;
  }

  .contact-region-name {
    min-height: auto;
  }

  .contact-sales-map {
    width: 200%;
  }
}
