* {
  font-family: Montserrat, sans-serif;
}

/* ==========================================
   PODGLĄD OFERTY - GŁÓWNY LAYOUT (Dla kontenera Elementora)
   ========================================== */
.ip-preview-page-wrapper {
  width: 100%; /* Brak max-width i marginesów - Elementor rządzi! */
  font-family: inherit;
  color: #1e1e1e;
}

/* GÓRNY PASEK NARZĘDZIOWY */
.ip-preview-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  padding: 16px 0;
  border-bottom: 1px solid #e0e0e0;
}

.ip-btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #1e1e1e;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  transition: 0.3s;
}
.ip-btn-back:hover {
  color: #c5a059;
}

.ip-preview-main {
  max-width: 600px;
}

/* Przycisk edycji - jako tekst nawiązujący do designu */
.ip-btn-edit {
  background: #c5a059;
  color: white;
  font-size: 16px;
  padding: 12px 20px;
  font-weight: 600;
  text-decoration: none;
  transition: 0.3s;
  border-radius: 4px;
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.1s ease;
}
.ip-btn-edit:hover {
  box-shadow:
    0px 0px 15px 0px rgba(109, 160, 239, 0.5),
    0px 0px 25px 4px rgba(252, 245, 223, 0.25);
  text-decoration: none !important;
  color: white !important;
}

.ip-breadcrumbs {
  font-size: 14px;
  color: #8d8d8d;
  margin-bottom: 32px;
}
.ip-breadcrumbs .separator {
  margin: 0 8px;
}
.ip-breadcrumbs .current {
  color: #1e1e1e;
  font-weight: 500;
}

/* ==========================================
   SIATKA GŁÓWNA
   ========================================== */
.ip-preview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 992px) {
  .ip-preview-grid {
    grid-template-columns: 1fr 450px;
    align-items: start;
  }
}

/* ==========================================
   LEWA KOLUMNA (Numer i Badges)
   ========================================== */
.ip-main-meta {
  display: flex;
  justify-content: space-between; /* Numer po lewej, Badges po prawej! */
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 16px;
}
.ip-meta-number {
  font-size: 14px;
  color: #1e1e1e;
  font-weight: 400;
}
.ip-meta-badges {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ip-main-title {
  font-size: 40px;
  font-weight: 500;
}

/* ==========================================
   PRAWA KOLUMNA (Boksy informacyjne)
   ========================================== */
.ip-preview-sidebar {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.ip-info-box {
  border: 1px solid #00000040;
  border-radius: 4px;
  padding: 16px;
  background: #ffffff;
}
.ip-info-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: #0e3c82;
  text-transform: uppercase;
  margin: 0 0 20px 0;
  border-bottom: 1px solid #00000040;
  padding-bottom: 16px;
}

/* LISTA DANYCH */
.ip-info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.ip-info-list li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 15px;
}
.ip-info-list li span {
  color: #1e1e1e;
  font-weight: 600;
  min-width: max-content;
  margin-right: 18px;
}
.ip-info-list li strong {
  color: #1e1e1e;
  font-weight: 400;
  font-size: 14px;
  text-align: right;
  word-break: break-word;
}

/* OPIS (Łamanie długich słów i linków) */
.ip-word-wrap {
  overflow-wrap: break-word;
  word-break: break-word;
  /* white-space: pre-wrap; Zachowuje entery z textarea */
  font-size: 16px;
  color: #1e1e1e;
  font-weight: 400;
}

/* ==========================================
   ZAŁĄCZNIKI I GALERIA
   ========================================== */
.ip-text-link {
  color: #1e1e1e;
  text-decoration: underline;
  transition: 0.3s;
  font-weight: 500;
}
.ip-text-link:hover {
  color: #c5a059;
}

.ip-preview-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 10px;
  width: 100%;
}
.ip-gallery-thumb,
.ip-preview-image-single {
  width: 60px;
  height: 60px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #e0e0e0;
  cursor: pointer;
  transition: opacity 0.3s;
}
.ip-gallery-thumb:hover,
.ip-preview-image-single:hover {
  opacity: 0.7;
}
.ip-gallery-thumb img,
.ip-preview-image-single img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================
   LIGHTBOX GALERII (CSS)
   ========================================== */
.ip-lightbox-overlay {
  display: none;
  position: fixed;
  z-index: 99999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
}
.ip-lightbox-overlay.active {
  display: flex;
}
.ip-lightbox-close {
  position: absolute;
  top: 20px;
  right: 40px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}
.ip-lightbox-close:hover {
  color: #c5a059;
}
#ip-lightbox-img {
  max-width: 90%;
  max-height: 90vh;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* ==========================================
   CZARNY BOKS KONTAKTOWY (LEWA KOLUMNA)
   ========================================== */
.ip-contact-box {
  background-color: #1e1e1e;
  border-radius: 8px;
  padding: 24px;
  margin-top: 48px; /* Odstęp od tytułu oferty */
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.ip-contact-title {
  color: #ffffff;
  font-size: 24px;
  font-weight: 600;
  margin: 0;
}

.ip-contact-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
}

.ip-contact-actions a,
.ip-contact-actions button {
  width: 50%;
}

.ip-contact-link {
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.ip-contact-link:hover {
  color: #c5a059; /* Złoty akcent na hover */
}

/* ==========================================
   PRZYKLEJANIE LEWEJ KOLUMNY (STICKY)
   ========================================== */
@media (min-width: 992px) {
    .ip-preview-main {
        position: sticky;
        top: 40px;
        height: fit-content;
    }
}