/* V2ASHCHUK v0.19.5 — stable image geometry on WooCommerce cards and galleries.
   Original uploads remain uncropped. Hero and about banners keep their Figma crop.
   Author: Эмиль. */

/* Each product card reserves exactly one square, independent of the uploaded
   photo's intrinsic aspect ratio or the current slider position. */
.v2-product-card .v2-product-image {
  width: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1 / 1;
  align-self: stretch;
  overflow: hidden;
}
.v2-product-card .v2-card-slides {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  align-self: stretch;
}
.v2-product-card .v2-card-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.v2-product-card .v2-card-slide img {
  display: block;
  flex: 0 0 auto;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  transform: none;
}
.v2-product-card:hover .v2-card-slide img,
.v2-product-card:focus-within .v2-card-slide img {
  transform: none;
}

/* Equal-sized cards even when titles differ in length (the photograph and
   slider always remain the same dimensions for each column). */
.v2-product-card .v2-product-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  min-height: 2.7em;
  max-height: 2.7em;
  line-height: 1.35;
  overflow: hidden;
}

/* The outfit configurator replaces src dynamically; preserve the square box,
   show the full garment, and avoid growing/shrinking on image load. */
.v2-configurator .v2-config-pic {
  width: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.v2-configurator .v2-config-pic > a {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.v2-configurator .v2-config-pic img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}
.v2-configurator .v2-config-card [data-look-name] {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

/* Single-product image tiles also keep their allocated dimensions when a
   portrait/landscape gallery photo arrives asynchronously. */
.v2-single-product-page .v2-product-gallery-item {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.v2-single-product-page .v2-product-gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
@media (max-width: 767px) {
  .v2-single-product-page .v2-product-gallery-item,
  .v2-single-product-page .v2-product-gallery-item.large {
    flex: 0 0 100%;
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
  }
}
