/* Product Card → Testimonial/Quote Card */

div.text .kg-product-card {
  padding-top: 0;
  margin-bottom: 24px;
  width: 80%;
  margin-left: auto;
  margin-right: auto;
}

div.text .kg-product-card .kg-product-card-container {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "avatar   title"
    "avatar   button"
    "quotesvg desc";
  column-gap: 20px;
  row-gap: 4px;
  align-items: start;
  max-width: 100%;
  padding: 28px 32px;
  background: #f5f0ff;
  border: 1px solid #e0d4f5;
  border-radius: 16px;
  box-shadow: none;
}

/* SVG цитата — колонка 1, строка 3 */
div.text .kg-product-card .kg-product-card-container::before {
  content: '';
  grid-column: 1;
  grid-row: 3;
  width: 40px;
  height: 40px;
  margin-top: 16px;
  justify-self: center;
  align-self: start;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23b49adf'%3E%3Cpath d='M4.583 17.321C3.553 16.227 3 15 3 13.011c0-3.5 2.457-6.637 6.03-8.188l.893 1.378c-3.335 1.804-3.987 4.145-4.247 5.621.537-.278 1.24-.375 1.929-.311C9.591 11.69 11 13.198 11 15c0 1.891-1.567 3.5-3.5 3.5-1.073 0-2.099-.49-2.917-1.179zm10 0C13.553 16.227 13 15 13 13.011c0-3.5 2.457-6.637 6.03-8.188l.893 1.378c-3.335 1.804-3.987 4.145-4.247 5.621.537-.278 1.24-.375 1.929-.311C19.591 11.69 21 13.198 21 15c0 1.891-1.567 3.5-3.5 3.5-1.073 0-2.099-.49-2.917-1.179z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
}

/* Avatar — прижат влево */
div.text .kg-product-card .kg-product-card-image {
  grid-area: avatar;
  width: 64px !important;
  height: 64px !important;
  max-width: 64px;
  max-height: 64px;
  border-radius: 50%;
  object-fit: cover;
  justify-self: start;
}

/* Title — строка 1, колонка 2, прижат влево */
div.text .kg-product-card .kg-product-card-title-container {
  grid-area: title;
  align-self: end;
  justify-self: start;
  text-align: left;
}

div.text .kg-product-card h4.kg-product-card-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}

/* Rating — hidden */
div.text .kg-product-card .kg-product-card-rating {
  display: none;
}

/* Button — строка 2, колонка 2, прижат влево */
div.text .kg-product-card .kg-product-card-button.kg-product-card-btn-accent {
  grid-area: button;
  align-self: start;
  justify-self: start;
  text-align: left;
  display: inline !important;
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  background: none !important;
  background-color: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--main-color) !important;
  font-size: 15px;
  font-weight: 400 !important;
  line-height: 1.4;
  text-decoration: none !important;
  opacity: 1 !important;
  transition: color 0.2s ease;
}

div.text .kg-product-card .kg-product-card-button.kg-product-card-btn-accent:hover,
div.text .kg-product-card .kg-product-card-button.kg-product-card-btn-accent:active,
div.text .kg-product-card .kg-product-card-button.kg-product-card-btn-accent:focus {
  color: var(--epcl-black) !important;
  background: none !important;
  background-color: transparent !important;
  box-shadow: none !important;
  transform: none !important;
  text-decoration: underline !important;
}

/* Убить любые паразитные псевдоэлементы */
div.text .kg-product-card .kg-product-card-description::before,
div.text .kg-product-card .kg-product-card-description::after,
div.text .kg-product-card a.kg-product-card-button::before,
div.text .kg-product-card a.kg-product-card-btn-accent::before,
div.text .kg-product-card a.kg-product-card-button::after,
div.text .kg-product-card a.kg-product-card-btn-accent::after {
  content: none !important;
  display: none !important;
}

/* Description — строка 3, колонка 2 */
div.text .kg-product-card .kg-product-card-description {
  grid-column: 2;
  grid-row: 3;
  margin-top: 0 !important;
  padding-top: 0 !important;
  text-align: left;
  justify-self: start;
}

div.text .kg-product-card .kg-product-card-description p {
  font-style: normal !important;
  font-size: 17px;
  line-height: 1.6;
  opacity: 1;
  color: #1a1a2e;
  margin-bottom: 0;
}

div.text .kg-product-card .kg-product-card-description p a {
  color: var(--main-color) !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

div.text .kg-product-card .kg-product-card-description p a:hover {
  color: var(--epcl-black) !important;
}

/* No image fallback */
div.text .kg-product-card .kg-product-card-container:not(:has(.kg-product-card-image)) {
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "title    title"
    "button   button"
    "quotesvg desc";
}

/* Mobile */
@media (max-width: 600px) {
  div.text .kg-product-card {
    width: 100%;
  }

  div.text .kg-product-card .kg-product-card-container {
    padding: 20px;
    grid-template-columns: auto 1fr;
  }

  div.text .kg-product-card .kg-product-card-image {
    width: 48px !important;
    height: 48px !important;
    max-width: 48px;
    max-height: 48px;
  }

  div.text .kg-product-card h4.kg-product-card-title {
    font-size: 18px;
  }

  div.text .kg-product-card .kg-product-card-description p {
    font-size: 16px;
  }

  div.text .kg-product-card .kg-product-card-container::before {
    width: 32px;
    height: 32px;
  }
}
