header {
  position: relative;
  width: 100%;
  height: 70px;
  background-color: var(--bg-header);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 2px 24px;
  box-shadow: 0 2px 5px var(--shadow-2);
  z-index: 10;
}

#map {
  position: absolute;
  top: 70px;
  left: 0;
  width: 100%;
  height: calc(100% - 70px);
  z-index: 0;
}

.slogan {
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--primary);
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(255,255,255,0.7);
}

/* === CTA w headerze === */
header a.cta {
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  transition: background .3s;
  white-space: nowrap;
}

header a.cta:hover {
  background: var(--accent-hover);
}

/* === Logo === */
.logo-block {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
}

.logo_pw {
  height: 100%;
  width: auto;
  display: block;
}

.logo_img {
  height: 30px;
  width: auto;
  display: none;
}

/* === Search === */
.search-container {
  display: flex;
  align-items: center;
  background: var(--bg-white);
  border-radius: 24px;
  padding: 4px 12px;
  box-shadow: 0 0 4px var(--shadow-3);
  min-width: 170px;
  max-width: 420px;
  width: 100%;
}

.search-input {
  border: none;
  outline: none;
  padding: 6px 8px;
  font-size: 14px;
  width: 100%;
  border-radius: 24px;
  background: transparent;
  color: var(--primary-dark);
}

.search-btn {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 6px 4px 6px 8px;
  color: var(--primary-dark);
}

/* === Modal === */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  backdrop-filter: blur(2px);
  z-index: 20;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, 92vw);
  max-height: 82vh;
  overflow: auto;
  background: var(--bg-white);
  border-radius: 14px;
  box-shadow: 0 10px 30px var(--shadow-4);
  z-index: 21;
  padding: 20px 22px;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-light);
}

.modal-title {
  margin: 0 30px 6px 0;
  color: var(--primary);
  font-size: 22px;
  font-weight: 700;
}

.modal-subtitle {
  margin: 16px 0 8px;
  color: var(--primary);
  font-size: 18px;
  font-weight: 700;
}

.modal-adres,
.modal-godziny {
  margin: 4px 0;
  color: var(--primary-dark);
}

.modal-opis {
  margin: 12px 0 12px;
  color: var(--text-dark);
  line-height: 1.5;
}

.modal-produkty {
  margin: 8px 0 0;
  padding-left: 18px;
}

.modal-produkty li {
  margin: 6px 0;
}

.prod-opis {
  color: var(--text-mid);
  font-size: 0.95rem;
  margin-top: 2px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin: 10px 0 12px;
  flex-wrap: wrap;
}

.modal-actions .btn {
  background-color: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}

.modal-actions .btn:hover {
  background-color: var(--accent-hover);
}

.modal-actions .btn.nav {
  background-color: var(--primary);
}

.modal-actions .btn.nav:hover {
  background-color: var(--primary-hover);
}

/* === Animacja modala === */
#detailsModal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 10001;
}

#detailsModal.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* === Przycisk "Rozwiń panel" === */
.panel-expand {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 10px var(--shadow-3);
  z-index: 5;
}

.panel-expand:hover {
  background: var(--primary-hover);
}

/* === CTA Rolnik czerwony === */
.rolnik-cta {
  margin: 12px -20px 8px;
  padding: 0;
}

.rolnik-btn {
  display: block;
  background-color: var(--cta-red);
  color: #fff;
  text-align: center;
  padding: 12px 10px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 12px 12px;
}

.rolnik-btn:hover {
  background-color: var(--cta-red-hover);
}

/* === Popup wysuwany z góry === */
.top-popup {
  position: fixed;
  top: -120px;
  left: 0;
  right: 0;
  background: var(--bg-white);
  box-shadow: 0 3px 12px var(--shadow-3);
  padding: 14px 16px;
  z-index: 9999;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: top 0.4s ease;
  border-bottom: 2px solid var(--accent);
}

.top-popup-content {
  font-size: 14px;
  line-height: 1.35;
  color: var(--primary-dark);
}

.top-popup-close {
  background: transparent;
  border: none;
  font-size: 22px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-light);
}

.top-popup-close:hover {
  color: #000;
}

/* === Ukrywanie przycisków Google Maps === */
.gmnoprint,
.gm-tilt-controls,
.gm-rotate-controls,
div[data-control="rotation"] {
  display: none !important;
}

/* === RESPONSYWNOŚĆ === */
@media (max-width: 768px) {
  header {
    height: 60px;
    padding: 2px;
    gap: 4px;
    box-shadow: none !important;
  }
  
  #map {
    top: 60px;
    height: calc(100% - 60px);
  }

  .search-container {
    min-width: 150px;
  }
}

@media (max-width: 700px) {
  .slogan {
    display: none;
  }
  .top-popup-content {
    font-size: 13px;
  }
}

@media (max-width: 520px) {
  .modal {
    width: 94vw;
    max-height: 86vh;
    padding: 16px;
  }

  .modal-title {
    font-size: 20px;
  }
  
  header a.cta {
    padding: 10px;
    font-size: 14px;
  } 
}

@media (max-width: 480px) {
  .logo_pw {
    display: none;
  }
  .logo_img {
    display: block;
  }
}
