/* Modal Styles */
.ndp-model {
    position: fixed; 
    z-index: 9999; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: hidden; 
    background-color: rgba(0, 0, 0, 0.4); 
    justify-content: center; 
    align-items: center; 
    display: flex;
}
.ndp-model-content {
    background-color: #fefefe;
    padding: 20px;
    border: 1px solid #888;
    height: 80dvh;
    width: 90%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    position: relative;
}

.ndp-model-content > span.close {
    color: #fff; 
    background-color: rgba(0, 0, 0, 1); 
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 25px;
    font-weight: bold;
    position: absolute;
    top: -15px;
    right: -15px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.ndp-model-content > span.close:hover,
.ndp-model-content > span.close:focus {
    background-color: rgba(0, 0, 0, 1);
    outline: none;
}

.ndp-model-content > span.close:active {
    transform: scale(0.9);
}

button.single_add_to_cart_button {
    display: flex !important;
}

/* Style the scrollable wrapper */
.cart-items-table-wrapper {
    max-height: 500px; /* Vertical scrolling if content exceeds 500px */
    overflow-y: auto; /* Enable vertical scrolling */
    overflow-x: auto; /* Enable horizontal scrolling for small screens */
    margin: 20px 0; /* Add some space around */
}

/* Table styling */
#apstable {
    width: 100%;
    border-collapse: collapse; /* Merge table borders */
    background-color: #fff; /* Table background */
}

#apstable th, #apstable td {
    padding: 10px;
    border: 1px solid #ccc; /* Table border */
    text-align: left; /* Align text to the left */
    vertical-align: middle; /* Align text to the middle */
    white-space: nowrap; /* Prevent text from wrapping */
}

/* Header row styling */
#apstable thead th {
    background-color: #f4f4f4; /* Light gray background for headers */
    font-weight: bold; /* Bold text */
    text-align: center; /* Center-align headers */
}

/* Add zebra-striping for rows */
#apstable tbody tr:nth-child(odd) {
    background-color: #f9f9f9; /* Light background for odd rows */
}
#apstable tbody tr:nth-child(even) {
    background-color: #ffffff; /* White background for even rows */
}

/* Images in the table */
#apstable img {
    max-width: 70px; /* Ensure images are responsive */
    height: auto; /* Maintain apsect ratio */
    display: block;
    margin: 0 auto;
}

/* For smaller screens */
@media (max-width: 768px) {
    .cart-items-table-wrapper {
        overflow-x: auto; /* Ensure horizontal scrolling for small screens */
    }

    #apstable th, #apstable td {
        font-size: 12px; /* Reduce font size for small screens */
    }
}
