/* =========================================================
   BAYİLER SAYFASI
   ========================================================= */
.bayi-section {
  background: #f4f4f4;
  padding: 80px 60px 120px;
}

@media (max-width: 1024px) { .bayi-section { padding: 64px 40px 96px; } }
@media (max-width: 768px)  { .bayi-section { padding: 56px 24px 72px; } }
@media (max-width: 480px)  { .bayi-section { padding: 48px 16px 56px; } }

.bayi-section-inner {
  max-width: 1500px;
  margin: 0 auto;
}

.bayi-section-head {
  margin-bottom: 48px;
  max-width: 720px;
}

@media (max-width: 768px) { .bayi-section-head { margin-bottom: 32px; } }

.bayi-section-title {
  font-family: "Gilroy", Inter, Arial, sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.035em;
  color: #000;
  margin: 0 0 20px;
}
/*
.bayi-section-title .italic-outline-dark {
  font-style: italic;
  color: transparent;
  -webkit-text-stroke: 1.5px #000;
}
*/
.bayi-section-desc {
  font-size: 1.0625rem;
  color: #525252;
  line-height: 1.6;
  margin: 0;
}

/* =========================================================
   HARİTA + PANEL SAHNESİ (flex, yan yana, harita küçülür)
   ========================================================= */
.bayi-stage {
  display: flex;
  align-items: stretch;
  gap: 0;
  position: relative;
  min-height: 640px;
}

@media (max-width: 900px) { .bayi-stage { min-height: 480px; } }
@media (max-width: 480px) { .bayi-stage { min-height: 380px; } }

/* ----- HARİTA (varsayılan: tam genişlik) ----- */
.bayi-map {
  flex: 1 1 100%;
  min-width: 0;
  background: #ffffff;
  border-radius: 48px;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.05);
  transition: flex-basis 0.7s cubic-bezier(0.65, 0, 0.35, 1),
              padding 0.7s cubic-bezier(0.65, 0, 0.35, 1);
}

@media (max-width: 1024px) { .bayi-map { padding: 28px; border-radius: 36px; } }
@media (max-width: 480px)  { .bayi-map { padding: 16px; border-radius: 24px; } }

/* AÇIK durum: harita küçülür */
body.is-bayi-acik .bayi-map {
  flex: 0 0 50%;
  padding: 28px;
}

@media (max-width: 1024px) {
  body.is-bayi-acik .bayi-map { flex: 0 0 45%; padding: 20px; }
}

.svg-turkiye-haritasi {
  width: 100%;
  max-width: 100%;
}

.svg-turkiye-haritasi svg {
  width: 100%;
  height: auto;
  display: block;
}

/* SVG iller */
#svg-turkiye-haritasi path {
  fill: #e8e8e8;
  stroke: #ffffff;
  stroke-width: 0.8;
  transition: fill 0.3s ease;
  cursor: default;
}

#svg-turkiye-haritasi g.bayivar path {
  fill: #cd1018;
  cursor: pointer;
}

#svg-turkiye-haritasi g.bayivar:hover path {
  fill: #a50d13;
}

#svg-turkiye-haritasi g.bayivar.is-selected path {
  fill: #000000;
}

#svg-turkiye-haritasi text {
  pointer-events: none;
  user-select: none;
}

#svg-turkiye-haritasi .num-text {
  font-family: "Gilroy", Inter, Arial, sans-serif;
  font-weight: 700;
  font-size: 12px;
  fill: #ffffff;
}

.il-isimleri {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  font-family: "Gilroy", Inter, Arial, sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: #ffffff;
  background: #000000;
  padding: 6px 12px;
  border-radius: 6px;
  transform: translate(-50%, -120%);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.il-isimleri.is-visible {
  opacity: 1;
}

/* =========================================================
   BAYİ PANELİ (haritanın yanına flex item olarak gelir)
   ========================================================= */
.bayi-panel {
  flex: 0 0 0;
  min-width: 0;
  background: #ffffff;
  border-radius: 48px;
  margin-left: 0;
  padding: 0;
  overflow: hidden;
  opacity: 0;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
  position: relative;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  transition: flex-basis 0.7s cubic-bezier(0.65, 0, 0.35, 1),
              margin-left 0.7s cubic-bezier(0.65, 0, 0.35, 1),
              opacity 0.4s ease 0.15s,
              padding 0.7s cubic-bezier(0.65, 0, 0.35, 1);
}

body.is-bayi-acik .bayi-panel {
  flex: 0 0 calc(50% - 24px);
  margin-left: 24px;
  padding: 40px;
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 1024px) {
  body.is-bayi-acik .bayi-panel {
    flex: 0 0 calc(55% - 16px);
    margin-left: 16px;
    padding: 28px;
    border-radius: 36px;
  }
}

/* Mobilde: alttan slide-up bottom sheet */
@media (max-width: 768px) {
  .bayi-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    flex: none !important;
    width: 100%;
    margin-left: 0 !important;
    border-radius: 28px 28px 0 0;
    transform: translateY(100%);
    max-height: 85vh;
    max-height: 85dvh;
    z-index: 60;
    padding: 0;
    transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1),
                padding 0.5s cubic-bezier(0.65, 0, 0.35, 1);
  }
  body.is-bayi-acik .bayi-map { flex: 1 1 100% !important; padding: 16px; }
  body.is-bayi-acik .bayi-panel {
    transform: translateY(0);
    padding: 28px 20px 24px;
  }
}

/* ----- Kapat butonu ----- */
.bayi-panel-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  color: #000;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
  z-index: 2;
}

.bayi-panel-close:hover {
  background: #cd1018;
  color: #ffffff;
}

.bayi-panel-close:active { transform: scale(0.92); }
.bayi-panel-close svg { width: 18px; height: 18px; }

@media (max-width: 768px) {
  .bayi-panel-close { top: 16px; right: 16px; }
}

/* ----- Panel header ----- */
.bayi-panel-header {
  margin-bottom: 20px;
  padding-right: 60px;
  flex-shrink: 0;
}

.bayi-panel-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #cd1018;
  padding: 7px 14px;
  border: 1.5px solid #cd1018;
  border-radius: 9999px;
  margin-bottom: 16px;
}

.bayi-panel-city {
  font-family: "Gilroy", Inter, Arial, sans-serif;
  font-weight: 800;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1;
  letter-spacing: -0.035em;
  color: #000;
  margin: 0;
}

/* ----- Arama kutusu ----- */
.bayi-panel-search {
  position: relative;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.bayi-panel-search input {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: #000;
  background: #f4f4f4;
  border: 1.5px solid transparent;
  border-radius: 14px;
  padding: 13px 18px 13px 46px;
  transition: border-color 0.3s ease, background 0.3s ease;
  -webkit-appearance: none;
  appearance: none;
}

.bayi-panel-search input::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

.bayi-panel-search input:focus {
  outline: none;
  background: #ffffff;
  border-color: #cd1018;
}

.bayi-panel-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.bayi-panel-search input:focus + .bayi-panel-search-icon {
  color: #cd1018;
}

/* ----- Panel liste (scroll'lu) ----- */
.bayi-panel-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  flex: 1;
  margin-right: -8px;
  padding-right: 8px;
  min-height: 0;
}

.bayi-panel-list::-webkit-scrollbar { width: 6px; }
.bayi-panel-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
}
.bayi-panel-list::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* ----- Bayi kartı ----- */
.bayi-card {
  background: #f4f4f4;
  border-radius: 20px;
  padding: 20px 22px;
  transition: background 0.3s ease;
}

.bayi-card:hover {
  background: #ececec;
}

.bayi-card-title {
  font-family: "Gilroy", Inter, Arial, sans-serif;
  font-weight: 800;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  color: #000;
  margin: 0 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.bayi-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
}

.bayi-card-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.bayi-card-field--full {
  grid-column: 1 / -1;
}

.bayi-card-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.45);
}

.bayi-card-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: #000;
  line-height: 1.4;
  word-break: break-word;
}

.bayi-card-value a {
  color: #cd1018;
  text-decoration: none;
  transition: color 0.3s ease;
}

.bayi-card-value a:hover {
  color: #a50d13;
}

/* ----- Boş / yükleme durumları ----- */
.bayi-panel-empty {
  font-size: 0.95rem;
  color: #737373;
  text-align: center;
  padding: 40px 20px;
  background: #f4f4f4;
  border-radius: 20px;
}

.bayi-panel-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.95rem;
  color: #737373;
  padding: 40px 20px;
}

.bayi-panel-loading::before {
  content: '';
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(0, 0, 0, 0.1);
  border-top-color: #cd1018;
  border-radius: 50%;
  animation: bayi-spin 0.8s linear infinite;
}

@keyframes bayi-spin {
  to { transform: rotate(360deg); }
}
