/* =========================
   RESET E BASE
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f4f4f4;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 1250px;
    margin: auto;
    padding: 15px;
}

/* =========================
   BARRA SUPERIOR
========================= */
.barra-superior {
    background: #222;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.btn-home {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 6px 12px;
    border-radius: 6px;
    transition: 0.3s;
}

.btn-home:hover {
    background: rgba(255,255,255,0.1);
}

.menu-icon {
    color: white;
    font-size: 22px;
    cursor: pointer;
    padding: 6px 12px;
    background: none;
    border: none;
}

/* =========================
   MENU PÁGINAS
========================= */
.nav-paginas {
    background: #fff;
    border-bottom: 1px solid #ddd;
    padding: 12px 0;
    text-align: center;
    margin-bottom: 20px;
}

.nav-paginas a {
    margin: 0 15px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    transition: 0.3s;
}

.nav-paginas a:hover {
    color: #000;
}

/* =========================
   SIDEBAR
========================= */
.sidebar {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 1001;
    top: 0;
    left: 0;
    background: #111;
    overflow-x: hidden;
    transition: 0.3s;
    padding-top: 60px;
}

.sidebar a {
    padding: 14px 25px;
    text-decoration: none;
    font-size: 16px;
    color: #aaa;
    display: block;
    transition: 0.2s;
}

.sidebar a:hover {
    background: #222;
    color: #fff;
}

.sidebar .closebtn {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    color: white;
    cursor: pointer;
}

.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

/* =========================
   HEADER
========================= */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.area-acesso {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* BOTÕES PADRÃO */
.btn {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 13px;
    text-decoration: none;
    transition: 0.2s;
}

.btn-login { background: #007bff; color: #fff; }
.btn-login:hover { background: #0056b3; }

.btn-sair { background: #dc3545; color: #fff; }
.btn-sair:hover { background: #a71d2a; }

.btn-admin { background: #000; color: #fff; border: 1px solid #fff; }
.btn-admin:hover { background: #222; }

/* =========================
   TOPO (BUSCA + FILTRO)
========================= */
.topo {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    background: #fff;
    padding: 15px;
    border-radius: 10px;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* BOTÃO ANUNCIAR */
.btn-anunciar {
    padding: 12px 20px;
    background: #28a745;
    color: #fff;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
}

.btn-anunciar:hover {
    background: #1e7e34;
}

/* SELECT */
select {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    background: #6c757d;
    color: #fff;
    cursor: pointer;
}

/* INPUT BUSCA */
form input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
}

form input:focus {
    border-color: #333;
}

/* BOTÃO BUSCAR */
form button {
    padding: 10px 15px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

form button:hover {
    background: #000;
}

/* =========================
   GRID DE CARDS
========================= */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

/* CARD */
.card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: 0.25s;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

/* IMAGEM */
.galeria {
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: #eee;
    position: relative;
}

.galeria img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* BADGE VIDEO */
.badge-video {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: bold;
}

/* CONTEÚDO */
.card-body {
    padding: 15px;
}

.card-body h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.local {
    font-size: 12px;
    color: #888;
}

.preco {
    font-size: 18px;
    color: #28a745;
    font-weight: bold;
    margin-top: 5px;
}

/* =========================
   AÇÕES (EDITAR / EXCLUIR)
========================= */
.card-acoes {
    padding: 10px;
    display: flex;
    gap: 5px;
    border-top: 1px solid #eee;
}

.btn-edit, .btn-del {
    flex: 1;
    text-align: center;
    padding: 8px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
    transition: 0.2s;
}

.btn-edit {
    background: #000;
    color: #fff;
}

.btn-edit:hover {
    background: #333;
}

.btn-del {
    background: #fff;
    color: #000;
    border: 1px solid #000;
}

.btn-del:hover {
    background: #f2f2f2;
}

/* =========================
   RESPONSIVO
========================= */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }

    .topo {
        flex-direction: column;
        align-items: stretch;
    }

   .grid {
    display: grid;
    /* auto-fit: estica os cards para não sobrar buraco branco na direita */
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); 
    gap: 20px;
    padding: 10px;
}

}
