/**
 * Product Table Styles
 * Custom styling for the WooCommerce product table shortcode
 * Enhanced for professional and elegant appearance
 */

/* Table Container */
.shopglut-product-table-container {
    margin: 2em 0;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #ffffff;
}

/* Main Table */
.shopglut-product-table {
    width: 100% !important;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0;
    background-color: #ffffff;
}

/* Table Header */
.shopglut-product-table thead th {
    background: linear-gradient(to bottom, #f9fafb, #f3f4f6);
    font-weight: 600;
    text-align: left;
    padding: 18px 16px;
    border-bottom: 2px solid #e5e7eb;
    color: #374151;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

.shopglut-product-table thead th:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, #2563eb, #3b82f6);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.shopglut-product-table thead th:hover:after {
    transform: scaleX(1);
}

/* Table Body */
.shopglut-product-table tbody td {
    padding: 18px 16px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
    color: #4b5563;
    transition: all 0.3s ease;
}

.shopglut-product-table tbody tr:last-child td {
    border-bottom: none;
}

.shopglut-product-table tbody tr {
    transition: all 0.3s ease;
}

.shopglut-product-table tbody tr:hover {
    background-color: #f9fafb;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
}

/* Product Image */
.shopglut-product-table .product-image {
    width: 100px;
    text-align: center;
}

.shopglut-product-table .product-image img {
    width: 80px;
    height: auto;
    display: inline-block;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.shopglut-product-table .product-image img:hover {
    transform: scale(1.08);
    border-color: #3b82f6;
}

/* Product Title */
.shopglut-product-table .product-title a {
    font-weight: 600;
    text-decoration: none;
    color: #1f2937;
    transition: color 0.3s ease;
    font-size: 1.05em;
    position: relative;
    display: inline-block;
}

.shopglut-product-table .product-title a:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, #2563eb, #3b82f6);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}

.shopglut-product-table .product-title a:hover {
    color: #2563eb;
}

.shopglut-product-table .product-title a:hover:after {
    transform: scaleX(1);
}

/* Product Price */
.shopglut-product-table .product-price {
    font-weight: 600;
    color: #111827;
    font-size: 1.05em;
}

.shopglut-product-table .product-price del {
    opacity: 0.6;
    margin-right: 8px;
    color: #6b7280;
    font-weight: 400;
    text-decoration: line-through;
}

.shopglut-product-table .product-price ins {
    text-decoration: none;
    font-weight: 700;
    color: #047857;
    background: rgba(4, 120, 87, 0.1);
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-block;
}

/* Categories and Tags */
.shopglut-product-table .product-categories a,
.shopglut-product-table .product-tags a {
    display: inline-block;
    background: #f3f4f6;
    padding: 4px 12px;
    margin: 3px;
    border-radius: 20px;
    font-size: 0.85em;
    text-decoration: none;
    color: #4b5563;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.shopglut-product-table .product-categories a:hover,
.shopglut-product-table .product-tags a:hover {
    background: #e5e7eb;
    color: #1f2937;
    border-color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Add to Cart Button */
.shopglut-product-table .product-add-to-cart .button {
    margin: 0;
    display: inline-block;
    padding: 10px 18px;
    background: linear-gradient(to right, #2563eb, #3b82f6);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
    position: relative;
    overflow: hidden;
}

.shopglut-product-table .product-add-to-cart .button:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s ease;
}

.shopglut-product-table .product-add-to-cart .button:hover {
    background: linear-gradient(to right, #1d4ed8, #2563eb);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.3);
}

.shopglut-product-table .product-add-to-cart .button:hover:before {
    left: 100%;
}

.shopglut-product-table .product-add-to-cart .button.loading {
    opacity: 0.8;
}

/* DataTables Specific Styling */
.dataTables_wrapper {
    position: relative;
    padding: 0;
}

/* Table Controls (Top Section) */
.shopglut-table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(to bottom, #ffffff, #f9fafb);
    border-bottom: 1px solid #e5e7eb;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.shopglut-table-search {
    float: right;
    margin: 0;
}

.shopglut-table-length {
    float: left;
    margin: 0;
}

/* Bottom Section */
.dataTables_bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(to top, #ffffff, #f9fafb);
    border-top: 1px solid #e5e7eb;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.dataTables_info {
    flex: 1;
    color: #6b7280;
    font-size: 0.9em;
    font-weight: 500;
}

/* DataTables Search Input */
.dataTables_wrapper .dataTables_filter input {
    padding: 12px 18px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    margin-left: 10px;
    width: 280px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    font-size: 0.95em;
    background-color: #ffffff;
}

.dataTables_wrapper .dataTables_filter input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.dataTables_wrapper .dataTables_filter label {
    font-weight: 600;
    color: #4b5563;
    display: flex;
    align-items: center;
}

/* DataTables Length Select */
.dataTables_wrapper .dataTables_length select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    margin: 0 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    font-size: 0.95em;
    background-color: white;
    cursor: pointer;
    min-width: 80px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
    font-weight: 400;
    color: #333333;
}

.dataTables_wrapper .dataTables_length select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.dataTables_wrapper .dataTables_length select:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

/* DataTables Pagination */
.dataTables_wrapper .dataTables_paginate {
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 8px 14px;
    margin: 0 2px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background-color: #ffffff;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    min-width: 38px;
    text-align: center;
    font-size: 0.9em;
}

table.dataTable.dtr-inline.collapsed>tbody>tr>td.dtr-control:before,
table.dataTable.dtr-inline.collapsed>tbody>tr>th.dtr-control:before {
    content: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    color: #fff;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background-color: #f8f9fa;
    color: #333333 !important;
    border-color: #adb5bd;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.current):not(.disabled) {
    background-color: #f1f3f5 !important;
    color: #fff !important;
    border-color: #adb5bd;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.5;
    cursor: default;
}

/* Pagination Icons */
.dataTables_wrapper .dataTables_paginate .paginate_button i.dashicons {
    font-size: 14px;
    line-height: 1;
    display: block;
    color: #495057;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current i.dashicons {
    color: #333333;
}

.dataTables_wrapper .dataTables_paginate .ellipsis {
    padding: 0 10px;
    color: #6c757d;
    font-weight: 400;
}



/* Compact Design */