/* Add-to-cart next-part modal (when searching 2+ part types) */
#add-to-cart-next-part-modal.flex {
    display: flex;
}

#add-to-cart-next-part-modal {
    backdrop-filter: blur(4px);
}

.add-to-cart-modal__btn--secondary {
    background: #fff;
    border-color: #d1d5db;
}

.add-to-cart-modal__btn--primary {
    background-color: #004d4f;
    color: #fff;
}

/* Parts page specific styles */
.parts-sidebar {
    background: linear-gradient(135deg, #004d4f 0%, #003d3f 100%);
    color: white;
    border-radius: 0;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 45, 47, 0.2);
    min-height: calc(100vh - 133px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    width: calc(16.666% - 6px);
    max-height: calc(100vh - 133px);
    overflow-y: auto;
    top: 133px;
    left: 0;
    z-index: 60;
}

#apply-fitment-btn {
    background-color: var(--aps-teal);
    color: #002d2f;
}

/* Mobile/Tablet Sidebar Styles */
@media (max-width: 1024px) {
    .parts-sidebar {
        width: 320px;
        max-width: 85vw;
        transform: translateX(-100%);
        top: 66px;
        min-height: calc(100vh - 100px);
        max-height: calc(100vh - 100px);
        transition: transform 0.3s ease-in-out;
        z-index: 99;
    }

    .parts-sidebar.open {
        transform: translateX(0);
    }

    .parts-sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        z-index: 34;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    }

    .parts-sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}


.parts-sidebar::-webkit-scrollbar {
    width: 8px;
}

.parts-sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.parts-sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 245, 196, 0.3);
    border-radius: 10px;
}

.parts-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 245, 196, 0.5);
}

.parts-main {
    /* background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%); */
    background: #ffffff;
    border-radius: 0;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.06);
    min-height: calc(100vh - 200px);
    display: flex;
    flex-direction: column;
    /* margin-left: calc(16.666% + 16px); */
    margin-left: 64px;
}

@media (max-width: 1024px) {
    .parts-main {
        margin-left: 0;
        padding: 16px;
        margin-top: 20px;
    }
}

.parts-main.title {
    min-height: inherit;
    margin-bottom: 12px;
}

.parts-list-container {
    flex: 1;
    /*overflow-y: auto;*/
    margin-top: 20px;
}

.parts-list-container::-webkit-scrollbar {
    width: 10px;
}

.parts-list-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.parts-list-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--aps-teal) 0%, #00d4a3 100%);
    border-radius: 10px;
}

.parts-list-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #00d4a3 0%, var(--aps-teal) 100%);
}

.part-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafb 100%);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 14px;
    border: 3px solid rgba(0, 245, 196, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 100%;
    position: relative;
    overflow: hidden;
}

/* .part-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 5px;
        background: linear-gradient(90deg, var(--aps-teal) 0%, #00d4a3 50%, var(--aps-teal) 100%);
        opacity: 0;
        transition: opacity 0.4s ease;
        background-size: 200% 100%;
        animation: shimmer 3s infinite;
    } */

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.part-card:hover {
    box-shadow: 0 12px 32px rgba(0, 245, 196, 0.2);
    border-color: rgba(0, 245, 196, 0.4);
}

/* .part-card:hover::before {
        opacity: 1;
    } */

.part-card-header {
    margin-bottom: 12px;
    padding-bottom: 12px;
}

.part-item-name-link {
    text-decoration: none;
    display: block;
}

.part-item-name-link h3 {
    margin: 0;
    line-height: 1.3;
}

.fitment-tree {
    margin-top: 20px;
}

/* .fitment-tree {
    max-height: 600px;
    overflow-y: auto;
} */

.fitment-part-type-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
    margin-bottom: 12px;
}

/* Box-style part type: teal rounded card, cart icon + part type name only (no extra icons) */
.fitment-part-type-header-box {
    background: #004d54;
    color: #fff;
    padding: 10px 12px;
    border-radius: 10px;
    border: none;
    border-bottom: none;
}

.fitment-part-type-header-box .fitment-part-type-name {
    color: #fff !important;
    font-size: 13px;
    letter-spacing: 0.5px;
}

/* Each fitment option as its own teal block with border (not the whole children wrapper) */
#fitment-tree-container .fitment-children .fitment-level-2.fitment-option {
    background: #004d54;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.95);
    margin-top: 6px;
}
#fitment-tree-container .fitment-children .fitment-level-2.fitment-option:first-child {
    margin-top: 4px;
}
/* Selected state must override the teal block in sidebar */
#fitment-tree-container .fitment-children .fitment-level-2.fitment-option.selected,
#fitment-tree-container .fitment-children .fitment-option-selectable.selected {
    background: var(--aps-teal);
    color: #002d2f;
    font-weight: 600;
    border-color: var(--aps-teal);
    box-shadow: 0 2px 6px rgba(0, 245, 196, 0.2);
}

/* No-fitment part type row: pill shape, unselected = transparent with thin light border */
#fitment-tree-container .fitment-no-fitment-link {
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 10px;
    transition: all 0.2s ease;
    display: block;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
}
#fitment-tree-container .fitment-no-fitment-link:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.4);
}
/* Selected state: bright mint green background, dark text (match fitment option pill) */
#fitment-tree-container .fitment-no-fitment-link.selected {
    background: #14d39e;
    color: #002d2f;
    font-weight: 600;
    border: none;
    box-shadow: none;
}
#fitment-tree-container .fitment-no-fitment-link.selected .fitment-part-type-name {
    color: #002d2f !important;
}

.fitment-part-type-cart-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.fitment-part-type-cart-icon--hidden {
    display: none !important;
}

/* Count badge on cart icon */
.fitment-cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    color: #093F4F;
    background: rgba(0, 212, 168, 0.95);
    border-radius: 50%;
    box-sizing: border-box;
}

.fitment-cart-badge.hidden {
    display: none !important;
}

.fitment-part-type-header h6 {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    letter-spacing: 0.5px;
    margin: 0;
    font-weight: 600;
}

.fitment-parent {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.fitment-parent:hover {
    opacity: 0.8;
}

.fitment-chevron {
    font-size: 10px;
    transition: transform 0.2s ease;
    display: inline-block;
    width: 12px;
}

.fitment-level-1 {
    margin-left: 0;
    font-weight: 600;
    margin-top: 12px;
    opacity: 0.95;
    font-size: 12px;
    padding: 6px 0;
}

.fitment-level-2 {
    margin-left: 20px;
    margin-top: 6px;
    opacity: 0.85;
    font-size: 12px;
    padding: 4px 0;
}

.fitment-level-3 {
    margin-left: 40px;
    margin-top: 4px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.2s ease;
    font-size: 12px;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Selectable options (level 2 or 3 with interchange): pointer + same selected style as level-3 */
.fitment-option-selectable {
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fitment-option-selectable:hover {
    background: rgba(0, 245, 196, 0.15);
    border-color: rgba(0, 245, 196, 0.3);
    transform: translateX(2px);
}

.fitment-option-selectable.selected {
    background: var(--aps-teal);
    color: #002d2f;
    font-weight: 600;
    border-color: var(--aps-teal);
    box-shadow: 0 2px 6px rgba(0, 245, 196, 0.2);
}

.fitment-option-selectable.selected span {
    opacity: 1;
    font-weight: 500;
}

.fitment-level-3.fitment-inactive {
    opacity: 0.5;
    cursor: not-allowed;
}

.fitment-level-3:not(.fitment-inactive):hover {
    background: rgba(0, 245, 196, 0.15);
    border-color: rgba(0, 245, 196, 0.3);
    transform: translateX(2px);
}

.fitment-level-3.selected {
    background: var(--aps-teal);
    color: #002d2f;
    font-weight: 600;
    border-color: var(--aps-teal);
    box-shadow: 0 2px 6px rgba(0, 245, 196, 0.2);
}

.fitment-level-3 span {
    font-size: 10px;
    margin-left: 8px;
    opacity: 0.8;
}

.fitment-level-2.selected {
    background: var(--aps-teal);
    color: #002d2f;
    font-weight: 600;
    border-color: var(--aps-teal);
    box-shadow: 0 2px 6px rgba(0, 245, 196, 0.2);
}

.fitment-level-3.selected span {
    opacity: 1;
    font-weight: 500;
}

.fitment-children {
    margin-left: 0;
}

.image-gallery {
    position: relative;
}

.main-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    overflow: hidden;
    border: 2px solid rgba(0, 245, 196, 0.1);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.main-image:hover {
    border-color: rgba(0, 245, 196, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.main-image:hover img {
    transform: scale(1.02);
}

.image-thumbnails {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.image-thumbnail {
    min-width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.image-thumbnail:hover,
.image-thumbnail.active {
    border-color: var(--aps-teal);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 245, 196, 0.2);
}

.filter-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    margin: 4px 6px 4px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.filter-badge:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.part-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.part-detail-label {
    font-weight: 500;
    color: #6b7280;
    font-size: 13px;
}

.part-detail-value {
    color: #1f2937;
    font-size: 13px;
    font-weight: 500;
}

.filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.filter-tab {
    flex: 1;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 700;
    font-size: 13px;
    backdrop-filter: blur(15px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.filter-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.filter-tab:hover::before {
    left: 100%;
}

.filter-tab:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.filter-tab.active {
    background: linear-gradient(135deg, var(--aps-teal) 0%, #00d4a3 100%);
    color: #002d2f;
    border-color: var(--aps-teal);
    box-shadow: 0 6px 20px rgba(0, 245, 196, 0.4);
    transform: translateY(-3px);
    font-weight: 800;
}

.filter-tab.active::before {
    display: none;
}

.filter-tab:not(.active):hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.filter-group {
    margin-bottom: 20px;
    position: relative;
    border-bottom: 1px solid #004E5A66;
    padding-bottom: 16px;
}

.filter-group:last-child {
    border-bottom: none;
    padding-bottom: 0px;
}

.filter-group label {
    display: block;
    font-size: 13px;
    opacity: 0.95;
    /* margin-bottom: 10px; */
    margin-bottom: 0px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.95);
    text-transform: uppercase;
    font-size: 11px;
}

/* .filter-group label::after {
        content: '';
        display: block;
        width: 30px;
        height: 2px;
        background: linear-gradient(90deg, var(--aps-teal) 0%, transparent 100%);
        margin-top: 4px;
        border-radius: 2px;
    } */

.filter-select {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 14px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(15px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.filter-select:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.filter-select:focus {
    outline: none;
    border-color: var(--aps-teal);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 4px rgba(0, 245, 196, 0.3), 0 4px 16px rgba(0, 245, 196, 0.2);
    transform: translateY(-2px);
}

.filter-select option {
    background: #004d4f;
    color: white;
    padding: 12px;
}

.filter-select option {
    background: #004d4f;
    color: white;
    padding: 8px;
}

.filter-select[multiple] {
    min-height: 100px;
}

.filter-select[multiple] option:checked {
    background: var(--aps-teal);
    color: #002d2f;
}

.part-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.part-info-item {
    display: flex;
    flex-direction: column;
    padding: 6px;
    /* background: rgba(0, 245, 196, 0.03); */
    border-radius: 10px;
    transition: all 0.2s ease;
}

/* .part-info-item:hover {
        background: rgba(0, 245, 196, 0.08);
        transform: translateY(-2px);
    } */

.part-info-label {
    font-size: 10px;
    color: #6b7280;
    margin-bottom: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Roboto', sans-serif;
}

.part-info-value {
    font-size: 14px;
    color: #1f2937;
    font-weight: 700;
    line-height: 1.4;
    font-family: 'Roboto', sans-serif;
}

.delivery-price-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* Estimated delivery card – rounded card with icon + two-line text */
.delivery-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #f5f6f6;
    border-radius: 12px;
}

.delivery-card__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.delivery-card__icon svg {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.delivery-card__icon-svg {
    color: #0d9488;
    font-size: 1rem;
}

.delivery-card__text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.delivery-card__label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 400;
}

.delivery-card__date {
    font-size: 12px;
    font-weight: 600;
    color: #1f2937;
}

.delivery-card__status {
    font-size: 11px;
    color: #374151;
    font-weight: 500;
    margin-top: 2px;
}

.delivery-section {
    display: flex;
    flex-direction: column;
}

.delivery-label {
    font-size: 10px;
    color: #6b7280;
    margin-bottom: 4px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.delivery-value {
    font-size: 13px;
    color: #1f2937;
    font-weight: 600;
}

.price-action-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
}

.part-price {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, #004d4f 0%, var(--aps-teal) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.core-deposit {
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 0;
    font-weight: 500;
}

.price-with-icon {
    display: flex;
    align-items: end;
    margin-bottom: 10px
}

.price-breakdown-icon-wrapper {
    position: relative;
    display: inline-block;
}

.price-breakdown-icon {
    color: #9ca3af;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.price-breakdown-icon:hover {
    color: var(--aps-teal);
    transform: scale(1.1);
}

.price-breakdown-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 14px 16px;
    min-width: 280px;
    max-width: 350px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(5px);
    transition: opacity 0.25s, visibility 0.25s, transform 0.25s;
    font-size: 12px;
    line-height: 1.6;
    color: #374151;
    pointer-events: none;
}

.price-breakdown-tooltip.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.price-breakdown-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 20px;
    border: 6px solid transparent;
    border-top-color: white;
}

.price-breakdown-tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    right: 19px;
    border: 7px solid transparent;
    border-top-color: #e5e5e5;
}

/* Fixed tooltip (body-mounted) – avoids clipping by .parts-list-container on first part-card */
.price-breakdown-tooltip-fixed {
    position: fixed !important;
    bottom: auto !important;
    right: auto !important;
    transform: none !important;
}

.price-breakdown-tooltip-fixed.price-breakdown-tooltip-below::after,
.price-breakdown-tooltip-fixed.price-breakdown-tooltip-below::before {
    top: auto;
    bottom: 100%;
    border-top-color: transparent;
    border-bottom-color: white;
}

.price-breakdown-tooltip-fixed.price-breakdown-tooltip-below::before {
    border-bottom-color: #e5e5e5;
}

.price-breakdown-item {
    padding: 6px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: #6b7280;
    font-size: 12px;
}

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

.price-breakdown-item strong {
    color: #1f2937;
}

/* Button improvements */
.btn-aps-primary {
    background: linear-gradient(135deg, var(--aps-teal) 0%, #00d4a3 100%);
    color: #002d2f;
    font-weight: 800;
    text-transform: uppercase;
    padding: 14px 24px;
    border-radius: 14px;
    letter-spacing: 0.8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    font-size: 13px;
    box-shadow: 0 6px 16px rgba(0, 245, 196, 0.35);
    position: relative;
    overflow: hidden;
}

.btn-aps-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-aps-primary:hover::before {
    left: 100%;
}

.btn-aps-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 245, 196, 0.5);
    opacity: 0.95;
}

.btn-aps-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 245, 196, 0.4);
}

.btn-aps-primary:active {
    transform: translateY(0);
}

/* Sidebar heading */
.parts-sidebar h2 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 24px;
    letter-spacing: -0.3px;
    background: linear-gradient(135deg, var(--aps-teal) 0%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 8px rgba(0, 245, 196, 0.2);
    position: relative;
    padding-bottom: 12px;
}

.parts-sidebar h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--aps-teal) 0%, transparent 100%);
    border-radius: 2px;
}

.parts-sidebar input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 14px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(15px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.parts-sidebar input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.parts-sidebar input[type="text"]:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.parts-sidebar input[type="text"]:focus {
    outline: none;
    border-color: var(--aps-teal);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 4px rgba(0, 245, 196, 0.3), 0 4px 16px rgba(0, 245, 196, 0.2);
    transform: translateY(-2px);
}

/* Section labels */
/* .text-sm.font-semibold {
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 0.2px;
    } */
.breadcrumb-and-filters {
    min-height: fit-content;
}

/* Responsive improvements */
@media (max-width: 1024px) {
    .part-card {
        padding: 16px;
    }

    .part-card-header {
        margin-bottom: 10px;
        padding-bottom: 10px;
    }

    .part-item-name-link h3 {
        font-size: 18px;
    }

    .price-action-section {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .price-action-section>div {
        text-align: left !important;
    }

    .btn-aps-primary {
        width: 100%;
    }

    /* Part Card Grid Responsive */
    .part-card .grid {
        grid-template-columns: 1fr !important;
    }

    .part-card .grid>div:first-child {
        /*margin-bottom: 16px;*/
    }

    .part-info-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }

    .delivery-price-row {
        grid-template-columns: 1fr !important;
    }

    .action-button-wrapper {
        flex-direction: column;
    }

    .add-to-cart-button {
        flex-direction: column;
        gap: 12px;
    }

    .add-to-cart-button>div {
        width: 100%;
    }

    .add-to-cart-button button {
        width: 100%;
    }

    /* Keep listing action buttons in one row after fitment select */
    .add-to-cart-button .listing-card-actions {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        width: 100%;
        justify-content: flex-start;
    }

    .add-to-cart-button .listing-card-actions--single {
        justify-content: flex-end;
    }

    .add-to-cart-button .listing-card-actions button {
        width: auto;
        flex: 0 0 auto;
    }
}

@media (max-width: 768px) {
    .part-card {
        padding: 12px;
    }

    .part-info-grid {
        /* grid-template-columns: 2fr !important; */
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .part-title {
        font-size: 1.5rem !important;
    }

    .breadcrumb-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 12px;
    }

    .breadcrumbs {
        flex-wrap: wrap;
        font-size: 12px;
    }

    .horizontal-filters-premium {
        flex-direction: column;
    }

    .filter-group-premium {
        width: 100%;
    }
}

/* Cart summary bar */
.search-box-cart {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 0;
    padding: 18px 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 2px solid rgba(0, 245, 196, 0.1);
    margin-bottom: 24px;
}

.parts-header-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

/* Horizontal Filter Bar Styling */
.horizontal-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    width: 100%;
}

.horizontal-filters .filter-group {
    flex: 1;
    min-width: 150px;
    margin-bottom: 0;
}

.horizontal-filters .filter-group label {
    color: #4b5563;
    margin-bottom: 6px;
}

.horizontal-filters .filter-group label::after {
    display: none;
}

.horizontal-filters .filter-select {
    background: white;
    border: 1px solid #d1d5db;
    color: #1f2937;
    padding: 10px 14px;
    box-shadow: none;
}

.horizontal-filters .filter-select:hover {
    border-color: var(--aps-teal);
    transform: none;
}

.horizontal-filters .filter-select:focus {
    border-color: var(--aps-teal);
    box-shadow: 0 0 0 3px rgba(0, 245, 196, 0.2);
    transform: none;
}

.horizontal-filters .btn-aps-primary {
    padding: 10px 24px;
    height: 46px;
    margin-top: 0;
}

.horizontal-filters .filter-select[multiple] {
    min-height: 46px;
    height: 46px;
}

/* Fitment tree styling */
.fitment-level-1 {
    font-size: 12px;
    font-weight: 600;
    margin-top: 12px;
    opacity: 0.95;
}

.fitment-level-2 {
    font-size: 12px;
    opacity: 0.85;
}

/* Recent Searches & Breadcrumbs Styling */
.last-searches-section {
    margin-bottom: 24px;
}

.last-searches-label {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.last-searches-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.last-search-item {
    display: flex;
    items-center: center;
    gap: 6px;
    font-size: 13px;
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.2s;
}

.last-search-item:hover {
    color: #2563eb;
    text-decoration: underline;
}

.last-search-item i {
    font-size: 10px;
    color: #ef4444;
}

.breadcrumb-bar {
    background: #f3f4f6;
    border-radius: 8px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.breadcrumb-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-back {
    background: #6b7280;
    color: white;
}

.btn-back:hover {
    background: #4b5563;
}

.btn-search-by-part {
    background: #007bff;
    color: white;
}

.btn-search-by-part:hover {
    background: #0056b3;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6b7280;
    flex-wrap: wrap;
}

.breadcrumbs a {
    color: #3b82f6;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #9ca3af;
}

.breadcrumb-current {
    color: #4b5563;
    font-weight: 500;
    text-transform: uppercase;
}

/* Fitment Selection Modal Styles */
#fitment-selection-modal {
    backdrop-filter: blur(4px);
}

#fitment-selection-modal .bg-white {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.fitment-option-radio,
.fitment-option-checkbox {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 8px;
}

.fitment-option-radio:hover,
.fitment-option-checkbox:hover {
    border-color: var(--aps-teal);
    background-color: rgba(0, 245, 196, 0.05);
}

.fitment-option-radio.selected,
.fitment-option-checkbox.selected {
    border-color: var(--aps-teal);
    background-color: rgba(0, 245, 196, 0.1);
}

.fitment-option-radio input[type="radio"],
.fitment-option-checkbox input[type="checkbox"] {
    margin-right: 12px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.fitment-option-label {
    flex: 1;
    font-size: 14px;
    color: #1f2937;
    font-weight: 500;
}

.fitment-option-count {
    font-size: 12px;
    color: #6b7280;
    background-color: #f3f4f6;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    margin-left: 12px;
}

.fitment-option-radio.selected .fitment-option-count,
.fitment-option-checkbox.selected .fitment-option-count {
    background-color: var(--aps-teal);
    color: white;
}

.fitment-option-radio.zero-count,
.fitment-option-checkbox.zero-count {
    opacity: 0.6;
}

.fitment-option-radio.zero-count .fitment-option-label,
.fitment-option-checkbox.zero-count .fitment-option-label {
    color: #9ca3af;
}

.fitment-option-radio.zero-count .fitment-option-count,
.fitment-option-checkbox.zero-count .fitment-option-count {
    background-color: #e5e7eb;
    color: #6b7280;
}

.fitment-option-radio.zero-count:hover,
.fitment-option-checkbox.zero-count:hover {
    opacity: 0.8;
}

/* Filter Panel Styles */
.filter-toggle-btn {
    transition: all 0.3s ease;
    z-index: 40;
}

.filter-toggle-btn:hover {
    transform: translateY(-50%) translateX(2px);
}

.parts-filter-panel {
    background: #f7f8f9;
    color: #1f2937;
    border-radius: 0;
    /* No right padding: scrollbar sits flush on the panel edge (matches design) */
    padding: 24px 0 24px 24px;
    box-shadow: 0 8px 32px rgba(0, 45, 47, 0.2);
    min-height: calc(100vh - 133px);
    border: 2px solid rgba(0, 0, 0, 0.1);
    position: fixed;
    width: calc(16.666% - 6px);
    max-height: calc(100vh - 133px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    top: 133px;
    left: calc(16.666% - 6px);
    z-index: 55;
    transform: none;
}

.parts-filter-panel-overlay {
    display: none;
}

.parts-sidebar-overlay {
    display: none;
}

/* Mobile/Tablet Filter Panel Styles */
@media (max-width: 1024px) {
    .parts-filter-panel {
        width: 320px;
        max-width: 85vw;
        transform: translateX(100%);
        top: 66px;
        left: auto;
        right: 0;
        min-height: 200px;
        max-height: calc(100vh - 100px);
        z-index: 41;
        transition: transform 0.3s ease-in-out;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        padding: 24px 0 24px 24px;
    }

    .parts-filter-panel.open {
        transform: translateX(0);
    }

    .parts-filter-panel-overlay {
        display: block;
    }

    .parts-sidebar-overlay {
        display: block;
    }

    .parts-filter-panel-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        z-index: 35;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    }

    .parts-filter-panel-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .parts-filter-panel-overlay {
        display: none !important;
    }

    .price-and-core-deposit {
        display: flex;
        flex-direction: row-reverse;
        justify-content: space-between;
        align-items: baseline;
    }
}

.parts-filter-panel.hidden {
    display: none;
}

.parts-filter-panel .filter-panel-main::-webkit-scrollbar {
    width: 10px;
}

.parts-filter-panel .filter-panel-main::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.06);
    border-radius: 10px;
    margin: 6px 2px 6px 0;
}

.parts-filter-panel .filter-panel-main::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--aps-teal) 0%, #00d4a3 100%);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.parts-filter-panel .filter-panel-main::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #00d4a3 0%, var(--aps-teal) 100%);
    border: 2px solid transparent;
    background-clip: padding-box;
}

.filter-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 12px;
    padding-right: 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.filter-panel-header h2 {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: #1f2937;
    margin: 0;
}

.filter-panel-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reset-link {
    color: #009baa;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: color 0.2s ease;
}

.reset-link:hover {
    color: #009baa;
    text-decoration: underline #009baa;
}

.filter-close-btn {
    background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 18px;
    padding: 4px 8px;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.filter-close-btn:hover {
    color: #1f2937;
    background: rgba(0, 0, 0, 0.05);
}

/* Main scroll region below header: scrollbar on this div, right edge of panel */
.parts-filter-panel .filter-panel-main {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    direction: ltr;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 245, 196, 0.75) rgba(0, 0, 0, 0.06);
}

.parts-filter-panel .filter-panel-content {
    padding-top: 0;
    padding-right: 16px;
}

/* Disable sidebar filters while a filter API request is in progress */
.parts-filter-panel.filter-panel--loading .filter-panel-main {
    pointer-events: none;
    opacity: 0.7;
}

.parts-filter-panel.filter-panel--loading #reset-all-filters {
    pointer-events: none;
    opacity: 0.7;
    cursor: not-allowed;
}

/* Disable fitment sidebar tree while listing API is loading */
#fitment-filters-section.fitment-filters-section--loading {
    pointer-events: none;
    opacity: 0.7;
    cursor: wait;
}

/* Collapsible filter groups (default: collapsed) */
.filter-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 0 10px 0;
    margin: 0;
    border: none;
    background: none;
    cursor: pointer;
    font: inherit;
    color: inherit;
    text-align: left;
}

.filter-group-toggle:hover {
    opacity: 0.9;
}

.filter-group-chevron {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 8px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid currentColor;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.filter-group:not(.filter-group--collapsed) .filter-group-chevron {
    transform: rotate(180deg);
}

.filter-group-body {
    overflow: hidden;
    transition: opacity 0.2s ease;
}

.filter-group--collapsed .filter-group-body {
    display: none;
}

.parts-filter-panel .filter-group.filter-group--collapsed .filter-group-toggle {
    padding-bottom: 0;
}

.parts-filter-panel .filter-group .filter-group-label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 11px;
}

.parts-filter-panel .filter-group .filter-group-label,
.parts-filter-panel .filter-group-toggle {
    color: #4b5563;
}

.parts-filter-panel .filter-group-body .range-slider-wrapper {
    margin-top: 12px;
}

.parts-filter-panel .filter-group label {
    color: #4b5563;
}

.parts-filter-panel .range-slider-wrapper {
    margin-top: 12px;
}

.parts-filter-panel .range-slider-container {
    position: relative;
    margin-bottom: 12px;
}

.parts-filter-panel .range-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.1);
    outline: none;
    -webkit-appearance: none;
    margin: 8px 0;
}

.parts-filter-panel .range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--aps-teal);
    cursor: pointer;
    border: 2px solid #f7f8f9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.parts-filter-panel .range-slider::-webkit-slider-thumb:hover {
    background: #00d4a3;
    transform: scale(1.1);
}

.parts-filter-panel .range-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--aps-teal);
    cursor: pointer;
    border: 2px solid #f7f8f9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.parts-filter-panel .range-slider::-moz-range-thumb:hover {
    background: #00d4a3;
    transform: scale(1.1);
}

.parts-filter-panel .range-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.filter-range-input {
    flex: 1;
    padding: 8px 12px;
    background: #ffffff;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    color: #1f2937 !important;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    max-width: 100px;
    min-width: 100px;
}

.filter-range-input::placeholder {
    color: #9ca3af;
}

.filter-range-input:focus {
    outline: none;
    border-color: var(--aps-teal);
    background: #ffffff;
    color: #1f2937;
}

.filter-range-input::-webkit-inner-spin-button,
.filter-range-input::-webkit-outer-spin-button {
    opacity: 0.7;
}

.parts-filter-panel .range-unit {
    font-size: 12px;
    color: #4b5563;
    font-weight: 500;
    opacity: 0.9;
}

.parts-filter-panel .checkbox-list {
    display: flex;
    flex-direction: column;
    /* gap: 8px; */
    gap: 0px;
    margin-top: 0px;
}

.parts-filter-panel .checkbox-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 6px 0;
    transition: all 0.2s ease;
    user-select: none;
}

.parts-filter-panel .checkbox-item:hover {
    opacity: 0.95;
}

.parts-filter-panel .checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: var(--aps-teal);
    border-radius: 3px;
}

.parts-filter-panel .checkbox-item span {
    width: 150px;
    font-size: 12px;
    color: #4b5563;
    font-weight: 500;
    opacity: 0.9;
}

.parts-filter-panel .checkbox-item input[type="checkbox"]:checked+span {
    color: #1f2937;
    font-weight: 500;
    opacity: 1;
}

.parts-filter-panel .checkbox-item:hover span {
    opacity: 1;
}

/* Adjust main content when filter panel is visible */
#main-content-area.main-content-with-filter {
    /* margin-left: calc(33.333% + 32px); */
    margin-left: calc(16.666% + 16px);
}

.side-menu-mob-btn {
    display: none !important;
}

@media (max-width: 1024px) {
    #main-content-area.main-content-with-filter {
        margin-left: 0;
    }

    .card-lower-content {
        flex-direction: column;
    }

    .side-menu-mob-btn {
        z-index: 1;
        display: block !important;
    }

    .desktop-filter-icon {
        display: none !important;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .side-menu-mob-btn {
        top: 106px !important;
    }

    .parts-sidebar,
    .parts-filter-panel {
        top: 95px;
    }
}


/* Sort Select Styling */
.sort-select {
    min-width: 200px;
    transition: all 0.2s ease;
}

.sort-select:hover {
    border-color: var(--aps-teal);
}

.sort-select:focus {
    outline: none;
}

@media (max-width: 768px) {
    .part-title {
        font-size: 1.5rem;
    }

    .sort-select {
        min-width: 150px;
        font-size: 12px;
        padding: 6px 8px;
    }

    /* Keep long labels/locations from overflowing cards */
    .part-info-value {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    /* Fix cramped fitment/warranty/question row on mobile */
    .part-card-controls-row {
        flex-direction: column;
        gap: 10px;
    }

    .part-card-controls-row .part-card-controls-col {
        width: 100% !important;
        margin-bottom: 0;
    }

    .part-card-controls-col--question {
        align-items: stretch;
    }

    .part-card-controls-col--question .question-btn {
        width: 100%;
        justify-content: center;
        min-height: 40px;
        white-space: nowrap;
        font-size: 14px;
        padding: 8px 12px;
    }

    .part-card-controls-row select.fitment-select,
    .part-card-controls-row select.warranty-select {
        width: 100%;
        min-height: 40px;
    }

    /* Keep primary actions easy to tap and aligned on narrow screens */
    .add-to-cart-button__right {
        /*justify-content: flex-end;*/
        align-items: flex-end;
    }

    .add-to-cart-button__right > div:first-child {
        align-items: flex-end;
        /*text-align: right;*/
    }

    .add-to-cart-button__right > div:last-child {
        width: auto;
        justify-content: flex-end;
        margin-left: auto;
    }

    /* When only Add to Cart is present, keep it right-aligned on mobile */
    .add-to-cart-button .listing-card-actions.listing-card-actions--single {
        justify-content: flex-end;
    }

    .add-to-cart-button .listing-card-actions.listing-card-actions--single .add-to-cart-btn {
        margin-left: auto;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    /* Tablet: keep Estimated price + actions in same row */
    .add-to-cart-button__right {
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
    }

    .add-to-cart-button__right > div:first-child {
        align-items: flex-end;
        text-align: right;
    }

    .add-to-cart-button .listing-card-actions {
        justify-content: flex-end;
    }

    .add-to-cart-button__right .core-deposit {
        width: 100%;
        justify-content: flex-start;
        text-align: left;
    }
}

@media (min-width: 1025px) {
    /* Web view: keep estimated price and actions right-aligned */
    .add-to-cart-button__right {
        justify-content: flex-end;
        align-items: center;
    }

    .add-to-cart-button__right > div:first-child {
        align-items: flex-end;
        text-align: right;
    }

    .add-to-cart-button .listing-card-actions {
        justify-content: flex-end;
    }
}

@media (max-width: 768px) {
    .add-to-cart-button__right .core-deposit {
        width: 100%;
        justify-content: flex-start;
        text-align: left;
    }
}

/*These configurations are also exists in part-detail.css. If you are modifying them then modify there too*/
.lb-outerContainer {
    width: 600px !important;
    height: 505px !important;
    background-color: black !important;
}

.lb-dataContainer {
    width: 600px !important;
}

.lb-container {

    display: flex !important;
    justify-content: center !important;
}

.lightbox .lb-image {
    border: none !important;
}

.lb-image {
    width: 600px !important;
    height: 505px !important;
}

/* Keep desktop lightbox size unchanged; make only mobile/tablet responsive */
@media (max-width: 1024px) {
    .lb-outerContainer {
        width: min(600px, calc(100vw - 24px)) !important;
        height: auto !important;
        max-height: calc(100vh - 170px) !important;
    }

    .lb-dataContainer {
        width: min(600px, calc(100vw - 24px)) !important;
    }

    .lb-image {
        width: min(600px, calc(100vw - 24px)) !important;
        height: auto !important;
        max-height: calc(100vh - 220px) !important;
        object-fit: contain !important;
    }
}

.order-status-badge {
    background: var(--aps-teal);
}

.disable-filter-label {
    display: flex;
    align-items: end;
    margin-bottom: 5px;
    cursor: not-allowed;
}

.disable-filter-label {
    display: flex;
    align-items: end;
    margin-bottom: 5px;
    cursor: not-allowed;
}

.disabled-filter-input {
    width: 18px;
    height: 18px;
}

.disabled-filter-span {
    font-size: 13px;
    font-weight: 500;
    color: lightgray;
    margin-left: 10px;
    text-transform: uppercase;
}

.new-add-to-cart-button {
    background-color: var(--aps-teal);
    border-radius: 30px;
}

/* Remove gap between panels when filter panel is visible */
#parts-grid.filter-panel-visible {
    gap: 0;
}

/* Default gap when filter panel is hidden */
#parts-grid {
    gap: 1.5rem; /* gap-6 */
}

/* Footer: keep content clear of the fixed sidebar on parts page */
@media (min-width: 1280px) {
    .parts-page-footer > div,
    .parts-page-footer > footer > div {
        max-width: none;
        margin-left: calc(16.666%);
        margin-right: 0;
    }

    /* Shift footer content right when filter panel is open */
    .parts-page-footer.footer-with-filter > div,
    .parts-page-footer.footer-with-filter > footer > div {
        margin-left: calc(33.333% - 6px);
    }
}

/* Responsive parity for all non-desktop widths (keep >=1280 untouched) */
@media (max-width: 1279px) {
    .parts-main {
        margin-left: 0;
        padding: 16px;
        margin-top: 20px;
    }

    .parts-sidebar {
        width: 320px;
        max-width: 85vw;
        transform: translateX(-100%);
        top: 66px;
        min-height: calc(100vh - 100px);
        max-height: calc(100vh - 100px);
        transition: transform 0.3s ease-in-out;
        z-index: 99;
    }

    .parts-sidebar.open {
        transform: translateX(0);
    }

    .parts-sidebar-overlay {
        position: fixed;
        inset: 0;
        display: block;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        z-index: 34;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    }

    .parts-sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .parts-filter-panel {
        width: 320px;
        max-width: 85vw;
        transform: translateX(100%);
        top: 66px;
        left: auto;
        right: 0;
        min-height: 200px;
        max-height: calc(100vh - 100px);
        z-index: 41;
        transition: transform 0.3s ease-in-out;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        padding: 24px 0 24px 24px;
    }

    .parts-filter-panel.open {
        transform: translateX(0);
    }

    .parts-filter-panel-overlay {
        position: fixed;
        inset: 0;
        display: block !important;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        z-index: 35;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    }

    .parts-filter-panel-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    #main-content-area.main-content-with-filter {
        margin-left: 0;
    }

    .card-lower-content {
        flex-direction: column;
    }

    .side-menu-mob-btn {
        z-index: 40;
        display: block !important;
    }

    .desktop-filter-icon {
        display: none !important;
    }

    /* Prevent count + sort row overflow on medium/small screens */
    .za-filter-container {
        flex-wrap: wrap;
        justify-content: flex-end;
        row-gap: 8px;
    }

    .za-filter-container #results-count-text {
        width: 100%;
        text-align: right;
    }
}

.lb-nav a {
    opacity: 1 !important;
}

.lb-prev,
.lb-next {
    opacity: 1 !important;
    display: block !important;
}
