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

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    position: relative;
}

.close-btn {
    color: #aaa;
    font-size: 30px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 15px;
    z-index: 1;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
}

.modal-product-image {
    width: 100%;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.modal-product-image img {
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
    object-fit: contain;
    border: 1px solid #ddd;
}

.modal-product-details {
    width: 100%;
    margin-left: 0;
    max-width: none;
}

.modal-product-details h2 {
    margin-top: 0;
    text-align: center;
}

.modal-product-details form {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.modal-product-details input,
.modal-product-details textarea {
    margin-bottom: 15px;
    padding: 12px;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
}

.modal-product-details button {
    padding: 12px;
    border-radius: 5px;
    background-color: #facc15;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
}

.modal-product-details button:hover {
    background-color: #eab308;
}

/* Tablet and Desktop Styles */
@media screen and (min-width: 768px) {
    .modal-content {
        flex-direction: row;
        width: 90%;
        max-width: 1200px;
    }

    .modal-body {
        flex-direction: row;
        align-items: flex-start;
    }

    .modal-product-image {
        width: 50%;
        margin-bottom: 0;
        margin-right: 20px;
    }

    .modal-product-image img {
        max-height: 500px;
    }

    .modal-product-details {
        width: 50%;
        margin-left: 20px;
    }

    .modal-product-details h2 {
        text-align: left;
    }

    .modal-product-details button {
        width: auto;
        align-self: flex-start;
        padding: 12px 24px;
    }
}

/* Large Desktop Styles */
@media screen and (min-width: 1200px) {
    .modal-content {
        width: 80%;
    }

    .modal-product-image img {
        max-height: 600px;
    }
}
