/* TPY · каталог: две фотографии в карточке */

/* контейнер Тильды добавляет свои поля — убираем */
.uc-tpy-catalog .t-store__grid-cont{
  padding-left:0!important; padding-right:0!important;
}

/* сетка: два товара в ряд */
.uc-tpy-catalog .t-store__card-list{
  display:grid;
  grid-template-columns:repeat(2,37.3%);  /* ширина карточки */
  justify-content:space-between;
  margin-left:14px;                       /* по левому краю шапки */
  margin-right:17.86%;                    /* правая колонка сразу за ARCHIVE */
  row-gap:46px;                           /* расстояние между рядами */
}

/* служебные разделители рядов Тильды ломают сетку */
.uc-tpy-catalog .t-store__grid-separator{display:none!important;}

.uc-tpy-catalog .t-store__card,
.uc-tpy-catalog .t-store__card.t-store__stretch-col{
  width:100%!important; max-width:none!important;
  margin:0!important; padding:0!important;
  text-align:left!important;
}

/* кадры 1 и 2 рядом */
.uc-tpy-catalog .t-store__card__imgwrapper{
  display:grid;
  grid-template-columns:1fr 1fr;
  column-gap:4%;                          /* зазор между кадрами */
  padding:17px 0 0!important;             /* место под цифры */
  height:auto!important;
  overflow:visible;
}

/* товар с одним фото: кадр и подпись в половину ширины */
.uc-tpy-catalog .t-store__card:not(:has(.t-store__card__bgimg_second)) .t-store__card__imgwrapper,
.uc-tpy-catalog .t-store__card:not(:has(.t-store__card__bgimg_second)) .t-store__card__textwrapper{
  grid-template-columns:1fr;
  width:48%;
}

.uc-tpy-catalog .t-store__card__bgimg{
  position:relative!important; inset:auto!important;
  width:100%!important; height:auto!important;
  aspect-ratio:2/3;                       /* пропорция кадра */
  opacity:1!important; transition:none!important;
  overflow:visible;
}

/* цифры над кадрами — 5 px от буквы до фото */
.uc-tpy-catalog .t-store__card__bgimg::before{
  content:"1";
  position:absolute; left:0; bottom:100%;
  margin-bottom:3.5px;
  font-family:'intel'; font-size:13px; line-height:1; color:#000;
}
.uc-tpy-catalog .t-store__card__bgimg_second::before{content:"2";}

/* название слева, цена справа — 5 px от буквы до фото */
.uc-tpy-catalog .t-store__card__wrap_txt-and-btns{padding:0!important;}
.uc-tpy-catalog .t-store__card__textwrapper{
  display:flex; justify-content:space-between; align-items:flex-start;
  gap:16px; padding:0!important;
  margin-top:3.5px;
  font-size:13px; line-height:1;
}
.uc-tpy-catalog .t-store__card__title{
  margin:0!important; padding:0!important; line-height:1;
}
.uc-tpy-catalog .t-store__card__price-wrapper{
  display:flex; align-items:flex-start; justify-content:flex-end;
  margin:0!important; padding:0!important; line-height:1;
}
.uc-tpy-catalog .t-store__card__price{
  display:flex; align-items:baseline;
  margin:0!important; padding:0!important; line-height:1;
}

/* старая цена: зачёркнутая, перед текущей */
.uc-tpy-catalog .t-store__card__price_old{
  order:-1;                               /* ставим слева от новой цены */
  margin:0 8px 0 0!important;             /* зазор между ценами */
  padding:0!important;
  line-height:1;
  color:#B90019;                          /* цвет старой цены */
  text-decoration:line-through;
}
.uc-tpy-catalog .t-store__card__price_old .t-store__card__price-value,
.uc-tpy-catalog .t-store__card__price_old .t-store__card__price-currency{
  line-height:1!important; vertical-align:baseline!important;
}

/* «Нет в наличии» не показываем */
.uc-tpy-catalog .js-store-prod-sold-out{display:none!important;}

/* узкие экраны: один товар в ряд, шапка на фиксированных 11 px */
@media screen and (max-width:640px){
  .uc-tpy-catalog .t-store__card-list{
    grid-template-columns:1fr!important;
    margin-left:11px; margin-right:11px;
    row-gap:32px;
  }
}

/* телефоны: шапка тянется вместе с экраном, поэтому проценты */
@media screen and (max-width:479px){
  .uc-tpy-catalog .t-store__card-list{
    margin-left:3%;                       /* по CLO в шапке */
    margin-right:3.24%;                   /* по (0) в шапке */
  }
}

/* подсветка карточки под курсором */
@media (hover:hover){
  .uc-tpy-catalog .t-store__card{
    transition:opacity .15s linear;
  }
  .uc-tpy-catalog .t-store__card:hover{
    opacity:.83;
  }
}