/* Shared fit for the rack and the Admin Studio preview. */
.showroom-photo {
  position: absolute;
  inset: 0;
  display: block;
}
.showroom-photo:is([data-showroom-fit],[data-auto-fit]) .showroom-cutout {
  position: absolute;
  inset: 0 auto auto 50%;
  aspect-ratio: var(--photo-ratio);
  translate: calc(-1 * var(--hook-center, 50%)) calc(-1 * var(--hook-top));
}
.showroom-photo[data-auto-fit] .showroom-cutout {
  height: min(calc(100% / var(--photo-length)),
              calc(var(--photo-width-limit) / var(--photo-visible-ratio)));
}
.showroom-photo .showroom-cutout {
  position: absolute;
  inset: 0;
}
.showroom-photo[data-showroom-fit] .showroom-cutout {
  height: calc(100% / var(--photo-length));
}
.showroom-photo img.cloth-viz,
.showroom-photo svg.cloth-viz {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  max-width: none;
  object-fit: contain;
  object-position: center top;
  filter: none;
}
.showroom-photo[data-showroom-fit] .cloth-viz {
  position: absolute;
  inset: 0;
  clip-path: var(--top-outline, none);
}

/* The fitted silhouettes use the original photographs and their hanger positions. */
.showroom-photo[data-showroom-fit="guess"] {
  --photo-ratio: 1086 / 1448;
  --photo-length: .949;
  --hook-top: .7%;
}
.showroom-photo[data-showroom-fit="guess"] .showroom-cutout::before {
  content: "";
  position: absolute;
  left: 49.8%;
  top: 37.2%;
  width: 1px;
  height: 2.2%;
  background: #b99a81;
}
.showroom-photo[data-showroom-fit="leather-skirt"] {
  --photo-ratio: 1122 / 1402;
  --photo-length: .938;
  --hook-center: 49.7%;
  --hook-top: 2.1%;
}
.showroom-photo[data-showroom-fit="caramel"] {
  --photo-ratio: 1103 / 1426;
  --photo-length: .982;
  --hook-center: 49.2%;
  --hook-top: .8%;
}
.showroom-photo[data-showroom-fit="urban-chic"] {
  --photo-ratio: 1024 / 1536;
  --photo-length: 1.046;
  --hook-center: 49.7%;
  --hook-top: .5%;
  --pants-drop: 5.6%;
  --clip-top: 39.1%;
  --clip-width: 28%;
  --top-outline: polygon(0 0,100% 0,100% 52%,66% 52%,62.9% 37%,60.8% 33.7%,54% 34.1%,46% 34.1%,38.1% 33.7%,36.8% 37%,32% 52%,0 52%);
  --pants-outline: polygon(38.1% 33.7%,46% 34.1%,54% 34.1%,60.8% 33.7%,62.9% 37%,66% 46%,67% 52%,100% 52%,100% 100%,0 100%,0 52%,32% 52%,33.3% 46%,36.8% 37%);
}
.showroom-photo[data-showroom-fit="mocha"] {
  --photo-ratio: 1122 / 1402;
  --photo-length: 1.044;
  --hook-top: .64%;
  --pants-drop: 5.8%;
  --clip-top: 57%;
  --clip-width: 30.5%;
  --top-outline: polygon(0 0,100% 0,100% 57%,68% 57%,65.8% 51.2%,60.4% 51.8%,57.6% 51.8%,57.6% 52.4%,43% 52.4%,34.7% 51.3%,32% 57%,0 57%);
  --pants-outline: polygon(34.7% 51.3%,43% 52.4%,57.6% 52.4%,57.6% 51.8%,60.4% 51.8%,65.8% 51.2%,68% 57%,100% 57%,100% 100%,0 100%,0 57%,32% 57%);
}
.showroom-photo[data-showroom-fit="golden-chic"] {
  --photo-ratio: 1122 / 1402;
  --photo-length: .994;
  --hook-center: 49.6%;
  --hook-top: .36%;
}
.showroom-photo[data-showroom-fit] .showroom-pants {
  clip-path: var(--pants-outline);
  translate: 0 var(--pants-drop);
}
.showroom-photo .showroom-clip-bar {
  position: absolute;
  top: var(--clip-top);
  left: 50%;
  width: var(--clip-width);
  height: clamp(1px, 1.3%, 4px);
  translate: -50% 0;
  border-radius: 2px;
  background: linear-gradient(#f0dac4, #ac846d 55%, #71534b);
  box-shadow: 0 1px 2px #23121c99;
}
.showroom-photo .showroom-clip-bar::before,
.showroom-photo .showroom-clip-bar::after {
  content: "";
  position: absolute;
  top: 0;
  width: 13%;
  height: 180%;
  border: 1px solid #6e5356;
  border-radius: 2px;
  background: linear-gradient(90deg, #997974, #edceba 44%, #8d6d6e);
  box-shadow: 0 1px 2px #23121c99;
}
.showroom-photo .showroom-clip-bar::before { left: 5%; }
.showroom-photo .showroom-clip-bar::after { right: 5%; }
.showroom-photo:is([data-showroom-fit="urban-chic"],[data-showroom-fit="mocha"]) .showroom-cutout::before {
  content: "";
  position: absolute;
  top: calc(var(--clip-top) - var(--pants-drop) - 2%);
  left: 49.5%;
  width: 1%;
  height: calc(var(--pants-drop) + 2%);
  border-radius: 2px;
  background: linear-gradient(90deg, #634651, #d7b5a1, #80606a);
}

/* iPhone Safari cold-load guard: never show the rack at an interim photo size. */
#floatingProducts.showroom-initializing .floating-piece{visibility:hidden}
