/* One product surface across the collection, detail views and customisation. */
:root {
  --product-studio-background: linear-gradient(180deg, #dedddc 0%, #f2f2f2 65%, #ffffff 100%);
}

.collection-grid .collection-card,
.collection-related-image,
.collection-category-picture,
.collection-studio,
.quiet-atelier-preview,
.founding-live-book.quiet-atelier-preview,
.shop-piece-card-image,
.quiet-format-choice,
.quiet-format-choice[aria-pressed=true],
.collection-view-thumbnail,
.collection-colours--textiles button,
.collection-colours--textiles button[aria-pressed=true],
.founding-commission .personal-pages-composer.founding-options-open > .pp-proof,
.founding-preview-state,
.founding-options-open .founding-preview-state {
  background: var(--product-studio-background);
}

/* Transparent product layers let the parent gradient continue without seams. */
.collection-card-image,
.collection-photo-preview,
.collection-floating-studio .collection-photo-preview,
.quiet-format-choice .quiet-format-image,
:is(.collection-studio, .collection-card-image, .quiet-atelier-preview, .founding-live-book)
  :is(.atelier-page, .at-layout, .at-stage-panel, .at-studio, .at-preview-loading),
.founding-options-open .founding-live-book.quiet-atelier-preview {
  background: transparent;
}
.founding-options-open .pp-proof::before { background: transparent; }
.collection-textile{position:relative;isolation:isolate}
.collection-house-floor{position:absolute;inset:0;background:bottom center/100% 100% no-repeat;pointer-events:none;z-index:-1}
/* The floor fills the tile; product sizing and padding affect only the object. */
.collection-floor-surface{position:relative;isolation:isolate}
.collection-floor-surface>.collection-photo-floor{position:absolute;inset:0;z-index:0;pointer-events:none;background:bottom center/100% 100% no-repeat}
.collection-floor-surface>.collection-photo-floor{mask-image:linear-gradient(to bottom,#000 76%,transparent 100%)}
.collection-floor-surface>img{position:relative;z-index:1}
.collection-floor-surface>.collection-textile-fabric{z-index:1}
/* Percentage padding takes its vertical size from the width. A wide duffle
   card needs its height for the whole bag, including the handles and strap. */
.collection-card--duffle .collection-card-image>img{padding:10px 4%;box-sizing:border-box}
/* The hidden live view may prepare a hover photograph without showing a
   second product or floor over the selected catalogue photograph. */
.collection-card-image>[data-catalogue-primary=true],
.collection-card-image>[data-catalogue-primary=true] *{visibility:hidden!important}
:is(.collection-studio, .collection-card-image, .quiet-atelier-preview) .studio-light {
  display: none;
}

/* Authored cutouts and captured views retain their true leather and foil colours. */
.collection-card-image > img.collection-card-primary,
.collection-card-image > img.collection-card-alternate,
.collection-card-image > img.collection-personalised-photo {
  mix-blend-mode: normal;
}

/* Only selected cards with a decoded second view change on hover or keyboard focus. */
.collection-card-image > img.collection-card-alternate {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}
.collection-card[data-hover-ready] .collection-card-primary,
.collection-card[data-hover-ready] .collection-card-alternate {
  transition: opacity 240ms ease;
}
.collection-card[data-hover-ready] > a:focus-visible .collection-card-primary { opacity: 0; }
.collection-card[data-hover-ready] > a:focus-visible .collection-card-alternate { opacity: 1; }
/* Hover captures contain the product and shadow only. The shared floor stays
   full-width as the tile resizes or moves between collection filters. */
@media (hover: hover) and (pointer: fine) {
  .collection-card[data-hover-ready]:hover .collection-card-primary { opacity: 0; }
  .collection-card[data-hover-ready]:hover .collection-card-alternate { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .collection-card[data-hover-ready] .collection-card-primary,
  .collection-card[data-hover-ready] .collection-card-alternate { transition: none; }
}


/* White photographic plates reveal the same surface as the transparent pieces. */
.collection-related-image > img:not(.collection-personalised-photo) {
  mix-blend-mode: multiply;
}

/* Fit the whole scarf, including both fringed ends, into every tile shape. */
.collection-textile.scarf { container-type: size; }
.collection-grid .collection-card--scarf .collection-textile-fabric,
.collection-related-image .scarf .collection-textile-fabric,
.collection-studio .scarf .collection-textile-fabric,
.collection-view-thumbnail .scarf .collection-textile-fabric,
.collection-colours--textiles .scarf .collection-textile-fabric {
  width: min(94cqw, 94cqh, 680px) !important;
  max-width: none;
  height: auto;
  aspect-ratio: 1;
  flex-shrink: 0;
}

