[data-bs-theme=light] .invert_logo {
    filter: brightness(0);
}

/* Enhanced Mobile Navigation Styles */

/* Improved touch targets - minimum 44px for mobile accessibility */
@media (max-width: 991.98px) {
    .navbar-toggler {
        min-width: 44px;
        min-height: 44px;
        padding: 12px;
        border: none;
        border-radius: 12px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        background: rgba(0, 0, 0, 0.05);
    }
    
    .navbar-toggler:hover {
        background: rgba(0, 0, 0, 0.1);
        transform: scale(1.05);
    }
    
    .navbar-toggler:focus {
        box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
        outline: none;
    }
    
    /* Enhanced mobile navigation items */
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 12px 16px !important;
        font-size: 16px !important;
        border-radius: 8px;
        margin-bottom: 4px;
        transition: all 0.3s ease;
    }
    
    .nav-link:hover {
        background: rgba(0, 123, 255, 0.1);
        transform: translateX(4px);
    }
    
    .nav-link.active {
        background: rgba(0, 123, 255, 0.2);
        font-weight: 600;
    }
    
    /* Improve mobile offcanvas menu */
    .offcanvas-start {
        width: 85% !important;
        max-width: 320px;
    }
    
    .offcanvas-header {
        background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
        color: white;
        border-bottom: none;
    }
    
    .offcanvas-header .btn-close {
        min-width: 44px;
        min-height: 44px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        opacity: 1;
    }
    
    .offcanvas-body {
        padding: 20px !important;
    }
    
    /* Enhanced dropdown menu for mobile */
    .dropdown-menu {
        border: none;
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        padding: 8px;
        margin-top: 8px;
    }
    
    .dropdown-item {
        border-radius: 8px;
        padding: 12px 16px;
        transition: all 0.3s ease;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .dropdown-item:hover {
        background: rgba(0, 123, 255, 0.1);
        transform: translateX(4px);
    }
}

/* Smooth animations for mobile interactions */
.navbar-nav {
    animation: slideInLeft 0.3s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Theme switcher fixes */
.theme-switcher {
    position: relative !important;
    z-index: 1000 !important;
    pointer-events: auto !important;
    min-width: 44px;
    min-height: 44px;
}

.theme-switcher:focus,
.theme-switcher:hover {
    outline: 2px solid rgba(0, 123, 255, 0.5);
    outline-offset: 2px;
}

.dropdown-menu {
    z-index: 1001 !important;
    display: none;
}

.dropdown-menu.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure dropdown is clickable */
.dropdown {
    position: relative;
    z-index: 1000;
}

.dropdown .dropdown-toggle {
    cursor: pointer;
    user-select: none;
}

/* Product image fill fix */
.main-image-link {
    width: 100% !important;
}

.main-image-link img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* Specification cards dark mode fix */
.specification-card .card {
    background: var(--cz-body-bg);
    border: 1px solid var(--cz-border-color);
    color: var(--cz-body-color);
    transition: all 0.3s ease;
}

.specification-card .card:hover {
    border-color: var(--cz-primary);
    box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.1);
}

.specification-card input:checked + .card {
    background: rgba(var(--cz-primary-rgb), 0.1);
    border-color: var(--cz-primary);
    color: var(--cz-emphasis-color);
}

.specification-card .card-title {
    color: var(--cz-emphasis-color);
    font-weight: 600;
}

/* Badge colors for dark mode */
[data-bs-theme=dark] .badge.bg-success-subtle {
    background-color: rgba(51, 179, 107, 0.2) !important;
    color: #2d9f5f !important;
}

/* Enhanced mobile search styling */
@media (max-width: 767.98px) {
    .search-container {
        position: relative;
        width: 100%;
        margin: 0 8px;
    }
    
    .search-input {
        width: 100%;
        min-height: 44px;
        padding: 12px 16px 12px 44px;
        border: 2px solid #e9ecef;
        border-radius: 22px;
        font-size: 16px;
        background: #f8f9fa;
        transition: all 0.3s ease;
    }
    
    .search-input:focus {
        border-color: #007bff;
        background: white;
        box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
        outline: none;
    }
    
    .search-icon {
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
        color: #6c757d;
        pointer-events: none;
    }
    
    .search-clear {
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        font-size: 18px;
        color: #6c757d;
        cursor: pointer;
        padding: 4px;
        border-radius: 50%;
        min-width: 32px;
        min-height: 32px;
        display: none;
    }
    
    .search-clear.show {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Mobile-optimized buttons */
@media (max-width: 991.98px) {
    .btn {
        min-height: 44px;
        padding: 12px 20px;
        font-size: 16px;
        border-radius: 8px;
        transition: all 0.3s ease;
    }
    
    .btn-primary {
        background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
        border: none;
        box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    }
    
    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
    }
    
    .btn-outline-primary {
        border: 2px solid #007bff;
        color: #007bff;
    }
    
    .btn-outline-primary:hover {
        background: #007bff;
        transform: translateY(-2px);
    }
}

/* Loading states for mobile */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Mobile swipe indicators */
.swipe-indicator {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.swipe-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.swipe-dot.active {
    background: white;
    transform: scale(1.2);
}

/* Improved mobile product cards */
@media (max-width: 767.98px) {
    .product-card {
        border-radius: 12px;
        transition: all 0.3s ease;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .product-card:active {
        transform: scale(0.98);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    }
    
    .product-card-body {
        padding: 16px;
    }
    
    .product-title {
        font-size: 14px;
        font-weight: 600;
        line-height: 1.4;
        margin-bottom: 8px;
    }
    
    .product-price {
        font-size: 16px;
        font-weight: 700;
        color: #007bff;
    }
}

/* Mobile-friendly modal improvements */
@media (max-width: 767.98px) {
    .modal-dialog {
        margin: 10px;
        max-width: calc(100vw - 20px);
    }
    
    .modal-header {
        padding: 20px;
        border-bottom: 1px solid #e9ecef;
    }
    
    .modal-body {
        padding: 20px;
        max-height: calc(100vh - 200px);
        overflow-y: auto;
    }
    
    .modal-footer {
        padding: 20px;
        border-top: 1px solid #e9ecef;
    }
}