body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
}

.productos {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
    text-align: center;
}

h2 {
    color: #161d83;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card {
    background: #369cfcce !important;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.397);
    text-align: center;
    transition: transform 0.2s;
    overflow: hidden;
    /* Asegura que la imagen no se salga del contenedor */
    position: relative;
}

.card:hover {
    transform: scale(1.05);
    background-color: #161d83 !important;
}

.card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s ease-in-out;
}

.card:hover img {
    cursor: zoom-in;
    transform: scale(1.05);
}

.card h3 {
    margin: 10px 0;
    color: #c8d645;
}

.card p {
    font-size: 14px;
    color: #f8f9fa;
}

.price {
    font-size: 18px;
    font-weight: bold;
    color: #28a745;
    margin-top: 10px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin-top: 30px;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 25px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    background: red;
    border: none;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    background: darkred;
}