/*
 * Catalog product card layout fix — 2026-08-03.
 * Loaded after the storefront refinement layers and scoped to the real catalog.
 */

.page-catalog--v2 .commerce-product-grid--editorial {
  align-items: stretch;
}

.page-catalog--v2 .product-card--editorial {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  overflow: hidden !important;
  isolation: isolate;
}

.page-catalog--v2 .product-card--editorial:hover {
  transform: none !important;
}

.page-catalog--v2 .product-card--editorial .product-card__media {
  width: 100%;
  height: auto !important;
  flex: 0 0 auto;
  aspect-ratio: 1 / 1.04;
  transition: border-color .28s ease, background-color .28s ease;
}

.page-catalog--v2 .product-card--editorial:hover .product-card__media {
  border-color: rgba(54, 85, 43, .24);
  background: linear-gradient(145deg, #ece5da, #fbf7f0);
}

.page-catalog--v2 .product-card--editorial .product-card__content {
  display: flex;
  min-width: 0;
  min-height: 176px;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 15px 3px 2px !important;
}

.page-catalog--v2 .product-card--editorial h3 {
  min-height: 2.12em;
  overflow-wrap: anywhere;
}

.page-catalog--v2 .product-card--editorial .latin {
  min-height: 2.6em;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.page-catalog--v2 .product-card--editorial .product-card__bottom {
  display: flex !important;
  min-width: 0;
  min-height: 46px;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px;
  margin-top: auto !important;
  padding-top: 16px;
}

.page-catalog--v2 .product-card--editorial .product-card__bottom > div {
  display: flex;
  min-width: 0;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
}

.page-catalog--v2 .product-card--editorial .product-card__bottom strong {
  white-space: nowrap;
}

.page-catalog--v2 .product-card--editorial .product-card__bottom form {
  flex: 0 0 auto;
  margin: 0;
}

.page-catalog--v2 .product-card--editorial .round-add {
  display: inline-flex !important;
  width: auto !important;
  min-width: 116px;
  height: 42px !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  font: 800 1.05rem/1 var(--ui);
  white-space: nowrap;
  transform: none !important;
  touch-action: manipulation;
}

.page-catalog--v2 .product-card--editorial .round-add::after {
  content: "В корзину";
  font: 750 .72rem/1 var(--ui);
  letter-spacing: .01em;
}

.page-catalog--v2 .product-card--editorial .round-add:hover {
  background: var(--green-deep);
  transform: none !important;
}

.page-catalog--v2 .product-card--editorial .round-add:disabled {
  cursor: not-allowed;
  opacity: .48;
}

@media (max-width: 620px) {
  .page-catalog--v2 .product-card--editorial .product-card__content {
    min-height: 164px;
  }

  .page-catalog--v2 .product-card--editorial .round-add {
    width: 42px !important;
    min-width: 42px;
    padding: 0 !important;
  }

  .page-catalog--v2 .product-card--editorial .round-add::after {
    display: none;
  }
}

@media (max-width: 480px) {
  .page-catalog--v2 .product-card--editorial .product-card__media {
    aspect-ratio: 1 / .94;
  }

  .page-catalog--v2 .product-card--editorial .round-add {
    width: auto !important;
    min-width: 116px;
    padding: 0 16px !important;
  }

  .page-catalog--v2 .product-card--editorial .round-add::after {
    display: inline;
  }
}
