@font-face {
  font-family: 'mona';
  src: url('mediun.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

html,
body {
  width: 100vw;
  height: 100vh;
  margin: 0;
  overflow: hidden;
}

#canvas-container {
  z-index: -2;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

canvas {
  display: block;
}

.stats {
  position: absolute;
  left: 0;
  top: 0;
}

/* ===========================
   LOADING SCREEN
=========================== */
#loading-screen {
  width: 100vw;
  height: 100vh;
  position: fixed;
  inset: 0;
  background: #000000;
  /* transparente suave */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: opacity .6s ease;
  overflow: hidden;
}

.loader {
  z-index: 9;
  width: 60px;
  height: 60px;
  border: 6px solid #444;
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}


.nav {
  position: absolute;
  top: 0px;
  margin-top: 20px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
}

.nav img {
  z-index: 0;
}


.carousel {
  position: absolute;
  left: 50%;
  bottom: 0%;
  transform: translate(-50%, -0%);
  z-index: 9;
  width: 100%;
  height: 190px;
  perspective: 1000px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}


.item {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 170px;
  height: fit-content;
  border-radius: 9px;
  padding: 7px;
  background: #ffffff;
  transform-style: preserve-3d;
  transform-origin: center center;
  transition:
    transform 0.6s ease,
    opacity 0.6s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1px solid transparent;
  filter: blur(0px);
  transition:
    transform 0.6s ease,
    opacity 0.6s ease,
    filter 0.6s ease;
}

/* BOTÓN BASE (OCULTO DETRÁS) */
.item-btn {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%) translateY(9px) scale(0.8);
  z-index: -99;
  width: 100%;
  padding: 15px 6px;
  border-radius: 7px;
  border: none;
  background: #ffffff;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  letter-spacing: 0em;
  overflow: hidden; /* ← necesario para el shimmer de fondo */
  transition:
    transform 0.45s ease,
    opacity 0.35s ease;
}

/* SHIMMER DE FONDO ( muy sutil sobre blanco) */
.item-btn::before {
  content: "";
  position: absolute;
  top: 0; left: -75%;
  width: 50%; height: 100%;
  background: linear-gradient(
    120deg,
    transparent 20%,
    rgb(255, 237, 243) 50%,
    transparent 80%
  );
  transform: skewX(-20deg);
  animation: bshine 7.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes bshine {
  0%   { left: -75%; }
  55%  { left: 130%; }
  100% { left: 130%; }
}

/* LETRAS CON OLA DE LUZ */
.item-btn .l {
  display: inline-block;
  color: #111;
  animation: lshine 10.2s ease-in-out infinite;
}

.item-btn .l:nth-child(1) { animation-delay: 0.00s; }
.item-btn .l:nth-child(2) { animation-delay: 0.09s; }
.item-btn .l:nth-child(3) { animation-delay: 0.18s; }
.item-btn .l:nth-child(4) { animation-delay: 0.27s; }
.item-btn .l:nth-child(5) { animation-delay: 0.36s; }
.item-btn .l:nth-child(6) { animation-delay: 0.45s; }
.item-btn .l:nth-child(7) { animation-delay: 0.54s; }
.item-btn .l:nth-child(8) { animation-delay: 0.63s; }

@keyframes lshine {
  0%   { color: #111; text-shadow: none; }
  10%  { color: #fff; text-shadow: 0 0 6px rgba(0,0,0,0.15), 0 0 14px rgba(255, 100, 159, 0.6); }
  22%  { color: #111; text-shadow: none; }
  100% { color: #111; text-shadow: none; }
}

/* SOLO EL ITEM CENTRAL LO SUBE */
.item.is-center .item-btn {
  bottom: 100%;
  transform: translateX(-50%) translateY(-10px) scale(1);
  z-index: 2;
  transition-delay: 0.20s;
  opacity: 1;
  pointer-events: auto;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
}


.item.is-center {
  box-shadow:
    0 0px 17px rgba(0, 0, 0, 0.459);
}

.item .titulo_item {
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  width: 100%;
  text-align: center;
  font-size: 15px;
  color: #000000;
}

.item .color_item {
  position: relative;
  width: 100%;
  height: 40px;
  border-radius: 8px;

}

/* Solo se verán 3 */
.item.hidden {
  opacity: 0;
  pointer-events: none;
}

.controls {
  position: absolute;
  bottom: 50%;
  left: 50%;
  transform: translate(-50%, 50%);
  width: 40%;
  display: flex;
  justify-content: space-between;

}

#prev{
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transform: rotate(180deg);
}


#next {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}



.parrafo {
  position: absolute;
  bottom: 0px;
  z-index: 9;
  color: #000000;
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: 12px;
  width: 100%;
  text-align: center;
}


/* ===========================
   POPUP
=========================== */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.popup-overlay.active {
  opacity: 1;
  pointer-events: auto;
  width: 100%;
}

.popup {
  background: #ffffff;
  border-radius: 7px;
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  position: absolute;
  animation: popupIn 0.45s ease;
  width: 300px;
  
}

@keyframes popupIn {
  from {
    transform: translateY(20px) scale(0.95);
    opacity: 0;
  }

  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.cont_data {
  padding: 10px 15px 15px 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

}

.cont-titulo {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  justify-content: space-between;
  margin-top: 2px;
  margin-bottom: 2px;
}

.popup-title {
  margin: 0px;
  font-size: 1.5rem;
  text-align: left;
}

.popup-price {
  margin: 0 0 0px 0px;
  font-size: 1rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  text-align: center;

}

#popup-description {
  margin: 0px;
  font-size: 0.7rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  text-align: left;
}

.popup .parrafo {
  font-size: 14px;
  margin-bottom: 0px;
}

.cont_subtitle {
  width: 100%;
  display: flex;
  flex-direction: column;
}


.conten_colores {
  width: 100%;

}

#popup-colors {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.popup-subtitle {
  margin: 5px 0px;
  font-size: 0.5rem;
  text-align: left;
}

.popup-color {
  width: 15px;
  height: 15px;
  border-radius: 100px;
  margin-bottom: 16px;
  background: red;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-family: "mona";
}

.labios {
  width: 100%;
  border-radius: 7px 7px 0px 0px;
  margin-bottom: 0px;
}

.try-lips-btn {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: none;
  background: #f0f0f0;
  color: #000;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  margin-bottom: 10px;
}

.popup-action {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: none;
  background: #000;
  color: #fff;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 1rem;
}


.popup-close {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 7px;
  position: absolute;
  border-radius: 100px;
  top: 10px;
  right: 10px;
  background: #ffffff;

}


.camera-container {
  position: relative;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
}


.marco {
  position: absolute;
  display: flex;
  flex-direction: column-reverse;
  inset: 0;
  z-index: 10;
  height: 100dvh;
  width: 100vw;
}

.columnas_marco {
  position: absolute;
  inset: 0;
}

.col_marco_top {
  position: absolute;
  top: 0;
  width: 100%;
  height: 25px;
  background: #ffffff;
}

.col_marco_top img {
  position: absolute;
  bottom: -100%;
  left: 50%;
  transform: translateX(-50%);
}

.col_marco_left {
  position: absolute;
  left: 0;
  width: 25px;
  height: 100%;
  background: #ffffff;
}

.col_marco_riht {
  position: absolute;
  right: 0;
  width: 25px;
  height: 100%;
  background: #ffffff;
}

.base_marco {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  padding: 10px 25px;
  z-index: 10;
}

#camera-video,
#camera-canvas {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  object-fit: cover;
  overflow: hidden;
   transform: scaleX(-1); /* ← espejo horizontal */


}

#camera-canvas {
  position: absolute;
  inset: 0;
}

.nav_camara {
  position: absolute;
  display: flex;
  flex-direction: row;
  left: 50%;
  bottom: 10vh;
  transform: translateX(-50%);
  z-index: 100;
  gap: 10px;
}


/* ===========================
   CAPTURE BUTTON
=========================== */
.capture-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===========================
   BACK BUTTON (CAMERA)
=========================== */

.capture-btn img {
  width: 100%;
  height: 100%;
}

#titulo_item_camera {
  width: 100%;
  margin: 0;
  font-family: "mona";
  text-align: center;
  font-size: 3.5vw;
  color: #000000;
}

.cont_marco_icon {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  border-bottom: #000000 2px solid;
}

.barra_detalles {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  width: 100%;
}

.detalle_uno {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detalle_uno p {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 1.5vw;
  color: #000000;
}

.detalle_dos {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detalle_dos p {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 1.5vw;
  color: #000000;
}

.detalle_tres {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.detalle_tres img {
  width: 10vw;
}


/* Partes del marco ocultas en preview */
.col_marco_left,
.col_marco_riht,
.base_marco {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s ease;
}

/* Logo SIEMPRE visible */
.col_marco_top {
  opacity: 1;
  background: #ffffff00;
}


.marco.capture-visible .col_marco_top
{
background: #ffffff;
}

/* Se muestran SOLO al capturar */
.marco.capture-visible .col_marco_left,
.marco.capture-visible .col_marco_riht,
.marco.capture-visible .base_marco {
  opacity: 1;
}


.camera-flash {
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  pointer-events: none;
  z-index: 20;
}

.camera-flash.active {
  animation: cameraFlash 0.25s ease-out;
}

@keyframes cameraFlash {
  0%   { opacity: 0; }
  15%  { opacity: 0.9; }
  55%  { opacity: 0; }
  85%  { opacity: 0.4; }
  100% { opacity: 0; }
}

@media (max-width: 868px) {
  .controls {
    display: none;
  }

  #titulo_item_camera {
    width: 100%;
  }


  .nav_camara {
    position: absolute;
    display: flex;
    flex-direction: row;
    left: 50%;
    bottom: 17vh;
    transform: translateX(-50%);
    z-index: 100;
    gap: 10px;
  }


  #titulo_item_camera {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
    text-align: center;
    font-size: 20px;
    color: #000000;
  }

  .cont_marco_icon {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    border-bottom: #000000 2px solid;
  }


  .barra_detalles {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
  }

  .detalle_uno {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .detalle_uno p {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
    font-size: 3.5vw;
    color: #000000;
  }

  .detalle_dos {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .detalle_dos p {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
    font-size: 3.5vw;
    color: #000000;
  }

  .detalle_tres {
    display: flex;
    align-items: center;
    justify-content: center;

  }

  .detalle_tres img {
    width: 100%;
  }


}