.digero-fastigheter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(var(--digero-grid-min, 220px), 1fr));
    gap: var(--digero-grid-gap, 20px);
}

.digero-fastighet-card {
    border: 1px solid var(--digero-card-border, #e2e4e7);
    background: var(--digero-card-bg, #fff);
    border-radius: var(--digero-card-radius, 8px);
    overflow: hidden;
    box-shadow: var(--digero-card-shadow, 0 6px 16px rgba(0, 0, 0, 0.06));
    position: relative;
    display: flex;
}

.digero-fastighet-link {
    display: block;
    width: 100%;
    max-width: 100%;
    flex: 1;
    text-align: left;
    background: var(--digero-card-hover-bg, transparent);
    border: none;
    padding: 0;
    cursor: pointer;
}

.digero-fastighet-card .digero-fastighet-link:hover,
.digero-fastighet-card .digero-fastighet-link:focus {
    background: var(--digero-card-hover-bg, transparent) !important;
}

.digero-fastighet-thumb img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.digero-fastighet-title {
    padding: 14px 16px 18px;
    font-size: var(--digero-title-size, 18px);
    margin: 0;
}

.digero-fastighet-adress {
    padding: 0 16px 16px;
    font-size: 13px;
    color: #6b7280;
}

.digero-fastighet-card:hover {
    border-color: var(--digero-card-border-hover, #2b9f57);
}

.digero-fastighet-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--digero-badge-bg, #2b9f57);
    color: var(--digero-badge-text, #fff);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 999px;
    z-index: 2;
}

.digero-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.digero-modal.is-open {
    display: flex;
}

.digero-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.digero-modal-panel {
    position: relative;
    background: var(--digero-modal-bg, #fff);
    color: var(--digero-modal-text, #111);
    width: min(1400px, 98vw);
    max-height: 94vh;
    overflow: auto;
    border-radius: 12px;
    padding: 24px;
    z-index: 1;
}

.digero-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: var(--digero-modal-close-bg, transparent) !important;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: var(--digero-modal-close-color, #111);
}

.digero-modal-close:hover,
.digero-modal-close:focus {
    background: var(--digero-modal-close-hover-bg, transparent) !important;
    color: var(--digero-modal-close-hover-color, var(--digero-modal-close-color, #111));
}

.digero-modal-body {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 24px;
}

.digero-modal-gallery {
    display: grid;
    gap: 14px;
}

.digero-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.digero-gallery-caption {
    margin-top: 8px;
    color: #4b5563;
    font-size: 14px;
}

.digero-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 10px;
}

.digero-gallery-thumb {
    border: none;
    padding: 0;
    background: var(--digero-thumb-bg, transparent) !important;
    cursor: pointer;
}

.digero-gallery-thumb.is-active {
    border-color: var(--digero-thumb-border-active, #111827);
}

.digero-gallery-thumb:hover,
.digero-gallery-thumb:focus {
    background: var(--digero-thumb-hover-bg, transparent) !important;
    border-color: var(--digero-thumb-border-hover, #111827) !important;
}

.digero-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.digero-gallery-main {
    aspect-ratio: 16 / 9;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
}

.digero-gallery-thumb {
    aspect-ratio: 4 / 3;
    width: 100%;
    overflow: hidden;
    border-radius: 6px;
}

.digero-modal-title {
    margin-top: 0;
    margin-bottom: 12px;
}

.digero-modal-adress {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 12px;
}

.digero-modal-text {
    margin-bottom: 12px;
}

.digero-modal-section h3 {
    margin: 0 0 8px;
    font-size: 16px;
}

.digero-modal-list {
    padding-left: 18px;
    margin: 0 0 12px;
}

.digero-plan-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.digero-plan-comment {
    color: #6b7280;
    font-size: 14px;
}

.digero-modal-empty {
    color: #6b7280;
}

.digero-modal-open {
    overflow: hidden;
}

@media (max-width: 860px) {
    .digero-modal-body {
        grid-template-columns: 1fr;
    }

    .digero-gallery-main {
        aspect-ratio: 4 / 3;
    }

    .digero-fastighet-thumb img {
        height: 160px;
    }
}
