:root { --site-header-offset: 76px; }
:root:has(.header-notice) { --site-header-offset: 110px; }

.site-header {
    --shell-brand: var(--accent);
    --shell-text: #252133;
    position: sticky;
    z-index: 10;
    top: 0;
    color: var(--shell-text);
    background: #fff;
    box-shadow: 0 1px 0 #23194412;
}

.header-notice {
    display: grid;
    align-items: center;
    height: 34px;
    color: #fff;
    background: linear-gradient(105deg, var(--accent), var(--accent-deep) 77%, #151029);
    text-align: center;
}

.header-notice p {
    overflow: hidden;
    margin-block: 0;
    font-size: .79rem;
    font-weight: 560;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-notice a { color: inherit; text-underline-offset: .18em; }
.header-notice a:hover { text-decoration-thickness: 2px; }
.header-notice a:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

.header-inner {
    display: grid;
    grid-template-columns: clamp(13rem, 19vw, 15rem) minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(10px, 1.55vw, 24px);
    min-height: 76px;
}

.site-header .site-brand {
    min-width: 0;
    max-width: 100%;
    min-height: 50px;
    gap: 8px;
    color: var(--shell-brand);
    font-size: clamp(1.21rem, 2.05vw, 1.62rem);
    font-weight: 695;
    line-height: 1;
    letter-spacing: -.065em;
}

.header-brand-name {
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-header .site-brand .brand-word { margin-left: .17em; color: inherit; font-weight: 510; }
.brand-symbol { display: inline-grid; flex: none; width: 30px; height: 32px; place-items: center; }
.brand-symbol .ui-icon { width: 30px; height: 30px; stroke-width: 1.95; }
.header-logo {
    display: block;
    width: auto;
    max-width: 100%;
    height: var(--header-logo-height, 36px);
    object-fit: contain;
    object-position: left center;
}
.header-logo[data-size=compact] { --header-logo-height: 30px; }
.header-logo[data-size=large] { --header-logo-height: 48px; }

.site-nav { display: flex; align-items: center; justify-content: center; gap: clamp(5px, .7vw, 8px); min-width: 0; }
.header-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 0;
    min-height: 45px;
    max-width: clamp(92px, 10vw, 152px);
    padding-inline: clamp(7px, .78vw, 10px);
    border-radius: 10px;
    color: #3c3749;
    font-size: .93rem;
    font-weight: 560;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.header-item > span { min-width: 0; overflow-wrap: anywhere; }
.header-demo > span, .header-account > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-item:is(:hover, [aria-current]) { color: var(--shell-brand); background: var(--tint); }

.header-actions { display: flex; grid-column: 3; align-items: center; justify-self: end; gap: 9px; min-width: 0; max-width: 100%; }
.header-cart, .header-account, .header-demo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    max-width: 140px;
    min-width: 0;
    min-height: 44px;
    padding: 7px 13px;
    border: 1px solid #e7e0f4;
    border-radius: 999px;
    font-size: .87rem;
    font-weight: 595;
    line-height: 1.18;
    text-decoration: none;
    white-space: nowrap;
}
.header-cart { position: relative; flex: none; color: var(--shell-brand); background: var(--tint); }
.header-cart:is(:hover, [aria-current]) { border-color: #c8b9fb; }
.header-cart .ui-icon { width: 18px; height: 18px; }
.header-cart-count {
    display: grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding-inline: 4px;
    border-radius: 999px;
    background: var(--shell-brand);
    color: #fff;
    font-size: .71rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.header-account { color: #34294e; background: #fff; }
.header-account .ui-icon { width: 17px; height: 17px; }
.header-account:is(:hover, [aria-current]) { color: var(--shell-brand); border-color: #d7cbfc; background: #f6f2ff; }
.header-demo {
    padding-inline: 15px;
    color: #fff;
    border-color: transparent;
    background: linear-gradient(105deg, var(--accent), var(--accent-deep));
    font-weight: 660;
}
.header-demo:is(:hover, [aria-current]) { background: linear-gradient(105deg, var(--accent-strong), var(--accent-deep)); }
.header-demo .ui-icon { width: 15px; height: 15px; }
.header-language {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 44px;
    min-height: 44px;
    padding-inline: 10px;
    border: 1px solid #e7e0f4;
    border-radius: 999px;
    color: var(--shell-text);
    font-size: .81rem;
    font-weight: 650;
    text-decoration: none;
}
.header-language:hover { border-color: #d7cbfc; color: var(--shell-brand); background: var(--tint); }
.header-language:focus-visible { outline: 2px solid var(--shell-brand); outline-offset: 2px; }
.header-language .ui-icon { width: 16px; height: 16px; }
.header-mobile-cta, .menu-toggle { display: none; }
.menu-toggle .menu-toggle-close,
.menu-toggle[aria-expanded=true] .menu-toggle-open { display: none; }
.menu-toggle[aria-expanded=true] .menu-toggle-close { display: block; }

.site-menu-shade {
    position: fixed;
    z-index: -1;
    inset: var(--site-header-offset) 0 0;
    display: none;
    background: #21193930;
}
@media (min-width: 900px) {
    .header-item > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@media (min-width: 900px) and (max-width: 1250px) {
    .header-inner { width: calc(100% - 48px); }
}

@media (min-width: 900px) and (max-width: 1120px) {
    .header-inner { grid-template-columns: 190px minmax(0, 1fr) auto; gap: 10px; }
    .site-header .site-brand { font-size: 1.2rem; }
    .site-nav { gap: 3px; }
    .header-item { padding-inline: 5px; }
    .header-actions { gap: 5px; }
    .header-account, .header-demo { gap: 5px; padding-inline: 9px; font-size: .82rem; }
}

@media (max-width: 1190px) {
    .header-cart { width: 44px; padding: 0; }
    .header-cart-label { display: none; }
    .header-cart-count { position: absolute; inset: -4px -4px auto auto; }
}

@media (max-width: 899px) {
    :root { --site-header-offset: 66px; }
    :root:has(.header-notice) { --site-header-offset: 100px; }
    .site-header:not([data-mobile-menu]) { position: relative; }
    .header-notice p, .header-inner { width: calc(100% - 30px); }
    .header-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; min-height: 66px; }
    .site-header .site-brand { gap: 5px; font-size: clamp(1.04rem, 4.2vw, 1.5rem); }
    .brand-symbol, .brand-symbol .ui-icon { width: 26px; height: 26px; }
    .header-logo { --header-logo-height: 34px; }
    .header-logo[data-size=compact] { --header-logo-height: 28px; }
    .header-logo[data-size=large] { --header-logo-height: 42px; }
    .header-actions { grid-column: 2; grid-row: 1; gap: 6px; }
    .header-account, .header-demo { max-width: 138px; }
    .site-nav { grid-column: 1 / -1; grid-row: 2; display: grid; gap: 4px; padding-block: 8px 16px; }
    .site-header[data-mobile-menu] .site-nav { display: none; }
    .site-header:has(.site-nav.is-open) .site-menu-shade { display: block; }
    .site-header[data-mobile-menu] .site-nav.is-open {
        position: absolute;
        z-index: 1;
        inset: 100% 0 auto;
        display: grid;
        justify-content: stretch;
        align-content: start;
        max-height: calc(100dvh - var(--site-header-offset));
        overflow: auto;
        overscroll-behavior: contain;
        padding: 12px 15px 19px;
        background: #fff;
        box-shadow: 0 13px 23px #21164724;
    }
    .header-item { justify-content: space-between; max-width: none; min-height: 47px; padding-inline: 12px; text-align: left; }
    .menu-toggle {
        display: grid;
        flex: none;
        width: 44px;
        height: 44px;
        padding: 0;
        place-items: center;
        border: 1px solid #e7e0f4;
        border-radius: 12px;
        background: #fff;
        color: #34294e;
    }
    .menu-toggle .ui-icon { width: 21px; height: 21px; }
    .menu-toggle[aria-expanded=true] { color: var(--shell-brand); background: #f4edff; }
}

@media (max-width: 700px) {
    .site-header:has(.site-nav) .header-demo { display: none; }
    .site-nav .header-mobile-cta { display: flex; color: var(--shell-brand); background: #f1edff; }
    .header-demo { width: 44px; padding: 0; }
    .header-demo > span { display: none; }
}

@media (min-width: 900px) and (max-width: 980px), (max-width: 560px) {
    .header-account { width: 44px; padding: 0; }
    .header-account > span { display: none; }
}

@media (max-width: 540px) {
    .header-language { padding-inline: 0; }
    .header-language .ui-icon { display: none; }
}

@media (max-width: 385px) {
    .header-inner, .header-notice p { width: calc(100% - 20px); }
    .site-header .site-brand { font-size: 1rem; }
    .site-header .site-brand .brand-word { display: block; margin-left: 0; }
}
