/* Table styling */
.laze-b2b-table-container {
    position: relative;
    overflow: hidden;
}

.laze-b2b-product-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.laze-b2b-product-table th,
.laze-b2b-product-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    vertical-align: middle;
    white-space: nowrap;
}

.laze-b2b-product-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.laze-b2b-product-table .thumbnail img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.qty-input {
    width: 60px;
    text-align: center;
}

/* Desktop styling */
@media (min-width: 768px) {
    .laze-b2b-table-container {
        overflow-x: auto;
    }
    
    .laze-b2b-product-table {
        table-layout: auto;
    }
    
    .laze-b2b-product-table th,
    .laze-b2b-product-table td {
        white-space: normal;
    }
}

/* Mobile responsive table */
@media (max-width: 767px) {
    .laze-b2b-table-container {
        position: relative;
        overflow: hidden;
    }
    
    .table-scroll-wrapper {
        display: flex;
        overflow-x: auto;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .table-scroll-wrapper::-webkit-scrollbar {
        display: none;
    }
    
    .table-fixed-column {
        flex-shrink: 0;
        background: white;
        border-right: 2px solid #dee2e6;
        z-index: 2;
        position: sticky;
        left: 0;
    }
    
    .table-scrollable-columns {
        flex-shrink: 0;
        min-width: max-content;
    }
    
    .laze-b2b-product-table {
        width: auto;
        table-layout: auto;
    }
    
    .table-fixed-column table,
    .table-scrollable-columns table {
        width: auto;
        margin-bottom: 0;
    }
    
    .table-fixed-column tr,
    .table-scrollable-columns tr {
        min-height: 80px;
    }
    
    .table-fixed-column td,
    .table-scrollable-columns td {
        vertical-align: top;
        padding: 12px 8px;
    }
    
    .table-fixed-column th,
    .table-fixed-column td {
        width: 200px;
        min-width: 200px;
        max-width: 200px;
        white-space: normal;
        word-wrap: break-word;
    }
    
    .table-scrollable-columns th,
    .table-scrollable-columns td {
        min-width: 120px;
        padding: 8px;
    }
    
    .table-scrollable-columns .thumbnail {
        min-width: 80px;
    }
    
    .table-scrollable-columns .thumbnail img {
        width: 60px !important;
        height: 60px !important;
        max-height: 60px !important;
        object-fit: cover;
        border-radius: 4px;
    }
    
    .table-scrollable-columns .price {
        min-width: 100px;
    }
    
    .table-scrollable-columns .quantity {
        min-width: 140px;
    }
    
    .table-scrollable-columns .variations {
        min-width: 150px;
    }
    
    .table-scrollable-columns .actions {
        min-width: 100px;
    }
    
    /* Mobile swipe indicator */
    .swipe-indicator {
        position: absolute;
        top: 50%;
        right: 10px;
        transform: translateY(-50%);
        background: rgba(0, 0, 0, 0.6);
        color: white;
        padding: 8px 12px;
        border-radius: 20px;
        font-size: 12px;
        pointer-events: none;
        z-index: 3;
        opacity: 0.8;
        animation: pulse 2s infinite;
    }
    
    @keyframes pulse {
        0%, 100% { opacity: 0.8; }
        50% { opacity: 0.4; }
    }
    
    /* Hide indicator after first interaction */
    .table-scroll-wrapper.interacted + .swipe-indicator {
        display: none;
    }
}

/* Filter styling */
.laze-b2b-filters {
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
}

.filter-heading {
    font-size: 1.1rem;
    font-weight: 700;
    color: #222;
}

.filter-label {
    font-weight: 600;
    font-size: 0.8rem;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.filter-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.filter-btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    line-height: 1.5;
    border: 1px solid #dee2e6;
    border-radius: 2rem;
    background: #fff;
    color: #444;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.filter-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.filter-btn.active {
    background: var(--bs-primary, #0d6efd);
    color: #fff;
    border-color: var(--bs-primary, #0d6efd);
}


.filter-results {
    font-weight: 500;
    color: var(--bs-secondary);
    font-size: 0.85rem;
}

.clear-filters-link {
    color: var(--bs-primary);
    text-decoration: underline;
    font-size: 0.8rem;
    cursor: pointer;
}

.clear-filters-link:hover {
    color: var(--bs-primary);
    text-decoration: none;
}

/* Desktop pagination - allow Previous/Next to scale */
.laze-b2b-pagination .page-link {
    width: auto;
    min-width: 3em;
    white-space: nowrap;
    padding: 0 0.75rem;
}

/* Consistent form element heights in table */
.laze-b2b-product-table .form-select,
.laze-b2b-product-table .btn,
.laze-b2b-product-table .input-group {
    height: 38px;
}

.laze-b2b-product-table .input-group .form-control {
    height: 38px;
}

.laze-b2b-product-table .input-group-text {
    height: 38px;
    display: flex;
    align-items: center;
}

.laze-b2b-product-table .btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile pagination */
@media (max-width: 767px) {
    .laze-b2b-pagination .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .laze-b2b-pagination .page-link {
        width: auto;
        min-width: 3em;
        white-space: nowrap;
        padding: 0 0.75rem;
    }
}

/* Simple lightbox styles */
.simple-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 10vh 10vw;
    box-sizing: border-box;
}

.simple-lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.simple-lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.simple-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 30px;
    cursor: pointer;
    background: none;
    border: none;
}

