*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: transparent;
}

body {
  min-height: 100vh;
  direction: rtl;
  text-align: right;
  color: var(--color-white);
}

img,
svg {
  display: block;
}

.products-segment {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: transparent;
}

.products-segment__hero {
  display: inline-flex;
  align-items: stretch;
  flex-direction: row;
  direction: ltr;
  margin-inline-start: auto;
  margin-bottom: 14px;
  gap: 8px;
}

.products-segment__badge {
  width: 58px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--color-violet-500);
  aspect-ratio: 1 / 1;
}

.products-segment__badge img {
  width: 24px;
  height: 24px;
  display: block;
}

.products-segment__pill {
  margin: 0;
  padding: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--color-neutral-2);
  color: var(--color-neutral-11);
  font-weight: 500;
}

.products-segment__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
  direction: ltr;
}

.product-card {
  position: relative;
  min-height: 300px;
  padding: 28px 30px 26px 28px;
  border-radius: 24px;
  background: var(--color-violet-500);
  color: var(--color-white);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  direction: rtl;
  text-align: right;
}

.product-card__title {
  margin: 0;
  max-width: 13ch;
  color: inherit;
  align-self: flex-start;
  position: relative;
  z-index: 1;
}

.product-card__eyebrow {
  margin: 28px 0 0;
  color: inherit;
  align-self: flex-start;
  position: relative;
  z-index: 1;
}

.product-card--tube .product-card__title {
  max-width: 6ch;
}

.product-card--packs .product-card__title {
  max-width: 14ch;
}

.product-card--sachets .product-card__title {
  max-width: 11ch;
}

.product-card__visual {
  position: absolute;
  inset-block-start: 50%;
  left: 22px;
  width: clamp(138px, 24vw, 164px);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 0;
  transform: translateY(-50%);
  direction: ltr;
}

.product-card__visual img {
  display: block;
  max-width: 100%;
  object-fit: contain;
}

.product-card__list {
  margin: 0;
  margin-top: 12px;
  padding: 0 18px 0 0;
  list-style: disc;
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: inherit;
  align-self: flex-start;
  position: relative;
  z-index: 1;
}

.product-card__list li {
  margin: 0;
}

.product-card__list li::marker {
  color: currentColor;
}

.tube-illustration {
  width: min(100%, 320px);
  height: auto;
  overflow: visible;
}

.sachet-illustration {
  height: clamp(144px, 24vw, 168px);
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.product-card--tube .product-card__visual {
  justify-content: flex-start;
  padding-inline-start: 2px;
}

.product-card--tube .tube-illustration {
  transform: translateX(-8px) scale(1.5);
  transform-origin: left center;
}

.product-card--packs .product-card__visual {
  min-height: 152px;
}

.pack {
  position: absolute;
  width: 112px;
  height: 156px;
  border-radius: 12px 12px 14px 14px;
  background: var(--color-white);
  border: 1px solid var(--color-neutral-3);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .08);
}

.pack__cap {
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  height: 18px;
}

.pack__cap--violet {
  background: var(--color-violet-400);
}

.pack__cap--cyan {
  background: var(--color-info-300);
}

.pack__cap--lime {
  background: var(--color-green-100);
}

.pack__panel {
  position: absolute;
  inset: 18px 12px 14px;
  border-radius: 10px;
  background: var(--color-white);
  border: 1px solid rgb(var(--color-violet-500-rgb) / 8%);
}

.pack__logo {
  position: absolute;
  inset-block-start: 24px;
  inset-inline: 22px;
  display: flex;
  justify-content: center;
}

.pack__logo img {
  width: 38px;
  height: 38px;
  opacity: .98;
}

.pack--back {
  inset-inline-start: 34px;
  inset-block-start: 10px;
  transform: scale(.9);
  opacity: .72;
}

.pack--middle {
  inset-inline-start: 58px;
  inset-block-start: 26px;
  transform: scale(.96);
  opacity: .86;
}

.pack--front {
  inset-inline-start: 78px;
  inset-block-start: 36px;
  width: 132px;
  height: 176px;
  z-index: 3;
}

.pack--front .pack__panel {
  inset: 16px 11px 12px;
  background: var(--color-white);
}

.pack__body {
  position: absolute;
  inset: 16px 11px 12px;
  border-radius: 10px;
  background: var(--color-white);
}

.pack__seal {
  position: absolute;
  inset-block-start: 20px;
  inset-inline: 20px;
  height: 80px;
  border-radius: 12px;
  background: var(--color-green-900);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 8%);
}

.pack__brand {
  position: absolute;
  inset-block-start: 30px;
  inset-inline: 33px;
  display: flex;
  justify-content: center;
}

.pack__brand img {
  width: 52px;
  height: 52px;
}

.pack__produce {
  position: absolute;
  inset-inline: 18px;
  inset-block-end: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}

.pack__produce span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--color-green-400);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 12%);
}

.pack__produce span:nth-child(2),
.pack__produce span:nth-child(5) {
  background: var(--color-warning-300);
}

.pack__produce span:nth-child(3),
.pack__produce span:nth-child(6) {
  background: var(--color-error-300);
}

.pack__produce span:nth-child(4) {
  background: var(--color-success-300);
}

.sachet {
  position: absolute;
  width: 108px;
  height: 136px;
  border-radius: 12px;
  background-color: var(--color-white);
  border: 1px solid rgb(var(--color-violet-500-rgb) / 8%);
  overflow: hidden;
}

.sachet__pattern {
  position: absolute;
  inset: 0;
  background-color: var(--color-white);
  background-image: url("../images/pectin-guard-logo-sign.svg");
  background-repeat: repeat;
  background-size: 46px 22px;
  background-position: center center;
  opacity: .88;
}

.sachet__seal {
  position: absolute;
  inset-block-end: 12px;
  inset-inline: 12px;
  height: 58px;
  border-radius: 10px;
  background: rgba(76, 14, 98, .08);
}

.sachet--back {
  inset-inline-start: 46px;
  inset-block-start: 18px;
  transform: scale(.88);
  opacity: .74;
}

.sachet--front {
  inset-inline-start: 82px;
  inset-block-start: 34px;
  width: 124px;
  height: 152px;
  z-index: 2;
}

.sachet--front .sachet__pattern {
  background-size: 42px 20px;
}

.product-card--sachets .product-card__visual {
  justify-content: flex-start;
  padding-inline-start: 6px;
  width: clamp(152px, 26vw, 180px);
}

.product-card--sachets .product-card__list {
  max-width: none;
}

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

  .product-card {
    min-height: 284px;
  }

  .product-card--sachets {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  .products-segment {
    gap: 28px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .products-segment__hero {
    width: 100%;
    margin-bottom: 12px;
  }

  .products-segment__badge {
    width: 54px;
  }

  .products-segment__pill {
    flex: 1 1 auto;
    padding: 11px 16px 10px;
    justify-content: flex-end;
    font-weight: 600;
  }

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

  .product-card,
  .product-card--sachets {
    grid-column: auto;
    min-height: 187px;
    border-radius: 12px;
  }

  .product-card--packs .product-card__visual,
  .product-card--sachets .product-card__visual {
    min-height: 0;
  }

  .product-card__title {
    max-width: none;
  }

  .product-card__eyebrow {
    margin-top: 24px;
  }

  .product-card,
  .product-card--sachets {
    padding: 28px 30px 26px 28px;
    background: var(--color-violet-900);
  }

  .product-card__visual {
    position: absolute;
    inset-block-start: 50%;
    left: 22px;
    width: clamp(138px, 24vw, 164px);
    margin: 0;
    transform: translateY(-50%);
  }

  .product-card--tube .tube-illustration {
    transform: translateX(-8px);
  }

  .product-card__list {
    margin-top: 10px;
    width: calc(100% - clamp(138px, 24vw, 164px) - 12px);
  }

  .product-card--sachets .product-card__list {
    width: calc(100% - clamp(152px, 26vw, 180px) - 12px);
  }
}
