body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  background: rgb(255, 255, 255);
  color: #ffffff;
}

.gallery-title {
  font-size: 42px;
  text-align: center;
  margin-top: 120px;
  margin-bottom: 30px;
  letter-spacing: 3px;
  color: #000000;
}

.merchandise-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.card {
  background: #ffffff;
  border-radius: 15px;
  padding: 15px;
  box-shadow: 0 0 10px rgba(0, 255, 213, 0.3);
  transition: transform 0.3s ease;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-5px);
}

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

.card h3 {
  margin-top: 10px;
  font-size: 20px;
}

.price-box {
  margin-top: 5px;
}

.price-original {
  text-decoration: line-through;
  color: #ff6666;
}

.price-discount {
  color: #00ffd5;
  font-weight: bold;
  margin-left: 10px;
}

/* Pop-up */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  overflow: auto; /* penting untuk scroll pop-up */
  padding: 20px; /* agar ada ruang saat konten melebihi tinggi */
}

.popup-box {
  background-color: #741577;
  padding: 20px;
  border-radius: 15px;
  width: 90%;
  overflow-y: auto; /* memungkinkan isi pop-up scroll ke bawah */
  max-width: 900px;
  box-shadow: 0 0 20px rgba(255, 4, 4, 0.5);
  animation: fadeIn 0.3s ease;
  position: relative;
}

.popup-content {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.popup-content img {
  width: 350px;
  border-radius: 10px;
  object-fit: cover;
}

.popup-details {
  flex: 1;
}

.popup-details h2 {
  color: #101010;
  margin-bottom: 10px;
}

.popup-details p {
  margin-bottom: 10px;
}

.btn-cart {
  padding: 10px 20px;
  background-color: #00ffd5;
  color: #000;
  border: none;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s ease;
}

.btn-cart:hover {
  background-color: #00ccaa;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  color: #fff;
  cursor: pointer;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
