/*
Theme Name: Flatsome Child
Description: This is a child theme for Flatsome Theme
Author: UX Themes
Template: flatsome
Version: 3.0
*/

/*************** ADD CUSTOM CSS HERE.   ***************/


@media only screen and (max-width: 48em) {
/*************** ADD MOBILE ONLY CSS HERE  ***************/


}
/*** Polylang language switcher: improve flag/text spacing in header. ***/
.header-language-dropdown__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.header-language-dropdown__link .image-icon {
    margin: 0;
    line-height: 0;
}
.header-language-dropdown__link .image-icon img {
    display: block;
    width: 18px;
    height: auto;
}
.header-language-dropdown .nav-dropdown a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.header-language-dropdown .nav-dropdown .icon-image {
    margin: 0;
    line-height: 0;
}
.header-language-dropdown .nav-dropdown .icon-image img {
    display: block;
    width: 18px;
    height: auto;
}

/*** Hide Flatsome absolute footer bar entirely (Copyright/credits strip). ***/
.absolute-footer {
    display: none !important;
}

/*** Make entire banner clickable: text-box must not block the underlying link. ***/
.banner.has-hover .banner-layers .text-box {
    pointer-events: none;
}
.banner.has-hover .banner-layers .text-box a,
.banner.has-hover .banner-layers .text-box .button {
    pointer-events: auto;
}

/*** Show only flag + arrow on top-level language switcher (hide language name). ***/
.header-language-dropdown__link {
    font-size: 0 !important;
}
.header-language-dropdown__link .image-icon,
.header-language-dropdown__link .icon-angle-down {
    font-size: 1rem !important;
}
.header-language-dropdown__link .image-icon img {
    width: 22px;
    height: auto;
}
/* Dropdown items keep both flag + name (only top trigger is icon-only) */

/*** Hidden helper for screen readers (visually hidden but readable) ***/
.aos-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/*** Mobile header fix: keep language switcher on same line as logo ***/
@media (max-width: 849px) {
    /* Shrink logo on mobile so language flag fits beside */
    #masthead .header-main .logo img,
    #masthead .header-main img.header_logo {
        max-height: 40px !important;
        width: auto !important;
    }
    /* Make the top header row never wrap */
    #masthead .header-main .flex-row {
        flex-wrap: nowrap !important;
    }
    /* Compact language switcher: just flag, smaller */
    .header-language-dropdown__link {
        padding: 0 8px !important;
    }
    .header-language-dropdown__link .image-icon img {
        width: 20px !important;
    }
    .header-language-dropdown__link .icon-angle-down {
        font-size: 0.85rem !important;
    }
    /* Less left padding on logo column */
    .header-logo {
        padding-left: 8px !important;
        padding-right: 4px !important;
    }
    /* Tighter cart icon */
    .header-main .cart-item .header-cart-link {
        padding-right: 4px !important;
    }
}

/* Even tighter on very small screens */
@media (max-width: 380px) {
    #masthead .header-main .logo img,
    #masthead .header-main img.header_logo {
        max-height: 34px !important;
    }
    .header-language-dropdown__link .image-icon img {
        width: 18px !important;
    }
}

/*** Force language switcher contents on a single line ***/
.header-language-dropdown__link {
    display: inline-flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    gap: 4px;
}
.header-language-dropdown__link > * {
    flex-shrink: 0;
}

/* Also ensure header rows don't wrap any descendants */
#masthead .header-main .nav > li {
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
}

@media (max-width: 849px) {
    /* Mobile language switcher: ultra-compact */
    .header-language-dropdown__link {
        padding: 0 6px !important;
        gap: 2px !important;
    }
    .header-language-dropdown__link .image-icon {
        margin: 0 !important;
        line-height: 0 !important;
    }
    .header-language-dropdown__link .image-icon img {
        width: 18px !important;
        max-width: 18px !important;
    }
    .header-language-dropdown__link .icon-angle-down {
        font-size: 0.7rem !important;
        margin: 0 !important;
        line-height: 1 !important;
    }
}
