/* Modal Overlay */
.modal {
    display: flex;
    align-items: center; /* Vertical centering */
    justify-content: center; /* Horizontal centering */
    padding: 1rem; /* Space around modal for smaller screens */
    background-color: rgba(0, 0, 0, 0.6); /* Semi-transparent dark overlay */
    position: fixed;
    top: 0; /* Ensure it's attached to the viewport */
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1050;
    overflow: hidden;
    transform: translate(0, 0); /* Reset any transformations */
}


/* Modal Dialog */
.modal-dialog {
    max-width: 700px; /* Set maximum width */
    width: 90%; /* Ensure responsiveness */
    margin: auto;
    position: relative;
}

/* Modal Content */
.modal-content {
    background-color: #ffffff; /* Solid white background */
    border-radius: 12px; /* Rounded corners for modern design */
    box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.2); /* Soft shadow for depth */
    overflow: hidden;
    position: relative;
    color: #333; /* Dark text color for readability */
}

/* Modal Header */
.modal-header {
    border-bottom: 1px solid #f0f0f0; /* Subtle divider */
    background-color: #f9f9f9; /* Light gray background for contrast */
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h5 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.modal-header .close {
    font-size: 1.5rem;
    color: #999;
    border: none;
    background: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-header .close:hover {
    color: #333;
}

/* Modal Body */
.modal-body {
    padding: 1.5rem;
    color: #555; /* Neutral text color */
    line-height: 1.6;
    text-align: left;
    background-color: #ffffff; /* Ensure body background is white */
}

/* Resized and Centered Image */
.modal-body img {
    max-width: 100%; /* Ensure responsiveness */
    height: auto; /* Maintain aspect ratio */
    max-height: 400px; /* Limit image height */
    width: 100%; /* Stretch image to fit modal width */
    border-radius: 8px; /* Rounded image corners */
    margin-bottom: 1rem;
    display: block;
    object-fit: cover;
}

/* Product Title */
.modal-body h4 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #072365;
    margin-bottom: 1rem;
    text-align: center;
}

/* Description Section */
.modal-body p {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #666; /* Slightly lighter gray for distinction */
}

/* Price Display */
.modal-body .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0d775e;
    margin-bottom: 1rem;
    text-align: center;
}

/* Modal Footer */
.modal-footer {
    border-top: 1px solid #f0f0f0; /* Subtle divider */
    background-color: #f9f9f9; /* Light background */
    padding: 1rem;
    display: flex;
    justify-content: space-around;
}

.modal-footer .btn {
    padding: 0.7rem 1.5rem;
    font-size: 1rem;
    border: none;
    border-radius: 25px;
    color: #fff;
    background-color: #072365; /* Primary color */
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.modal-footer .btn:hover {
    background-color: #0a529c; /* Darker shade for hover */
}

.modal-footer .btn-secondary {
    background-color: #6c757d; /* Neutral color */
}

.modal-footer .btn-secondary:hover {
    background-color: #5a6268; /* Slightly darker for hover */
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-dialog {
        max-width: 90%; /* Adapt modal size for small screens */
    }

    .modal-body {
        padding: 1.5rem;
    }

    .modal-footer {
        flex-direction: column;
        gap: 1rem;
    }
}
