.pha-custom-header,
.pha-custom-header *,
.pha-custom-header *::before,
.pha-custom-header *::after {
    box-sizing: border-box;
}

.pha-custom-header {
    --pha-bg: #ffffff;
    --pha-nav-bg: #ffeade;
    --pha-border: var(--color-content-border, #e3e7f0);
    --pha-heading: var(--color-content-heading, #0f131f);
    --pha-text: var(--color-content-text, #424242);
    --pha-faded: var(--color-content-faded, #727f9f);
    --pha-primary: var(--color-content-primary, #e14658);
    --pha-secondary: var(--color-content-secondary, #424242);
    --pha-overlay: rgba(15, 19, 31, 0.78);

    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    background: var(--pha-bg);
    color: var(--pha-text);
    font-family: inherit;
    position: relative;
    z-index: 9999;
    overflow: visible !important;
}

.pha-custom-header .pha-ico {
    width: 1em;
    height: 1em;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.15;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pha-header-container {
    width: min(1320px, calc(100vw - 48px));
    margin: 0 auto;
}

/* MAIN HEADER */
.pha-header-main {
    height: 94px;
    display: grid;
    grid-template-columns: 250px minmax(340px, 1fr) auto;
    align-items: center;
    gap: 24px;
    background: #ffffff;
    position: relative;
    z-index: auto !important;
}

.pha-header-logo {
    display: flex;
    align-items: center;
    text-decoration: none !important;
    min-width: 0;
}

.pha-header-logo img {
    width: 100%;
    max-width: 245px;
    height: auto;
    display: block;
}

/* SEARCH */
.pha-search-wrap {
    min-width: 0;
}

.pha-search-form {
    position: relative;
    display: flex;
    width: 100%;
    height: 46px;
    border: 1px solid var(--pha-border);
    border-radius: 9px;
    overflow: hidden;
    background: #ffffff;
}

.pha-search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    height: 46px !important;
    border: 0 !important;
    outline: none !important;
    padding: 0 18px !important;
    font-size: 15px;
    color: var(--pha-text);
    background: transparent !important;
    box-shadow: none !important;
    position: relative;
    z-index: 2;
}

.pha-search-form input:focus + .pha-search-placeholder,
.pha-search-form input.has-value + .pha-search-placeholder {
    opacity: 0;
    visibility: hidden;
}

.pha-search-placeholder {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--pha-faded);
    font-size: 15px;
    pointer-events: none;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 4px;
    max-width: calc(100% - 78px);
    white-space: nowrap;
    overflow: hidden;
}

.pha-search-word-wrap {
    display: inline-block;
    height: 18px;
    overflow: hidden;
}

.pha-search-word {
    display: inline-block;
    animation: phaSearchWordUp 0.34s ease both;
}

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

.pha-search-form button {
    width: 56px !important;
    min-width: 56px !important;
    height: 46px !important;
    border: 0 !important;
    border-radius: 0 9px 9px 0 !important;
    background: var(--pha-primary) !important;
    color: #ffffff !important;
    cursor: pointer;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.pha-search-form button .pha-ico {
    width: 20px;
    height: 20px;
}

.pha-search-form button:hover {
    background: var(--pha-secondary) !important;
}

.pha-mini-links {
    margin-top: 7px;
    text-align: center;
    font-size: 13px;
    color: var(--pha-faded);
    white-space: nowrap;
    line-height: 1.2;
}

.pha-mini-links a {
    color: var(--pha-faded) !important;
    text-decoration: none !important;
}

.pha-mini-links a:hover {
    color: var(--pha-primary) !important;
}

.pha-mini-links span {
    margin: 0 5px;
}

/* TOP ACTIONS */
.pha-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 21px;
    min-width: 0;
}

.pha-whatsapp-info {
    height: 58px;
    min-width: 245px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px;
    border: 1px solid var(--pha-border);
    border-radius: 9px;
    background: transparent;
    color: var(--pha-heading);
}

.pha-wa-icon {
    width: 38px;
    height: 38px;
    border: 2px solid var(--pha-primary);
    border-radius: 50%;
    color: var(--pha-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.pha-wa-icon .pha-ico {
    width: 18px;
    height: 18px;
}

.pha-whatsapp-info small {
    display: block;
    color: var(--pha-faded);
    font-size: 12px;
    line-height: 1.2;
}

.pha-whatsapp-info strong {
    display: block;
    color: var(--pha-heading);
    font-size: 15px;
    line-height: 1.35;
}

.pha-header-icon-link {
    position: relative;
    min-width: 58px;
    text-align: center;
    text-decoration: none !important;
    color: var(--pha-heading) !important;
    font-size: 13px;
    line-height: 1.2;
}

.pha-header-icon-link > .pha-ico {
    width: 23px;
    height: 23px;
    margin: 0 auto 6px;
    color: var(--pha-heading);
}

.pha-header-icon-link:hover,
.pha-header-icon-link:hover > .pha-ico {
    color: var(--pha-primary) !important;
}

.pha-count {
    position: absolute;
    top: -8px;
    right: 9px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 50%;
    background: var(--pha-primary);
    color: #ffffff;
    font-size: 11px;
    line-height: 17px;
    font-weight: 700;
}

/* NAV AREA */
.pha-header-nav-area {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    background: var(--pha-nav-bg) !important;
    position: relative;
    z-index: auto !important;
    overflow: visible !important;
}

.pha-header-nav {
    height: 58px;
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--pha-nav-bg) !important;
    overflow: visible !important;
    position: relative;
    z-index: auto !important;
}

/* CATEGORY */
.pha-category-wrap {
    position: relative !important;
    flex: 0 0 255px;
    width: 255px;
    height: 44px;
    display: flex;
    align-items: center;
    z-index: 500 !important;
}

.pha-category-wrap::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 44px;
    height: 14px;
}

.pha-category-btn {
    width: 100%;
    height: 44px;
    border: 0 !important;
    border-radius: 9px;
    background: #ffffff;
    color: var(--pha-heading);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px 0 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    line-height: 1 !important;
    white-space: nowrap;
    position: relative !important;
    z-index: 510 !important;
}

.pha-category-left {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.pha-grid-icon {
    width: 32px;
    height: 32px;
    background: var(--pha-primary);
    color: #ffffff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pha-grid-icon .pha-ico {
    width: 18px;
    height: 18px;
}

.pha-category-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: currentColor;
    transition: transform 0.18s ease;
}

.pha-category-arrow .pha-ico {
    width: 12px;
    height: 12px;
}

.pha-category-wrap:hover .pha-category-btn,
.pha-category-wrap.is-open .pha-category-btn {
    background: var(--pha-primary);
    color: #ffffff;
}

.pha-category-wrap:hover .pha-grid-icon,
.pha-category-wrap.is-open .pha-grid-icon {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.pha-category-wrap:hover .pha-category-arrow,
.pha-category-wrap.is-open .pha-category-arrow {
    transform: rotate(180deg);
}

.pha-category-dropdown {
    position: absolute !important;
    top: 54px;
    left: 0;
    width: 255px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 16px 36px rgba(0,0,0,0.22);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    z-index: 520 !important;
}

.pha-category-wrap:hover .pha-category-dropdown,
.pha-category-wrap.is-open .pha-category-dropdown {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.pha-category-dropdown::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 50%;
    width: 16px;
    height: 16px;
    background: #ffffff;
    transform: translateX(-50%) rotate(45deg);
}

.pha-category-dropdown-inner {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #ffffff;
}

.pha-category-dropdown a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--pha-border);
    color: var(--pha-heading) !important;
    text-decoration: none !important;
    font-size: 15px;
    background: #ffffff;
}

.pha-category-dropdown a:last-child {
    border-bottom: 0;
}

.pha-category-dropdown a:hover {
    background: #fff5ef;
    color: var(--pha-primary) !important;
}

.pha-category-dropdown a .pha-ico {
    width: 18px;
    height: 18px;
}

/* MAIN MENU */
.pha-nav-menu-wrap {
    min-width: 0;
    flex: 1 1 auto;
    height: 58px;
    display: flex;
    align-items: center;
    overflow: visible;
    position: relative;
    z-index: auto !important;
}

.pha-menu-hover-pill {
    position: absolute;
    top: 7px;
    left: 0;
    width: 0;
    height: 44px;
    border-radius: 7px;
    background: #ffffff;
    opacity: 0;
    transform: translateX(0);
    transition:
        transform 0.28s cubic-bezier(.22,.9,.25,1),
        width 0.28s cubic-bezier(.22,.9,.25,1),
        opacity 0.18s ease;
    pointer-events: none;
    z-index: 0;
    box-shadow: 0 6px 16px rgba(15, 19, 31, 0.04);
}

.pha-menu {
    position: relative;
    z-index: 2;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 44px;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 7px;
    min-width: 0;
}

.pha-menu > li {
    position: relative;
    height: 44px;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    margin: 0 !important;
    padding: 0 !important;
}

.pha-menu > li > a {
    height: 44px !important;
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px;
    padding: 0 11px !important;
    margin: 0 !important;
    border-radius: 7px;
    color: var(--pha-heading) !important;
    text-decoration: none !important;
    font-size: 15px;
    font-weight: 700;
    line-height: 1 !important;
    white-space: nowrap !important;
    background: transparent !important;
    transition: color 0.2s ease;
}

.pha-menu > li > a:hover,
.pha-menu > li > a.is-current,
.pha-menu > li:hover > a {
    color: var(--pha-primary) !important;
    background: transparent !important;
}

.pha-menu-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.18s ease;
}

.pha-menu-arrow .pha-ico {
    width: 11px;
    height: 11px;
}

.pha-menu > li:hover .pha-menu-arrow {
    transform: rotate(180deg);
}

.pha-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 290px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 16px 36px rgba(0,0,0,0.16);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    z-index: 100;
}

.pha-menu > li:hover .pha-menu-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.pha-menu-dropdown a {
    display: block !important;
    height: auto !important;
    min-height: auto !important;
    padding: 10px 16px !important;
    border-radius: 0 !important;
    color: var(--pha-heading) !important;
    background: #ffffff !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    text-decoration: none !important;
}

.pha-menu-dropdown a:hover {
    color: var(--pha-primary) !important;
    background: #fff5ef !important;
}

/* RIGHT NAV */
.pha-nav-right {
    flex: 0 0 auto;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    white-space: nowrap;
    overflow: visible;
    position: relative;
    z-index: auto !important;
}

/* LANGUAGE */
.pha-lang-switcher {
    position: relative !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 60 !important;
}

.pha-lang-inline {
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    white-space: nowrap !important;
}

.pha-lang-item {
    height: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    color: var(--pha-heading) !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
}

.pha-lang-item:hover {
    color: var(--pha-primary) !important;
}

.pha-lang-flag {
    width: auto !important;
    min-width: 24px !important;
    height: 24px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
    font-size: 22px !important;
    line-height: 1 !important;
    flex: 0 0 auto !important;
}

.pha-lang-name {
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1 !important;
}

.pha-lang-dropdown {
    display: none !important;
    position: relative !important;
    height: 44px !important;
    align-items: center !important;
    justify-content: center !important;
}

.pha-lang-btn {
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 14px !important;
    border: 1px solid var(--pha-primary) !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    color: var(--pha-primary) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    box-shadow: none !important;
    white-space: nowrap !important;
}

.pha-lang-btn .pha-ico {
    width: 14px !important;
    height: 14px !important;
    flex: 0 0 auto !important;
}

.pha-lang-menu {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    left: auto !important;
    width: 190px !important;
    max-width: 190px !important;
    padding: 8px !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    box-shadow: 0 16px 36px rgba(0,0,0,0.18) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(8px) !important;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease !important;
    z-index: 120 !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 2px !important;
}

.pha-lang-switcher.is-open .pha-lang-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.pha-lang-menu .pha-lang-item {
    width: 100% !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 10px !important;
    border-radius: 8px !important;
    justify-content: flex-start !important;
    text-align: left !important;
    color: var(--pha-heading) !important;
}

.pha-lang-menu .pha-lang-item:hover {
    background: #fff5ef !important;
    color: var(--pha-primary) !important;
}

.pha-lang-switcher.is-dropdown .pha-lang-inline {
    display: none !important;
}

.pha-lang-switcher.is-dropdown .pha-lang-dropdown {
    display: flex !important;
}

/* SALE */
.pha-sale {
    position: relative;
    overflow: hidden;
    height: 42px;
    min-height: 42px;
    padding: 0 18px;
    background: var(--pha-heading);
    color: #ffffff !important;
    border-radius: 10px;
    border: 1px solid var(--pha-heading);
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 800;
    line-height: 1 !important;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pha-sale span {
    position: relative;
    z-index: 2;
}

.pha-sale::before {
    content: "";
    position: absolute;
    inset: 0;
    background: #ffffff;
    transform: translateY(-100%);
    transition: transform 0.22s ease;
}

.pha-sale:hover {
    color: var(--pha-heading) !important;
}

.pha-sale:hover::before {
    transform: translateY(0);
}

/* CATEGORY DARK OVERLAY */
.pha-category-screen-overlay {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(15, 19, 31, 0.78) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    z-index: 400 !important;
    transition: opacity 0.18s ease, visibility 0.18s ease !important;
}

.pha-custom-header.category-open .pha-category-screen-overlay {
    opacity: 0.45 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* overlay is z-index 400, only category is 500+, rest of header stays below overlay */
.pha-custom-header.category-open .pha-category-wrap {
    z-index: 500 !important;
}

.pha-custom-header.category-open .pha-category-btn {
    z-index: 510 !important;
}

.pha-custom-header.category-open .pha-category-dropdown {
    z-index: 520 !important;
}

.pha-custom-header.category-open .pha-category-dropdown,
.pha-custom-header.category-open .pha-category-dropdown *,
.pha-custom-header.category-open .pha-category-dropdown-inner,
.pha-custom-header.category-open .pha-category-dropdown a,
.pha-custom-header.category-open .pha-category-btn,
.pha-custom-header.category-open .pha-category-btn * {
    opacity: 1 !important;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* MOBILE BASIC */
.pha-mobile-header {
    display: none;
}

@media (max-width: 1280px) {
    .pha-header-main {
        grid-template-columns: 220px minmax(310px, 1fr) auto;
        gap: 14px;
    }

    .pha-header-logo img {
        max-width: 220px;
    }

    .pha-whatsapp-info {
        min-width: 215px;
    }

    .pha-header-actions {
        gap: 13px;
    }

    .pha-category-wrap {
        flex-basis: 235px;
        width: 235px;
    }

    .pha-menu {
        gap: 3px;
    }

    .pha-menu > li > a {
        font-size: 14px;
        padding: 0 7px !important;
    }
}

@media (max-width: 1180px) {
    .pha-header-actions .pha-header-icon-link:nth-of-type(2),
    .pha-header-actions .pha-header-icon-link:nth-of-type(3) {
        display: none;
    }
}

@media (max-width: 991px) {
    .pha-header-desktop {
        display: none;
    }

    .pha-mobile-header {
        display: block;
        background: #ffffff;
    }

    .pha-mobile-main {
        height: 72px;
        display: grid;
        grid-template-columns: 42px 1fr 78px;
        align-items: center;
        gap: 12px;
        padding: 0 14px;
    }

    .pha-mobile-menu-btn {
        width: 42px;
        height: 42px;
        border: 0;
        border-radius: 8px;
        background: var(--pha-primary);
        color: #ffffff;
        font-size: 24px;
        cursor: pointer;
    }

    .pha-mobile-logo img {
        max-height: 54px;
        width: auto;
        display: block;
        margin: 0 auto;
    }

    .pha-mobile-icons {
        display: flex;
        justify-content: flex-end;
        gap: 12px;
    }

    .pha-mobile-icons a {
        color: var(--pha-heading) !important;
        text-decoration: none !important;
        position: relative;
    }

    .pha-mobile-icons .pha-ico {
        width: 22px;
        height: 22px;
    }

    .pha-mobile-search {
        padding: 0 14px 12px;
    }

    .pha-mobile-nav {
        display: none;
        background: #ffffff;
        border-top: 1px solid var(--pha-border);
        padding: 10px 14px 16px;
    }

    .pha-mobile-nav.is-open {
        display: block;
    }

    .pha-mobile-nav a,
    .pha-mobile-nav span {
        display: block;
        padding: 12px 0;
        border-bottom: 1px solid var(--pha-border);
        color: var(--pha-heading) !important;
        text-decoration: none !important;
        font-weight: 600;
    }
}

/* IMPREZA SAFETY */
.l-header,
.l-subheader,
.l-subheader-h,
.l-header .w-html,
.l-header .w-html-h {
    overflow: visible !important;
}

.l-header .l-subheader.at_middle,
.l-header.sticky .l-subheader.at_middle {
    min-height: 152px !important;
    height: 152px !important;
}

html,
body {
    overflow-x: hidden;
}

/* Legal company name beneath the site logo. */
.pha-header-logo { flex-direction: column; align-items: flex-start; }
.pha-header-logo .yarep-company-name { display:block; max-width:245px; margin-top:5px; color:#303030; font-size:11px; font-weight:500; line-height:1.3; overflow-wrap:anywhere; }
