/**
 * Header Mobile Fix CSS
 * Fixes issues with the mobile header layout and implements icon-based navigation
 */

/* Sticky Header Icon Navigation */
.icon-nav-menu {
    display: flex;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.icon-nav-menu .nav-item {
    display: flex;
    align-items: center;
}

.icon-nav-menu .nav-link.icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f8f9fa;
    color: var(--primary-color, #122B40);
    transition: all 0.3s ease;
    position: relative;
}

.icon-nav-menu .nav-link.icon-link:hover {
    background-color: var(--secondary-color, #F8A156);
    color: white;
}

.icon-nav-menu .nav-link.icon-link i {
    font-size: 18px;
}

/* Cart count badge */
.icon-nav-menu .nav-link.icon-link .cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--secondary-color, #F8A156);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* RTL support for icon navigation */
.rtl .icon-nav-menu {
    flex-direction: row-reverse;
}

.rtl .icon-nav-menu .nav-link.icon-link .cart-count {
    right: auto;
    left: -5px;
}

/* Sticky Header Layout Improvements */
.sticky-header .arumora-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sticky-header .logo-container {
    flex: 1;
    display: flex;
    justify-content: center;
}

.sticky-header .header-left-actions,
.sticky-header .header-right-links {
    flex: 1;
    display: flex;
    align-items: center;
}

.sticky-header .header-right-links {
    justify-content: flex-end;
}

.sticky-header .header-left-actions {
    justify-content: flex-start;
}

/* Make sure the logo is always centered */
.sticky-header .logo img {
    max-height: 60px;
}

/* Mobile Header Fixes */
@media (max-width: 768px) {
    /* Fix the mobile header layout */
    .arumora-header .mobile-header-fix {
        position: relative;
        justify-content: center;
        padding: 5px 0;
    }

    /* Move the logo to the center */
    .arumora-header .logo-container {
        position: relative;
        z-index: 1;
    }
    
    /* Create space for the hamburger menu */
    .header-mobile-wrapper {
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
    }
    
    /* RTL support */
    .rtl .header-mobile-wrapper {
        left: auto;
        right: 15px;
    }
    
    /* Move icons to the right side */
    .mobile-icons-container {
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
    }
    
    /* RTL support for icons */
    .rtl .mobile-icons-container {
        right: auto;
        left: 15px;
    }
    
    /* Adjust spacing between icons */
    .mobile-icons-container .header-actions {
        gap: 15px;
    }
    
    /* Ensure the logo is centered properly */
    .arumora-header .logo img {
        max-height: 40px;
    }
}

/* Extra small devices */
@media (max-width: 576px) {
    /* Reduce icon spacing on very small screens */
    .mobile-icons-container .header-actions {
        gap: 10px;
    }
    
    /* Adjust hamburger menu position */
    .header-mobile-wrapper {
        left: 10px;
    }
    
    .rtl .header-mobile-wrapper {
        left: auto;
        right: 10px;
    }
    
    /* Adjust icons position */
    .mobile-icons-container {
        right: 10px;
    }
    
    .rtl .mobile-icons-container {
        right: auto;
        left: 10px;
    }
}
