@import url('variaveis.css');
@import url('skeleton.css');

*{
    box-sizing: border-box;
    border: 0;
    margin: 0;
    font-family: var(--font-principal);
}

body{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.menu-hamburguer,
.menu-mobile,
.overlay-mobile {
    display: none;
}

/*header*/

header{
    width: 100%;
    height: 10vh;

    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 11;

    position: fixed;
    top: 0;
    background-color: var(--cor-branco);
    opacity: 80%;
}

.header{
    width: 90%;
    height: 100%;

    display: flex;
    align-items: center;
    
}

.logo-section{
    display: flex;
    align-items: center;
    width: 5%;
    height: 100%;
}

.logo-section img{
    width: 50px;
    height:50px;
}

.categoria-section{
    width: 80%;
    height: 100%;

}

.categoria-section .menu-principal{
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.categoria-section a{
    text-decoration: none;
    color: var(--cor-preto);
    transition: 0.5s;
}

.categoria-section a:hover{
    color: var(--cor-vermelho-primario);
    transition: 0.5s;
}

.dropdown{
    position: relative;
}

.dropdown-btn{
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font: inherit;
    color: var(--cor-preto);
    transition: 0.5s;
}

.dropdown-btn:hover{
    color: var(--cor-vermelho-primario);
    transition: 0.5s;
}

.dropdown-btn img{
    width: 12px;
    transition: transform 0.3s ease;
}

.submenu{
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 150px;
    background: var(--cor-branco);
    list-style: none;
    padding: 10px 0;
    margin: 8px 0 0 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    z-index: 10;
    width: 100%;
}

.submenu li{
    padding: 8px 15px;
}

.submenu li:hover{
    background: var(--cor-cinza-hover);
}

.dropdown.ativo .submenu{
    display: block;
}

.dropdown.ativo .dropdown-btn img{
    transform: rotate(180deg);
}

.carrinho-section{
    width: 5%;
    height: 100%;

    display: flex;
    justify-content: center;
    align-items: center;
}

.usuario-section{
    color: var(--cor-preto);
    width: 20%;
    height: 100%;

    display: flex;
    justify-content: space-evenly;
    align-items: center;

    text-decoration: none;
    transition: 0.5s;


}

.usuario-section:hover{
    color: var(--cor-vermelho-primario);
    transition: 0.5s;
}

.carrinho-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* bolinha */
.badge-carrinho {
    position: absolute;
    top: -5px;
    right: -8px;

    background: var(--cor-vermelho-primario);
    color: var(--cor-branco);

    font-size: 12px;
    font-weight: bold;

    width: 20px;
    height: 20px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Produto indisponível no carrinho */
.item-carrinho-indisponivel {
    position: relative;
}

.item-carrinho-indisponivel .overlay-indisponivel-carrinho {
    position: absolute;
    inset: 0;
    background: rgba(180, 180, 180, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    border-radius: inherit;
}

.item-carrinho-indisponivel .overlay-indisponivel-carrinho span {
    background: rgba(0, 0, 0, 0.7);
    color: var(--cor-branco);
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 12px;
}

.item-carrinho-indisponivel .controle-qtd button {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/*main*/

main{
    width: 100%;
    height: 100%;
}

.carrossel-section{
    width: 100%;

    display: flex;
    justify-content: center;
    align-items: center;

    /* o cabeçalho é fixo (10vh): o carrossel começa logo abaixo dele */
    padding-top: 10vh;

}

/* A caixa segue a proporção dos banners (16:9) em vez de uma altura fixa:
   com altura de 100vh, em telas altas o object-fit: cover cortava mais da metade da imagem */
.carrossel-container{
    width: 90%;
    aspect-ratio: 16 / 9;
    max-height: 85vh;
    position: relative;

    display: flex;
    justify-content: center;
    align-items: center;
    
}

.carrossel{
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.slides{
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.5s ease;
}

/* flex-basis 100% fixa a largura do slide na largura da caixa: só com min-width o tamanho vinha
   do conteúdo, e o Safari/WebKit (todo navegador de iPhone) usava a largura real da imagem (ex. 1600px) */
.slide{
    flex: 0 0 100%;
    min-width: 100%;
    height: 100%;
}

.slide img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


.seta{
    width: 50px;
    height: 50px;

    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    border: none;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    cursor: pointer;

    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 10;
}

.seta img{
    width: 20px;
    height: 20px;
}

.seta-esquerda{
    left: 15px;
}

.seta-esquerda img{
    transform: rotate(180deg);
}

.seta-direita{
    right: 15px;
}

.seta:hover{
    background: rgba(255, 255, 255, 0.9);
}

.conteiner-cartao{
    padding-top: 5%;
}

.cartoes-section{
    padding-top: 2%;
    width: 100%;
    height: 100%;

    display: grid;
    grid-template-columns: repeat(3, 25%);
    justify-content: space-around;
    align-items: center;
    row-gap: 30px;
    
}

.titulo{
    width: 100%;
    height: 5vh;
    padding-left: 5%; 
    font-size: 20px;
    display: flex;
    align-items: end;
}


.cartao{
    position: relative;
    width: 100%;
    height: 75vh;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);

    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: column;
    margin-bottom: 15px;
    cursor: pointer;
}

.cartao.indisponivel {
    cursor: default;
}

.cartao.indisponivel .overlay-indisponivel {
    position: absolute;
    inset: 0;
    background: rgba(180, 180, 180, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    border-radius: inherit;
}

.cartao.indisponivel .overlay-indisponivel span {
    background: rgba(0, 0, 0, 0.7);
    color: var(--cor-branco);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
}

.cartao.indisponivel button {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.cartao.indisponivel .cartao-img {
    pointer-events: none;
}

.cartao-img{
    width: 100%;
    height: 50%;
}

/* Skeleton dos cards: mesmas proporções do .cartao real */
.cartao-skeleton .skeleton-img{
    width: 100%;
    height: 50%;
    border-radius: 0;
}

.cartao-skeleton .skeleton-titulo{
    width: 70%;
    height: 18px;
}

.cartao-skeleton .skeleton-preco{
    width: 40%;
    height: 8%;
}

.cartao-skeleton .skeleton-botao{
    width: 95%;
    height: 12%;
    margin-bottom: 2%;
    border-radius: 0;
}

.skeleton-slide{
    width: 100%;
    height: 100%;
    border-radius: 0;
}

.cartao-h1{
    display: flex;
    justify-content:center ;
    align-items: center;
    width: 100%;
    height: 5%;
    font-size: 0.8rem;
    text-align: center;
}

.cartao-valor{
    display: flex;
    justify-content:center ;
    align-items: center;
    width: 100%;
    height: 15%;
}


.cartao-valor p{
    color: var(--cor-verde-primario);
}

.cartao-valor h3{
    padding-left: 5px;
    font-size: 6vh;
}

.cartao-produtos{
    width: 100%;
    height: 30%;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 5px 30px;
}

.cartao-produtos h1{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    font-size: 15px;
}

.cartao-produtos ul {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex-wrap: wrap; 
  overflow: auto; 
  padding: 0;
}

.cartao-produtos ul li {
  background-color: var(--cor-cinza-hover);
  border-radius: 10px;
  padding: 5px;
  margin: 2px;
  list-style: none;
  flex-shrink: 0;
  font-size: 10px;
}

.conteiner-botões-kit{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 15%;
}

.add-carrinho-botao{
    background-color: transparent;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    width: 95%;
    height: 80%;
    cursor: pointer;
}

.add-carrinho-botao:hover{
    background-color: var(--cor-cinza-hover);
    transition: 0.5s;
}

.add-carrinho-botao img{
    width: 20px;
    height: 20px;
}

/*footer*/

footer{
    background-color: var(--cor-footer-fundo);
    width: 100%;
    height: 400px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
}

.redes-section{
    width: 30%;
    height: 10vh;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
}

.redes-section img{
    width: 1.5vw;
}

.navegacao-section, .navegacao-section a {
    width: 80%;
    height: 10vh;
    display: flex;
    justify-content: space-evenly;
    align-items: center;

    list-style-type: none;
    color: var(--cor-footer-texto);
    text-decoration: none;

}

.pagamentos-section{
    width: 50%;
    height: 10vh;
    display: flex;
    justify-content: space-evenly;
    align-items: start;
}

.pagamentos-section div{
    width: 7%;
    height: 50%;

    border: 0.5px solid var(--cor-footer-texto);

    display: flex;
    justify-content: center;
    align-items: center;
}

.pagamentos-section div img{
    width: 100%;
    height: 100%;
}

footer p{
    font-size: 15px;
    color: var(--cor-footer-texto);
}

/*Carrinho*/



/* botão que abre */
.abrir-carrinho {
    width: 50px;
    height: 50px;

    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}

.carrinho-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);

    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;

    z-index: 2;
}

/* carrinho lateral */
.carrinho-drawer {
    position: fixed;
    top: 0;
    right: 0;

    width: 400px;
    max-width: 90%;
    height: 100vh;
    background: var(--cor-branco);

    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.12);

    transform: translateX(100%);
    transition: transform 0.3s ease;

    z-index: 999;

    display: flex;
    flex-direction: column;
}

/* quando abrir */
.carrinho-drawer.ativo {
    transform: translateX(0);
}

.carrinho-overlay.ativo {
    opacity: 1;
    visibility: visible;
}

/* topo do carrinho */
.carrinho-topo {
    width: 100%;
    min-height: 80px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--cor-cinza-borda);
}

/* botão fechar */
.fechar-carrinho {
    width: 20%;
    height: 100%;
    border: none;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.fechar-carrinho img {
    width: 20px;
    height: 20px;
}

/* título */
.txtCarrinho {
    width: 80%;
    height: 100%;
    display: flex;
    align-items: center;
}

.txtCarrinho h1 {
    font-size: 24px;
    margin: 0;
}

/* área dos produtos */
.produto-carrinho {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}


.item-carrinho {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--cor-cinza-borda);
}

.item-carrinho-img {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.item-carrinho-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.item-carrinho-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.item-carrinho-info h3 {
    font-size: 16px;
    margin: 0;
}

.item-carrinho-info p {
    margin: 0;
    font-size: 14px;
}

.item-carrinho-info button{
    background-color: transparent;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.item-carrinho-info button:hover{
    background-color: var(--cor-cinza-borda);
    transition: 0.5s;
}

.item-carrinho-info button img{
    width: 20px;
}


.carrinho-vazio {
    font-size: 16px;
    text-align: center;
    margin-top: 30px;
}

.carrinho-login-aviso {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  gap: 20px;
  padding: 40px 20px;
}
.carrinho-login-aviso p {
  font-size: 18px;
  color: var(--cor-preto);
  margin: 0;
}
.btn-carrinho-login {
  display: inline-block;
  padding: 12px 32px;
  background: var(--cor-preto);
  color: var(--cor-branco);
  text-decoration: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: 0.3s;
}
.btn-carrinho-login:hover {
  background: var(--cor-cinza-texto-secundario);
}
.controle-qtd {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0;
}

.controle-qtd button {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    color: var(--cor-preto);
    border-radius: 6px;
    cursor: pointer;
}

.controle-qtd span {
    font-size: 16px;
    min-width: 20px;
    text-align: center;
}

.carrinho-rodape {
    width: 100%;
    padding: 20px;
    border-top: 1px solid var(--cor-cinza-borda);
    background: var(--cor-branco);
}

.total-carrinho {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 18px;
}

.btn-finalizar-pedido {
    width: 100%;
    height: 45px;
    border: none;
    background: transparent;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    color: var(--cor-preto);
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
}

.btn-finalizar-pedido:hover {
    background-color: var(--cor-cinza-hover);
    transition: 0.5s;
}


/* ===== RESPONSIVO — MOBILE (≤ 1000px) ===== */

@media (max-width: 1000px) {

    main{
        width: 100%;
        height: auto;
        min-height: 100vh;
    }
    
    /* Header */
    header {
        width: 100%;
        height: 10vh;
        display: flex;
        justify-content: center;
        align-items: center;
        
    }

    .header{
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .menu-mobile{
        order:0;
    }

    .logo-section {
        order:1;
        width: auto;
    }

    .categoria-section {
        display: none;
    }

    .carrinho-section{
        order:2;
    }

    .usuario-section {
        display: none;
    }

    /* Hamburger button */
    .menu-hamburguer {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-left: 0;
        background: none;
        border: none;
        cursor: pointer;
        color: var(--cor-preto);
    }

    /* Mobile nav panel */
    .menu-mobile {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        background: var(--cor-branco);
        flex-direction: column;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 2px 0 12px rgba(0, 0, 0, 0.12);
        overflow-y: auto;
    }

    .menu-mobile.ativo {
        transform: translateX(0);
    }

    /* Overlay */
    .overlay-mobile {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: 0.3s ease;
    }

    .overlay-mobile.ativo {
        opacity: 1;
        visibility: visible;
    }

    /* Mobile nav top */
    .menu-mobile-topo {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px;
        border-bottom: 1px solid var(--cor-cinza-borda);
    }

    .menu-mobile-topo .logo-section {
        width: auto;
        height: auto;
    }

    .menu-fechar {
        background: none;
        border: none;
        cursor: pointer;
        color: var(--cor-preto);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Mobile nav links */
    .menu-mobile-links {
        list-style: none;
        padding: 0;
        margin: 0;
        flex: 1;
    }

    .menu-mobile-links li {
        border-bottom: 1px solid var(--cor-cinza-hover);
    }

    .menu-mobile-links a {
        display: block;
        padding: 14px 20px;
        text-decoration: none;
        color: var(--cor-preto);
        font-size: 15px;
    }

    .menu-mobile-links a:hover {
        background: var(--cor-cinza-hover);
        color: var(--cor-vermelho-primario);
    }

    /* Mobile dropdown */
    .dropdown-mobile-btn {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 20px;
        background: none;
        border: none;
        cursor: pointer;
        font: inherit;
        font-size: 15px;
        color: var(--cor-preto);
    }

    .dropdown-mobile-btn:hover {
        background: var(--cor-cinza-hover);
        color: var(--cor-vermelho-primario);
    }

    .dropdown-mobile-btn svg {
        transition: transform 0.3s ease;
    }

    .dropdown-mobile.ativo .dropdown-mobile-btn svg {
        transform: rotate(180deg);
    }

    .submenu-mobile {
        display: none;
        list-style: none;
        padding: 0;
        background: var(--cor-off-white);
    }

    .dropdown-mobile.ativo .submenu-mobile {
        display: block;
    }

    .submenu-mobile li a {
        padding-left: 40px;
        font-size: 14px;
    }

    /* Mobile nav footer */
    .menu-mobile-footer {
        border-top: 1px solid var(--cor-cinza-borda);
        padding: 16px;
    }

    .menu-mobile-usuario {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px 20px;
        text-decoration: none;
        color: var(--cor-preto);
        border-radius: 8px;
    }

    .menu-mobile-usuario:hover {
        background: var(--cor-cinza-hover);
        color: var(--cor-vermelho-primario);
    }

    /* Carrossel */
    .carrossel-container {
        width: 92%;
    }

    .seta {
        width: 32px;
        height: 32px;
    }

    .seta img {
        width: 14px;
        height: 14px;
    }

    .seta-esquerda {
        left: 6px;
    }

    .seta-direita {
        right: 6px;
    }

    /* Kits */
    .conteiner-cartao {
        padding-top: 20%;
        width: 100%;
        height: 100%;
    }

    .cartoes-section {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        width: 100%;
        height: 100%;
    }

    .cartao {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-direction: column;
        width: 80%;
        height: 70vh;
    }

    .cartao-img {
        width: 100%;
        height: 45%;
    }

    .cartao-skeleton .skeleton-img {
        height: 45%;
    }

    .cartao h1{
        width: 90%;
        height: 10%;
        font-size: 1rem;
        text-align: center;
    }

    .cartao-valor{
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 10%;
    }

    .cartao-valor h3 {
        font-size: 5vh;
    }

    .cartao-produtos{
        width: 100%;
        height: 25%;
    }

    .cartao-produtos ul{
        width: 100%;
        height: 80%;
    }

    .cartao-produtos ul li{
        font-size: 12px;
    }

    .titulo {
        width: 100%;
        height: 5%;
    }

    .conteiner-botões-kit{
        width: 100%;
        height: 10%;
    }

    .add-carrinho-botao{
        width: 95%;
        height: 80%;
    }

    /* Footer */
    footer {
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
    }

    .redes-section {
        width: 80%;
        height: 150px;
    }

    .navegacao-section,
    .navegacao-section a {
        width: 100%;
        height: 100%;
        padding: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        font-size: 15px;
        padding-bottom: 20px;
    }

    .pagamentos-section {
        display: flex;
        justify-content: space-around;
        align-items: center;
        width: 90%;
        height: 100px;
    }

    .pagamentos-section div {
        width: 15%;
        height: 40%;
        padding: 0.5%;
        border: 0.5px solid var(--cor-footer-texto);
    }

    .pagamentos-section div img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    footer p{
        display: flex;
        justify-content: center;
        align-items: center;
        width: 90%;
        height: 100px;
        text-align: center;
    }
}

/* link do nome do produto no card (para o Google encontrar as páginas) */
.cartao-link {
    color: inherit;
    text-decoration: none;
}
