:root {
    --cream: #fbf7f1;
    --paper: #fffdf9;
    --brown: #51251d;
    --brown-dark: #401b16;
    --red: #ae0905;
    --text: #382522;
    --muted: #766760;
    --line: #eadfd3;
    --shadow: 0 8px 24px rgba(64, 30, 20, .08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--text);
    font-family: "DM Sans", Arial, sans-serif;
    line-height: 1.6;
}

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1120px, 100%);
    margin: 0 auto;
}

.section {
    padding: 120px 0;
}

.centered {
    text-align: center;
}

.section-title {
    margin: 0 0 64px;
    color: var(--brown);
    font: 700 clamp(2rem, 3.5vw, 3.3rem)/1.05 "Playfair Display", Georgia, serif;
    letter-spacing: -.035em;
}

.section-title.light {
    color: #ffe8c9;
}

.eyebrow {
    margin: 0 0 20px;
    color: var(--red);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.eyebrow.light {
    color: #eecaa2;
}

.lead {
    max-width: 490px;
    color: var(--muted);
    font-size: 1rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: 1px solid var(--red);
    border-radius: 3px;
    background: var(--red);
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
    transition: .25s ease;
}

.button:hover {
    background: var(--brown);
    border-color: var(--brown);
}

.button-small {
    min-height: 42px;
    padding: 0 27px;
}

.button-outline {
    border-color: var(--brown);
    background: transparent;
    color: var(--brown);
}

.button-outline:hover {
    color: #fff;
}

.image-frame {
    overflow: hidden;
}

.site-header .container {
    width: min(100%, calc(100% - 240px));
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    background: var(--paper);
}

.header-inner {
    display: flex;
    min-height: 84px;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #231714;
    font: 600 1.25rem "Playfair Display", Georgia, serif;
    white-space: nowrap;
}

.brand-mark {
    color: var(--red);
    font-size: 1.65rem;
    line-height: 1;
}

.main-nav {
    display: flex;
    gap: 27px;
    margin-left: auto;
    font-size: .75rem;
}

.main-nav a {
    transition: color .2s ease;
}

.main-nav a:hover {
    color: var(--red);
}

.hero {
    padding: 0;
}

.hero-grid {
    width: 100%;
    max-width: none;
    margin: 0;
    display: grid;
    grid-template-columns: 50% 50%;
    gap: 0;
}

.hero-copy {
    width: min(100%);
    justify-self: end;
    padding: 220px 0px 160px 120px;
}

.hero-image {
    width: 100%;
    height: 91vh;
    margin: 0;
    border-radius: 0;
}

.hero h1 {
    max-width: 520px;
    margin: 0 0 28px;
    color: var(--brown);
    font: 700 clamp(2rem, 4vw, 4rem)/.98 "Playfair Display", Georgia, serif;
    letter-spacing: -.055em;
    text-transform: uppercase;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 32px 0;
}

.quick-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    padding: 0;
    margin: 30px 0 0;
    list-style: none;
    color: var(--muted);
    font-size: .7rem;
}

.quick-facts span {
    margin-right: 5px;
    color: var(--red);
    font-size: 1rem;
}

.about {
    background: var(--paper);
}

.about-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    align-items: center;
    gap: 66px;
}

.about-image {
    height: 390px;
}

.about-copy {
    color: var(--muted);
    font-size: .95rem;
}

.check-list {
    display: grid;
    gap: 0px;
    padding: 0;
    margin: 25px 0 0;
    list-style: none;
    color: var(--text);
    font-size: .78rem;
}

.check-list li::before {
    content: "•";
    margin-right: 12px;
    color: var(--red);
    font-size: 1.4em;
    vertical-align: -.1em;
}

.environments-intro {
    display: grid;
    grid-template-columns: .8fr 1.7fr;
    align-items: center;
    gap: 54px;
}

.environments-intro p:not(.eyebrow) {
    max-width: 340px;
    color: #e6c9ad;
}

.environment-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.environment-card {
    min-width: 0;
}

.environment-card img {
    height: 180px;
}

.environment-card h3 {
    margin: 8px 0 0;
    color: #ffe1bb;
    font: 700 1rem "Playfair Display", Georgia, serif;
}

.gallery-title {
    margin-top: 78px;
    margin-bottom: 28px;
}

.masonry-gallery {
    display: grid;
    grid-template-columns: 1.1fr .9fr .9fr;
    grid-template-rows: repeat(2, 230px);
    gap: 9px;
}

.masonry-gallery img {
    min-height: 0;
}

.masonry-gallery .gallery-tall {
    grid-row: span 2;
}

.reasons {
    background: var(--paper);
}

.reasons-grid {
    display: grid;
    grid-template-columns: 1fr .95fr;
    gap: 35px;
    align-items: stretch;
}

.reason-list {
    display: grid;
    gap: 14px;
}

/* Disposição vertical do card */
.reason-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 24px 28px;
    border: 1px solid rgba(81, 37, 29, 0.08);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 4px 18px rgba(64, 30, 20, 0.04);
}

/* Ícone circular no topo */
.reason-icon {
    display: inline-flex;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #faeade;
    color: #ae0905;
}

.reason-icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    display: block;
}

/* Título */
.reason-card h3 {
    margin: 0 0 8px 0;
    color: #382522;
    font-size: 1.05rem;
    font-weight: 700;
}

/* Texto descritivo */
.reason-card p {
    margin: 0;
    color: #766760;
    font-size: 0.85rem;
    line-height: 1.55;
}

.reason-image {
    min-height: 500px;
}

.features {
    padding-top: 0;
    background: var(--paper);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.feature-grid div {
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fffdfa;
    font-size: .7rem;
}

.location {
    background: var(--paper);
}

.location-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.location .section-title {
    margin-bottom: 20px;
}

.location p {
    max-width: 500px;
    color: var(--muted);
    font-size: .9rem;
}

.distance-list {
    padding: 0;
    margin: 35px 0 0;
    list-style: none;
}

.distance-list li {
    display: grid;
    grid-template-columns: 28px 1fr 60px;
    align-items: center;
    gap: 7px;
    padding: 14px 0;
    border-bottom: 1px solid #bbaea4;
    font-size: .8rem;
    text-transform: uppercase;
}

.distance-list li span {
    font-size: 1.1rem;
}

.distance-list small {
    color: var(--muted);
    font-size: .55rem;
    text-align: right;
    text-transform: none;
}

.map-placeholder {
    position: relative;
    height: 310px;
    overflow: hidden;
    border: 2px solid #d7c4ae;
    border-radius: 6px;
    background: #dce1d1;
}

.map-placeholder::before,
.map-placeholder::after {
    content: "";
    position: absolute;
    background: #f2eee4;
    transform: rotate(-28deg);
}

.map-placeholder::before {
    top: 40px;
    left: -30px;
    width: 135%;
    height: 22px;
    box-shadow: 0 75px 0 #f2eee4, 0 150px 0 #f2eee4;
}

.map-placeholder::after {
    top: -50px;
    right: 55px;
    width: 18px;
    height: 430px;
    box-shadow: -85px 0 0 #f2eee4;
}

.map-water {
    position: absolute;
    top: 0;
    right: 0;
    width: 35%;
    height: 100%;
    background: #8bd2e2;
}

.map-placeholder span {
    position: absolute;
    z-index: 2;
    top: 16px;
    left: 15px;
    padding: 12px 17px;
    background: #fff;
    color: var(--brown);
    font-weight: 700;
    font-size: .75rem;
    box-shadow: var(--shadow);
}

.map-pin {
    position: absolute;
    z-index: 3;
    top: 56%;
    left: 58%;
    color: var(--red);
    font-size: 2rem;
}

.social-cta {
    padding: 94px 0;
    background-color: var(--brown);
}

.social-cta .container>p:not(.eyebrow) {
    max-width: 580px;
    margin: -10px auto 28px;
    color: #e8cdb3;
}

.social-cta .button {
    background: var(--red);
}

.final-cta {
    background: var(--cream);
}

.final-grid {
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    align-items: center;
    gap: 90px;
    max-width: 860px;
}

.final-image {
    height: 420px;
}

.final-grid .section-title {
    margin-bottom: 22px;
}

.final-grid p {
    max-width: 500px;
    margin-bottom: 28px;
    color: var(--muted);
}

.site-footer {
    padding: 25px 0;
    background: var(--brown-dark);
    color: #d9bfa8;
    font-size: .72rem;
}

.site-footer .container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

@media (max-width: 900px) {

    .hero-grid,
    .about-grid,
    .reasons-grid,
    .location-grid,
    .final-grid {
        grid-template-columns: 1fr;
        gap: 42px;
    }

    .hero-copy {
        padding: 40px 0 0;
    }

    .hero-image {
        height: 520px;
    }

    .about-image {
        height: 360px;
    }

    .reason-image {
        min-height: 420px;
    }

    .final-grid {
        max-width: 650px;
    }

    .environments-intro {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .environment-cards {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 650px) {
    .container {
        width: min(100% - 32px, 560px);
    }

    .section {
        padding: 75px 0;
    }

    .header-inner {
        flex-wrap: wrap;
        padding: 17px 0;
    }

    .main-nav {
        order: 3;
        width: 100%;
        justify-content: space-between;
        gap: 8px;
        font-size: .68rem;
    }

    .header-inner .button {
        margin-left: auto;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero-image {
        height: 390px;
    }

    .quick-facts {
        flex-direction: column;
        gap: 7px;
    }

    .about-image {
        height: 280px;
    }

    .environment-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .environment-card img {
        height: 145px;
    }

    .masonry-gallery {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: repeat(3, 170px);
    }

    .masonry-gallery .gallery-tall {
        grid-row: span 2;
    }

    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .distance-list li {
        grid-template-columns: 25px 1fr 45px;
        font-size: .68rem;
    }

    .map-placeholder {
        height: 250px;
    }

    .final-image {
        height: 330px;
    }

    .site-footer .container {
        flex-direction: column;
    }
}

.gallery-section {
    background: var(--brown);
    color: #f8dec1;
    padding: 90px 0 110px;
    overflow: hidden;
    /* Permite que o carrossel vaze sem barra de rolagem na página */
}

/* -------------------------------------------------------
   1. TOPO: TEXTO + CARROSSEL VAZANDO PARA FORA DA TELA
------------------------------------------------------- */
.ambientes-header-wrap {
    width: 100%;
    padding-left: max(24px, calc((100vw - 1120px) / 2));
    padding-right: 0;
    margin-bottom: 70px;
}

.ambientes-intro-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    align-items: start;
    gap: 40px;
}

.ambientes-copy h2 {
    font-size: clamp(2.4rem, 4vw, 3.4rem);
    margin-bottom: 16px;
}

.ambientes-copy p {
    color: #e6c9ad;
    font-size: 0.98rem;
    line-height: 1.5;
    max-width: 300px;
    margin: 0;
}

.ambientes-carousel-area {
    position: relative;
    width: 100%;
    min-width: 0;
}

.carousel-window {
    width: 100%;
    overflow: hidden;
    padding-bottom: 16px;
}

.carousel-track {
    display: flex;
    gap: 20px;
    transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

/* Card Individual do Carrossel */
.category-card {
    flex: 0 0 240px;
    background: transparent;
    border: none;
    padding: 0;
    text-align: left;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.category-card:hover {
    opacity: 0.95;
}

.category-card.active {
    opacity: 1;
}

.category-thumb {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.category-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.category-card.active .category-thumb {
    border-color: #ffe8c9;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

.category-card h3 {
    margin: 12px 0 0;
    color: #ffe1bb;
    font-size: 1.15rem;
    font-weight: 700;
    font-family: "Playfair Display", Georgia, serif;
}

/* Controles de Seta logo abaixo das miniaturas */
.carousel-controls-bottom {
    display: flex;
    gap: 12px;
    margin-top: 14px;
}

.nav-arrow-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 232, 201, 0.45);
    background: rgba(255, 255, 255, 0.06);
    color: #ffe8c9;
    font-size: 1.5rem;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.nav-arrow-btn:hover {
    background: #ffe8c9;
    color: var(--brown);
    border-color: #ffe8c9;
    transform: translateY(-2px);
}

/* -------------------------------------------------------
   2. GALERIA: LAYOUT EXATO DO FIGMA (1º ANEXO)
------------------------------------------------------- */
.gallery-title {
    margin-bottom: 36px;
}

.gallery-tab-panels {
    width: 100%;
}

.tab-panel {
    display: none !important;
}

/* Grid ativa de 4 colunas e 2 linhas com proporções personalizadas */
.tab-panel.active.figma-gallery-grid {
    display: grid !important;
    grid-template-columns: 1.25fr 1.05fr 1fr 1fr;
    grid-template-rows: 240px 240px;
    gap: 12px;
    animation: fadeInGrid 0.4s ease forwards;
}

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

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

.gallery-item {
    overflow: hidden;
    border-radius: 4px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-item img:hover {
    transform: scale(1.025);
}

/* 1ª coluna: Imagem alta vertical (ocupa as 2 linhas) */
.item-sala-tall {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}

/* 2ª coluna, linha 1: Imagem média superior */
.item-sala-top-center {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
}

/* 3ª e 4ª colunas, linha 1: Imagem horizontal larga (TV/cozinha) */
.item-sala-top-wide {
    grid-column: 3 / 5;
    grid-row: 1 / 2;
}

/* 2ª coluna, linha 2: Imagem vertical sacada/porta */
.item-sala-bottom-door {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
}

/* 3ª coluna, linha 2: Imagem sofá */
.item-sala-bottom-mid {
    grid-column: 3 / 4;
    grid-row: 2 / 3;
}

/* 4ª coluna, linha 2: Imagem corredor */
.item-sala-bottom-right {
    grid-column: 4 / 5;
    grid-row: 2 / 3;
}

/* -------------------------------------------------------
   3. RESPONSIVIDADE
------------------------------------------------------- */
@media (max-width: 1024px) {
    .ambientes-intro-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .ambientes-copy p {
        max-width: 100%;
    }

    .tab-panel.active.figma-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
        gap: 10px;
    }

    .item-sala-tall,
    .item-sala-top-wide {
        grid-column: span 2;
        grid-row: auto;
        height: 320px;
    }

    .item-sala-top-center,
    .item-sala-bottom-door,
    .item-sala-bottom-mid,
    .item-sala-bottom-right {
        grid-column: auto;
        grid-row: auto;
        height: 210px;
    }
}

@media (max-width: 650px) {
    .category-card {
        flex: 0 0 190px;
    }

    .category-thumb {
        height: 160px;
    }

    .tab-panel.active.figma-gallery-grid {
        grid-template-columns: 1fr;
    }

    .item-sala-tall,
    .item-sala-top-wide,
    .item-sala-top-center,
    .item-sala-bottom-door,
    .item-sala-bottom-mid,
    .item-sala-bottom-right {
        grid-column: 1 / -1;
        height: 240px;
    }
}

.location {
    background: var(--paper);
}

.location-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 60px;
    align-items: center;
}

.location-copy h2 {
    font-size: clamp(2rem, 3.5vw, 3rem);
    line-height: 1.1;
    margin-bottom: 18px;
}

.location-copy p {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 460px;
    margin-bottom: 28px;
}

/* Lista de distâncias */
.distance-list {
    padding: 0;
    margin: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
}

.distance-list li {
    display: flex;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #dcd2c7;
}

.distance-list li:last-child {
    border-bottom: none;
}

.place-icon {
    font-size: 1.25rem;
    margin-right: 14px;
}

.distance-list strong {
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex: 1;
}

.distance-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.2;
}

.distance-badge small {
    color: #9b8c84;
    font-size: 0.62rem;
    text-transform: none;
}

.distance-badge span {
    color: #2b1a17;
    font-size: 0.95rem;
    font-weight: 700;
}

/* Container do Mapa Real (Iframe Google Maps) */
.map-wrapper {
    position: relative;
    width: 100%;
    height: 380px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(64, 30, 20, 0.08);
    border: 1px solid rgba(81, 37, 29, 0.12);
    background: #e5e3df;
}

.map-wrapper iframe {
    width: 100%;
    height: 100%;
    display: block;
}

/* Responsividade */
@media (max-width: 900px) {
    .location-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .map-wrapper {
        height: 320px;
    }
}

.gallery-section {
    background: var(--brown);
    color: #f8dec1;
    padding: 90px 0 110px;
    overflow: hidden;
}

/* -------------------------------------------------------
   1. TOPO: TEXTO + CARROSSEL VAZANDO PARA FORA DA TELA
------------------------------------------------------- */
.ambientes-header-wrap {
    width: 100%;
    padding-left: max(24px, calc((100vw - 1120px) / 2));
    padding-right: 0;
    margin-bottom: 70px;
}

.ambientes-intro-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    align-items: start;
    gap: 40px;
}

.ambientes-copy h2 {
    font-size: clamp(2.4rem, 4vw, 3.4rem);
    margin-bottom: 16px;
}

.ambientes-copy p {
    color: #FAF6ED;
    font-size: 0.98rem;
    line-height: 1.5;
    max-width: 300px;
    margin: 0;
}

.ambientes-carousel-area {
    position: relative;
    width: 100%;
    min-width: 0;
}

.carousel-window {
    width: 100%;
    overflow: hidden;
    padding-bottom: 16px;
}

.carousel-track {
    display: flex;
    gap: 20px;
    transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

/* Card Individual do Carrossel */
.category-card {
    flex: 0 0 240px;
    background: transparent;
    border: none;
    padding: 0;
    text-align: left;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.category-card:hover {
    opacity: 0.95;
}

.category-card.active {
    opacity: 1;
}

.category-thumb {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.category-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.category-card.active .category-thumb {
    border-color: #ffe8c9;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

.category-card h3 {
    margin: 12px 0 0;
    color: #ffe1bb;
    font-size: 1.15rem;
    font-weight: 700;
    font-family: "Playfair Display", Georgia, serif;
}

/* Controles de Seta logo abaixo das miniaturas */
.carousel-controls-bottom {
    display: flex;
    gap: 12px;
    margin-top: 14px;
}

.nav-arrow-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 232, 201, 0.45);
    background: rgba(255, 255, 255, 0.06);
    color: #ffe8c9;
    font-size: 1.5rem;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.nav-arrow-btn:hover {
    background: #ffe8c9;
    color: var(--brown);
    border-color: #ffe8c9;
    transform: translateY(-2px);
}

/* -------------------------------------------------------
   2. GALERIA: CONTROLE DE ABAS E GRIDS PERSONALIZADAS
------------------------------------------------------- */
.gallery-title {
    margin-bottom: 36px;
}

.gallery-tab-panels {
    width: 100%;
    position: relative;
}

/* TODAS AS GALERIAS INATIVAS FICAM 100% OCULTAS */
.tab-panel {
    display: none !important;
}

/* 1. Painéis com subgrupos verticais (Quartos e Banheiros) */
.tab-panel.active {
    display: flex !important;
    flex-direction: column;
    gap: 40px;
    animation: fadeInGrid 0.4s ease forwards;
}

/* 2. Painéis que são Grid direto de 6 fotos (Sala, Cozinha, Jantar) */
.tab-panel.active.figma-gallery-grid {
    display: grid !important;
    grid-template-columns: 1.25fr 1.05fr 1fr 1fr;
    grid-template-rows: 240px 240px;
    gap: 12px;
    width: 100%;
    animation: fadeInGrid 0.4s ease forwards;
}

/* 3. Painel da Varanda de 4 fotos */
.tab-panel.active.figma-gallery-grid-4 {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(1, 400px);
    gap: 14px;
    width: 100%;
    animation: fadeInGrid 0.4s ease forwards;
}

/* Subgrupos de galeria (Quarto 1, Quarto 2, Banheiro 1, Banheiro 2) */
.gallery-subgroup {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.gallery-subgroup-title {
    color: #ffe1bb;
    font-size: 1.35rem;
    font-weight: 700;
    font-family: "Playfair Display", Georgia, serif;
    letter-spacing: -0.01em;
    margin: 0;
}

/* Grid de 6 fotos dentro do Quarto 1 */
.gallery-subgroup .figma-gallery-grid {
    display: grid;
    grid-template-columns: 1.25fr 1.05fr 1fr 1fr;
    grid-template-rows: 240px 240px;
    gap: 12px;
    width: 100%;
}

/* Grid de 3 fotos dentro do Quarto 2 */
.gallery-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 260px;
    gap: 14px;
    width: 100%;
}

/* Foto individual de cada Banheiro */
.gallery-item-single {
    width: 100%;
    height: 420px;
    overflow: hidden;
    border-radius: 6px;
}

.gallery-item-single img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-item-single img:hover {
    transform: scale(1.02);
}

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

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

.gallery-item {
    overflow: hidden;
    border-radius: 4px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-item img:hover {
    transform: scale(1.025);
}

/* Posicionamento do Grid de 6 fotos */
.item-sala-tall {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}

.item-sala-top-center {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
}

.item-sala-top-wide {
    grid-column: 3 / 5;
    grid-row: 1 / 2;
}

.item-sala-bottom-door {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
}

.item-sala-bottom-mid {
    grid-column: 3 / 4;
    grid-row: 2 / 3;
}

.item-sala-bottom-right {
    grid-column: 4 / 5;
    grid-row: 2 / 3;
}

/* -------------------------------------------------------
   3. RESPONSIVIDADE DA SEÇÃO
------------------------------------------------------- */
@media (max-width: 1024px) {
    .ambientes-intro-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .ambientes-copy p {
        max-width: 100%;
    }

    .tab-panel.active.figma-gallery-grid,
    .gallery-subgroup .figma-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
        gap: 10px;
    }

    .tab-panel.active.figma-gallery-grid-4 {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
        gap: 10px;
    }

    .gallery-grid-3 {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
        gap: 10px;
    }

    .item-sala-tall,
    .item-sala-top-wide {
        grid-column: span 2;
        grid-row: auto;
        height: 320px;
    }

    .item-sala-top-center,
    .item-sala-bottom-door,
    .item-sala-bottom-mid,
    .item-sala-bottom-right {
        grid-column: auto;
        grid-row: auto;
        height: 210px;
    }

    .tab-panel.active.figma-gallery-grid-4 .gallery-item,
    .gallery-grid-3 .gallery-item {
        height: 230px;
    }

    .gallery-item-single {
        height: 320px;
    }
}

@media (max-width: 650px) {
    .category-card {
        flex: 0 0 190px;
    }

    .category-thumb {
        height: 160px;
    }

    .tab-panel.active.figma-gallery-grid,
    .gallery-subgroup .figma-gallery-grid {
        grid-template-columns: 1fr;
    }

    .tab-panel.active.figma-gallery-grid-4,
    .gallery-grid-3 {
        grid-template-columns: 1fr;
    }

    .item-sala-tall,
    .item-sala-top-wide,
    .item-sala-top-center,
    .item-sala-bottom-door,
    .item-sala-bottom-mid,
    .item-sala-bottom-right {
        grid-column: 1 / -1;
        height: 240px;
    }

    .tab-panel.active.figma-gallery-grid-4 .gallery-item,
    .gallery-grid-3 .gallery-item {
        height: 220px;
    }

    .gallery-item-single {
        height: 260px;
    }
}

/* 1. Grade lado a lado dos Banheiros */
.tab-panel.active.tab-panel-banheiro,
#gallery-banheiro.tab-panel.active {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
    gap: 24px;
    width: 100%;
    animation: fadeInGrid 0.4s ease forwards;
}

/* 2. Controle de altura para fotos verticais */
.tab-panel-banheiro .gallery-item-single,
#gallery-banheiro .gallery-item-single {
    width: 100%;
    /* Opção fixa alta para desktop: 520px (ou troque por 580px / 620px) */
    height: 800px;
    overflow: hidden;
    border-radius: 6px;
}

.tab-panel-banheiro .gallery-item-single img,
#gallery-banheiro .gallery-item-single img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.4s ease;
}

.tab-panel-banheiro .gallery-item-single img:hover,
#gallery-banheiro .gallery-item-single img:hover {
    transform: scale(1.02);
}

/* 3. Ajuste em telas médias / tablets */
@media (max-width: 1024px) {

    .tab-panel-banheiro .gallery-item-single,
    #gallery-banheiro .gallery-item-single {
        height: 440px;
    }
}

/* 4. Ajuste em celulares */
@media (max-width: 650px) {

    .tab-panel.active.tab-panel-banheiro,
    #gallery-banheiro.tab-panel.active {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .tab-panel-banheiro .gallery-item-single,
    #gallery-banheiro .gallery-item-single {
        height: 420px;
    }
}

.final-video-wrapper {
    height: 480px;
    /* Altura do vídeo vertical */
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: #000;
    box-shadow: 0 10px 30px rgba(64, 30, 20, 0.08);
}

.final-video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

@media (max-width: 900px) {
    .final-video-wrapper {
        height: 380px;
    }
}

@media (max-width: 650px) {
    .final-video-wrapper {
        height: 320px;
    }
}