/*
 * DAN Roma · mobile configurator portrait and swipe layer.
 * The original model images are preserved: the crop is a reversible CSS view.
 */

.configurator-swipe-host {
  --configurator-swipe-focus: 50% 34%;
  --configurator-swipe-x: 0px;
  --configurator-swipe-rotate: 0deg;
  isolation: isolate;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.configurator-swipe-host > img {
  object-fit: cover !important;
  object-position: var(--configurator-swipe-focus) !important;
  transform: translate3d(0, 0, 0);
  transform-origin: 50% 72%;
  transition: transform .18s cubic-bezier(.22, .72, .24, 1), opacity .18s ease;
  will-change: transform, opacity;
  -webkit-user-drag: none;
}

.configurator-swipe-host.is-configurator-dragging {
  cursor: grabbing;
}

.configurator-swipe-host.is-configurator-dragging > img {
  transform: translate3d(var(--configurator-swipe-x), 0, 0)
    rotate(var(--configurator-swipe-rotate));
  transition: none;
}

.configurator-swipe-host.is-configurator-swipe-next > img {
  opacity: .34;
  transform: translate3d(-112%, 0, 0) rotate(-5deg);
}

.configurator-swipe-host.is-configurator-swipe-prev > img {
  opacity: .34;
  transform: translate3d(112%, 0, 0) rotate(5deg);
}

.configurator-swipe-host.is-configurator-enter-next > img {
  animation: configurator-enter-next .24s cubic-bezier(.22, .72, .24, 1);
}

.configurator-swipe-host.is-configurator-enter-prev > img {
  animation: configurator-enter-prev .24s cubic-bezier(.22, .72, .24, 1);
}

@keyframes configurator-enter-next {
  from { opacity: .45; transform: translate3d(34%, 0, 0) rotate(2deg); }
  to { opacity: 1; transform: translate3d(0, 0, 0) rotate(0); }
}

@keyframes configurator-enter-prev {
  from { opacity: .45; transform: translate3d(-34%, 0, 0) rotate(-2deg); }
  to { opacity: 1; transform: translate3d(0, 0, 0) rotate(0); }
}

.configurator-swipe-ui {
  position: absolute;
  z-index: 7;
  right: 12px;
  bottom: 12px;
  left: 12px;
  display: none;
  grid-template-columns: 22px minmax(0, 1fr) 22px;
  gap: 7px;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, .36);
  border-radius: 999px;
  color: #fff;
  background: rgba(9, 28, 22, .76);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .22);
  backdrop-filter: blur(13px);
  pointer-events: none;
  transition: opacity .18s ease;
}

.configurator-swipe-host.is-configurator-dragging .configurator-swipe-ui {
  opacity: .38;
}

.configurator-swipe-ui > button {
  display: grid;
  width: 28px;
  height: 28px;
  margin: -3px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  padding: 0;
  color: inherit;
  background: rgba(255, 255, 255, .1);
  cursor: pointer;
  font-family: Georgia, serif;
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
  text-align: center;
  pointer-events: auto;
}

.configurator-swipe-ui > button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.configurator-swipe-ui strong {
  overflow: hidden;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .1em;
  line-height: 1.25;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.configurator-swipe-live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 720px) {
  html,
  body.configurator-mobile-swipe-enabled {
    max-width: 100%;
    overflow-x: hidden;
  }

  /*
   * Chemisier loaded its page-specific two-column rule after the shared
   * responsive rule. Reassert the intended single mobile column.
   */
  .linen-product {
    grid-template-columns: minmax(0, 1fr) !important;
    min-width: 0;
  }

  .linen-product .satin-panel h1 {
    font-size: clamp(48px, 15vw, 60px);
    line-height: .9;
  }

  .satin-product,
  .men-configurator,
  .ungaro-product {
    min-width: 0;
  }

  .satin-stage,
  .linen-stage,
  .capua-stage,
  .viscosa-stage,
  .nuvola-stage,
  .men-stage {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .satin-hero,
  .linen-hero,
  .capua-hero,
  .viscosa-hero,
  .nuvola-hero,
  .men-hero,
  .ungaro-hero {
    width: 100%;
    height: auto;
    min-height: 0 !important;
    aspect-ratio: 3 / 4;
  }

  .satin-hero figcaption,
  .men-hero figcaption,
  .ungaro-hero figcaption {
    display: none;
  }

  .satin-fabric-card,
  .selected-fabric-card {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    width: 100%;
    margin-top: 8px;
  }

  .satin-fabric-card > img,
  .selected-fabric-image-wrap {
    width: 96px;
    height: 96px;
    aspect-ratio: 1;
  }

  .satin-fabric-card > div,
  .selected-fabric-card > div:nth-child(2) {
    align-content: center;
    min-width: 0;
    padding: 12px 14px;
  }

  .satin-ai-note {
    display: none;
  }

  .ungaro-stage {
    display: block;
  }

  .ungaro-fabric-card {
    position: static;
    width: auto;
    margin: 8px 12px 0;
    box-shadow: none;
  }

  .ungaro-ai-note {
    display: none;
  }

  .configurator-swipe-ui {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  .configurator-swipe-host > img {
    transition: none;
  }

  .configurator-swipe-host.is-configurator-enter-next > img,
  .configurator-swipe-host.is-configurator-enter-prev > img {
    animation: none;
  }
}
