/* СИФУД — точечный мобильный фикс, загружается с плагином после файлов темы.
   Только карточки товара в сетках: не изменяет карточку конкретного товара. */
@media (max-width: 782px) {
  body.sf .woocommerce ul.products li.product.sf-card:not(.sf-card--feature),
  body.sf ul.products li.product.sf-card:not(.sf-card--feature) {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: auto 36px minmax(0, 1fr) !important;
    grid-template-areas: "media media" "favorite likes" "body body" !important;
    align-items: stretch !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }
  body.sf li.product.sf-card:not(.sf-card--feature) > a.sf-card__media {
    box-sizing: border-box !important;
    grid-area: media !important;
    position: relative !important;
    inset: auto !important;
    display: flex !important;
    flex-flow: column nowrap !important;
    aspect-ratio: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  body.sf li.product.sf-card:not(.sf-card--feature) > a.sf-card__media > img,
  body.sf li.product.sf-card:not(.sf-card--feature) > a.sf-card__media > img.sf-card__img {
    box-sizing: border-box !important;
    display: block !important;
    flex: none !important;
    order: 2 !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center center !important;
    padding: 0 !important;
  }
  body.sf li.product.sf-card:not(.sf-card--feature) > a.sf-card__media > .sf-badges {
    box-sizing: border-box !important;
    position: static !important;
    inset: auto !important;
    order: 1 !important;
    display: flex !important;
    flex: 0 0 auto !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 38px !important;
    padding: 5px 5px 3px !important;
    background: #fff !important;
    box-shadow: none !important;
    z-index: 1 !important;
  }
  body.sf li.product.sf-card:not(.sf-card--feature) > a.sf-card__media > .sf-badges .sf-badge {
    box-sizing: border-box !important;
    font-size: 0.60rem !important;
    line-height: 1.12 !important;
    padding: 4px 6px !important;
    white-space: nowrap !important;
    gap: 3px !important;
    max-width: 100% !important;
    letter-spacing: 0 !important;
  }
  body.sf li.product.sf-card:not(.sf-card--feature) > a.sf-card__media > .sf-badges .sf-badge svg {
    width: 11px !important;
    height: 11px !important;
  }
  body.sf li.product.sf-card:not(.sf-card--feature) > .sf-fav--card {
    grid-area: favorite !important;
  }
  body.sf li.product.sf-card:not(.sf-card--feature) > .sf-like--card {
    grid-area: likes !important;
  }
  body.sf li.product.sf-card:not(.sf-card--feature) > .sf-fav--card,
  body.sf li.product.sf-card:not(.sf-card--feature) > .sf-like--card {
    position: static !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    align-self: center !important;
    justify-self: center !important;
    width: auto !important;
    min-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    max-width: 92% !important;
    margin: 0 !important;
    padding: 5px !important;
    border-radius: 18px !important;
    font-size: 0.71rem !important;
    line-height: 1 !important;
  }
  body.sf li.product.sf-card:not(.sf-card--feature) > .sf-fav--card svg,
  body.sf li.product.sf-card:not(.sf-card--feature) > .sf-like--card svg {
    width: 17px !important;
    height: 17px !important;
  }
  body.sf li.product.sf-card:not(.sf-card--feature) > .sf-card__body {
    grid-area: body !important;
    min-width: 0 !important;
    width: 100% !important;
  }
  body.sf li.product.sf-card .sf-card__body,
  body.sf li.product.sf-card .sf-card__actions,
  body.sf li.product.sf-card .sf-card__btn {
    box-sizing: border-box !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  body.sf .woocommerce ul.products li.product.sf-card a.sf-card__btn,
  body.sf ul.products li.product.sf-card a.sf-card__btn,
  body.sf .woocommerce ul.products li.product.sf-card button.sf-card__btn,
  body.sf ul.products li.product.sf-card button.sf-card__btn {
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 47px !important;
    padding: 8px 5px !important;
    font-size: clamp(0.70rem, 2.3vw, 0.84rem) !important;
    line-height: 1.24 !important;
    text-align: center !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    overflow: hidden !important;
  }
  body.sf li.product.sf-card .sf-card__btn > span {
    flex: 0 1 auto !important;
    min-width: 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    text-align: center !important;
  }
  body.sf li.product.sf-card .sf-card__btn .sf-card__btn-icon {
    width: 16px !important;
    height: 16px !important;
    flex: 0 0 16px !important;
  }
  body.sf li.product.sf-card .sf-card__btn .sf-card__btn-icon:last-child {
    display: none !important;
  }
}
/* End СИФУД mobile catalogue layout */

/* v1.0.2: Exactly one image in original 16:10 category slot.
   Do not touch any other category (including Рыба красная). */
body.sf ul.products.sf-cats--top li.sf-cat .sf-cat__link.sifud-tile-photo-ready > .sf-cat__media.sifud-tile-image-host {
  display: block !important;
  position: relative !important;
  flex: 0 0 auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 16 / 10 !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}
body.sf ul.products.sf-cats--top li.sf-cat .sf-cat__link.sifud-tile-photo-ready > .sf-cat__media.sifud-tile-image-host > img.sifud-tile-image {
  display: block !important;
  position: static !important;
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: auto !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 0 !important;
}
/* End v1.0.2 showcase replacement. */
