/* Reset e base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: Arial, sans-serif;
  /*background: #111; */
   background: lightgray;
  color: #fff;
  
  text-align: center;
  overflow-x: hidden;
}

/* Header dinâmico */
header {
  /*background: #000;*/
    background: lightgray;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#dynamic-header {
  font-size: 3.3rem;
  transition: opacity 0.5s;
}

/* Loading screen */
#loading-screen {
  position: fixed;
  inset: 0;
  /*background: #000;*/
  background: gray;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

/* Menu */
.menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
 /* background: #222;*/
  background: gray;
  padding: 10px 0;
}
.menu a {
  color: #fff;
  text-decoration: none;
  margin: 0 8px;
  padding: 8px 12px;
  font-size: 14px;
}
.menu a:hover {
  background: #444;
  border-radius: 4px;
}

/* Carrossel */
.carousel-container {
  width: 100%;
  overflow: hidden;
  /*background: #222;*/
  background: gray;
  margin: 20px 0;
}
.carousel {
  display: flex;
  gap: 10px;
  will-change: transform;
  padding: 10px; 
}
.carousel-item {
  flex: 0 0 auto;
  text-align: center;
  width: 150px;
}
.carousel-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  display: block;
  margin: 0 auto;
}
.carousel-item p {
  margin: 8px 0 0;
  font-size: 12px;
  color: #fff;
}


.filter-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
  flex-wrap: wrap;
}
.filter-container select,
.filter-container input {
  padding: 8px;
  font-size: 14px;
  border-radius: 4px;
  border: none;
  width: 200px;
  max-width: 90%;
}

/* Produtos */
#resultado {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  padding-bottom: 20px;
}
.product {
  background: #222;
  border-radius: 8px;
  overflow: hidden;
  width: 200px;
  text-align: center;
}
.product img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-bottom: 1px solid #333;
}
.product p {
  margin: 10px 0;
  font-size: 14px;
  color: #fff;
}

/* Media queries gerais até 600px */
@media (max-width: 600px) {
  #dynamic-header { font-size: 2rem; }
  .carousel-item { width: 120px; }
  .carousel-item img { height: 160px; }
  .product { width: 140px; }
  .product img { height: 180px; }
  .product p { font-size: 12px; }
  .filter-container { flex-direction: column; align-items: center; }
}

/* Media queries específicas para telas pequenas */
@media (max-width: 400px) {
  #dynamic-header { font-size: 1.8rem; }
  .carousel-item { width: 110px; }
  .carousel-item img { height: 150px; }
  .product { width: 130px; }
  .product img { height: 170px; }
  .menu a { font-size: 13px; padding: 6px 10px; }
}

@media (max-width: 384px) {
  #dynamic-header { font-size: 1.7rem; }
  .carousel-item { width: 100px; }
  .carousel-item img { height: 140px; }
  .product { width: 120px; }
  .product img { height: 160px; }
  .menu a { font-size: 12px; padding: 6px 8px; }
}

@media (max-width: 360px) {
  #dynamic-header { font-size: 1.6rem; }
  .carousel-item { width: 95px; }
  .carousel-item img { height: 130px; }
  .product { width: 110px; }
  .product img { height: 150px; }
  .menu a { font-size: 12px; padding: 5px 7px; }
}

@media (max-width: 320px) {
  #resultado {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .product {
    width: 100%;
  }

  .product img {
    width: 100%;
    height: 120px; 
    object-fit: cover;
  }

  .product p {
    font-size: 12px;
  }

.carousel {
  display: flex;
  gap: 40px; 
  will-change: transform;
}

}
