/* === Product image quality guards === */
body.products .ProductItem .Image {
  display:flex;
  justify-content:center;
  align-items:center;
  aspect-ratio:1 / 1;
  overflow:visible;
}
body.products .ProductItem .Image > IMG.lazy,
body.products .ProductItem .Image > IMG:not([class*='ribbon']) {
  width:auto;
  max-width:300px;
  max-width:min(300px, calc(100% - 2px));
  max-height:300px;
  max-height:min(300px, calc(100% - 2px));
  height:auto;
  margin:auto;
  image-rendering:auto;
  border-radius:8px;
}
@media (min-width: 901px) {
  body.products .column.products_list .subcategories A,
  body.products .column.products_list .subcategories A IMG {
    max-width:304px;
  }
}
body.details .column.product .column.photos .photo.big {
  display:flex;
  justify-content:center;
  align-items:center;
  overflow:visible;
}
body.details .column.product .column.photos .photo.big > IMG:not([class*='ribbon']) {
  display:block;
  width:auto;
  max-width:100%;
  height:auto;
  margin:auto;
}

/* === Details gallery and popup visual layer === */
body.details .column.product .photo.gallery {
  display:flex;
  flex-wrap:wrap;
  align-items:flex-start;
  justify-content:flex-start;
  gap:8px;
  width:100%;
  max-width:100%;
  margin:12px 0 10px 0;
  padding:0;
  box-sizing:border-box;
}
body.details .column.product .photo.gallery .item {
  display:flex;
  align-items:center;
  justify-content:center;
  width:102px;
  height:102px;
  margin:0;
  padding:0;
  border:1px solid #bbbbbb;
  background:#ffffff;
  box-sizing:border-box;
}
body.details .column.product .photo.gallery .item A.product_detail_thumb_link {
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:100%;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
body.details .column.product .photo.gallery .item.is_active {
  border-color:#e3262e;
}
body.details .column.product .photo.gallery .item IMG {
  display:block;
  width:auto;
  height:auto;
  max-width:100px;
  max-height:100px;
  object-fit:contain;
  margin:auto;
}
@media (max-width: 900px) {
  body.details .column.product .photo.gallery {
    justify-content:center;
    gap:8px;
  }
}

@media (max-width:900px) {
  .caption.category_path A {
    font-size:14px;
  }

  .TreeView .Node .Handle .Button {
    width:15px;
    height:15px;
    min-width:15px;
    min-height:15px;
    max-width:15px;
    max-height:15px;
    box-sizing:border-box;
  }

  body.details .GalleryTape .viewport {
    display:block;
    width:100%;
    max-width:100%;
    overflow-x:auto;
    overflow-y:visible;
    -webkit-overflow-scrolling:touch;
    scroll-snap-type:x mandatory;
    touch-action:pan-x pan-y;
    scrollbar-width:thin;
    height:auto;
    max-height:none;
  }

  body.details .GalleryTape {
    display:block;
    width:100%;
    max-width:100%;
    border-top:0;
    border-bottom:1px solid #bbbbbb;
    box-sizing:border-box;
  }

  body.details .GalleryTape .button.left,
body.details .GalleryTape .button.right {
    display:none;
  }

  body.details .GalleryTape .slots {
    display:flex;
    flex-wrap:nowrap;
    align-items:stretch;
    gap:10px;
    width:max-content;
    min-width:100%;
    max-width:none;
    overflow:visible;
    height:auto;
    max-height:none;
    white-space:normal;
  }

  body.details .GalleryTape .slots .slot {
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:flex-start;
    flex:0 0 min(58vw, 220px);
    width:min(58vw, 220px);
    max-width:220px;
    height:auto;
    max-height:none;
    overflow:visible;
    scroll-snap-align:start;
  }

  body.details .GalleryTape .slots .slot A {
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:flex-start;
    width:100%;
    max-width:100%;
    white-space:normal;
    box-sizing:border-box;
  }

  body.details .GalleryTape .slots .slot .slot_product_name {
    width:100%;
    max-width:100%;
    height:50px;
    min-height:50px;
    max-height:50px;
    margin-bottom:10px;
    font-size:14px;
    line-height:1.2;
    white-space:normal;
    overflow-wrap:anywhere;
    box-sizing:border-box;
  }
}

body.products .ProductItem .summary .price_panel {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  margin-top:auto;
}

body.products .ProductItem .summary .product_item_prices {
  display:flex;
  order:1;
  flex:0 0 auto;
  flex-direction:column;
  align-items:flex-start;
  justify-content:flex-start;
  margin-left:0;
  margin-right:auto;
  text-align:left;
}

body.products .ProductItem .summary .product_item_prices .regular_price,
body.products .ProductItem .summary .product_item_prices .sell_price {
  width:auto;
  max-width:100%;
  text-align:left;
}



@media screen and (max-width: 900px) {
  body.products .ProductItem .product_card_highlights {
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:5px;
    width:auto;
    max-width:none;
    margin:0 0 10px 0;
    padding:0;
  }
  body.products .ProductItem .product_card_highlight {
    min-height:36px;
    padding:5px 6px;
    border-radius:9px;
  }
  body.products .ProductItem .product_card_highlight_icon {
    flex-basis:20px;
    width:20px;
    height:20px;
    margin-right:10px;
    font-size:20px;
  }
  body.products .ProductItem .product_card_highlight_label {
    font-size:12px;
  }
  body.products .ProductItem .product_card_highlight_value {
    font-size:13px;
    font-weight:700;
  }
}

