/* ========================================
   IrenFix Site Header
======================================== */

:root {
    --irenfix-header-height: 0px;
}

html {
    scroll-padding-top: calc(var(--irenfix-header-height) + 1rem);
}

body {
    padding-top: var(--irenfix-header-height);
}

.irenfix-fixed-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    width: 100%;
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 0.3rem 1rem rgba(17, 24, 39, 0.05);
    z-index: 1070;
}

/* Top row */

.irenfix-header-top {
    background: #fff;
    padding: 0.8rem 0;
}

.irenfix-header-top-inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    width: 100%;
}

/* Logo */

.irenfix-header-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.irenfix-header-logo img {
    display: block;
    width: auto;
    max-width: 150px;
    height: 46px;
    object-fit: contain;
}

/* Search */

.irenfix-header-search {
    flex: 1;
    min-width: 0;
}

.irenfix-search-form {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 720px;
    height: 48px;
    background: #f3f4f6;
    border: 1px solid transparent;
    border-radius: 0.75rem;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.irenfix-search-form:focus-within {
    background: #fff;
    border-color: rgba(var(--bs-primary-rgb), 0.45);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.08);
}

.irenfix-search-button {
    width: 48px;
    height: 100%;
    flex-shrink: 0;
    border: 0;
    background: transparent;
    color: #677788;
    font-size: 1.1rem;
}

.irenfix-search-input {
    flex: 1;
    width: 100%;
    height: 100%;
    padding: 0 0.25rem 0 1rem;
    border: 0;
    outline: 0;
    background: transparent;
    color: #1e2022;
    font-family: inherit;
    font-size: 0.92rem;
}

.irenfix-search-input::placeholder {
    color: #8c98a4;
}

/* Actions */

.irenfix-header-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-shrink: 0;
}

.irenfix-header-action-button {
    position: relative;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.65rem;
    background: #fff;
    color: #3f4654;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
    transition:
        border-color 0.15s ease,
        color 0.15s ease,
        background-color 0.15s ease;
}

button.irenfix-header-action-button {
    cursor: pointer;
}

.irenfix-header-action-button:hover {
    color: var(--bs-primary);
    border-color: rgba(var(--bs-primary-rgb), 0.35);
    background: rgba(var(--bs-primary-rgb), 0.04);
}

.irenfix-header-action-button > i {
    font-size: 1.25rem;
}

.irenfix-cart-button {
    padding-left: 0.8rem;
}

.irenfix-cart-count {
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.3rem;
    border-radius: 20px;
    background: var(--bs-primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
}

/* Mobile toggler */

.irenfix-mobile-menu-button {
    width: 44px;
    height: 44px;
    display: none;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.65rem;
    background: #fff;
    color: #3f4654;
    font-size: 1.5rem;
}

/* Bottom navigation */

.irenfix-header-navigation {
    background: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.irenfix-main-navigation {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    direction: rtl;
    gap: 0.25rem;
}

.irenfix-main-navigation > .nav-item > .nav-link {
    position: relative;
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 0.7rem 0.8rem;
    color: #3f4654;
    font-size: 0.9rem;
    font-weight: 600;
}

.irenfix-main-navigation > .nav-item > .nav-link:hover,
.irenfix-main-navigation > .nav-item > .nav-link.active {
    color: var(--bs-primary);
}

.irenfix-main-navigation > .nav-item > .nav-link.active::after {
    content: "";
    position: absolute;
    right: 0.8rem;
    left: 0.8rem;
    bottom: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--bs-primary);
}

/* Dropdown */

.irenfix-header-actions .dropdown-menu {
    min-width: 220px;
    padding: 0.6rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.8rem;
    box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.12);
    text-align: right;
}

.irenfix-header-actions .dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.65rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.88rem;
}

.irenfix-header-container {
    width: 100%;
    max-width: none;
    padding-right: 0.25rem;
    padding-left: 0.75rem;
}

.irenfix-header-logo {
    margin-right: 0;
    padding-right: 0.5rem;
}

.irenfix-header-logo img {
    margin-right: 0;
}

.irenfix-main-navigation {
    margin-right: 0;
    padding-right: 0;
    justify-content: flex-start;
}

.irenfix-main-navigation > .nav-item:first-child > .nav-link,
.irenfix-main-navigation > .nav-item:first-child > button {
    padding-right: 0.25rem;
}

/* Tablet and mobile */

@media (max-width: 991.98px) {
    .irenfix-header-top-inner {
        gap: 0.75rem;
        flex-wrap: wrap;
    }

    .irenfix-header-logo {
        order: 1;
    }

    .irenfix-header-actions {
        order: 2;
        margin-right: auto;
    }

    .irenfix-header-search {
        order: 3;
        flex-basis: 100%;
    }

    .irenfix-search-form {
        max-width: none;
    }

    .irenfix-mobile-menu-button {
        display: inline-flex;
    }

    .irenfix-header-navigation .navbar-collapse {
        padding: 0.5rem 0 1rem;
    }

    .irenfix-main-navigation {
        display: block;
    }

    .irenfix-main-navigation > .nav-item {
        width: 100%;
    }

    .irenfix-main-navigation > .nav-item > .nav-link {
        width: 100%;
        min-height: 44px;
        padding: 0.7rem 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }

    .irenfix-main-navigation > .nav-item > .nav-link.active::after {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .irenfix-header-top {
        padding: 0.6rem 0;
    }

    .irenfix-header-logo img {
        max-width: 112px;
        height: 38px;
    }

    .irenfix-header-actions {
        gap: 0.35rem;
    }

    .irenfix-header-action-button {
        width: 42px;
        min-height: 42px;
        padding: 0;
    }

    .irenfix-action-text {
        display: none;
    }

    .irenfix-cart-count {
        position: absolute;
        top: -5px;
        left: -5px;
    }

    .irenfix-mobile-menu-button {
        width: 42px;
        height: 42px;
    }

    .irenfix-search-form {
        height: 44px;
    }

}
