@import url("https://fonts.googleapis.com/css2?family=Lora:wght@700&family=Crimson+Pro:wght@400&display=swap");

body {
  font-family: "Crimson Pro", serif;
  background-color: rgba(18, 18, 18, 1);
  color: rgba(245, 245, 245, 1);
  margin: 0;
  padding: 2rem;
  position: relative;
  background-image: linear-gradient(rgba(30, 30, 30, 1), rgba(10, 10, 10, 1));
}

header {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

h1 {
  font-family: "Lora", serif;
  font-size: 3rem;
  color: rgba(193, 39, 45, 1);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  animation: fadeIn 2s ease-in;
  letter-spacing: 0.2rem;
}

h1::before {
  content: "";
  width: 50%;
  height: 0.2rem;
  background-color: rgba(57, 96, 110, 1);
  position: absolute;
  bottom: 0;
  left: 25%;
  transform: skew(-10deg);
}

main {
  display: flex;
  justify-content: center;
}

.marketplace {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 2rem;
}

@media (min-width: 48rem) {
  .marketplace {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64rem) {
  .marketplace {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 90rem) {
  .marketplace {
    grid-template-columns: repeat(4, 1fr);
  }
}

.product {
  background-color: rgba(40, 40, 40, 0.95);
  padding: 2rem;
  text-align: center;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.5);
  position: relative;
  transform: rotate(calc(var(--random-rotation) * 1deg));
  clip-path: polygon(5% 0%, 95% 0%, 100% 95%, 0% 100%);
}

.product:hover {
  transform: rotate(calc(var(--random-rotation-hover) * 1deg))
    translateY(-0.5rem);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.7);
  background-color: rgba(45, 45, 45, 0.95);
}

.product h2 {
  font-family: "Lora", serif;
  font-size: 1.5rem;
  color: rgba(220, 220, 220, 1);
  margin-bottom: 1rem;
  transition: color 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
}

.product:hover h2 {
  color: rgba(193, 39, 45, 1);
}

.status {
  font-size: 1.2rem;
  color: rgba(193, 39, 45, 1);
  font-weight: bold;
}

footer {
  text-align: center;
  margin-top: 4rem;
  font-size: 1rem;
  padding-bottom: 2rem;
}

a {
  color: rgba(193, 39, 45, 0.9);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: rgba(57, 96, 110, 1);
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(2rem);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
