/* ============================================================
   ESTRUTURA DO GRID DA VITRINE
   ============================================================ */
.grid-vitrine-quatro-colunas {
    display: grid;
    gap: 20px;
    width: 100%;
    padding: 15px 0;
}

@media (max-width: 768px) {
    .grid-vitrine-quatro-colunas {
        grid-template-columns: 1fr;
        padding: 10px;
    }
}

@media (min-width: 769px) {
    .grid-vitrine-quatro-colunas {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================================
   O CARD DE ANÚNCIO
   ============================================================ */
.card-anuncio {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    border: 1px solid #eee;
    transition: transform 0.2s;
    height: auto;
}

@media (max-width: 768px) {
    .card-anuncio {
        width: 94%;
        margin: 0 auto 20px auto;
    }
}

/* 1. CABEÇALHO GRID (LOGO, NOME E ENDEREÇO) */
.card-header-anunciante {
    display: grid;
    grid-template-columns: auto 1fr auto; 
    grid-template-rows: auto auto;         
    gap: 8px 12px;
    padding: 12px;
    align-items: center;
    background-color: #fff;
    border-bottom: 1px solid #f0f0f0;
}

.logo-anunciante-min {
    grid-column: 1;
    grid-row: 1;
    width: 45px;
    height: 45px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid #f0f0f0;
}

/* LN 83: Nome Fantasia (Ajuste de compatibilidade) */
.nome-fantasia-card {
    grid-column: 2;
    grid-row: 1;
    font-size: 1.05rem;
    font-weight: 700;
    color: #222;
    margin: 0;
    text-align: left;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2; /* Propriedade padrão W3C */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-gps-topo {
    grid-column: 3;
    grid-row: 1;
    color: #075E54;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.localizacao-card {
    grid-column: 1 / -1; 
    grid-row: 2;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    border-top: 1px solid #f9f9f9;
    padding-top: 8px;
}

.icone-gps-card {
    font-size: 18px;
    color: #075E54;
    margin-top: 2px;
}

.texto-endereco-completo {
    font-size: 0.88rem;
    color: #555;
    font-weight: 400;
    line-height: 1.4;
    text-align: justify;
    word-break: break-word;
    width: 100%;
}

/* 2. ÁREA DA FOTO (CARROSSEL) */
.container-midia-card {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5; 
    background: #fcfcfc;
    overflow: hidden;
}

.foto-vitrine {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.foto-vitrine.ativa {
    display: block;
    opacity: 1;
}

.nav-carrossel {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 8px;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 5;
}

.btn-nav {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    pointer-events: auto;
    color: #075E54;
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contador-fotos {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
}

/* 3. CORPO DO CARD */
.card-body-detalhes {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tags-status-uso {
    display: flex;
    gap: 8px;
    align-items: center;
}

.badge-estado {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    background: #f0f0f0;
    color: #333;
    text-transform: uppercase;
}

.tempo-uso {
    font-size: 0.7rem;
    color: #888;
}

/* LN 223: Título do Produto (Ajuste de compatibilidade) */
.titulo-produto-vitrine {
    font-size: 1.15rem;
    font-weight: 700;
    color: #333;
    margin: 5px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2; /* Propriedade padrão W3C */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.preco-container-vitrine {
    color: #25D366; 
    font-weight: 800;
    font-size: 1.6rem;
    margin-bottom: 10px;
}

/* LN 241: Descrição Curta (Ajuste de compatibilidade) */
.descricao-tecnica-curta {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3; /* Propriedade padrão W3C */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-acao-whatsapp {
    background-color: #25D366;
    color: white;
    text-decoration: none;
    text-align: center;
    padding: 14px;
    border-radius: 8px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1rem;
    transition: filter 0.2s;
}

.btn-acao-whatsapp:hover {
    filter: brightness(0.95);
}