.h24-property {
    width: min(1800px, 94%);
    margin: 32px auto 70px;
    padding: 0 0 64px;
    color: var(--theme-text-color, #263442);
}
.h24-property__breadcrumbs {
    display:flex; flex-wrap:wrap; gap:9px; margin-bottom:22px;
    color:#778391; font-size:13px;
}
.h24-property__breadcrumbs a { color:inherit; text-decoration:none; }
.h24-property__breadcrumbs a:hover { text-decoration:underline; }
.h24-property__header {
    display:flex; justify-content:space-between; align-items:flex-start;
    gap:24px; margin-bottom:14px;
}
.h24-property__header h1 {
    margin:0 0 10px; font-size:clamp(27px,3vw,40px); line-height:1.2;
}
.h24-property__subline { display:flex; flex-wrap:wrap; gap:16px; color:#6e7b89; font-size:13px; }
.h24-property__header-actions { display:flex; flex-direction:column; align-items:flex-end; gap:12px; }
.h24-property__price { color:#2366a8; font-size:clamp(25px,2.6vw,35px); white-space:nowrap; }
.h24-property__action {
    border:1px solid #dce4eb; border-radius:8px; padding:8px 12px;
    background:#fff; color:#34536e; cursor:pointer;
}
.h24-property__tags { display:flex; flex-wrap:wrap; gap:8px; margin:17px 0 22px; }
.h24-property__tags span {
    padding:6px 11px; border:1px solid #e0e6ec; border-radius:7px;
    background:#f7f9fb; font-size:13px;
}
.h24-property__gallery { margin-bottom:20px; }
.h24-property__gallery-main {
    overflow:hidden; border-radius:13px; background:#eef2f5;
}
.h24-property__main-image { display:block; width:100%; max-height:560px; object-fit:cover; }
.h24-property__no-image {
    display:grid; min-height:280px; place-items:center; color:#758291;
}
.h24-property__thumbs {
    display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-top:10px;
}
.h24-property__thumbs a { display:block; overflow:hidden; border-radius:9px; background:#eef2f5; }
.h24-property__thumbs img { display:block; width:100%; height:120px; object-fit:cover; }
.h24-property__ad-placeholder,
.h24-property__sidebar-ad {
    display:flex; align-items:center; justify-content:space-between; gap:12px;
    border:1px dashed #c6d9eb; border-radius:10px; background:#f1f7fd;
    color:#315c83; padding:17px 22px; margin:22px 0;
}
.h24-property__ad-placeholder span,
.h24-property__sidebar-ad span { font-size:12px; text-transform:uppercase; letter-spacing:.06em; }
.h24-property__ad-placeholder strong,
.h24-property__sidebar-ad strong { color:#2463a6; font-size:20px; }
.h24-property__layout {
    display:grid; grid-template-columns:minmax(0,1fr) 360px; gap:28px; align-items:start;
}
.h24-property__main,.h24-property__sidebar { min-width:0; }
.h24-property__card {
    padding:24px; margin-bottom:22px; border:1px solid #e3e8ed;
    border-radius:12px; background:#fff; box-shadow:0 2px 10px rgba(25,48,70,.025);
}
.h24-property__card h2 { margin:0 0 19px; font-size:21px; line-height:1.3; }
.h24-property__facts {
    display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 24px; margin:0;
}
.h24-property__facts > div {
    display:flex; flex-direction:column; gap:5px; padding:12px 0;
    border-bottom:1px solid #edf0f3; min-width:0;
}
.h24-property__facts dt { color:#74808d; font-size:13px; }
.h24-property__facts dd { margin:0; font-size:15px; font-weight:600; overflow-wrap:anywhere; }
.h24-property__content { line-height:1.75; overflow-wrap:anywhere; }
.h24-property__content > :first-child { margin-top:0; }
.h24-property__content > :last-child { margin-bottom:0; }
.h24-property__contact { position:sticky; top:22px; }
.h24-property__contact-name { margin:-4px 0 17px; font-weight:650; }
.h24-property__button {
    display:block; padding:13px 15px; margin-top:10px; border:1px solid #2463a6;
    border-radius:8px; background:#2463a6; color:#fff !important;
    font-weight:650; text-align:center; text-decoration:none !important;
}
.h24-property__button--secondary { background:#fff; color:#2463a6 !important; border-color:#dce4eb; }
.h24-property__sidebar-ad { display:block; margin:0 0 22px; text-align:center; }
.h24-property__sidebar-ad span { display:block; margin-bottom:8px; }
.h24-property__similar p { color:#778391; font-size:14px; }
.h24-property__map-placeholder {
    display:grid; min-height:190px; place-items:center; margin-top:15px;
    border-radius:9px; background:repeating-linear-gradient(45deg,#f1f5f8,#f1f5f8 10px,#eaf0f4 10px,#eaf0f4 20px);
    color:#667888;
}
@media (max-width:1199px) {
    .h24-property__layout { grid-template-columns:minmax(0,1fr) 310px; gap:22px; }
    .h24-property__card { padding:19px; }
}
@media (max-width:700px) {
    .h24-property { width:calc(100% - 28px); padding-top:16px; }
    .h24-property__header { flex-direction:column; gap:12px; }
    .h24-property__header-actions { align-items:flex-start; }
    .h24-property__layout { grid-template-columns:minmax(0,1fr); }
    .h24-property__sidebar { order:-1; }
    .h24-property__contact { position:static; }
    .h24-property__facts { grid-template-columns:minmax(0,1fr); }
    .h24-property__thumbs { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .h24-property__thumbs img { height:110px; }
    .h24-property__main-image { max-height:380px; }
}

/* Related property cards in the sidebar */
.h24-property__related-item {
    display: block;
    overflow: hidden;
    margin-top: 14px;
    border: 1px solid #e6ebf0;
    border-radius: 9px;
    color: inherit;
    text-decoration: none;
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.h24-property__related-item:hover {
    border-color: #b9d0e5;
    box-shadow: 0 3px 12px rgba(25,48,70,.07);
}
.h24-property__related-image {
    display: grid;
    place-items: center;
    min-height: 100px;
    background: #eef2f5;
    color: #788796;
}
.h24-property__related-image img {
    display: block;
    width: 100%;
    height: 125px;
    object-fit: cover;
}
.h24-property__related-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding: 11px;
}
.h24-property__related-info strong {
    font-size: 13px;
    line-height: 1.4;
}
.h24-property__related-city,
.h24-property__related-area {
    color: #74808d;
    font-size: 12px;
}
.h24-property__related-price {
    color: #2463a6;
    font-size: 15px;
    font-weight: 700;
}


/* Hegau24 Ads — баннеры на странице объекта недвижимости */
.hegau24-ads-property-gallery,
.hegau24-ads-property-sidebar {
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    background: #f4f7fa;
}

.hegau24-ads-property-gallery {
    margin: 22px 0;
}

.hegau24-ads-property-sidebar {
    margin: 0 0 22px;
}

.hegau24-ads-property-gallery a,
.hegau24-ads-property-sidebar a {
    display: block;
    text-decoration: none;
}

.hegau24-ads-property-gallery img,
.hegau24-ads-property-sidebar img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    margin: 0;
    border: 0;
    border-radius: inherit;
}

.hegau24-ads-property-gallery img {
    max-height: 320px;
    object-fit: contain;
}

.hegau24-ads-property-sidebar img {
    max-height: 600px;
    object-fit: contain;
}

@media (max-width: 700px) {
    .hegau24-ads-property-gallery,
    .hegau24-ads-property-sidebar {
        margin-top: 16px;
        margin-bottom: 18px;
        border-radius: 9px;
    }
}


/* Hegau24 property gallery: thumbnail strip and lightbox */
.h24-property__gallery-main {
    position: relative;
}

.h24-property__main-trigger {
    display: block;
    position: relative;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 13px;
    background: #eef2f5;
    cursor: zoom-in;
    text-align: inherit;
}

.h24-property__main-trigger .h24-property__main-image {
    width: 100%;
}

.h24-property__zoom-hint {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, .62);
    color: #fff;
    font-size: 27px;
    line-height: 1;
    pointer-events: none;
}

.h24-property__thumbs-wrap {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.h24-property__thumbs-track {
    display: grid;
    grid-auto-columns: calc((100% - 30px) / 4);
    grid-auto-flow: column;
    gap: 10px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.h24-property__thumbs-track::-webkit-scrollbar {
    display: none;
}

.h24-property__thumb {
    display: block;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 9px;
    background: #eef2f5;
    cursor: pointer;
}

.h24-property__thumb.is-active {
    border-color: #2463a6;
    box-shadow: 0 0 0 1px #2463a6;
}
.h24-property__thumb:focus-visible {
    outline: 2px solid #2463a6;
    outline-offset: 2px;
}

.h24-property__thumb img {
    display: block;
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.h24-property__thumbs-prev,
.h24-property__thumbs-next {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    padding: 0;
    border: 1px solid #d9e1e8;
    border-radius: 50%;
    background: #fff;
    color: #24435e;
    font-size: 27px;
    line-height: 1;
    cursor: pointer;
}

.h24-property__thumbs-prev:hover,
.h24-property__thumbs-next:hover {
    background: #f1f7fd;
}

.h24-property-lightbox[hidden] {
    display: none !important;
}

.h24-property-lightbox {
    position: fixed;
    z-index: 999999;
    inset: 0;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 64px;
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: center;
    justify-items: center;
    gap: 12px;
    padding: 64px 24px 48px;
    background: rgba(10, 15, 22, .96);
    touch-action: pan-y;
}

.h24-property-lightbox__image {
    display: block;
    grid-column: 2;
    grid-row: 1;
    max-width: 100%;
    max-height: calc(100vh - 150px);
    width: auto;
    height: auto;
    object-fit: contain;
}

.h24-property-lightbox__close,
.h24-property-lightbox__prev,
.h24-property-lightbox__next {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
}

.h24-property-lightbox__close {
    position: absolute;
    top: 18px;
    right: 22px;
    font-size: 34px;
}

.h24-property-lightbox__prev {
    grid-column: 1;
    grid-row: 1;
}

.h24-property-lightbox__next {
    grid-column: 3;
    grid-row: 1;
}

.h24-property-lightbox__counter {
    grid-column: 1 / -1;
    grid-row: 2;
    color: #fff;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

body.h24-property-lightbox-open {
    overflow: hidden;
}

@media (max-width: 640px) {
    .h24-property__thumbs-wrap {
        grid-template-columns: 32px minmax(0, 1fr) 32px;
        gap: 5px;
    }

    .h24-property__thumbs-prev,
    .h24-property__thumbs-next {
        width: 32px;
        height: 32px;
    }

    .h24-property__thumbs-track {
        grid-auto-columns: calc((100% - 15px) / 2);
        gap: 5px;
    }

    .h24-property__thumb img {
        height: 82px;
    }

    .h24-property-lightbox {
        grid-template-columns: 40px minmax(0, 1fr) 40px;
        gap: 5px;
        padding: 58px 8px 32px;
    }

    .h24-property-lightbox__prev,
    .h24-property-lightbox__next {
        width: 36px;
        height: 36px;
        font-size: 25px;
    }

    .h24-property-lightbox__image {
        max-height: calc(100vh - 125px);
    }

    .h24-property-lightbox__close {
        top: 10px;
        right: 12px;
    }
}

/* Lightbox thumbnail strip */
.h24-property-lightbox__thumbs {
    grid-column: 1 / -1;
    grid-row: 3;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    max-width: 900px;
    min-width: 0;
    margin: 0 auto;
    padding: 6px 2px 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: #7f8c99 transparent;
}

.h24-property-lightbox__thumb {
    flex: 0 0 88px;
    width: 88px;
    height: 62px;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 6px;
    background: rgba(255, 255, 255, .08);
    opacity: .72;
    cursor: pointer;
}

.h24-property-lightbox__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.h24-property-lightbox__thumb.is-active {
    border-color: #4da3ff;
    box-shadow: 0 0 0 1px #4da3ff;
    opacity: 1;
}

.h24-property-lightbox__thumb:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

@media (max-width: 640px) {
    .h24-property-lightbox__thumbs {
        gap: 6px;
        padding-bottom: 6px;
    }

    .h24-property-lightbox__thumb {
        flex-basis: 66px;
        width: 66px;
        height: 48px;
    }
}

/* Hegau24: бейджи типа сделки и недвижимости поверх главного фото */
.h24-property__gallery-main {
    position: relative;
}

.h24-property__tags {
    position: absolute;
    z-index: 5;
    top: 12px;
    left: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: calc(100% - 24px);
    margin: 0;
}

.h24-property__tags span {
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* Hegau24: цвета бейджей как в каталоге недвижимости */
.h24-property__tags span {
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    border: 1px solid #c5e8d0;
    border-radius: 8px;
    background: #e8f7ed;
    color: #187642;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    box-shadow: 0 2px 10px rgb(0 0 0 / 10%);
}

/* Отступы страницы объявления по стандарту каталога «Жильё» */
.h24-property {
    padding-top: 0;
}

.h24-property__breadcrumbs {
    margin-bottom: 16px;
}

.h24-property__header h1 {
    margin-bottom: 8px;
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 750;
    line-height: 1.2;
}

.h24-property__header {
    margin-bottom: 12px;
}

/* Property details: icon-led characteristics */
.h24-property__details .h24-property__facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
    row-gap: 0;
    margin: 0;
}

.h24-property__details .h24-property__fact {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 15px 0;
    border-bottom: 1px solid #edf0f3;
}

.h24-property__details .h24-property__fact-icon {
    display: flex;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: #edf5ff;
    color: #2875c7;
}

.h24-property__details .h24-property__fact-icon svg {
    display: block;
    width: 22px;
    height: 22px;
}

.h24-property__details .h24-property__fact-text {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.h24-property__details .h24-property__fact-text dt {
    color: #74808d;
    font-size: 13px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.h24-property__details .h24-property__fact-text dd {
    margin: 0;
    color: #243447;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

@media (max-width: 700px) {
    .h24-property__details .h24-property__facts {
        grid-template-columns: minmax(0, 1fr);
    }

    .h24-property__details .h24-property__fact {
        padding: 12px 0;
    }
}

/* Property facts: icon, label and value in one horizontal row */
.h24-property__details .h24-property__fact {
    display: grid;
    grid-template-columns: 42px minmax(90px, 1fr) minmax(60px, 1fr);
    align-items: center;
    column-gap: 12px;
}

.h24-property__details .h24-property__fact-text {
    display: contents;
}

.h24-property__details .h24-property__fact-text dt {
    min-width: 0;
    margin: 0;
}

.h24-property__details .h24-property__fact-text dd {
    min-width: 0;
    margin: 0;
    text-align: left;
}

@media (max-width: 700px) {
    .h24-property__details .h24-property__fact {
        grid-template-columns: 42px minmax(90px, 1fr) minmax(60px, 1fr);
        column-gap: 10px;
    }
}

/* Align property values at a consistent position after labels */
.h24-property__details .h24-property__fact {
    grid-template-columns: 42px 210px minmax(0, 1fr);
    column-gap: 12px;
}

@media (max-width: 1199px) {
    .h24-property__details .h24-property__fact {
        grid-template-columns: 42px minmax(120px, 0.9fr) minmax(70px, 1fr);
    }
}

@media (max-width: 700px) {
    .h24-property__details .h24-property__fact {
        grid-template-columns: 42px minmax(120px, 0.9fr) minmax(70px, 1fr);
    }
}

/* Fine tune property fact label/value alignment */
.h24-property__details .h24-property__fact {
    grid-template-columns: 42px 160px minmax(0, 1fr);
}

.h24-property__details .h24-property__fact-text dd {
    font-weight: 500;
}

@media (max-width: 1199px) {
    .h24-property__details .h24-property__fact {
        grid-template-columns: 42px 145px minmax(0, 1fr);
    }
}

@media (max-width: 700px) {
    .h24-property__details .h24-property__fact {
        grid-template-columns: 42px 145px minmax(0, 1fr);
    }
}


/* Hegau24: distinct colors for property photo badges */
.h24-property__tags .h24-property__tag {
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.h24-property__tags .h24-property__tag--sale {
    background: #e8f7ed;
    border-color: #c5e8d0;
    color: #187642;
}

.h24-property__tags .h24-property__tag--rent {
    background: #e7f0ff;
    border-color: #cbdcff;
    color: #2458b8;
}

.h24-property__tags .h24-property__tag--type {
    background: #f1e8ff;
    border-color: #d9c2ff;
    color: #7138b8;
}
