/* ============================================================
   Стили раздела «Зоомагазины» — shops.css
   Совмещает каталог магазинов и полноэкранную GIS-карту из map.html.
   ============================================================ */

.shops-hero {
  background: var(--bg-soft, #fff7f4);
  border-bottom: 1px solid var(--line, #f0dfd8);
  padding: 32px 0 24px;
}

.shops-search-box {
  background: var(--card, #ffffff);
  border: 1px solid var(--line, #e2d2ca);
  border-radius: var(--radius-lg, 18px);
  padding: 18px 20px;
  box-shadow: 0 4px 18px rgba(43, 24, 19, 0.06);
  margin-top: 18px;
}

.shops-search-grid {
  display: grid;
  grid-template-columns: minmax(200px, 1.2fr) minmax(240px, 2fr) auto;
  gap: 12px;
  align-items: center;
}

@media (max-width: 768px) {
  .shops-search-grid {
    grid-template-columns: 1fr;
  }
}

.shops-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 20px 0 16px;
}

.shops-toggle {
  display: inline-flex;
  padding: 3px;
  background: var(--bg-soft, #f4ebe6);
  border-radius: 999px;
  border: 1px solid var(--line, #e2d2ca);
}

.shops-toggle__btn {
  border: 0;
  background: transparent;
  padding: 6px 16px;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted, #72625a);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.shops-toggle__btn.is-active {
  background: #ffffff;
  color: var(--ink, #2b1813);
  box-shadow: 0 2px 6px rgba(43, 24, 19, 0.1);
  font-weight: 700;
}

.shops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  margin-bottom: 36px;
}

.shop-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line, #e2d2ca);
  border-radius: var(--radius-lg, 18px);
  background: var(--card, #ffffff);
  box-shadow: var(--shadow-sm, 0 2px 8px rgba(43, 24, 19, 0.04));
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.shop-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(43, 24, 19, 0.1);
  border-color: var(--brand-line, #f3c7ba);
}

.shop-card__body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.shop-card__head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.shop-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff2ee, #ffe4dc);
  color: var(--brand, #c4403f);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid #f3c7ba;
}

.shop-card__title-wrap {
  flex: 1;
  min-width: 0;
}

.shop-card__title {
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--ink, #2b1813);
  line-height: 1.3;
}

.shop-card__sub {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted, #72625a);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.shop-metro {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: var(--ink-2, #442a23);
}

.shop-metro__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.shop-metro__dot--red { background: #d62828; }
.shop-metro__dot--blue { background: #0077b6; }
.shop-metro__dot--green { background: #2a9d8f; }
.shop-metro__dot--orange { background: #f77f00; }
.shop-metro__dot--purple { background: #7209b7; }

.shop-dist-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: #15803d;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
  align-self: flex-start;
}

.shop-card__badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.shop-card__tags {
  font-size: 12.5px;
  color: var(--brand-dark, #8e2c22);
  font-weight: 500;
}

.shop-card__desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-2, #442a23);
}

.shop-card__meta {
  display: grid;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px dashed var(--line, #e2d2ca);
  font-size: 12.5px;
}

.shop-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2, #442a23);
}

.shop-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 20px;
  background: var(--bg-soft, #fff7f4);
  border-top: 1px solid var(--line, #f0dfd8);
}

.shop-card__actions .btn {
  font-size: 12.5px;
  padding: 7px 12px;
}

/* ============================================================
   Карта Leaflet и стиль меток как на map.html
   ============================================================ */

.shops-map-container {
  position: relative;
  height: 580px;
  border-radius: var(--radius-lg, 18px);
  border: 1px solid var(--line, #e2d2ca);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(43, 24, 19, 0.08);
  margin-bottom: 36px;
}

.shops-map {
  width: 100%;
  height: 100%;
  background: #f4efe9;
}

/* Floating controls on map */
.shops-map__ctrl {
  position: absolute;
  right: 16px;
  bottom: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shops-ctrl-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(43, 24, 19, 0.14);
  box-shadow: 0 4px 14px rgba(43, 24, 19, 0.12);
  color: var(--ink, #2b1813);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 20px;
  font-weight: 700;
}

.shops-ctrl-btn:hover {
  background: #ffffff;
  color: var(--brand, #c4403f);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(43, 24, 19, 0.18);
}

.shops-ctrl-btn--geo.is-active {
  background: #1A73E8;
  color: #ffffff;
  border-color: #1A73E8;
}

/* Метки как на map.html */
.gis-marker { background: none; border: 0; }
.gis-pin {
  position: relative;
  width: 44px;
  height: 52px;
  transition: transform .16s ease;
  transform-origin: 50% 100%;
}
.gis-pin__body {
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--pin, #C4403F);
  padding: 3px;
  box-shadow: 0 1px 1px rgba(43,24,19,.18), 0 10px 22px -8px rgba(43,24,19,.5);
  border: 2px solid rgba(255,255,255,.94);
  box-sizing: border-box;
}
.gis-pin__body::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  margin-left: -7px;
  border: 7px solid transparent;
  border-bottom: 0;
  border-top: 9px solid var(--pin, #C4403F);
}
.gis-pin__img {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #fff center/cover no-repeat;
  border: 2px solid #fff;
  color: var(--pin, #C4403F);
  box-sizing: border-box;
}
.gis-pin__img svg {
  width: 20px;
  height: 20px;
}
.gis-pin__label {
  position: absolute;
  left: 48px;
  top: 10px;
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 4px 9px;
  border-radius: 8px;
  background: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink, #2b1813);
  box-shadow: 0 3px 12px rgba(0,0,0,.18);
  border: 1px solid rgba(43,24,19,.08);
  pointer-events: none;
  display: block;
}

.gis-pin--shop { --pin: #C4403F; }
.gis-pin--24h { --pin: #10B981; }
.gis-pin--pharma { --pin: #8B5CF6; }

.gis-marker:hover .gis-pin,
.gis-marker.is-active .gis-pin {
  transform: scale(1.15);
  filter: drop-shadow(0 8px 12px rgba(43,24,19,.28));
  z-index: 10000 !important;
}

/* Пульсирующая точка местоположения пользователя GPS */
.gis-me {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1A73E8;
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 0 rgba(26,115,232,.45), 0 2px 6px rgba(0,0,0,.3);
  animation: gisMe 2s infinite;
}
@keyframes gisMe {
  0% { box-shadow: 0 0 0 0 rgba(26,115,232,.55), 0 2px 6px rgba(0,0,0,.3); }
  70% { box-shadow: 0 0 0 20px rgba(26,115,232,0), 0 2px 6px rgba(0,0,0,.3); }
  100% { box-shadow: 0 0 0 0 rgba(26,115,232,0), 0 2px 6px rgba(0,0,0,.3); }
}

/* Попапы на карте */
.shop-popup {
  padding: 4px 2px;
  min-width: 220px;
}
.shop-popup h4 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink, #2b1813);
}
.shop-popup__addr {
  margin: 0 0 4px;
  font-size: 12.5px;
  color: var(--muted, #72625a);
}
.shop-popup__hours {
  margin: 0 0 8px;
  font-size: 12.5px;
  color: var(--ink-2, #442a23);
  font-weight: 500;
}

/* Баннер для партнеров */
.shops-partner-card {
  background: linear-gradient(135deg, #2b1813, #442a23);
  color: #ffffff;
  border-radius: var(--radius-xl, 22px);
  padding: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin: 40px 0 20px;
}

.shops-partner-card h3 {
  margin: 0 0 6px;
  font-size: 20px;
  color: #ffffff;
}

.shops-partner-card p {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  max-width: 580px;
  line-height: 1.5;
}
