/* AM-UX-D2C-20261125 — карточки без пустоты, тост, отступ под плашку доставки.
   Токены DESIGN.md: текст #000, фон #fff, акцент #8a9b6e, рамка #e3e3e3/#e6e6e6,
   тень как у липкой панели карточки, без новых скруглений. */

/* ---------- 1. Карточки каталога: без пустоты между названием и ценой ---------- */
.catalog-content-cards {
  align-items: stretch;
}
.catalog-content__card {
  display: flex;
  flex-direction: column;
}
.catalog-content__card-img {
  flex: 0 0 auto;
}
.catalog-content__card-info {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
}
.catalog-content__card-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3 !important;
  min-height: 2.6em;
  max-height: 2.6em;
  max-width: none;
}
/* Состав оставляем на карточке товара; в плитке он резервировал лишние строки */
.catalog-content__card-subtitle {
  display: none !important;
  margin: 0 !important;
  min-height: 0 !important;
}
.catalog-content__card-availability {
  margin-top: 4px !important;
  min-height: 1.5em;
  line-height: 1.5;
}
.catalog-content__card-info-bottom,
.catalog-content__card--discount .catalog-content__card-info-bottom {
  display: flex;
  align-items: center;
  margin-top: 6px !important;
  gap: 8px;
  min-width: 0;
  width: 100%;
}
.catalog-content__card-price-wrap {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  margin-right: 0;
}
.catalog-content__card-price,
.catalog-content__card-price--discount {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.catalog-content__card-info-bottom basket-add-product-component,
.catalog-content__card-basket {
  flex: 0 0 auto;
  margin-left: auto;
}
@media (max-width: 500px) {
  .catalog-content__card-price-wrap {
    flex-direction: column-reverse;
    align-items: flex-start;
  }
}
@media (min-width: 501px) {
  .catalog-content__card-price-wrap {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 8px;
    row-gap: 2px;
  }
}

/* ---------- 2. Тост «Товар добавлен в корзину» ---------- */
.Vue-Toastification__container.top-right,
.Vue-Toastification__container.top-left,
.Vue-Toastification__container.top-center {
  top: calc(var(--am-ux-d2c-header-h, 71px) + var(--am-ux-m2-strip-h, 0px) + 8px) !important;
  z-index: 40;
}
@media (max-width: 767px) {
  .Vue-Toastification__container.top-right,
  .Vue-Toastification__container.top-left,
  .Vue-Toastification__container.top-center {
    top: calc(var(--am-ux-d2c-header-h, 71px) + var(--am-ux-m2-strip-h, 0px) + 8px) !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
  }
  .Vue-Toastification__container .Vue-Toastification__toast {
    width: 100% !important;
    margin: 0 !important;
  }
}
.Vue-Toastification__toast,
.Vue-Toastification__toast--success,
.Vue-Toastification__container .Vue-Toastification__toast--success {
  background: #ffffff !important;
  color: #000000 !important;
  border: 1px solid #e6e6e6 !important;
  border-radius: 0 !important;
  box-shadow: 0 1px 0 #e6e6e6, 0 8px 24px rgba(0, 0, 0, 0.08) !important;
  font-family: Montserrat, Arial, sans-serif !important;
  padding: 16px 44px 16px 16px !important;
}
.Vue-Toastification__toast-body,
.Vue-Toastification__toast .Vue-Toastification__toast-body {
  color: #000000 !important;
  font-family: Montserrat, Arial, sans-serif !important;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.02em;
}
.Vue-Toastification__toast .Vue-Toastification__icon,
.Vue-Toastification__toast .Vue-Toastification__toast-icon {
  display: none !important;
}
.am-ux-d2c-toast__row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}
.am-ux-d2c-toast__img {
  flex: 0 0 48px;
  width: 48px;
  height: 64px;
  object-fit: cover;
  background: #f6f6f6;
  display: block;
}
.am-ux-d2c-toast__text {
  min-width: 0;
  flex: 1 1 auto;
}
.am-ux-d2c-toast__label {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: #333333;
}
.am-ux-d2c-toast__name {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #000000;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}
.am-ux-d2-toast-cta,
.Vue-Toastification__toast .am-ux-d2-toast-cta,
.Vue-Toastification__toast-body .am-ux-d2-toast-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  min-height: 44px;
  padding: 8px 14px;
  background: #000000;
  color: #ffffff !important;
  font-family: Montserrat, Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 0;
  box-sizing: border-box;
}
.Vue-Toastification__close-button,
.am-ux-d2c-toast__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent !important;
  color: #000000 !important;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  opacity: 1 !important;
  box-shadow: none !important;
}

/* ---------- 3. Плашка «до бесплатной доставки» не перекрывает заголовок ---------- */
/* M2 ставил margin-top .main равным только высоте плашки (~34px), затирая отступ шапки. */
html.am-ux-m2-hasstrip .main {
  margin-top: calc(var(--am-ux-d2c-header-h, 71px) + var(--am-ux-m2-strip-h, 34px) + 12px) !important;
}
html.am-ux-m2-hasstrip .h1-black,
html.am-ux-m2-hasstrip .favourites__title,
html.am-ux-m2-hasstrip .catalog__title {
  position: relative;
  z-index: 0;
}
