/* PALETA DE COLORES

https://colorhunt.co/palette/ffe6e6ff2626bd1616000000 */
* {
  margin: 0;
  padding: 0;
}

body {
  background-color: #000000;
  width: 100%;
  margin-top: 22vh;
  overflow-x: hidden;
}
/* FONDO DEL SPINNER */
.spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s, opacity 0.3s linear;
}

.spinner-overlay.show {
  visibility: visible;
  opacity: 1;
}

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

.spinner {
  border: 8px solid red;
  border-top: 8px solid #fff;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}

@font-face {
  font-family: "REFont";
  src: url(../sources/fonts/3724-font.otf);
}

@font-face {
  font-family: "REFont2";
  src: url(../sources/fonts/Resident\ Evil\ Large.ttf);
}

header {
  display: grid; /* Usa CSS Grid */
  grid-template-rows: auto auto; /* Dos filas: una para el título y otra para los botones */
  grid-template-columns: 1fr; /* Una columna que ocupa todo el ancho */
  align-items: start; /* Alinea los elementos al inicio verticalmente */
  justify-items: center; /* Centra los elementos horizontalmente */
  background-color: black;
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
}

.aclaracion {
  color: #ffe6e6;
  font-family: "REFont";
  font-size: 2.5rem ;
  text-align: center;
  margin-top: 10px;
  margin-bottom: 20px;
}

.contenedorTitulo {
  width: 100%;
  display: flex;
  justify-content: center; /* Centra el título horizontalmente */
  margin-top: 10px;
}
.acciones-header {
  display: flex; /* Alinea los botones horizontalmente */
  gap: 10px;
  justify-content: center;
  margin-bottom: 10px;
}

.heroSection {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

h1 {
  color: #ffe6e6;
  font-family: "REFont";
  font-size: 6rem;
  font-weight: lighter;
  width: 100%;
  text-align: center;
  line-height: 0.7;
}

.infoHamburguesa {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: absolute;
  width: 100%;
  top: 0;
  text-align: center; /* Centra el texto dentro del contenedor */
  box-sizing: border-box; /* Incluye padding y border en el ancho total */
}

.subtituloHero {
  color: #bd1616;
  font-family: "REFont";
  font-size: 3rem;
  font-weight: lighter;
  text-align: center;
}

.listaIngredientes {
  color: #ffe6e6;
  font-family: "REFont";
  font-size: 2.2rem;
  font-weight: lighter;
  text-align: center; /* Centra el texto */
  width: 100%;
  padding: 5px 5px;
  background-color: rgba(0, 0, 0, 0.3);
  height: fit-content;
  z-index: 3;
  opacity: 0;
  visibility: hidden; /* Oculta el texto por defecto */
  width: 100%; /* Igual al ancho de .fotoPersonaje */
  min-width: unset; /* Elimina el ancho mínimo fijo */
  min-height: 40px; /* Asegura que tenga altura mínima */
  display: block; /* Asegura que ocupe espacio */
  box-sizing: border-box;
  position: absolute;
  transform: translateY(70%);
  margin-top: 30px;
  transition: none; /* Elimina la transición para que desaparezca instantáneamente */
}

.galeria {
  display: flex;
  flex-direction: column;
  height: auto;
  width: 100%;
}

.tipoHamburguesa {
  display: grid;
  position: relative;
  width: 100%;
  height: auto;
  min-height: 200px;
  margin-bottom: 20px;
  border-radius: inherit;
  opacity: 1;
  filter: none;
  transition: none;
  cursor: default;
}

.tipoHamburguesa .fotoPersonaje {
  grid-area: 1 / 1;
  width: 100%;
  height: auto;
  object-fit: cover;
  z-index: 1;
}

span {
  color: #bd1616;
  font-family: "REFont";
  font-size: 5rem;
  font-weight: lighter;
  z-index: 3;
}

.nombrePagina {
  color: #ffe6e6;
  font-family: "REFont";
  font-size: 5rem;
  font-weight: lighter;
}

.contenedorFotoHamburguesa {
  grid-area: 1 / 1;
  justify-self: center;
  align-self: start;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  overflow: visible;
  position: absolute;
  bottom: 0;
  width: 100%;
}

.precio {
  color: white;
  font-family: "REFont2";
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 4px;
}

h2 {
  color: #ffe6e6;
  padding: 0;
  font-family: "REFont";
  font-size: 40px;
  font-weight: lighter;
}

.contenedorGaleria {
  padding-top: 8vh;
  padding-bottom: 50px;
  display: flex;
  justify-content: center;
}

.textoTipoHamburguesa {
  opacity: 1;
  visibility: visible;
  pointer-events: none;
  color: #ffe6e6;
  width: 100%;
  font-family: "REFont";
  font-weight: lighter;
  font-size: 4rem;
  text-align: center;
  z-index: 3;
  background: rgba(0, 0, 0, 0.5);
}

.fotoHamburguesa {
  width: 50%;
  max-height: 350px;
  height: auto;
  object-fit: cover;
  display: block;
  background: transparent;
}

.tipoCarne {
  font-size: 40px;
}
.seccionInfoCompra {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: flex-start;
  width: 100%;
  margin-top: 5%;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
}

.infoCompra {
  min-width: fit-content;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5px;
}

.controlesCantidad {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.cantidad {
  color: #ffe6e6;
  font-family: "REFont2";
  font-size: 1.2em;
  font-weight: bold;
}

.btn-restar,
.btn-sumar {
  background: #bd1616;
  color: #ffe6e6;
  border: none;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  font-size: 1.2em;
  cursor: pointer;
  transition: background 0.2s;
  margin: 0 4px;
}

.btn-restar:hover,
.btn-sumar:hover {
  background: #ff2626;
}

/* Centra el bloque de botones en el header */
.acciones-header {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
}

/* Estilos básicos para los botones */
.btn-confirmar,
.btn-descartar {
  display: inline-flex; /* Alinea el contenido horizontalmente */
  align-items: center; /* Centra verticalmente el texto y el icono */
  justify-content: center; /* Centra horizontalmente el contenido */
  gap: 8px; /* Espacio entre el texto y el icono */
  width: auto; /* Ajusta el ancho según el contenido */
  min-width: 60px; /* Ancho mínimo para que sea cuadrado */
  height: 60px; /* Altura fija igual al ancho mínimo */
  background-color: #27ae60; /* Verde para btn-confirmar */
  color: #fff; /* Texto blanco */
  border: none; /* Sin bordes */
  border-radius: 8px; /* Bordes redondeados */
  cursor: pointer; /* Cambia el cursor al pasar el mouse */
  font-size: 16px; /* Tamaño del texto */
  padding: 0 12px; /* Espaciado interno */
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-confirmar:hover {
  background-color: #219150; /* Verde más oscuro al hacer hover */
  transform: scale(1.1);
}

.btn-descartar {
  background-color: #bd1616; /* Rojo para btn-descartar */
}

.btn-descartar:hover {
  background-color: #ff2626; /* Rojo más claro al hacer hover */
  transform: scale(1.1);
}
.texto-boton {
  font-family: "REFont", sans-serif; /* Fuente específica */
  font-size: 30px; /* Tamaño del texto */
  font-weight: normal; /* Peso del texto */
  color: #fff; /* Color del texto */
  margin: 0; /* Elimina márgenes */
  padding: 0; /* Elimina padding */
  display: inline-block; /* Asegura que el texto no se apile */
}

@keyframes popupAnimation {
  0% {
    transform: translate(-50%, -50%) scale(0); /* Comienza con escala 0 */
    opacity: 0; /* Comienza invisible */
  }
  100% {
    transform: translate(-50%, -50%) scale(1); /* Escala completa */
    opacity: 1; /* Totalmente visible */
  }
}

@media (min-width: 600px) and (max-width: 1023px) {
  /* .galeria {
    flex-direction: row;
    height: 80vh;
    width: 90vw;
  }

  .tipoHamburguesa {
    width: 0;
    height: 100%;
    min-height: unset;
    flex-grow: 1;
    margin-bottom: 0;
    display: flex;
    transition: 0.3s ease;
    cursor: pointer;
  }

  .galeria .tipoHamburguesa .fotoPersonaje {
    width: 0;
    height: auto;
    flex-grow: 1;
    transition: 0.3s ease;
  }

  .textoTipoHamburguesa {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    font-size: 60px;
    transition: all 0.7s ease;
    top: 10%;
    left: 50%;
    transform: translate(-50%, 50%);
  } */
}

/* DESKTOP: Cambios para pantallas grandes */
@media (min-width: 1024px) {
  /* REVISAR */
  .galeria {
    flex-direction: row;
    height: 80vh;
    width: 90vw;
  }

  .tipoHamburguesa {
    width: 0;
    height: 100%;
    min-height: unset;
    flex-grow: 1;
    margin-bottom: 0;
    display: flex;
    transition: 0.3s ease;
    cursor: pointer;
  }

  .galeria .tipoHamburguesa .fotoPersonaje {
    width: 0;
    height: auto;
    flex-grow: 1;
    transition: 0.3s ease;
  }


  .infoHamburguesa {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    width: 100%;
    top: 0;
    text-align: center; /* Centra el texto dentro del contenedor */
    box-sizing: border-box; /* Incluye padding y border en el ancho total */
  }


  .textoTipoHamburguesa {
    opacity: 0;
    visibility: hidden;
    color: #ffe6e6;
    width: 100%;
    font-family: "REFont";
    font-weight: lighter;
    font-size: 4rem;
    text-align: center;
    z-index: 3;
    background: rgba(0, 0, 0, 0.5);
    transition: opacity 0.7s ease-in; /* Suaviza la transición */
    top: 0;
  }

  body {
    background-color: #000000;
    width: 100%;
    margin-top: 14vh; /* Ajusta el top para que no se superponga al header */
  }

  header {
    display: flex;
    flex-direction: row; /* Cambia a filas en desktop */
    justify-content: space-between; /* Distribuye los elementos horizontalmente */
    align-items: flex-start; /* Centra los elementos verticalmente */
  }

  .contenedorTitulo {
    margin: 0; /* Elimina márgenes adicionales */
    justify-content: left;
    margin-left: 2vw;
    margin-top: 2vh;
  }

  .contenedorGaleria {
    padding: 0;
    margin-bottom: 30px;
  }

  .listaIngredientes {
    opacity: 0;
    z-index: 3;
    visibility: hidden; /* Oculta el texto por defecto */
    width: 100%; /* Igual al ancho de .fotoPersonaje */
    min-width: unset; /* Elimina el ancho mínimo fijo */
    min-height: 40px; /* Asegura que tenga altura mínima */
    display: block; /* Asegura que ocupe espacio */
    box-sizing: border-box;
    top: 30px;
    transition: none; /* Elimina la transición para que desaparezca instantáneamente */
  }

  .acciones-header {
    margin: 0;
    margin-top: 2vh;
    margin-right: 2vw;
    display: flex; /* Mantiene los botones en fila */
    gap: 16px; /* Espacio entre botones */
    justify-content: flex-end; /* Alinea los botones hacia la derecha */
  }

  .btn-confirmar,
  .btn-descartar {
    padding: 20px 20px; /* Espaciado interno más amplio */
  }
  .texto-boton {
    font-size: 1.5rem;
    padding: 0px 20px;
  }
  .btn-desplegarLista {
    display: none; /* Oculta el botón en pantallas grandes */
  }

  .galeria {
    display: flex;
    width: 80vw;
    gap: 10px;
  }

  .nombrePagina,
  span {
    font-size: 5rem;
  }

  .btn-confirmar .texto-boton {
    display: inline-block; /* Oculta el texto en pantallas pequeñas */
  }

  h2 {
    font-size: 80px;
  }

  .tipoHamburguesa {
    position: relative;
  }

  .contenedorFotoHamburguesa {
    position: absolute;
    left: 50%;
    transform: translate(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: fit-content;
    padding: 0;
    background: none;
    bottom: 0;
  }

  .seccionInfoCompra {
    opacity: 0;
    transition: all 0.5s;
    margin-top: 0;
  }

  .infoCompra {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s;
    padding: 4px 6px;
    gap: 2px;
    width: 150px;
    min-width: 80px;
    max-width: 180px;
    box-sizing: border-box;
    margin-bottom: 0;
  }

  .tipoHamburguesa:hover {
    cursor: crosshair;
    width: 15vw;
    box-shadow: 0 0 20px 2px #bd1616, 0 0 10px 2px #bd1616 inset;
    /* Sombra roja menos prominente */
  }


  .tipoHamburguesa:hover .infoHamburguesa{
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(50%, 0%); /* Mantiene el texto centrado */
    z-index: 4;
    top: 3%;
  }
  .tipoHamburguesa:hover .textoTipoHamburguesa {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0%); /* Mantiene el texto centrado */
  }

  .tipoHamburguesa:hover .listaIngredientes {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%,0%);
    transition: opacity 0.7s ease-in; /* Transición suave al aparecer */
  }

  .tipoHamburguesa:hover .fotoPersonaje {
    opacity: 1;
    filter: brightness(140%);
  }

  .tipoHamburguesa:hover .seccionInfoCompra {
    opacity: 1;
    pointer-events: auto;
  }

  .tipoHamburguesa:hover .infoCompra {
    display: flex;
    opacity: 1;
    pointer-events: auto;
  }

  .controlesCantidad {
    margin-top: -12px; /* Sube los botones, ajusta el valor según lo que necesites */
  }

  .infoCompra .tipoCarne {
    font-size: 4vh;
  }

  .controlesCantidad {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin: 0;
    gap: 2px;
  }

  .fotoHamburguesa {
    width: clamp(200px, 20vw, 300vw);
    height: auto;
    display: block;
    object-fit: contain;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s;
    z-index: 3;
  }
  .tipoHamburguesa:hover .fotoHamburguesa {
    opacity: 1;
    pointer-events: auto;
  }
}
