.um-table-column.ImageGallery {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.4rem;
}

/* Accessibility Enhancements for Product Table */

/* Table wrapper */
.ptew-product-table-wrapper {
    max-width: 100%;
    overflow-x: auto;
    margin-bottom: 1.5em;
}

/* Table base styles */
.ptew-product-table-list {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0 0 1.5em;
}

/* Table header */
.ptew-product-table-list thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    color: #212529;
    font-weight: 600;
    padding: 12px;
    text-align: left;
    vertical-align: bottom;
    position: relative;
}

/* Sortable headers */
.ptew-product-table-list th[aria-sort] {
    cursor: pointer;
    padding-right: 24px;
}

.ptew-product-table-list th[aria-sort]:hover {
    background-color: #e9ecef;
}

/* Table cells */
.ptew-product-table-list td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

/* Focus styles for interactive elements */
.ptew-product-table-list a:focus,
.ptew-product-table-list button:focus,
.ptew-product-table-list [tabindex="0"]:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

/* High contrast mode support */
@media (forced-colors: active) {
    .ptew-product-table-list th,
    .ptew-product-table-list td {
        border-color: CanvasText;
    }
    
    .ptew-product-table-list a:focus,
    .ptew-product-table-list button:focus,
    .ptew-product-table-list [tabindex="0"]:focus {
        outline: 2px solid CanvasText;
    }
}

/* Screen reader only text */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* DataTables accessibility enhancements */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 6px 12px;
    margin-left: 2px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #495057 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button:focus {
    background-color: #e9ecef;
    border-color: #dee2e6;
    color: #212529 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background-color: #007bff;
    border-color: #007bff;
    color: #ffffff !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    color: #6c757d !important;
    cursor: not-allowed;
    background-color: #ffffff;
    border-color: #dee2e6;
}

/* Table caption */
.ptew-product-table-list caption {
    color: #212529;
    font-size: 1.1em;
    font-weight: 600;
    text-align: left;
    padding: 8px 12px;
    margin-bottom: 8px;
    background-color: #ffffff;
}

/* Highlighted rows */
.ptew-product-table-list td.highlighted {
    background-color: #fff3cd;
    border-left: 3px solid #ffc107;
}

/* Product attributes list */
.attributes {
    margin: 0;
    padding: 0;
    list-style: none;
}

.attribute-item {
    margin-bottom: 4px;
}

.attribute-label {
    font-weight: 600;
    margin-right: 8px;
}

/* Rating distribution */
.rating-counts {
    margin: 0;
    padding: 0;
    list-style: none;
}

.rating-count {
    margin-bottom: 2px;
}

/* Gallery wrapper */
.gallery-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.gallery-wrapper img {
    max-width: 80px;
    height: auto;
    border-radius: 4px;
}

/* Downloadable files list */
.downloadable-files {
    margin: 0;
    padding: 0;
    list-style: none;
}

.file-item {
    margin-bottom: 4px;
}

/* Product categories and tags */
.product-categories,
.product-tags {
    margin: 0;
    padding: 0;
    list-style: none;
}

.category-list,
.tag-list {
    display: inline;
}

/* No products message */
.no-products {
    text-align: center;
    padding: 24px;
    color: #6c757d;
    font-style: italic;
}

/* Keyboard navigation focus indicator for table rows */
.ptew-product-table-list tbody tr:focus {
    outline: none;
    background-color: rgba(0,123,255,0.05);
    box-shadow: inset 0 0 0 2px #007bff;
}

/* DataTables search input accessibility */
.dataTables_filter input[type="search"] {
    padding: 6px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    margin-left: 8px;
}

.dataTables_filter input[type="search"]:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
    outline: 0;
}

/* DataTables info text */
.dataTables_info {
    color: #6c757d;
    padding-top: 8px;
}

/* Ensure sufficient color contrast */
.ptew-product-table-list a {
    color: #0056b3;
    text-decoration: none;
}

.ptew-product-table-list a:hover {
    color: #004085;
    text-decoration: underline;
}

/* Price formatting */
.product-price {
    font-weight: 600;
    color: #212529;
}

.product-price del {
    color: #6c757d;
    margin-right: 8px;
}

.product-price ins {
    color: #28a745;
    text-decoration: none;
}

/* Stock status indicators */
.ptew-stock-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 500; }
.ptew-stock-instock { background: #d1fae5; color: #065f46; }
.ptew-stock-outofstock { background: #fee2e2; color: #991b1b; }
.ptew-stock-backorder { background: #fef3c7; color: #92400e; }
.ptew-row-oos { opacity: 0.45; }

/* Responsive design */
@media screen and (max-width: 768px) {
    .ptew-product-table-wrapper {
        margin-left: -15px;
        margin-right: -15px;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .ptew-product-table-list caption {
        font-size: 1em;
    }
    
    .gallery-wrapper img {
        max-width: 60px;
    }
    
    .dataTables_wrapper .dataTables_paginate .paginate_button {
        padding: 4px 8px;
    }
}

/* Quantity Input */
.ptew-quantity-input {
    width: 60px !important;
    text-align: center;
    padding: 5px !important;
}

/* Quick View Modal */
.ptew-modal {
    display: none; 
    position: fixed; 
    z-index: 99999; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.4); 
    backdrop-filter: blur(2px);
}

.ptew-modal-content {
    background-color: #fefefe;
    margin: 5% auto; 
    padding: 0;
    border: 1px solid #888;
    width: 90%;
    max-width: 900px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.ptew-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 15px;
    top: 10px;
    z-index: 10;
    cursor: pointer;
}

.ptew-modal-close:hover,
.ptew-modal-close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.ptew-modal-body {
    padding: 30px;
}

.ptew-quick-view-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.ptew-qv-image {
    flex: 1 1 300px;
}
.ptew-qv-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.ptew-qv-summary {
    flex: 1 1 300px;
    display: flex;
    flex-direction: column;
}

.ptew-qv-title {
    margin-top: 0;
    font-size: 24px;
    color: #333;
}

.ptew-qv-price {
    font-size: 20px;
    font-weight: bold;
    color: #126e65;
    margin-bottom: 15px;
}

.ptew-qv-description {
    margin-bottom: 20px;
    color: #666;
}

.ptew-quick-view-btn .ptew-icon-eye {
    margin-right: 5px;
}