.product-card {
  margin: 0 -1px -1px 0;
  border: 1px solid #ECEEF2;
  background: #fff;
  display: flex;
  flex-direction: column;
}
.product-card:nth-child(1) {
  border-top-left-radius: 8px;
}
.product-card:nth-child(2) {
  border-top-right-radius: 8px;
}
.product-card:nth-last-child(2) {
  border-bottom-right-radius: 8px;
}
.product-card:last-child {
  border-bottom-left-radius: 8px;
}
.product-card__main {
  padding: 16px 10px 24px 9px;  
  position: relative;
  transition: all 0.12s linear;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  height: auto;
  overflow: hidden;
}
.product-card__head {
  position: relative;
  margin-bottom: 6px;
}
.product-card .product-hintsbox {
  position: absolute;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  top: 0px;
  left: 0;
}
.product-card .product-hint {
  padding: 7.5px 7px 6px 7px;
  border-radius: 4px;
  overflow: hidden;
  font-family: var(--latoFont);
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.2px;
  color: #fff;
  text-transform: uppercase;
  line-height: 1;
}
.product-card .product-hint b {
  opacity: 0.5;
}
.product-card .product-hint.hint-r {
  background: #FF6569;
}
.product-card .product-hint.hint-g {
  background: #80A584;
}
.product-card .product-hint.hint-y {
  background: #C1569C;
}
.product-card .product-hint.hint-o {
  background: #EDA500;
}
.product-card__image {
  display: block;
  position: relative;
  padding-top: calc(var(--ms-card-img-h, 228) / var(--ms-card-img-w, 228) * 100%);
  height: 0;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
  z-index: 0;
}
.product-card__image img {
  border-radius: 8px;
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.ms-image-product-crop .product-card__image img {
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  transform: none;
  object-fit: cover;
  object-position: center;
}
.product-card__base {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
}
.product-card__adds {
  position: static;
  box-shadow: none;
  background: #fff;
  width: 100%;
  padding: 20px 0 0 0;
  z-index: 1;
}
.product-card__adds button.card-adds-open {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  background: none;
  color: var(--links);
  font-size: 14px;
}
.product-card__adds button.card-adds-open i[class*=icon-] {
  display: flex;
  font-size: 6px;
}
.product-card__adds .card-adds-inner {
  display: none;
}
.product-card .card-opt:not(:last-child) {
  margin-bottom: 14px;
}
.product-card .card-opt > span {
  display: inline-block;
  margin-bottom: 12px;
  color: #636D7A;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}
.product-card .card-opt__row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.product-card__foot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-top: auto;
}
.product-card__info {
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
.product-card__infotop {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-bottom: 10px;
}
.product-card__rate {
  display: flex;
  align-items: baseline;
  gap: 5px;
}
.product-card__rate i[class*=icon-] {
  font-size: 12px;
}
.product-card__rate span {
  color: var(--alt);
  font-family: var(--latoFont);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}
.product-card__rate.no-rate i[class*=icon-]::before {
  color: #E0E3EA;
}
.product-card__revs {
  color: var(--alt);
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
}
.product-card__prices {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.product-card__prices span {
  color: #000;
  font-family: var(--latoFont);
  font-size: 15px;
  font-weight: 700;
  line-height: 22px;
  white-space: nowrap;
}
.product-card__prices s {
  color: var(--alt);
  font-family: var(--latoFont);
  font-size: 12px;
  font-weight: 400;
  line-height: 22px;
}
.product-card__opt {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 12px;
}

.stock-status {
  display: flex;
  align-items: center;
  position: relative;
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
  gap: 6px;
  min-height: 1em;
  min-width: 0;
}
.stock-status.in-stock {
  color: var(--green);
}
.stock-status.in-stock::before {
  display: flex;
  font-family: "icons";
  content: "\e91e";
  font-size: 13px;
  color: var(--green);
}
.stock-status.no-stock {
  color: var(--alt);
}
.stock-status.no-stock::before {
  position: relative;
  display: flex;
  top: 1px;
  font-family: "icons";
  content: "\e918";
  font-size: 13px;
  color: var(--redlight);
}

button.add-fav {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 18px;
  height: 17px;
  font-size: 17px;
  padding: 0;
  outline: none;
  flex-shrink: 0;
}
button.add-fav i[class*=icon-] {
  font-size: inherit;
}
button.add-fav i[class*=icon-]::before {
  transition: all 0.12s linear;
}
button.add-fav:hover i[class*=icon-]::before, button.add-fav.added i[class*=icon-]::before {
  content: "\E926";
  color: var(--green);
  transition: all 0.12s linear;
}

.product-card__desc {
  flex: 1 1 auto;
  min-height: 0;
}
.product-card__desc p {
  line-height: 1.6;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--ms-card-desc-m, 3);
  color: #858A95;
}
.product-card__desc .product-name {
  color: #000;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}
.product-card__desc .product-cat {
  display: inline-block;
  margin-top: 6px;
  color: var(--alt);
  font-size: 13px;
  font-weight: 400;
  line-height: 16px;
}

.add-to-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 4px;
  background: var(--ms-cart-bg, var(--green));
  padding: 9px 17px;
  color: #FFF;
  text-align: center;
  font-family: var(--latoFont);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  transition: filter 0.12s linear;
}
.add-to-cart > i[class*="icon-"] {
  font-size: 14px;
  line-height: 1;
  color: inherit;
}
.add-to-cart:hover {
  filter: brightness(0.94);
}
.add-to-cart.in-cart {
  background: color-mix(in srgb, var(--ms-cart-tone, var(--green)) 38%, #84A9B4);
  filter: none;
}
.add-to-cart.in-cart:hover {
  filter: brightness(0.96);
}
.add-to-cart[disabled] {
  pointer-events: none;
}

@media screen and (min-width: 576px) {
  .product-card {
    border-radius: 8px;
    border: 1px solid #ECEEF2;
  }
  .product-card .product-hintsbox {
    position: absolute;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    top: 4px;
    left: -8px;
  }
  .product-card__main {
    border-radius: 8px;
    padding: 16px 15px 20px 15px;
  }
  .product-card__head {
    margin-bottom: 12px;
  }
  .product-card__prices {
    margin-bottom: 5px;
  }
  .product-card__prices span {
    font-size: 17px;
    font-weight: 700;
    line-height: 22px;
  }
  .product-card__opt {
    margin-bottom: 10px;
  }
  .product-card__desc p {
    font-size: 14px;
    line-height: 1.6;
  }
  .product-card__desc .product-cat {
    font-size: 14px;
    color: var(--alt);
  }
  .stock-status {
    font-size: 14px;
  }
  .add-to-cart {
    border-radius: 6px;
    padding: 11px 24px;
    font-size: 14px;
  }
}
@media screen and (max-width: 991px) {
  /* Соседи в ряду делят две строки: текст с кнопкой и ссылку вариантов.
     Кнопка встаёт на одну линию, пустая ссылка высоту ряда не добавляет. */
  .category-grid > .product-card {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 2;
  }
  .product-card__main {
    display: contents;
  }
  .product-card__base {
    height: 100%;
    padding: 16px 10px 0 9px;
  }
  .product-card__foot {
    padding-bottom: 16px;
  }
  .product-card__adds {
    margin-top: -8px;
    padding: 0 10px 16px 9px;
  }
}
@media screen and (min-width: 576px) and (max-width: 991px) {
  .product-card__base {
    padding: 16px 15px 0 15px;
  }
  .product-card__foot {
    padding-bottom: 16px;
  }
  .product-card__adds {
    margin-top: -8px;
    padding: 0 15px 16px 15px;
  }
}
body.ms-desc-m-0 .product-card__desc p {
  display: none;
}
@media screen and (min-width: 992px) {
  .product-card {
    margin: -1px;
    position: relative;
    z-index: 1;
    transition: filter 0.15s ease, border-color 0.12s ease-in;
  }
  .product-card__image {
    padding: 0;
    padding-top: 0;
    height: auto;
    min-height: 0;
    max-height: none;
    aspect-ratio: var(--ms-card-img-w, 228) / var(--ms-card-img-h, 228);
  }  
  .product-card__adds {
    position: absolute;
    top: calc(100% - 20px);
    background: #fff;
    width: 100%;
    left: 0;
    padding: 16px 15px 20px 15px;
    border-radius: 0 0 8px 8px;
    z-index: 1;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  }
  .product-card__prices {
    margin-bottom: 7px;
    align-items: baseline;
    gap: 11px;
  }
  .product-card__prices span {
    font-size: 20px;
  }
  .product-card__prices s {
    font-size: 14px;
    line-height: 1;
  }
  .product-card__adds button.card-adds-open {
    display: none;
  }
  .product-card__adds .card-adds-inner {
    display: block !important;
  }
  .product-card__opt {
    margin-bottom: 10px;
  }
  .product-card__desc a {
    font-size: 16px;
    -webkit-line-clamp: 3;
  }
  .product-card__desc p {
    -webkit-line-clamp: var(--ms-card-desc-d, 3);
  }
  body.ms-desc-m-0 .product-card__desc p {
    display: -webkit-box;
  }
  body.ms-desc-d-0 .product-card__desc p {
    display: none;
  }
  .product-card__desc .product-cat:hover {
    color: var(--links);
  }
  .product-card .product-hint {
    font-size: 13px;
    border-radius: 6px;
    padding: 9px 8px 7px 8px;
  }
  .product-card__info {
    margin-bottom: 25px;
  }
  .product-card .product-card_count.quantity-count-box {
    height: 37px;
  }
  .product-card .product-card_count.quantity-count-box button {
    /* font-size: 21px; */
  }
  .product-card__main {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 20px;
    overflow: visible;
    border-radius: 8px;
    background: #fff;
    transition: box-shadow 0.15s ease;
  }
  .product-card__base {
    height: 100%;
    flex-shrink: 0;
    min-height: 448px;
  }
  .product-card:hover {
    cursor: pointer;
    border-color: #fff;
    z-index: 5;
  }
  /* С опциями — одна тень на всю карточку (drop-shadow), без рывка overflow */
  .product-card:has(.product-card__adds):hover {
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.15));
  }
  .product-card:hover .product-card__adds {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
  /* Без блока опций — прежняя тень только на «теле» карточки */
  .product-card:not(:has(.product-card__adds)):hover .product-card__main {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  }
  .product-card:hover .product-card__desc .product-name {
    color: var(--links);
  }
}
@media screen and (min-width: 1280px) {
  .product-card__desc .product-name {
    font-size: 17px;
    line-height: 1.4;	
  }
}
@media screen and (min-width: 1320px) {
}
@media screen and (min-width: 1439px) {
}