/* Additional fixes and improvements */

/* Fix for product images */
.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Better loading states */
.products-grid.loading {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Improve category carousel on mobile */
@media (max-width: 768px) {
    .categories-carousel {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .categories-carousel::-webkit-scrollbar {
        display: none;
    }
}

/* Fix stat number display */
.stat-number {
    min-width: 60px;
    display: inline-block;
}

/* Better error states */
.error-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.error-state i {
    font-size: 3rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    display: block;
}

/* Smooth transitions for dynamic content */
.product-card {
    animation: fadeInUp 0.4s ease-out;
}

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

/* Fix mobile menu */
.mobile-menu-open {
    overflow: hidden;
}

/* Hide duplicate hamburger menus on mobile */
@media (max-width: 768px) {
    /* Ensure only one hamburger menu is visible */
    .header-nav .mobile-menu-btn:not(:first-of-type) {
        display: none !important;
    }
    
    /* Hide any duplicate generated menus */
    .nav-content > .mobile-menu-btn:nth-child(n+2) {
        display: none !important;
    }
}

/* Improve form feedback */
.form-input.error {
    border-color: var(--secondary);
}

.form-error {
    color: var(--secondary);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Loading skeleton improvements */
.skeleton-product {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.skeleton-product .skeleton-image {
    height: 200px;
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-product .skeleton-content {
    padding: 1rem;
}

.skeleton-product .skeleton-line {
    height: 12px;
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    margin-bottom: 0.5rem;
    border-radius: var(--radius-sm);
}

.skeleton-product .skeleton-line:last-child {
    width: 60%;
}