/* Режими шахматки: всі секції / одна секція. Додати після старих стилів. */
.checker-building.checker-all-sections { overflow-x: auto; }
.checker-building.checker-all-sections .checker-floor {
  display: flex;
  align-items: stretch;
  width: max-content;
  min-width: 100%;
}
.checker-building.checker-all-sections .floor-number {
  box-sizing: border-box;
  flex: 0 0 74px;
  width: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.checker-building.checker-all-sections .floor-apartments {
  display: flex;
  gap: 32px;
  flex: 0 0 auto;
  width: auto;
}
.checker-building.checker-all-sections .checker-section {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(var(--section-columns, 1), 90px);
  gap: 0;
  flex: 0 0 calc(var(--section-columns, 1) * 90px);
  width: calc(var(--section-columns, 1) * 90px);
  align-content: start;
}
.checker-building.checker-all-sections .checker-section .apartment-cell {
  box-sizing: border-box;
  min-width: 0;
  width: 90px;
}
/* Вибрана одна секція: жодних проміжків між квартирами */
.checker-building.checker-single-section .floor-apartments {
  display: grid;
  grid-template-columns: repeat(var(--single-columns, 1), 90px);
  gap: 0;
  width: max-content;
  max-width: none;
}
.checker-building.checker-single-section .floor-apartments .apartment-cell {
  width: 90px;
  min-width: 0;
  box-sizing: border-box;
}
.apartment-cell {
    border-right: 1px solid rgb(16 24 22);
    border-bottom: 1px solid rgb(16 24 22);
}
.apartment-cell small{
	width: 100%; 
    display: block;
    margin-left: 0;
}
.apartment-detail h3 {
    font-size: 18px;
}
.apartment-detail>p {
    margin-top: 10px !important;
}
.apartment-detail dl {
    margin: 4px 0 6px!important;
}
.apartment-detail dl div {
    padding: 8px 0;
}
.flour-s-img .flat-slider-track img {
    max-height: 300px;
}
.checker-scroll {
    padding-bottom: 30px;
}
/* Загальна шахматка */
.checker-building {
    width: max-content;
    min-width: 100%;
}

/* Кожен поверх */
.checker-floor {
    display: grid;
    grid-template-columns: 74px max-content;
    width: 100%;
}

/* Фіксований номер поверху */
.checker-floor .floor-number {
    position: sticky;
    left: 0;
    z-index: 20;

    background: #101916;

    display: flex;
    align-items: center;
    justify-content: center;
}

/* Квартири та паркомісця */
.floor-apartments {
    width: max-content;
}
/* Затемнення за панеллю */
.apartment-drawer-overlay {
    display: none;
}

@media (max-width: 1023px) {

    body.apartment-drawer-open {
        overflow: hidden;
    }

    .apartment-drawer-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .65);
        z-index: 9998;
        opacity: 0;
        visibility: hidden;
        transition: opacity .3s, visibility .3s;
    }

    body.apartment-drawer-open .apartment-drawer-overlay {
        opacity: 1;
        visibility: visible;
    }

    #apartment-detail {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;

        width: min(420px, 92vw);
        height: 100dvh;
        max-height: 100dvh;

        overflow-y: auto;
        overscroll-behavior: contain;

        background: #f1ece3;
        z-index: 9999;

        transform: translateX(105%);
        visibility: hidden;
        transition: transform .3s ease, visibility .3s;

        box-sizing: border-box;
        padding-top: 55px;
    }

    body.apartment-drawer-open #apartment-detail {
        transform: translateX(0);
        visibility: visible;
    }

    .apartment-drawer-close {
        position: absolute;
        top: 12px;
        right: 15px;
        width: 36px;
        height: 36px;
        border: 0;
        border-radius: 50%;
        background: rgba(0, 0, 0, .08);
        color: #222;
        font-size: 26px;
        cursor: pointer;
        z-index: 5;
    }
}

@media (min-width: 1024px) {
    .apartment-drawer-close {
        display: none;
    }
	
}
@media (max-width: 1024px) {
.checker-building.checker-all-sections .checker-section .apartment-cell {
    max-width: 60px;
}
	.checker-building.checker-all-sections .checker-section {
    grid-template-columns: repeat(var(--section-columns, 1), 60px);
    flex: 0 0 calc(var(--section-columns, 1) * 60px);
    width: calc(var(--section-columns, 1) * 60px);
}
	.apartment-cell span{
		display: none;
	}
	button.apartment-cell small {
    font-size: 9px;
}
}
@media (prefers-reduced-motion: reduce) {
    #apartment-detail,
    .apartment-drawer-overlay {
        transition: none;
    }
}
.ep-status-grid.col4 {
    grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 680px) {
	.ep-status-grid.col4 {
	grid-template-columns: 1fr;
	}
}

/* ==========================================
   ATLANT AVENUE — ROOFTOP TERRACES
   ========================================== */

.ep-terraces {
    overflow: hidden;
}

.ep-terraces-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 48px;
}

.ep-terraces-image {
    position: relative;
    margin: 0;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    background: #e7e3db;
}

.ep-terraces-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}

.ep-terraces-image:hover img {
    transform: scale(1.045);
}

.ep-terraces-image figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;

    padding: 55px 24px 24px;
    color: #fff;
    font-size: 15px;
    font-weight: 500;

    background: linear-gradient(
        to top,
        rgba(0, 0, 0, .65),
        transparent
    );
}

.ep-terraces-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;

    padding: 56px 0 0;
}

.ep-terraces-bottom h3 {
    margin: 16px 0 0;
    font-size: clamp(30px, 3.2vw, 52px);
    line-height: 1.12;
    font-weight: 500;
}

.ep-terraces-bottom h3 em {
    font-weight: 400;
}

.ep-terraces-bottom > p {
    max-width: 520px;
    margin: 0;
    font-size: 16px;
    line-height: 1.8;
}

/* Tablet */
@media (max-width: 1023px) {

    .ep-terraces-gallery {
        gap: 12px;
        margin-top: 32px;
    }

    .ep-terraces-bottom {
        gap: 32px;
        padding-top: 40px;
    }
}

/* Mobile */
@media (max-width: 767px) {

    .ep-terraces-gallery {
        display: flex;
        gap: 12px;

        overflow-x: auto;
        scroll-snap-type: x mandatory;
        overscroll-behavior-x: contain;
        scrollbar-width: none;

        margin-top: 28px;
        padding-bottom: 8px;
    }

    .ep-terraces-gallery::-webkit-scrollbar {
        display: none;
    }

    .ep-terraces-image {
        flex: 0 0 84%;
        aspect-ratio: 4 / 5;
        scroll-snap-align: start;
    }

    .ep-terraces-image figcaption {
        font-size: 14px;
        padding: 45px 18px 18px;
    }

    .ep-terraces-bottom {
        grid-template-columns: 1fr;
        gap: 20px;
        padding-top: 32px;
    }

    .ep-terraces-bottom > p {
        font-size: 15px;
        line-height: 1.7;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ep-terraces-image img {
        transition: none;
    }
}


/* Комерція — текст зверху, два фото знизу */

.ep-commercial {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    padding: clamp(60px, 7vw, 110px) 5%;
}

/* Текст на всю ширину */

.ep-commercial-copy {
    order: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: clamp(30px, 5vw, 90px);
    align-items: start;
}

.ep-commercial-copy .ep-eyebrow,
.ep-commercial-copy h2 {
    grid-column: 1;
}

.ep-commercial-copy > p:not(.ep-eyebrow) {
    grid-column: 2;
    margin: 0 0 18px;
    font-size: 16px;
    line-height: 1.75;
}

.ep-commercial-copy > p:nth-of-type(2) {
    grid-row: 1 / span 2;
}

.ep-commercial-copy > p:nth-of-type(3) {
    grid-row: 3;
}

.ep-commercial-copy dl {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin: 25px 0 0;
    padding-top: 24px;
    border-top: 1px solid rgba(0,0,0,.15);
}

/* Дві фотографії в одному ряду */

.ep-commercial-images {
    order: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
    gap: 16px;
    height: auto;
}

.ep-commercial-image {
    position: relative;
    margin: 0;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    min-height: 0;
}

.ep-commercial-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .5s ease;
}

/* Мобільна версія */

@media (max-width: 767px) {
    .ep-commercial {
        padding: 55px 20px;
        gap: 28px;
    }

    .ep-commercial-copy {
        display: block;
    }

    .ep-commercial-copy h2 {
        font-size: clamp(28px, 7vw, 38px);
        margin: 14px 0 22px;
    }

    .ep-commercial-copy > p:not(.ep-eyebrow) {
        font-size: 15px;
        line-height: 1.7;
        margin-bottom: 18px;
    }

    .ep-commercial-copy dl {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-top: 24px;
    }

    .ep-commercial-images {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .ep-commercial-image {
        aspect-ratio: 16 / 10;
    }
}
header#site-header {
    z-index: 99999;
}

/* Горизонтальна галерея терас */

.ep-terraces-gallery.ep-terraces-scroll {
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
}

.ep-terraces-scroll::-webkit-scrollbar {
    display: none;
}

.ep-terraces-scroll .ep-terraces-image {
    flex: 0 0 calc((100% - 48px) / 3.4);
    min-width: 0;
    aspect-ratio: 4 / 5;
    scroll-snap-align: start;
}

/* Планшети */

@media (max-width: 1023px) {
    .ep-terraces-scroll .ep-terraces-image {
        flex-basis: 42%;
    }
}

/* Телефони */

@media (max-width: 767px) {
    .ep-terraces-scroll .ep-terraces-image {
        flex-basis: 84%;
    }
}

/* Слайдер терас */

.ep-terraces-slider {
    position: relative;
    min-width: 0;
}

.ep-terraces-gallery.ep-terraces-scroll {
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
}

.ep-terraces-gallery.ep-terraces-scroll:active {
    cursor: grabbing;
}

.ep-terraces-scroll::-webkit-scrollbar {
    display: none;
}

.ep-terraces-scroll .ep-terraces-image {
    flex: 0 0 calc((100% - 48px) / 3.4);
    min-width: 0;
    margin: 0;
    scroll-snap-align: start;
}

/* Прибрати збільшення фото */

.ep-terraces-scroll .ep-terraces-image img,
.ep-terraces-scroll .ep-terraces-image:hover img {
    transform: none !important;
    transition: none !important;
}

/* Кнопки */

.ep-terraces-prev,
.ep-terraces-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 50%;
    background: #fff;
    color: #222;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ep-terraces-prev { left: 12px; }
.ep-terraces-next { right: 12px; }

@media (max-width: 1023px) {
    .ep-terraces-scroll .ep-terraces-image {
        flex-basis: 42%;
    }
}

@media (max-width: 767px) {
    .ep-terraces-scroll .ep-terraces-image {
        flex-basis: 84%;
    }

    .ep-terraces-prev,
    .ep-terraces-next {
        display: none;
    }
}
.ep-terraces-slider button {
    background: rgb(255 255 255 / 70%)!important;
}
/* Тільки вбудований паркінг на 0 поверсі */

.checker-building
.checker-floor-parking
.checker-section {
    display: grid;
    grid-template-columns:
        repeat(var(--section-columns), minmax(0, 1fr));
    gap: 4px;
    align-content: start;
}

.checker-building
.checker-floor-parking
.checker-section button.apartment-cell.available.apartment-f-P {
    background: rgb(156 198 165 / 10%);
}