/* Products Page Styles */

/* Products Banner */
.products-banner {
    /* background-image: url('../img/products_banner.png'); */
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    height: 200px;
    position: relative;
    overflow: hidden;
    margin-top: -5px;
    display: flex;
    align-items: center;
    padding-inline: var(--padding-inline) !important;
}

/* Black fade overlay */
.products-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to right, 
        rgba(0, 0, 0, 0.7) 0%,   /* Dark on the left */
        rgba(0, 0, 0, 0.6) 25%, 
        rgba(0, 0, 0, 0.5) 50%, 
        rgba(0, 0, 0, 0.3) 75%, 
        rgba(0, 0, 0, 0.1) 100%  /* Light on the right */
    );
    z-index: 1;
}


.products-banner h1 {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    text-align: left;
}


/* Products Section */
.products-section {
    padding: 40px 0;
    background-color: #f8f9fa;
    min-height: 80vh;
}

/* Ensure consistent container spacing */
.products-section .container {
    /* max-width: 1400px; */
    margin: 0 auto;
    padding-inline: var(--padding-inline);

}

/* Banner container spacing */
.products-banner .container {
    /* max-width: 1200px; */
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
}

/* Filter Sidebar */
.filter-sidebar {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    height: fit-content;
    position: sticky;
    top: 20px;
}

/* Mobile Filter Toggle Button */
.mobile-filter-toggle {
    display: none;
    margin-bottom: 16px;
}

.btn-filter-toggle {
    width: 100%;
    background: white;
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 12px;
    padding: 16px 20px;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.1);
}

.btn-filter-toggle:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
}

.btn-filter-toggle svg:first-child {
    margin-right: 12px;
}

.btn-filter-toggle .toggle-arrow {
    transition: transform 0.3s ease;
    margin-left: 12px;
}

.btn-filter-toggle.active .toggle-arrow {
    transform: rotate(180deg);
}

/* Filter Sidebar Container */
.filter-sidebar-container {
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

.filter-sidebar h4 {
    color: #333;
    font-weight: 700;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.filter-group {
    margin-bottom: 24px;
}

.filter-group label {
    display: block;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.filter-group .form-control {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.9rem;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.filter-group .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
    background-color: white;
}

/* Filter Search Container */
.filter-search-container {
    position: relative !important;
    margin-bottom: 12px !important;
}

.filter-search-input {
    width: 100% !important;
    border: 1px solid #ddd !important;
    border-radius: 6px;
    padding: 8px 32px 8px 32px;
    font-size: 0.85rem;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.filter-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
    background-color: white;
    outline: none;
}

.search-icon {
    position: absolute;
    left: 8px;
    top: 44%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: #666;
    pointer-events: none;
}

.clear-search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    opacity: 0;
    visibility: hidden;
}

.clear-search-btn:hover {
    background-color: #e9ecef;
    color: #333;
}

.clear-search-btn.visible {
    opacity: 1;
    visibility: visible;
}
.no-results-message {
    padding: 12px 8px;
    color: #666;
    font-style: italic;
    text-align: center;
    font-size: 0.85rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    margin: 8px 0;
}

/* Checkbox List */
.checkbox-list {
    max-height: 150px;
    overflow-y: auto;
    padding: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    cursor: pointer;
    font-size: 0.9rem;
    color: #333;
    transition: all 0.2s ease;
    opacity: 1;
}

.checkbox-item:hover {
    background-color: #f0f0f0;
    border-radius: 4px;
    padding-left: 8px;
}

.checkbox-item input[type="checkbox"] {
    margin-right: 10px;
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

/* Filter Buttons Container */
.filter-buttons {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

/* Reset Button */
.btn-reset-filters {
    background-color: rgb(223, 224, 225);
    color: #6c757d;
    /* border: 1px solid #dee2e6; */
    border-radius: 8px;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    flex: 1;
    transition: all 0.3s ease;
}

.btn-reset-filters:hover {
    background-color: #e9ecef;
    /* border-color: #adb5bd; */
    color: #495057;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Apply Filters Button */
.btn-apply-filters {
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    flex: 1;
    transition: all 0.3s ease;
    border: 2px solid var(--primary);
}

.btn-apply-filters:hover {
    background-color: #c82333;
    border-color: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

/* Basket Info */
.basket-info {
    background-color: var(--primary);
    color: white;
    border-radius: 12px 12px 0 0;
    padding: 16px 24px;
    margin-bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px rgba(220, 53, 69, 0.2);
}
.basket-count-wrapper {
    display: flex;
    align-items: center;
    gap: 12px; /* spacing between number and text */
}
.basket-text {
    font-weight: 500;
    white-space: nowrap; /* prevent text from breaking */
}
.basket-count {
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
}

.basket-info .basket-count {
    background-color: #3333333b;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
}

.basket-number {
    background-color: #8b0000;
    color: white;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 12px;
    font-size: 1rem;
}

.btn-view-basket {
    background-color: transparent;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: underline;
    text-decoration-color: white;
}

.btn-view-basket:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    text-decoration-thickness: 2px;
}

/* Items Header */
.items-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 200px;
    gap: 16px;
    background-color: #f0f0f0;
    padding: 16px 24px;
    padding-top: 16px;
    padding-right: 24px;
    padding-bottom: 16px;
    padding-left: 24px;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    color: #495057;
}
.header-item.header-item-first {
    text-align: left;
}

/* Sort Section Styles */
.sort-section {
    margin-bottom: 24px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.sort-container {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.sort-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #495057;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.sort-label svg {
    color: #6c757d;
}

.sort-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sort-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    font-weight: 500;
    color: #495057;
    user-select: none;
}

.sort-option:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sort-option.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.sort-option.active:hover {
    background: #e44854;
    border-color: #e44854;
}

.sort-text {
    white-space: nowrap;
}

.sort-arrow {
    display: flex;
    align-items: center;
    opacity: 1;
}

.sort-arrow svg {
    /* width: 12px;
    height: 12px; */
    transition: transform 0.2s ease;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .sort-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .sort-options {
        width: 100%;
        justify-content: flex-start;
    }
    
    .sort-option {
        padding: 6px 12px;
        font-size: 0.6rem;
    }
}
.header-item {
    color: #666;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: -0.3px;
    text-align: center;
}

/* Items List */
.items-list {
    border: 1px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 12px 12px;
    background-color: white;
}

.item-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 200px;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid #f1f3f4;
    transition: all 0.3s ease;
    position: relative;
}

.item-row:hover {
    background-color: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.item-row:last-child {
    border-bottom: none;
}

.item-row.highlighted {
    border: 2px solid #007bff;
    background-color: #f8f9ff;
}

/* Item Details */
.item-details {
    display: flex;
    align-items: center;
    gap: 16px;
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.item-code {
    color: #000;
    font-size: 0.9rem;
    margin-bottom: 0;
}

.item-description {
    color: #000;
    font-size: 0.9rem;
    margin-bottom: 0;
}

.item-row-link {
    text-decoration: none !important; /* remove underline */
    color: inherit none !important;        /* keep text color the same as parent */
    display: block none !important;        /* make the link behave like a block */
}
.item-image {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 8px;
}

/* Item Data */
.item-oe, .item-make, .item-group, .item-status {
    color: #000;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 60px;
    padding: 8px;
    word-wrap: break-word;
    line-height: 1.2;
}

/* Item Actions */
.item-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    width: 100%;
    /* Ensure consistent width to prevent layout shifts */
    min-width: 200px;
    max-width: 200px;
}

.btn-add {
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-add:hover {
    background-color: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

/* Quantity Controls */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #f8f9fa;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    width: 100%;
    justify-content: center;
    flex-wrap: nowrap;
    min-width: fit-content;
    /* Ensure consistent width to prevent layout shifts */
    width: 200px;
    max-width: 200px;
}

.btn-remove, .btn-increase, .btn-decrease {
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    flex-shrink: 0;
}

.btn-remove:hover, .btn-increase:hover, .btn-decrease:hover {
    background-color: #c82333;
    transform: scale(1.1);
}

.quantity-display {
    background-color: white;
    color: #333;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    min-width: 32px;
    text-align: center;
    border: 1px solid #ddd;
    flex-shrink: 0;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    padding: 24px;
}

.page-link {
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    transition: all 0.3s ease;
    border: unset;
    background-color: unset;
}

.page-link:hover {
    background-color: #f8f9fa;
    color: var(--primary);
}

.page-prev, .page-next {
    background-color: transparent;
    color: #666;
    border-radius: 6px;
    padding: 10px 16px;
    font-weight: 600;
}

.page-prev:hover, .page-next:hover {
    background-color: transparent;
    color: #343a40;
    transform: translateY(-2px);
}

.page-prev .arrow, .page-next .arrow {
    background-color: #f0f0f0;
    color: #666;
    border-radius: 4px;
    padding: 0px 12px;
    margin: 0 4px;
    display: inline-block;
    font-weight: bold;
}

.page-prev:hover .arrow, .page-next:hover .arrow {
    opacity:0.8;
}

.page-numbers {
    display: flex;
    gap: 8px;
}

.page-number {
    color: #495057;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
}

.page-number:hover {
    background-color: #f8f9fa;
    color: var(--primary);
}

.page-number.active {
    background-color: var(--primary);
    color: white;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    /* .products-banner {
        height: 160px;
    }
    
    .products-banner h1 {
        font-size: 1.6rem;
        letter-spacing: 1px;
    } */
    
    /* .banner-content {
        padding-left: 24px;
        padding-right: 24px;
    } */
    
    /* .products-banner .container,
    .products-section .container {
        padding-left: 20px;
        padding-right: 20px;
    } */

    .filter-sidebar {
        position: static;
        margin-bottom: 24px;
    }

    .basket-info {
        width: calc(100% - 48px);
        max-width: calc(100% - 48px);
        left: 24px;
        margin-left: 0;
    }

    .filter-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .items-header {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .item-row {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 16px;
    }

    .item-details {
        flex-direction: column;
        text-align: center;
    }

    .item-image {
        width: 100px;
        height: 100px;
        margin: 0 auto;
    }

    .item-oe, .item-make, .item-group, .item-status {
        min-height: auto;
        padding: 8px 0;
    }

    .pagination {
        flex-direction: column;
        gap: 16px;
    }
    
    .page-prev, .page-next {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    /* Reset Actions column width on mobile */
    .item-actions {
        min-width: auto;
        max-width: none;
        width: 100%;
    }
    
    .quantity-controls {
        width: 100%;
        /* max-width: none; */
        min-width: auto;
    }
}

    @media (max-width: 767.98px) {
         .products-banner {
        height: 140px;
    }
    
    .products-banner h1 {
        font-size: 1.4rem;
        letter-spacing: 0.8px;
    }
/*     
    .banner-content {
        padding-left: 16px;
        padding-right: 16px;
    }
     */
    .products-banner .container,
    .products-section .container {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .basket-info {
        flex-direction: column;
        gap: 16px;
        text-align: center;
        width: calc(100% - 32px);
        max-width: calc(100% - 32px);
        left: 16px;
        margin-left: 0;
    }
    
    .filter-sidebar {
        padding: 16px;
    }
    
    .items-header, .item-row {
        padding: 12px 16px;
    }
    
    .pagination {
        padding: 16px;
    }
    
    .page-prev, .page-next {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    /* Mobile card adjustments for small screens */
    .mobile-item-card {
        padding: 16px;
        margin: 0 8px;
    }
    
    .mobile-item-image img {
        width: 100px;
        height: 100px;
    }
    
    .mobile-item-table {
        padding: 12px;
    }
    
    .mobile-table-row {
        padding: 8px 0;
    }
    
    .mobile-table-key,
    .mobile-table-value {
        font-size: 0.85rem;
    }
}


@media (max-width: 767.98px) {
    .basket-info-aligned {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 0 !important;
        text-align: left !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 16px 12px !important;
    }
    .basket-info-aligned .basket-count {
        margin-bottom: 0 !important;
    }
    .basket-info-aligned .btn-view-basket {
        margin-top: 0 !important;
    }
}

.basket-info.basket-info-aligned {
    position: sticky;
    position: -webkit-sticky;
    bottom: 0;
    left: 0;
    right: 0;
    /* z-index: 1000; */
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    box-shadow: 0 4px 16px rgba(220, 53, 69, 0.25);
    padding: 10px 24px; /* Match .item-row padding */
    border-radius: 12px 12px 0 0;
}

@media (max-width: 991.98px) {
    .basket-info.basket-info-aligned {
        right: 0;
        left: 0;
        margin: 0 auto 0 auto;
        width: 95vw;
        max-width: 95vw;
        bottom: 0;
        border-radius: 12px 12px 0 0;
        padding: 16px 12px !important;
    }
}

/* Custom Scrollbar for Filter Lists */
.checkbox-list::-webkit-scrollbar {
    width: 6px;
}

.checkbox-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.checkbox-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.checkbox-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Animation for Item Rows */
.item-row {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover Effects */
.filter-sidebar:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.btn-apply-filters:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

/* Focus States for Accessibility */
.filter-sidebar input:focus,
.filter-sidebar button:focus,
.item-actions button:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Loading States */
.btn-apply-filters.loading {
    background-color: #6c757d;
    cursor: not-allowed;
}

.btn-apply-filters.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

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

.group-border {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 10px;
}

.page-link:focus{
    box-shadow:unset;
    color: #666;
    background-color: unset;
}

/* .banner-content, .banner-item {
    justify-content: flex-start;
    display: flex;
} */

/* Mobile Layout Styles */
.desktop-layout {
    display: block;
}

.mobile-layout {
    display: none;
}

/* Ensure proper layout switching */
@media (max-width: 991.98px) {
    .desktop-layout {
        display: none !important;
    }
    
    .mobile-layout {
        display: block !important;
    }
}

@media (min-width: 992px) {
    .desktop-layout {
        display: block !important;
    }
    
    .mobile-layout {
        display: none !important;
    }
}

/* Mobile Product Cards */
.mobile-items-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-item-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.mobile-item-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.mobile-item-image {
    text-align: center;
    margin-bottom: 16px;
}

.mobile-item-image img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
}

.mobile-item-info {
    margin-bottom: 16px;
}

.mobile-item-code {
    font-weight: 700;
    color: #000;
    font-size: 1rem;
    margin-bottom: 8px;
}

.mobile-item-description {
    color: #000;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Mobile Table Styles */
.mobile-item-table {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.mobile-table-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}

.mobile-table-row:last-child {
    border-bottom: none;
}

.mobile-table-key {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
    flex: 1;
}

.mobile-table-value {
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
    text-align: right;
    flex: 1;
    padding-left: 16px;
}

.mobile-item-actions {
    text-align: center;
}

.mobile-item-actions .btn-add {
    width: auto;
    /* min-width: 120px; */
    /* padding: 14px 24px; */
    font-size: 1rem;
    border-radius: 12px;
    font-weight: 600;
    display: inline-block;
}

/* Mobile Quantity Controls */
.mobile-item-actions .quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #f8f9fa;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    margin-bottom: 8px;
    width: 100%;
    flex-wrap: nowrap;
    min-width: fit-content;
}

.mobile-item-actions .btn-remove,
.mobile-item-actions .btn-increase,
.mobile-item-actions .btn-decrease {
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    flex-shrink: 0;
}

.mobile-item-actions .btn-remove:hover,
.mobile-item-actions .btn-increase:hover,
.mobile-item-actions .btn-decrease:hover {
    background-color: #c82333;
    transform: scale(1.1);
}

.mobile-item-actions .quantity-display {
    background-color: white;
    color: #333;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
    border: 1px solid #ddd;
    font-size: 1rem;
    flex-shrink: 0;
}

/* Responsive Design Updates */
@media (max-width: 991.98px) {
    .desktop-layout {
        display: none;
    }
    
    .mobile-layout {
        display: block;
    }
    
    /* Show mobile filter toggle button */
    .mobile-filter-toggle {
        display: block;
    }
    
    /* Hide filter sidebar by default on mobile */
    .filter-sidebar-container {
        display: none;
    }
    
    /* Show filter sidebar when active class is present */
    .filter-sidebar-container.active {
        display: block;
    }
    
    .filter-sidebar {
        position: static;
        margin-bottom: 24px;
    }
    
    /* Mobile search input adjustments */
    .filter-search-input {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 10px 32px 10px 32px;
    }
    
    .search-icon {
        font-size: 0.9rem;
    }

    .basket-info {
        width: calc(100% - 48px);
        max-width: calc(100% - 48px);
        left: 24px;
        margin-left: 0;
    }

    .filter-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .pagination {
        flex-direction: column;
        gap: 16px;
    }
    
    .page-prev, .page-next {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 767.98px) {
    .basket-info {
        flex-direction: column;
        gap: 16px;
        text-align: center;
        width: calc(100% - 32px);
        max-width: calc(100% - 32px);
        left: 16px;
        margin-left: 0;
    }
    
    .filter-sidebar {
        padding: 16px;
    }
    
    .pagination {
        padding: 16px;
    }
    
    .page-prev, .page-next {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    /* Mobile card adjustments for small screens */
    .mobile-item-card {
        padding: 16px;
        margin: 0 8px;
    }
    
    .mobile-item-image img {
        width: 100px;
        height: 100px;
    }
    
    .mobile-item-table {
        padding: 12px;
    }
    
    .mobile-table-row {
        padding: 8px 0;
    }
    
    .mobile-table-key,
    .mobile-table-value {
        font-size: 0.85rem;
    }
}

@media (max-width: 767.98px) {
    .pagination {
        flex-direction: row !important;
        justify-content: space-between;
        align-items: center;
        gap: 0 !important;
        padding: 12px !important;
    }
    .page-link.page-prev, .page-link.page-next {
        min-width: 40px;
        padding: 8px 8px !important;
        font-size: 1.2rem;
    }
    .page-numbers {
        flex: 1;
        justify-content: center;
        gap: 4px;
        display: flex;
        align-items: center;
    }
    .page-link.page-prev span.arrow,
    .page-link.page-next span.arrow {
        margin: 0;
        padding: 0 8px;
    }
    .page-link.page-prev, .page-link.page-next {
        width: auto;
        text-align: center;
    }
    .page-link .page-text {
        display: none !important;
    }
}