/*
 * Sharmax 2.3.3 — точечные исправления карточки и галереи.
 * Уникальное имя файла исключает загрузку старой объединённой копии из кэша.
 */

/* Текст кнопки должен находиться выше её декоративного ::before-фона. */
.sx-commission-actions .btn{
  position:relative!important;
  isolation:isolate!important;
  min-width:150px;
  color:#fff!important;
}
.sx-commission-actions .btn::before{z-index:0!important}
.sx-commission-actions .btn > span{
  position:relative!important;
  z-index:2!important;
  display:inline-block!important;
  color:#fff!important;
}

/* Большое главное изображение товара. */
body.single-product .pdp-main .gallery .stage{
  height:560px!important;
  min-height:560px!important;
}
body.single-product .pdp-main .gallery .stage .stage-img{
  width:auto!important;
  height:auto!important;
  max-width:calc(100% - 40px)!important;
  max-height:calc(100% - 32px)!important;
  object-fit:contain!important;
}

/* Все превью видны: пять крупных изображений в строке без сжатия. */
body.single-product .pdp-main .gallery .thumbs{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:12px!important;
  width:100%!important;
  margin:14px 0 0!important;
  padding:0!important;
  overflow:visible!important;
}
body.single-product .pdp-main .gallery .thumbs .t{
  display:grid!important;
  place-items:center!important;
  width:auto!important;
  min-width:0!important;
  height:auto!important;
  aspect-ratio:4/3;
  flex:none!important;
  overflow:hidden!important;
}
body.single-product .pdp-main .gallery .thumbs .t img{
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  object-fit:cover!important;
}

@media(max-width:1000px){
  body.single-product .pdp-main .gallery .stage{
    height:clamp(440px,68vw,560px)!important;
    min-height:440px!important;
  }
}

@media(max-width:560px){
  body.single-product .pdp-main .gallery .stage{
    height:clamp(340px,110vw,520px)!important;
    min-height:340px!important;
  }
  body.single-product .pdp-main .gallery .thumbs{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:9px!important;
    margin-top:10px!important;
  }
}
