#custom-wcpt-table .cwpt-quick-view-btn {
    background-color: #134bcd !important;
    color: #ffffff !important;
    border: none !important;
    padding: 13px 15px;
    border-radius: 18px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s;
    text-decoration: none;
    white-space: nowrap;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

#custom-wcpt-table .cwpt-quick-view-btn:hover {
    background-color: #0f38a0 !important; /* slightly darker for hover */
    /* transform: translateY(-1px); */
}

#cwpt-quick-view-overlay {
    position: fixed;
    top:0; left:0; width:100%; height:100%;
    background: rgba(0,0,0,0.7);
    display: flex; /* <-- ADD THIS */
    align-items: center; /* <-- ADD THIS (Vertical Centering) */
    justify-content: center; /* <-- ADD THIS (Horizontal Centering - good practice) */
    z-index:9999;
}

.cwpt-quick-view-popup {
    /* Remove relative positioning, margin, and padding for the Flexbox child */
    max-width: 900px;
    background: #fff;
    padding: 40px;
    /* Use 'initial' or remove margin to let Flexbox handle centering */
    margin: 0; /* <-- CHANGE THIS */
    /* Ensure it doesn't take up full height if content is short */
    max-height: 90vh; /* Optional: Limit height on small screens */
    overflow-y: auto; /* Optional: Allow scrolling if content is too tall */
    /* Keep other properties */
    display: flex;
    gap: 20px;
    position: relative;
}

.cwpt-quick-view-close {
    position: absolute;
    top: 10px; right: 10px;
    background: transparent;
    border: none;
    font-size: 30px;
    cursor: pointer;
    padding: 2px !important;
}

.cwpt-quick-view-close:hover {
    background: transparent !important;
    color: #ff0000;
}

.cwpt-quick-view-inner {
    display: flex;
    gap: 20px;
    width: 100%;
}

.cwpt-quick-view-details h2 {
    margin-top: 0; /* Ensures the H2 starts high up */
}

.cwpt-quick-view-images img {
    max-width: 100%;
    display:block;
    margin-bottom: 10px;
}

.cwpt-quick-view-details {
    flex: 1;
}

/* Unique Keyframes for the Quick View Loader */
@keyframes quick-view-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@-webkit-keyframes quick-view-spin {
    0% { -webkit-transform: translate(-50%, -50%) rotate(0deg); }
    100% { -webkit-transform: translate(-50%, -50%) rotate(360deg); }
}

/* Updated Loader Style for Quick View */
.cwpt-quick-view-loader { /* RENAMED CLASS */
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #555;
    border-radius: 50%;
    
    /* Apply the unique keyframes */
    animation: quick-view-spin 1s linear infinite;
    -webkit-animation: quick-view-spin 1s linear infinite; 
    
    /* Centering CSS (combined for efficiency) */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); 
}

/* Remove or rename your old .cwpt-loader class if it's still present in this file */
/* (The old one was causing the issue) */

