/* Product photo surfaces, approved variant A. Only the dark storefront theme. */
html[data-aq-scheme="dark"] body :is(
  .catalog-item__image-container,
  .product__images,
  .product__image,
  .catalog-item__image,
  .product-gallery .gallery-main__slide:has(> a[data-type="image"]),
  .product-gallery .small-slider-image:not(.small-slider-image--iframe):not(.small-slider-image--video),
  .detail__fixed-header-image,
  .header-basket-image,
  .basket-item-image,
  .bx-soa-item-imgcontainer,
  .search-dropdown-item[data-product-id] > a > div:first-child:has(img)
) {
  background-color: #fff !important;
  border-radius: 8px !important;
  overflow: hidden;
}

/* Inset the photograph, without changing carousel or card dimensions. */
html[data-aq-scheme="dark"] body :is(
  .catalog-item__image,
  .product__image,
  .product-gallery .gallery-main__slide:has(> a[data-type="image"])
) img {
  box-sizing: border-box;
  padding: 12px;
}

html[data-aq-scheme="dark"] body :is(
  .product-gallery .small-slider-image:not(.small-slider-image--iframe):not(.small-slider-image--video),
  .detail__fixed-header-image,
  .header-basket-image,
  .basket-item-image,
  .search-dropdown-item[data-product-id] > a > div:first-child:has(img)
) img {
  box-sizing: border-box;
  padding: 4px;
}

/* Photo overlay controls keep their contrast on the white surface. */
html[data-aq-scheme="dark"] body :is(
  .catalog-item__card-controls-item,
  .product-gallery .actions > button
) {
  color: #0B478D;
}

html[data-aq-scheme="dark"] body .catalog-item__card-controls-item {
  background-color: #fff;
}

html[data-aq-scheme="dark"] body :is(
  .catalog-item__card-controls-item.favorite-btn,
  .product-gallery .actions > .favorite-btn
) svg {
  stroke: #0B478D;
}

/* The native zoom viewer is shared with other content: scope it to product pages. */
html[data-aq-scheme="dark"] body:has(.product-gallery) .glightbox-container .gslide-image img {
  box-sizing: border-box;
  background-color: #fff;
  border-radius: 8px;
  padding: 12px;
}
