/* Fonte e base */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

* { box-sizing: border-box; }
html, body {
    height: 100%;
}
body {
    font-family: 'Poppins', sans-serif;
    background: #fafafa;
    margin: 0;
    color: #222;
}

/* WRAPPER */
#feed-wrapper {
    max-width: 720px;
    margin: 0 auto;
    padding: 20px;
}

/* CABEÇALHO */
.header {
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.header-title {
    font-weight: 600;
    font-size: 20px;
}
.header-actions {
    display: flex;
    gap: 12px;
}

/* MENU HAMBÚRGUER */
.nav-toggle {
    display: none; /* checkbox hack */
}
.hamburger {
    display: none;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}
.hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    background: #222;
    position: relative;
}
.hamburger span::before,
.hamburger span::after {
    content: "";
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    background: #222;
}
.hamburger span::before { top: -6px; }
.hamburger span::after  { top: 6px; }

.nav {
    display: flex;
    gap: 16px;
}
.nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

/* FILTROS */
.ng-filtros {
    background: #fff;
    padding: 18px;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
    margin-bottom: 20px;
}
.ng-filtros h3 {
    font-weight: 600;
    margin-bottom: 12px;
}
.filtros-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.ng-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #bbb;
    border-radius: 10px;
    margin-bottom: 12px;
    font-size: 15px;
}

/* CARD */
.ng-ig-card {
    width: 100%;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0,0,0,.10);
    overflow: hidden;
    margin-bottom: 26px;
}

/* FOTO */
.ng-ig-media img {
    width: 100%;
    display: block;
    object-fit: cover;
}

/* INFO */
.ng-ig-info {
    padding: 16px;
}
.ng-ig-info h3 {
    font-size: 20px;
    margin-bottom: 6px;
}
.ng-price-city {
    font-weight: 600;
    margin-bottom: 10px;
}
.ng-desc {
    margin-bottom: 12px;
}

/* AÇÕES */
.ng-ig-actions {
    padding: 14px;
    display: flex;
    gap: 14px;
}
.ng-ig-actions button {
    padding: 12px 16px;
    background: #f2f2f2;
    border: 1px solid #ccc;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    min-height: 44px; /* área de toque */
    flex: 1; /* ocupa largura */
}

/* WHATSAPP */
.ng-wa-btn {
    display: block;
    background: #25D366;
    color: #fff;
    padding: 14px 20px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    font-size: 16px;
    min-height: 48px;
}

/* LOADING */
#feed-loading {
    padding: 12px;
    color: #777;
    text-align: center;
}

/* MOBILE: até 900px */
@media (max-width: 900px) {
    /* elimina sobras laterais no mobile */
    #feed-wrapper {
        max-width: 100%;
        width: 100%;
        padding: 0;
        margin: 0;
    }

    .header-inner {
        max-width: 100%;
        padding: 12px 12px; /* menos lateral */
    }

    /* Instagram-like: sem sombras e cantos retos */
    .ng-ig-card {
        border-radius: 0;
        margin-bottom: 16px;
        box-shadow: none;
    }

    .ng-ig-media img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    .ng-ig-info {
        padding: 12px;
    }
    .ng-ig-info h3 {
        font-size: 18px; /* maior no mobile */
        font-weight: 600;
    }
    .ng-desc,
    .ng-price-city {
        font-size: 16px;
        line-height: 1.45;
    }

    .ng-ig-actions {
        justify-content: space-between;
        padding: 10px 12px;
        border-top: 1px solid #eee;
        gap: 10px;
        flex-wrap: nowrap;
    }
    .ng-ig-actions button {
        background: #fff;
        border: 1px solid #ddd;
        font-size: 17px;
        min-height: 48px; /* maior ainda */
        flex: 1;
    }

    .ng-wa-btn {
        width: 100%;
        border-radius: 0;
        font-size: 18px;
        padding: 14px;
        min-height: 50px;
    }

    .ng-filtros {
        padding: 12px;
        border-radius: 0;
        box-shadow: none;
        margin: 0;
        border-top: 1px solid #eee;
        border-bottom: 1px solid #eee;
    }
    .filtros-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .ng-input {
        font-size: 16px;
        padding: 12px;
        min-height: 44px;
    }

    /* Cabeçalho e menu */
    .header-title { font-size: 22px; } /* maior no mobile */
    .nav {
        position: fixed;
        top: 56px; /* altura do header */
        left: 0;
        right: 0;
        background: #fff;
        border-top: 1px solid #eee;
        display: none;
        flex-direction: column;
        padding: 12px;
        gap: 8px;
    }
    .hamburger {
        display: inline-flex;
    }
    /* abre o menu quando o checkbox está marcado */
    .nav-toggle:checked ~ .nav {
        display: flex;
    }

    /* Evita rolagem lateral */
    html, body {
        overflow-x: hidden;
    }
}

/* MOBILE: até 480px (ajustes finos) */
@media (max-width: 480px) {
    .header-inner { padding: 10px 10px; }
    .header-title { font-size: 20px; }

    .ng-ig-info h3 { font-size: 17px; }
    .ng-price-city { font-size: 15px; }

    .ng-ig-actions button {
        font-size: 16px;
        min-height: 50px;
    }
}
