body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #fcfcfc;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 1rem 13.5rem;
  border-bottom: 1px solid #ddd;
  gap: 1rem;
}

.logo {
  font-family: "Leckerli One", cursive;
  font-size: 2rem;
  font-weight: 900;
  color: #ff3b30;
}

.search {
  flex: 1;
  min-width: 50px;
  margin-left: 2rem;
  margin-right: 10rem;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  border-radius: 8px;
  border: 1px solid #d4d4d4;
}

.sell-btn {
  background-color: #ff3b30;
  color: white;
  padding: 0.6rem 1rem;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-text {
  display: flex;
  align-items: center;
  gap: 6px;
}

.categories {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  background: #fffefe;
  padding: 1rem 2rem;
  border-bottom: 1px solid #eee;
}

.categories button {
  color: #333;
  background-color: #eeffea;
  border: 1px solid #ccc;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.categories button:hover {
  background-color: #d8fdc7;
  border-color: #93e273;
}

.wrapper {
  max-width: 1300px;
  margin: 2rem auto;
  padding: 1rem;
}

.btns {
  display: flex;
  gap: 10px;
}

button {
  background-color: #ff3b30;
  margin-left: 1rem;
  color: white;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

button:hover {
  background-color: #f13228;
}

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.7rem;
  margin-top: 1rem;
}

@media (max-width: 600px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.product-card {
  position: relative;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border 0.3s ease;
}

.product-card.deal {
  border: 3px solid green;
}

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: #f2f2f2;
}

.product-card .info {
  padding: 1rem;
}

.product-card .info strong {
  display: block;
  color: #333;
  font-size: 0.9rem;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card .desc {
  margin-top: 4px;
  font-size: 0.8rem;
  color: #585858;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card .info small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.product-card .price {
  font-size: 1.4rem;
  font-weight: bold;
  color: #333;
}

.product-card .badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background-color: green;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
  z-index: 1;
}

.delete-btn {
  margin-top: 0.8rem;
  background-color: #c00;
}

.delete-btn:hover {
  background-color: #900;
}

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

.modal-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 1.5rem;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.add-form input {
  width: 80%;
  margin-bottom: 1rem;
  margin-left: 1rem;
  padding: 0.7rem;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.modal-content .close {
  float: right;
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
  cursor: pointer;
}

.modal-content .close:hover {
  color: #ff3b30;
}
