.product-photo {
  overflow: hidden;
  background: #f5f5f2;
}

.product-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-gallery {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  background: #d9ddd9;
}

.product-gallery img {
  min-width: 0;
  min-height: 0;
}

.product-gallery .product-main {
  grid-row: 1 / 3;
  object-fit: cover;
}

.product-gallery img:not(.product-main) {
  background: #fff;
}

.single-product {
  padding: 12px;
  background: #fff;
}

.gallery {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
}

.gallery img {
  flex: 0 0 auto;
  height: auto;
  padding: 0;
  border: 5px solid #10251b;
  object-fit: initial;
  object-position: center;
  background: transparent;
  box-shadow: 0 14px 35px #071b111f;
}

@media (min-width: 901px) {
  .gallery img:nth-child(1) {
    width: calc(47.0588235% - 11.2941176px);
  }

  .gallery img:nth-child(2),
  .gallery img:nth-child(3) {
    width: calc(26.4705882% - 6.3529412px);
  }

  .gallery img:nth-child(n + 4) {
    width: calc(25% - 9px);
  }
}

@media (max-width: 900px) {
  .gallery img:nth-child(n) {
    width: calc(50% - 6px);
  }
}

@media (max-width: 560px) {
  .gallery img:nth-child(n) {
    width: 100%;
  }
}
