/* Sofitalib custom transparent header */
:root {
    --sofitalib-admin-offset: 0px;
    --sofitalib-header-height: 84px;
    --sofitalib-header-offset: 84px;
    --sofitalib-content-gap: 20px;
}

body.sofitalib-custom-header-active .site-header,
body.sofitalib-custom-header-active #masthead,
body.sofitalib-custom-header-active .elementor-location-header {
    display: none !important;
}

.sofitalib-site-header-wrap {
    background: transparent;
    left: 0;
    position: fixed;
    right: 0;
    top: var(--sofitalib-admin-offset, 0px);
    transition: background-color 0.22s ease, box-shadow 0.22s ease;
    z-index: 9999;
}

.sofitalib-site-header {
    align-items: center;
    background: transparent;
    display: flex;
    height: var(--sofitalib-header-height);
    justify-content: space-between;
    margin: 0 auto;
    max-width: none;
    padding: 10px clamp(14px, 2.5vw, 34px);
    width: 100%;
}

body.sofitalib-custom-header-active:not([class*="elementor-page"]) .site-main {
    padding-top: calc(var(--sofitalib-header-offset, var(--sofitalib-header-height)) + var(--sofitalib-content-gap));
}

/* Remove fixed Hello theme width constraint for shop archive pages */
body.woocommerce.post-type-archive-product #primary,
body.woocommerce.tax-product_cat #primary,
body.woocommerce.tax-product_tag #primary,
body.woocommerce.post-type-archive-product .content-area,
body.woocommerce.tax-product_cat .content-area,
body.woocommerce.tax-product_tag .content-area,
body.woocommerce.post-type-archive-product .site-main,
body.woocommerce.tax-product_cat .site-main,
body.woocommerce.tax-product_tag .site-main {
    max-width: none !important;
    width: 100%;
}

body.woocommerce.post-type-archive-product .site-main,
body.woocommerce.tax-product_cat .site-main,
body.woocommerce.tax-product_tag .site-main {
    padding-inline: clamp(10px, 2.2vw, 28px);
}

body.woocommerce.post-type-archive-product .site-main .products,
body.woocommerce.tax-product_cat .site-main .products,
body.woocommerce.tax-product_tag .site-main .products {
    width: 100%;
}

body.sofitalib-custom-header-active.sofitalib-header-scrolled.sofitalib-header-on-light .sofitalib-site-header-wrap {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

body.sofitalib-custom-header-active.sofitalib-header-scrolled.sofitalib-header-on-dark .sofitalib-site-header-wrap {
    background: rgba(12, 12, 12, 0.92);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    body.sofitalib-custom-header-active.sofitalib-header-scrolled .sofitalib-site-header-wrap {
        -webkit-backdrop-filter: saturate(140%) blur(8px);
        backdrop-filter: saturate(140%) blur(8px);
    }
}

.sofitalib-site-logo-link {
    display: inline-block;
    line-height: 0;
    min-width: 120px;
    position: relative;
    text-decoration: none;
}

.sofitalib-site-logo {
    display: block;
    height: auto;
    max-height: 54px;
    max-width: min(260px, 35vw);
    opacity: 0;
    transition: opacity 0.24s ease;
    width: auto;
}

.sofitalib-site-logo-link .sofitalib-logo-white {
    opacity: 1;
}

.sofitalib-site-logo-link .sofitalib-logo-black {
    left: 0;
    position: absolute;
    top: 0;
}

.sofitalib-site-header-right {
    align-items: center;
    display: inline-flex;
    gap: 16px;
}

.sofitalib-header-contact,
.sofitalib-header-cart {
    align-items: center;
    color: #fff;
    display: inline-flex;
    font-size: 15px;
    font-weight: 600;
    gap: 8px;
    letter-spacing: 0.01em;
    line-height: 1;
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.sofitalib-header-contact:hover,
.sofitalib-header-cart:hover {
    opacity: 0.78;
}

.sofitalib-header-cart-icon {
    font-size: 20px;
}

.sofitalib-cart-count {
    color: currentColor;
    font-size: 14px;
    font-weight: 700;
    min-width: 12px;
    text-align: center;
}

body.sofitalib-header-on-dark .sofitalib-logo-white {
    opacity: 1;
}

body.sofitalib-header-on-dark .sofitalib-logo-black {
    opacity: 0;
}

body.sofitalib-header-on-dark .sofitalib-header-contact,
body.sofitalib-header-on-dark .sofitalib-header-cart {
    color: #fff;
}

body.sofitalib-header-on-light .sofitalib-logo-white {
    opacity: 0;
}

body.sofitalib-header-on-light .sofitalib-logo-black {
    opacity: 1;
}

body.sofitalib-header-on-light .sofitalib-header-contact,
body.sofitalib-header-on-light .sofitalib-header-cart {
    color: #111;
}

@media (max-width: 1024px) {
    :root {
        --sofitalib-header-height: 74px;
        --sofitalib-header-offset: 74px;
        --sofitalib-content-gap: 18px;
    }

    .sofitalib-site-header {
        padding: 8px 16px;
    }

    .sofitalib-site-logo {
        max-height: 44px;
        max-width: min(220px, 46vw);
    }

    .sofitalib-header-contact,
    .sofitalib-header-cart {
        font-size: 14px;
    }
}

@media (max-width: 767px) {
    :root {
        --sofitalib-header-height: 60px;
        --sofitalib-header-offset: 60px;
        --sofitalib-content-gap: 12px;
    }

    .sofitalib-site-header {
        padding: 6px 10px;
    }

    .sofitalib-site-logo {
        max-height: 32px;
        max-width: min(165px, 46vw);
    }

    .sofitalib-site-header-right {
        gap: 10px;
    }

    .sofitalib-header-contact {
        font-size: 12px;
    }

    .sofitalib-header-cart {
        font-size: 12px;
        gap: 5px;
    }

    .sofitalib-header-cart-icon {
        font-size: 17px;
    }
}
