@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;900&display=swap');

/*================
    General
================*/
body {
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.60), rgba(0, 0, 0, 0.90)), 
        url('https://images.unsplash.com/photo-1522778119026-d647f0596c20?w=1920&h=1080&fit=crop');

    background-repeat: no-repeat;
    backdrop-filter: blur(1px);

    background-size: cover;

    background-position: center;

    background-attachment: fixed;
    
    margin: 0; 

    font-family: monospace;
        
}

/*================
    Encabezado
================*/
.header{
    display: flex;
    align-items: center;
    color: white;
    height: 60px;
    background-color: black;
    /* width: 100%; */
    padding: 25px 30px;
    user-select: none; /* no permite seleccionar el texto*/
}
.nav-bar{
    display: flex;
    align-items: center;
    width: 20%;

    background: rgba(255, 255, 255, 0.1); /* Fondo oscuro semitransparente */
    backdrop-filter: blur(5px);           /* Desenfoque del fondo */
    border: 1px solid rgba(255, 255, 255, 0.2); /* Borde sutil */
    border-radius: 10px;                 
    padding: 5px 10px;         
    cursor: text;
    outline: none;
}

.nav-bar svg {
    stroke: #51b1a3;           
    margin-right: 10px;        /* Espacio entre la lupa y el texto */
    min-width: 10px;
}

.buscador {
    background: transparent;   
    border: none;              
    outline: none;             
    width: 100%;               
    color: white;             
    font-family: 'Montserrat', sans-serif; 
    border-radius: 3px;
}
.buscador::placeholder {
    color: rgba(255, 255, 255, 0.6); /* Gris claro */
}

/* 5. EFECTO DE BRILLO AL HACER CLICK */
/* El truco ':focus-within' hace que el PADRE brille cuando tocas el HIJO */
.nav-bar:focus-within {
    border-color: #51b1a3;            
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.3); /* Resplandor neón */
    background: rgba(0, 0, 0, 0.4);      /* Se oscurece un poco el fondo */
    transform: scale(1.02);              /* Se agranda un poquito */
}

.logo {
    flex: 1;
}

.logo a{
    text-decoration: none;
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-size: 18px;
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-weight: bold; 
    font-size: 25px;
    letter-spacing: -1px; /* Las letras un poco pegadas*/
    color: #ffffff;
    text-transform: uppercase;
    
    /* Sombra  */
    text-shadow: 0 4px 10px rgba(0,0,0,0.5); 
}

.logo a:hover{
    transform: scale(1.05);
    text-shadow: 0 0 15px rgba(0, 210, 255, 0.6); 
}

.color-cyan {
    color: #51b1a3;
    /* sombra al texto */
    text-shadow: 0 0 15px rgba(0, 210, 255, 0.6); 
}

.carrito{
    flex: 1;
    display: flex;
    justify-content: flex-end; /* alinea el texto a la derecha */
}

#cantidadCarrito {
    margin: auto 0;
}

#cantidadCarritoTexto {
    margin: auto 0;
    margin-left: 5px;
    font-size: 13px;
}

.carrito a{
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: black;
    background-color: #51b1a3;
    padding: 5px 10px;
    border-radius: 5px;
}

.carrito a:hover{
    border-color: #51b1a3;             
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.8); /* Resplandor neón */
    /* background: rgba(0, 0, 0, 0.4);       */
    transform: scale(1.05);
}

.carrito svg{
    margin-right: 5px;
}

.boton-perfil {
    display: flex;              /* Para alinear ícono y texto */
    align-items: center;        /* Centrado vertical */
    
    background-color: #101623;  /* Color de fondo oscuro (azul noche) */
    border: 1px solid #2d3748;  /* Borde finito y sutil */
    border-radius: 5px;        /* Bordes totalmente redondeados */
    padding: 5px 10px;
    
    background: rgba(255, 255, 255, 0.1); /* Fondo oscuro semitransparente */
    backdrop-filter: blur(5px);           /* Desenfoque del fondo */
    border: 1px solid rgba(255, 255, 255, 0.2); /* Borde sutil */
    
    color: white;               /* Color del texto */
    /* font-size: 15px; */
    /* cursor: pointer;            Manito al pasar el mouse */

    margin-right: 15px;
}

.texto-usuario{
        /* 1. Evita que el texto baje a otra línea */
    white-space: nowrap; 
    
    /* 2. Oculta lo que se sale del botón */
    overflow: hidden; 
    
    /* 3. Agrega los tres puntitos (...) al final */
    text-overflow: ellipsis; 
    
    /* Importante: Dale un ancho máximo para que sepa cuándo cortar */
    max-width: 120px; /* Ajusta este número según tu diseño */
    text-transform: capitalize;
}

/* Estilo del ícono (El muñequito) */
.icono-usuario {
    width: 23px;
    height: 28px;
    color: #51b1a3; /* El color celeste/cyan del ícono */
}

/* Efecto Hover (Cuando pasas el mouse) */
.boton-perfil:hover {
    border-color: #51b1a3;             
    /* background: rgba(0, 0, 0, 0.4);       */
    transform: scale(1.05);
}

.boton-salir{
    background: rgba(255, 255, 255, 0.1); /* Fondo oscuro semitransparente */
    backdrop-filter: blur(5px);           /* Desenfoque del fondo */
    border: 1px solid rgba(255, 255, 255, 0.2); /* Borde sutil */
    border-radius: 5px;        /* Bordes totalmente redondeados */
    
    color: white;               /* Color del texto */
    cursor: pointer;            /* Manito al pasar el mouse */

    margin-right: 5px;
}
.boton-salir:hover{
    border-color: #a94442;
    transform: scale(1.05);
    /* color: #a94442; */

}

/*================
    main
================*/
h1{
    display: flex;
    justify-content: center;
    padding-top: 40px;
    padding-bottom: 30px;
    margin: 0px;
    color: white;
    font-size: 32px;
    user-select: none; /* no permite seleccionar el texto*/

}

/* /Botones filtrado/ */
.filtros{
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0px;
}

.filtro-boton {
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    background-color: #333;
    color: white;
    margin-right: 15px;
    border-radius: 5px;
    font-size: 16px;
}

.filtro-boton:hover {
    background-color: #555;
}

/* Clase para el botón seleccionado */
.filtro-boton.activo {
    background-color: #51b1a3; /* Tu color turquesa */
    color: black;
    font-weight: bold;
}



#contenedor-productos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 15px !important;
    margin: auto;
    width: 86%;
    margin-bottom: 30px;
}

.carta-producto {
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 15px;
    width: 200px;
    height: 265px;
    margin: 5px;
    font-size: 15px;
    padding: 10px;
    text-align: center;
    justify-content: space-evenly;
    backdrop-filter: blur(1px);
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.carta-carrito{
    height: auto !important;
    flex-direction: row !important;
    width: 330px;
}

.carta-imagen-carrito{
    padding: 0 !important;
}

.carta-texto-carrito{
    width: 140% !important;
}
.carta-id-precio-carrito{
    flex-direction: column-reverse !important;
}

.carta-producto:hover, .boton:hover{
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border-color: #ccc;
    transform: scale(1.05);
}

#contenedor-productos h5, #contenedor-productos p {
    margin: 0;
}
#contenedor-productos h5{
    /* esto es para recortar los textos de los titulos de los productos con puntos ... */
    /* para multiples lineas no hay otra manera de hacerlo */
    /* Sintaxis moderna */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    line-clamp: 2;
    overflow: hidden;
    /* margin-bottom: 10px; */
}

.carta-producto img {
    width: auto;
    height: auto;
    max-width: 90%;
    max-height: 95%;
    object-fit: contain;
    border-radius: 10px;
    filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.4));
}

.carta-imagen{
    height: 75%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    box-sizing: border-box;
    padding-bottom: 10px;
}


.carta-texto{
    height: 25%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: bold;
    font-size: 16px;
    width: 85%;
    color: white;
    justify-content: space-between;
    display: flex;
    flex-direction: column;
}


.carta-id-precio {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-direction: row-reverse;
    font-size: 17px;
}


.li-listados {
    display: flex;
    align-items: center;

    flex-direction: column;
    color: white;
}

.li-listados p, .li-listados img {
    margin-bottom: 0;
}


.main-bienvenida{
    display:flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.body-bienvenida{
    min-height: 90vh; /*/Esto define que el body ocupe TODA la altura de la pantalla/ */
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-bienvenida a{
    font-size: 40px !important;
}
.logo-bienvenida .color-cyan{
    text-shadow: none;
}

.login-contenedor {
    background: rgba(30, 41, 59, 0.80); /* Fondo semitransparente */
    backdrop-filter: blur(12px);         /* Efecto vidrio esmerilado */
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    width: 40%;
}

/* Título h2 */
.login-contenedor h2 {
    text-align: center;
    font-size: 1.1rem;
    color: white;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#inputNombre {
    width: 100%;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    font-family: inherit;
    text-align: center;
    outline: none;
    transition: 0.3s;
    box-sizing: border-box; /* Para que el padding no rompa el ancho*/
    text-transform: capitalize;
}

#inputNombre::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

#inputNombre:focus {
    border-color: #51b1a3;            
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.3); /* Resplandor neón */
    background: rgba(0, 0, 0, 0.4);      /* Se oscurece un poco el fondo */
    transform: scale(1.02);              /* Se agranda un poquito */
}

/* --- 5. El Botón (Etiqueta button dentro de .login-contenedor) --- */
.login-contenedor button {
    width: 100%;
    padding: 15px;
    color: #0f172a;
    font-weight: 800;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
    background: white; 
}

.login-contenedor button:hover {
    background: #51b1a3;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.3); /* Resplandor neón */
    transform: translateY(-2px);
}

#contenedor-carrito{
    display: flex;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
}

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

.botonAgregarCarrito{
    /* padding: 4px;
    border-radius: 5px;
    border: 50px; */

    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: black;
    padding: 1px 20px;
    border-radius: 20px;
    border: 0;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.botonAgregarCarrito:hover{
    background-color: #51b1a3;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border-color: #ccc;
    transform: scale(1.05);
}

.carrito-final {
    display: flex;
    /* flex-direction: column-reverse; */
    /* flex-direction: column-reverse;
    color: white;
    align-items: center;
    font-size: xx-large;
    font-family: monospace;
    font-family: monospace; */
    margin-bottom: 50px;
    justify-content: space-around;
}

.boton-vaciar-carrito {
    padding: 10px 20px;
}

.precio-total-carrito {
    display: flex;
    justify-content: center;
    color: white;
    font-size: xx-large;
    font-family: monospace;
    font-weight: bold;
}

.carrito-vacio{
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: space-evenly;
    border-radius: 15px;
    font-size: 15px;
    padding: 30px;
    backdrop-filter: blur(1px);
    /* background-color: rgba(255, 255, 255, 0.2); */
    background-color: #1a1a1a;  /* Color de fondo oscuro (azul noche) */
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.carrito-vacio a {
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    background-color: #101623;  /* Color de fondo oscuro (azul noche) */
    border-radius: 5px;
    font-size: 16px;
    background-color: #51b1a3; /* Tu color turquesa */
    color: black;
    font-weight: bold;
    margin-top: 15px;
}

.carrito-vacio a:hover {
    border: 0;
    color: black;
    font-weight: bold;
    border-color: #51b1a3;             
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.2); /* Resplandor neón */
    /* background: rgba(0, 0, 0, 0.4);       */
    transform: scale(1.05);
}

.mensaje-error strong {
    color: #ff4646;
}

.mensaje-error {
    color: #ff4646;
    margin-top: 20px;
    background-color: #1a1a1a;
    border: 1px solid #ff4646;
    /* box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); */
    
    padding: 15px 30px;
    border-radius: 15px;
    font-size: 18px;
}