.selezione-genere {
  position: relative;
  display: flex;
  justify-content: center; /* centro orizzontale */
  margin-top: -375px; 
}

.wrapper {
  width: 450px; 
  gap: 40vh;
}

#btn-donna {
  background-color: rgba(255, 192, 203, 0);
  width: 30vw;
  height: auto;
}

#btn-uomo {
  background-color: rgba(129, 177, 255, 0);
  width: 30vw;
  height: auto;
}

#btn-donna:hover, #btn-uomo:hover {
  transform: scale(1.05);           /* Ingrandisce leggermente */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 10;                     /* Porta in primo piano se sovrapposto */
  cursor: pointer;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #fdf1f5;
  margin: 0;
  display: flex;
  height: 100px;
  flex-direction: column;
  align-items: center;
  gap: 40px; /* meno spazio tra caroselli */
  opacity: 1;
}

.carousel-container-sx-alto {
  position: relative;
  width: 400px;
  overflow: hidden;
  margin-left: 20px;
  background-color: #ffffff68;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: start;
  top: 80px;
}

.carousel-container-sx-basso {
  position: relative;
  width: 400px;
  overflow: hidden;
  margin-left: 20px;
  background-color: #ffffff68;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: start;
  top: 170px;
}

.carousel-container-dx {
  position: relative;
  width: 400px;
  height: 300px;
  overflow: hidden;
  margin-left: 20px;
  background-color: #ffffff68;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  padding: 0 0;
  display: flex;
  align-items: center;
  justify-content: start;
  top: 160px;
}

.carousel {
  display: flex;
  transition: transform 0.3s ease;
  overflow-y: hidden;
  overflow-x: auto;
  z-index: 999;
}

.container-camerino {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center; /* centrato verticalmente */
  flex-direction: column;
  padding: 0;
  transform: translateY(-450px);
}

.area-uomo, .area-donna{
  top: 0;
  right: 100%;
  display: flex;
  flex-direction: row;
  transform: translateX(100%); 
  gap: 1vh;
}

.area-uomo.visible, .area-donna.visible {
  transform: translateX(0);  
  right: 0;
}

.manichino {
  height: 80%;
  position: relative; 
  aspect-ratio: 1 / 3;
  background-size: cover;
  background-position: center;
}

.manichino .indumento {
  position: absolute;
  cursor: grab;
  pointer-events: auto; /* molto importante */
}

.area-sx{
  display: flex;
  flex-direction: column;
  gap: 1vh;
  width: 550px;
  height: 612.23px;
}

.zona {
  position: absolute;
  width: 100%;
  pointer-events: none;
  
}

#manichino-uomo #zona-testa {
  top: -2%;
  height: 20%;
  background: transparent;

}

#manichino-uomo #zona-busto, #zona-busto-donna, #zona-vestito {
  top: 17%;
  height: 25%;
  background: transparent;
}

#manichino-uomo #zona-over-busto, #zona-over-busto-donna {
  top: 16%;
  height: 25%;
  background: transparent;
}

#manichino-uomo #zona-gambe, #zona-gambe-donna {
  top: 40%;
  height: 50%;
  background: transparent;
    
}

#manichino-uomo #zona-piedi {
  top: 92%;
  height: 12%;
  background: transparent;
}

#zona-piedi-donna {
  top: 72%;
  height: 32%;
  background-color: rgba(255, 0, 0, 0);
}

#zona-borsa-mano-donna {
  top: 57%;
  left: 20%;
  height: 32%;
  background-color: rgba(0, 72, 255, 0);
}

#zona-borsa-donna {
  bottom: 10%;
  height: 73%;
  background-color: rgba(0, 57, 201, 0);
}

#manichino-uomo #zona-orologio{
  top: 46%;
  left: 5%;
  height: 2%;
  width: 8%;
  background: transparent;
}

#cestino {
  width: 100px;
  height: 100px;
  position: fixed;
  justify-content: center;
  align-items: center;
  bottom: 20px;
  left: 20px;
  background-color: #ffffff00;
  border-radius: 10px;
  z-index: 1000;
}

/* bottone del cestino */
.button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: rgb(20, 20, 20);
  border: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.164);
  cursor: pointer;
  transition-duration: .3s;
  overflow: hidden;
  position: relative;
}

.svgIcon {
  width: 12px;
  transition-duration: .3s;
}

.svgIcon path {
  fill: white;
}

.button:hover {
  width: 100px;
  border-radius: 50px;
  transition-duration: .3s;
  background-color: rgb(255, 196, 245);
  align-items: center;
}

.button:hover .svgIcon {
  width: 50px;
  transition-duration: .3s;
  transform: translateY(60%);
}

.button::before {
  position: absolute;
  top: -20px;
  content: "Delete";
  color: white;
  transition-duration: .3s;
  font-size: 2px;
}

.button:hover::before {
  font-size: 13px;
  opacity: 1;
  transform: translateY(30px);
  transition-duration: .3s;
}

.color-option {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s;
}

.color-option:hover {
  transform: scale(1.1);
}

#colorPalette {
  font-family: Arial, sans-serif;
}

.vestito {
  width: 100px;
  height: auto;
  cursor: grab;
  margin-right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2em;
  border-radius: 10px;
}

.vestito:hover {
  transform: scale(1.05);           /* Ingrandisce leggermente */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: grab;
}

.color-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #555;
  margin: 5px;
  cursor: pointer;
  display: inline-block;
}

.color-btn:hover {
  transform: scale(1.1);
}

.rosa   { background-color: #fabda2; }
.marrone  { background-color: #e1a991; }
.nero { background-color: #bf886f; }

.color-btn.attivo {
  border: 3px solid white;
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
}

.container-stili {
  position: fixed; /* Sempre in alto anche scrollando */
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  padding: 10px 20px;
  background-color: #f8f8f800;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.stile-btn {
  padding: 8px 16px;
  background-color: #333;
  color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-weight: bold;
}

.stile-btn:hover {
  background-color: #555;
  transition: transform 0.2s ease;
  transform: translateY(-2px);
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* sfondo scuro semi-trasparente */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.popup-content {
  background: white;
  padding: 50px 60px;
  border-radius: 10px;
  text-align: center;
  position: relative;
  width: 500px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
  font-family: sans-serif;
  font-size: 1.2em;
  font-family: 'Courier New', Courier, monospace;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.5em;
  cursor: pointer;
  color: #999;
  transition: color 0.2s ease;
}

.close-btn:hover {
  color: #f48fb1;
}

.ui-bookmark {
  position: absolute;
  top: 10px;
  right: -40px;
  transform: scale(0.8);
  z-index: 1000;
  --icon-size: 35px;
  --icon-hover-color: rgb(97, 97, 97);
}

.ui-bookmark input {
  display: none;
}

.ui-bookmark .bookmark {
  width: var(--icon-size);
  height: auto;
  fill: rgb(77, 77, 77); /* colore iniziale */
  cursor: pointer;
  transition: 0.1s;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Hover sul bookmark */
.ui-bookmark:hover .bookmark {
  fill: var(--icon-hover-color);
}

/* Tooltip SAVE */
.ui-bookmark .tooltip-save {
  visibility: hidden;
  opacity: 0;
  width: 60px;
  background-color: gold;
  color: #968700;
  text-align: center;
  border-radius: 4px;
  padding: 4px 8px;
  position: absolute;
  top: -25px;           /* da -35px a 0px per spostare più in basso */
  left: 90%;          /* da 50% a 60% per spostare più a destra */
  transform: translateX(-50%);
  font-size: 12px;
  z-index: 1000;
  transition: opacity 0.3s;
  pointer-events: none;
}

/* Mostra tooltip al passaggio del mouse */
.ui-bookmark:hover .tooltip-save {
  visibility: visible;
  opacity: 1;
}

.button-group {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 1000;
}

.button-container a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffffcc;
  border-radius: 50%;
  padding: 10px;
  box-shadow: 0 2px 6px rgb(255, 152, 212);
  transition: background-color 0.3s ease;
}

.button-container a:hover {
  background-color: #ffc1f0;
}

.button-container svg {
  fill: #130000;
}

#overlayDim {
  position: fixed;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.593);
  
  transition: mask-image 0.3s ease;
  cursor: pointer; /* migliora UX: cliccabile */
}

.floatingHint {
  position: absolute;
  z-index: 1000;
  background-color: white;
  padding: 10px 14px;
  height: 10vh;
  width: 10vw;
  margin-top: 30vh;
  margin-left: 38vw;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(255, 72, 72, 0.658);
  transition: opacity 0.3s ease, transform 0.3s ease;
  animation: fadeInUp 0.4s ease;
}

/* Animazione fadeInUp */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hidden {
  display: none;
}

@media screen and (max-width: 1288px) {
    .container-camerino {
        transform: translateY(400px);
    }
}
@media screen and (min-width: 1289px) {
    .container-camerino {
        transform: translateY(-450px);
    }
}

@media screen and (max-width: 768px) {
  .carousel {
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .carousel-container-sx-alto,
  .carousel-container-sx-basso,
  .carousel-container-dx {
    width: 90vw;
    height: auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  

  .vestito {
    margin-bottom: 10px;
    margin-right: 0;
  }

  .area-sx {
    width: 90vw;
    height: auto;
  }
}