:root {
    --platform-header-height: 72px;
    --platform-header-bg: rgba(10, 10, 11, .96);
    --platform-header-surface: #171719;
    --platform-header-surface-hover: #202023;
    --platform-header-line: rgba(255, 255, 255, .1);
    --platform-header-text: #f7f7f8;
    --platform-header-muted: rgba(255, 255, 255, .58);
    --platform-header-accent: #ff6a00;
    --platform-header-accent-soft: rgba(255, 106, 0, .13);
}

.platform-header,
.platform-header * {
    box-sizing: border-box;
}

.platform-header {
    position: fixed;
    z-index: 1100;
    inset: 0 auto auto 0;
    width: 100%;
    height: var(--platform-header-height);
    border-bottom: 1px solid var(--platform-header-line);
    background: var(--platform-header-bg);
    color: var(--platform-header-text);
    box-shadow: 0 10px 34px rgba(0, 0, 0, .28);
}

/* The header is removed from normal flow while fixed, so reserve its height for every storefront page. */
body.storefront {
    padding-top: var(--platform-header-height);
}

.platform-header.is-navigation-open {
    z-index: 1500;
}

/* Cookie notice is shown below the fixed header instead of underneath it. */
body.storefront .cookie-notice {
    top: calc(var(--platform-header-height) + max(10px, env(safe-area-inset-top)));
}

.platform-header__grid {
    display: grid;
    grid-template-columns: minmax(154px, 190px) max-content minmax(190px, 1fr) max-content;
    align-items: center;
    gap: clamp(10px, 1.25vw, 20px);
    width: 100%;
    max-width: 1600px;
    height: 100%;
    margin: 0 auto;
    padding: 0 clamp(14px, 1.8vw, 28px);
}

.platform-header__brand {
    display: flex;
    min-width: 0;
    max-width: 100%;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    gap: 3px;
    overflow: hidden;
    color: var(--platform-header-text);
    text-decoration: none;
    white-space: nowrap;
}

.platform-header__brand strong {
    display: block;
    line-height: 1;
    font-size: 17px;
    font-weight: 900;
    letter-spacing: .15em;
}

.platform-header__brand img {
    display: block;
    width: min(142px, 100%);
    height: auto;
    max-height: 38px;
    object-fit: contain;
    object-position: left center;
}

.platform-header__brand span {
    display: block;
    line-height: 1;
    color: var(--platform-header-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .13em;
}

.platform-header__primary {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
}

.platform-header__nav-link {
    display: inline-flex;
    min-height: 38px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    padding: 8px 9px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: rgba(255, 255, 255, .72);
    font-size: 12px;
    font-weight: 760;
    line-height: 1;
    text-decoration: none;
    transition: border-color .16s ease, background .16s ease, color .16s ease;
}

.platform-header__nav-link:hover,
.platform-header__nav-link.is-active,
.platform-header__more[open] > .platform-header__nav-link {
    border-color: rgba(255, 106, 0, .34);
    background: var(--platform-header-accent-soft);
    color: #ff9b55;
}

.platform-header__more {
    position: relative;
    flex: 0 0 auto;
}

.platform-header__more > summary {
    list-style: none;
    cursor: pointer;
}

.platform-header__more > summary::-webkit-details-marker {
    display: none;
}

.platform-header__more-menu,
.platform-profile__menu {
    position: absolute;
    z-index: 1120;
    top: calc(100% + 12px);
    padding: 8px;
    border: 1px solid var(--platform-header-line);
    border-radius: 16px;
    background: rgba(19, 19, 21, .99);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .5);
}

.platform-header__more-menu {
    left: 0;
    width: 210px;
}

.platform-header__more-menu a,
.platform-profile__links a,
.platform-profile__links button,
.platform-profile__workspace {
    display: flex;
    width: 100%;
    min-height: 39px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: rgba(255, 255, 255, .8);
    font: inherit;
    font-size: 12px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.platform-header__more-menu a:hover,
.platform-profile__links a:hover,
.platform-profile__links button:hover,
.platform-profile__workspace:hover:not(:disabled) {
    border-color: var(--platform-header-line);
    background: var(--platform-header-surface-hover);
    color: #fff;
}

.platform-header__search {
    display: grid;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    height: 42px;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 0 11px;
    border: 1px solid var(--platform-header-line);
    border-radius: 12px;
    background: rgba(255, 255, 255, .035);
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.platform-header__search:focus-within {
    border-color: rgba(255, 106, 0, .65);
    background: rgba(255, 255, 255, .055);
    box-shadow: 0 0 0 3px var(--platform-header-accent-soft);
}

.platform-header__search svg,
.platform-header__icon-button svg,
.platform-profile__trigger > svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.platform-header__search svg {
    color: var(--platform-header-muted);
}

.platform-header__search input {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    height: 38px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--platform-header-text);
    font: inherit;
    font-size: 13px;
}

.platform-header__search input::placeholder {
    color: rgba(255, 255, 255, .4);
}

.platform-header__search kbd {
    padding: 3px 6px;
    border: 1px solid var(--platform-header-line);
    border-radius: 6px;
    background: rgba(255, 255, 255, .04);
    color: var(--platform-header-muted);
    font: inherit;
    font-size: 9px;
    white-space: nowrap;
}

.platform-header__actions,
.platform-header__icon-group {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
}

.platform-header__actions {
    min-width: 0;
    gap: 8px;
}

.platform-header__icon-group {
    gap: 5px;
}

.platform-header__icon-button {
    position: relative;
    display: inline-grid;
    width: 40px;
    min-width: 40px;
    height: 40px;
    place-items: center;
    padding: 0;
    border: 1px solid var(--platform-header-line);
    border-radius: 11px;
    background: rgba(255, 255, 255, .035);
    color: rgba(255, 255, 255, .76);
    text-decoration: none;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, color .16s ease;
}

.platform-header__icon-button:hover {
    border-color: rgba(255, 106, 0, .44);
    background: var(--platform-header-accent-soft);
    color: #ff9b55;
}

.platform-header__count {
    position: absolute;
    top: -5px;
    right: -5px;
    display: grid;
    min-width: 18px;
    height: 18px;
    place-items: center;
    padding: 0 4px;
    border: 2px solid #0b0b0c;
    border-radius: 999px;
    background: var(--platform-header-accent);
    color: #fff;
    font-size: 9px;
    font-weight: 900;
    line-height: 1;
}

.platform-header__seller-form,
.platform-profile__form {
    margin: 0;
}

.platform-header__seller {
    display: inline-flex;
    min-width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 11px;
    border: 1px solid rgba(255, 106, 0, .42);
    border-radius: 11px;
    background: var(--platform-header-accent-soft);
    color: #ff9b55;
    font: inherit;
    font-size: 11px;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.platform-header__seller span {
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .08em;
}

.platform-header__seller strong {
    font-size: 11px;
}

.platform-header__shop-menu{
    position:relative;
    flex:0 0 auto;
}

.platform-header__shop-menu > summary.platform-header__seller{
    list-style:none;
    width:auto;
    min-width:0;
    gap:6px;
    padding-inline:12px;
}

.platform-header__shop-menu > summary.platform-header__seller::-webkit-details-marker{
    display:none;
}

.platform-header__shop-menu > summary.platform-header__seller svg{
    width:14px;
    height:14px;
    fill:none;
    stroke:currentColor;
    stroke-linecap:round;
    stroke-linejoin:round;
    stroke-width:1.8;
    transition:transform .16s ease;
}

.platform-header__shop-menu[open] > summary.platform-header__seller svg{
    transform:rotate(180deg);
}

.platform-header__shop-dropdown{
    position:absolute;
    z-index:1120;
    top:calc(100% + 12px);
    right:0;
    width:min(260px, calc(100vw - 24px));
    max-height:calc(100vh - 92px);
    overflow-y:auto;
    padding:8px;
    border:1px solid var(--platform-header-line);
    border-radius:16px;
    background:rgba(19,19,21,.99);
    box-shadow:0 24px 70px rgba(0,0,0,.5);
}

.platform-header__shop-heading{
    padding:8px 10px 6px;
    color:var(--platform-header-muted);
    font-size:10px;
    font-weight:800;
    letter-spacing:.1em;
    text-transform:uppercase;
}

.platform-header__shop-link{
    display:flex;
    width:100%;
    min-height:37px;
    align-items:center;
    padding:8px 10px;
    border:1px solid transparent;
    border-radius:10px;
    background:transparent;
    color:rgba(255,255,255,.8);
    font:inherit;
    font-size:12px;
    text-align:left;
    text-decoration:none;
    cursor:pointer;
}

.platform-header__shop-link:hover{
    border-color:var(--platform-header-line);
    background:var(--platform-header-surface-hover);
    color:#fff;
}

.platform-profile {
    position: relative;
    flex: 0 0 auto;
}

.platform-profile > summary {
    list-style: none;
}

.platform-profile > summary::-webkit-details-marker {
    display: none;
}

.platform-profile__trigger {
    display: grid;
    width: 150px;
    max-width: 150px;
    min-width: 142px;
    height: 44px;
    grid-template-columns: 32px minmax(0, 1fr) 14px;
    align-items: center;
    gap: 8px;
    padding: 5px 8px 5px 6px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--platform-header-text);
    cursor: pointer;
}

.platform-profile__trigger:hover,
.platform-profile[open] .platform-profile__trigger,
.platform-profile__trigger.is-active {
    border-color: var(--platform-header-line);
    background: rgba(255, 255, 255, .04);
}

.platform-profile__avatar {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    overflow: hidden;
    border-radius: 10px;
    background: linear-gradient(145deg, #ff7617, #4b1d00);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.platform-profile__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.platform-profile__copy {
    display: block;
    min-width: 0;
}

.platform-profile__copy strong,
.platform-profile__copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.platform-profile__copy strong {
    font-size: 11px;
}

.platform-profile__copy small {
    margin-top: 2px;
    color: var(--platform-header-muted);
    font-size: 9px;
}

.platform-profile__trigger > svg {
    width: 14px;
    height: 14px;
    color: var(--platform-header-muted);
}

.platform-profile__menu {
    right: 0;
    width: min(310px, calc(100vw - 24px));
    max-height: calc(100vh - 92px);
    overflow-y: auto;
}

.platform-profile__identity {
    display: grid;
    gap: 3px;
    padding: 10px;
    border-bottom: 1px solid var(--platform-header-line);
}

.platform-profile__identity strong {
    font-size: 13px;
}

.platform-profile__identity small,
.platform-profile__section-title {
    color: var(--platform-header-muted);
    font-size: 10px;
}

.platform-profile__section-title {
    padding: 12px 10px 5px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.platform-profile__workspace.is-current {
    border-color: rgba(255, 106, 0, .28);
    background: var(--platform-header-accent-soft);
    color: #ff9b55;
    opacity: 1;
}

.platform-profile__workspace small {
    font-size: 9px;
}

.platform-profile__links {
    margin-top: 7px;
    padding-top: 7px;
    border-top: 1px solid var(--platform-header-line);
}

.platform-header__login {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    padding: 0 13px;
    border: 1px solid var(--platform-header-line);
    border-radius: 11px;
    color: var(--platform-header-text);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.platform-header__menu-toggle,
.platform-header__drawer-head,
.platform-header__mobile-links,
.platform-header__mobile-shop-heading,
.platform-header__backdrop {
    display: none;
}

.platform-header__sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 1399px) {
    .platform-header__grid {
        grid-template-columns: minmax(145px, 178px) max-content minmax(170px, 1fr) max-content;
        gap: 10px;
        padding-inline: 14px;
    }

    .platform-header__nav-link {
        padding-inline: 7px;
        font-size: 11px;
    }

    .platform-header__seller {
        width: 40px;
        padding: 0;
    }

    .platform-header__shop-menu > summary.platform-header__seller{
        width:auto;
        padding-inline:10px;
    }

    .platform-header__seller strong {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }

    .platform-profile__trigger {
        width: 132px;
        max-width: 132px;
        min-width: 132px;
    }
}

@media (max-width: 1199px) {
    .platform-header__grid {
        grid-template-columns: minmax(145px, 180px) minmax(170px, 1fr) max-content;
        gap: 12px;
    }

    .platform-header__primary {
        position: fixed;
        z-index: 1520;
        inset: 0 0 auto auto;
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        display: flex;
        width: min(370px, 92vw);
        align-items: stretch;
        flex-direction: column;
        gap: 4px;
        padding: 16px;
        border-left: 1px solid var(--platform-header-line);
        background: #111113;
        box-shadow: -28px 0 80px rgba(0, 0, 0, .55);
        overflow-y: auto;
        visibility: hidden;
        transform: translateX(103%);
        transition: transform .23s ease, visibility 0s linear .23s;
    }

    .platform-header__primary.is-open {
        visibility: visible;
        transform: none;
        transition-delay: 0s;
    }

    .platform-header__drawer-head {
        display: flex;
        min-height: 48px;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 10px;
        padding-bottom: 10px;
        border-bottom: 1px solid var(--platform-header-line);
    }

    .platform-header__nav-link {
        width: 100%;
        min-height: 44px;
        justify-content: flex-start;
        padding-inline: 12px;
        font-size: 13px;
    }

    .platform-header__more {
        width: 100%;
    }

    .platform-header__more-menu {
        position: static;
        width: 100%;
        margin-top: 4px;
        border-radius: 12px;
        box-shadow: none;
    }

    .platform-header__mobile-links {
        display: grid;
        gap: 4px;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid var(--platform-header-line);
    }

    .platform-header__mobile-shop-heading{
        padding:12px 12px 4px;
        border-top:1px solid var(--platform-header-line);
        color:var(--platform-header-muted);
        font-size:10px;
        font-weight:800;
        letter-spacing:.1em;
        text-transform:uppercase;
    }

    .platform-header__mobile-links a,
    .platform-header__mobile-links button {
        display: flex;
        width: 100%;
        min-height: 42px;
        align-items: center;
        padding: 8px 12px;
        border: 0;
        border-radius: 10px;
        background: transparent;
        color: rgba(255, 255, 255, .76);
        font: inherit;
        font-size: 12px;
        text-align: left;
        text-decoration: none;
        cursor: pointer;
    }

    .platform-header__mobile-links a:hover,
    .platform-header__mobile-links button:hover {
        background: var(--platform-header-surface-hover);
        color: #fff;
    }

    .platform-header__menu-toggle {
        display: inline-grid;
    }

    .platform-header__backdrop {
        position: fixed;
        z-index: 1510;
        inset: 0 auto auto 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        border: 0;
        background: rgba(0, 0, 0, .58);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
    }

    .platform-header__backdrop.is-open {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }
}

@media (max-width: 820px) {
    .platform-header__grid {
        grid-template-columns: minmax(126px, 150px) minmax(120px, 1fr) max-content;
        gap: 9px;
        padding-inline: 12px;
    }

    .platform-header__brand strong {
        font-size: 15px;
    }

    .platform-header__brand img {
        width: min(118px, 100%);
        max-height: 34px;
    }

    .platform-header__search kbd,
    .platform-profile__copy,
    .platform-profile__trigger > svg {
        display: none;
    }

    .platform-header__brand span {
        font-size: 8px;
        letter-spacing: .09em;
    }

    .platform-profile__trigger {
        min-width: 40px;
        width: 40px;
        max-width: 40px;
        grid-template-columns: 32px;
        padding: 4px;
    }
}

@media (max-width: 520px) {
    .platform-header__grid {
        grid-template-columns: minmax(92px, 112px) minmax(84px, 1fr) max-content;
        gap: 7px;
        padding-inline: 9px;
    }

    .platform-header__brand strong {
        font-size: 14px;
        letter-spacing: .1em;
    }

    .platform-header__brand img {
        width: min(94px, 100%);
        max-height: 29px;
    }

    .platform-header__brand span {
        display: none;
    }

    .platform-header__search {
        height: 40px;
        grid-template-columns: 16px minmax(0, 1fr);
        gap: 6px;
        padding-inline: 9px;
    }

    .platform-header__search input {
        font-size: 12px;
    }

    .platform-header__search input::placeholder {
        color: rgba(255, 255, 255, .4);
        font-size: 11px;
    }

    .platform-header__actions {
        gap: 5px;
    }

    .platform-header__icon-group {
        gap: 4px;
    }

    .platform-header__icon-group > :not(:first-child),
    .platform-header__seller-form,
    .platform-header__actions > .platform-header__seller,
    .platform-header__shop-menu {
        display: none;
    }

    .platform-header__icon-button,
    .platform-profile__trigger {
        width: 38px;
        min-width: 38px;
        height: 38px;
    }

    .platform-header__login {
        width: 38px;
        min-width: 38px;
        height: 38px;
        overflow: hidden;
        justify-content: center;
        padding: 0;
        font-size: 0;
    }

    .platform-header__login::before {
        content: "В";
        font-size: 12px;
    }
}

@media (max-width: 560px) {
    body.storefront .cookie-notice {
        top: calc(var(--platform-header-height) + max(8px, env(safe-area-inset-top)));
    }
}

/* 320 px phones: keep the fixed header inside the visual viewport. */
@media (max-width: 380px) {
    .platform-header__grid {
        grid-template-columns: 72px minmax(0, 1fr) max-content;
        gap: 4px;
        padding-inline: 6px;
    }

    .platform-header__brand img {
        width: min(72px, 100%);
    }

    .platform-header__actions,
    .platform-header__icon-group {
        gap: 4px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .platform-header__primary,
    .platform-header__backdrop {
        transition: none;
    }
}
