/* ========================= */
/* VARIÁVEIS E RESET         */
/* ========================= */
:root {
    --verde-principal: #267e68;
    --verde-claro: #6ab992;
    --fundo: #f6f9fc;
    --rosa-acento: #e07a8c;
    --texto: #267e68;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ========================= */
/* BASE                      */
/* ========================= */
body {
    font-family: 'Nunito', sans-serif;
    background: var(--fundo);
    color: var(--texto);
    padding-top: 96px;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: auto;
}

/* ========================= */
/* ACESSIBILIDADE            */
/* ========================= */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

:focus-visible {
    outline: 3px solid var(--rosa-acento);
    outline-offset: 3px;
}

/* ========================= */
/* HEADER                    */
/* ========================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #267e68;
    border-bottom: 2px solid #eee;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

/* ========================= */
/* LOGO                      */
/* ========================= */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #2f2f2f;
}

.logo img {
    height: 64px;
    width: auto;
}

/* ========================= */
/* MENU DESKTOP              */
/* ========================= */
.nav-list {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-list a {
    text-decoration: none;
    font-weight: 600;
    color: #2f2f2f;
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
    color: var(--rosa-acento);
}

/* ========================= */
/* HAMBURGUER                */
/* ========================= */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 1002;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* animação X ao abrir */
.hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* DROPDOWN MOBILE */
.nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #267e68;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 999;
    flex-direction: column;
    padding: 8px 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.nav-dropdown.open {
    display: flex;
}

.nav-dropdown li {
    list-style: none;
}

.nav-dropdown a {
    display: block;
    padding: 14px 24px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.2s;
}

.nav-dropdown a:hover,
.nav-dropdown a[aria-current="page"] {
    background: rgba(255, 255, 255, 0.1);
    color: var(--rosa-acento);
}

/* ========================= */
/* SEÇÃO MATERIAIS           */
/* ========================= */
.produtos-fullscreen {
    padding: 160px 20px 80px;
    background: var(--fundo);
    min-height: 100vh;
}

.section-title {
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-size: 2.2rem;
    margin-bottom: 30px;
    color: var(--verde-claro);
    font-weight: 700;
}

/* ========================= */
/* BUSCA                     */
/* ========================= */
.busca-container {
    text-align: center;
    margin-bottom: 40px;
}

#buscaProdutos {
    width: 100%;
    max-width: 420px;
    padding: 12px 20px;
    font-size: 1rem;
    border-radius: 25px;
    border: 2px solid var(--verde-principal);
    outline: none;
    transition: all 0.3s ease;
}

#buscaProdutos:focus {
    border-color: var(--rosa-acento);
    box-shadow: 0 0 8px rgba(255, 64, 129, 0.25);
}

/* ========================= */
/* FILTROS                   */
/* ========================= */
.filtros-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
}

.btn-filtro {
    padding: 10px 20px;
    border-radius: 30px;
    border: 2px solid var(--verde-principal);
    background: white;
    color: var(--verde-principal);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-filtro:hover {
    background: var(--verde-principal);
    color: white;
    transform: translateY(-2px);
}

.btn-filtro.active {
    background: linear-gradient(135deg, var(--verde-principal), var(--verde-claro));
    border-color: var(--verde-principal);
    color: white;
    box-shadow: 0 6px 15px rgba(38, 126, 104, 0.3);
}

/* ========================= */
/* GRID DE PRODUTOS          */
/* ========================= */
.produtos-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    justify-items: center;
    padding: 0 10px;
}

/* ========================= */
/* CARD DE PRODUTO           */
/* ========================= */
.produto-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 240px;
}

.produto-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.15);
}

.produto-card img {
    width: 100%;
    border-radius: 14px;
    background: #f0f0f0;
    min-height: 150px;
    object-fit: cover;
}

.produto-sem-imagem {
    width: 100%;
    min-height: 150px;
    background: #f0f4f8;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #ccc;
}

.produto-card h4 {
    font-family: 'Poppins', sans-serif;
    color: var(--verde-claro);
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 5px;
}

.produto-card .categoria {
    font-size: 0.95rem;
    color: #555555;
    min-height: 45px;
}

.produto-card .preco {
    font-weight: 700;
    font-size: 1rem;
    color: var(--rosa-acento);
}

/* ========================= */
/* BOTÕES DOS CARDS          */
/* ========================= */
.btn,
.btn a {
    text-decoration: none;
}

.btn-amostra,
.btn-comprar {
    font-size: 0.95rem;
    padding: 10px 18px;
    width: 100%;
    border-radius: 25px;
    cursor: pointer;
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-amostra {
    background: transparent;
    border: 2px solid var(--verde-principal);
    color: var(--verde-claro);
}

.btn-amostra:hover {
    background: var(--verde-principal);
    color: white;
}

.btn-comprar {
    background: var(--rosa-acento);
    color: white;
    margin-top: 8px;
}

.btn-comprar:hover {
    background: #d96a78;
}

/* ========================= */
/* MODAL                     */
/* ========================= */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.modal-content {
    position: relative;
    z-index: 2;
    max-width: 650px;
    width: 90%;
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
}

.modal img {
    width: 100%;
    border-radius: 10px;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 26px;
    background: none;
    border: none;
    cursor: pointer;
}

.modal-sem-amostra {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    color: var(--verde-principal);
    text-align: center;
}

.modal-sem-amostra span {
    font-size: 3rem;
}

.modal-sem-amostra p {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
}

.modal-sem-amostra small {
    font-size: 0.95rem;
    color: #777;
}

/* ========================= */
/* CARRINHO ÍCONE            */
/* ========================= */
.carrinho-icon {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--verde-principal);
    color: white;
    padding: 10px 15px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    z-index: 1001;
    border: none;
}

.carrinho-icon span {
    background: white;
    color: var(--verde-principal);
    padding: 2px 7px;
    border-radius: 50%;
    margin-left: 5px;
    font-size: 0.8rem;
}

/* ========================= */
/* OVERLAY CARRINHO          */
/* ========================= */
.carrinho-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    z-index: 998;
}

.carrinho-overlay.active {
    display: block;
}

/* ========================= */
/* CARRINHO LATERAL          */
/* ========================= */
.carrinho {
    position: fixed;
    top: 0;
    right: -400px;
    width: 350px;
    height: 100vh;
    background: #fff;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.carrinho.active {
    right: 0;
}

.carrinho-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    font-weight: bold;
}

.carrinho-itens {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.carrinho-item {
    background: #f9f9f9;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 12px;
}

.carrinho-item strong {
    display: block;
    margin-bottom: 5px;
}

.carrinho-item p {
    margin: 0;
    font-size: 14px;
}

.carrinho-item button {
    margin-top: 8px;
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
}

.carrinho-footer {
    padding: 20px;
    border-top: 1px solid #eee;
}

#fecharCarrinho {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    border: none;
    background: #f2f2f2;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

#fecharCarrinho:hover {
    background: #e74c3c;
    color: #fff;
    transform: rotate(90deg);
}

.btn-finalizar {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-finalizar:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(39, 174, 96, 0.3);
}

.btn-finalizar:active {
    transform: scale(0.98);
}

/* ========================= */
/* FOOTER                    */
/* ========================= */
.footer {
    text-align: center;
    padding: 20px;
}

/* ========================= */
/* MEDIA QUERIES             */
/* ========================= */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }

    /* header compacto em linha */
    .header-content {
        padding: 12px 16px;
        position: relative;
    }

    .logo img {
        height: 44px;
    }

    /* esconde menu desktop, mostra hamburguer */
    .nav-list {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    /* carrinho desloca para não cobrir o hamburguer */
    .carrinho-icon {
        top: 14px;
        right: 56px;
        padding: 7px 11px;
        font-size: 0.8rem;
    }

    .produtos-list {
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .produto-card {
        max-width: 100%;
    }

    .btn-filtro {
        font-size: 0.8rem;
        padding: 8px 14px;
    }
}
