:root{
  --ba-primary:#384150;
  --ba-primary-dark:#212761;
  --ba-soft:#ECD6BF;
  --ba-accent:#C99E45;
  --ba-white:#ffffff;
  --ba-bg:#f7f7f8;
  --ba-line:#9a9a9a;
  --ba-text:#384150;
  --ba-muted:#6d7684;
  --ba-radius:10px;
  --ba-shadow:0 16px 36px rgba(56,65,80,.08);
  --ba-panel-height:620px;
}

.ba-dealers{
  padding:20px 0 40px;
  position:relative;
  z-index:1;
}

.ba-dealers__header{
  text-align:center;
  max-width:860px;
  margin:0 auto 24px;
}

.ba-dealers__eyebrow{
  display:inline-block;
  padding:10px 18px;
  border-radius:999px;
  background:rgba(56,65,80,.08);
  color:var(--ba-primary);
  font-size:13px;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
  margin-bottom:14px;
}

.ba-dealers__title{
  margin:0 0 12px;
  font-size:64px;
  line-height:1.02;
  color:var(--ba-primary);
}

.ba-dealers__subtitle{
  margin:0;
  color:var(--ba-muted);
  font-size:18px;
  line-height:1.6;
}

.ba-dealers__filters{
  margin-bottom:22px;
}

.ba-dealers__filters-grid{
  display:grid;
  grid-template-columns:minmax(0,1.45fr) minmax(340px,.85fr);
  gap:24px;
  align-items:start;
}

.ba-dealers__filters-main{
  display:grid;
  grid-template-columns:minmax(280px,2fr) minmax(180px,1fr) minmax(180px,1fr);
  gap:14px;
}

.ba-dealers__filters-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

.ba-dealers__filters-main .ba-field,
.ba-dealers__filters-actions .ba-field{
  min-width:0;
}

.ba-field input,
.ba-field select,
.ba-field button{
  width:100%;
  min-height:56px;
  border:1px solid #555555;
  border-radius:10px;
  background:var(--ba-white);
  padding:0 18px;
  box-sizing:border-box;
  font-size:15px;
  color:var(--ba-text);
  box-shadow:none;
}

.ba-field input::placeholder{
  color:#6f7786;
  opacity:1;
  font-weight:500;
}

.ba-field input:focus,
.ba-field select:focus{
  outline:none;
  border-color:#555555;
}

.ba-field button{
  cursor:pointer;
  font-weight:700;
}

.ba-location-btn,
.ba-location-btn:visited{
  background:#212761 !important;
  color:var(--ba-white) !important;
  border-color:#555555 !important;
  -webkit-text-fill-color:var(--ba-white) !important;
  appearance:none;
  opacity:1 !important;
}

.ba-location-btn:hover,
.ba-location-btn:focus{
  background:#1b2050 !important;
  color:var(--ba-white) !important;
  border-color:#555555 !important;
  -webkit-text-fill-color:var(--ba-white) !important;
}

.ba-location-btn.is-active{
  background:var(--ba-accent) !important;
  border-color:#555555 !important;
  color:#000000 !important;
  -webkit-text-fill-color:#000000 !important;
}

.ba-location-btn:disabled{
  opacity:1 !important;
  color:var(--ba-white) !important;
  -webkit-text-fill-color:var(--ba-white) !important;
}

.ba-location-btn.is-active:disabled{
  color:#000000 !important;
  -webkit-text-fill-color:#000000 !important;
}

.ba-reset-btn{
  background:var(--ba-white);
  color:var(--ba-primary);
  border-color:#555555;
}

.ba-dealers__layout{
  display:grid;
  grid-template-columns:minmax(0,1.45fr) minmax(340px,.85fr);
  gap:24px;
  align-items:stretch;
}

.ba-dealers__map-wrap,
.ba-dealers__list-wrap{
  background:var(--ba-white);
  border:1px solid #9a9a9a;
  border-radius:10px;
  box-shadow:var(--ba-shadow);
  height:var(--ba-panel-height);
}

.ba-dealers__map-wrap{
  padding:0;
  overflow:hidden;
  position:relative;
}

.ba-map{
  border-radius:10px;
  overflow:hidden;
  background:#eef2f4;
  border:none;
  width:100%;
  height:100% !important;
  min-height:var(--ba-panel-height);
  position:relative;
  z-index:1;
}

.ba-map .leaflet-container{
  position:relative;
  z-index:1;
}

.ba-map .leaflet-pane{
  z-index:1 !important;
}

.ba-map .leaflet-tile-pane{
  z-index:1 !important;
}

.ba-map .leaflet-overlay-pane{
  z-index:2 !important;
}

.ba-map .leaflet-shadow-pane{
  z-index:3 !important;
}

.ba-map .leaflet-marker-pane{
  z-index:4 !important;
}

.ba-map .leaflet-tooltip-pane{
  z-index:5 !important;
}

.ba-map .leaflet-popup-pane{
  z-index:6 !important;
}

.ba-map .leaflet-top,
.ba-map .leaflet-bottom,
.ba-map .leaflet-control-container,
.ba-map .leaflet-control{
  z-index:7 !important;
}

.ba-dealers__list-wrap{
  padding:20px 22px;
  overflow:auto;
  scrollbar-width:auto;
  scrollbar-color:#8a8a8a #f1f1f1;
}

.ba-dealers__list-wrap::-webkit-scrollbar{
  width:14px;
}

.ba-dealers__list-wrap::-webkit-scrollbar-track{
  background:#f1f1f1;
  border-radius:10px;
}

.ba-dealers__list-wrap::-webkit-scrollbar-thumb{
  background:#8a8a8a;
  border-radius:10px;
  border:2px solid #f1f1f1;
}

.ba-dealers__list-wrap::-webkit-scrollbar-thumb:hover{
  background:#6f6f6f;
}

.ba-dealers__list-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:12px;
}

.ba-results-count{
  font-size:16px;
  font-weight:800;
  color:var(--ba-primary);
}

.ba-card{
  display:grid;
  grid-template-columns:116px 1fr;
  gap:18px;
  padding:18px 0;
  border-top:1px solid #d7d7d7;
  cursor:pointer;
}

.ba-card:first-child{
  border-top:0;
  padding-top:0;
}

.ba-card__thumb img{
  display:block;
  width:116px;
  height:116px;
  object-fit:cover;
  border-radius:10px;
}

.ba-card__placeholder{
  width:116px;
  height:116px;
  border-radius:10px;
  background:linear-gradient(135deg, rgba(56,65,80,.08), rgba(201,158,69,.18));
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  overflow:hidden;
}

.ba-card__placeholder::before{
  content:"";
  width:42px;
  height:42px;
  border-radius:999px;
  background:var(--ba-primary);
  opacity:.10;
  position:absolute;
}

.ba-card__placeholder span{
  position:relative;
  z-index:2;
  font-size:34px;
  font-weight:800;
  color:var(--ba-primary);
}

.ba-card__body{
  min-width:0;
}

.ba-card__title{
  margin:0 0 8px;
  font-size:22px;
  line-height:1.2;
  word-break:break-word;
  text-transform:uppercase;
}

.ba-card__title a{
  color:var(--ba-primary);
  text-decoration:none;
}

.ba-card__line{
  margin:0 0 7px;
  font-size:14px;
  line-height:1.55;
  color:var(--ba-text);
  word-break:break-word;
}

.ba-card__line a{
  text-decoration:none;
  color:#d06f27;
}

.ba-card__line--muted{
  color:var(--ba-muted);
}

.ba-empty{
  padding:18px 0;
  color:var(--ba-muted);
}

.ba-popup{
  min-width:240px;
}

.leaflet-popup-content-wrapper{
  border-radius:10px !important;
  overflow:hidden;
}

.leaflet-popup-tip{
  background:#ffffff !important;
}

.leaflet-container a.leaflet-popup-close-button{
  top:10px !important;
  right:10px !important;
  width:30px !important;
  height:30px !important;
  line-height:28px !important;
  border-radius:10px !important;
  background:#1B2050 !important;
  color:#ffffff !important;
  font-size:22px !important;
  font-weight:700 !important;
  text-align:center !important;
  box-sizing:border-box !important;
  padding:0 !important;
  text-decoration:none !important;
  opacity:1 !important;
}

.leaflet-container a.leaflet-popup-close-button:hover,
.leaflet-container a.leaflet-popup-close-button:focus{
  background:#15193f !important;
  color:#ffffff !important;
}

.ba-popup__thumb img{
  display:block;
  width:100%;
  height:140px;
  object-fit:cover;
  border-radius:10px;
  margin-bottom:12px;
}

.ba-popup__placeholder{
  width:100%;
  height:140px;
  border-radius:10px;
  background:linear-gradient(135deg, rgba(56,65,80,.08), rgba(201,158,69,.18));
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:12px;
}

.ba-popup__placeholder span{
  font-size:40px;
  font-weight:800;
  color:var(--ba-primary);
}

.ba-popup__title{
  font-size:16px;
  font-weight:800;
  color:var(--ba-primary);
  margin-bottom:8px;
  text-transform:uppercase;
}

.ba-popup__title a{
  color:inherit;
  text-decoration:none;
}

.ba-popup__line{
  margin-bottom:6px;
  font-size:14px;
  line-height:1.45;
  word-break:break-word;
}

.ba-popup__cta-group{
  margin-top:14px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.ba-popup__cta{
  margin-top:0;
}

.ba-popup__cta a{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  min-height:46px;
  padding:0 16px;
  border-radius:10px;
  background:#212761;
  color:var(--ba-white);
  text-decoration:none;
  font-size:14px;
  font-weight:700;
  box-sizing:border-box;
}

.ba-popup__cta a:hover,
.ba-popup__cta a:focus{
  background:#1b2050;
  color:var(--ba-white);
}

.ba-popup__cta--secondary a{
  background:#ffffff;
  color:#212761;
  border:1px solid #212761;
}

.ba-popup__cta--secondary a:hover,
.ba-popup__cta--secondary a:focus{
  background:#f5f6fb;
  color:#212761;
}

.ba-single-map-wrap{
  margin-top:28px;
}

.ba-single-map{
  height:420px;
  border-radius:10px;
  overflow:hidden;
  border:1px solid #9a9a9a;
  box-shadow:var(--ba-shadow);
}

.leaflet-popup-content{
  margin:14px;
}

/* marker cluster */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large{
  background:rgba(201,158,69,.18);
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div{
  background:var(--ba-accent);
  color:var(--ba-white);
  font-weight:800;
}

/* map controls */
.ba-map-control{
  box-shadow:none !important;
  margin-bottom:8px !important;
}

.ba-map-control__button{
  width:36px;
  height:36px;
  display:flex !important;
  align-items:center;
  justify-content:center;
  background:#ffffff;
  color:#212761 !important;
  text-decoration:none !important;
  font-size:18px;
  font-weight:700;
  border-bottom:1px solid #d8dce3;
}

.ba-map-control__button:hover,
.ba-map-control__button:focus{
  background:#f5f6fb;
  color:#212761 !important;
}

@media (max-width:1200px){
  .ba-dealers__filters-grid{
    grid-template-columns:1fr;
    gap:14px;
  }

  .ba-dealers__filters-main{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .ba-dealers__filters-actions{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .ba-dealers__layout{
    grid-template-columns:1fr;
    align-items:start;
  }

  .ba-dealers__map-wrap,
  .ba-dealers__list-wrap{
    height:auto;
  }

  .ba-map{
    min-height:520px;
  }
}

@media (max-width:767px){
  .ba-dealers__title{
    font-size:40px;
  }

  .ba-dealers__subtitle{
    font-size:16px;
  }

  .ba-dealers__filters-main,
  .ba-dealers__filters-actions{
    grid-template-columns:1fr;
  }

  .ba-card{
    grid-template-columns:88px 1fr;
    gap:14px;
  }

  .ba-card__thumb img,
  .ba-card__placeholder{
    width:88px;
    height:88px;
  }

  .ba-card__placeholder span{
    font-size:28px;
  }

  .ba-card__title{
    font-size:18px;
  }

  .ba-map{
    min-height:420px;
  }
}