/* ===== GARDULIS CUSTOM HEADER STYLES ===== */

.custom-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #21493a;
    color: #fff;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

/* Containers */

/* ===== DESKTOP HEADER ===== */
.custom-header__desktop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 50px;
    gap: 60px;
}

.custom-header__desktop .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 50px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    color: #fff;
}


.header__left {
    flex-shrink: 0;
}

.header__nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.header__logo img {
    height: 105px;
    display: block;
}

/* Navigation */
.header__nav .nav__list {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 40px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav__link {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.3px;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

@media (max-width: 1230px) {
    .nav__link {
        font-size: 16px;
        gap: 10px;
    }
    /* Navigation */
    .header__nav .nav__list {
        gap: 20px;
    }
    .custom-header__desktop .container {
        gap: 20px;
    }

    .header__right {
        gap: 20px;
    }

    .icon {
        width: 22px;
        height: 22px;
    }
}

.nav__link:hover,
.search__toggle:hover,
.icon:hover {
    color: #d2d2d2;
}

/* Right icons + search */
.header__right {
    display: flex;
    align-items: center;
    gap: 22px;
}

.header-search.is-active .custom-header__desktop .container {
    gap: 800px;
    background-color:red;
}

.icon {
    position: relative;
    width: 28px;
    height: 30px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.icon svg {
    width: 100%;
    height: 100%;
    overflow: visible;
    display: block;
}

.badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: #dcc5b6;
    color: #21493a;
    border-radius: 999px;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    padding: 0 4px;
    font-size: 12px;
    font-weight: 700;
    display: inline-block;
}

.icon .badge {
    transition: opacity 0.2s ease, transform 0.2s ease;
    color: #fff;
}

.icon .badge:empty {
    display: none;
}

.total {
    font-weight: 400;
    font-size: 18px;
    white-space: nowrap;
}

/* Inline expanding search (desktop) */
.header-search {
    display: inline-flex;
    align-items: center;
    position: relative;
}

.search__toggle {
    background: none;
    border: 0;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.search__form {
    display: inline-flex;
    align-items: center;
    background: transparent;
    border: 2px solid #fff;
    border-radius: 8px;
    height: 36px;
    overflow: hidden;
    width: 0;
    opacity: 0;
    margin-left: 10px;
    transition: width .28s ease, opacity .2s ease, padding .2s ease;
    padding: 0;
}

.header-search.is-active .search__form {
    width: 220px;
    opacity: 1;
    padding: 0 6px;
}

.header-search.is-active .custom-header__desktop .container {
    gap: 16px;
}

.search__input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: #fff;
    padding: 0 8px;
    font-size: 15px;
}

.search__input::placeholder {
    color: rgba(255,255,255,.7);
}

.search__btn {
    background: none;
    border: 0;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ===== MOBILE HEADER ===== */
.custom-header__mobile {
    display: none;
    position: relative;
}

.custom-header__mobile > div:not(.header-search) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    position: relative;
}

.custom-header__mobile .header__left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.custom-header__mobile .header__right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.burger {
    width: 28px;
    height: 22px;
    border: none;
    background: none;
    cursor: pointer;
    display: inline-flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
}

.burger span {
    height: 3px;
    background: #fff;
    display: block;
    width: 100%;
    border-radius: 2px;
}

.custom-header__mobile .header__logo {
    display: flex;
    align-self: center;
}

.custom-header__mobile .header__logo img {
    height: 52px;
    display: block;
}

.custom-header__mobile .icon {
    width: 28px;
    height: 28px;
}

/* ===== MOBILE SEARCH (smooth dropdown) ===== */
.header-search--mobile {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border-top: 1px solid rgba(255,255,255,0.15);
    padding: 12px 20px 16px;
    opacity: 0;
    transform: translateY(-10px);
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1200;
    pointer-events: none;
}

.header-search--mobile.is-active {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
}

.header-search--mobile .search__form {
    border: 2px solid #fff;
    border-radius: 8px;
    padding: 8px 12px;
    height: 44px;
    min-width: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-search--mobile .search__input {
    flex: 1;
    color: #fff;
    background: transparent;
    border: 0;
    font-size: 16px;
    outline: none;
    padding: 0 8px;
}

.header-search--mobile .search__input::placeholder {
    color: rgba(255,255,255,.7);
}

.header-search--mobile .search__btn {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
}

/* kirotech-searchbar widget toggle (mirrors .search__form behavior) */
.header-search .kirotech-searchbar {
    width: 0;
    opacity: 0;
    overflow: hidden;
    margin-left: 10px;
    transition: width .28s ease, opacity .2s ease;
}

.header-search.is-active .kirotech-searchbar {
    width: 220px;
    opacity: 1;
}

.header-search--mobile .kirotech-searchbar {
    width: 100% !important;
    opacity: 1;
    overflow: visible;
    margin-left: 0;
}

.header-search--mobile .kirotech-searchbar form,
.header-search--mobile .kirotech-searchbar__input {
    width: 100%;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1020px) {
    .custom-header__desktop {
        display: none;
    }
    .custom-header__mobile {
        display: flex;
        height: 65px;
        width: 100%;
        justify-content: space-between;
    }
}

@media (min-width: 1021px) {
    .custom-header__mobile {
        display: none;
    }
}

/* ===== MOBILE SIDE MENU (WHITE LEFT PANEL + DARK OVERLAY) ===== */
.mobile-side-menu {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0);
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    transition: background .35s ease, opacity .35s ease, visibility .35s ease;
}

.mobile-side-menu__panel {
    position: absolute;
    top: 0;
    left: -60vw;
    width: 60vw;
    max-width: 480px;
    height: 100%;
    background: #fff;
    color: #111;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 25px rgba(0,0,0,0.35);
    transition: left .35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Close button */
.mobile-side-menu__close {
    background: none;
    border: none;
    color: #111;
    font-size: 32px;
    align-self: flex-end;
    cursor: pointer;
    margin-bottom: 28px;
    line-height: 1;
}

/* Menu items */
.mobile-side-menu__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-side-menu__link {
    color: #111;
    text-decoration: none;
    font-size: 18px;
    transition: color 0.25s ease;
}

.mobile-side-menu__link:hover {
    color: #21493a;
}

/* Active state */
.mobile-side-menu.is-active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    background: rgba(0,0,0,0.55);
}

.mobile-side-menu.is-active .mobile-side-menu__panel {
    left: 0;
}

/* Scroll lock */
html.menu-open,
body.menu-open {
    overflow: hidden;
    height: 100%;
}

/* ===== ACCOUNT DROPDOWN ===== */
.signin {
    position: relative;
}

.account-toggle {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    height: 30px;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.account-toggle svg {
    height: 100%;
    width: auto;
    display: block;
    overflow: visible;
}

.account-toggle:hover {
    opacity: 0.8;
}

.account-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #21493a;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    list-style: none;
    padding: 8px 0;
    margin: 0;
    min-width: 160px;
    z-index: 1100;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

.signin.is-open .account-dropdown {
    display: block;
}

.account-dropdown a {
    display: block;
    padding: 10px 18px;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    font-size: 15px;
    transition: background 0.15s ease;
}

.account-dropdown a:hover {
    background: rgba(255,255,255,0.1);
}

@media (max-width: 1230px) {
    .account-toggle {
        height: 20px;
    }
}