* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    list-style: none;
    font-family: "Montserrat", sans-serif;
}

body {
    background-image: linear-gradient(circle, #000030, #0131708a);
    background-color: #000030;
    color: #fff;    
}

/* Estilo para o menu hambúrguer */
.hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1000;
}

.hamburger-menu .bar {
    width: 30px;
    height: 3px;
    background-color: #fff;
    margin: 6px 0;
    transition: 0.4s;
}

header {
    max-width: 100%;
    margin: 0% 5%;
    align-items: center;
    justify-content: space-between;
    display: flex;

}

header img {
    max-width: 100%;
    width: 250px;
    height: auto;
    display: block;

}

nav ul {
    display: flex;
    gap: 50px;
    text-decoration: none;
}

nav ul li a {
    cursor: pointer;
    text-decoration: none;
    font-weight: bold;
    color: #fff;
    transition: all 0.3s ease-in-out;
    position: relative;
}

header nav ul li a::after {
    content: '';
    position: absolute;
    left: 0px;
    top: 25px;
    width: 0;
    height: 2px;
    background-color: #00f7ff;
    transition: all 0.3s ease;

}

header nav ul li a:hover {
    color: #00f7ff;
}

header nav ul li a:hover::after {
    width: 100%;

}

/* ========================================================= */
/* ESTILOS DA NAV (DROPDOWN DESKTOP) - GÊNERO */
/* ========================================================= */
.nav-item-produtos {
    position: relative; 
}

/* Estilos gerais do submenu de gênero (servem como dropdown desktop e submenu mobile) */
.filtro-mobile-submenu {
    display: none; /* Escondido por padrão */
    position: absolute;
    top: 100%; 
    right: 0; /* Alinha o dropdown à direita no desktop */
    z-index: 10; 
    min-width: 180px;
    background-color: #000030;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    border: 1px solid #00f7ff;
    padding: 5px 0;
    flex-direction: column; 
    align-items: flex-start;
    gap: 0;
}

/* Classe controlada pelo JS para exibir o dropdown no desktop */
.nav-item-produtos.open > .filtro-mobile-submenu {
    display: flex; 
}

/* Estilos dos links dentro do dropdown (Desktop) */
.filtro-mobile-submenu li {
    width: 100%;
}

.filtro-mobile-submenu li a {
    padding: 8px 15px;
    display: block;
    text-align: left; /* Mantém o texto alinhado à esquerda dentro do dropdown desktop */
    white-space: nowrap; 
    font-weight: normal;
    transition: background-color 0.3s, color 0.3s;
}

/* Estilos de hover/ativo específicos do dropdown (Desktop) */
.filtro-mobile-submenu li a:hover,
.filtro-mobile-submenu li a.ativo {
    background-color: #00f7ff;
    color: #000030;
    font-weight: bold;
}

/* Desativa a linha de hover no link 'Produtos' quando o dropdown está aberto/ativo */
.nav-item-produtos.open > a::after {
    width: 0 !important;
}

/* Esconde sub-submenus (Categorias) no desktop - O !important aqui impede a exibição no mobile */
.filtro-mobile-sub-submenu {
    display: none !important;
}


/* ========================================================= */
/* ESTILOS PARA PÁGINA DE PRODUTOS (Geral) */
/* ========================================================= */

.produtos-container {
    max-width: 100%;
    margin: 40px auto;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* ---------------- Filtros DESKTOP (Botões de Categoria) ---------------- */

.filtro-horizontal-container {
    display: flex;
    justify-content: center; 
    align-items: center;
    margin-top: 10px;
    margin-bottom: 15px; 
    padding: 10px 0;
}

.lista-filtros-horizontal {
    display: flex; 
    padding-left: 0;
    margin: 0;
    gap: 15px; 
    flex-wrap: wrap; 
}

.lista-filtros-horizontal li {
    margin: 0;
}

.lista-filtros-horizontal a {
    color: #fff;
    text-decoration: none;
    display: block;
    padding: 10px 20px;
    border: 1px solid #00f7ff;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-weight: 500;
    background-color: #0131704d;
    text-transform: uppercase;
    font-size: 0.9em;
}

.lista-filtros-horizontal a:hover {
    background-color: #00f7ff;
    color: #000030;
}

.lista-filtros-horizontal a.ativo {
    background-color: #00f7ff;
    color: #000030;
    font-weight: bold;
    border-color: #00f7ff;
    transform: translateY(-2px);
}

/* ---------------- Seção de Produtos (Grid Principal) ---------------- */

.secao-produtos {
    flex-grow: 1;
}

.secao-titulo {
    font-size: 4.5em;
    color: #fff;
    margin: 15px 5% 10px 5%;
    text-align: center;
    border-bottom: 3px solid #00f7ff;
    padding-bottom: 20px;
}

/* Configuração do Grid: 5 itens por linha */
.produtos-grid {
    display: grid;    
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-top: 2%;
    margin-bottom: 50px;
    margin-left: 5%;
    margin-right: 5%;
}

.produto-card {
    background-color: #0131704d;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease, opacity 0.5s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.produto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 247, 255, 0.4);
}

.produto-card.hidden {
    display: none;
    opacity: 0;
}

.produto-card img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 15px;
}

.produto-card h3 {
    font-size: 1.3em;
    margin-bottom: 8px;
    min-height: 40px;
}

.produto-card .preco {
    color: #00f7ff;
    font-weight: bold;
    font-size: 1.5em;
    margin-bottom: 20px;
}

.produto-card .btn-detalhes {
    display: inline-block;
    background-color: #00f7ff;
    color: #000030;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.produto-card .btn-detalhes:hover {
    background-color: #fff;    
}

hr {    
    margin-left: 5%; 
    margin-right: 5%;
    width: 90%;
    border: none;
    height: 3px;
    background-color: #00f7ff;    
    margin-top: 40px; 
    margin-bottom: 40px;
}

footer {
    margin-top: 50px;
    bottom: 0;
    max-width: 100%;
    height: 60px;
    background-color: transparent #000030;
    color: #fff;
    align-items: center;
    justify-content: center;
    display: flex;
}

/* ========================================================= */
/* MEDIA QUERY PARA MOBILE (MAX-WIDTH: 768PX) */
/* ========================================================= */
@media (max-width: 768px) {
    
    /* Configuração do menu lateral */
    header nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 70%;
        height: 100%; 
        background-color: #000030;
        padding-top: 60px;
        z-index: 999;
        flex-direction: column;
        align-items: center;
        transition: transform 0.3s ease-in-out;
        transform: translateX(100%);
        overflow-y: auto; 
    }

    header nav.active {
        display: flex;
        transform: translateX(0);
    }

    /* Alinha todos os itens principais do menu à direita */
    header nav ul {
        margin: 20px 0;
        flex-direction: column;
        align-items: flex-end; /* ALINHAMENTO PRINCIPAL À DIREITA */
        margin-right: 60px;
        width: 100%;
        gap: 20px;
    }

    /* Esconde os filtros DESKTOP (Horizontal) no mobile */
    .filtro-horizontal-container {
        display: none; 
    }
    
    .hamburger-menu {
        display: block;
    }

    .produtos-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 15px;
        margin-left: 5%;
        margin-right: 5%;
    }

    .secao-titulo {
        font-size: 1.8em;
    }

    /* ---------------- ESTILOS DO SUBMENU DE FILTROS MOBILE (GÊNERO) ---------------- */

    /* Garante que o item de lista dos Produtos ocupe 100% da largura da nav para que o submenu fique alinhado */
    .nav-item-produtos {
        width: 100%;
        text-align: right;
    }
    
    /* Sobrescreve estilos de dropdown para o comportamento de submenu mobile */
    .filtro-mobile-submenu {
        position: static; /* Volta para o fluxo normal do menu mobile */
        box-shadow: none;
        border: none;
        min-width: auto;
        padding: 0;
    }
    
    /* Quando ativo, exibe o submenu de GÊNEROS */
    #filtro-genero-nav.active {
        display: flex;
        flex-direction: column;
        align-items: flex-end; /* Garante que o bloco fique alinhado à direita */
        width: 100%;
        padding-right: 30px; /* Recuo visual para o submenu de GÊNEROS */
        margin-top: 10px;
    }

    /* Estiliza os links do submenu de GÊNERO (1º nível) */
    .filtro-mobile-submenu li a {
        background-color: transparent;
        border: none;
        color: #00f7ff; 
        padding: 5px 0;
        text-transform: none;
        font-weight: normal;
        font-size: 0.9em;
        transition: none;
        text-align: right; 
        display: block; 
        width: 100%;
    }

    .filtro-mobile-submenu a:hover,
    .filtro-mobile-submenu a.ativo {
        color: #fff;
        font-weight: bold;
    }

    /* ---------------- ESTILOS DO SUB-SUBMENU MOBILE (CATEGORIA) ---------------- */
    
    .nav-item-genero {
        width: 100%;
    }

    .filtro-mobile-sub-submenu {
        display: none; /* ESCONDIDO por padrão */
        width: 100%;
        padding-top: 5px;
        padding-bottom: 5px;
        flex-direction: column;
        align-items: flex-end; /* Alinha o bloco das categorias à direita */
    }

    .filtro-mobile-sub-submenu li {
        width: 100%;
    }
    
    .filtro-mobile-sub-submenu a {
        color: #00f7ff80; /* Cor mais clara para o sub-submenu */
        padding: 3px 0;
        font-size: 0.8em; /* Fonte menor para aninhamento */
        text-align: right; 
    }

    .filtro-mobile-sub-submenu a:hover,
    .filtro-mobile-sub-submenu a.ativo {
        color: #fff;
        font-weight: bold;
    }
    
    /* CORREÇÃO: Classe adicionada pelo JS para mostrar o sub-submenu com prioridade máxima */
    .filtro-mobile-sub-submenu.active {
        display: flex !important; /* CORREÇÃO APLICADA AQUI */
        padding-right: 30px; /* Mais recuo visual para o sub-submenu */
    }
}