:root {
  --surface: #f5f7fb;
  --ink: #0f1b45;
}

* {
  box-sizing: border-box;
}

.products-main {
  max-width: 1760px;
  margin: 8px auto 60px;
  padding: 8px 18px 0;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px 28px;
}

.product-card {
  text-align: center;
}

.product-cover-frame {
  border: 4px solid var(--secondary-900);
  border-radius: 14px;
  background: white;
  padding: 18px;
  min-height: 238px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-cover {
  width: 70%;
  height: 80%;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px;
  color: #fff;
  transform: perspective(760px) rotateY(-14deg);
}

.product-cover.image-cover {
  padding: 0;
  align-items: stretch;
  justify-content: stretch;
  overflow: hidden;
}

.product-cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 8px;
}

.product-initials {
  font-weight: 800;
  font-size: 24px;
  letter-spacing: 0.03em;
  text-decoration: none;
}

.product-badge {
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.24);
  padding: 5px 8px;
  border-radius: 999px;
}

.product-card h2 {
  margin: 16px 0 8px;
  font-size: clamp(20px, 1.3vw, 38px);
  line-height: 1.15;
  font-weight: 600;
  color: var(--tertiary-900);
  letter-spacing: -0.02em;
  text-decoration: none;
}

.product-category {
  margin: 0;
  color: var(--primary-900);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}

.product-mode {
  margin: 3px 0 0;
  color: var(--secondary-900);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {

  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 16px;
  }

  .product-cover-frame {
    min-height: 206px;
    padding: 0px;
  }

  .product-cover {
    transform: perspective(640px) rotateY(-11deg);
    width: 112px;
    height: 142px;
  }

  .product-cover.image-cover {
    width: 80%;
    height: 50%;
    transform: none;
  }

  .product-cover.image-cover .product-cover-image {
    object-fit: contain;
    background: #fff;
  }

  .product-card h2 {
    font-size: 17px;
  }

  .product-category,
  .product-mode {
    font-size: 14px;
  }
}

@media (max-width: 460px) {
  .products-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Remove default underline from product cards and keep a subtle focus ring */
.product-card-link {
  text-decoration: none;
  color: var(--tertiary-900);
  display: block;

}

.product-card-link:hover,
.product-card-link:focus,
.product-card-link:active {
  text-decoration: none;
  outline: none;
  box-shadow: 0 0 0 4px rgba(4, 75, 171, 0.08);
}

.product-card-link h2 {
  text-decoration: none;
  color: inherit;
}
