.ogl-add-listing-form {
  max-width: 1120px;
  margin: 0 auto;
}

.ogl-add-listing-form input[type="text"],
.ogl-add-listing-form textarea {
  width: 100%;
  box-sizing: border-box;
}

/* Archiwum kategorii ogłoszeń */
.ogl-archive-inner {
  max-width: 1500px;
  margin: 5rem auto;
  padding: 0 16px;
}

.ogl-tax-desc {
  margin-top: 8px;
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.6;
}

.ogl-tax-desc-toggle {
  margin-top: 8px;
  padding: 4px 10px;
  font-size: 13px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  cursor: pointer;
}

/* Pasek wyszukiwarki ogłoszeń ([listing_search]) */
.ogl-search {
  max-width: 1120px;
  margin: 0 auto 24px;
}

.ogl-search-form {
  display: flex;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.ogl-search-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
}

.ogl-search-icon {
  font-size: 16px;
  color: #111827;
}

.ogl-search-input {
  border: none !important;
  outline: none;
  box-shadow: none;
  background: transparent;
  width: 100%;
  font-size: 14px;
}

.ogl-search-button {
  border: none;
  background: #E41E2F;
  color: #ffffff;
  padding: 0 55px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
}

.ogl-search-button:hover {
  background: #c21726;
}

.ogl-search-button-icon {
  font-size: 14px;
}

.ogl-contact-section {
  margin: 16px 0;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.ogl-contact-section legend {
  padding: 0 6px;
  font-weight: 600;
}

.ogl-contact-item,
.ogl-contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 999px;
  background: #E41E2F;
  color: #ffffff;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.ogl-contact-item:hover,
.ogl-contact-link:hover {
  background: #c21726;
  color: #ffffff;
}

.ogl-contact-wrapper {
  text-align: center;
}

.ogl-category-columns {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.ogl-category-main,
.ogl-category-sub {
  max-height: 420px;
  overflow-y: auto;
}

/* lewa kolumna (kafelki) szersza, prawa węższa */
.ogl-category-main {
  flex: 2;
}

.ogl-category-sub {
  flex: 1;
  max-height: 380px;
}

/* Czytelne kafelki w kilku kolumnach */
.ogl-category-main {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

@media (min-width: 1440px) {
  .ogl-category-main {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .ogl-category-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .ogl-category-columns {
    flex-direction: column;
  }

  .ogl-category-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.ogl-cat-main-item {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  text-align: left;
  color: #111827; /* ciemny tekst, niezależnie od motywu */
}

.ogl-cat-main-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  transition: background 0.15s, transform 0.15s, border-color 0.15s;
}

.ogl-cat-main-item.is-active .ogl-cat-main-inner,
.ogl-cat-main-item:hover .ogl-cat-main-inner {
  background: #e5f0ff;
  border-color: #bfdbfe;
  transform: translateY(-1px);
}

.ogl-cat-main-icon {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background-color: #e5e7eb;
  background-size: 70%;
  background-position: center;
  background-repeat: no-repeat;
  flex-shrink: 0;
  background-image: url('http://jeleniagora.101miast.pl/wp-content/uploads/sites/15/2025/12/avat-bh.png');
}

.ogl-cat-main-label {
  font-size: 14px;
  font-weight: 500;
}

/* ---- Shortcode: listing_categories ---- */
.ogl-cat-shortcode {
  max-width: 1120px;
  margin: 0 auto 32px;
}

.ogl-cat-shortcode-main-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-bottom: 16px;
}

.ogl-cat-shortcode-main-item {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.ogl-cat-shortcode-main-item .ogl-cat-main-inner {
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: transparent;
  border: none;
}

.ogl-cat-shortcode-main-item .ogl-cat-main-icon {
  margin-bottom: 6px;
  width: 90px;
  height: 90px;
  background-size: 80%;
  background-color: #fff;
}

.ogl-cat-shortcode-main-item .ogl-cat-main-label {
  font-size: 16px;
  font-weight: 700;
  color: #252638;
}

/* Na hover/active (gdy motyw przyciemnia tło) wymuszamy jasny tekst etykiety */
.ogl-cat-shortcode-main-item:hover .ogl-cat-main-label,
.ogl-cat-shortcode-main-item.is-active .ogl-cat-main-label {
  color: #ffffff;
}

/* dla shortcode listing_categories nie pokazujemy ramki wokół ikon przy hover/active */

.ogl-cat-shortcode-panel {
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  padding: 16px 20px;
  display: none; /* domyślnie ukryty, pokazujemy dopiero po wyborze kategorii */
}

.ogl-cat-shortcode-panel-inner {
  display: none;
}

.ogl-cat-shortcode-panel-inner.is-active {
  display: block;
}

.ogl-cat-shortcode-panel.has-active {
  display: block;
}

.ogl-cat-shortcode-panel-header {
  margin-bottom: 12px;
}

.ogl-cat-shortcode-panel-all {
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: #111827;
}

.ogl-cat-shortcode-panel-all:hover {
  text-decoration: underline;
}

.ogl-cat-shortcode-subgrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 24px;
}

@media (max-width: 960px) {
  .ogl-cat-shortcode-subgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .ogl-cat-shortcode-subgrid {
    grid-template-columns: 1fr;
  }
}

.ogl-cat-shortcode-subitem a {
  font-size: 14px;
  color: #111827;
  text-decoration: none;
}

.ogl-cat-shortcode-subitem a:hover {
  text-decoration: underline;
}

.ogl-cat-sub-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border: none;
  background: #fff;
  cursor: pointer;
  border-radius: 6px;
  margin-bottom: 4px;
  color: #111827;
}

.ogl-cat-sub-item.is-active,
.ogl-cat-sub-item:hover {
  background: #e5f0ff;
}

/* Listing grid / list */
.ogl-listings {
  margin-top: 24px;
  display: grid;
  gap: 16px;
}

.ogl-listings--grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.ogl-listings--list {
  grid-template-columns: 1fr;
}

.ogl-listing-card {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  overflow: hidden;
}

/* Widok listy: obrazek po lewej, treść po prawej */
.ogl-listings--list .ogl-listing-card {
  flex-direction: row;
}

.ogl-listing-thumb-wrap {
  display: block;
  overflow: hidden;
}

.ogl-listing-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  display: block;
}

/* W trybie listy miniatura ma stałą szerokość po lewej */
.ogl-listings--list .ogl-listing-thumb-wrap {
  flex: 0 0 220px;
  max-width: 220px;
}

.ogl-listings--list .ogl-listing-thumb,
.ogl-listings--list .ogl-listing-thumb--placeholder {
  height: auto; /* pozwól działać aspect-ratio 16:9 */
}

.ogl-listing-thumb--placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  background: #e5e7eb;
}

.ogl-listing-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
}

.ogl-listing-date {
  font-size: 12px;
  color: #777;
  margin-top: auto;
  text-align: right;
}

/* Komunikaty formularza (sukces / błąd) */
.ogl-message {
  border-radius: 4px;
  padding: 8px 12px;
  margin: 8px 0;
  font-size: 14px;
}

.ogl-message--success {
  background-color: #e6f4ea;
  border: 1px solid #34a853;
  color: #185a2c;
}

.ogl-message--error {
  background-color: #fde8e8;
  border: 1px solid #d93025;
  color: #7d1710;
}

.ogl-listing-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px;
}

.ogl-listing-title a {
  text-decoration: none;
  color: inherit;
}

.ogl-listing-price {
  font-size: 22px;
  font-weight: 800;
  color: #111827;
  margin-bottom: 6px;
}

.ogl-listing-extra {
  margin: 0;
}

.ogl-listing-extra-row {
  display: flex;
  gap: 4px;
  font-size: 13px;
  color: #4b5563;
}

.ogl-listing-extra-row dt {
  font-weight: 700;
}

.ogl-listing-extra-row dd {
  margin: 0;
}

.ogl-listing-date {
  margin-top: 6px;
  font-size: 12px;
  color: #9ca3af; /* szary */
  align-self: flex-end; /* domyślnie prawa strona w układzie kolumnowym */
}

/* Meta na stronie pojedynczego ogłoszenia ([listing_meta]) */
.ogl-single-meta {
  margin: 12px 0;
}

.ogl-single-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 14px;
  color: #4b5563;
}

.ogl-single-meta-label {
  font-weight: 600;
}

.ogl-single-meta-value {
  margin: 0;
}

/* SPECJALNY UKŁAD DLA WIDOKU LISTY: dwie kolumny w obrębie treści karty */
.ogl-listings--list .ogl-listing-body {
  display: grid;
  /* lewa kolumna wypełnia przestrzeń, prawa ma stałą szerokość przy prawej krawędzi */
  grid-template-columns: minmax(0, 1fr) 180px;
  grid-auto-rows: auto;
  column-gap: 16px;
}

.ogl-listings--list .ogl-listing-title,
.ogl-listings--list .ogl-listing-extra {
  grid-column: 1 / 2;
}

.ogl-listings--list .ogl-listing-price,
.ogl-listings--list .ogl-listing-date {
  grid-column: 2 / 3;
  text-align: right;
}

.ogl-listings--list .ogl-listing-actions {
  grid-column: 1 / 3;
}

/* Galeria na stronie pojedynczego ogłoszenia */
.ogl-single-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}

.ogl-single-gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 4px;
}

.ogl-single-main-image {
  cursor: zoom-in;
}

/* Prosty lightbox dla galerii */
.ogl-lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.ogl-lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
}

.ogl-contact {
  margin: 16px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 14px;
}

.ogl-contact-item,
.ogl-contact-link {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  text-decoration: none;
  background: #f3f4f6;
  color: #111827;
  border: none;
  cursor: pointer;
  font: inherit;
}

.ogl-contact-item:hover,
.ogl-contact-link:hover {
  background: #e5e7eb;
}
