.object-price-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 16px;
}

.price-big {
    font-size: 28px;
    font-weight: 700;
    color: #222;
}

.commission-block {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 15px;
}

.commission-amount {
    font-weight: 600;
    color: #d35400;
}

.commission-label {
    color: #888;
}

.badge {
    align-self: flex-end;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    text-transform: uppercase;
}

.badge-active   { background: #e8f5e9; color: #2e7d32; }
.badge-sold     { background: #ffebee; color: #c62828; }
.badge-reserved { background: #fff3e0; color: #ef6c00; }
.badge-archived { background: #f5f5f5; color: #757575; }

.object-gallery-block {
    margin-bottom: 24px;
}

.gallery-main img {
    width: 100%;
    border-radius: 8px;
    display: block;
}

.gallery-thumbs-strip {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.thumb-strip-item {
    width: 80px;
    height: 60px;
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
}

.thumb-strip-item.active {
    border-color: #dc2626;
}

.thumb-strip-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.object-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.object-detail-cell {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.detail-value {
    font-weight: 500;
    color: #333;
}

.object-description, .object-agent-block {
    margin-bottom: 24px;
}

.object-section-heading {
    font-size: 18px;
    margin-bottom: 12px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.object-agent-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.agent-photo-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.agent-photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agent-initials {
    font-size: 24px;
    color: #555;
}

.object-agent-info {
    display: flex;
    flex-direction: column;
}

.object-agent-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.object-agent-phone {
    color: #dc2626;
    text-decoration: none;
    font-weight: 500;
}

.btn-back {
    display: inline-block;
    margin-bottom: 16px;
    color: #555;
    text-decoration: none;
}

.btn-back:hover {
    color: #dc2626;
}

.no-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 10px;
    padding: 40px;
    color: #aaa;
    font-size: 16px;
}

/* Модальное окно */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
}

#modalImg {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

#modalCounter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 14px;
    background: rgba(0, 0, 0, .5);
    padding: 4px 12px;
    border-radius: 4px;
}

#prevBtn, #nextBtn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    font-size: 48px;
    cursor: pointer;
    user-select: none;
}

#prevBtn { left: 20px; }
#nextBtn { right: 20px; }

.object-plan-block {
    margin-bottom: 24px;
}

.plan-preview-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e2e6ea;
}

.plan-thumbnail {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

.plan-label {
    font-size: 14px;
    color: #333;
    line-height: 1.4;
    cursor: pointer;
}

.plan-label:hover {
    color: #b91c1c;
}

/* === Вкладки сделок === */
.deal-tabs {
    margin-bottom: 16px;
}

/* === Цена аренды === */
.price-rent-suffix {
    font-size: 13px;
    color: #888;
}

/* === Карточка без фото === */
.card-no-photo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #aaa;
    font-size: 14px;
}

/* === Заголовок объекта === */
.object-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.deal-type-badge {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}

.deal-type-badge.rent {
    background: #dbeafe;
    color: #2563eb;
}

.deal-type-badge.sale {
    background: #dcfce7;
    color: #16a34a;
}

/* === Суффикс аренды === */
.price-rent-suffix {
    font-size: 18px;
    color: #888;
}

/* === Модальное окно плана === */
.plan-modal {
    display: none;
}

.plan-modal-img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
}

/* === Кнопка «Поделиться» === */
.share-wrapper {
    position: relative;
    margin-left: auto;
}

.btn-share {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px 7px 10px;
    border: 1px solid #e2e6ea;
    border-radius: 8px;
    background: #fff;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-share:hover {
    border-color: #dc2626;
    color: #dc2626;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.12);
}

.btn-share:active {
    transform: scale(0.97);
}

.btn-share-label {
    line-height: 1;
}

/* === Выпадающая панель шаринга === */
.share-panel {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    padding: 8px;
    background: #fff;
    border: 1px solid #e2e6ea;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    flex-direction: column;
    gap: 2px;
}

.share-panel.open {
    display: flex;
}

.share-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    transition: background 0.15s ease, color 0.15s ease;
}

.share-item:hover {
    background: #fef2f2;
    color: #dc2626;
}

.share-item:active {
    background: #fee2e2;
}

.share-item svg {
    flex-shrink: 0;
}

.share-copy {
    border-top: 1px solid #f0f0f0;
    margin-top: 2px;
    padding-top: 12px;
    border-radius: 0 0 8px 8px;
}

/* === Адаптив === */
@media (max-width: 768px) {
    .btn-share-label {
        display: none;
    }

    .btn-share {
        padding: 8px;
    }

    .share-panel {
        right: 0;
        left: auto;
        min-width: 200px;
    }
}

@media (max-width: 480px) {
    .share-panel {
        right: -20px;
        min-width: 180px;
    }
}
