/* The room is a single stage. Product cards move on a shallow arc around a stationary model. */
:root {
  --fit-ink: #30291f;
  --glass: rgba(247, 242, 230, 0.66);
  --room-x: clamp(18px, 3.8vw, 66px);
}
.fit-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 12;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: clamp(16px, 2.3vw, 35px) var(--room-x);
  color: var(--fit-ink);
  pointer-events: none;
}
.fit-header > * {
  pointer-events: auto;
}
.fit-header .studio-logo {
  font-family: var(--serif);
  font-size: clamp(29px, 2.75vw, 47px);
  letter-spacing: -0.035em;
}
.fit-header .studio-logo span {
  font: 600 0.51rem/1 var(--copy);
  letter-spacing: 0.43em;
}
#room-tabs,
.room-rail,
.selection-dock,
.orbit-arrow,
.room-replay,
.bikini-picker,
.fit-header-tools .bagbtn {
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 4px 23px #392a1712;
}
#room-tabs,
.bikini-picker {
  display: flex;
  align-items: center;
  gap: 3px;
  border-radius: 30px;
  padding: 4px;
}
#room-tabs button,
.bikini-picker button {
  padding: 7px 17px;
  border-radius: 22px;
  font-size: 0.82rem;
  color: #463b2d;
  line-height: 1.35;
}
#room-tabs [aria-pressed="true"],
.bikini-picker [aria-pressed="true"] {
  background: #fffdf7;
  color: #2f271e;
  box-shadow: 0 1px 7px #4b392719;
}
.fit-header-tools {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.74rem;
  letter-spacing: 0.13em;
}
.fit-header-tools .bagbtn {
  border-radius: 30px;
  padding: 7px 11px;
  gap: 8px;
  min-height: 35px;
}
.fit-header-tools .bagbtn svg {
  width: 17px;
}
.fitting {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  height: 100svh;
  min-height: 590px;
  max-height: 1250px;
  background: #cbb899 url(/media/fit/sala.webp) center center/cover no-repeat;
  color: var(--fit-ink);
}
.fitting:before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    #f1e9d745,
    transparent 26%,
    transparent 72%,
    #4e3c281b
  );
}
.wall-type {
  position: absolute;
  top: 12.5%;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 249, 228, 0.67);
  font: 400 clamp(112px, 17vw, 320px) / 0.96 var(--serif);
  letter-spacing: -0.055em;
  user-select: none;
  z-index: -1;
}
.fit-stage {
  position: absolute;
  inset: 0;
  outline-offset: -6px;
  touch-action: pan-y;
}
#dress-target {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 0;
  height: 79%;
  width: clamp(190px, 27.5vw, 530px);
  padding: 0;
  transform: translateX(-50%);
  border: 0;
  background: none;
  outline-offset: 0;
  touch-action: pan-y;
}
#dress-layers,
.dress-image {
  width: 100%;
  height: 100%;
  display: block;
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.dress-image {
  object-fit: contain;
  object-position: center bottom;
}
.dress-image:first-child {
  animation: dress-intro 0.78s both ease-out;
}
.dress-image.previous-dress {
  animation: none;
}
.dress-image.changing-dress {
  animation: fit-wipe 0.53s cubic-bezier(0.28, 0.49, 0.4, 1) both;
}
#dress-target.drop-ready:after {
  content: "Soltar para probar";
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #322d25ed;
  color: #fffdf7;
  border-radius: 20px;
  padding: 8px 16px;
  white-space: nowrap;
  font: 13px var(--copy);
}
@keyframes dress-intro {
  0% {
    opacity: 0;
    clip-path: inset(0 0 100%);
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    clip-path: inset(0);
    transform: none;
  }
}
@keyframes fit-wipe {
  0% {
    clip-path: inset(0 0 100%);
    opacity: 0.25;
    filter: brightness(1.16);
  }
  100% {
    clip-path: inset(0);
    opacity: 1;
    filter: none;
  }
}
#orbit {
  position: absolute;
  inset: 0;
  perspective: 1200px;
  pointer-events: none;
}
.garment {
  --distance: calc(var(--slot) * 21vw);
  --scale: 1;
  --tilt: calc(var(--slot) * -4deg);
  position: absolute;
  top: 51%;
  left: 50%;
  border: 1px solid #fff9eea6;
  border-radius: 16px;
  padding: clamp(11px, 1.3vw, 22px);
  width: clamp(132px, 12.7vw, 240px);
  height: clamp(182px, 19.5vw, 325px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  pointer-events: auto;
  touch-action: none;
  color: #30291f;
  background: linear-gradient(135deg, #fff9eabb, #eee1cd80 65%, #e4d7c087);
  box-shadow:
    0 10px 30px #46382018,
    inset 0 1px 2px #ffffff70;
  backdrop-filter: blur(13px);
  -webkit-backdrop-filter: blur(13px);
  transform: translate(-50%, -50%) translateX(var(--distance))
    scale(var(--scale)) rotateY(var(--tilt));
  transition:
    transform 0.66s cubic-bezier(0.2, 0.7, 0.2, 1),
    opacity 0.45s,
    background 0.25s;
  cursor: grab;
  z-index: 3;
}
.garment[data-depth="2"] {
  --distance: calc(var(--slot) * 18.1vw);
  --scale: 0.75;
  opacity: 0.96;
  z-index: 2;
}
.garment[data-depth="3"] {
  --distance: calc(var(--slot) * 15.5vw);
  --scale: 0.55;
  opacity: 0.82;
  z-index: 1;
}
.garment[data-depth="4"] {
  pointer-events: none;
  opacity: 0;
}
.garment:hover,
.garment:focus-visible {
  background: #fff8e9d4;
}
.garment:active {
  cursor: grabbing;
}
.garment img {
  flex: 1;
  min-height: 0;
  width: 95%;
  object-fit: contain;
  filter: drop-shadow(0 4px 3px #2c1a131c);
  pointer-events: none;
}
.garment-caption {
  display: grid;
  gap: 1px;
  text-align: center;
  line-height: 1.2;
}
.garment-caption strong {
  font: 400 clamp(19px, 1.7vw, 29px) / 1.12 var(--serif);
}
.garment-caption > span {
  font-size: clamp(11px, 0.92vw, 15px);
}
.fitting .orbit-arrow {
  position: absolute;
  top: 68%;
  transform: translateY(-50%);
  border-radius: 50%;
  height: 36px;
  width: 36px;
  display: grid;
  place-items: center;
  z-index: 5;
}
.orbit-arrow svg {
  width: 16px;
}
.orbit-arrow.previous {
  left: calc(50% - 23vw);
}
.orbit-arrow.following {
  right: calc(50% - 23vw);
}
.room-rail {
  position: absolute;
  top: 50%;
  left: var(--room-x);
  transform: translateY(-50%);
  z-index: 7;
  border-radius: 28px;
  padding: 5px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.room-rail button,
.room-replay {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #332b22;
}
.room-rail [aria-pressed="true"] {
  background: #fffaf0;
}
.room-rail svg {
  width: 16px;
  height: 16px;
}
.room-replay {
  position: absolute;
  bottom: 22px;
  right: var(--room-x);
  z-index: 6;
}
.room-replay svg {
  width: 14px;
  height: 14px;
}
.fit-help {
  position: absolute;
  left: 50%;
  bottom: calc(clamp(18px, 3svh, 42px) + 88px);
  transform: translateX(-50%);
  color: #352c21;
  background: #fffaf0df;
  border: 1px solid #fffcf2;
  border-radius: 30px;
  padding: 5px 12px;
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 0.71rem;
  white-space: nowrap;
  pointer-events: none;
  z-index: 6;
}
.help-mark {
  font-size: 14px;
  color: #855336;
}
.selection-dock {
  position: absolute;
  z-index: 7;
  bottom: clamp(18px, 3svh, 42px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: clamp(13px, 2vw, 32px);
  padding: 10px 14px;
  border-radius: 16px;
  background: linear-gradient(110deg, #fffaf0df, #f0e7d9c4);
  max-width: 96vw;
  min-height: 72px;
  backdrop-filter: blur(18px);
}
.dock-piece {
  display: flex;
  gap: 10px;
  align-items: center;
  text-align: left;
  white-space: nowrap;
  padding: 0;
}
.dock-piece img {
  width: 44px;
  height: 51px;
  object-fit: contain;
  background: #fff9ef7a;
  padding: 5px;
  border-radius: 9px;
}
.dock-piece > span {
  display: grid;
  line-height: 1.2;
}
.dock-piece small {
  font-size: 0.55rem;
  letter-spacing: 0.14em;
}
.dock-piece strong {
  font: 25px/1.1 var(--serif);
}
.dock-piece > span > span {
  font-size: 0.72rem;
}
.dock-sizes,
.dock-color {
  display: grid;
  gap: 4px;
}
.dock-sizes > span,
.dock-color > span {
  font-size: 0.66rem;
  color: #5d4e40;
}
.dock-sizes > div {
  display: flex;
  gap: 4px;
}
.dock-sizes button,
.dock-color i {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #ab9d8e66;
}
.dock-sizes button {
  padding: 0;
  font-size: 0.7rem;
  background: #fff9ef80;
}
.dock-sizes [aria-pressed="true"] {
  background: #3a2f25;
  color: white;
  border-color: #3a2f25;
}
.dock-color b {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 400;
  white-space: nowrap;
}
.dock-color i {
  width: 18px;
  height: 18px;
  outline: 1px solid #a69580;
  outline-offset: 2px;
  margin: 4px;
}
.dock-buy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 24px;
  padding: 10px 16px;
  background: #3c3027;
  color: #fff8ee;
  font-size: 0.79rem;
}
.dock-buy svg {
  width: 15px;
  height: 15px;
}
.dock-feedback:not(:empty) {
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%);
  background: #3b2f27;
  color: white;
  padding: 5px 12px;
  border-radius: 15px;
  white-space: nowrap;
  font-size: 0.74rem;
}
.room-caption {
  position: absolute;
  bottom: 25px;
  left: var(--room-x);
  display: flex;
  align-items: center;
  gap: 7px;
  color: #392f24;
  font-size: 0.72rem;
}
.room-caption b {
  width: 15px;
  height: 1px;
  background: currentColor;
}
.room-caption span:last-child {
  font-size: 0.59rem;
  letter-spacing: 0.11em;
}
.bikini-picker {
  position: absolute;
  z-index: 10;
  top: clamp(76px, 6.5vw, 109px);
  left: 50%;
  transform: translateX(-50%);
}
.bikini-picker button {
  font-size: 0.73rem;
  padding: 5px 12px;
}
.try-token {
  position: fixed;
  z-index: 50;
  width: 76px;
  height: 90px;
  pointer-events: none;
  transform: translate(-50%, -50%);
  background: #fff9ecda;
  border: 1px solid white;
  border-radius: 15px;
  padding: 7px;
}
.try-token img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.catalog-mode .fit-header {
  position: relative;
  background: var(--paper);
}
.catalog-mode .fit-header #room-tabs {
  background: #e9e0d5;
}
.back-fit {
  color: #eee1ce;
  text-decoration: underline;
  text-underline-offset: 4px;
  padding: 9px 0;
  font-size: 0.81rem;
}
#catalog-lines select {
  border: 1px solid #6c645d;
  padding: 6px;
  background: #282623;
  color: var(--paper);
  margin-bottom: 12px;
}
@media (min-width: 1500px) {
  #dress-target {
    height: 80%;
  }
}
@media (max-width: 900px) {
  .garment {
    width: 15vw;
    min-width: 112px;
    height: 21.8vw;
    min-height: 162px;
  }
  .garment[data-depth="3"] {
    opacity: 0.38;
  }
  .room-caption span:last-child,
  .room-caption b {
    display: none;
  }
  .selection-dock {
    gap: 14px;
  }
  .wall-type {
    top: 18%;
  }
  .room-rail {
    left: 12px;
  }
  .fit-header {
    padding-inline: 20px;
  }
  #dress-target {
    width: 32vw;
  }
}
@media (max-width: 640px) {
  .fitting {
    height: 100svh;
    min-height: 600px;
    max-height: 1050px;
    background-position: 51% center;
  }
  .fit-header {
    grid-template-columns: 1fr auto;
    padding: 15px 17px;
  }
  .fit-header .studio-logo {
    font-size: 28px;
  }
  .fit-header .studio-logo span {
    font-size: 0.42rem;
  }
  .fit-header-tools {
    gap: 8px;
  }
  .fit-header #room-tabs {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 65px;
    white-space: nowrap;
  }
  .fit-header #room-tabs button {
    padding: 6px 13px;
    font-size: 0.78rem;
  }
  .wall-type {
    top: 19%;
    font-size: 29vw;
  }
  .bikini-picker {
    top: 108px;
  }
  .bikini-picker button {
    padding: 4px 9px;
    font-size: 0.68rem;
  }
  #dress-target {
    width: 56vw;
    height: 70%;
    bottom: 45px;
  }
  .garment {
    width: 25vw;
    min-width: 0;
    height: 36vw;
    min-height: 124px;
    top: 48%;
    padding: 9px 7px;
    gap: 6px;
    border-radius: 11px;
    --distance: calc(var(--slot) * 35.5vw);
    --tilt: calc(var(--slot) * -6deg);
  }
  .garment-caption strong {
    font-size: 18px;
  }
  .garment-caption > span {
    font-size: 0.66rem;
  }
  .garment[data-depth="2"] {
    --distance: calc(var(--slot) * 28vw);
    --scale: 0.67;
    pointer-events: none;
  }
  .garment[data-depth="3"] {
    opacity: 0;
    pointer-events: none;
  }
  .room-rail {
    top: unset;
    left: 15px;
    bottom: calc(25% + 38px);
    transform: none;
    padding: 3px;
    flex-direction: row;
    gap: 1px;
  }
  .room-rail button {
    width: 26px;
    height: 28px;
  }
  .room-rail svg {
    width: 14px;
  }
  .fitting .orbit-arrow {
    top: 60%;
    width: 29px;
    height: 29px;
  }
  .orbit-arrow.previous {
    left: 10%;
  }
  .orbit-arrow.following {
    right: 10%;
  }
  .selection-dock {
    width: calc(100% - 24px);
    max-width: 460px;
    bottom: 15px;
    min-height: 75px;
    gap: 8px;
    justify-content: space-between;
    padding: 8px;
    border-radius: 13px;
    flex-wrap: wrap;
  }
  .dock-piece {
    gap: 6px;
  }
  .dock-piece img {
    width: 30px;
    height: 42px;
    padding: 3px;
  }
  .dock-piece strong {
    font-size: 23px;
  }
  .dock-color {
    display: none;
  }
  .dock-buy {
    padding: 9px 11px;
    gap: 5px;
  }
  .dock-sizes button {
    width: 23px;
    height: 23px;
  }
  .dock-sizes > div {
    gap: 2px;
  }
  .room-replay {
    right: 13px;
    bottom: 104px;
    height: 26px;
    width: 26px;
  }
  .room-caption {
    display: none;
  }
  .fit-help {
    bottom: 103px;
    font-size: 0.64rem;
    max-width: 79vw;
  }
  .catalog-mode .fit-header {
    padding-bottom: 62px;
  }
  .room-replay svg {
    width: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .dress-image,
  .dress-image:first-child,
  .dress-image.changing-dress,
  .garment {
    animation: none !important;
    transition: none !important;
  }
}
@starting-style {
  .garment {
    opacity: 0;
    transform: translate(-50%, -50%) translateX(calc(var(--distance) * 0.86))
      scale(calc(var(--scale) * 0.92)) rotateY(var(--tilt));
  }
  .selection-dock {
    opacity: 0;
  }
}
.selection-dock {
  transition: opacity 0.6s 0.12s;
}
