@import url('https://fonts.cdnfonts.com/css/open-sauce-one');
@import url('https://fonts.cdnfonts.com/css/brasika-display-trial');
@import url('https://fonts.cdnfonts.com/css/livvic');
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}



.app{
    color: #cd8df4;
    display: grid;
    grid-template-rows: auto 1fr auto;
    grid-template-areas: 
        "header"
        "main"
        "footer";
    min-height: 100vh;
}

main {
  background-color: #fff5e9;
  display: flex;
  flex-direction: column;  /* empilha verticalmente */
  align-items: center;     /* centraliza horizontalmente */
  min-height: 80vh;  
  padding: 2%;
  grid-area: main;
}

header{
    grid-area: header;   
}

figure{
    text-align: center;
}

a {
    text-decoration: none; 
    color: inherit; 
} 

.introducao,.detalhes p{
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px auto; 
    line-height: 1.6;
    font-size: 18px;
    max-width: 1000px;
    justify-content: center;
    text-align: justify; 
}

.introducao  {
    color: #929191;;
}

.logo {
    background-color: #fff5e9;
    height: 100px;
    width: 100%;
    display: flex;
    justify-content: flex-start; /* Logomarca à esquerda */
    align-items: center;
    position: relative;
}

/* Contêiner da logomarca */
.logomarca-container {
    position: absolute; /* Posiciona a logomarca à esquerda */
    left: 20px; /* Ajuste conforme necessário */
	opacity: 0;          /* Inicialmente invisível */
    animation: surgir-fade 2s ease-in forwards; /* Animação de fade */
	margin-top: -25px; /* Ajuste de margem superior para subir a imagem */
}

/* Logomarca */
.logomarca {
    height: 70px;
    width: auto;
    max-height: 70px;
}

/* Contêiner do logotipo */
.logotipo-container {
    position: absolute;  /* Centraliza a div do logotipo */
    left: 50%;           /* Centraliza horizontalmente */
    transform: translateX(-50%);
    opacity: 0;          /* Inicialmente invisível */
    animation: surgir-fade 2s ease-in forwards; /* Animação de fade */
	margin-top: -25px; /* Ajuste de margem superior para subir a imagem */
}

/* Logotipo */
.logotipo {
    height: 70px;
    width: auto;
    max-height: 70px;
}

/* Animação para o logotipo surgir sem afetar o posicionamento */
@keyframes surgir-fade {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

header img{
    height: 80%;                 
    max-height: 100px;           
    margin-left: 15px; 
    padding: 1%;
}
  
.perfil {
    background-color: #cd8df4;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    padding: 0 20px;
    box-shadow: rgba(0, 0, 0, 0.205) 0px 3px 10px;
    position: relative;
    z-index: 2;
}

.perfil img {
    height: 40px;  /* tamanho consistente */
    width: auto;
    cursor: pointer;
    display: block;
}


h1, h2, h3{
    text-align: center;
}

h1{
    font-family: 'Open Sauce One', sans-serif;
    font-size: 32px;
    font-weight: 800;
}
h2, h3, a, label, button{
    font-family: 'Open Sauce One', sans-serif;
}
li, p, span, figcaption{
    font-family: 'Livvic', sans-serif; 
}



thead th{
    background-color: #cd8df4;
    color: #fff5e9;
    padding: 1%;
}

tbody td{
    background-color: #fff;
    color:#cd8df4;
}

button{
  cursor: pointer;
}

input, select, textarea, button{
    border: none;
    border-radius: 10px;
    font-family: 'Open Sauce One', sans-serif;
}

input::placeholder {
    text-align: center;
}

.dropdown:hover .login {
    content: url("../assets/loginhover.png"); /* Troca a imagem do login ao passar o mouse */
}


.carrinho:hover {
    content: url("../assets/carrinhohover.png"); /* Troca a imagem do login ao passar o mouse */
}

.preload {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.preload::after {
  content: url("../assets/loginhover.png") url("../assets/carrinhohover.png");
}

.dropbtn {
    background-color: transparent; 
    color: white;
    font-size: 1.5rem;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.icones {
    display: flex;
    align-items: center;
    gap: 20px; /* espaço entre login e carrinho */
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content{
  border-radius: 0px 20px 20px 20px;
}

.dropdown-content, .dropdown-content-r {
  display: none;
  position: absolute;
  background-color: #dfadec;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
}

.dropdown-content-r {
  right: 0;
  border-radius: 20px 20px 20px 20px;
}

.dropdown-content a, .dropdown-content-r a {
  color: white;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover, .dropdown-content-r a:hover {
  background-color: #e5c3ee;
  border-radius: 20px 20px 20px 20px;
}

.dropdown:hover .dropdown-content , .dropdown:hover .dropdown-content-r {
  display: block;
}

.dropdown:hover .dropbtn {
  background-color: #dfadec;
  border-radius: 10px 10px 0px 0px;
}


footer {
  background-color: #cd8df4;
  color: #fff5e9;
  padding: 40px 20px;
  grid-area: footer;
  box-shadow: rgba(0, 0, 0, 0.205) 0px -3px 10px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.footer-section {
  flex: 1 1 200px;
  margin-bottom: 20px;
}

.footer-logo-img {
  width: 150px;
  height: auto;
}

footer p {
  font-size: 14px;
  margin-top: 10px;
  line-height: 1.5;
}

footer h3 {
  color: #fff5e9;
  margin-bottom: 10px;
  white-space: nowrap; /* evita quebra do título */
  text-align: left;
}

.footer-institucional ul {
  list-style: none;
  padding: 0;
  font-size: 14px;
  line-height: 1.6;
}

.footer-institucional ul li {
  margin-bottom: 6px;
}

.footer-institucional ul li a,
.footer-contato a {
  color: #eee;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-institucional ul li a:hover,
.footer-contato a:hover {
  color: mediumorchid;
}

.footer-contato p {
  font-size: 14px;
  margin: 5px 0;
}

.pix-logo {
  width: 60px;
  height: auto;
  border: 1px solid #c9c8c8; 
  border-radius: 10px; /* opcional: cantos arredondados */
  box-sizing: border-box; /* garante que padding não aumente o tamanho total */
}


/* ---------------- RESPONSIVIDADE ---------------- */
@media (max-width: 1024px) {
    .logomarca { height: 65px; }
    .logotipo { height: 65px; }
    .perfil img { height: 35px; }
}

@media (max-width: 768px) {
    .logo { height: 80px; }
    .logomarca { height: 60px; }
    .logotipo { height: 60px; }
    .icones { gap: 15px; }
    .perfil img { height: 30px; }

    main { padding: 5%; font-size: 16px; }
    table { font-size: 14px; }
    .footer-container { flex-direction: column; align-items:left; text-align: left; }
    .footer-section { flex: 1 1 100%; }
}

@media (max-width: 480px) {
    .logo { height: 70px; }
    .logomarca { height: 50px; }
    .logotipo { height: 50px; }
    .icones { right: 10px; gap: 10px; }
    .perfil img { height: 28px; }

    h1 { font-size: 24px; }
    h2 { font-size: 20px; }
    p, table, footer p { font-size: 12px; }
    .footer-logo-img { width: 120px; }
}

html {
  -webkit-text-size-adjust: 100%; /* Safari iOS */
  -ms-text-size-adjust: 100%;     /* IE Mobile */
  text-size-adjust: 100%;
}

/* Em telas pequenas garante fonte >=16px para evitar auto-zoom do iOS quando um elemento recebe foco */
@media (max-width: 480px) {
  body,
  table,
  thead th,
  tbody td,
  a,
  button,
  input,
  select,
  textarea,
  .btn-table a,
  .qtde-num,
  .btn-qtd {
    font-size: 16px !important;
    line-height: 1.2;
  }

  /* mantém rolagem suave para tabelas */
  .table-wrapper {
    -webkit-overflow-scrolling: touch;
    min-width: unset !important;
    width: 100% !important;
  }
}

html, body {
  overflow-x: hidden; /* Bloqueia rolagem horizontal global */
  width: 100%; /* Garante que o body ocupe 100% da largura da tela */
  margin: 0; /* Remove margens que podem causar overflow */
  padding: 0;
}
/* Mantém rolagem vertical normal, mas bloqueia horizontal */
body {
  overflow-y: auto; /* Permite rolagem vertical se necessário */
}
/* Garante que o main e containers internos não causem overflow */
main {
  width: 100vw; /* Usa viewport width para se ajustar à tela */
  max-width: 100vw; /* Limita ao máximo da tela */
  box-sizing: border-box;
}
/* A tabela wrapper já tem overflow-x: auto, mas reforça */
.table-wrapper {
  overflow-x: auto; /* Permite rolagem horizontal apenas aqui */
  overflow-y: hidden; /* Bloqueia vertical na tabela, se necessário */
  width: 100%; /* Fluido dentro do container */
  -webkit-overflow-scrolling: touch; /* Rolagem suave no iOS */
}
