/* ==========================================
   MARKETPLACE WYSZUKIWARKA I FILTRY
   ========================================== */

.ip-marketplace-wrapper {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  font-family: Montserrat, sans-serif;
  color: #1e1e1e;
  align-items: start;
}

/* --- LEWY SIDEBAR (FILTRY) --- */
.ip-filters-sidebar {
  margin: 40px 0;
  background: #ffffff;
  border-right: 1px solid #e5e5e5;
  padding-right: 24px;
}

.ip-filters-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #c5a059;
}

.ip-filter-group {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #f0f0f0;
}

.ip-filter-label {
  display: block;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.ip-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ip-checkbox-item {
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.ip-checkbox-item input[type="checkbox"] {
  margin-right: 8px;
  accent-color: #6da0ef;
  width: 16px;
  height: 16px;
}

.ip-checkbox-item .ip-count {
  color: #8d8d8d;
  font-size: 12px;
  margin-left: 6px;
}

/* WYSZARZANIE PUSTYCH FILTRÓW */
.ip-checkbox-item.is-empty {
  opacity: 0.5; /* Delikatne wyszarzenie by było widać, że opcja jest aktualnie "pusta" */
}

.ip-date-range {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ip-btn-reset {
  width: 100%;
  background: transparent;
  border: 1px solid #ff4d4d;
  color: #ff4d4d;
  padding: 12px;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}
.ip-btn-reset:hover {
  background-color: #c5a059 !important;
  color: #ffffff !important;
  box-shadow:
    0px 0px 15px 0px rgba(109, 160, 239, 0.5),
    0px 0px 25px 4px rgba(252, 245, 223, 0.25);
}

/* --- PRAWA KOLUMNA (WYNIKI) --- */
.ip-marketplace-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 16px;
  margin: 40px 0;
}

.ip-found-count {
  font-size: 16px;
  color: #8d8d8d;
}
.ip-found-count strong {
  color: #1e1e1e;
  font-weight: 700;
}

.ip-marketplace-controls {
  display: flex;
  gap: 20px;
  align-items: center;
}
.ip-control-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.ip-marketplace-grid-wrapper {
  position: relative;
  min-height: 400px;
}

/* MÓZG (EKRAN ŁADOWANIA) */
#ip-marketplace-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  backdrop-filter: blur(2px);
}

.ip-loader-content {
  text-align: center;
}
.ip-loader-content svg {
  animation: pulse 1.5s infinite ease-in-out;
}
.ip-loader-content p {
  margin-top: 16px;
  font-weight: 600;
  color: #c5a059;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* PAGINACJA */
.ip-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}
.ip-pag-item a,
.ip-pag-item span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  color: #1e1e1e;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s;
}
.ip-pag-item a:hover {
  border-color: #c5a059;
  color: #c5a059;
}
.ip-pag-item .current {
  background: #c5a059;
  color: #fff;
  border-color: #c5a059;
}

/* RESPONSIVE */
@media (max-width: 991px) {
  .ip-marketplace-wrapper {
    grid-template-columns: 1fr;
  }
  .ip-filters-sidebar {
    border-right: none;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 24px;
    padding-right: 0;
  }
}

.ip-control-item .ts-wrapper .ts-control {
  padding-right: 40px !important;
}
