/* ===== BASE (Desktop como padrão) ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    max-width: 100vw;
    font-family: "Poppins", sans-serif;
}

body {
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background blur fixo atrás do conteúdo */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: url(../assets/img/background.jpeg) no-repeat center 20%/cover;
    filter: blur(5px);
    pointer-events: none;
}

.error,
#error-password,
#error-email {
    margin: 10px;
    padding: 5px;
    color: #f85050;
    font-size: 0.7em;
}

/* Grid principal */
#conteiner {
    display: grid;
    grid-template-columns: 200px 1fr;
    grid-template-areas: "menu-lateral conteudo-principal";
    gap: 10px;
}

/* ===== Aside / Menu lateral (desktop padrão) ===== */
.menu-lateral {
    grid-area: menu-lateral;
    box-sizing: border-box;
    position: static;
    transform: none !important;
    width: 220px;
    height: auto;
    box-shadow: none;
}

.menu-lateral__conteiner {
    width: 180px;
    height: 80%;
    margin: 20px;
    padding: 20px;
    box-sizing: border-box;
    border-right: 0.5px solid #fff;
}

.menu-lateral .logo {
    display: flex;
    justify-content: center;
    margin: 20px;
}

.menu-lateral__nav {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    margin: 5px;
    padding: 5px;
}

.menu-lateral__nav--items {
    display: inline-grid;
    grid-template-columns: max-content;
    row-gap: 0.8rem;
    justify-content: center;
    list-style: none;
}

.menu-lateral__nav--items li a {
    display: block;
    width: 100%;
    padding: 0.4em 1.5em;
    font-size: 1rem;
    font-weight: 100;
    color: #fff;
    text-decoration: none;
    border: 0.5px solid #fff;
    border-radius: 999px;
    text-align: center;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 1px 1px 8px rgba(93, 93, 93, 0.5);
}

.menu-lateral__nav--items li a:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 1px 1px 8px rgba(255, 255, 255, 0.2);
}

/* Botão hambúrguer (oculto no desktop) */
.btn-menu {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1001;
    background: rgba(237, 255, 216, 0.5);
    border: 0.5px solid #fff;
    border-radius: 999px;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    color: #fff;
    align-items: center;
    justify-content: center;
    box-shadow: 1px 1px 8px rgba(93, 93, 93, 0.5);
    backdrop-filter: blur(4px);
    cursor: pointer;
    display: none !important;
    /* desktop: escondido */
}

/* Overlay (desktop: não usado) */
.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 998;
    display: none !important;
}

/* ===== Conteúdo principal ===== */
.conteudo-principal {
    /* grid-area: conteudo-principal; */
    grid-template-rows: auto auto;
    grid-template-areas:
        "conteudo-principal__header"
        "conteudo-principal__produtos";
}

/* Header em grid no desktop */
.conteudo-principal__header {
    display: grid;
    grid-template-columns: 5fr 1fr;
    grid-template-areas:
        "conteudo-principal__search-bar conteudo-principal__header-icons";
}

/* Search bar (base) */
.conteudo-principal__search-bar {
    grid-area: conteudo-principal__search-bar;
    margin-top: 50px;
    padding: 10px;
    width: 100%;
    display: flex;
    justify-content: flex-start;
    box-sizing: border-box;
}

.conteudo-principal__search-bar-container {
    position: relative;
    /* uma só vez, sem duplicar */
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 5px 10px;
    border: 0.5px solid #fff;
    border-radius: 999px;
    background: rgba(237, 255, 216, 0.5);
    box-shadow: 1px 1px 8px rgb(93 93 93 / 50%);
    box-sizing: border-box;
    transition: box-shadow 0.5s ease-in-out;
}

.conteudo-principal__search-bar-container input {
    width: 90%;
    border: none;
    background: none;
    padding: 5px;
    outline: none;
    color: #6A9C5C;
}

.conteudo-principal__search-bar-container button {
    padding: 5px;
    border: none;
    background: none;
    color: #fff;
}

.conteudo-principal__search-bar-container:hover {
    box-shadow: 1px 1px 8px rgb(255 255 255 / 100%);
}

/* Sugestões da busca */
.busca-sugestoes {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    margin: 0;
    padding: 0;
    border-radius: 0 0 16px 16px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px) saturate(130%);
    border: 1.5px solid #d8f2d8;
    box-shadow: 0 6px 24px 0 rgba(90, 170, 110, 0.11);
    z-index: 100;
    list-style: none;
    max-height: 230px;
    overflow-y: auto;
    min-width: 100%;
}

.busca-sugestoes li {
    padding: 14px 22px;
    cursor: pointer;
    font-size: 1.02rem;
    color: #40794c;
    background: none;
    border-bottom: 1px solid #eaf5ea;
    transition: background 0.12s, color 0.12s;
    font-family: inherit;
}

.busca-sugestoes li:last-child {
    border-bottom: none;
}

.busca-sugestoes li:hover,
.busca-sugestoes li:focus {
    background: #d8fbe0cc;
    color: #27703c;
    font-weight: 600;
}

/* Ícones do header */
.conteudo-principal__header-icons {
    grid-area: conteudo-principal__header-icons;
    display: flex;
    align-items: flex-end;
    flex-direction: row;
    justify-content: space-evenly;
    padding: 0;
}

.conteudo-principal__header-icons--container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 7.5px;
    width: 100%;
    box-sizing: border-box;
    gap: 0;
}

.conteudo-principal__header-icons--items {
    background: rgba(237, 255, 216, 0.5);
    width: 40px;
    height: 40px;
    padding: 7px;
    border: 0.5px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 1px 1px 8px rgb(93 93 93 / 50%);
    box-sizing: border-box;
    transition: box-shadow 0.5s ease-in-out;
}

.conteudo-principal__header-icons--items i {
    color: #fff;
}

.conteudo-principal__header-icons--items:hover {
    box-shadow: 1px 1px 8px rgb(255 255 255 / 100%);
}

/* Área de produtos */
.conteudo-principal__produtos {
    padding: 30px;
    grid-area: conteudo-principal__produtos;
}

.menu-fechar {
    display: none;
}

/* ===== MOBILE/TABLET (≤900px): apenas overrides necessários ===== */
@media (max-width: 1024px) {
    .conteudo-principal__produtos {
    padding: 5px;
    }

    /* Header empilhado */
    .conteudo-principal__header {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 0;
    }

    .conteudo-principal__header-icons {
        order: 1;
        justify-content: flex-end;
        padding: 12px 16px 0;
    }

    .conteudo-principal__header-icons--container {
        gap: 12px;
        /* chips com espaçamento */
        justify-content: flex-end;
    }

    .conteudo-principal__header-icons--items {
        width: 44px;
        height: 44px;
        padding: 8px;
    }

    /* .menu-overlay {
        display: block !important;
    } */


    /* Botão hambúrguer como chip */
    .btn-menu {
        position: static !important;
        display: inline-flex !important;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        background: rgba(237, 255, 216, .5);
        border: .5px solid #fff;
        color: #fff;
        box-shadow: 1px 1px 8px rgba(93, 93, 93, .5);
        backdrop-filter: blur(4px);
        cursor: pointer;
        z-index: 1;
    }

    /* Barra de busca ocupa 100% embaixo */
    .conteudo-principal__search-bar {
        order: 2;
        margin: 0;
        padding: 0 16px 12px;
        width: 100%;
    }

    .conteudo-principal__search-bar-container {
        border-radius: 999px;
        padding: 10px 14px;
    }

    /* Drawer (aside) no mobile) */
    .menu-lateral {
        position: fixed !important;
        top: 0;
        left: 0;
        height: 100dvh;
        width: min(78vw, 320px);
        transform: translateX(-100%) !important;
        /* fechado por padrão */
        transition: transform .25s ease;
        background: #2f7b49;
        box-shadow: 2px 0 18px rgba(0, 0, 0, .25);
        z-index: 999;
    }

    .menu-lateral.is-open {
        transform: translateX(0) !important;
        /* aberto */
    }

    .menu-lateral__conteiner {
        height: 100%;
        overflow-y: auto;
        padding: 20px 16px;
        border-right: .5px solid #fff;
    }

    .menu-fechar {
        position: absolute;
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        border-radius: 999px;
        border: .5px solid #fff;
        background: transparent;
        color: #fff;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Overlay aparece no mobile quando controlado no HTML/JS (remova [hidden]) */


    /* Grid principal sem coluna reservada para o aside */
    #conteiner {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }

    /* Garantia de exibição do aside */
    aside.menu-lateral {
        display: block !important;
    }
}

