.modal-overlay, .buy-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    /*align-items: flex-start;  Alinha a modal no topo */
    align-items: center; /* Alinha a modal no topo */
    justify-content: center;
    overflow-y: auto; /* Aqui está o scroll no overlay */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 1000;
    color: #333;
}

.modal-overlay.active, .buy-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content, .buy-modal-content {
    background-color: #eee;
    padding: 30px 45px;
    max-width: 90%;
    margin: 40px auto; /* Espaço ao topo da modal (rolagem bonita) */
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content,
.buy-modal-overlay.active .buy-modal-content {
    transform: scale(1);
}

.modal-content p,
.buy-modal-content p {
    margin-bottom: 20px;
}

.modal-close,
.buy-modal-close {
    padding: 10px 20px;
    background-color: #444;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin: 0;
}

.modal-close:hover,
.buy-modal-close:hover {
    background-color: #222;
}
