@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap');

:root {
  --background-primary-color: #01e37f;
  --text-primary-color: #fff;
  --text-secondary-color: #000;
  --text-third-color:#4c4c4c;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
  font-size: 62.5%;
  font-family: "Nunito", sans-serif;  
  height: 100%;
}
  
body {
  background-color: var(--background-primary-color);
  color: var(--text-primary-color);
  font-size: 1.6rem;
  min-height: 100vh;
  text-align: center;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

footer {
  background: #f5f5f5;
  text-align: center;
  padding: 1rem 0;
  color: #222;
}

.container {
  position: absolute;
  width: 90%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 90vh;
  padding: 1rem 1.4rem;
}
 
.rojo{
  color: red;
}

.verde{
  color:rgb(21, 200, 21)
}


/*landing page*/

.listaProductosFront {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.listaProductosFront .product-single {
  margin: 1rem;
  padding: 1rem 2.2rem;
  width: 15%;
  display: flex;
  flex-direction: column;
  box-shadow: 3px 3px 4px 0 #00000044;
  border: 1px solid lightgray;
  background-color:var(--text-primary-color);
  color:var(--text-secondary-color);
  position: relative;
}

.listaProductosFront .product-single h3{
  font-size: 1.4rem;
  font-weight: 900;
  padding-bottom: 1rem;
  min-height: 45px;
}

.listaProductosFront .product-single h6{
  padding-bottom:3rem ;
}

.listaProductosFront .product-single .precios{
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
}

.listaProductosFront .product-single .precio-supermercado{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  margin-bottom: 10px;
}

.listaProductosFront .product-single .precios p{
  font-weight: bold;
}

.listaProductosFront .product-single a.enlace-super, .icon-historico{
  color:#6d6d6d
}

/*ficha del producto en el frontend*/

.product-single .ficha-producto{
  border:2px solid #96e001;
  position: absolute;
  top:165px;
  z-index: 10;
  background-color: var(--text-primary-color);
  border-radius: 1rem;
  width: 370px;
  min-height: 240px;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3);
  padding: 2rem;
  display: flex;
  justify-content: flex-end;
}

.product-single .ficha-producto .imagen-producto {
  width: 120px;
  height: 120px; /* Hazlo cuadrado para uniformidad */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 0.5rem;
  background: #f8f8f8;
  position: relative;
  top: 10px;
  left: 0px;
}


.product-single .ficha-producto .imagen-producto img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Ahora la imagen se ve completa */
  position: static;
  filter: saturate(150%) contrast(120%) hue-rotate(10deg) drop-shadow(1px 20px 10px rgba(0, 0, 0, 0.3));
}
    
.product-single .ficha-producto .descripcion-producto {
      width: 80%;
}
  
.product-single .ficha-producto .descripcion-producto h1 {
      color:var(--text-third-color);
      font-size: 1.5em;
      font-weight: 900;
}
  
.product-single .ficha-producto .descripcion-producto p.precio-producto {
      font-size: 2.9em;
      color: var(--text-secondary-color);
} 
  
.product-single .ficha-producto .descripcion-producto p {
      color: var(--text-third-color);
      font-size: 1em;
}

.product-single .ficha-producto .boton-cerrar {
  position: absolute;
  top: 0;
  right: 0;
  background-color: var(--text-primary-color);
  color: var(--text-secondary-color);
  padding: 10px;
  font-size: 1.4rem;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease; /* Animación de transición */
}


/* Iconos de supermercados: tamaño uniforme */
.icon-supermercado-wrapper{
  width: 32px;
  height: 32px; /* Hazlo cuadrado para uniformidad */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 0.5rem;
  background: #ffffff;
  position: relative;
  top: 0px;
  left: 0px;
}

.icon-supermercado-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Ahora la imagen se ve completa */
  position: static;
  filter: saturate(150%) contrast(120%) hue-rotate(10deg) drop-shadow(1px 20px 10px rgba(0, 0, 0, 0.3));
}


  /*backend gestion*/
  
  .addProduct, .addFicha{
    opacity: 1;
    z-index: 5;
    background: grey;
    display: none;
  }
  
  .form {
    position: absolute;
    max-width:450px;
    width: 100%;
    top: 50%;
    left: 50%;
    transform:translate(-50%, -50%);
    padding:.5rem;
    background-color: var(--text-primary-color);
    color: var(--text-secondary-color);
  }
  
  .form.addFicha  {
    top: 10%;
    left: 50%;
    transform:translate(-50%, 0%);
  }


  .form * {
    width: 100%;
    display: block;
    padding: 1rem 2.5rem;
  }

  .form h4{
    margin-top: -3.5rem;
    font-size: 1.8rem;
  }
  
  .form div:nth-of-type(1) {
    padding-top:0 !important;
  }
  
  .form input, .form textarea, .form select{
    border: 1px solid rgba(0, 0, 0, 0.829);
    border-radius: 2.5rem;
    background: rgba(255, 255, 255, 0.1);
    font-family: inherit;
  }
  
  .form #datetask{
    color:var(--text-primary-color);
  }
  
  .form *:not(button,select):focus {
    outline: 3px solid #9999FF;
    background: var(--text-primary-color);
    color: var(--text-secondary-color);
  }
  .form label {
    font-weight: bold;
    padding-top: 1rem;
    text-align: left;
  }
  .form textarea {
    height: 200px;
    resize: none;
  }
  
  .form .add{
    margin: 1rem 0;
    cursor: pointer;
    color: var(--text-primary-color);
    background-color: rgb(29, 120, 255);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 1.5rem 2rem;
    border-radius: 2.5rem;
  }
  
  .form button.add:hover, .form button.edit:hover {
    opacity: 0.7;
  }
  
  .form .edit {
    display: none;
  }
  
  .close {
    color: var(--text-secondary-color);
    font-size: 2.2rem;
    font-weight: bold;
    cursor: pointer;
    text-align:right;
    padding:0;
  }
  
  .form .custom-select{
    position:relative;

  }
  
  .form select {
    appearance: none;
    outline: 0;
    box-shadow: none;
    font-family: inherit;
    width: 100%;
    padding: 1rem;
    margin-bottom: 10px;
    border-radius: 0;
    color: var(--text-secondary-color);
    margin-top: 20px;
    font-weight: bold;
  }
  
 .form select:hover{
    cursor:pointer;
  }
  
  /*remove arrow IE*/
  .form select::-ms-expand {
    display: none;
  }
  
  /*my arrow*/
  .form .custom-select::after{
    content:"\f0d7";
    font-family: "FontAwesome";
    right:38px;
    top:36px;
    position:absolute;
    pointer-events:none;
    font-size:2rem
  }

  .add-out-buttons {
    position: absolute;
    right: 10px;
    top: 1px;
    width: 80px;
    display: flex;
    justify-content: space-between;
  }

  .add-out-buttons i{
    font-size: 3rem;
  }
  .add-out-buttons a{
    color: #666;
  }
 
 
  
  .producto-header, .producto-fila {
    display: flex;
}

.producto-header {
    font-weight: bold;
    background-color: #f0f0f0;
    color:#a6a6a6;
    padding: 1rem;
    border-bottom: 2px solid #000;
}

.producto-header > *, .producto-fila > *{
  width: 10%;
}

.producto-fila{
  color: var(--text-secondary-color);
  padding: 1rem 0;
}


.producto-fila:nth-child(odd){
  background-color: #f0f0f0;
}

.producto-fila:nth-child(even){
  background-color: var(--text-primary-color);
}

.producto-fila span:nth-child(1),.producto-header span:nth-child(1){
  width: 15%;
}


.producto-fila span {
    text-align: center;
}

.acciones {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.precios {
    cursor: pointer;
}

.precio:hover{
  cursor: pointer;
}

.precio.tiene-ficha {
  font-weight: bold;
  color: green;
}

.btn-edit {
  background-color: #007bff; /* Color de fondo azul */
  border: none;
  color: white; /* Color del icono */
  padding: 10px;
  font-size: 1rem;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease; /* Animación de transición */
}

/* Estilos del botón de eliminar */
.btn-delete {
  background-color: #dc3545; /* Color de fondo rojo */
  border: none;
  color: white; /* Color del icono */
  padding: 10px;
  font-size: 1rem;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease; /* Animación de transición */

}

/* Ajustes para hacer el botón circular */
.btn-delete i,.btn-edit i {
  pointer-events: none; /* Para evitar que el icono sea clickeable por separado */
}

/* Hover effect para el botón */
.btn-delete:hover {
  background-color: #c82333; /* Cambiar a un rojo más oscuro al pasar el ratón */
}

.btn-edit:hover {
  background-color: #274fa7; /* Cambiar a un verde más oscuro al pasar el ratón */
}



  @media (max-width: 1280px) {
    /* Estilos CSS para pantallas con ancho menor a 1280px */
    .listaProductosFront .product-single {
      width: 45%;
    }
    
  }

  @media (max-width: 800px) {
    .container {
    position: static;
    top: auto;
    left: auto;
    transform: none;
    height: auto;
    padding-bottom: 2rem; /* espacio para el footer */
  }
    /* Estilos CSS para pantallas con ancho menor a 1280px */
    .listaProductosFront .product-single {
      width: 80%;
    }

    .listaProductosFront{
      justify-content: center;
    }
  }

  @media (max-width: 500px) {
    /* Estilos CSS para pantallas con ancho menor a 1280px */
    .listaProductosFront .product-single {
      width: 90%;
    }
    
  }
