/* Reset dan base styles */
html {
  scroll-behavior: smooth;
}

body {
  background-image: url(microcenter\ inside.jpg);
  background-size: cover;
  background-attachment: fixed;
  margin: 0;
  padding: 0;
  font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;
}

/* Products section styles */
.items {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  padding: 40px 20px;
  perspective: 1000px;
}

.item {
  display: flex;
  flex-direction: column;
  background-color: rgba(217, 245, 255, 0.95);
  border-radius: 15px;
  width: 320px;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(5px);
}

.item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    rgba(40, 40, 123, 0.2),
    rgba(0, 140, 190, 0.2)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.item:hover {
  transform: translateY(-10px) rotateX(5deg);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.item:hover::before {
  opacity: 1;
}

.portrait {
  width: 300px;
  height: 350px;
  border: 10px solid rgb(40, 40, 123);
  border-radius: 15px;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  filter: brightness(0.95);
}

.portrait:hover {
  transform: scale(1.03);
  filter: brightness(1.1) contrast(1.1);
  border-color: rgb(0, 140, 190);
  box-shadow: 0 5px 15px rgba(0, 140, 190, 0.3), 0 0 20px rgba(0, 140, 190, 0.2);
}

.item h3 {
  margin: 15px 0 10px;
  transition: transform 0.3s ease, color 0.3s ease;
  color: rgb(40, 40, 123);
}

.item:hover h3 {
  transform: scale(1.05);
  color: rgb(0, 140, 190);
}

.item {
  position: relative;
}

/* Hide product-info by default for all items */
.item .product-info {
  display: none;
}

/* Show and style product-info only for items with show-info class */
.item.show-info .product-info {
  display: block;
  position: absolute;
  width: 100%;
  background: rgb(217, 245, 255);
  box-sizing: border-box;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  top: 100%;
  left: 0;
  opacity: 0;
  border-radius: 0 0 15px 15px;
  z-index: 10;
}

.item.show-info:hover .product-info {
  max-height: 200px;
  padding: 15px;
  opacity: 1;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.item.show-info .product-info p {
  margin: 8px 0;
  transform: translateY(-20px);
  opacity: 0;
  transition: all 0.3s ease;
}

.item.show-info:hover .product-info p {
  transform: translateY(0);
  opacity: 1;
}

.item.show-info:hover .product-info p:nth-child(1) {
  transition-delay: 0.1s;
}

.item.show-info:hover .product-info p:nth-child(2) {
  transition-delay: 0.2s;
} /* Animasi untuk item saat muncul */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.item {
  animation: fadeInUp 0.6s ease backwards;
}

.items .item:nth-child(1) {
  animation-delay: 0.1s;
}
.items .item:nth-child(2) {
  animation-delay: 0.2s;
}
.items .item:nth-child(3) {
  animation-delay: 0.3s;
}
.items .item:nth-child(4) {
  animation-delay: 0.4s;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .items {
    gap: 20px;
    padding: 20px 10px;
  }

  .item {
    width: 100%;
    max-width: 320px;
  }

  .portrait {
    width: 100%;
    height: auto;
  }
}
