/* ==========================================================================
   Teste de layout dos cards (Figma) — ISOLADO
   Regras escopadas sob .teste-cards para NÃO afetar o card de produção.
   Carregado apenas em /teste-card-layout.
   Quando aprovado: mover estas regras para style.css removendo o wrapper.
   ========================================================================== */

/* ---- Grid responsivo dos cards de teste ---- */
.properties.teste-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 32px 18px;
    grid-template-areas: none;   /* anula o grid fixo de 4 colunas da produção */
    width: 100%;
}

/* ---- Container do card ---- */
.teste-cards .card-property {
    display: flex;
    width: 318px;
    height: 540px;             /* Figma */
    flex-direction: column;
    align-items: flex-start;
    flex-shrink: 0;

    /* encolhe em telas estreitas sem estourar */
    max-width: 100%;
    min-width: 0;
    margin: 0;
}

/* ---- Corpo do card: preenche o espaço restante e padroniza a altura ---- */
.teste-cards .card-property {
    overflow: hidden;          /* respeita a altura fixa e os cantos arredondados */
}

.teste-cards .card-property-body {
    flex: 1 1 auto;            /* ocupa 540 - 212 = 328px, independente do conteúdo */
    height: auto;
    min-height: 0;
    justify-content: flex-start;
    gap: 0;
}

/* Grupo de dados (preço + descrição + características + praia) — padroniza independente do conteúdo */
.teste-cards .tc-card-data {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;                  /* apertado pra caber título 3 linhas + desconto nos 540px */
    padding-bottom: 8px;
    flex: 1 0 0;               /* preenche o corpo; dados ficam no topo, botão embaixo */
    align-self: stretch;
}

/* botão sempre fixado no rodapé (já tinha margin-top:auto inline) */
.teste-cards .card-property-body-footer {
    margin-top: auto;
}

/* ---- Barra de ações (Ver imóvel + favoritar) ---- */
.teste-cards .tc-actions {
    gap: 8px;
    width: 100%;
}

.teste-cards .card-property-body-btn {
    display: flex;
    height: 48px;
    padding: 8px 24px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex: 1 0 0;
    border-radius: 8px;
    background: #005FF7;

    color: #FFF;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
}

/* quadrado de favoritar (coração) */
.teste-cards .tc-fav-btn {
    display: flex;
    width: 48px;
    height: 48px;
    padding: 3px 2px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    background: #F0F5F9;
    cursor: pointer;
}

.teste-cards .tc-fav-btn svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* ---- Foto (carrossel) ---- */
.teste-cards .card-property-header {
    width: 100%;
    flex-shrink: 0;
    border-radius: 16px 16px 0 0;
}

.teste-cards .swiper-photos {
    width: 100%;
    height: 212px;
    flex-shrink: 0;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    background: lightgray;
}

.teste-cards .swiper-photos .swiper-slide img {
    width: 100%;
    height: 212px;
    object-fit: cover;            /* preenche o quadro certinho (corta o excedente) */
    background: #F0F5F9;
    border-radius: 16px 16px 0 0;
}

/* "ver mais fotos" preenche todo o quadro (sem faixa cinza) */
.teste-cards .swiper-photos .swiper-slide img.tc-more-photos {
    object-fit: cover;
    background: none;
}

/* ----------------------------------------------------------------------------
   Neutraliza as regras antigas ".search .card-property ..." do @media(max-width:679px)
   (style.css) que forçam dimensões antigas (350x602, foto 233px !important) no mobile.
   Mesma especificidade + !important, escopado em .teste-cards → só afeta o card novo.
   ---------------------------------------------------------------------------- */
.teste-cards .card-property {
    width: 318px !important;
    max-width: 100% !important;
    height: 540px !important;
}

.teste-cards .card-property .card-property-header {
    width: 100% !important;
    height: auto !important;
}

.teste-cards .card-property .card-property-header .swiper-photos {
    height: 212px !important;
}

.teste-cards .card-property .card-property-data {
    width: 100% !important;
    max-width: none !important;
}

.teste-cards .card-property .card-property-body {
    width: 100% !important;
    padding: 24px !important;   /* 24px em volta (anula o 16px do mobile) → botão alinhado a 24px do fim */
}

/* Preço promocional ("De R$ X por") mais perto do preço */
.teste-cards .card-property-body-oldprice {
    line-height: 1.2;
    margin: 0;
}

/* Badges (ref / desconto) sobrepostos com respiro de 24px do Figma */
.teste-cards .card-property-data {
    padding: 24px;
    align-items: center;
    justify-content: space-between;
}

/* Referência ("REF XXXX") — topo-esquerda da foto */
.teste-cards .card-property-data .id {
    order: -1;                     /* move pra esquerda no flex */
    align-self: flex-start;        /* posiciona no topo */
    display: flex;
    padding: 8px 10px;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 10px;
    border-radius: 4px;
    background: rgba(26, 29, 40, 0.32);

    color: #FFF;
    text-align: left;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    text-transform: uppercase;     /* "REF 12345" */
}

/* Setas do carrossel — SVG exato do Figma (sombra já embutida no <filter>) */
.teste-cards .swiper-button-prev-photo svg,
.teste-cards .swiper-button-next-photo svg {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}

/* ---- Faixa de tags: flutua sobre a base da foto ---- */
.teste-cards .card-property-body {
    position: relative;        /* âncora para as tags */
    overflow: visible;         /* deixa as tags aparecerem sobre a foto (o card já corta os cantos) */
}

.teste-cards .tc-tags {
    position: absolute;
    left: 24px;                /* alinhado com o conteúdo do corpo */
    right: 24px;
    bottom: 100%;              /* base da tag na borda inferior da foto */
    transform: translateY(50%); /* desce metade da altura → centro da tag no fim da imagem */
    z-index: 3;

    display: flex;
    flex-wrap: nowrap;         /* desconto + "pronto para visitar" sempre na mesma linha */
    align-items: center;
    gap: 8px;
}

/* tags não encolhem o texto (mantêm na mesma linha) */
.teste-cards .tc-tag-ready,
.teste-cards .tc-tag-discount {
    flex-shrink: 0;
}

/* tag "Pronto para visitar" */
.teste-cards .tc-tag-ready {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 24px;
    padding: 0 10px;
    border-radius: 16px;
    border: 1px solid #BFD4E8;
    background: #F0F5F9;

    color: #1A1D28;
    font-family: 'Poppins', sans-serif;
    font-size: 10px;
    font-weight: 700;
    line-height: normal;
    text-transform: uppercase;
    white-space: nowrap;
}

.teste-cards .tc-tag-ready__icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* tag de desconto (gradiente, à esquerda do "Pronto para visitar") */
.teste-cards .tc-tag-discount {
    order: -1;                 /* fica à esquerda do "Pronto para visitar" */
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    height: 24px;
    padding: 0 8px;
    border-radius: 16px;
    background: linear-gradient(90deg, #FF7A06 0%, #FFB300 100%);

    color: #F0F5F9;
    text-align: right;
    font-family: 'Poppins', sans-serif;
    font-size: 10px;
    font-weight: 700;
    line-height: normal;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ---- Preço ---- */
.teste-cards .card-property-body-price {
    color: #1A1D28;
    font-family: 'Poppins', sans-serif;
    font-size: 26px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    height: auto;
}

/* ---- Texto (título) ---- */
.teste-cards .card-property-body-title {
    align-self: stretch;
    color: #1A1D28;
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 20px;

    /* trava em 3 linhas e reserva sempre a altura de 3 linhas (alinha as seções abaixo) */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 60px;              /* 3 linhas × 20px de line-height */
    flex-shrink: 0;
}

/* ---- Características do imóvel (faixa com fundo) ---- */
.teste-cards .card-property-body-icons {
    display: flex;
    flex-wrap: wrap;            /* itens largos quebram pra 2ª linha em vez de estourar */
    padding: 8px;
    justify-content: center;
    align-items: center;
    gap: 4px 12px;             /* row-gap 4px (apertado p/ caber em 2 linhas) / column-gap 12px */
    align-self: stretch;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    border-radius: 4px;
    background: #F0F5F9;
}

/* cada item (ícone + texto) não quebra no meio e fica alinhado */
.teste-cards .card-property-body-icons span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* SVG alinhado certinho com o texto */
.teste-cards .card-property-body-icons span img {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin: 0;            /* zera o .me-1 do Bootstrap, o gap cuida do espaçamento */
    vertical-align: middle;
}

.teste-cards .card-property-body-icons span {
    color: #005FF7;
    font-family: 'Open Sans', sans-serif;
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
}

/* esconde spans de característica vazios pra não gerar gaps fantasmas */
.teste-cards .card-property-body-icons span:empty {
    display: none;
}

/* remove o divisor (linha) entre características e o grupo praia */
.teste-cards .card-divisor {
    display: none;
}

/* ---- Grupo "praia" (distância + tempos) em coluna indentada ---- */
.teste-cards .card-property-body-beach {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding-left: 12px;
    align-self: stretch;
    width: auto;

    /* barra vertical cinza à esquerda do grupo */
    border-left: 2px solid #BFD4E8;
}

/* ---- Distância da praia (texto "Aprox. X metros...") ---- */
.teste-cards .card-property-body-beach,
.teste-cards .card-property-body-beach div,
.teste-cards .card-property-body-beach span {
    color: #8FA8B5;
    font-family: 'Open Sans', sans-serif;
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
}

/* ---- Tempos "X min. de carro" / "X min. a pé" ---- */
.teste-cards .card-property-body-beach-time span {
    color: #8FA8B5;
    font-family: 'Open Sans', sans-serif;
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;   /* "4 min. de carro" não quebra no meio */
    flex-shrink: 0;        /* cada tempo é um bloco inteiro */
}

/* ícones de tempo (carro 18x18 / pessoa 10x16) */
.teste-cards .tc-time-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.teste-cards .tc-time-icon--walk {
    width: 10px;
    height: 16px;
}

/* linha dos tempos (seta + carro + a pé) sempre lado a lado, em uma linha */
.teste-cards .card-property-body-beach-time {
    flex-direction: row;   /* anula o flex-direction:column do @media(max-width:480px) da produção */
    align-items: center;
    flex-wrap: nowrap;     /* "a pé" sempre ao lado do carro, nunca quebra pra baixo */
    gap: 8px;              /* espaço entre o tempo de carro e o de a pé */
}

/* seta (16x16) antes do carro */
.teste-cards .tc-beach-arrow {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ==========================================================================
   Modal WhatsApp dos cards — autossuficiente e centralizado
   ========================================================================== */
.tc-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: none;
}

.tc-modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.tc-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(26, 29, 40, 0.5);
}

.tc-modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    background: #FFFFFF;
    border-radius: 24px;
    padding: 32px 24px 24px;
    box-shadow: 0 24px 64px rgba(26, 29, 40, 0.24);
}

.tc-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px;
    border: 0;
    background: none;
    cursor: pointer;
    line-height: 0;
}

.tc-modal__title {
    margin: 0 0 16px;
    padding-right: 32px;
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #1A1D28;
}

/* REF do imóvel — mesma cor/fonte do disclaimer de privacidade */
.tc-modal__ref {
    margin: -8px 0 16px;
    font-family: 'Open Sans', sans-serif;
    font-size: 12px;
    color: #8FA8B5;
}

.tc-modal__ref:empty {
    display: none;
}

.tc-modal__form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tc-modal__form input[type="text"],
.tc-modal__form input[type="tel"] {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid #BFD4E8;
    border-radius: 8px;
    background: #FFFFFF;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    color: #1A1D28;
}

.tc-modal__form input::placeholder {
    color: #8FA8B5;
}

/* o intl-tel-input embrulha o telefone num .iti — ocupa a largura toda */
.tc-modal__form .iti {
    width: 100%;
}

.tc-modal__send {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 52px;
    border: 0;
    border-radius: 8px;
    background: #1ACD5D;
    color: #FFFFFF;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.tc-modal__send:disabled {
    opacity: 0.6;
    cursor: default;
}

.tc-modal__privacy {
    margin: 8px 0 0;
    font-family: 'Open Sans', sans-serif;
    font-size: 11px;
    line-height: 16px;
    color: #8FA8B5;
    text-align: center;
}

.tc-modal__privacy a {
    color: #005FF7;
}
