/**
 * Lenik Category Table - Frontend Styles
 *
 * @author Lenik
 * @version 1.0.0
 */

/* Container */
.category-table-container {
    position: relative;
    margin: 20px 0;
}

/* Category Header */
.category-header {
    margin-bottom: 25px;
    padding: 20px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.category-header-content {
    display: flex;
    gap: 25px;
    align-items: flex-start;
}

.category-header-image {
    flex: 0 0 auto;
}

.category-header-image img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: #f8f9fa;
}

.category-header-info {
    flex: 1;
    min-width: 0;
}

.category-header-info:only-child {
    width: 100%;
}

.category-title {
    margin: 0 0 15px 0;
    font-size: 1.75rem;
    font-weight: 600;
    color: #333;
}

.category-header .category-description {
    margin-bottom: 15px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    color: #555;
    line-height: 1.6;
}

.category-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.category-meta .price-range,
.category-meta .product-count {
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-meta .meta-label {
    color: #6c757d;
    font-size: 0.9rem;
}

.category-meta .meta-value {
    font-weight: 600;
    color: #333;
}

.category-meta .price-range .meta-value {
    color: #28a745;
}

/* Category Description (standalone) */
.category-description {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

/* Subcategories */
.subcategories {
    margin-bottom: 30px;
}

.subcategories h2 {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.subcategory-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.subcategory-list li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
}

.subcategory-list li a:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

.subcategory-list li img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

/* Table Controls Bar - Single Row Layout */
.table-controls-bar {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 20px;
    margin-bottom: 20px;
    margin-top: 15px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.table-controls-bar > .controls-left,
.table-controls-bar > .controls-center,
.table-controls-bar > .controls-right {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    width: auto !important;
    max-width: none !important;
}

.table-controls-bar > .controls-left {
    flex: 0 0 auto !important;
    justify-content: flex-start !important;
}

.table-controls-bar > .controls-center {
    flex: 1 1 auto !important;
    justify-content: center !important;
    min-width: 0;
}

.table-controls-bar > .controls-right {
    flex: 0 0 auto !important;
    justify-content: flex-end !important;
    gap: 12px;
}

.table-search {
    display: flex !important;
    flex-direction: row !important;
    width: 250px;
}

.table-search input {
    flex: 1;
    border-radius: 4px 0 0 4px;
    border: 1px solid #ced4da;
    padding: 8px 12px;
}

.table-search input:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.table-search button {
    border-radius: 0 4px 4px 0;
    padding: 8px 12px;
    border: 1px solid #007bff;
    border-left: none;
}

.table-per-page {
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-per-page label {
    margin: 0;
    font-size: 0.9rem;
    color: #6c757d;
    white-space: nowrap;
}

.table-per-page select {
    width: auto;
    min-width: 70px;
    padding: 6px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.table-results-info {
    color: #6c757d;
    font-size: 0.9rem;
    text-align: center;
}

.table-results-info strong {
    color: #333;
}

#reset-filters-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
}

#reset-filters-btn i {
    font-size: 1.1rem;
}

#reset-filters-btn .btn-text {
    white-space: nowrap;
}

/* Table Responsive Wrapper */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive.scroll {
    /* Mobile horizontal scroll mode */
}

.table-responsive.cards {
    /* Cards mode handled separately */
}

/* Main Table */
#category-products-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9rem;
}

#category-products-table th,
#category-products-table td {
    padding: 12px 10px;
    vertical-align: middle;
    border-bottom: 1px solid #dee2e6;
    white-space: nowrap;
}

#category-products-table th {
    background: #f8f9fa;
    font-weight: 600;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 10;
    line-height: 1.25;
}
#category-products-table .table-product-discounts tr {
    background: transparent !important;
}
#category-products-table .table-product-discounts th {
    background: transparent;
    position: initial;
    line-height: inherit;
    border: none;
}
#category-products-table .table-product-discounts td {
    padding: .25rem;
    line-height: initial;
}

#category-products-table .table-product-discounts .unit-bundle-price-amount {
    font-size: .9rem !important;
}

#category-products-table th:has(.multi-select-dropdown.open) {
    z-index: 11;
}

/* Header Row */
.header-row th {
    border-bottom: 2px solid #dee2e6;
}

/* Sortable Columns */
.sortable {
    cursor: pointer;
    user-select: none;
}

.sortable:hover {
    background: #e9ecef;
}

.sort-icon {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 5px;
    vertical-align: middle;
    border: 5px solid transparent;
}

.sort-icon.asc {
    border-bottom-color: #333;
    border-top: 0;
}

.sort-icon.desc {
    border-top-color: #333;
    border-bottom: 0;
}

.sort-icon:not(.asc, .desc) {
    display: none;
}

/* Filter Row */
.filter-row th {
    padding: 8px 5px;
    background: #fff;
}

#category-products-table .filter-row th:has(.multi-select-dropdown) {
    vertical-align: bottom;
}

.feature-filter {
    width: 100%;
    min-width: 100px;
    font-size: 0.85rem;
    padding: 5px 8px;
}

/* Column Specific Styles */
.col-image {
    width: 60px;
    min-width: 60px;
}

.product-image-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.col-name {
    min-width: 150px;
    max-width: var(--title-column-width, 250px);
    width: var(--title-column-width, 250px);
}

.product-name-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    display: block;
    max-width: var(--title-column-width, 250px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-name-link:hover {
    color: #007bff;
    text-decoration: underline;
}

.product-reference {
    display: block;
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 3px;
}

.col-reference {
    min-width: 100px;
    white-space: nowrap;
}

.reference-value {
    font-family: monospace;
    font-size: 0.9em;
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    color: #555;
}

.col-quantity {
    min-width: 60px;
    text-align: center;
}

.quantity-value {
    font-weight: 600;
    color: #333;
}

.col-feature {
    min-width: 100px;
}

.col-feature .no-value {
    color: #adb5bd;
}

.col-price-net,
.col-price-gross {
    min-width: 100px;
    text-align: right;
}

.price {
    font-weight: 600;
    color: #333;
}

.price-old {
    text-decoration: line-through;
    color: #6c757d;
    font-size: 0.85rem;
    display: block;
}

.price-discounted {
    color: #dc3545;
}

.col-discount {
    min-width: 80px;
    text-align: center;
}

.discount-badge {
    display: inline-block;
    padding: 3px 8px;
    background: #dc3545;
    color: #fff;
    border-radius: 3px;
    font-weight: 600;
    font-size: 0.85rem;
}

.no-discount {
    color: #adb5bd;
}

.col-stock {
    min-width: 100px;
    text-align: center;
}

.stock-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 0.85rem;
    font-weight: 500;
}

.stock-badge.in-stock {
    background: #d4edda;
    color: #155724;
}

.stock-badge.out-of-stock {
    background: #f8d7da;
    color: #721c24;
}

.stock-badge.backorder {
    background: #fff3cd;
    color: #856404;
}

.col-cart {
    min-width: 180px;
}

.add-to-cart-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Quantity Input with +/- Buttons */
.quantity-input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #ced4da;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}

.qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 32px;
    padding: 0;
    border: none;
    background: #f8f9fa;
    cursor: pointer;
    transition: background 0.2s;
}

.qty-btn:hover {
    background: #e9ecef;
}

.qty-btn:active {
    background: #dee2e6;
}

.qty-btn i {
    font-size: 16px;
    color: #495057;
}

.quantity-input {
    width: 50px;
    height: 32px;
    text-align: center;
    border: none;
    border-left: 1px solid #ced4da;
    border-right: 1px solid #ced4da;
    border-radius: 0;
    padding: 0 4px;
    font-size: 0.9rem;
    -moz-appearance: textfield;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-input:focus {
    outline: none;
    box-shadow: none;
}

.add-to-cart-btn {
    padding: 6px 12px;
    white-space: nowrap;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-to-cart-btn i {
    font-size: 1.1rem;
}

.add-to-cart-btn.adding {
    opacity: 0.7;
    pointer-events: none;
}

.add-to-cart-btn.added {
    background: #28a745;
    border-color: #28a745;
}

.unavailable {
    color: #6c757d;
    font-style: italic;
}

/* No Products */
.no-products-row td {
    padding: 40px 20px;
}

.no-products-message {
    text-align: center;
}

.no-products-message i {
    font-size: 48px;
    color: #adb5bd;
    margin-bottom: 15px;
}

.no-products-message p {
    color: #6c757d;
    margin-bottom: 15px;
}

/* Loading Overlay */
.table-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pagination */
.table-pagination {
    /* margin-top: 20px; */
    margin-top: 0;
    order: 1;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 5px;
}

.page-item .page-link {
    display: block;
    padding: 8px 12px;
    color: #333;
    text-decoration: none;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.page-item.active .page-link {
    background: #007bff;
    border-color: #007bff;
    color: #fff;
}

.page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background: #f8f9fa;
}

.page-item:not(.disabled):not(.active) .page-link:hover {
    background: #e9ecef;
}

/* Zebra Striping */
#category-products-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

#category-products-table tbody tr:hover {
    background: #e9ecef;
}

/* Mobile Styles */
/* Tablet Styles - keep single row but compact */
/* @media (max-width: 991px) { */
    /* Category Header Tablet */
    /* .category-header-content {
        flex-direction: column;
        gap: 15px;
    }

    .category-header-image {
        text-align: center;
        width: 100%;
    }

    .category-header-image img {
        width: 120px;
        height: 120px;
    }

    .category-title {
        font-size: 1.4rem;
        text-align: center;
    }

    .category-header .category-description {
        text-align: center;
    }

    .category-meta {
        justify-content: center;
    } */

    /* Keep controls in single row on tablet, just reduce gaps */
    /* .table-controls-bar {
        gap: 10px;
        padding: 8px 12px;
    }

    .table-search {
        width: 200px;
    } */

    /* Card Mode for Mobile */
    /* .table-responsive.cards #category-products-table {
        display: block;
    }

    .table-responsive.cards #category-products-table thead {
        display: none;
    }

    .table-responsive.cards #category-products-table tbody {
        display: flex;
        flex-wrap: wrap;
        gap: 15px;
    }

    .table-responsive.cards #category-products-table tbody tr {
        display: block;
        width: 100%;
        background: #fff;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        padding: 15px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }

    .table-responsive.cards #category-products-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .table-responsive.cards #category-products-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        margin-right: 10px;
    }

    .table-responsive.cards #category-products-table tbody td:last-child {
        border-bottom: none;
    }

    .table-responsive.cards .col-image {
        width: auto;
    }

    .table-responsive.cards .product-image-thumbnail {
        width: 80px;
        height: 80px;
    }

    .table-responsive.cards .add-to-cart-wrapper {
        width: 100%;
        justify-content: flex-end;
    } */
/* } */

/* ===========================================
   MOBILE CONTROLS - Icon-based Compact Design
   =========================================== */

/* Mobile Controls Bar - New Structure */
/* Hidden by default on desktop, shown only via media query on mobile */
.mobile-controls-bar {
    display: none !important;
}

/* Mobile Icon Buttons */
.mobile-control-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-control-btn:hover,
.mobile-control-btn.active {
    background: #007bff;
    border-color: #007bff;
    color: #fff;
}

.mobile-control-btn .material-icons {
    font-size: 20px;
}

/* Expandable Search Panel */
.mobile-search-panel {
    display: none;
    padding: 10px 0;
    animation: slideDown 0.2s ease;
}

.mobile-search-panel.open {
    display: block;
}

.mobile-search-panel .search-input-wrapper {
    display: flex;
    width: 100%;
}

.mobile-search-panel input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 4px 0 0 4px;
    font-size: 16px; /* Prevents zoom on iOS */
}

.mobile-search-panel .search-submit-btn {
    padding: 10px 15px;
    background: #007bff;
    border: 1px solid #007bff;
    border-radius: 0 4px 4px 0;
    color: #fff;
}

/* Per-page Dropdown Panel */
.mobile-perpage-panel {
    display: none;
    padding: 10px 0;
    animation: slideDown 0.2s ease;
}

.mobile-perpage-panel.open {
    display: block;
}

.mobile-perpage-panel select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
    background: #fff;
}

/* Results info badge */
.mobile-results-badge {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #e9ecef;
    border-radius: 4px;
    font-size: 13px;
    white-space: nowrap;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Styles - Icon-based compact controls */
@media (max-width: 767px) {
    /* Hide desktop controls bar */
    .table-controls-bar {
        display: none !important;
    }

    /* Show mobile controls */
    .mobile-controls-bar {
        display: block !important;
        margin-bottom: 15px;
    }

    .mobile-controls-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 10px;
        background: #f8f9fa;
        border-radius: 4px;
        border: 1px solid #e9ecef;
    }

    .mobile-controls-left {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .mobile-controls-right {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    /* Results info in mobile */
    .mobile-results-badge {
        flex: 1;
        justify-content: center;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-results-badge strong {
        color: #007bff;
    }

    /* Table Responsive Mobile */
    .table-responsive {
        margin: 0 -15px;
        padding: 0 15px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    #category-products-table {
        font-size: 13px;
        min-width: 600px;
    }

    #category-products-table th,
    #category-products-table td {
        padding: 8px 6px;
        white-space: nowrap;
    }

    /* Smaller images on mobile */
    .product-image-thumbnail {
        width: 40px !important;
        height: 40px !important;
    }

    /* Compact add-to-cart on mobile */
    .add-to-cart-wrapper {
        flex-direction: column;
        gap: 4px;
    }

    .quantity-input-wrapper {
        width: 100%;
    }

    .quantity-input {
        width: 40px !important;
        padding: 4px !important;
        font-size: 12px !important;
    }

    .qty-btn {
        width: 28px !important;
        height: 28px !important;
    }

    .qty-btn .material-icons {
        font-size: 16px !important;
    }

    .add-to-cart-btn {
        width: 100%;
        padding: 6px 8px !important;
    }

    /* Mobile pagination */
    .table-pagination {
        padding: 10px;
    }

    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
    }

    .pagination .page-link {
        padding: 6px 10px;
        font-size: 13px;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .mobile-results-badge {
        font-size: 11px;
        padding: 6px 8px;
    }

    .mobile-control-btn {
        width: 36px;
        height: 36px;
    }

    .mobile-control-btn .material-icons {
        font-size: 18px;
    }

    #category-products-table {
        font-size: 12px;
    }

    .product-image-thumbnail {
        width: 32px !important;
        height: 32px !important;
    }
}

/* ===========================================
   MOBILE CARD VIEW - Full Card Layout
   =========================================== */

/* Hidden by default on desktop */
.mobile-card-view {
    display: none;
}

/* Mobile Filter Grid - 2 columns */
.mobile-filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.mobile-filter-item {
    width: 100%;
}

.mobile-feature-filter {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    color: #333;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
}

.mobile-feature-filter:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

/* Mobile Search Bar */
.mobile-search-bar {
    display: flex;
    gap: 10px;
    /* margin-bottom: 15px; */
    margin-bottom: 5px;
    margin-top: 5px;
    align-self: center;
}

.mobile-search-wrapper {
    flex: 1;
    display: flex;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.mobile-card-search {
    flex: 1;
    padding: 12px 15px;
    border: none;
    font-size: 16px;
    outline: none;
}

.mobile-card-search-btn {
    padding: 12px 15px;
    background: #007bff;
    border: none;
    color: #fff;
    cursor: pointer;
}

.mobile-card-search-btn:hover {
    background: #0056b3;
}

.mobile-card-reset-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    padding: 12px;
    background: #6c757d;
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
}

.mobile-card-reset-btn:hover {
    background: #5a6268;
}

/* Mobile Card Info Bar */
.mobile-card-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.mobile-card-results {
    font-size: 14px;
    color: #666;
}

.mobile-card-perpage-select {
    padding: 6px 10px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
    background-image: none;
}

/* Product Cards Container */
.mobile-products-cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Individual Product Card */
/* ========== Mobile Product Card (v1.9.0 redesign) ========== */
.mobile-product-card {
    display: flex;
    flex-direction: column;
    padding: 12px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.mobile-product-card .estimate-delivery-badge {
    align-self: baseline;
}

/* Card Title */
.mobile-card-title {
    margin-bottom: 6px;
}

.mobile-card-title-link {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    line-height: 1.3;
}

.mobile-card-title-link:hover {
    color: #007bff;
}

/* Card Body - 3 column layout */
.mobile-card-body {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

/* Image Section */
.mobile-card-image-section {
    flex: 0 0 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.mobile-card-image img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
}

.mobile-card-manufacturer img {
    max-width: 50px;
    /* max-height: 20px; */
    object-fit: contain;
}

/* Features Section */
.mobile-card-features {
    flex: 1;
    min-width: 0;
    font-size: 12px;
}

.mobile-card-feature-row {
    display: flex;
    gap: 4px;
    margin-bottom: 2px;
    line-height: 1.4;
}

.mobile-card-feature-row .feature-label {
    color: #888;
    white-space: nowrap;
    font-size: 11px;
}

.mobile-card-feature-row .feature-value {
    color: #333;
    font-weight: 500;
    font-size: 11px;
}

/* Pricing Section */
.mobile-card-pricing-section {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

/* Quantity Tiers */
.mobile-card-qty-tiers {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 11px;
}

.mobile-card-qty-tier {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.mobile-card-qty-tier .tier-qty {
    color: #666;
    font-size: 10px;
}

.mobile-card-qty-tier .tier-price {
    font-weight: 600;
    color: #333;
    font-size: 11px;
}

.mobile-card-qty-tier-base {
    border-bottom: 1px solid #eee;
    padding-bottom: 2px;
    margin-bottom: 1px;
}

.mobile-card-tier-saving {
    background: #28a745;
    color: #fff;
    padding: 0 3px;
    border-radius: 2px;
    font-size: 9px;
    font-weight: 600;
}

/* Cart Row */
.mobile-card-cart-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-card-qty-wrapper {
    display: flex;
    /* align-items: center; */
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
}

.mobile-card-qty-wrapper .qty-btn {
    width: 26px;
    height: auto !important;
    flex-shrink: 0;
    border: none;
}

/* Price */
.mobile-card-price {
    text-align: right;
}

.mobile-card-price .price {
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

.mobile-card-price .price-net-sub {
    display: block;
    font-size: 10px;
    color: #888;
}

/* Shared card button styles */
.card-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 34px;
    background: #007bff;
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease;
}

.card-add-btn:hover {
    background: #0056b3;
}

.card-add-btn.adding {
    background: #ffc107;
}

.card-add-btn.added {
    background: #28a745;
}

.card-add-btn .material-icons {
    font-size: 18px;
}

.card-qty-input {
    width: 36px;
    padding: 5px 2px;
    border: none;
    border-left: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
    border-radius: 0;
    text-align: center;
    font-size: 13px;
}

.mobile-card-pricing-section .unavailable {
    font-size: 12px;
    color: #dc3545;
    font-weight: 500;
}

/* Mobile Card Pagination */
.mobile-card-pagination {
    margin-top: 20px;
    padding: 15px 0;
}

.mobile-card-pagination .pagination {
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
}

/* No products message */
.no-products-message {
    padding: 40px 20px;
    text-align: center;
    color: #666;
    font-size: 16px;
}

/* Mobile-only: Show card view, hide table */
@media (max-width: 767px) {
    /* When cards mode is set */
    .mobile-card-view[data-mobile-mode="cards"] {
        display: block !important;
    }

    .mobile-card-view[data-mobile-mode="cards"] ~ .table-responsive,
    .mobile-card-view[data-mobile-mode="cards"] ~ .table-pagination {
        display: none !important;
    }

    /* Hide the old mobile controls bar when using card view */
    .mobile-card-view[data-mobile-mode="cards"] ~ .mobile-controls-bar {
        display: none !important;
    }

    /* When scroll mode is set - keep table, hide card view */
    .mobile-card-view[data-mobile-mode="scroll"] {
        display: none !important;
    }
}

/* Filter grid adjustments for very small screens */
@media (max-width: 767px) {
    .mobile-filter-grid {
        grid-template-columns: 1fr;
    }

    .mobile-card-body {
        flex-wrap: wrap;
    }

    .mobile-card-image-section {
        flex: 0 0 60px;
    }

    .mobile-card-image img {
        width: 60px;
        height: 60px;
    }

    .mobile-card-features {
        flex: 1 1 calc(100% - 75px);
    }

    .mobile-card-pricing-section {
        flex: 1 1 100%;
        /* flex-direction: row; */
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid #f0f0f0;
    }
}

/* Desktop: Always hide mobile card view */
@media (min-width: 768px) {
    .mobile-card-view {
        display: none !important;
    }
}

/* ===========================================
   STICKY FEATURES - Filter Row, Product Column, Top Scrollbar
   =========================================== */

/* === FEATURE 8: Sticky Filter Row === */
/* When sticky-filters-enabled class is present */
.sticky-filters-enabled .table-responsive {
    max-height: 80vh;
    overflow-y: auto;
}

.sticky-filters-enabled #category-products-table thead {
    position: sticky;
    top: 0;
    z-index: 20;
}

.sticky-filters-enabled #category-products-table thead .header-row th {
    background: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 21;
}

.sticky-filters-enabled #category-products-table thead .filter-row th {
    background: #fff;
    position: initial;
    top: 38px; /* Height of header row */
    z-index: 20;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* === FEATURE 9: Sticky Product Image & Title Columns === */
/* When sticky-product-col-enabled class is present */
.sticky-product-col-enabled #category-products-table th.col-image,
.sticky-product-col-enabled #category-products-table td.col-image {
    position: sticky;
    left: 0;
    z-index: 11;
    background: #fff;
}

.sticky-product-col-enabled #category-products-table thead th.col-image {
    background: #f8f9fa;
    z-index: 22;
}

.sticky-product-col-enabled #category-products-table .filter-row th.col-image {
    background: #fff;
    z-index: 21;
}

.sticky-product-col-enabled #category-products-table th.col-name,
.sticky-product-col-enabled #category-products-table td.col-name {
    position: sticky;
    left: 60px; /* Width of image column */
    z-index: 11;
    background: #fff;
    box-shadow: 2px 0 4px rgba(0,0,0,0.08);
}

.sticky-product-col-enabled #category-products-table thead th.col-name {
    background: #f8f9fa;
    z-index: 22;
}

.sticky-product-col-enabled #category-products-table .filter-row th.col-name {
    background: #fff;
    z-index: 21;
}

/* When image is not shown, only title column is sticky at left: 0 */
.sticky-product-col-enabled #category-products-table:not(:has(.col-image)) th.col-name,
.sticky-product-col-enabled #category-products-table:not(:has(.col-image)) td.col-name {
    left: 0;
}

/* Zebra striping preservation for sticky columns */
.sticky-product-col-enabled #category-products-table tbody tr:nth-child(even) td.col-image,
.sticky-product-col-enabled #category-products-table tbody tr:nth-child(even) td.col-name {
    background: #f8f9fa;
}

.sticky-product-col-enabled #category-products-table tbody tr:hover td.col-image,
.sticky-product-col-enabled #category-products-table tbody tr:hover td.col-name {
    background: #e9ecef;
}

/* Corner cell - both sticky top and left */
.sticky-filters-enabled.sticky-product-col-enabled #category-products-table thead th.col-image,
.sticky-filters-enabled.sticky-product-col-enabled #category-products-table thead th.col-name {
    z-index: 25;
}

.sticky-filters-enabled.sticky-product-col-enabled #category-products-table .filter-row th.col-image,
.sticky-filters-enabled.sticky-product-col-enabled #category-products-table .filter-row th.col-name {
    z-index: 24;
}

/* === FEATURE 10: Top Horizontal Scrollbar === */
.top-scrollbar-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    height: 17px;
    margin-bottom: 5px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.top-scrollbar-content {
    height: 1px;
    /* Width will be set dynamically by JavaScript to match table width */
}

/* Hide top scrollbar on mobile as it's not useful */
@media (max-width: 767px) {
    .top-scrollbar-wrapper {
        display: none;
    }

    /* Disable sticky columns on mobile - they take too much space */
    .sticky-product-col-enabled #category-products-table th.col-image,
    .sticky-product-col-enabled #category-products-table td.col-image,
    .sticky-product-col-enabled #category-products-table th.col-name,
    .sticky-product-col-enabled #category-products-table td.col-name {
        position: static;
        left: auto;
        z-index: auto;
        box-shadow: none;
    }
}

/* Print Styles */
@media print {
    .table-controls-bar,
    .table-pagination,
    .col-cart,
    .add-to-cart-wrapper,
    .mobile-card-view,
    .top-scrollbar-wrapper {
        display: none !important;
    }

    #category-products-table {
        font-size: 10pt;
    }

    #category-products-table th,
    #category-products-table td {
        padding: 5px;
        position: static !important;
    }
}

/* ============================================
   FEATURE 11: Desktop Product Card Mode (v1.5.0)
   ============================================ */

/* Container class when card mode is enabled */
.desktop-card-mode #category-products-table {
    border-collapse: separate;
    border-spacing: 0;
}

/* Product card column header */
.desktop-card-mode th.col-product-card {
    width: var(--card-column-width, 350px);
    min-width: var(--card-column-width, 350px);
    max-width: var(--card-column-width, 350px);
    text-align: left;
    padding: 10px 15px;
}

/* Product card cell */
.desktop-card-mode td.col-product-card {
    width: var(--card-column-width, 350px);
    min-width: var(--card-column-width, 350px);
    max-width: var(--card-column-width, 350px);
    padding: 10px 15px;
    vertical-align: top;
}

/* The card container */
.desktop-product-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s ease;
}

.desktop-product-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* Card Title - Full name, multi-line allowed */
.desktop-card-title {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.desktop-card-title-link {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    line-height: 1.4;
    display: block;
    white-space: normal !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    /* Allow multi-line - no truncation */
}

.desktop-card-title-link:hover {
    color: #2196F3;
    text-decoration: underline;
}

/* Card Body - Flex container for image, features, pricing */
.desktop-card-body {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

/* Left: Image + Manufacturer Logo */
.desktop-card-image-section {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.desktop-card-image {
    display: block;
    /* width: 80px; */
    /* height: 80px; */
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
    background: #fafafa;
}

.desktop-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.desktop-card-image .no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #ccc;
    font-size: 24px;
}

/* Manufacturer Logo */
.desktop-card-manufacturer {
    /* width: 80px; */
    width: auto;
    max-width: 120px;
    /* height: 40px; */
    height: 25px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.desktop-card-manufacturer img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    opacity: 0.9;
}

/* Center: Key Features */
.desktop-card-features {
    flex: 1;
    min-width: 0;
}

.desktop-card-feature-row {
    display: flex;
    gap: 5px;
    font-size: 12px;
    line-height: 1.6;
    margin-bottom: 3px;
}

.desktop-card-feature-row .feature-label {
    color: #666;
    flex-shrink: 0;
}

.desktop-card-feature-row .feature-value {
    color: #333;
    font-weight: 500;
}

/* Right: Pricing Section */
.desktop-card-pricing-section {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    min-width: 150px;
}

/* Quantity Discount Tiers */
.desktop-card-qty-tiers {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 11px;
    text-align: right;
}

.desktop-card-qty-tier {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
}

.desktop-card-tier-discount {
    background: #4CAF50;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 3px;
}

.desktop-card-qty-tier .tier-qty {
    color: #666;
}

.desktop-card-qty-tier .tier-price {
    color: #333;
    font-weight: 500;
}

/* Cart Row: Quantity + Add Button */
.desktop-card-cart-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.desktop-card-qty-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.desktop-card-qty-wrapper .qty-btn {
    width: 28px;
    height: 34px;
    flex-shrink: 0;
}

.desktop-card-qty-input {
    width: 45px;
    height: 34px;
    text-align: center;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    border-radius: 0;
    font-size: 14px;
    padding: 0 4px;
}

.desktop-card-qty-input:focus {
    border-color: #2196F3;
    outline: none;
}

.desktop-card-add-btn {
    width: 38px;
    height: 34px;
    background: #2196F3;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.desktop-card-add-btn:hover {
    background: #1976D2;
}

.desktop-card-add-btn .material-icons {
    font-size: 20px;
}

.desktop-card-cart-row .unavailable {
    font-size: 12px;
    color: #999;
    font-style: italic;
}

/* Price Display */
.desktop-card-price {
    text-align: right;
    line-height: initial;
}

.card-price-gross {
    display: block;
    font-size: 16px;
    font-weight: 700;
    /* color: #333; */
    color: #e84141;
}

/* .card-price-gross small {
    font-weight: 400;
    font-size: 12px;
    color: #666;
} */

.card-price-net {
    display: block;
    font-size: 11px;
    color: #888;
    margin-top: 2px;
    font-weight: 700;
}

/* Feature columns in card mode - remaining features as table cells */
.desktop-card-mode td.col-feature,
.desktop-card-mode td.col-manufacturer {
    vertical-align: middle;
    text-align: center;
    padding: 10px 8px;
}

/* Sticky column adjustments for card mode */
/* Note: .sticky-product-col-enabled is on .category-table-container (parent),
   .desktop-card-mode is on .table-responsive (child) — need descendant combinator */
.sticky-product-col-enabled .desktop-card-mode th.col-product-card,
.sticky-product-col-enabled .desktop-card-mode td.col-product-card {
    position: sticky;
    left: 0;
    z-index: 10;
    background: #fff;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

.sticky-product-col-enabled .desktop-card-mode .header-row th.col-product-card {
    z-index: 21;
}

.sticky-filters-enabled .desktop-card-mode .filter-row th.col-product-card {
    z-index: 22;
}

/* Responsive adjustments for card mode on smaller desktop screens */
@media (max-width: 1200px) {
    .desktop-card-body {
        gap: 10px;
    }

    .desktop-card-image {
        width: 70px;
        height: 70px;
    }

    .desktop-card-pricing-section {
        min-width: 130px;
    }
}

/* @media (max-width: 992px) {
    .desktop-card-body {
        flex-wrap: wrap;
    }

    .desktop-card-pricing-section {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding-top: 8px;
        border-top: 1px solid #f0f0f0;
        margin-top: 5px;
    }

    .desktop-card-qty-tiers {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }
} */

/* Card mode should not apply on mobile - use mobile card view instead */
@media (max-width: 767px) {
    .desktop-card-mode .table-view {
        display: none;
    }

    /* Ensure mobile card view takes over */
    .desktop-card-mode .mobile-card-view {
        display: block;
    }
}

/* ========================================
   VERTICAL TEXT MODE
   Applies to both Card and Classic modes
   ======================================== */

/* Vertical text mode - Header row columns (NOT filter row) */
.vertical-text-mode #category-products-table thead tr.header-row th:not(.col-product-card):not(.col-image):not(.col-name) {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    white-space: nowrap;
    vertical-align: bottom;
    padding: 15px 8px;
    height: auto;
    min-height: 120px;
}

/* Vertical header text adjustments */
.vertical-text-mode #category-products-table thead tr.header-row th:not(.col-product-card):not(.col-image):not(.col-name) .column-header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.vertical-text-mode #category-products-table thead tr.header-row th:not(.col-product-card):not(.col-image):not(.col-name) .column-header-content span {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* Filter row should remain horizontal for usability */
.vertical-text-mode #category-products-table thead tr.filter-row th {
    writing-mode: horizontal-tb !important;
    text-orientation: initial !important;
    min-height: auto;
    padding: 5px;
}

/* Filter dropdowns in vertical mode - keep horizontal but compact */
.vertical-text-mode #category-products-table thead tr.filter-row th .filter-dropdown-wrapper {
    writing-mode: horizontal-tb;
    text-orientation: initial;
    width: 100%;
}

/* Compact filter dropdowns in vertical mode */
.vertical-text-mode #category-products-table thead tr.filter-row th .feature-filter {
    min-width: 40px;
    width: 40px;
    max-width: 50px;
    padding: 4px 2px;
    font-size: 11px;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* On focus/open, allow dropdown to expand for readability */
.vertical-text-mode #category-products-table thead tr.filter-row th .feature-filter:focus {
    width: auto;
    min-width: 80px;
    max-width: none;
    position: relative;
    z-index: 100;
}

/* Product row cells - vertical text for data columns */
.vertical-text-mode #category-products-table tbody td:not(.col-product-card):not(.col-image):not(.col-name):not(.col-cart) {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    white-space: nowrap;
    vertical-align: middle;
    padding: 10px 6px;
    text-align: center;
}

/* Ensure prices stay readable in vertical mode */
.vertical-text-mode #category-products-table tbody td.col-price-net,
.vertical-text-mode #category-products-table tbody td.col-price-gross {
    white-space: nowrap;
}

/* Adjust column widths for vertical mode */
.vertical-text-mode #category-products-table thead tr.header-row th:not(.col-product-card):not(.col-image):not(.col-name),
.vertical-text-mode #category-products-table tbody td:not(.col-product-card):not(.col-image):not(.col-name):not(.col-cart) {
    width: auto;
    min-width: 35px;
    max-width: 50px;
}

/* Cart column should remain horizontal */
.vertical-text-mode #category-products-table tbody td.col-cart {
    writing-mode: horizontal-tb;
    text-orientation: initial;
    vertical-align: middle;
}

/* Stock badge adjustments for vertical */
.vertical-text-mode #category-products-table tbody td.col-stock .stock-badge {
    writing-mode: vertical-rl;
    padding: 4px 2px;
    font-size: 10px;
}

/* Discount badge in vertical mode */
.vertical-text-mode #category-products-table tbody td.col-discount .discount-badge {
    writing-mode: vertical-rl;
    padding: 4px 2px;
}

/* Keep header row sticky behavior in vertical mode */
.vertical-text-mode.sticky-filters-enabled #category-products-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Ensure sorting icons work in vertical mode */
.vertical-text-mode #category-products-table thead tr.header-row th:not(.col-product-card) .sort-icon {
    writing-mode: horizontal-tb;
    display: inline-block;
    margin-left: 0;
    margin-top: 5px;
}

/* Ensure product card content stays horizontal and wraps properly in vertical mode */
.vertical-text-mode #category-products-table td.col-product-card,
.vertical-text-mode #category-products-table td.col-product-card * {
    writing-mode: horizontal-tb !important;
    text-orientation: initial !important;
}

.vertical-text-mode .desktop-product-card,
.vertical-text-mode .desktop-card-title,
.vertical-text-mode .desktop-card-title-link {
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

/* Vertical mode only applies on desktop */
@media (max-width: 767px) {
    .vertical-text-mode #category-products-table thead th,
    .vertical-text-mode #category-products-table tbody td {
        writing-mode: horizontal-tb;
        text-orientation: initial;
        white-space: normal;
        min-width: auto;
        max-width: none;
    }
}

/* ========================================
   STOCK STATUS ROW COLORING (v1.7.0)
   Row background colors based on delivery status
   ======================================== */

/* Green - In stock, ships today (order before 2PM) */
#category-products-table tbody tr.product-row.stock-status-green {
    background-color: rgba(76, 175, 80, 0.12) !important;
}

#category-products-table tbody tr.product-row.stock-status-green:hover {
    background-color: rgba(76, 175, 80, 0.18) !important;
}

/* Light Green - In stock, ships tomorrow/next business day */
#category-products-table tbody tr.product-row.stock-status-light-green {
    background-color: rgba(139, 195, 74, 0.12) !important;
}

#category-products-table tbody tr.product-row.stock-status-light-green:hover {
    background-color: rgba(139, 195, 74, 0.18) !important;
}

/* Orange - On order (3-5 days delivery) */
#category-products-table tbody tr.product-row.stock-status-orange {
    background-color: rgba(255, 152, 0, 0.12) !important;
}

#category-products-table tbody tr.product-row.stock-status-orange:hover {
    background-color: rgba(255, 152, 0, 0.18) !important;
}

/* Red - Out of stock / special delivery */
#category-products-table tbody tr.product-row.stock-status-red {
    background-color: rgba(244, 67, 54, 0.12) !important;
}

#category-products-table tbody tr.product-row.stock-status-red:hover {
    background-color: rgba(244, 67, 54, 0.18) !important;
}

/* Delivery Status Badge - inside product card */
.delivery-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 10px;
}

.delivery-status-badge i.material-icons {
    font-size: 16px;
}

.delivery-status-badge.stock-status-green {
    background-color: rgba(76, 175, 80, 0.15);
    color: #2e7d32;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.delivery-status-badge.stock-status-green i {
    color: #4caf50;
}

.delivery-status-badge.stock-status-light-green {
    background-color: rgba(139, 195, 74, 0.15);
    color: #558b2f;
    border: 1px solid rgba(139, 195, 74, 0.3);
}

.delivery-status-badge.stock-status-light-green i {
    color: #8bc34a;
}

.delivery-status-badge.stock-status-orange {
    background-color: rgba(255, 152, 0, 0.15);
    color: #e65100;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.delivery-status-badge.stock-status-orange i {
    color: #ff9800;
}

.delivery-status-badge.stock-status-red {
    background-color: rgba(244, 67, 54, 0.15);
    color: #c62828;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.delivery-status-badge.stock-status-red i {
    color: #f44336;
}

/* Ensure card background stays white when row has status color */
.stock-status-green .desktop-product-card,
.stock-status-light-green .desktop-product-card,
.stock-status-orange .desktop-product-card,
.stock-status-red .desktop-product-card {
    background-color: #fff;
}

/* Delivery status text styling */
.delivery-status-text {
    white-space: nowrap;
}

/* ============================================================
   MULTI-SELECT DROPDOWN COMPONENT (v1.8.0)
   ============================================================ */

.multi-select-dropdown {
    position: relative;
    display: inline-block;
    width: 100%;
    min-width: 80px;
}

.multi-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 4px 8px;
    font-size: 0.82rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    gap: 4px;
    line-height: 1.4;
    min-height: 30px;
}

.multi-select-trigger:hover {
    border-color: #80bdff;
}

.multi-select-dropdown.open .multi-select-trigger {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.15rem rgba(0, 123, 255, 0.2);
}

.multi-select-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    /* white-space: nowrap; */
    color: #495057;
    font-weight: 400;
}

.multi-select-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background: #007bff;
    color: #fff;
    border-radius: 9px;
    font-size: 0.7rem;
    font-weight: 600;
    flex-shrink: 0;
}

.multi-select-arrow {
    display: inline-block;
    width: 0;
    height: 0;
    border: 4px solid transparent;
    border-top-color: #495057;
    margin-top: 3px;
    flex-shrink: 0;
}

.multi-select-dropdown.open .multi-select-arrow {
    border-top-color: transparent;
    border-bottom-color: #495057;
    margin-top: -1px;
}

.multi-select-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    min-width: 180px;
    max-height: 300px;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin-top: 2px;
}

.multi-select-clear {
    display: block;
    width: 100%;
    padding: 6px 10px;
    border: none;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    color: #007bff;
    font-size: 0.78rem;
    cursor: pointer;
    text-align: left;
}

.multi-select-clear:hover {
    background: #e9ecef;
}

.multi-select-options {
    overflow-y: auto;
    max-height: 250px;
    padding: 3px 0;
}

.multi-select-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 0.82rem;
    margin: 0;
    /* white-space: nowrap; */
    transition: background 0.1s;
}

.multi-select-option:hover {
    background: #f0f4ff;
}

.multi-select-option input[type="checkbox"] {
    flex-shrink: 0;
    margin: 0;
    cursor: pointer;
    width: 14px;
    height: 14px;
}

.multi-select-option-text {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sticky filter row: ensure multi-select panels appear above sticky */
.sticky-filters-enabled .filter-row .multi-select-panel {
    z-index: 1050;
}

/* Mobile multi-select adjustments */
.mobile-multi-select .multi-select-trigger {
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 6px;
    min-height: 40px;
}

.mobile-multi-select .multi-select-panel {
    min-width: auto;
}

.mobile-multi-select .multi-select-option {
    padding: 8px 12px;
    font-size: 13px;
}

.mobile-multi-select .multi-select-badge {
    min-width: 22px;
    height: 22px;
    font-size: 0.75rem;
}

/* Vertical text mode: keep multi-select horizontal */
.vertical-text-mode .multi-select-dropdown,
.vertical-text-mode .multi-select-trigger,
.vertical-text-mode .multi-select-panel {
    writing-mode: horizontal-tb !important;
    text-orientation: initial !important;
}

.vertical-text-mode .filter-row .multi-select-dropdown {
    min-width: 36px;
    width: 36px;
    max-width: 45px;
}

.vertical-text-mode .filter-row .multi-select-trigger {
    padding: 3px 2px;
    font-size: 0;
    justify-content: center;
}

.vertical-text-mode .filter-row .multi-select-trigger .multi-select-label {
    display: none;
}

.vertical-text-mode .filter-row .multi-select-trigger .multi-select-badge {
    font-size: 0.65rem;
    min-width: 16px;
    height: 16px;
}

.vertical-text-mode .filter-row .multi-select-panel {
    width: auto;
    min-width: 160px;
    left: auto;
    right: 0;
}

/* Desktop card mode filter row */
.desktop-card-mode .filter-row .multi-select-dropdown {
    min-width: 60px;
}

/* Print: hide multi-select panels */
@media print {
    .multi-select-panel {
        display: none !important;
    }
    .multi-select-trigger {
        border: none;
        padding: 0;
    }
    .multi-select-arrow,
    .multi-select-badge {
        display: none;
    }
}

#lenik-category-table-container .custom-unit-price {
    color: #1a2534;
}
#lenik-category-table-container .tax-shipping-delivery-label {
    font-size: small;
    font-weight: 500;
    color: #033d4f;
}
#lenik-category-table-container .mobile-card-cart-price-container,
#lenik-category-table-container .desktop-card-cart-price-container {
    width: 100%;
    display: flex;
    gap: 1rem 3rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    margin-top: 5px;
    flex-direction: row-reverse;
}
#lenik-category-table-container .desktop-card-cart-price-container {
    justify-content: space-between;
}
