/* === STAGE32N_DIRECT_HOUSE_SORTED_LIKE_MOKRZYSKA_TEMPLATE_CSS_START === */
.description-heading-removed > h3 {
  display: none !important;
}

.description-heading-removed > p:first-child,
.description-heading-removed > ul:first-child {
  margin-top: 0 !important;
}

body.direct-house-template-sorted-active .direct-house-legacy-basic-info-hidden,
body.direct-house-template-sorted-active #apartmentRoomsPanel.direct-house-basic-info-panel,
body.direct-house-template-sorted-active [data-stage32n-hidden-tabs="true"],
body.direct-house-template-sorted-active .floor-plan-tabs {
  display: none !important;
}

body.direct-house-template-sorted-active .apartment-layout-top {
  align-items: start;
}

body.direct-house-template-sorted-active .direct-house-sorted-params-panel {
  display: block !important;
  order: 0 !important;
}

body.direct-house-template-sorted-active #apartmentCostPanel {
  order: 1 !important;
}

body.direct-house-template-sorted-active .direct-house-sorted-details-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.direct-house-template-sorted-active .direct-house-sorted-details-grid .detail-row {
  min-height: 74px;
}

body.direct-house-template-sorted-active .direct-house-sorted-details-grid .detail-row strong {
  line-height: 1.2;
}

body.direct-house-template-sorted-active .direct-house-sorted-bottom-stack {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  align-items: start;
}

body.direct-house-template-sorted-active #directHouseSortedRoomsPanel {
  display: block !important;
}

body.direct-house-template-sorted-active .direct-house-sorted-rooms-table td:last-child {
  font-weight: 800;
  text-align: right;
}

body.direct-house-template-sorted-active #apartmentDetailsPanel h3,
body.direct-house-template-sorted-active #apartmentCostPanel h3,
body.direct-house-template-sorted-active #apartmentPricePanel h3,
body.direct-house-template-sorted-active #directHouseSortedRoomsPanel h3 {
  margin-bottom: 14px;
}

@media (max-width: 980px) {
  body.direct-house-template-sorted-active .direct-house-sorted-bottom-stack {
    grid-template-columns: 1fr !important;
  }

  body.direct-house-template-sorted-active .direct-house-sorted-details-grid {
    grid-template-columns: 1fr;
  }

  body.direct-house-template-sorted-active .direct-house-sorted-rooms-table td:last-child {
    text-align: left;
  }
}
/* === STAGE32N_DIRECT_HOUSE_SORTED_LIKE_MOKRZYSKA_TEMPLATE_CSS_END === */

/* === STAGE32W_FIX_DIRECT_HOUSE_BOTTOM_COLUMN_ALIGNMENT_START ===
   Fixes direct-house detail column rhythm:
   - bottom row uses the same left/right column proportions as top row,
   - "Historia ceny" follows the left description/gallery column width,
   - "Pomieszczenia" follows the right "Parametry domu" column width,
   - no hiding/masking of the rooms panel.
*/
body.direct-house-template-sorted-active .apartment-layout-top,
body.direct-house-template-sorted-active .apartment-bottom-stack.direct-house-sorted-bottom-stack {
  display: grid !important;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.72fr) !important;
  gap: 20px !important;
  align-items: start !important;
}

body.direct-house-template-sorted-active .apartment-left-stack,
body.direct-house-template-sorted-active .apartment-right-stack,
body.direct-house-template-sorted-active #apartmentPricePanel,
body.direct-house-template-sorted-active #directHouseSortedRoomsPanel {
  min-width: 0 !important;
  width: 100% !important;
}

body.direct-house-template-sorted-active #apartmentPricePanel {
  grid-column: 1 !important;
  max-width: none !important;
}

body.direct-house-template-sorted-active #directHouseSortedRoomsPanel {
  grid-column: 2 !important;
  max-width: none !important;
}

body.direct-house-template-sorted-active #directHouseSortedRoomsPanel .table {
  width: 100% !important;
}

@media (max-width: 980px) {
  body.direct-house-template-sorted-active .apartment-layout-top,
  body.direct-house-template-sorted-active .apartment-bottom-stack.direct-house-sorted-bottom-stack {
    grid-template-columns: 1fr !important;
  }

  body.direct-house-template-sorted-active #apartmentPricePanel,
  body.direct-house-template-sorted-active #directHouseSortedRoomsPanel {
    grid-column: auto !important;
  }
}
/* === STAGE32W_FIX_DIRECT_HOUSE_BOTTOM_COLUMN_ALIGNMENT_END === */

/* === STAGE32W_FIX_DIRECT_HOUSE_ROOMS_UNDER_PARAMS_START ===
   Pomieszczenia must live directly under Parametry domu in the right column.
   Historia ceny stays in the left column under the description.
*/
body.direct-house-template-sorted-active .apartment-right-stack {
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
}

body.direct-house-template-sorted-active #directHouseSortedRoomsPanel.direct-house-rooms-under-params {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  grid-column: auto !important;
}

body.direct-house-template-sorted-active .apartment-bottom-stack.direct-house-sorted-bottom-stack {
  display: grid !important;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.72fr) !important;
  gap: 20px !important;
  align-items: start !important;
}

body.direct-house-template-sorted-active #apartmentPricePanel {
  grid-column: 1 !important;
  width: 100% !important;
  max-width: none !important;
}

@media (max-width: 980px) {
  body.direct-house-template-sorted-active .apartment-bottom-stack.direct-house-sorted-bottom-stack {
    grid-template-columns: 1fr !important;
  }

  body.direct-house-template-sorted-active #apartmentPricePanel {
    grid-column: auto !important;
  }
}
/* === STAGE32W_FIX_DIRECT_HOUSE_ROOMS_UNDER_PARAMS_END === */

/* === STAGE32W_FIX_DIRECT_HOUSE_ROOMS_TABLE_TYPOGRAPHY_START ===
   Keeps the direct-house rooms table readable:
   - "Pomieszczenie" must not wrap into broken fragments,
   - header labels stay aligned,
   - numeric surface values stay right-aligned,
   - applies to the reusable direct-house template, not only one page.
*/
body.direct-house-template-sorted-active #directHouseSortedRoomsPanel .direct-house-sorted-rooms-table {
  width: 100% !important;
  table-layout: fixed !important;
  border-collapse: separate;
  border-spacing: 0;
}

body.direct-house-template-sorted-active #directHouseSortedRoomsPanel .direct-house-sorted-rooms-table th,
body.direct-house-template-sorted-active #directHouseSortedRoomsPanel .direct-house-sorted-rooms-table td {
  vertical-align: middle !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
}

body.direct-house-template-sorted-active #directHouseSortedRoomsPanel .direct-house-sorted-rooms-table th:first-child,
body.direct-house-template-sorted-active #directHouseSortedRoomsPanel .direct-house-sorted-rooms-table td:first-child {
  width: 58% !important;
  text-align: left !important;
}

body.direct-house-template-sorted-active #directHouseSortedRoomsPanel .direct-house-sorted-rooms-table th:last-child,
body.direct-house-template-sorted-active #directHouseSortedRoomsPanel .direct-house-sorted-rooms-table td:last-child {
  width: 42% !important;
  text-align: right !important;
  white-space: nowrap !important;
}

body.direct-house-template-sorted-active #directHouseSortedRoomsPanel .direct-house-sorted-rooms-table th:first-child {
  white-space: nowrap !important;
}

@media (max-width: 520px) {
  body.direct-house-template-sorted-active #directHouseSortedRoomsPanel .direct-house-sorted-rooms-table th:first-child {
    white-space: normal !important;
  }

  body.direct-house-template-sorted-active #directHouseSortedRoomsPanel .direct-house-sorted-rooms-table th:last-child,
  body.direct-house-template-sorted-active #directHouseSortedRoomsPanel .direct-house-sorted-rooms-table td:last-child {
    white-space: normal !important;
  }
}
/* === STAGE32W_FIX_DIRECT_HOUSE_ROOMS_TABLE_TYPOGRAPHY_END === */



/* STAGE34V_TEXT_FIT_FIX */
#apartmentDescriptionPanel,
.apartment-description-panel,
.apartment-bottom-stack .panel {
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}

#apartmentDescriptionPanel p,
#apartmentDescriptionPanel li,
.apartment-description-panel p,
.apartment-description-panel li {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  word-break: break-word !important;
}

.apartment-right-stack table {
  table-layout: fixed;
  width: 100%;
}

.apartment-right-stack td,
.apartment-right-stack th {
  white-space: normal !important;
  word-break: break-word !important;
  vertical-align: top;
}

.apartment-right-stack td:last-child,
.apartment-right-stack .value,
.apartment-right-stack strong {
  white-space: normal !important;
  word-break: break-word !important;
}

.apartment-right-stack .detail-row,
.apartment-right-stack .param-card,
.apartment-right-stack .detail-box {
  min-height: 0 !important;
}

.apartment-right-stack .detail-row strong,
.apartment-right-stack .param-card strong,
.apartment-right-stack .detail-box strong,
.apartment-right-stack .detail-row span,
.apartment-right-stack .param-card span,
.apartment-right-stack .detail-box span {
  white-space: normal !important;
  word-break: break-word !important;
}


/* STAGE34W_TEXT_FIT_FIX */
#apartmentDescriptionPanel,
.apartment-description-panel,
.apartment-bottom-stack .panel {
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}

#apartmentDescriptionPanel p,
#apartmentDescriptionPanel li,
.apartment-description-panel p,
.apartment-description-panel li {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  word-break: normal !important;
  overflow-wrap: anywhere !important;
}

.apartment-right-stack table {
  table-layout: fixed;
  width: 100%;
}

.apartment-right-stack th,
.apartment-right-stack td {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  vertical-align: top;
}

.apartment-right-stack td:last-child,
.apartment-right-stack strong {
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  line-height: 1.22;
}

.apartment-right-stack .detail-row span,
.apartment-right-stack .detail-row strong,
.apartment-right-stack .param-card span,
.apartment-right-stack .param-card strong,
.apartment-right-stack .detail-box span,
.apartment-right-stack .detail-box strong {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  overflow-wrap: anywhere !important;
}


/* STAGE34X_TEXT_FIT_FIX */
#apartmentDescriptionPanel,
.apartment-description-panel,
.apartment-bottom-stack .panel {
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}

#apartmentDescriptionPanel p,
#apartmentDescriptionPanel li,
.apartment-description-panel p,
.apartment-description-panel li {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  word-break: normal !important;
  overflow-wrap: anywhere !important;
}

.apartment-right-stack table {
  table-layout: fixed;
  width: 100%;
}

.apartment-right-stack th,
.apartment-right-stack td {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  vertical-align: top;
}

.apartment-right-stack td:last-child,
.apartment-right-stack strong {
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  line-height: 1.22;
}

.apartment-right-stack .detail-row span,
.apartment-right-stack .detail-row strong,
.apartment-right-stack .param-card span,
.apartment-right-stack .param-card strong,
.apartment-right-stack .detail-box span,
.apartment-right-stack .detail-box strong {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  overflow-wrap: anywhere !important;
}


/* STAGE34AB_SIDE_CARD_TEXT_FIT */
.apartment-right-stack,
.apartment-right-stack .panel,
.apartment-right-stack .card,
.apartment-right-stack section {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

.apartment-right-stack .details-grid,
.apartment-right-stack .direct-house-sorted-details-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

.apartment-right-stack .detail-row,
.apartment-right-stack .param-card,
.apartment-right-stack .detail-box {
  min-height: 72px !important;
  height: auto !important;
  overflow: visible !important;
}

.apartment-right-stack .detail-row span,
.apartment-right-stack .detail-row strong,
.apartment-right-stack .param-card span,
.apartment-right-stack .param-card strong,
.apartment-right-stack .detail-box span,
.apartment-right-stack .detail-box strong,
.apartment-right-stack td,
.apartment-right-stack th {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  overflow-wrap: anywhere !important;
}

#apartmentDescriptionPanel,
.apartment-description-panel,
.apartment-bottom-stack .panel {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

#apartmentDescriptionPanel li,
#apartmentDescriptionPanel p,
.apartment-description-panel li,
.apartment-description-panel p {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
}


/* STAGE34AD_RIGHT_COLUMN_ORDER_CSS */
.stage34ad-right-column-card {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.apartment-right-stack .stage34ad-right-column-card,
.local-detail-side .stage34ad-right-column-card,
.direct-house-side .stage34ad-right-column-card {
  width: 100% !important;
}

.stage34ad-right-column-card table {
  width: 100% !important;
  table-layout: fixed !important;
}

.stage34ad-right-column-card th,
.stage34ad-right-column-card td {
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}


/* STAGE34AE_HISTORY_WIDTH_CSS */
.stage34ae-history-width-card {
  width: 100%;
  box-sizing: border-box;
}

.stage34ae-history-width-card .history-price-row,
.stage34ae-history-width-card .history-card-row,
.stage34ae-history-width-card table {
  width: 100%;
}


/* STAGE34AF_HISTORY_RIGHT_TEMPLATE_CSS */
.stage34af-right-card {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.stage34af-history-right-card {
  margin-top: 18px !important;
}

.stage34af-history-right-card table,
.stage34af-history-right-card .history-price-row,
.stage34af-history-right-card .history-card-row {
  width: 100% !important;
}

.apartment-right-stack .stage34af-right-card,
.local-detail-side .stage34af-right-card,
.direct-house-side .stage34af-right-card {
  width: 100% !important;
  max-width: 100% !important;
}


/* STAGE34AG_HISTORY_BACK_LEFT_CSS_REMOVED_BY_STAGE34AI */
/* STAGE34AH_HISTORY_WIDTH_FIX_CSS_REMOVED_BY_STAGE34AI */


/* STAGE34AI_HISTORY_FINAL_LEFT_WIDTH_CSS */
.stage34ai-history-final-left-width {
  box-sizing: border-box !important;
  min-width: 0 !important;
  max-width: min(720px, 100%) !important;
  align-self: flex-start !important;
  justify-self: start !important;
  margin-top: 24px !important;
}

.stage34ai-history-final-left-width table,
.stage34ai-history-final-left-width .history-price-row,
.stage34ai-history-final-left-width .history-card-row {
  width: 100% !important;
  max-width: 100% !important;
}

.stage34ai-history-final-left-width input,
.stage34ai-history-final-left-width .price,
.stage34ai-history-final-left-width .amount {
  max-width: 100% !important;
}


/* STAGE34AJ_GARAGE_TILE_TWO_LINES */
.apartment-right-stack .detail-row strong,
.apartment-right-stack .param-card strong,
.apartment-right-stack .detail-box strong {
  white-space: pre-line !important;
  line-height: 1.18 !important;
}


/* STAGE34AK_TILE_LINEBREAK_RENDER */
.apartment-right-stack .detail-row strong,
.apartment-right-stack .param-card strong,
.apartment-right-stack .detail-box strong {
  line-height: 1.12 !important;
}


/* STAGE34AO_GARAZ_DWUSTANOWISKOWY */
.apartment-right-stack .detail-row strong,
.apartment-right-stack .param-card strong,
.apartment-right-stack .detail-box strong {
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.15 !important;
}

.apartment-right-stack .detail-row,
.apartment-right-stack .param-card,
.apartment-right-stack .detail-box {
  min-height: 72px;
}


/* STAGE34AP_REAL_GARAGE_TILE_SOURCE */
.apartment-right-stack .detail-row strong,
.apartment-right-stack .param-card strong,
.apartment-right-stack .detail-box strong,
.direct-house-basic-info-sidebar strong,
.direct-house-basic-info-sidebar b {
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  line-height: 1.12 !important;
}
