/* BTA33KAR — bta-wide-1.1.css (UI-W1, 2026-10-14; 1.1 = 1.0 + project price bdi + homepage 6-up). Owner: "large parts of the screen are wasted".
   Desktop/tablet only (>=1200px) — mobile (<1200) is untouched, so the mobile map-expansion,
   sticky CTA and drawer contracts are unaffected. Immutable filename: a correction ships as 1.1.

   1. ONE width ladder for header, top bar, body sections, listings and footer (they were 1140 vs 1376,
      so edges did not line up). 2. Units page: list + sticky full-height map (split view, like the
      big property portals). 3. Denser card grids on wide screens. */

/* 1. WIDTH LADDER ------------------------------------------------------------------------ */
@media (min-width: 1200px) {
    :root {
        --bta-wide-w: min(94vw, 1280px);
        --bta-container-w: var(--bta-wide-w);
        --bta-container-max: var(--bta-wide-w);
        --bta-container-max-wide: var(--bta-wide-w);
    }
    .container-fluid.w90 {
        max-width: var(--bta-wide-w) !important;
    }
}
@media (min-width: 1440px) {
    :root { --bta-wide-w: min(94vw, 1400px); }
}
@media (min-width: 1700px) {
    :root { --bta-wide-w: min(92vw, 1760px); }
}

/* compounds list page uses the same measure */
@media (min-width: 1200px) {
    main:has(#bta-cmp-grid) > .container-fluid.w90 {
        padding-inline: 32px;
    }
    #bta-cmp-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
}

/* 2. UNITS PAGE SPLIT VIEW (list | sticky map) -------------------------------------------- */
@media (min-width: 1200px) {
    #properties-list:has(> #properties-map-horizontal) {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) clamp(380px, 38%, 720px);
        column-gap: 24px;
        align-items: start;
    }
    #properties-list:has(> #properties-map-horizontal) > * {
        grid-column: 1;
        min-width: 0;
    }
    #properties-list > #properties-map-horizontal {
        grid-column: 2;
        grid-row: 1 / span 4;
        position: sticky !important;          /* the wrapper carries an inline position:relative */
        top: 104px;
        margin-top: 0 !important;
        border-radius: 14px !important;
    }
    body.show-admin-bar #properties-list > #properties-map-horizontal { top: 144px; }
    #properties-list > #properties-map-horizontal #map {
        block-size: calc(100vh - 128px) !important;
        height: calc(100vh - 128px) !important;
        min-height: 0 !important;
    }
    body.show-admin-bar #properties-list > #properties-map-horizontal #map {
        block-size: calc(100vh - 168px) !important;
        height: calc(100vh - 168px) !important;
    }
    #properties-list > .bta-results-heading { margin-top: 0; }
    #properties-list .data-listing > .row {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    }
}

/* 3. DENSER GRIDS ON WIDE SCREENS --------------------------------------------------------- */
@media (min-width: 1700px) {
    #projects-list .data-listing > .row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* "Showing" select was clipped to "Showi" in English */
#ajax-filters-form .bta-sb-tools #per-page { width: auto !important; min-width: 96px; }

/* project card price: keep each amount on one line */
.bta-proj-price bdi { white-space: nowrap; }

/* homepage featured projects (6 items): one row of 6 on very wide screens instead of 2 rows of huge cards */
@media (min-width: 1700px) {
    body#page-home .container-fluid.w90 > .projecthome:not(.homehouse) > .row.rowm10:has(> :nth-child(6):last-child) {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}
