.mxsf-shop-finder {
  --mxsf-black: #111;
  --mxsf-text: #111;
  --mxsf-muted: #666;
  --mxsf-border: #111;
  --mxsf-field-border: #d9d9d9;
  --mxsf-bg: #fff;
  --mxsf-panel: #f4f7fa;
  --mxsf-card-border: #e8e8e8;
  --mxsf-pill-bg: #f0f2f5;
  --mxsf-active: #d62828;
  --mxsf-radius: 8px;
  --mxsf-radius-pill: 999px;
  color: var(--mxsf-text);
  font-family: inherit;
  line-height: 1.5;
}

.mxsf-toolbar {
  margin-bottom: 24px;
}

.mxsf-toolbar__search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 220px);
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
  padding: 18px 20px;
  background: var(--mxsf-panel);
  border: 1px solid #e3e8ef;
  border-radius: var(--mxsf-radius);
}

.mxsf-toolbar__label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mxsf-text);
}

.mxsf-toolbar__search {
  min-width: 0;
}

.mxsf-toolbar__radius {
  min-width: 0;
}

.mxsf-toolbar__products {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.mxsf-toolbar__location {
  margin-top: 2px;
}

.mxsf-field {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--mxsf-field-border);
  border-radius: var(--mxsf-radius);
  padding: 0 16px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--mxsf-text);
  background: var(--mxsf-bg);
  appearance: none;
}

.mxsf-field:focus {
  border-color: var(--mxsf-black);
  outline: none;
  box-shadow: 0 0 0 1px var(--mxsf-black);
}

.mxsf-select {
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23111' d='M1.4.4 6 5l4.6-4.6L12 2l-6 6L0 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

.mxsf-product-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mxsf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid var(--mxsf-border);
  border-radius: var(--mxsf-radius-pill);
  background: var(--mxsf-bg);
  color: var(--mxsf-text);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.mxsf-btn:hover,
.mxsf-btn:focus {
  border-color: var(--mxsf-black);
  outline: none;
}

.mxsf-btn--filter.is-active,
.mxsf-btn--filter[aria-pressed='true'] {
  background: var(--mxsf-black);
  border-color: var(--mxsf-black);
  color: #fff;
}

.mxsf-btn--small {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.88rem;
}

.mxsf-btn--primary {
  background: var(--mxsf-black);
  border-color: var(--mxsf-black);
  color: #fff;
}

.mxsf-btn--primary:hover,
.mxsf-btn--primary:focus {
  background: #000;
  border-color: #000;
  color: #fff;
}

.mxsf-location-banner {
  display: none;
}

.mxsf-shop-finder__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 420px);
  gap: 0;
  align-items: start;
  min-width: 0;
}

.mxsf-shop-finder__map-column,
.mxsf-shop-finder__list-column {
  min-width: 0;
}

.mxsf-shop-finder__map-column {
  position: sticky;
  top: 20px;
  height: calc(100vh - 40px);
  min-height: 680px;
  padding-right: 18px;
}

.mxsf-map-sticky,
.mxsf-map {
  height: 100%;
  min-height: 680px;
}

.mxsf-map {
  border: 1px solid var(--mxsf-field-border);
  border-radius: var(--mxsf-radius);
  overflow: hidden;
  z-index: 0;
}

.mxsf-shop-finder__list-column {
  max-height: calc(100vh - 40px);
  min-height: 680px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 12px 24px 18px;
  border-left: 1px solid var(--mxsf-field-border);
  box-sizing: border-box;
  scrollbar-gutter: stable;
}

.mxsf-results-meta {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 0 0 12px;
  background: var(--mxsf-bg);
  font-size: 0.92rem;
  color: var(--mxsf-muted);
}

.mxsf-results {
  display: grid;
  gap: 14px;
}

.mxsf-card {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 20px;
  border: 1px solid var(--mxsf-card-border);
  border-radius: var(--mxsf-radius);
  background: var(--mxsf-bg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.mxsf-card.is-active {
  border: 2px solid var(--mxsf-black);
  padding: 19px;
}

.mxsf-card:hover,
.mxsf-card:focus {
  border-color: #bbb;
  outline: none;
}

.mxsf-card.is-active:hover,
.mxsf-card.is-active:focus {
  border-color: var(--mxsf-black);
}

.mxsf-card__head {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.mxsf-card__logo {
  width: 48px;
  height: 48px;
  border: 1px solid var(--mxsf-field-border);
  border-radius: 50%;
  object-fit: cover;
  background: var(--mxsf-bg);
}

.mxsf-card__logo--placeholder {
  background: linear-gradient(135deg, #f5f5f5 0%, #ececec 100%);
}

.mxsf-card__title {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.3;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--mxsf-text);
}

.mxsf-card__address,
.mxsf-card__hours {
  margin-bottom: 14px;
  color: var(--mxsf-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.mxsf-card__address p,
.mxsf-card__hours p {
  margin: 0;
}

.mxsf-card__hours strong {
  display: block;
  margin-bottom: 4px;
  color: var(--mxsf-text);
  font-size: 0.92rem;
  font-weight: 700;
}

.mxsf-card__services {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.mxsf-service-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 4px;
  background: var(--mxsf-pill-bg);
  color: var(--mxsf-muted);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
}

.mxsf-card__contacts {
  display: grid;
  gap: 8px;
}

.mxsf-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--mxsf-text);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}

.mxsf-contact-link:hover,
.mxsf-contact-link:focus {
  text-decoration: underline;
}

.mxsf-contact-link__icon {
  display: inline-flex;
  flex: 0 0 auto;
}

.mxsf-card__distance {
  margin: 0 0 10px;
  color: var(--mxsf-muted);
  font-size: 0.88rem;
}

.mxsf-empty {
  padding: 18px 0;
  margin: 0;
  color: var(--mxsf-muted);
}

.mxsf-marker {
  background: transparent;
  border: 0;
}

.mxsf-marker__pin {
  display: block;
  width: 28px;
  height: 28px;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  background: var(--mxsf-black);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
  transform: rotate(-45deg);
  transform-origin: center center;
  transition: width 0.15s ease, height 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.mxsf-marker.is-active .mxsf-marker__pin {
  width: 34px;
  height: 34px;
  background: var(--mxsf-active);
  border-width: 3px;
  box-shadow: 0 0 0 6px rgba(214, 40, 40, 0.2), 0 4px 12px rgba(0, 0, 0, 0.35);
}

.mxsf-popup {
  min-width: 220px;
  display: grid;
  gap: 8px;
}

.mxsf-popup__photo {
  width: 100%;
  height: 120px;
  object-fit: cover;
  margin-bottom: 10px;
  border-radius: 4px;
}

.mxsf-popup__title {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 700;
}

.mxsf-popup__address {
  margin: 0 0 10px;
  color: var(--mxsf-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.mxsf-popup__services {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.mxsf-popup__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.leaflet-container {
  font: inherit;
}

@media (max-width: 991px) {
  .mxsf-shop-finder__layout {
    grid-template-columns: 1fr;
  }

  .mxsf-shop-finder__map-column {
    position: relative;
    top: auto;
    height: 420px;
    min-height: 420px;
    padding-right: 0;
    margin-bottom: 16px;
  }

  .mxsf-map-sticky,
  .mxsf-map {
    min-height: 420px;
    height: 420px;
  }

  .mxsf-shop-finder__list-column {
    max-height: none;
    min-height: 0;
    overflow: visible;
    padding-left: 0;
    border-left: 0;
  }

  .mxsf-results-meta {
    position: static;
  }
}

@media (max-width: 640px) {
  .mxsf-toolbar__search-row {
    grid-template-columns: 1fr;
    padding: 16px;
  }
}
