/* Estilo general del cuerpo */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #eaeff3;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Cambiado para evitar problemas de desbordamiento */
}


.btn{
    color: #ffff;
    background-color:#E23A29;
    text-decoration: none;
    padding: 10px;
    border-radius: 1rem;
    font-weight: bold;
    display: block;
    text-align: center;

}

/* Contenedor principal */
.container {
    max-width: 500px;
    width: 90%; /* Reduce el ancho en pantallas pequeñas */
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
    position: relative; /* Cambiado para mejor compatibilidad */
    margin: 20px; /* Añadido espacio para pantallas más pequeñas */
}

.container:hover {
    transform: translateY(-5px);
}

/* Logo */
.logo {
    width: 150px;
    height: auto;
    margin-bottom: 20px;
}

/* Entrada de texto */
input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    margin: 15px 0;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    outline: none;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    border-color: #ff2626;
}

/* Botón */
button {
    width: 100%;
    padding: 12px;
    background-color: #ff2626;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #d42020;
}

/* Spinner */
.spinner {
    display: none;
    margin: 20px auto;
    text-align: center;
}

.spinner > div {
    background-color: #ff2626;
    height: 40px;
    width: 6px;
    display: inline-block;
    animation: sk-stretchdelay 1.2s infinite ease-in-out;
}

.spinner .rect2 { animation-delay: -1.1s; }
.spinner .rect3 { animation-delay: -1.0s; }
.spinner .rect4 { animation-delay: -0.9s; }
.spinner .rect5 { animation-delay: -0.8s; }

@keyframes sk-stretchdelay {
    0%, 40%, 100% { transform: scaleY(0.4); }
    20% { transform: scaleY(1.0); }
}

/* Resultado */
#result {
    margin-top: 20px;
}

/* Mensajes de error */
.error {
    color: #e74c3c;
    font-weight: bold;
    margin-bottom: 10px;
}

/* Mensajes de información */
.info {
    color: #333;
    background-color: #f9f9f9;
    border-left: 5px solid #ff2626;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
}

/* Lista de inventario */
ul {
    list-style-type: none;
    padding: 0;
    margin-top: 20px;
}

li {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 10px;
    margin: 5px 0;
    border-radius: 6px;
    transition: transform 0.2s;
}

li:hover {
    transform: translateY(-3px);
}

h3 {
    color: #444;
    margin-bottom: 15px;
    font-size: 18px;
}

h3 span {
    background-color: green;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px; /* Mejor redondeo */
    font-size: 12px;
}

/* Media query para pantallas medianas */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    input[type="text"],
    button {
        padding: 10px;
        font-size: 14px;
    }

    h3 {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    input[type="text"],
    button {
        padding: 8px;
        font-size: 13px;
    }

    .logo {
        width: 120px; 
    }

    h3 {
        font-size: 14px;
    }
}

.pegar-btn {
    width: 100%; 
    padding: 12px; 
    background-color: #4caf50; 
    color: white; 
    border: none; 
    border-radius: 6px; 
    cursor: pointer; 
    font-size: 16px; 
    font-weight: bold; 
    transition: background-color 0.3s ease; 
    margin-top: 10px; 
}

.pegar-btn:hover {
    background-color: #388e3c; 
}

.modal {
    display: none; 
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); 
    overflow: auto; 
    z-index: 999; 
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    width: 80%;
    max-width: 500px;
    border-radius: 10px;
    transition: transform 0.3s ease; 
    transform: translateY(0);
}

.modal-content.slide-up {
    transform: translateY(-50px); 
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    input[type="text"],
    button {
        padding: 10px;
        font-size: 14px;
    }

    h3 {
        font-size: 16px; 
    }

    li {
        font-size: 14px; 
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    input[type="text"],
    button {
        padding: 8px;
        font-size: 13px;
    }

    .logo {
        width: 120px; 
    }

    h3 {
        font-size: 14px; 
    }

    li {
        font-size: 12px; 
    }
}

.product-image {
    height: auto;
    display: none;
    margin: 10px auto;
    width: 240px;
    border-radius: 1rem;
}
.precio {
    font-size: 1.2em;
    color: #28a745;
    margin: 10px 0;
    font-weight: bold;
}

.precio label{
    color: #333;
}
