@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap");

:root {
    --detail-bg-start: #f4f8ff;
    --detail-bg-end: #eef3ff;
    --detail-hero-start: #0b2b57;
    --detail-hero-end: #1659b9;
    --detail-card-border: #d6e2fb;
    --detail-card-shadow: 0 16px 34px rgba(10, 43, 91, 0.10);
    --detail-text-main: #1a3157;
    --detail-text-soft: #60769a;
    --detail-pill-bg: rgba(255, 255, 255, 0.16);
    --detail-pill-border: rgba(255, 255, 255, 0.36);
}

body {
    font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
}

.content-wrapper,
.container,
.container-fluid {
    position: relative;
}

.detail-hero {
    border: 1px solid #9fc0fb;
    border-radius: 22px;
    background:
        radial-gradient(circle at 85% -20%, rgba(255, 255, 255, 0.22), transparent 42%),
        linear-gradient(140deg, var(--detail-hero-start), var(--detail-hero-end));
    color: #fff;
    box-shadow: 0 24px 44px rgba(10, 43, 91, 0.24);
    padding: 1.2rem 1.25rem;
    margin-bottom: 1.2rem;
    gap: 1rem;
}

.hero-title-wrap {
    min-width: 0;
}

.hero-eyebrow {
    display: inline-flex;
    margin-bottom: 0.4rem;
    font-size: 0.74rem;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.82);
}

.detail-hero h1 {
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.68rem;
    border-radius: 999px;
    border: 1px solid var(--detail-pill-border);
    background: var(--detail-pill-bg);
    font-size: 0.77rem;
    font-weight: 700;
    color: #fff;
    backdrop-filter: blur(3px);
}

.hero-pill-value {
    background: rgba(31, 197, 117, 0.18);
    border-color: rgba(190, 255, 219, 0.54);
}

.hero-pill-contact {
    background: rgba(255, 255, 255, 0.24);
    border-color: rgba(255, 255, 255, 0.52);
    color: #ffffff;
}

.hero-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.detail-card {
    border: 1px solid var(--detail-card-border);
    border-radius: 18px;
    box-shadow: var(--detail-card-shadow);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 250, 255, 0.98) 100%);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.detail-card:hover {
    transform: translateY(-2px);
    border-color: #9ec0fb;
    box-shadow: 0 20px 38px rgba(10, 43, 91, 0.15);
}

.gallery-card .card-body,
.info-card .card-body,
.feature-card .card-body {
    padding: 1.1rem;
}

.section-title {
    font-weight: 800;
    color: #163f79;
    letter-spacing: -0.01em;
    margin-bottom: 0.9rem;
}

.gallery-item {
    border: 1px solid #d5e2fb;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.gallery-item:hover {
    transform: translateY(-3px) scale(1.01);
    border-color: #9abdfb;
    box-shadow: 0 16px 24px rgba(16, 72, 146, 0.17);
}

.gallery-item img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: block;
}

.gallery-main-media {
    position: relative;
    border: 1px solid #d4e1f7;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #e8f1ff, #dbeaff);
    min-height: 320px;
}

.gallery-main-media.is-gallery-trigger {
    cursor: zoom-in;
}

.gallery-main-media img {
    width: 100%;
    height: 100%;
    min-height: 320px;
    object-fit: cover;
    display: block;
}

.gallery-main-open {
    display: none;
    position: absolute;
    top: 0.62rem;
    left: 0.62rem;
    z-index: 2;
    border-radius: 999px;
    border: 1px solid rgba(227, 206, 156, 0.88);
    background: rgba(14, 45, 68, 0.86);
    color: #f7fbff;
    font-size: 0.74rem;
    font-weight: 800;
    padding: 0.24rem 0.56rem;
    box-shadow: 0 8px 16px rgba(7, 31, 55, 0.26);
}

.gallery-main-count {
    position: absolute;
    right: 0.62rem;
    bottom: 0.62rem;
    border-radius: 999px;
    border: 1px solid rgba(223, 203, 150, 0.82);
    background: rgba(29, 69, 88, 0.84);
    color: #edf6ff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.56rem;
}

.gallery-main-thumbs-grid {
    margin-top: 0.72rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.62rem;
}

.gallery-main-thumb-btn {
    border: 1px solid #d7e6fb;
    border-radius: 12px;
    background: #fff;
    padding: 0.22rem;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-main-thumb-btn img {
    width: 100%;
    height: 90px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}

.gallery-main-thumb-btn.is-active {
    border-color: #3c6d99;
    box-shadow: 0 0 0 2px rgba(60, 109, 153, 0.14);
}

.gallery-main-thumb-btn:hover {
    transform: translateY(-1px);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
}

.info-item {
    border: 1px solid #dce7fb;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
    padding: 0.65rem 0.75rem;
}

.info-key {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--detail-text-soft);
    margin-bottom: 0.18rem;
    font-weight: 700;
}

.info-value {
    margin: 0;
    font-weight: 700;
    color: var(--detail-text-main);
    word-break: break-word;
    line-height: 1.3;
}

.info-value code {
    color: #0d4ca8;
    font-weight: 800;
    background: #eaf2ff;
    border: 1px solid #cde0ff;
    border-radius: 7px;
    padding: 0.08rem 0.32rem;
}

.descricao-box {
    margin-top: 1rem;
    border: 1px solid #dce7fb;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
    padding: 0.95rem;
    color: #223d67;
}

.descricao-box h3 {
    color: #1a4a92;
    font-weight: 800;
}

.descricao-content {
    color: #223d67;
    text-align: justify;
    text-justify: inter-word;
}

.descricao-content p {
    margin: 0 0 0.35rem;
    text-indent: 1.2em;
}

.descricao-content p:last-child {
    margin-bottom: 0;
}

.feature-group + .feature-group {
    margin-top: 1.05rem;
}

.detail-btn {
    border-radius: 999px;
    padding: 0.45rem 1rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.detail-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 11px 18px rgba(10, 43, 91, 0.20);
}

.detail-btn-back {
    background: linear-gradient(135deg, #ffd76a, #ffbc2d);
    border: 1px solid #f2b01f;
    color: #523600;
}

.detail-btn-back:hover {
    background: linear-gradient(135deg, #ffd052, #f6b41d);
    border-color: #e9a813;
    color: #442c00;
}

.detail-btn-edit {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.76);
    color: #fff;
}

.detail-btn-edit:hover {
    background: rgba(255, 255, 255, 0.24);
    border-color: #fff;
    color: #fff;
}

.detail-btn-delete {
    background: linear-gradient(135deg, #e54949, #c82828);
    border: 1px solid #ad1f1f;
    color: #fff;
}

.detail-btn-delete:hover {
    background: linear-gradient(135deg, #f06262, #de3434);
    border-color: #b92929;
    color: #fff;
}

.detail-btn-map {
    background: rgba(255, 255, 255, 0.17);
    border: 1px solid rgba(255, 255, 255, 0.84);
    color: #fff;
}

.detail-btn-map:hover {
    background: rgba(255, 255, 255, 0.27);
    border-color: #fff;
    color: #fff;
}

.detail-btn-whatsapp {
    background: linear-gradient(135deg, #14b35f, #0f9c52);
    border: 1px solid #0f8647;
    color: #ffffff;
}

.detail-btn-whatsapp:hover {
    background: linear-gradient(135deg, #19c76a, #11ab5a);
    border-color: #0f8647;
    color: #ffffff;
}

.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.52rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    border: 1px solid #c9dcff;
    border-radius: 999px;
    padding: 0.3rem 0.78rem;
    background: linear-gradient(180deg, #f3f8ff 0%, #eaf2ff 100%);
    color: #20406a;
    font-size: 0.82rem;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 16px rgba(12, 67, 139, 0.15);
}

.proprietario-whatsapp-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 29px;
    height: 29px;
    border-radius: 50%;
    border: 1px solid #22b85d;
    background: #e9fbf1;
    color: #169548;
    text-decoration: none;
    margin-left: 0.35rem;
    vertical-align: middle;
}

.proprietario-whatsapp-link:hover {
    background: #d9f8e7;
    color: #0f7a36;
}

.proprietario-whatsapp-link svg {
    width: 16px;
    height: 16px;
    display: block;
}

.image-modal-content {
    border: 1px solid #d4e4fb;
    border-radius: 16px;
    box-shadow: 0 24px 46px rgba(10, 43, 91, 0.24);
    background: #f7fbff;
}

.image-modal-preview {
    max-height: calc(80vh + 120px);
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.demo-gallery-modal-content {
    border: 1px solid rgba(72, 108, 146, 0.62);
    background: linear-gradient(180deg, #0f2235, #0a1a2a);
    color: #edf5ff;
}

.demo-gallery-modal .btn-close {
    filter: invert(1) grayscale(1) brightness(220%);
}

.demo-gallery-modal .modal-body {
    padding: 0.8rem;
}

#demoGalleryCarousel {
    border-radius: 14px;
    overflow: hidden;
    background: #05121f;
}

.demo-gallery-image {
    width: 100%;
    max-height: calc(100vh - 220px);
    object-fit: contain;
    background: #05121f;
    display: block;
}

.demo-gallery-modal .carousel-control-prev,
.demo-gallery-modal .carousel-control-next {
    width: 12%;
}

.demo-gallery-modal .carousel-control-prev-icon,
.demo-gallery-modal .carousel-control-next-icon {
    background-size: 2rem 2rem;
    filter: drop-shadow(0 0 6px rgba(2, 9, 16, 0.9));
}

.demo-gallery-counter {
    margin: 0.62rem 0 0;
    text-align: center;
    color: #d9ebff;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

@media (max-width: 991.98px) {
    .detail-hero {
        padding: 1rem;
        border-radius: 18px;
    }

    .detail-hero h1 {
        font-size: 1.3rem;
    }

    .hero-actions {
        justify-content: flex-start;
    }

    .gallery-item img {
        height: 190px;
    }

    .gallery-main-media,
    .gallery-main-media img {
        min-height: 290px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .gallery-main-open {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .gallery-main-thumbs-grid {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .detail-hero {
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
    }

    .hero-actions {
        width: 100%;
    }

    .hero-actions .detail-btn {
        width: 100%;
        text-align: center;
    }

    .gallery-item img {
        height: 160px;
    }

    .gallery-main-media,
    .gallery-main-media img {
        min-height: 290px;
    }

    .demo-gallery-modal-content {
        min-height: 100vh;
        border-radius: 0;
    }

    .demo-gallery-modal .modal-body {
        padding: 0.52rem;
    }

    .image-modal-preview {
        max-height: 72vh;
    }

    .demo-gallery-modal .demo-gallery-image {
        max-height: calc(100vh - 176px);
    }
}
