/* Modern Header & Language Selector Styles */

/* Header Trigger Menu (Moved from inline) */
.header-menu {
    display: flex;
    align-items: center;
}

/* Unified Header Link Styles */
.header-menu a {
    color: var(--color-text-dark);
    font-size: 15px;
    /* Standardize size */
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.header-menu a:hover {
    color: var(--color-primary) !important;
}

.header-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}

.header-menu a:hover::after {
    width: 100%;
}

/* User Panel / Language Selector - Modern Reset */
.user-panel {
    width: auto;
    /* Remove fixed width */
    min-width: 70px;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    position: relative;
}

/* Toggle Button */
.user-toggle {
    background: transparent !important;
    /* Remove white bg */
    border: 1px solid #e9ecef;
    /* Subtle border */
    box-shadow: none !important;
    /* Remove heavy shadow */
    padding: 6px 12px;
    gap: 8px;
    transition: all 0.3s ease;
}

.user-toggle:hover {
    border-color: var(--color-primary);
    background: #fff !important;
}

.user-toggle img {
    border-radius: 0;
    /* Circular flags look cleaner */
    width: 24px;
    height: 24px;
    object-fit: cover;
}

.chev {
    font-size: 12px;
    color: var(--color-text-gray);
}

/* Dropdown Menu */
.user-submenu {
    position: absolute;
    top: 100%;
    /* Directly below button */
    margin-top: 4px;
    /* Small gap */
    right: 0;
    width: 160px;
    border: 1px solid #e9ecef;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1) !important;
    padding: 8px;
    border-radius: 0 !important;
    display: block;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    /* Start slightly above */
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.user-checkbox:checked~.user-submenu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    /* Slide down to position */
}

/* Dropdown Items */
.subitem {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin: 2px 0;
    border: none !important;
    /* Remove separator lines */
    border-radius: 0 !important;
    color: var(--color-text-dark);
    font-size: 14px;
    font-weight: 500;
    background: transparent;
    transition: all 0.2s ease;
}

.subitem img {
    width: 20px;
    height: 20px;
    border-radius: 0;
    object-fit: cover;
}

.subitem:hover {
    background-color: #fff4e6 !important;
    /* Light orange bg */
    color: var(--color-primary) !important;
}

/* Arrow rotation */
.user-checkbox:checked+.user-toggle .chev {
    color: var(--color-primary);
    transform: rotate(180deg);
}

/* Catalogue Button Styling */
.header-catalogue {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--color-primary);
    color: white !important;
    text-decoration: none !important;
    border-radius: 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(242, 98, 34, 0.2);
    position: relative;
    overflow: hidden;
}

.header-catalogue i {
    font-size: 16px;
}

.header-catalogue:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(242, 98, 34, 0.3);
    filter: brightness(1.05);
}

/* Mobile specific for header-right */
@media (max-width: 991px) {
    .header-catalogue span {
        display: none;
        /* Icon only on mobile to save space */
    }

    .header-catalogue {
        padding: 8px;
        border-radius: 0;
    }
}

@media (max-width: 576px) {

    /* Fix cramped header on mobile */
    .header {
        padding: 0 10px;
        /* Reduced side padding */
        height: 70px;
        /* Explicit height control */
    }

    .header-left {
        gap: 8px;
        /* Reduce gap between burger and logo */
    }

    .logo img {
        width: auto;
        max-width: 180px;
        /* Restrict logo width */
        height: auto;
        max-height: 55px;
        /* Ensure it fits in header */
    }

    .header-right {
        gap: 5px;
        /* Reduce gap between right elements */
    }

    /* Adjust specific right-side elements if needed */
    .user-panel {
        min-width: auto;
        /* Allow it to shrink */
        position: relative;
    }

    .user-toggle {
        padding: 4px 8px;
        /* Smaller touch target padding */
    }

    .user-submenu {
        width: 110px;
        right: 0;
        left: auto;
    }

    .subitem {
        font-size: 12px;
        padding: 8px;
    }

    .header-catalogue {
        padding: 6px;
    }
}