.j2p-cards {
  display: grid;
  grid-template-columns: repeat(var(--j2p-columns, 4), minmax(0, 1fr));
  gap: 22px;
  margin: 0;
  align-items: stretch;
}

.j2p-cards__notice {
  margin: 0;
  color: #6b7280;
}

a.j2p-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(31, 41, 55, 0.08);
  text-align: center;
  padding-bottom: 22px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a.j2p-card:hover,
a.j2p-card:focus {
  transform: translateY(-6px);
  box-shadow: 0 16px 34px rgba(31, 41, 55, 0.12);
  text-decoration: none;
  color: inherit;
}

a.j2p-card:hover .j2p-card__button,
a.j2p-card:focus .j2p-card__button {
  filter: brightness(0.94);
}

.j2p-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  flex: 0 0 auto;
  overflow: hidden;
  background: #f3f5f8;
}

.j2p-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.j2p-card__title {
  margin: 18px 18px 6px;
  color: #1f2430;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.3;
}

.j2p-card__price {
  margin: 0 18px 10px;
  color: #8b909a;
  font-size: 0.95rem;
  font-weight: 600;
}

.j2p-card__price .amount,
.j2p-card__price .woocommerce-Price-amount,
.j2p-card__suffix {
  color: #8b909a;
  font-weight: 600;
}

.j2p-card__text {
  flex: 1;
  margin: 0 18px 16px;
  color: #6b7280;
  font-size: 0.92rem;
  line-height: 1.45;
}

.j2p-card__button {
  align-self: center;
  display: inline-block;
  margin-top: auto;
  background: var(--j2p-button, #2ec4b6);
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  padding: 11px 22px;
  border-radius: 999px;
}

.j2p-card__button:hover,
.j2p-card__button:focus {
  color: #fff !important;
}

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

@media (max-width: 640px) {
  .j2p-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .j2p-card {
    padding-bottom: 14px;
  }

  .j2p-card__title {
    margin: 12px 10px 4px;
    font-size: 0.95rem;
  }

  .j2p-card__price,
  .j2p-card__text {
    margin-left: 10px;
    margin-right: 10px;
  }

  .j2p-card__text {
    font-size: 0.82rem;
  }

  .j2p-card__button {
    font-size: 0.82rem;
    padding: 9px 14px;
  }
}
