.products-page {
  position: relative;
  padding: 6px 0 50px;
  color: #3f3f3f;
  background: #f7f7f7;
}

.products-page::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 250px;
  background: linear-gradient(90deg, #5b2890 0%, #9e249d 100%);
  z-index: 0;
}

.products-page .container {
  position: relative;
  z-index: 1;
}

.products-hero {
  margin-top: 30px;
  min-height: 230px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 40px 80px;
  background: #fff;
  border-radius: 35px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.products-hero__content {
  max-width: 560px;
  position: relative;
  z-index: 2;
}

.products-hero__title {
  margin: 0 0 30px;
  font-size: 46px;
  line-height: 1;
  font-weight: 800;
  background: linear-gradient(62.18deg, #5c1cb2 0%, #a90faf 10%, #ff00c1 61%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.products-hero__text {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
  color: #3f3f3f;
}

.products-hero__image {
  max-width: 600px;
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.products-hero__image img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.products-heading {
  text-align: center;
  margin: 30px 0;
}

.products-heading__title {
  margin: 0;
  font-size: 36px;
  font-weight: 800;
  color: #9e249d;
}

.products-heading__text {
  margin: 6px 0 0;
  font-size: 16px;
  font-weight: 700;
  color: #3f3f3f;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 30px;
  max-width: 1240px;
  margin: 0 auto;
}

.product-card {
  grid-column: span 2;

  --product-color: #9e249d;

  display: flex;
  flex-direction: column;
  min-height: 390px;
  background: #fff;
  border: 1px solid rgba(63, 63, 63, 0.12);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.22);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 9px 20px rgba(0, 0, 0, 0.25);
}

.product-card--wide {
  grid-column: span 3;
}

.product-card__top {
  padding: 20px 22px 12px;
}

.product-card__info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-bottom: 15px;
}

.product-card__icon {
  width: 62px;
  height: 62px;
  object-fit: contain;
  flex-shrink: 0;
}

.product-card__content {
  min-width: 0;
  margin-left: 15px;
}

.product-card__title {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 19px;
  line-height: 1.15;
  font-weight: 800;
  color: var(--product-color);
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.product-card__title:hover {
  opacity: 0.75;
}

.product-card__text {
  font-size: 15px;
  line-height: 1.22;
  font-weight: 500;
  color: #3f3f3f;
}

.product-card__text:empty {
  display: none;
}

.product-card__image {
  width: 100%;
  height: 150px;
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-decoration: none;
}

.product-card__image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.3s ease;
}

.product-card__image:hover img {
  transform: scale(1.04);
}

.product-card__classes {
  padding: 0 20px 10px;
}

.product-card__classes-label {
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #3f3f3f;
}

.product-card__classes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-card__class-btn {
  min-width: 86px;
  min-height: 34px;
  padding: 7px 14px;
  border: 2px solid var(--product-color);
  border-radius: 7px;
  background: #fff;
  color: var(--product-color);
  font-size: 14px;
  line-height: 1;
  font-weight: 800;
  cursor: pointer;
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    transform 0.3s ease;
}

.product-card__class-btn:hover,
.product-card__class-btn.active {
  background: var(--product-color);
  color: #fff;
}

.product-card__class-btn:hover {
  transform: translateY(-2px);
}

.product-card__price {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin-top: auto;
  padding: 6px 15px;
  background: #f8e900;
  color: #3f3f3f;
}

.product-card__price-value {
  font-size: 20px;
  line-height: 1;
  font-weight: 900;
}

.product-card__button {
  min-height: 36px;
  margin: 10px 22px 16px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border-radius: 10px;
  background: var(--product-color);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  font-weight: 700;
  text-decoration: none;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.product-card__button:hover {
  opacity: 0.88;
  transform: translateY(-2px);
}

.product-card__button img {
  width: 21px;
  height: auto;
  object-fit: contain;
  display: block;
}

/* широкі картки НУШ / Інклюзія */
.product-card--wide {
  min-height: auto;
}

.product-card--wide .product-card__top {
  align-items: center;
  display: flex;
}

.product-card--wide .product-card__image {
  width: 190px;
  height: 130px;
  margin: 0 auto;
}

.product-card--wide .product-card__button {
  max-width: none;
}

.products-benefits {
  max-width: 1160px;
  margin: 30px auto 0;
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  box-shadow: 0 0px 18px rgba(91, 40, 144, 0.2);
}

.products-benefit {
  display: flex;
  align-items: center;
  gap: 14px;
}

.products-benefit img {
  width: 68px;
  height: 68px;
  object-fit: contain;
  flex-shrink: 0;
}

.products-benefit__title {
  margin-bottom: 5px;
  font-size: 16px;
  line-height: 1.15;
  font-weight: 700;
  color: #5b2890;
}

.products-benefit__text {
  font-size: 14px;
  line-height: 1.25;
  font-weight: 500;
  color: #3f3f3f;
}

@media (max-width: 1199px) {
  .products-hero {
    padding: 36px 50px;
  }

  .products-hero__title {
    font-size: 40px;
  }

  .products-hero__text {
    font-size: 17px;
  }

  .products-hero__image {
    max-width: 520px;
  }

  .products-grid {
    gap: 26px 30px;
  }

  .product-card__top {
    padding: 18px 18px 12px;
  }

  .product-card__image {
    width: 145px;
    height: 125px;
    margin: 0 auto;
  }

  .product-card__icon {
    width: 54px;
    height: 54px;
  }

  .product-card__title {
    font-size: 17px;
  }

  .product-card__text {
    font-size: 14px;
  }

  .products-benefits {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 991px) {
  .products-page::before {
    height: 180px;
  }

  .products-hero {
    min-height: auto;
    padding: 32px 32px;
    border-radius: 0 0 26px 26px;
  }

  .products-hero__content {
    max-width: 420px;
  }

  .products-hero__title {
    margin-bottom: 20px;
    font-size: 36px;
  }

  .products-hero__text {
    font-size: 16px;
  }

  .products-hero__image {
    max-width: 430px;
  }

  .products-heading {
    margin: 30px 0;
  }

  .products-heading__title {
    font-size: 27px;
  }

  .products-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 26px;
  }

  .product-card {
    grid-column: span 2;
  }

  .product-card--wide {
    grid-column: span 2;
  }

  .product-card__top {
    min-height: 210px;
  }

  .product-card__image {
    width: 150px;
  }

  .products-benefits {
    margin-top: 26px;
    padding: 18px;
    gap: 18px;
  }
}

@media (max-width: 767px) {
  .products-page {
    padding-bottom: 35px;
  }

  .products-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding: 28px 24px 20px;
    border-radius: 0 0 22px 22px;
  }

  .products-hero__title {
    font-size: 34px;
  }

  .products-hero__text {
    font-size: 15px;
  }

  .products-hero__text br {
    display: none;
  }

  .products-hero__image {
    width: 100%;
    max-width: 420px;
    margin-left: auto;
  }

  .products-heading__title {
    font-size: 24px;
  }

  .products-heading__text {
    font-size: 15px;
  }

  .products-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .product-card,
  .product-card--wide {
    grid-column: auto;
  }

  .product-card {
    min-height: auto;
  }

  .product-card__top {
    min-height: auto;
    align-items: center;
  }

  .product-card__image {
    width: 150px;
    height: 125px;
  }

  .product-card__classes-list {
    gap: 8px;
  }

  .product-card__class-btn {
    min-width: 78px;
  }

  .products-benefits {
    grid-template-columns: 1fr;
    border-radius: 16px;
  }
}

@media (max-width: 575px) {
  .products-page {
    padding-top: 10px;
  }

  .products-hero {
    padding: 24px 18px 18px;
  }

  .products-hero__title {
    margin-bottom: 16px;
    font-size: 30px;
  }

  .products-hero__text {
    font-size: 14px;
    line-height: 1.35;
  }

  .products-heading {
    margin: 26px 0 24px;
  }

  .products-heading__title {
    font-size: 21px;
  }

  .products-heading__text {
    font-size: 14px;
    line-height: 1.3;
  }

  .product-card {
    border-radius: 13px;
  }

  .product-card__top {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 18px 18px 12px;
  }

  .product-card__info {
    gap: 14px;
  }

  .product-card__icon {
    width: 50px;
    height: 50px;
  }

  .product-card__title {
    font-size: 17px;
  }

  .product-card__text {
    font-size: 14px;
  }

  .product-card__image {
    width: 100%;
    height: 135px;
    align-items: center;
  }

  .product-card__image img {
    max-width: 210px;
  }

  .product-card__classes {
    padding: 0 18px 10px;
  }

  .product-card__classes-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .product-card__class-btn {
    width: 100%;
    min-width: 0;
    padding: 8px 8px;
    font-size: 13px;
  }

  .product-card__price-value {
    font-size: 18px;
  }

  .product-card__button {
    margin: 10px 18px 16px;
    font-size: 13px;
  }

  .products-benefit img {
    width: 56px;
    height: 56px;
  }

  .products-benefit__title {
    font-size: 14px;
  }

  .products-benefit__text {
    font-size: 12px;
  }
}
