.map-card {
  position: relative;
  background: #E7DBC3;
  border-radius: 24px;
  padding: 44px 48px 56px;
}

.map-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-5);
  margin-bottom: 30px;
}

.map-heading {
  font-size: var(--text-4xl);
  line-height: 1.15;
  color: var(--text-primary);
}

.map-heading strong {
  display: block;
  color: var(--accent-500);
}

.map-city-select {
  position: relative;
  flex: none;
}

.map-city-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: none;
  border-radius: var(--radius-full);
  padding: 14px 20px;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.map-city-btn::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--accent-500);
  border-bottom: 2px solid var(--accent-500);
  transform: rotate(45deg);
  margin-top: -3px;
  transition: transform var(--transition);
}

.map-city-select.open .map-city-btn::after {
  transform: rotate(-135deg);
  margin-top: 3px;
}

.map-city-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  max-height: 320px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: none;
  flex-direction: column;
  z-index: 10;
}

.map-city-select.open .map-city-panel {
  display: flex;
}

.map-city-search {
  border: none;
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 16px;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  outline: none;
}

.map-city-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
}

.map-city-list li {
  padding: 10px 16px;
  font-size: var(--text-sm);
  color: var(--text-primary);
  cursor: pointer;
}

.map-city-list li:hover {
  background: var(--bg-subtle);
}

.map-city-list li.placeholder {
  color: #fff;
  background: var(--accent-500);
  font-weight: 600;
}

.map-city-list li.placeholder:hover {
  background: var(--accent-600);
}

.map-holder {
  position: relative;
  max-width: 1160px;
  margin: 0 auto;
  overflow: hidden;
}

.map-holder svg {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 1007.478 / 527.323;
}

.map-il {
  fill: #fff;
  stroke: #DCCEB0;
  stroke-width: 1.2;
  outline: none;
}

.map-il.dealer {
  fill: var(--accent-500);
  cursor: pointer;
  transition: fill 150ms;
}

.map-il.dealer:hover,
.map-il.dealer:focus-visible {
  fill: var(--accent-600);
}

.map-il.dealer:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 3px;
}

.map-il.dealer.selected {
  fill: var(--accent-500);
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .25));
}

.map-il.selected:not(.dealer) {
  fill: var(--neutral-300);
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .25));
}

.map-il.hidden {
  display: none;
}

.map-dot {
  cursor: pointer;
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: mapPinDrop .6s cubic-bezier(.34, 1.56, .64, 1) backwards;
}

.map-dot image {
  transition: transform 150ms;
  transform-box: fill-box;
  transform-origin: 50% 100%;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .35));
}

@keyframes mapPinDrop {
  0% { transform: translateY(-36px) scale(.4); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.map-dot:hover image,
.map-dot.open image {
  transform: scale(1.3);
}

.map-back-btn {
  position: absolute;
  top: 14px;
  left: 0;
  z-index: 5;
  display: none;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.map-back-btn.show {
  display: inline-flex;
}

.map-back-btn:hover {
  box-shadow: var(--shadow-md);
}

.map-city-label {
  position: absolute;
  bottom: 14px;
  left: 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--text-primary);
  display: none;
}

.map-city-label.show {
  display: block;
}

.map-no-dealer {
  position: absolute;
  bottom: 14px;
  right: 14px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  display: none;
}

.map-no-dealer.show {
  display: block;
}

.map-dealer-card {
  position: absolute;
  z-index: 30;
  width: 270px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms;
}

.map-dealer-card.show {
  opacity: 1;
  pointer-events: auto;
}

.map-dealer-card h4 {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: 6px;
}

.map-dealer-card span {
  display: block;
  font-size: .85rem;
  color: var(--text-secondary);
  margin-bottom: 3px;
}

.map-dealer-card .map-dealer-phone {
  display: block;
  font-size: .85rem;
  color: var(--text-secondary);
  margin-bottom: 3px;
  text-decoration: none;
}

.map-dealer-card .map-dealer-phone:hover {
  color: var(--brand-600);
  text-decoration: underline;
}

.map-dealer-card .directions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: var(--space-3);
  font-size: .85rem;
  font-weight: 600;
  color: var(--brand-600);
  text-decoration: none;
}

.map-dealer-card .directions:hover {
  color: var(--brand-700);
}

@media (max-width: 700px) {
  .map-card {
    padding: 28px 22px 32px;
  }

  .map-card-head {
    flex-direction: column;
  }

  .map-city-panel {
    right: auto;
    left: 0;
  }

  .map-holder {
    margin-left: -22px;
    margin-right: -22px;
  }

  .map-back-btn {
    left: 22px;
  }

  .map-city-label,
  .map-no-dealer {
    left: 22px;
  }

  .map-no-dealer {
    right: 22px;
  }
}
