* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", sans-serif;
}
body {
  background: #f5f5f5;
  color: #333;
}

.categories-wrapper {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 100;
  padding: 5px 6px;
  border-bottom: 1px solid #eee;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.categories {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  grid-template-rows: repeat(2, 33px);
  height: 70px;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 4px;
  padding-bottom: 4px;
}

.categories button {
  height: 100%;
  padding: 0 10px;
  border: none;
  border-radius: 10px;
  white-space: nowrap;
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.categories::-webkit-scrollbar {
  display: none;
}

.categories button.active {
  background: linear-gradient(135deg, #00c6ff, #0072ff);
  box-shadow: 0 4px 10px rgba(0, 114, 255, 0.35);
}
#gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 15px;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-width: 0;
  border: 4px solid;
  border-radius: 10px;
  padding: 5px;
}

#gallery img {
  width: 100%;
  border-radius: 8px;
  cursor: pointer;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  object-fit: contain;
  aspect-ratio: 1 / 1;
}

#modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 200;
  cursor: zoom-out;
}
#modal img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.card p {
  font-weight: bold;
  color: #fff;
  background: #32c732;
  border-radius: 6px;
  padding: 4px 6px;
  margin-top: 6px;
  font-size: 16px;
  text-align: center;
  width: 100%;
}
