.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 */
[aria-label*="Stock Status"] {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
}

[aria-label*="Stock Status: In stock"] {
    background-color: #d4edda;
    color: #155724;
}

[aria-label*="Stock Status: Out of stock"] {
    background-color: #f8d7da;
    color: #721c24;
}

[aria-label*="Stock Status: On backorder"] {
    background-color: #fff3cd;
    color: #856404;
}

/* 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;
    }
}