/* General Modal Styling (for Inventory/Admin and Product Details Modals) */
.inventory-modal, .details-modal {
    display: none; /* Hidden by default, shown by JS */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Enable scroll if modal content is too long */
    background-color: rgba(0,0,0,0.6); /* Semi-transparent black background */
}

.inventory-modal-content, .details-modal-content {
    background-color: #fefefe;
    margin: 5vh auto; /* Centered, 5% from top/bottom */
    padding: 20px;
    border: 1px solid #bbb;
    width: 90%; /* Responsive width */
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative; /* For close button positioning */
    max-height: 90vh; /* Max height to prevent overflow */
    overflow-y: auto; /* Scroll content within modal if needed */
}

/* Product Details Modal Specific Content Styling */
.details-modal-content {
    max-width: 400px; /* Specific max-width for product details */
    text-align: left; /* Ensure content is left-aligned */
}

.details-modal-content h3 { /* Style for product name */
    margin-top: 0;
    color: #FF8C00;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 1.2rem; /* Slightly smaller than admin modal title */
}

.details-modal-content p { /* Style for product description */
    font-size: 0.9rem;
    line-height: 1.5;
    color: #333;
    white-space: pre-line; /* Respect newlines in description text */
}

/* Close Button for Modals */
.close-modal-button {
    color: #aaa;
    font-size: 24px;
    font-weight: bold;
    position: absolute;
    top: 8px;
    right: 15px;
}

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