/* Fade the print itself into the material behind it. Keeping the mask on the
   inner photo surface leaves labels, action buttons and focus outlines intact. */
.collection-thumb,
.tour-image,
.story-image,
.kce-photo-frame,
.rug-cover,
.sample-photo-open,
.rug-thumbs button {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.collection-thumb::after { box-shadow: none; }

.collection-thumb,
.catalog-card > img,
.rug-cover > img,
.sample-photo-open > img,
.rug-thumbs img,
.rug-enquiry > img,
.cartrow > img,
.kce-photo-frame > img,
.kce-proof-strip img,
.loom-photo,
.tour-image > img,
.story-image > img {
  --feather: 3.5%;
  --mid-feather: calc(var(--feather) * .4);
  --edge-alpha: transparent, rgb(0 0 0 / .62) var(--mid-feather),
    black var(--feather), black calc(100% - var(--feather)),
    rgb(0 0 0 / .62) calc(100% - var(--mid-feather)), transparent;
  --print-mask: linear-gradient(to right, var(--edge-alpha)),
    linear-gradient(to bottom, var(--edge-alpha)),
    radial-gradient(ellipse farthest-corner, black 84%, rgb(0 0 0 / .94) 90%, transparent 100%);
  -webkit-mask-image: var(--print-mask);
  -webkit-mask-composite: source-in;
  mask-image: var(--print-mask);
  mask-composite: intersect;
  border: 0;
  box-shadow: none;
}

/* The close-up preserves the weave and the small rail keeps its legibility. */
.rug-cover > img,
.sample-photo-open > img,
.rug-enquiry > img {
  --feather: 2.2%;
}
.rug-thumbs img,
.cartrow > img,
.kce-proof-strip img {
  --feather: 2px;
}
@media (forced-colors: active) {
  :is(.collection-thumb,.catalog-card > img,.rug-cover > img,.sample-photo-open > img,
      .rug-thumbs img,.rug-enquiry > img,.cartrow > img,.kce-photo-frame > img,
      .kce-proof-strip img,.loom-photo,.tour-image > img,.story-image > img) {
    -webkit-mask-image: none;
    mask-image: none;
  }
}

/* A clipped arch cuts off a gradient before it reaches the page. */
.loom-photo { border-radius: 0; }
@media (hover: hover) {
  .kce-photo-tile:hover img,
  .tour-image:hover img,
  .story-image:hover img { transform: none; }
}
