:root {
    --primary-blue: #233c88;
    --secondary-blue: #1e3374;
    --accent-yellow: #fdec1c;
    --yellow-hover: #f4e005;
    --light-yellow: #fef9e7;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-800: #1f2937;
    --white: #ffffff;
    --light-gray: #e5e7eb;
    --success-green: #10b981;
    --danger-red: #ef4444;
}

body {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--light-yellow) 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
}

/* Header Section with Logo and Mascot - UPDATED WITH CENTERING FIX */
.main-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-yellow) 100%);
    color: rgb(0, 0, 0);
    padding: 0.5rem 0 1rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    min-height: 120px;
    max-height: 180px;
    /* ADDED: Flexbox container for proper centering */
    display: flex;
    align-items: center;
}

.table-responsive {
    background-color: #233c88;
}

.main-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, var(--accent-yellow) 0%, transparent 20%, transparent 80%, var(--accent-yellow) 100%);
    opacity: 0.1;
    z-index: 1;
}

/* UPDATED: Container to use flexbox properly */
.main-header .container {
    position: relative;
    z-index: 2;
    height: 100%;
    width: 100%;
    /* ADDED: Flexbox layout for proper spacing */
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo Styling - UPDATED with fixed width */
.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 120px;
    /* ADDED: Fixed width to maintain space */
    width: 200px;
    flex-shrink: 0;
}

.main-logo {
    max-width: 200px;
    max-height: 100px;
    width: 100%;
    height: 70%;
    object-fit: contain;
    border-radius: 12px;
    position: absolute;
    top: 10px;
    left: 20px;
    transition: transform 0.3s ease;
}

.main-logo:hover {
    transform: scale(1.05);
}

/* Mascot Styling - UPDATED with fixed width */
.mascot-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 120px;
    /* ADDED: Fixed width to maintain space */
    width: 200px;
    flex-shrink: 0;
}

.mascot-image {
    max-width: 300px;
    max-height: 300px;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    position: absolute;
    top: 10px;
    right: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mascot-image:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* UPDATED: Container for title - MAIN FIX FOR CENTERING */
.containerHeader {
    /* UPDATED: Proper flex centering instead of inline display */
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: 0px;
    text-align: center;
}

/* Disclaimer Section */
.disclaimer-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
    position: relative;
    overflow: hidden;
}

.disclaimer-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, var(--accent-yellow) 0%, transparent 20%, transparent 80%, var(--accent-yellow) 100%);
    opacity: 0.1;
    z-index: 1;
}

.disclaimer-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    border: 2px solid var(--accent-yellow);
    backdrop-filter: blur(10px);
}

.disclaimer-icon {
    font-size: 2rem;
    color: var(--accent-yellow);
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.disclaimer-text {
    flex-grow: 1;
    text-align: left;
}

.disclaimer-text p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
}

.contact-highlight {
    color: var(--accent-yellow);
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Mobile responsive for disclaimer */
@media (max-width: 768px) {
    .disclaimer-section {
        padding: 1.5rem 0;
        margin-top: 2rem;
    }
    
    .disclaimer-content {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .disclaimer-icon {
        margin-right: 0;
        margin-bottom: 1rem;
        font-size: 1.5rem;
    }
    
    .disclaimer-text {
        text-align: center;
    }
    
    .disclaimer-text p {
        font-size: 1rem;
    }
}

/* UPDATED: Remove conflicting flex styles from title column */
.main-header .col-md-8 {
    height: 100%;
    padding: 0 15px;
}

/* UPDATED: Remove problematic row styling that conflicts */
.main-header .row {
    /* UPDATED: Use display: contents to avoid layout conflicts */
    display: contents;
}

/* Navigation Styling */
.navbar {
    border-bottom: 2px solid var(--accent-yellow);
    background: var(--white) !important;
}

.navbar .nav-link {
    color: var(--primary-blue) !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.navbar .nav-link:hover {
    color: var(--secondary-blue) !important;
    background: var(--light-yellow);
    border-radius: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-blue) 0%, var(--primary-blue) 100%);
    border-color: var(--yellow-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(35, 60, 136, 0.3);
}

/* Category Sections */
.category-section {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
}

.category-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-yellow);
}

.category-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: white;
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
    position: relative;
    overflow: hidden;
}

.category-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: -20px;
    width: 40px;
    height: 100%;
    background: var(--accent-yellow);
    transform: skewX(-20deg);
    transition: transform 0.3s ease;
}

.category-header:hover::before {
    transform: skewX(-20deg) translateX(-30px);
}

.category-header:hover {
    background: linear-gradient(135deg, var(--secondary-blue) 0%, var(--primary-blue) 100%);
}

.category-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    flex-grow: 1;
    position: relative;
    z-index: 2;
}

.category-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    color: var(--accent-yellow);
    position: relative;
    z-index: 2;
}

.collapse-icon {
    transition: transform 0.3s ease;
    font-size: 1.2rem;
    color: var(--accent-yellow);
    position: relative;
    z-index: 2;
}

.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

.category-content {
    padding: 2rem;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--light-yellow) 100%);
}

/* Item Cards - ENHANCED FOR LIGHTBOX */
.item-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 2px solid var(--light-gray);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--accent-yellow) 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.item-card:hover::before {
    transform: scaleX(1);
}

.item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(35, 60, 136, 0.15);
    border-color: var(--accent-yellow);
}

/* Enhanced Image Container for Lightbox */
.image-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: var(--gray-50);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.item-image {
    width: 100%;
    max-width: 150px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--light-gray);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

/* Clickable Image Enhancements */
.clickable-image {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
    position: relative;
}

.clickable-image:hover,
.clickable-image:focus {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    border-color: var(--accent-yellow);
    outline: none;
    filter: brightness(1.1);
}

.clickable-image:focus {
    outline: 3px solid var(--accent-yellow);
    outline-offset: 2px;
}

/* Image Overlay for Lightbox Hint */
.image-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 16px;
    pointer-events: none;
    backdrop-filter: blur(2px);
}

.image-container:hover .image-overlay,
.clickable-image:focus + .image-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Image Fallback Styling */
.image-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    background: var(--gray-100);
    border-radius: 8px;
    border: 2px dashed var(--light-gray);
    color: var(--gray-800);
}

.item-card:hover .item-image {
    border-color: var(--accent-yellow);
}

.item-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.item-part-number {
    background: linear-gradient(135deg, var(--accent-yellow) 0%, var(--yellow-hover) 100%);
    color: var(--primary-blue);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1rem;
    box-shadow: 0 2px 6px rgba(253, 236, 28, 0.3);
    transition: all 0.3s ease;
}

.item-part-number:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(253, 236, 28, 0.4);
}

.item-description {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-top: auto;
    padding-top: 1rem;
}

/* IMAGE LIGHTBOX STYLES */
.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
    animation: lightboxFadeIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
}

.image-lightbox.show {
    display: flex;
}

@keyframes lightboxFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        transform: scale(1);
        backdrop-filter: blur(8px);
    }
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    animation: imageZoomIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    align-items: center;
}

@keyframes imageZoomIn {
    from {
        transform: scale(0.8) translateY(20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
    background: white;
    padding: 4px;
    transition: transform 0.3s ease;
}

.lightbox-image:hover {
    transform: scale(1.02);
}

.lightbox-close {
    position: absolute;
    top: -60px;
    right: -10px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.lightbox-close:hover,
.lightbox-close:focus {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.15);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    outline: 2px solid var(--accent-yellow);
    outline-offset: 2px;
}

.lightbox-info {
    position: absolute;
    bottom: -90px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.96);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    margin: 0 auto;
    animation: infoSlideUp 0.4s ease-out 0.2s both;
}

@keyframes infoSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lightbox-title {
    font-weight: bold;
    color: var(--primary-blue);
    margin-bottom: 8px;
    font-size: 1.2rem;
    line-height: 1.4;
}

.lightbox-part-number {
    color: #666;
    font-size: 1rem;
    background: var(--light-yellow);
    padding: 4px 12px;
    border-radius: 16px;
    display: inline-block;
    font-weight: 500;
}

.lightbox-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    font-size: 18px;
    background: rgba(0, 0, 0, 0.8);
    padding: 30px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.lightbox-spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid var(--accent-yellow);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: lightboxSpin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes lightboxSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.lightbox-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--gray-50);
    border: 2px dashed var(--light-gray);
    border-radius: 12px;
    padding: 40px;
    color: var(--gray-800);
    min-height: 300px;
    min-width: 400px;
    text-align: center;
}

.lightbox-error i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--light-gray);
}

.lightbox-error h4 {
    margin-bottom: 0.5rem;
    color: var(--gray-800);
}

/* Search Functionality */
.search-container .form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(35, 60, 136, 0.25);
}

.search-highlight {
    background-color: var(--light-yellow) !important;
    border: 2px solid var(--accent-yellow) !important;
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(253, 236, 28, 0.3) !important;
}

.hidden-item {
    display: none !important;
}

.search-results-info {
    background: var(--light-yellow);
    border: 2px solid var(--accent-yellow);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: none;
    color: var(--primary-blue);
    font-weight: 500;
}

/* Dropdown Menus */
.dropdown-menu {
    border: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    border: 2px solid var(--accent-yellow);
}

.dropdown-item {
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
    color: var(--primary-blue);
}

.dropdown-item:hover {
    background: linear-gradient(135deg, var(--light-yellow) 0%, var(--accent-yellow) 100%);
    color: var(--primary-blue);
    transform: translateX(5px);
}

.dropdown-header {
    color: var(--primary-blue);
    font-weight: 600;
}

/* Cart Section */
.cart {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--accent-yellow);
}

.cart-summary .badge {
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
}

.cart-summary .bg-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%) !important;
}

.cart-summary .bg-success {
    background: linear-gradient(135deg, var(--success-green) 0%, #059669 100%) !important;
}

/* Operator Code Section */
.operator-code-container {
    background: var(--light-yellow) !important;
    border: 2px solid var(--accent-yellow) !important;
    border-radius: 12px !important;
}

.operator-code-container h5 {
    color: var(--primary-blue);
}

.operator-code-container .input-group-text {
    background: white !important;
    border-color: var(--primary-blue) !important;
    color: var(--primary-blue) !important;
}

.operator-code-container .form-control {
    border-color: var(--primary-blue) !important;
}

.operator-code-container .form-control:focus {
    border-color: var(--primary-blue) !important;
    box-shadow: 0 0 0 0.2rem rgba(35, 60, 136, 0.25) !important;
}

/* Table Styling */
.table-dark {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%) !important;
    color: white !important;
}

.table-dark th,
.table-dark td {
    border-color: var(--accent-yellow) !important;
}

.table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: var(--light-yellow);
}

.table-hover > tbody > tr:hover > td {
    background-color: var(--accent-yellow);
    color: var(--primary-blue);
}

/* Button Variations */
.btn-success {
    background: linear-gradient(135deg, var(--success-green) 0%, #059669 100%);
    font-weight: 600;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, var(--success-green) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-outline-danger {
    border: 2px solid var(--danger-red);
    color: var(--danger-red);
    font-weight: 600;
}

.btn-outline-danger:hover {
    background: var(--danger-red);
    border-color: var(--danger-red);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Loading Indicator */
.spinner-border.text-primary {
    color: var(--primary-blue) !important;
}

/* Note Section */
.note-section {
    background: linear-gradient(135deg, var(--light-yellow) 0%, var(--accent-yellow) 100%);
    border: 2px solid var(--primary-blue);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    color: var(--primary-blue);
}

/* Alert Styling */
.alert-info {
    background: var(--light-yellow);
    border-color: var(--accent-yellow);
    color: var(--primary-blue);
}

.alert-success {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border-color: var(--success-green);
    color: #065f46;
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
    color: #92400e;
}

/* Mobile Responsive Styles - UPDATED WITH CENTERING FIX AND LIGHTBOX SUPPORT */
@media (max-width: 768px) {
    .main-header {
        padding: 1rem 0;
        /* UPDATED: Stack vertically on mobile */
        flex-direction: column;
    }
    
    .main-header .container {
        /* UPDATED: Stack vertically on mobile */
        flex-direction: column;
        align-items: center;
    }
    
    .containerHeader {
        /* UPDATED: Proper order and spacing on mobile */
        order: 2;
        padding: 1rem 10px;
    }
    
    .logo-container {
        /* UPDATED: Proper order and spacing on mobile */
        order: 1;
        height: 80px;
        margin-bottom: 0.5rem;
        width: auto;
    }
    
    .mascot-container {
        /* UPDATED: Proper order and spacing on mobile */
        order: 3;
        height: 80px;
        margin-top: 0.5rem;
        width: auto;
    }
    
    .main-logo {
        /* UPDATED: Remove absolute positioning on mobile */
        position: relative;
        left: 0;
        top: 0;
        max-width: 60px;
        max-height: 60px;
    }
    
    .mascot-image {
        /* UPDATED: Remove absolute positioning on mobile */
        position: relative;
        right: 0;
        top: 0;
        max-width: 60px;
        max-height: 60px;
    }
    
    .category-content {
        padding: 1rem;
    }
    
    .search-container {
        width: 100% !important;
        margin-bottom: 1rem;
    }
    
    .search-container .input-group {
        width: 100% !important;
    }
    
    .navbar .container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .navbar-nav {
        margin-bottom: 1rem;
    }
    
    .item-card {
        margin-bottom: 1rem;
    }
    
    .category-icon {
        font-size: 1.2rem;
        margin-right: 0.5rem;
    }
    
    .category-title {
        font-size: 1.1rem;
    }
    
    .item-title {
        font-size: 0.95rem;
    }
    
    .item-part-number {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .item-description {
        font-size: 0.8rem;
    }
    
    .cart {
        padding: 1rem;
    }
    
    /* Mobile Lightbox Adjustments */
    .lightbox-content {
        max-width: 95vw;
        max-height: 85vh;
        padding: 0 10px;
    }

    .lightbox-close {
        top: -50px;
        right: 0;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .lightbox-info {
        bottom: -70px;
        padding: 15px;
        font-size: 0.9em;
        left: 10px;
        right: 10px;
    }
    
    .lightbox-title {
        font-size: 1.1rem;
    }
    
    .lightbox-part-number {
        font-size: 0.9rem;
    }

    .clickable-image {
        max-width: 120px;
        height: 100px;
    }
    
    .image-overlay {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .lightbox-image {
        max-height: 75vh;
        border-radius: 8px;
    }
    
    .lightbox-loading {
        padding: 20px;
        font-size: 16px;
    }
    
    .lightbox-spinner {
        width: 40px;
        height: 40px;
        margin-bottom: 10px;
    }
    
    .lightbox-error {
        min-width: 280px;
        min-height: 200px;
        padding: 30px 20px;
    }
    
    .lightbox-error i {
        font-size: 3rem;
    }
    
    .lightbox-error h4 {
        font-size: 1.1rem;
    }
}

/* Tablet Responsive Styles for Lightbox */
@media (min-width: 769px) and (max-width: 1024px) {
    .lightbox-content {
        max-width: 85vw;
        max-height: 85vh;
    }
    
    .lightbox-close {
        top: -55px;
        right: -5px;
    }
    
    .lightbox-info {
        bottom: -80px;
        padding: 18px;
        max-width: 500px;
    }
    
    .clickable-image {
        max-width: 140px;
        height: 110px;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .search-container,
    .search-results-info,
    .note-section,
    .image-lightbox {
        display: none !important;
    }
    
    .main-header {
        background: var(--primary-blue) !important;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }
    
    .category-section {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
        margin-bottom: 1rem;
    }
    
    .category-content {
        display: block !important;
    }
    
    .item-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
        margin-bottom: 0.5rem;
    }
    
    .clickable-image {
        cursor: default;
    }
    
    .image-overlay {
        display: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .item-card {
        border: 2px solid #000;
    }
    
    .item-part-number {
        background: #000;
        color: #fff;
    }
    
    .category-header {
        background: #000 !important;
    }
    
    .lightbox-close {
        background: #fff;
        color: #000;
        border: 2px solid #000;
    }
    
    .lightbox-info {
        background: #fff;
        color: #000;
        border: 2px solid #000;
    }
    
    .image-overlay {
        background: #000;
        color: #fff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .category-section,
    .item-card,
    .dropdown-item,
    .collapse-icon,
    .main-logo,
    .mascot-image,
    .clickable-image,
    .image-overlay,
    .lightbox-content,
    .lightbox-image,
    .lightbox-info {
        transition: none;
        animation: none;
    }
    
    .category-section:hover,
    .item-card:hover,
    .main-logo:hover,
    .mascot-image:hover,
    .clickable-image:hover,
    .lightbox-image:hover {
        transform: none;
    }
    
    .image-lightbox {
        animation: none;
    }
    
    .lightbox-content {
        animation: none;
    }
    
    .lightbox-info {
        animation: none;
    }
}

/* Dark mode support for lightbox */
@media (prefers-color-scheme: dark) {
    .image-lightbox {
        background: rgba(0, 0, 0, 0.95);
    }
    
    .lightbox-info {
        background: rgba(30, 30, 30, 0.96);
        color: #e5e5e5;
    }
    
    .lightbox-title {
        color: var(--accent-yellow);
    }
    
    .lightbox-part-number {
        background: rgba(50, 50, 50, 0.8);
        color: #e5e5e5;
    }
    
    .lightbox-error {
        background: #2a2a2a;
        color: #e5e5e5;
        border-color: #555;
    }
}

/* Focus styles for better accessibility */
.clickable-image:focus,
.lightbox-close:focus {
    outline: 3px solid var(--accent-yellow);
    outline-offset: 2px;
}

/* Smooth scrolling for better UX */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-blue);
}

/* Selection color */
::selection {
    background: var(--accent-yellow);
    color: var(--primary-blue);
}

::-moz-selection {
    background: var(--accent-yellow);
    color: var(--primary-blue);
}