.jcb-retailer-toggle {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: inline-block !important;
  width: 282px !important;
  height: 48px !important;
  padding: 12px 24px !important;
  background-color: rgb(255, 175, 47) !important;
  border: 2px solid rgb(255, 255, 255) !important;
  border-radius: 30px !important;
  box-shadow: none !important;
  color: rgb(255, 255, 255) !important;
  cursor: pointer !important;
  font-family: Roboto, sans-serif !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 15px !important;
  text-align: center !important;
  text-decoration: none !important;
  text-transform: uppercase !important;
  transition: all 0.3s ease !important;
}
.jcb-retailer-toggle:hover {
  opacity: 0.95 !important;
  color: #fff !important;
}

.jcb-retailer-panel-wrap[hidden] {
  display: none !important;
}
.jcb-retailer-panel-inner,
.jcb-all-retailers {
  background: #fff;
  border-radius: 26px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  padding: 32px;
}
.jcb-retailer-title,
.jcb-all-retailers-title {
  margin: 0 0 10px;
  color: #1b355e;
  font-family: Roboto, sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}
.jcb-all-retailers-subtitle,
.jcb-retailer-message,
.jcb-all-retailers-meta {
  color: #4a4a4a;
  font-family: Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
.jcb-retailer-form-row,
.jcb-all-retailers-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 18px;
}
.jcb-retailer-zipcode,
.jcb-all-retailers-zipcode {
  flex: 1 1 260px;
  min-height: 48px;
  border: 1px solid #d7d7d7 !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: none !important;
  padding: 0 16px !important;
  font-family: Roboto, sans-serif !important;
  font-size: 15px !important;
  color: #111 !important;
}
.jcb-retailer-search,
.jcb-all-retailers-search,
.jcb-all-retailers-reset {
  appearance: none !important;
  border: 0 !important;
  min-height: 48px !important;
  padding: 12px 24px !important;
  border-radius: 30px !important;
  background: #ffaf2f !important;
  color: #fff !important;
  font-family: Roboto, sans-serif !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 15px !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
}
.jcb-all-retailers-reset {
  background: #1b355e !important;
}
.jcb-retailer-message {
  margin-top: 14px;
  min-height: 22px;
}
.jcb-retailer-grid,
.jcb-all-retailers-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
  align-items: stretch;
}
.jcb-retailer-card {
  display: flex;
  flex-direction: column;
  min-height: 280px;
  padding: 22px;
  border: 1px solid #ececec;
  border-radius: 22px;
  background: #fff;
  text-decoration: none !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.jcb-retailer-card:hover,
.jcb-retailer-card.is-active {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.09);
  border-color: #ffaf2f;
}
.jcb-retailer-card__logo-wrap,
.jcb-retailer-card__map-wrap {
  height: 123px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.jcb-retailer-card__logo-wrap--empty::before {
  content: "";
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #f7f7f7;
}
.jcb-retailer-card__logo {
  max-width: 100%;
  max-height: 82px;
  object-fit: contain;
}
.jcb-retailer-card__map {
  max-width: 123px;
  max-height: 123px;
  object-fit: contain;
}
.jcb-retailer-card__title {
  color: #1b355e;
  font-family: Roboto, sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 10px;
}
.jcb-retailer-card__address,
.jcb-retailer-card__city,
.jcb-retailer-card__distance {
  color: #4a4a4a;
  font-family: Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}
.jcb-retailer-card__distance {
  margin-top: 8px;
  font-weight: 600;
  color: #1b355e;
}
.jcb-retailer-card__link {
  margin-top: auto;
  padding-top: 18px;
  color: #ffaf2f;
  font-family: Roboto, sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}
.jcb-retailer-card--all {
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 100%;
  min-height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}
.jcb-all-retailers-header {
  margin-bottom: 24px;
}
.jcb-all-retailers-map {
  width: 100%;
  height: 520px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid #ececec;
}
.jcb-all-retailers .leaflet-container {
  font-family: Roboto, sans-serif;
  background: #dce3eb;
}
.jcb-all-retailers .leaflet-control-attribution {
  opacity: 0 !important;
  pointer-events: none !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}
.jcb-all-retailers .leaflet-popup-content-wrapper {
  border-radius: 14px;
}
.jcb-all-retailers .leaflet-control-zoom a {
  color: #1f1f1f;
}
.jcb-retailer-empty {
  grid-column: 1/-1;
  padding: 24px;
  border-radius: 18px;
  background: #f8f8f8;
  color: #4a4a4a;
  font-family: Roboto, sans-serif;
}

.jcb-map-pin {
  background: transparent !important;
  border: 0 !important;
}
.jcb-map-pin .jcb-map-pin__inner {
  display: block;
  width: 22px;
  height: 22px;
  background: #000;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: none;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.jcb-map-pin.is-active .jcb-map-pin__inner {
  background: #ffaf2f;
  transform: rotate(-45deg) scale(1.15);
}
.jcb-cluster-marker {
  background: rgba(0, 0, 0, 0.85);
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 14px/1 Roboto, sans-serif;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
}
.jcb-cluster-marker span {
  display: block;
}
.jcb-all-retailers .marker-cluster,
.jcb-all-retailers .marker-cluster div {
  background: transparent !important;
  border: none !important;
}

/* A featured retailer is added next to the 3 nearest, so the panel can hold more
   than the usual 4 cards. Keep those on one row instead of stranding a single
   card below. data-card-count is set by renderProductResults(). */
@media (min-width: 1201px) {
  .jcb-retailer-results[data-card-count="5"] {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .jcb-retailer-results[data-card-count="6"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .jcb-retailer-results[data-card-count="5"] .jcb-retailer-card {
    padding: 18px;
  }
  .jcb-retailer-results[data-card-count="5"] .jcb-retailer-card__title {
    font-size: 19px;
  }
}
@media (max-width: 1200px) {
  .jcb-retailer-grid,
  .jcb-all-retailers-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 767px) {
  .jcb-retailer-panel-inner,
  .jcb-all-retailers {
    padding: 22px;
  }
  .jcb-retailer-grid,
  .jcb-all-retailers-list {
    grid-template-columns: 1fr;
  }
  .jcb-retailer-toggle,
  .jcb-retailer-search,
  .jcb-all-retailers-search,
  .jcb-all-retailers-reset {
    width: 100% !important;
  }
  .jcb-all-retailers-map {
    height: 380px;
  }
}

/* Smaller Leaflet retailer popup card */
.jcb-leaflet-popup .jcb-retailer-card--map-popup {
  background: none;
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0 0 2px 0;
  min-height: 0 !important;
}
.jcb-leaflet-popup .jcb-retailer-card--map-popup .jcb-retailer-card__logo-wrap,
.jcb-leaflet-popup .jcb-retailer-card--map-popup .jcb-retailer-card__logo-wrap--empty {
  border-radius: 0;
  background: none;
}
.jcb-leaflet-popup .jcb-retailer-card--map-popup .jcb-retailer-card__logo {
  max-height: 41px;
}
.jcb-leaflet-popup .jcb-retailer-card--map-popup .jcb-retailer-card__title {
  font-size: 14px;
  margin-bottom: 6px;
}
.jcb-leaflet-popup .jcb-retailer-card--map-popup .jcb-retailer-card__address,
.jcb-leaflet-popup .jcb-retailer-card--map-popup .jcb-retailer-card__city {
  font-size: 12px;
  line-height: 1.3;
}
.jcb-leaflet-popup .jcb-retailer-card--map-popup .jcb-retailer-card__link {
  font-size: 12px;
  padding-top: 10px;
}
.jcb-leaflet-popup .jcb-retailer-card--map-popup .jcb-retailer-card__logo-wrap {
  height: auto !important;
}
