@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,200;0,300;0,400;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,600;1,700;1,800;1,900&display=swap");

#title_header {
  font-family: "Nunito Sans", sans-serif;
  font-size: 2em;
  color: #333;
  text-align: center;
  margin-top: 20px;
  text-decoration: underline;
  margin-bottom: 30px;
}

.products_container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  padding: 20px;
  justify-content: center;
  justify-items: center;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
  transition: all 0.3s ease-in-out;
}

.products_container.centered {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 30px;
}

.product-wrapper {
  width: 100%;
  max-width: 400px;
}

.product-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.product {
  width: 100%;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border-bottom-left-radius: 10.127px;
  border-top-right-radius: 12.127px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: white;
  position: relative;
}

.product.clickable:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.product-image-container {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.top-box {
  height: 100%;
  width: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product:hover .top-box {
  transform: scale(1.02);
}

.product-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

.product-status {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bottom-box {
  padding: 20px;
  transition: background-color 0.3s ease;
}

.product:hover .bottom-box {
  background-color: #f8f9fa;
}

.product-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  gap: 10px;
}

.product-name {
  font-family: "Nunito Sans", sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #333;
  margin: 0;
  line-height: 1.2;
  flex: 1;
}

.product-category {
  background: #e9ecef;
  color: #495057;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.product-description {
  font-family: "Nunito Sans", sans-serif;
  font-size: 14px;
  color: #666;
  line-height: 1.5;
  margin: 0 0 15px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.product-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: transform 0.2s ease;
  cursor: default;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-tag:hover {
  transform: scale(1.05);
}

.product-release-date {
  font-family: "Nunito Sans", sans-serif;
  font-size: 12px;
  color: #999;
  font-weight: 500;
  margin-top: 10px;
}

.products-info {
  text-align: center;
  margin-bottom: 20px;
  font-family: "Nunito Sans", sans-serif;
  color: #666;
  font-size: 14px;
}

@media (max-width: 768px) {
  .products_container {
    grid-template-columns: 1fr;
    padding: 15px;
    gap: 20px;
  }

  .products_container.centered {
    flex-direction: column;
    gap: 20px;
  }

  .product-wrapper {
    max-width: 350px;
  }

  #title_header {
    font-size: 1.8em;
    margin-top: 15px;
    margin-bottom: 20px;
  }

  .product-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .product-name {
    font-size: 18px;
  }
}

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

  .product-wrapper {
    max-width: 300px;
  }

  .product-image-container {
    height: 180px;
  }

  .bottom-box {
    padding: 15px;
  }

  .product-name {
    font-size: 16px;
  }

  .product-description {
    font-size: 13px;
  }

  #title_header {
    font-size: 1.6em;
  }

  .product-tags {
    gap: 4px;
  }

  .product-tag {
    font-size: 10px;
    padding: 2px 6px;
    max-width: 80px;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product {
  animation: fadeInUp 0.6s ease-out;
}

.product:nth-child(1) {
  animation-delay: 0.1s;
}
.product:nth-child(2) {
  animation-delay: 0.2s;
}
.product:nth-child(3) {
  animation-delay: 0.3s;
}
.product:nth-child(4) {
  animation-delay: 0.4s;
}
.product:nth-child(5) {
  animation-delay: 0.5s;
}
.product:nth-child(6) {
  animation-delay: 0.6s;
}

.products_container.loading {
  opacity: 0.7;
}

.products_container.loading .product {
  pointer-events: none;
}
