.contacts-map {
  --surface: #ffffff;
  --surface-soft: #eef2dc;
  --ink: #20252a;
  --muted: #697176;
  --line: #e1dfd2;
  --line-strong: #aeb68c;
  --accent: #bcc402;
  --accent-dark: #252a2e;
  --green: #7f8800;
  --green-deep: #bcc402;
  --shadow: 0 22px 56px rgba(30, 36, 22, 0.16);
  position: relative;
  width: 100%;
  height: 700px;
  min-height: 0;
  margin: 30px 0 50px;
  overflow: hidden;
  background: #e8ecdf;
  color: var(--ink);
}

.contacts-map,
.contacts-map * {
  box-sizing: border-box;
}

.contacts-map a {
  color: inherit;
}

.contacts-map button,
.contacts-map a {
  -webkit-tap-highlight-color: transparent;
}

.contacts-info {
  margin-bottom: 0;
}

.contacts-info__grid {
  margin-bottom: 0;
}

.contacts-shop-compact h3,
.contacts-route-compact h3 {
  margin: 0 0 8px;
  color: #383838;
  font-size: 16px;
  font-weight: 700;
  line-height: 22px;
}

.contacts-route-compact__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.contacts-route-compact__head h3 {
  margin-bottom: 0;
}

.contacts-shop-compact + .contacts-shop-compact,
.contacts-route-compact + .contacts-route-compact {
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px solid #e5e5e5;
}

.contacts-info .contacts__text p {
  margin-top: 3px;
  margin-bottom: 8px;
}

.contacts-info .contacts__area2_1.contacts__text,
.contacts-info .contacts__area2_2.contacts__text,
.contacts-info .contacts__area2_3.contacts__text {
  justify-content: flex-start;
}

.contacts-info__shared .contacts__soc {
  margin: 10px 0 12px;
}

.contacts-info .contacts__routelink {
  display: inline-block;
  border-bottom: 1px solid #38382d;
  color: #38382d;
  font-size: 14px;
  line-height: 18px;
  transition: 0.3s border-color;
}

.contacts-info .contacts__routelink:hover {
  border-color: #d5d0cf;
  color: #38382d;
}

.map-canvas {
  width: 100%;
  height: 100%;
  background: #e9ede2;
}

.map-empty {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.map-empty strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 20px;
}

.store-panel {
  position: absolute;
  z-index: 5;
  top: 22px;
  left: 32px;
  width: min(392px, calc(100% - 64px));
  max-height: calc(100% - 44px);
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(61, 71, 20, 0.18);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  scrollbar-width: thin;
}

.panel-head {
  display: grid;
  gap: 4px;
  margin: 0 2px 12px;
  padding: 2px 2px 14px;
  border-bottom: 1px solid var(--line);
}

.panel-kicker {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf0b5;
  color: var(--green-deep);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.panel-head strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.1;
}

.panel-head span:last-child {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.store-list {
  display: grid;
  gap: 12px;
}

.store-item {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease, transform 180ms ease;
}

.store-item.is-active {
  border-width: 2px;
  border-color: var(--green-deep);
  background: #fff;
  box-shadow: 0 10px 24px rgba(87, 100, 0, 0.12);
}

.store-item.is-active .store-heading {
  padding-right: 34px;
}

.store-close {
  position: absolute;
  top: 18px;
  right: 13px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(104, 112, 0, 0.26);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.store-close:hover,
.store-close:focus-visible {
  border-color: var(--green-deep);
  background: #f5f7dc;
  outline: none;
  transform: translateY(-1px);
}

.store-close span {
  position: relative;
  display: block;
  width: 14px;
  height: 14px;
}

.store-close span::before,
.store-close span::after {
  position: absolute;
  top: 6px;
  left: 1px;
  width: 12px;
  height: 2px;
  border-radius: 999px;
  background: var(--green-deep);
  content: "";
  transform-origin: center;
}

.store-close span::before {
  transform: rotate(45deg);
}

.store-close span::after {
  transform: rotate(-45deg);
}

.store-button {
  display: grid;
  align-items: start;
  gap: 14px;
  width: 100%;
  margin: 0;
  padding: 18px 18px 16px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.store-button:hover,
.store-button:focus-visible {
  background: var(--surface-soft);
  outline: none;
}

.store-summary {
  display: block;
  min-width: 0;
}

.store-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-bottom: 7px;
}

.store-title {
  display: block;
  min-width: 0;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.16;
}

.store-address {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.store-meta {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--green-deep);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.store-details {
  display: grid;
  gap: 14px;
  padding: 0 18px 16px;
  animation: detailsIn 180ms ease both;
}

.details-section {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.details-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.details-title {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 800;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
}

.detail-row {
  min-width: 0;
}

.detail-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.detail-value {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.messenger-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 18px;
  padding-top: 2px;
}

.messenger-row .detail-label {
  margin: 0;
}

.messenger-links {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 0;
}

.messenger-link {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  text-decoration: none;
  transition: transform 180ms ease, filter 180ms ease;
}

.messenger-link:hover,
.messenger-link:focus-visible {
  outline: none;
  transform: translateY(-2px);
  filter: drop-shadow(0 10px 16px rgba(32, 37, 42, 0.18));
}

.messenger-link img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.route-copy {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.48;
}

.actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}

.contacts-map .action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 14px 9px;
  border: none;
  border-radius: 6px;
  background: #f2f4c7;
  color: #8c9205;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.contacts-map .action-link:hover,
.contacts-map .action-link:focus-visible {
  background: var(--accent);
  color: var(--ink);
  outline: none;
  transform: translateY(-1px);
}

.sheet-backdrop {
  position: fixed;
  z-index: 20;
  inset: 0;
  background: rgba(22, 27, 30, 0.56);
  animation: fadeIn 160ms ease both;
}

.sheet-backdrop[hidden] {
  display: none;
}

.mobile-sheet {
  position: fixed;
  z-index: 95;
  right: 0;
  bottom: 0;
  left: 0;
  max-height: min(82svh, 720px);
  overflow: auto;
  padding: 24px;
  border-radius: 8px 8px 0 0;
  background: var(--surface);
  box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.22);
  transform: translateY(calc(100% + 28px));
  transition: transform 220ms ease;
}

.mobile-sheet.is-open {
  transform: translateY(0);
}

.sheet-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: start;
  margin-bottom: 20px;
}

.sheet-title {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.08;
}

.sheet-address {
  margin: 0;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.35;
}

.sheet-close {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
}

.sheet-close:hover,
.sheet-close:focus-visible {
  background: var(--surface-soft);
  outline: none;
}

.mobile-sheet .details-section {
  padding-top: 20px;
}

.mobile-sheet .store-details {
  display: grid;
  padding: 0;
}

.mobile-sheet .detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mobile-sheet .actions {
  margin-top: 4px;
}

.map-marker {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 2px solid rgba(104, 112, 0, 0.16);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 10px 22px rgba(32, 37, 42, 0.16);
  transform: translate(-28px, -28px);
  transition: width 160ms ease, height 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.map-marker.is-active {
  width: 56px;
  height: 56px;
  border-color: #f6f9d5;
  background: var(--accent);
  box-shadow:
    0 0 0 5px rgba(188, 196, 2, 0.22),
    0 18px 34px rgba(87, 100, 0, 0.3);
  transform: translate(-28px, -28px);
}

.map-marker img {
  display: block;
  width: 68%;
  height: 68%;
  object-fit: contain;
}

.map-balloon {
  width: 286px;
  padding: 2px 0 0;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

.map-balloon h2 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.15;
}

.map-balloon p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.map-balloon .messenger-links {
  margin: 0;
}

.map-balloon .messenger-link {
  width: 30px;
  height: 30px;
}

.balloon-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.balloon-contact > a {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.map-balloon .actions {
  grid-template-columns: 1fr;
  gap: 8px;
}

@keyframes detailsIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 1000px) {
	.contacts-info {
		margin-bottom: 20px !important;
	}
	.contacts__text {
		margin-bottom: 10px;
	}
	.contacts__text p span {
		margin-right: 3px;
	}
	.contacts__area1_2,
	.contacts__area1_3 {
		margin-top: 2px;
		padding-top: 12px;
		border-top: 1px solid #e5e5e5;
	}
}

@media (max-width: 760px) {
  .contacts-map {
    width: 100%;
    height: calc(100svh - 104px);
    min-height: 520px;
    margin: 14px 0 40px;
  }

  .store-panel {
    top: 12px;
    right: 12px;
    left: 12px;
    z-index: 2;
    width: auto;
    max-height: none;
    padding: 4px 6px 6px 10px;
    border-radius: 8px;
  }

  .panel-head {
    display: none;
  }

  .store-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 8px 6px 2px 0;
  }

  .store-list::-webkit-scrollbar {
    display: none;
  }

  .store-item {
    min-width: 0;
  }

  .store-item.is-active .store-heading {
    padding-right: 0;
  }

  .store-close {
    display: none;
  }

  .store-button {
    height: 100%;
    min-height: 78px;
    padding: 12px 10px 6px;
  }

  .store-heading {
    gap: 0;
    margin-bottom: 6px;
    padding-right: 0;
  }

  .store-title {
    font-size: 15px;
    line-height: 1.15;
  }

  .store-address {
    display: -webkit-box;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
  }

  .store-meta {
    position: absolute;
    top: -8px;
    right: -6px;
    padding: 0 8px;
    min-height: 18px;
    font-size: 11px;
    line-height: 14px;
  }

  .store-details {
    display: none;
  }

  .map-marker {
    width: 50px;
    height: 50px;
    transform: translate(-25px, -25px);
  }

  .map-marker.is-active {
    width: 50px;
    height: 50px;
    transform: translate(-25px, -25px);
  }

  .mobile-sheet .detail-grid,
  .mobile-sheet .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .actions {
    grid-template-columns: 1fr;
  }

  .mobile-sheet .messenger-row {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    grid-column: auto;
  }

  .mobile-sheet {
    padding: 24px 20px 28px;
  }
}

@media (min-width: 761px) {
  .mobile-sheet {
    display: none;
  }

  .sheet-backdrop {
    display: none;
  }
}
