.product-image {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-color: #fff !important;
}

.product-main {
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, .8fr) !important;
}

.gallery {
  grid-template-columns: 78px minmax(0, 1fr) !important;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.main-photo {
  width: 100% !important;
  max-width: 100%;
  min-width: 0;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  overflow: hidden;
  background: #fff;
}

.main-photo > img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  object-fit: contain !important;
}

.buy-info {
  position: relative;
  z-index: 2;
  min-width: 0;
  background: #fff;
}

.thumbs button {
  width: 100%;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  overflow: hidden;
}

.thumbs img,
.product-cell img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1 !important;
  object-fit: contain !important;
  background: #fff !important;
}

.overview-item img,
.image-thumb,
.cart-item > img,
.search-suggestions img {
  aspect-ratio: 1 / 1 !important;
  object-fit: contain !important;
  background: #fff !important;
}

.related-card img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: contain !important;
  background: #fff;
}

.product-card[data-open-product] { cursor: pointer; }

.choice > div { align-items: center; }
.variant-button {
  border: 1px solid #aeb4c0;
  border-radius: 6px;
  padding: 10px 14px;
  background: #fff;
  color: #252936;
  cursor: pointer;
  transition: .18s ease;
}
.variant-button:hover { border-color: #4f75ee; color: #2859dc; }
.variant-button.active {
  border: 2px solid #3972f5;
  padding: 9px 13px;
  color: #174fcf;
  background: #edf3ff;
  box-shadow: 0 0 0 2px #3972f51a;
}
.variant-button.active::before { content: '✓ '; font-weight: 800; }

@media (max-width: 850px) {
  .product-main { grid-template-columns: minmax(0, 1fr) !important; }
  .gallery { max-width: 680px; margin: auto; }
}

@media (max-width: 540px) {
  .gallery { grid-template-columns: minmax(0, 1fr) !important; overflow: visible; }
  .main-photo { height: auto !important; }
  .thumbs { display: flex; overflow-x: auto; }
  .thumbs button { flex: 0 0 62px; width: 62px !important; height: 62px !important; }
}
