.product-search-form{display:flex;align-self:center;gap:15px;}
.product-search-form.header-search-form{gap:10px;}

/* Filter Category Styles (Existing) */
.filter-item {
    padding: 0;
    background: #f9f9f9;
    border-radius: 4px;
    margin-bottom: 30px;
}

.filter-item h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #333;
    font-family: 'Jost', sans-serif;
}

.filter-item ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-item li {
    margin-bottom: 10px;
}

.filter-item a.filter-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-family: "Jost", sans-serif;
    font-size: 16px;
    font-weight: normal;
    text-transform: none;
    font-style: normal;
    text-decoration: none;
    line-height: 1.5em;
    color:#454545;
}

.filter-item a.filter-link:hover {
    color: #9E1E23;
}

.filter-item .checkbox-mock {
    width: 16px;
    height: 16px;
    border: 1px solid #1A1A1A;
    border-radius: 2px;
    margin-right: 10px;
    display: inline-block;
    position: relative;
}

.filter-item .checkbox-mock.checked {
    border-color: #1A1A1A;
    fill: #1A1A1A;
    color: #1A1A1A;
}

.filter-item .checkbox-mock.checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

@media screen and (max-width: 768px) {
    .filter-item h3 {
        font-size: 16px;
    }
}

/* Product List Container Styles */
.product-list-container {
    font-family: 'Jost', sans-serif;
    margin-bottom: 50px;
}

/* Top Bar: Filters & Search */
.product-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 40px;
}

.product-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    width: 65%;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    font-family: 'Jost', sans-serif;
    font-weight: 500;
    background: #fff;
    min-width: 140px;
    font-size: 18px;
    color: #333;
    outline: none;
    cursor: pointer;
    flex:1;
}

/* Select2 Customization to match .filter-select */
.select2-container .select2-selection--single {
    border: 1px solid #ddd !important;
    border-radius: 0 !important;
    height: 45px !important; /* Fixed height to match others approx */
    padding: 0 12px !important;
    outline: none !important;
    display: flex !important;
    align-items: center !important;
    background-color: #fff !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #333 !important;
    line-height: normal !important;
    font-family: 'Jost', sans-serif !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    padding-left: 0 !important;
    padding-right: 20px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    top: 0 !important;
    right: 10px !important;
    width: 20px !important;
    position: absolute !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #333 transparent transparent transparent !important;
    border-style: solid !important;
    border-width: 5px 4px 0 4px !important;
    height: 0 !important;
    left: 50% !important;
    margin-left: -4px !important;
    margin-top: -2px !important;
    position: absolute !important;
    top: 50% !important;
    width: 0 !important;
}

.select2-container {
    flex: 1;
    min-width: 140px;
    margin: 0 !important; /* Ensure no margin interferes */
    box-sizing: border-box !important;
}

.select2-dropdown {
    border-color: #ddd !important;
    border-radius: 0 !important;
    font-family: 'Jost', sans-serif !important;
}

.select2-results__option {
    padding: 8px 12px !important;
    font-size: 16px !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #1a1a1a !important;
    color: white !important;
}

.select2-search--dropdown .select2-search__field {
    border: 1px solid #ddd !important;
    padding: 6px !important;
    font-family: 'Jost', sans-serif !important;
    outline: none !important;
}

.product-search-box {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    background: #fff;
    max-width: 100%;
    flex: 1;
    gap:8px;
}

.product-search-box input {
    border: none;
    background: transparent;
    padding: 8px 12px;
    flex-grow: 1;
    font-size: 14px;
    outline: none;
    color: #333;
    border-color: #45454542;
}

.product-search-box button {
    background: #1a1a1a;
    border: none;
    color: #fff;
    width: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #45454542;
}

.product-search-box button:hover {
    background: #333;
}

/* DataTables Info Bar */
.info-bar-wrapper {
    background: #444; /* Dark grey for info bar */
    color: #fff;
    padding: 10px 20px;
    font-size: 14px;
    border-bottom: 1px solid #555;
}

.dataTables_info {
    padding-top: 0 !important;
    color: #fff !important;
}

/* Table Styles */
table.dataTable.display {
    border-collapse: collapse !important;
    border: none !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

table.dataTable thead th {
    background-color: #1a1a1a; /* Black header */
    color: #fff;
    padding: 15px 20px;
    font-weight: 500;
    border: none !important;
    font-size: 15px;
    vertical-align: middle;
}

table.dataTable tbody td {
    padding: 20px;
    vertical-align: middle;
    border: none !important;
    border-bottom: 1px solid #45454542 !important;
    color: #333;
    background: #fff !important;
    text-align: center !important;
}

/* Column Alignment */
.col-product, .product-info-cell {
    text-align: left !important;
}

.product-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.col-oe, .cell-oe,
.col-specs, .cell-specs,
.col-size, .cell-size,
.col-qty, .cell-qty,
.col-action, .cell-action {
    text-align: center !important;
}

table.dataTable.no-footer {
    border-bottom: none !important;
}

/* Product Cell */
.product-flex {
    display: flex;
    align-items: center;
    justify-content: left;
    gap: 20px;
}

.product-thumb {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border: 1px solid #eee;
    background: #fff;
    padding: 5px;
}

.placeholder-thumb {
    width: 80px;
    height: 80px;
    background: #f5f5f5;
    border: 1px solid #eee;
}



#category-product-table .product-name {
    font-size: 18px;
    font-weight: bold;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.4;
    font-family: "Jost", sans-serif;
}

/* Quantity Control */
#category-product-table .qty-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

#category-product-table .quantity-control {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    width: fit-content;
    border-radius: 0; /* Square corners as per image */
}

#category-product-table .quantity-control .qty-btn {
    background: #fff;
    border: none;
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: #333;
    transition: background 0.2s;
}

#category-product-table .quantity-control .qty-btn:hover {
    background: #f9f9f9;
}

#category-product-table .quantity-control .qty-input {
    width: 40px !important;
    height: 32px;
    text-align: center;
    border: none !important;
    border-left: 1px solid #ddd !important;
    border-right: 1px solid #ddd !important;
    padding: 0 !important;
    font-size: 14px;
    color: #333 !important;
    -moz-appearance: textfield;
    background: #fff;
    margin: 0;
    outline: none;
}
#category-product-table .quantity-control .qty-input::-webkit-outer-spin-button,
#category-product-table .quantity-control .qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#category-product-table_wrapper{
    border: 1px solid #45454542;
}

/* Action Button */
#category-product-table_wrapper .add-to-cart-btn {
    background: #fff;
    border: 1px solid #9E1E23;
    color: #9E1E23;
    padding: 10px 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    font-size: 14px;
    transition: all 0.3s;
    text-transform: uppercase;
    font-family: 'Jost', sans-serif;
}

#category-product-table_wrapper .add-to-cart-btn:hover {
    background: #9E1E23;
    color: #fff;
}

#category-product-table_wrapper .add-to-cart-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Bottom Bar: Length & Pagination */
.bottom-bar-wrapper {
    background: #444; /* Dark grey */
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    font-size: 14px;
}

#category-product-table{
    border: 1px solid #45454542;
}

/* Length Menu */
#category-product-table_wrapper .dataTables_length {
    float: none !important;
    color: #fff !important;
    display: flex;
    align-items: center;
}

#category-product-table_wrapper .dataTables_length select {
    background: #555;
    color: #fff;
    border: 1px solid #666;
    padding: 4px 8px;
    border-radius: 3px;
    margin: 0 5px;
    outline: none;
}

#category-product-table_wrapper .dataTables_length select option {
    background: #fff;
    color: #000 !important;
}

#category-product-table_length label{
    color: #FFFFFF;
    display: flex;
    align-items: center;
    margin-bottom: 0;
    gap: 5px;
}

#category-product-table_length select{
    color:#FFFFFF;
}

/* Pagination */
#category-product-table_wrapper.dataTables_paginate {
    float: none !important;
    padding-top: 0 !important;
    display: flex;
    gap: 5px;
}

#category-product-table_wrapper .dataTables_paginate .paginate_button {
    color: #fff !important;
    background: #555 !important;
    border: 1px solid #666 !important;
    border-radius: 2px !important;
    padding: 5px 12px !important;
    margin-left: 0 !important;
    cursor: pointer !important;
    font-size: 13px;
}

#category-product-table_wrapper .dataTables_paginate .paginate_button:hover {
    background: #666 !important;
    color: #fff !important;
    border-color: #777 !important;
}

#category-product-table_wrapper .dataTables_paginate .paginate_button.current,
#category-product-table_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: #fff !important;
    color: #9E1E23 !important;
    border: 1px solid #fff !important;
}

#category-product-table_wrapper .dataTables_paginate .paginate_button.disabled,
#category-product-table_wrapper .dataTables_paginate .paginate_button.disabled:hover,
#category-product-table_wrapper .dataTables_paginate .paginate_button.disabled:active {
    background: #444 !important;
    color: #888 !important;
    border: 1px solid #555 !important;
    cursor: default !important;
}

#category-product-table_info{float: none;}

.oe-reference-numbers{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 20px;
}

.oe-reference-numbers .item{
    padding: 20px;
    border: 1px solid #45454542;
    color:#1A1A1A;
    display:flex;
    justify-content: center;
    align-items: center;
}

@media screen and (max-width: 767px) {
    .product-filters{width: 100%;}
    .filter-select{font-size: 16px;width: 100%;}

    /* Mobile Table Layout */
    #category-product-table thead {
        display: table-header-group;
    }
    #category-product-table thead tr {
        display: flex;
        background-color: #1a1a1a;
    }
    #category-product-table thead th {
        display: none; /* Hide most headers */
        padding: 10px;
        font-size: 14px;
        border: none !important;
        color: #fff;
        background: transparent;
    }
    #category-product-table thead th.col-product {
        display: block;
        width: 100px; /* Match left column width */
        text-align: left;
        padding-left: 15px;
    }
    #category-product-table thead th.col-oe {
        display: block;
        flex: 1;
        text-align: left;
        font-size: 0; /* Hide "OE Reference" text */
        padding-left: 15px;
    }
    #category-product-table thead th.col-oe::after {
        content: "Details";
        font-size: 14px;
        color: #fff;
    }

    #category-product-table tbody tr {
        display: block;
        padding: 15px;
        border-bottom: 1px solid #ddd !important;
        background: #fff;
        position: relative;
    }
    #category-product-table tbody tr::after {
        content: "";
        display: table;
        clear: both;
    }
    
    #category-product-table td {
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
        text-align: left !important;
    }

    /* Handle Image and Title split - use display: contents to unwrap grid/flex constraints */
    #category-product-table td.product-info-cell {
        display: contents;
    }
    
    #category-product-table .product-flex {
        display: contents;
    }

    /* LEFT COLUMN: Image, Qty, Action - Float Left */
    #category-product-table .product-thumb,
    #category-product-table .placeholder-thumb {
        float: left;
        clear: left;
        width: 100px;
        height: 100px;
        object-fit: contain;
        margin-bottom: 10px;
        align-self: start;
    }

    #category-product-table .cell-qty {
        display: block;
        float: left;
        clear: left;
        width: 100px;
        margin-bottom: 10px;
    }
    
    #category-product-table .cell-action {
        display: block;
        float: left;
        clear: left;
        width: 100px;
        margin-top: 0;
    }

    /* RIGHT COLUMN: Title, OE, Specs, Size - Float Right */
    #category-product-table .product-details {
        float: right;
        width: calc(100% - 115px); /* 100px img + 15px gap */
        margin-bottom: 5px;
        text-align: left;
    }

    #category-product-table .cell-oe,
    #category-product-table .cell-specs,
    #category-product-table .cell-size {
        display: block;
        float: right;
        clear: right;
        width: calc(100% - 115px);
        margin-bottom: 8px;
    }

    /* Add labels for OE, Specs, Size */
    #category-product-table .cell-oe::before { content: "OE Reference:"; }
    #category-product-table .cell-specs::before { content: "Specs:"; }
    #category-product-table .cell-size::before { content: "Size:"; }

    #category-product-table .cell-oe::before,
    #category-product-table .cell-specs::before,
    #category-product-table .cell-size::before {
        display: block;
        color: #999;
        font-size: 14px;
        margin-bottom: 2px;
        font-family: "Jost", sans-serif;
    }

    /* Adjust text styles */
    .product-name {
        font-size: 16px;
        font-weight: bold;
        margin-bottom: 5px;
        line-height: 1.3;
    }
    
    .cell-oe, .cell-specs, .cell-size {
        font-size: 15px;
        color: #333;
        font-weight: 500;
    }
    
    /* Quantity and Action styles */
    #category-product-table .quantity-control {
        transform: scale(0.9); /* Slightly smaller */
        transform-origin: left top;
    }
    
    #category-product-table_wrapper .add-to-cart-btn {
        width: 40px;
        height: 32px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0; /* Hide text */
    }
    #category-product-table_wrapper .add-to-cart-btn .dashicons {
        font-size: 20px;
        width: 20px;
        height: 20px;
        margin: 0;
    }

    .oe-reference-numbers{grid-template-columns: repeat(2, 1fr);grid-gap:10px;}
}
