@import url('normalize.css');

/* :root {
    --color-bg-light-gradient: linear-gradient(109.74deg,#fdfeff,#f2f2f7 86.79%);
    --color-bg-dark-gradient: linear-gradient(109.74deg,#474747,#151515 86.79%);
    --color-bg-light-white: #fff;
    --color-bg-light-grey: #efefef;
    --color-bg-light-grey-2: #dbdbdb;
    --color-bg-dark-black: #000;
    --color-career-light-blue-label: #e8edf5;
    --color-career-active-blue: #0038df;
    --color-career-orange: #e66835;
    --color-label-light-primary: #1c1d21;
    --color-label-light-secondary: #45474a;
    --color-label-light-tertiary: #76787b;
    --color-label-dark-primary: #fff;
    --color-label-light-quaternary: #b0b1b4;
    --color-label-dark-tertiary: hsla(0,0%,100%,.4);
    --color-label-dark-quaternary: hsla(0,0%,100%,.28);
    --color-tints-light-green: #28b839;
    --color-tints-light-light-blue: #e8edf5;
    --color-tints-light-medium-blue: #c5d9f8;
    --color-tints-light-blue: #213fdc;
    --color-tints-light-purple: #6f19d1;
    --color-tints-light-dark-blue: #0e256d;
    --color-tints-light-red: #f41206;
    --color-tints-light-orange: #f75b19;
    --color-tints-dark-green: #53ce61;
    --color-tints-dark-light-blue: #ccedff;
    --color-tints-dark-blue: #2393fb;
    --color-tints-dark-purple: #8a42dc;
    --color-tints-dark-dark-blue: #122b7c;
    --color-tints-dark-red: #ef473e;
    --color-tints-dark-orange: #f76919;
    --color-transparent-light-invert-50: rgba(0,0,0,.5);
    --color-transparent-light-invert-40: rgba(0,0,0,.4);
    --color-transparent-light-invert-10: rgba(0,0,0,.1);
    --color-transparent-dark-invert-60: hsla(0,0%,100%,.64);
    --color-transparent-dark-invert-40: hsla(0,0%,100%,.4);
    --color-transparent-dark-invert-10: hsla(0,0%,100%,.1);
    --color-separator-light-main: #cfd1d4;
    --color-separator-dark-main: #4d4d54;
    --color-gray-light-1: #fff;
    --color-gray-light-2: #f2f2f2;
    --color-gray-light-3: #dbdbdb;
    --color-gray-light-4: #cacaca;
    --color-gray-dark-1: #141414;
    --color-gray-dark-2: #232324;
    --color-gray-dark-3: #363738;
    --color-gray-dark-4: #4c4e50;
    --color-blue-commercial: #213fdc;
    --color-blue-commercial-dark: #202957;
    --font-oceanic: Oceanic;
    --font-tt: TT Norms Pro;
    --font-inter: 'Manrope', sans-serif;
    --breakpoint-xs: 375;
    --breakpoint-sm: 576;
    --breakpoint-md: 768;
    --breakpoint-lg: 992;
    --breakpoint-xl: 1024;
    --breakpoint-xxl: 1920;
} */


.main-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: var(--font-inter);
}

/* --- Controls --- */
.controls-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.category-buttons {
    display: flex;
    gap: 10px;
}

.btn-pill {
    padding: 10px 24px;
    border-radius: 30px;
    border: 1px solid transparent;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-tt), sans-serif;
    transition: all 0.2s;
    font-size: 14px;
}

.btn-pill.active {
    background-color: var(--color-career-active-blue);
    color: var(--color-label-dark-primary);
}

.btn-pill.inactive {
    background-color: var(--color-career-light-blue-label);
    color: var(--color-label-light-primary);
}

.view-toggles {
    display: flex;
    gap: 20px;
    align-items: center;
}

.view-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-tt), sans-serif;
    font-size: 16px;
    color: var(--color-label-light-tertiary);
    border-bottom: 2px solid transparent;
    padding-bottom: 4px;
    transition: color 0.2s;
}

.view-btn:hover {
    color: var(--color-career-active-blue);
}

.view-btn.active {
    color: var(--color-career-active-blue);
    border-bottom-color: var(--color-career-active-blue);
    font-weight: 600;
}

/* --- Filters --- */
.filters-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.filters-right-group {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    font-size: 14px;
    color: var(--color-label-light-tertiary);
    font-weight: 500;
}

.rooms-selector {
    display: flex;
    gap: 8px;
}

.room-btn {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: 1px solid var(--color-separator-light-main);
    background: var(--color-bg-light-white);
    color: var(--color-label-light-primary);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.room-btn:hover {
    border-color: var(--color-career-active-blue);
}

.room-btn.selected {
    background-color: var(--color-bg-light-white);
    border-color: var(--color-career-active-blue);
    color: var(--color-career-active-blue);
    box-shadow: 0 0 0 1px var(--color-career-active-blue);
}

.btn-available {
    height: 44px;
    padding: 0 20px;
    border-radius: 8px;
    border: 1px solid var(--color-separator-light-main);
    background: var(--color-bg-light-white);
    color: var(--color-label-light-primary);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-tt), sans-serif;
}

.btn-available:hover {
    border-color: var(--color-career-active-blue);
}

.btn-available.selected {
    background-color: var(--color-bg-light-white);
    border-color: var(--color-career-active-blue);
    color: var(--color-career-active-blue);
    box-shadow: 0 0 0 1px var(--color-career-active-blue);
}

.block-select {
    height: 44px;
    padding: 0 30px 0 15px;
    border-radius: 8px;
    border: 1px solid var(--color-separator-light-main);
    font-family: var(--font-tt), sans-serif;
    font-size: 16px;
    min-width: 200px;
    background-color: var(--color-bg-light-white);
    color: var(--color-label-light-primary);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%231c1d21%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 12px top 50%;
    background-size: 10px auto;
}

/* --- Tile View --- */
.apartments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 24px;
}

.card {
    background: var(--color-bg-light-white);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--color-bg-light-grey-2);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.card.sold {
    pointer-events: none;
}

.card.sold .card-content-wrapper {
    opacity: 0.4;
    filter: grayscale(100%);
}

.card-lock {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    color: var(--color-label-light-tertiary);
    z-index: 10;
    display: none;
}

.card.sold .card-lock {
    display: block;
}

.fav-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    cursor: pointer;
    color: var(--color-label-light-quaternary);
    z-index: 5;
    transition: color 0.2s;
}

.fav-icon:hover {
    color: var(--color-career-active-blue);
}

.card-image {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.card-title {
    font-family: var(--font-inter);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--color-gray-dark-2);
}

.card-row {
    font-family: var(--font-inter);
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--color-label-light-tertiary);
}

.card-row span:last-child {
    color: var(--color-label-light-primary);
    font-weight: 500;
}

.card-price {
    font-family: var(--font-inter);
    margin-top: auto;
    padding-top: 16px;
    font-size: 22px;
    font-weight: 600;
    color: var(--color-career-active-blue);
}

/* --- Chessboard View --- */
.chessboard-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    width: fit-content;
    margin: 0 auto;
}

.floor-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.floor-label {
    min-width: 40px;
    font-size: 24px;
    font-weight: 700;
    color: var(--color-label-light-primary);
    text-align: center;
}

.chess-cell {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s;
    color: var(--color-gray-dark-2);
    flex-shrink: 0;
}

.chess-cell:hover {
    transform: scale(1.1);
    z-index: 5;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.chess-cell.free {
    background-color: var(--color-tints-dark-light-blue);
    border: 1px solid var(--color-tints-light-medium-blue);
}

.chess-cell.sold {
    background-color: var(--color-bg-light-grey-2);
    color: var(--color-label-light-quaternary);
    overflow: hidden;
}

.chess-cell.sold::after {
    content: "ПРОДАНО";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 14px;
    font-weight: 800;
    color: rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(0, 0, 0, 0.15);
    padding: 2px 8px;
    text-transform: none;
    z-index: 10;
    pointer-events: none;
    white-space: nowrap;
}

.chess-cell.sold .chess-room,
.chess-cell.sold .chess-area,
.chess-cell.sold .chess-room-label {
    opacity: 0.5;
}

.chess-room {
    font-family: var(--font-inter);
    font-size: 26px;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 2px;
}

.chess-room-label {
    font-family: var(--font-inter);
    font-size: 10px;
    font-weight: 500;
    color: var(--color-gray-dark-2);
    line-height: 1;
    margin-bottom: 4px;
}

.chess-area {
    font-family: var(--font-inter);
    font-size: 13px;
    font-weight: 500;
}

.chess-lock {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 14px;
    height: 14px;
    color: var(--color-label-light-quaternary);
}

/* --- Button Load More --- */
.load-more-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.btn-load-more {
    background-color: var(--color-career-active-blue);
    border: 2px solid var(--color-career-active-blue);
    color: #fff;
    font-family: var(--font-tt), sans-serif;
    font-size: 16px;
    font-weight: 600;
    padding: 12px 40px;
    /* border-radius: 30px; */
    cursor: pointer;
    transition: all 0.2s;
    display: none;
}

.btn-load-more:hover {
    background-color: var(--color-gray-dark-3);
    border-color: var(--color-gray-dark-3);
    color: #fff;
}

/* Стили для Nice Select */
.nice-select {
    width: 100%;
    min-width: 200px;
    height: 44px;
    line-height: 42px;
    border-radius: 8px;
    /* Скругление кнопки */
    border: 1px solid var(--color-separator-light-main);
    background-color: var(--color-bg-light-white);
    float: none;
}

.nice-select:active,
.nice-select.open,
.nice-select:focus {
    border-color: var(--color-career-active-blue);
}

.nice-select .list {
    border-radius: 8px;
    /* Скругление выпадающего списка */
    margin-top: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.nice-select .option.selected {
    font-weight: bold;
}

.nice-select .option:hover {
    background-color: var(--color-bg-light-grey);
}



/* --- Mobile --- */
@media (max-width: 1100px) {
    .filters-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {

    /* Сбрасываем центрирование, чтобы работал скролл от левого края */
    .chessboard-container {
        width: 100%;
        margin: 0;
        align-items: flex-start;
        padding-left: 10px;
        /* Отступ слева */
    }

    /* Уменьшаем размер ячеек */
    .chess-cell {
        width: 50px;
        height: 50px;
    }

    /* Уменьшаем шрифты внутри */
    .chess-room {
        font-size: 18px;
    }

    .chess-area {
        font-size: 10px;
        margin-top: 2px;
    }

    /* Уменьшаем номер этажа */
    .floor-label {
        min-width: 30px;
        font-size: 18px;
    }

    /* Уменьшаем иконку замка */
    .chess-lock {
        width: 10px;
        height: 10px;
        top: 3px;
        right: 3px;
    }
}




























/* --- PARKING STYLES --- */

.panzoom-wrapper {
    width: 100%;
    height: 800px;
    overflow: hidden;
    position: relative;
    background-color: var(--color-bg-light-grey);
    border: 1px solid var(--color-separator-light-main);
    border-radius: 12px;
    cursor: grab;
    touch-action: none;
}

.panzoom-wrapper:active {
    cursor: grabbing;
}

.panzoom-content {
    transform-origin: 0 0;
    width: fit-content;
    padding: 100px;
    /* Больше отступ для комфортного перемещения */
}

/* Сетка паркинга - Ячейки увеличены */
.parking-grid {
    display: grid;
    /* 44 Колонки по 50px */
    grid-template-columns: repeat(44, 50px);
    grid-auto-rows: 50px;
    gap: 4px;
    /* Зазор чуть больше */
}

.cell {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    /* Шрифт крупнее */
    font-family: var(--font-tt), sans-serif;
    font-weight: 700;
    border-radius: 6px;
    box-sizing: border-box;
    user-select: none;
    transition: transform 0.1s;
}

/* --- ЕДИНЫЕ ЦВЕТА СТАТУСОВ --- */

/* 1. Свободно (Зеленый) */
.cell.free,
.cell.free-dark {
    background-color: #28b839;
    /* Зеленый */
    color: #fff;
    cursor: pointer;
    border: 1px solid #1e9e2e;
    box-shadow: 0 2px 4px rgba(40, 184, 57, 0.2);
}

/* 2. Занято (Серый) - объединяем все остальные классы */
.cell.sold,
.cell.bc,
.cell.bc-row,
.cell.hotel,
.cell.penthouse,
.cell.carwash,
.cell.detailing,
.cell.thermal,
.cell.bike {
    background-color: #e0e0e0;
    /* Светло-серый */
    color: #9e9e9e;
    /* Темно-серый текст */
    border: 1px solid #d1d1d1;
    pointer-events: none;
    /* Не кликабельно */
}

/* Текст-решетка */
.hash {
    opacity: 0.3;
}


/* --- SIDE MODAL STYLES --- */

.side-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    /* Поверх всего */
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    justify-content: flex-end;
    /* Прижимаем вправо */
}

.side-modal.active {
    visibility: visible;
    opacity: 1;
}

.side-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    /* Затемнение фона */
    cursor: pointer;
}

.side-modal__container {
    position: relative;
    width: 100%;
    max-width: 480px;
    /* Ширина панели */
    height: 100%;
    background-color: var(--color-bg-light-white);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    /* Скрыто справа */
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    /* Скролл внутри панели */
}

.side-modal.active .side-modal__container {
    transform: translateX(0);
}

.side-modal__header {
    padding: 20px 30px;
    display: flex;
    justify-content: flex-end;
}

.side-modal__close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-label-light-tertiary);
    padding: 5px;
    transition: color 0.2s;
}

.side-modal__close:hover {
    color: var(--color-career-active-blue);
}

.side-modal__body {
    padding: 0 40px 40px 40px;
    flex: 1;
}

/* Элементы внутри контента */
.sm-image-wrapper {
    width: 100%;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    background-color: transparent;
    position: relative;
}

.sm-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Сетка изображений для первого этажа */
.sm-images-grid {
    width: 85%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 30px;
    margin-left: auto;
    margin-right: auto;
}

.sm-images-grid img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.sm-title {
    font-family: var(--font-tt), sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--color-gray-dark-2);
    margin-bottom: 12px;
}

.sm-price {
    font-family: var(--font-tt), sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--color-gray-dark-2);
    /* Черный цвет для цены как на скриншоте */
    margin-bottom: 30px;
}

.sm-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

.sm-detail-item {
    display: flex;
    flex-direction: column;
}

.sm-detail-val {
    font-weight: 600;
    font-size: 24px;
    color: var(--color-gray-dark-2);
}

.sm-detail-label {
    font-size: 16px;
    color: var(--color-label-light-tertiary);
    margin-top: 4px;
}

/* Форма заявки */
.sm-form-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--color-gray-dark-2);
}

.sm-input-group {
    margin-bottom: 20px;
}

.sm-label {
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--color-gray-dark-2);
    font-weight: 500;
}

.sm-input {
    width: 100%;
    height: 44px;
    border-radius: 8px;
    border: 1px solid var(--color-separator-light-main);
    padding: 0 15px;
    font-family: var(--font-tt), sans-serif;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}

.sm-input:focus {
    border-color: var(--color-career-active-blue);
}

.sm-checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 30px;
}

.sm-checkbox {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.sm-checkbox-label {
    font-size: 13px;
    color: var(--color-gray-dark-2);
    line-height: 1.4;
}

.sm-submit-btn {
    width: 100%;
    height: 50px;
    background-color: #00bfa5;
    /* Цвет кнопки как на скриншоте (примерно) */
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.sm-submit-btn:hover {
    background-color: #008f7a;
}

/* Мобильная адаптация */
@media (max-width: 576px) {
    .side-modal__container {
        max-width: 100%;
    }

    .side-modal__body {
        padding: 0 20px 40px 20px;
    }

    .sm-image-wrapper {
        height: 200px;
    }
}


/* --- SIDE MODAL ACTIONS --- */

.sm-actions {
    margin-top: 20px;
}

.btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 54px;
    background-color: #25D366;
    /* Официальный цвет WhatsApp */
    color: #fff;
    border-radius: 8px;
    font-family: var(--font-tt), sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s, transform 0.2s;
    cursor: pointer;
    border: none;
}

.btn-whatsapp:hover {
    background-color: #1ebc57;
    transform: translateY(-2px);
}

.btn-whatsapp svg {
    fill: currentColor;
    width: 24px;
    height: 24px;
}






/* Стили для верхней легенды */
.top-legend {
    display: flex;
    gap: 40px;
    margin-bottom: 30px;
    font-size: 16px;
    font-weight: 500;
    justify-content: center;
    align-items: center;
    width: 100%;
    font-family: var(--font-inter);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-indicator {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 8px;
}

/* Цвета для верхней легенды */
.indicator-free {
    background-color: var(--color-tints-light-green);
}

.indicator-busy {
    background-color: #e0e0e0;
    /* Светлее, как на фото */
}




/* --- ПОДСКАЗКА С РУКОЙ (Animation) --- */
.gesture-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s;
    pointer-events: none;
    /* Чтобы клики проходили сквозь, если прозрачный */
}

.gesture-overlay.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.hand-icon {
    width: 50px;
    /* Оптимальный размер */
    height: 50px;
    fill: #fff;
    /* Белый цвет */
    /* Тень чтобы палец был виден на белом фоне карты */
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
    animation: hand-move 2s infinite ease-in-out;
}

.gesture-text {
    margin-top: 15px;
    font-family: var(--font-tt), sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

@keyframes hand-move {
    0% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(-20px, 10px);
    }

    50% {
        transform: translate(0, 0);
    }

    75% {
        transform: translate(20px, 10px);
    }

    100% {
        transform: translate(0, 0);
    }
}

@media (max-width: 768px) {
    .panzoom-wrapper {
        height: 500px;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Highlighting --- */
.highlighted-cell {
    border: none;
    transform: scale(1.05);
    z-index: 10;
}

.chess-cell.highlighted-cell.free {
    background-color: var(--color-tints-dark-light-blue) !important;
    border: none;
}

.dimmed {
    opacity: 0.2;
    pointer-events: none;
}

/* --- Adaptive Chessboard --- */

@media (max-width: 992px) {
    .chess-cell {
        width: 70px;
        height: 70px;
    }

    .chess-room {
        font-size: 20px;
    }

    .chess-room-label {
        font-size: 9px;
    }

    .chess-area {
        font-size: 11px;
    }

    .floor-label {
        font-size: 20px;
        min-width: 30px;
    }

    .chessboard-container {
        padding: 15px;
        gap: 6px;
    }

    .floor-row {
        gap: 8px;
    }
}

@media (max-width: 768px) {
    .chess-cell {
        width: 55px;
        height: 55px;
    }

    .chess-room {
        font-size: 16px;
    }

    .chess-room-label {
        font-size: 8px;
        margin-bottom: 2px;
    }

    .chess-area {
        font-size: 9px;
    }

    .floor-label {
        font-size: 16px;
        min-width: 20px;
    }

    .chessboard-container {
        padding: 10px;
        gap: 4px;
        /* Disable horizontal scroll if content fits, 
           but keep auto for safety if still too wide */
        overflow-x: auto;
    }

    .floor-row {
        gap: 6px;
    }

    /* Ensure blocks wrap and don't overlap */
    .chessboard-flex-wrapper>div {
        flex: 1 1 100%;
        min-width: 0 !important;
        /* Override inline style min-width */
    }
}

@media (max-width: 576px) {
    .chess-cell {
        width: 45px;
        height: 45px;
        border-radius: 6px;
    }

    .chess-cell.sold::after {
        font-size: 8px;
        font-weight: 700;
        padding: 1px 4px;
        border-width: 1px;
    }

    .chess-room {
        font-size: 14px;
        margin-bottom: 0;
    }

    .chess-room-label {
        display: none;
    }

    .chess-area {
        font-size: 8px;
        margin-top: 2px;
    }

    .floor-label {
        font-size: 14px;
        min-width: 15px;
    }

    .chessboard-container {
        padding: 5px;
    }

    .card-lock {
        width: 12px;
        height: 12px;
        top: 4px;
        right: 4px;
        transform: none;
        left: auto;
    }
}



.sm-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #333;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: background 0.2s;
}

.sm-nav-btn:hover {
    background: #fff;
}

.sm-nav-btn.prev {
    left: 10px;
}

.sm-nav-btn.next {
    right: 10px;
}

/* Special grid for specific Block V apts */
.sm-images-grid-special {
    display: grid;
    /* Force 2 equal columns so the bottom two sit side-by-side */
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    width: 100%;
    margin-bottom: 20px;
}

.sm-images-grid-special img {
    /* Default for the smaller bottom images */
    height: 180px;
    width: 100%;
    object-fit: contain;
    background: #fff;
    /* border: 1px solid #f0f0f0; */
    border-radius: 8px;
    /* transition: transform 0.2s; */
}

/* 
   Make the first image behave like the standard single view:
   Full width (span 2 cols) and standard height (300px)
*/
.sm-images-grid-special img:first-child {
    grid-column: 1 / -1;
    height: 300px;
    margin-bottom: 5px;
}