/* Estilos CSS completos para garantir funcionamento */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f8f8f8;
  color: #333;
  line-height: 1.6;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
}

.overlay.active {
  display: block;
}

/* Top Bar */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.search-container {
  position: relative;
  flex: 1;
  max-width: 500px;
  margin: 0 auto;
}

.search-container input {
  width: 100%;
  padding: 10px 40px 10px 15px;
  border: 1px solid #ddd;
  border-radius: 20px;
  font-size: 14px;
}

.search-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #777;
}

.icons {
  display: flex;
  gap: 15px;
  align-items: center;
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #555;
  display: flex;
  align-items: center;
  gap: 5px;
}

.icons i {
  font-size: 18px;
  cursor: pointer;
  color: #555;
}

.cart-count {
  background-color: #f5c5c5;
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 12px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-left: 5px;
}

/* Navegação por categoria */
.categoria-nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 20px;
  background-color: #fff;
  margin: 10px 0;
  flex-wrap: wrap;
}

.categoria-nav .item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.3s;
}

.categoria-nav .item:hover {
  transform: translateY(-5px);
}

.categoria-nav .item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 8px;
}

.categoria-nav .item p {
  font-size: 14px;
  color: #555;
}

/* Produtos */
main {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

main h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
  font-size: 24px;
}

.produtos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.produto-card {
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.produto-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.produto-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.produto-info {
  padding: 15px;
}

.produto-info h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

.produto-info p {
  color: #666;
  font-size: 14px;
  margin-bottom: 12px;
}

.produto-actions {
  display: flex;
  gap: 10px;
}

.btn-carrinho,
.btn-favorito {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
}

.btn-carrinho {
  background-color: #f5c5c5;
  color: white;
}

.btn-carrinho:hover {
  background-color: #f0a1a1;
}

.btn-favorito {
  background-color: #e0e0e0;
  color: #333;
}

.btn-favorito:hover {
  background-color: #d0d0d0;
}

/* Menu lateral */
.menu-lateral {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100vh;
  background-color: #fff;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease;
  z-index: 1000;
  padding: 20px;
  overflow-y: auto;
}

.menu-lateral.open {
  right: 0;
}

.close-menu-icon {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 24px;
  cursor: pointer;
}

.menu-lateral ul {
  list-style: none;
  margin-top: 40px;
}

.menu-lateral li {
  margin-bottom: 15px;
}

.menu-lateral a {
  text-decoration: none;
  color: #333;
  font-size: 16px;
  display: block;
  padding: 8px 0;
  transition: color 0.3s;
}

.menu-lateral a:hover {
  color: #b8860b;
}

/* Painéis */
.panel {
  position: fixed;
  top: 0;
  right: -350px;
  width: 350px;
  height: 100vh;
  background-color: #fff;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
  transition: right 0.3s ease;
  z-index: 1001;
  padding: 20px;
  overflow-y: auto;
}

.panel.open {
  right: 0;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.panel-close {
  font-size: 24px;
  cursor: pointer;
}

.cart-item,
.favorite-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.item-checkbox {
  margin-right: 10px;
}

.item-info {
  flex: 1;
}

.excluir-btn {
  background-color: #ff6b6b;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
}

.panel-actions {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.panel-btn {
  padding: 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.btn-remover {
  background-color: #ff6b6b;
  color: white;
}

/* Footer */
footer {
  background-color: #333;
  color: #fff;
  text-align: center;
  padding: 20px;
  margin-top: 40px;
}

footer p {
  margin: 5px 0;
}

/* Responsividade */
@media (max-width: 768px) {
  .categoria-nav {
    gap: 15px;
    padding: 15px 10px;
  }

  .categoria-nav .item img {
    width: 50px;
    height: 50px;
  }

  .produtos {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .panel {
    width: 300px;
  }
}

@media (max-width: 480px) {
  .top-bar {
    padding: 10px 15px;
  }

  .icons {
    gap: 10px;
  }

  .categoria-nav {
    gap: 10px;
  }

  .categoria-nav .item img {
    width: 40px;
    height: 40px;
  }

  .categoria-nav .item p {
    font-size: 12px;
  }

  .produtos {
    grid-template-columns: repeat(2, 1fr);
  }

  .panel {
    width: 100%;
    right: -100%;
  }
}