@media (max-width: 768px) {
    header {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        width: 100vw;
        z-index: 10000 !important;
        background: #4b6cb7 !important;
        box-shadow: 0 2px 12px rgba(0,0,0,0.08) !important;
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 70px;
        padding: 0 15px;
    }
}
    .mobile-bottom-nav .nav-link {
        font-size: 0.95rem !important;
    }
/* Mobile-specific enhancements for Aura Space */

/* Fix general mobile issues */
@media (max-width: 768px) {
    /* Fix header and navigation */
    header {
        padding: 0 15px;
        height: 70px;
    }
    
    .menu-icon {
        display: flex !important;
    }
    
    /* Improve mobile menu appearance */
    .nav-menu {
        padding-top: 90px !important;
    }
    
    .nav-menu li a {
        font-size: 18px;
        display: block;
        padding: 10px 0;
    }
    
    /* Fix product section */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .filter-options {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 10px;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }
    
    .filter-options::-webkit-scrollbar {
        height: 0;
        width: 0;
        background: transparent;
    }
    
    /* Fix hero section content */
    .store-hero {
        min-height: 80vh;
        padding-top: 80px;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }

    .store-hero .hero-content {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    
    .store-hero h1 {
        font-size: 2.5rem !important;
        margin-bottom: 15px;
    }
    
    .store-hero p {
        font-size: 1rem !important;
        margin-bottom: 25px;
    }
    
    .hero-buttons {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    /* Improve category display */
    .category-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
        padding: 0 10px;
    }
    
    .category-card {
        padding: 25px 15px;
    }
    
    .category-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }
    
    .category-card h3 {
        font-size: 16px;
    }
    
    /* Fix product cards */
    .products-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 0 15px;
    }
    
    .product-card {
        margin-bottom: 15px;
        min-height: 420px; /* Adjusted for mobile */
    }
    
    .product-image {
        height: 220px;
    }
    
    .product-title {
        font-size: 18px;
    }
    
    .product-badge {
        top: 8px;
        right: 8px;
        padding: 4px 10px;
        font-size: 10px;
    }
    
    .product-description {
        font-size: 13px;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 15px;
        min-height: 40px; /* Ensure consistent spacing */
    }
    
    .product-details {
        padding: 20px 15px;
    }
    
    /* Fix animations for better mobile performance */
    .product-card:hover, 
    .category-card:hover,
    .btn-primary:hover,
    .btn-secondary:hover {
        transform: translateY(-5px) !important;
    }
}

    /* Extreme mobile fixes */
@media (max-width: 480px) {
    .store-hero h1 {
        font-size: 2rem !important;
    }
    
    .store-hero p {
        font-size: 0.9rem !important;
    }
    
    .section-title {
        font-size: 24px !important;
    }
    
    .product-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .product-price {
        font-size: 20px;
    }
    
    .product-rating {
        margin-top: 3px;
    }
    
    .product-actions {
        flex-direction: row;
    }
    
    .btn-cart, .btn-view, .btn-buy-now {
        font-size: 13px;
        padding: 10px 15px;
    }
    
    .product-card {
        min-height: 400px;
        max-width: 100%;
        margin: 0 auto;
    }    /* Simplify animations for better performance */
    .category-card,
    .product-card {
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
    @keyframes gradientFlow {
        0%, 100% {
            background-position: 0% 50%;
        }
        50% {
            background-position: 100% 50%;
        }
    }
    
    /* Fix for custom cursor on mobile */
    .cursor-dot, .cursor-outline {
        display: none;
    }
    
    /* Better tap targets for mobile */
    .btn-cart, .btn-view, .btn-buy-now, .filter-btn {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    /* Make sure buttons are appropriately sized */
    .product-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    /* Fix category grid for very small screens */
    .category-grid {
        grid-template-columns: 1fr 1fr !important;
    }
    
    /* Ensure the menu doesn't overflow */
    .nav-menu {
        width: 85% !important;
        padding-left: 25px !important;
        padding-right: 25px !important;
    }
}

/* Fix iOS specific issues */
@supports (-webkit-touch-callout: none) {
    .store-hero {
        height: 85vh; /* Use height instead of min-height for iOS */
    }
    
    /* Fix backdrop-filter for iOS */
    header, 
    .category-card,
    .product-card,
    .nav-menu.active {
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    }
    
    /* Fix touch events on iOS */
    .btn-primary, 
    .btn-secondary,
    .filter-btn,
    .product-actions button {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
}

/* High pixel density screens (retina) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .store-hero::before {
        background-size: 50%;
        opacity: 0.03;
    }
    
    .product-image img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Fix for foldable devices */
@media (max-width: 320px) {
    .store-hero h1 {
        font-size: 1.7rem !important;
    }
    
    .category-grid {
        grid-template-columns: 1fr !important;
    }
    
    .section-title::after {
        width: 50px;
    }
}

/* Landscape mode fixes */
@media (max-height: 500px) and (orientation: landscape) {
    .store-hero {
        min-height: 100vh;
        padding: 100px 20px 40px;
    }
    
    .hero-content {
        max-width: 600px;
    }
    
    .hero-buttons {
        flex-direction: row !important;
        justify-content: center;
    }
    
    .btn-primary, .btn-secondary {
        width: auto !important;
        min-width: 160px;
    }
    
    .nav-menu {
        padding-top: 70px !important;
    }
    
    /* Make sure buttons don't get too small */
    .product-actions {
        flex-direction: row !important;
    }
}

/* Fix flickering on mobile scroll */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Fix broken flexbox on older browsers */
.products-grid, .category-grid {
    display: grid;
}

@supports not (display: grid) {
    .products-grid, .category-grid {
        display: flex;
        flex-wrap: wrap;
    }
    
    .product-card, .category-card {
        flex-basis: calc(50% - 20px);
        margin: 10px;
    }
}

/* Make sure videos play nicely on mobile */
video.hero-vid {
    object-fit: cover;
}

@media (max-width: 768px) {
    video.hero-vid {
        object-position: center center;
    }
}

/* Fix for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(10px)) {
    header, 
    .nav-menu.active,
    .category-card,
    .product-card {
        background-color: rgba(6, 17, 33, 0.95);
    }
}

/* Single column product cards on all mobile sizes */
@media (min-width: 481px) and (max-width: 767px) {
    .products-grid {
        grid-template-columns: 1fr;
        max-width: 450px;
        margin: 0 auto;
    }
    
    .product-card {
        min-height: 450px;
    }
    
    .product-image {
        height: 250px;
    }
}
