/* ============================================================
   Store Map — CTA в hero + модальный оверлей с Google My Maps.
   Подключается только на pt/catalogo/ и pt/catalogo-v2/.
   ============================================================ */

/* ---------- CTA в hero ---------- */
.store-map-cta {
  position: absolute;
  /* .container имеет horizontal padding 40/32/24px (через --_ui---container--padding),
     а абсолютное позиционирование считается от padding-edge, поэтому компенсируем,
     чтобы правый край кнопки совпал с правым краем nav-контента, а не с краем padding. */
  right: var(--_ui---container--padding, 40px);
  bottom: 0;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px 14px 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  z-index: 2;
  max-width: 260px;
}
.store-map-cta:hover,
.store-map-cta:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(2, 20, 40, 0.25);
  outline: none;
}
.store-map-cta-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}
.store-map-cta-text {
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  color: #fff;
  letter-spacing: 0.005em;
}

/* На узких экранах (планшет/мобильный) — статичный блок в потоке hero */
@media (max-width: 991px) {
  .store-map-cta {
    position: static;
    transform: none;
    margin: 0 0 28px;
    max-width: none;
    width: fit-content;
  }
  .store-map-cta:hover,
  .store-map-cta:focus-visible {
    transform: translateY(-2px);
  }
}

@media (max-width: 480px) {
  .store-map-cta {
    padding: 12px 16px 12px 14px;
    gap: 12px;
  }
  .store-map-cta-icon {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
  }
  .store-map-cta-text {
    font-size: 14px;
  }
}

/* ---------- Оверлей ---------- */
.store-map-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.store-map-overlay[hidden] {
  display: none;
}
.store-map-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 31, 44, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: store-map-fade 0.2s ease;
}
.store-map-card {
  position: relative;
  width: 80vw;
  height: 80vh;
  max-width: 1500px;
  max-height: 900px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: store-map-pop 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.store-map-title {
  margin: 0;
  padding: 22px 64px 18px 26px;
  font-family: inherit;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: #02528a;
  border-bottom: 1px solid #e6ecef;
  background: #fcf9f2;
}
.store-map-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #e6ecef;
  background: #fff;
  font-size: 28px;
  line-height: 1;
  color: #4a5b6c;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.store-map-close:hover,
.store-map-close:focus-visible {
  background: #ed1c24;
  color: #fff;
  border-color: #ed1c24;
  outline: none;
  transform: rotate(90deg);
}
.store-map-frame {
  position: relative;
  flex: 1 1 auto;
  min-height: 420px;
  background: #f5f7fa;
}
.store-map-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.store-map-frame::before {
  content: "Carregando mapa…";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4a5b6c;
  font-size: 14px;
  font-weight: 500;
  pointer-events: none;
}

@media (max-width: 720px) {
  .store-map-overlay {
    padding: 0;
  }
  .store-map-card {
    max-width: 100%;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
  }
  .store-map-title {
    padding: 18px 56px 14px 18px;
    font-size: 18px;
  }
  .store-map-close {
    width: 36px;
    height: 36px;
    top: 10px;
    right: 10px;
  }
}

@keyframes store-map-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes store-map-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}
