/* ===== Página pública - Listagem de anúncios ===== */

.public-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 24px;
}

.public-container .hero {
    text-align: center;
    margin-bottom: 40px;
    padding: 48px 24px;
}

.public-container .hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 600;
    background: linear-gradient(135deg, #d4a574 0%, #c97b84 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.public-container .hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.filters-bar {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius);
    margin-bottom: 36px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    border: 1px solid var(--border);
    align-items: center;
}

.filters-bar select,
.filters-bar input {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
    flex: 1;
    min-width: 180px;
    font-family: 'Outfit', sans-serif;
}

.filters-bar select:focus,
.filters-bar input:focus {
    outline: none;
    border-color: var(--accent);
}

.filters-bar input::placeholder {
    color: var(--text-muted);
}

.filters-bar select option {
    background: #1e1c24;
    color: #e8e4e0;
}

.anuncios-grid-public {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}

.anuncio-public-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.anuncio-public-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
    border-color: rgba(212, 165, 116, 0.25);
}

.anuncio-public-card .foto {
    width: 100%;
    height: 320px;
    background: linear-gradient(145deg, #2d2438 0%, #1a1820 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.anuncio-public-card .foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.anuncio-public-card:hover .foto img {
    transform: scale(1.05);
}

.anuncio-public-card .foto .placeholder-icon {
    font-size: 64px;
    opacity: 0.4;
}

.anuncio-public-card .badge-destaque {
    position: absolute;
    top: 16px;
    left: 16px;
    background: linear-gradient(135deg, #e8c547 0%, #d4a574 100%);
    color: #0f0e12;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 2;
}

.anuncio-public-card .content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.anuncio-public-card h3 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 12px;
    color: var(--text);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
}

.anuncio-public-card .meta {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 12px;
    line-height: 1.6;
}

.anuncio-public-card .meta span {
    display: block;
}

.anuncio-public-card .preco {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #d4a574 0%, #c97b84 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 8px 0 16px;
}

.anuncio-public-card .descricao {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    flex: 1;
}

.anuncio-public-card .btn-whatsapp {
    width: 100%;
    margin-top: auto;
    padding: 14px;
    background: rgba(37, 211, 102, 0.2);
    color: #25d366;
    border: 1px solid rgba(37, 211, 102, 0.4);
    border-radius: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.25s;
}

.anuncio-public-card .btn-whatsapp:hover {
    background: rgba(37, 211, 102, 0.3);
    border-color: #25d366;
}

.empty-state {
    text-align: center;
    padding: 80px 24px;
    color: var(--text-muted);
}

.empty-state p {
    font-size: 1.1rem;
}

/* ===== Verificação +18 ===== */
.age-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15, 14, 18, 0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.age-overlay.hidden {
    display: none;
}

.age-popup,
.age-blocked {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.age-popup h2,
.age-blocked h2 {
    font-family: 'Playfair Display', serif;
    color: var(--text);
    margin-bottom: 12px;
    font-size: 1.5rem;
}

.age-popup p,
.age-blocked p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.age-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.age-buttons .btn {
    width: 100%;
}

.btn-age-no {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 14px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.btn-age-no:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.age-blocked-hint {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 8px;
}

/* ===== Modal detalhes do anúncio (galeria fotos e vídeos) ===== */
.modal-public {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.modal-public.aberto {
    opacity: 1;
    visibility: visible;
}
.modal-public-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    position: relative;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}
.modal-public-close {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 28px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}
.modal-public-close:hover {
    color: var(--text);
}
.modal-public-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 12px;
    padding-right: 40px;
}
.modal-meta {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}
.modal-meta span {
    margin-right: 16px;
}
.modal-preco {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, #d4a574 0%, #c97b84 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}
.modal-descricao {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 24px;
}
.modal-galeria h3 {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.modal-galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.modal-galeria-item {
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
    aspect-ratio: 1;
}
.modal-galeria-item img,
.modal-galeria-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.modal-galeria-video video {
    object-fit: contain;
}
.modal-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    background: rgba(37, 211, 102, 0.2);
    color: #25d366;
    border: 1px solid rgba(37, 211, 102, 0.4);
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s;
    width: auto !important;
}
.modal-whatsapp:hover {
    background: rgba(37, 211, 102, 0.3);
    border-color: #25d366;
}
.modal-loading,
.modal-erro {
    padding: 48px;
    text-align: center;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .public-container {
        padding: 20px 16px;
    }
    .filters-bar {
        flex-direction: column;
        padding: 20px;
    }
    .filters-bar select,
    .filters-bar input {
        width: 100%;
    }
    .anuncios-grid-public {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .anuncio-public-card .foto {
        height: 280px;
    }
    .modal-galeria-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
