/* Keep every side of the frame inside the thumbnail: outer shadows were
   clipped by the product card and by recommendation carousels. */
body:is(#index,#category,#search,#new-products,#prices-drop,#best-sales,#manufacturer,#product,#cart) #wrapper .product-miniature {
  --sylt-card-frame: #ffdbd6;
}
body:is(#index,#category,#search,#new-products,#prices-drop,#best-sales,#manufacturer,#product,#cart) #wrapper .product-miniature:nth-child(4n+2) { --sylt-card-frame: #d0ebfb; }
body:is(#index,#category,#search,#new-products,#prices-drop,#best-sales,#manufacturer,#product,#cart) #wrapper .product-miniature:nth-child(4n+3) { --sylt-card-frame: #ffdf84; }
body:is(#index,#category,#search,#new-products,#prices-drop,#best-sales,#manufacturer,#product,#cart) #wrapper .product-miniature:nth-child(4n+4) { --sylt-card-frame: #f6d3e0; }
body:is(#product,#cart) #wrapper .swiper-slide:nth-child(4n+2) .product-miniature { --sylt-card-frame: #d0ebfb; }
body:is(#product,#cart) #wrapper .swiper-slide:nth-child(4n+3) .product-miniature { --sylt-card-frame: #ffdf84; }
body:is(#product,#cart) #wrapper .swiper-slide:nth-child(4n+4) .product-miniature { --sylt-card-frame: #f6d3e0; }

body:is(#index,#category,#search,#new-products,#prices-drop,#best-sales,#manufacturer,#product,#cart) #wrapper .product-miniature .product-thumbnail {
  position: relative;
  aspect-ratio: 1;
  box-shadow: none !important;
}
body:is(#index,#category,#search,#new-products,#prices-drop,#best-sales,#manufacturer,#product,#cart) #wrapper .product-miniature .product-thumbnail::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  box-sizing: border-box;
  border: 4px solid var(--sylt-card-frame, #ffdbd6);
  border-radius: inherit;
  pointer-events: none;
}

/* Reserve breathing room for both the cover and hover photo. Keep reviewed
   transparent cutouts under their existing composition rules. */
body:is(#index,#category,#search,#new-products,#prices-drop,#best-sales,#manufacturer,#product,#cart) #wrapper .product-miniature .product-thumbnail img:not(.js-sylt-cutout) {
  box-sizing: border-box;
  width: 100% !important;
  height: 100% !important;
  padding: 7px;
  object-fit: contain;
  object-position: center;
}
