body{
    overflow: initial !important;
}

.table-parent{
    overflow-x: auto;
    overflow-y: visible;
    position: relative;
    max-height: none;
}

#Products3 .hedCenter {
    z-index: 99999;
}

.table-parent table {
    width: 100%;
    /* min-width: 800px; */
}

.table-parent thead {
    background: white;
    border-bottom: 2px solid #dee2e6;
}

.table-parent thead th {
    background: white;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
    padding: 12px 8px;
}

/* Sticky header wrapper styles */
.sticky-header-wrapper {
    /* background: #007dc8; */
    border-bottom: 2px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sticky-header-wrapper table {
    margin: 0;
    border-collapse: collapse;
    background: transparent !important;
}

.sticky-header-wrapper th {
    background: #007dc8;
    color: white;
    white-space: nowrap;
    padding: 8px 4px;
    border: none;
}

/* Sticky purple rows styles */
.sticky-header-wrapper .sticky-purple-rows {
    background: transparent;
}

.sticky-header-wrapper .sticky-purple-rows td {
    background: inherit;
    border: none;
    padding: 8px 4px;
    white-space: nowrap;
}

/* Ensure purple rows maintain their original styling when sticky */
.sticky-header-wrapper tr.tableBoxTrPurple td {
    color: #800080 !important;
    background-color: transparent !important;
    text-align: right;
    padding: 10px;
    font-size: 12px;
    font-weight: bold;
}


.sticky-header-wrapper{
    position: fixed;
    top: 60px;
    left: 0;
    background: #fff;
    z-index: 9999;
    overflow-x: auto;
    overflow-y: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-bottom: 2px solid #dee2e6;
    /* Smooth scrolling optimizations */
    /* scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin; */
    scrollbar-color: #007dc8 #f0f0f0;
    box-shadow: inset 5px 4px 6px 0px rgba(100, 100, 100, 0.5);
}

.sticky-header-wrapper th{
    font-size: 11px;
    text-align: center;
    border-left: 0.05rem solid #fff;
}

#Products3 .table th{
    white-space: pre;
    top:0;
}

.tableBoxTrPurple{
    top: 0;
}

#Products3 .table tr{
    background-color: transparent;
}

.table-border-shadow{
    box-shadow: inset 5px 0px 5px 0px rgba(100, 100, 100, 0.5);
        margin: 0 -16px;
}

.table-parent {
    transform: rotateX(180deg);
    /* direction: rtl; */
}

.table-parent > * {
    transform: rotateX(180deg);
    /* direction: ltr; */
}

@media (max-width: 1200px) {
    .table-parent {
        box-shadow: inset 5px 0px 5px 0px rgba(100, 100, 100, 0.5);
    }
}

@media screen and (max-width: 991px) {
    .sticky-header-wrapper{
        right: 18px;
    }
}

@media (max-width: 768px) {
    .table-parent table {
        min-width: 1000px; /* Wider minimum for mobile to show all columns */
    }

    .sticky-header-wrapper {
        right: 12px;
    }
    
    #Products3 .productDetailsSlider {
        width: 100% !important;
        padding-bottom: 0px;
        height: auto;
    }
    #Products3 .productDetailsRow {
        max-width: 520px;
        position: sticky !important;
        right: 0;
    }
}

@media (max-width: 540px) {
    #Products3 .productDetailsRow {
        max-width: 320px;
    }
}

/* Override d-none class for table headers on small screens */
@media (max-width: 575.98px) {
    th.d-none.d-sm-table-cell,
    td.d-none.d-sm-table-cell {
        display: table-cell !important;
    }
    
    .table-parent table {
        min-width: 1200px; /* Even wider for very small screens */
    }
}

@media (max-width: 480px) {
    .sticky-header-wrapper {
        right: 7px;
    }
}