#header {
    --sg-nav-height: 84px;
    --sg-nav-paper: #fffdfb;
    --sg-nav-panel: #faf5ef;
    --sg-nav-line: #ebded5;
    --sg-nav-ink: #382821;
    --sg-nav-red: #862326;
    --sg-nav-action: #a4292b;
}

#header .stuck {
    --sg-nav-height: 70px;
}

#header #masthead {
    height: var(--sg-nav-height);
    border-bottom: 1px solid var(--sg-nav-line);
}

#header:not(.transparent) .header-bg-color {
    background-color: var(--sg-nav-paper);
}

#masthead .header-nav-main {
    height: 100%;
    gap: clamp(2px, .45vw, 7px);
    flex-wrap: nowrap;
}

#masthead .header-nav-main > li {
    height: 100%;
    margin: 0;
}

#masthead .header-nav-main > li > a.nav-top-link {
    display: flex;
    align-items: center;
    height: 100%;
    min-height: 44px;
    padding: 0 clamp(6px, .7vw, 11px);
    color: var(--sg-nav-ink);
    font-size: clamp(13px, 1.12vw, 16px);
    font-weight: 650;
    line-height: 1.2;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    transform: none;
    transition: color .15s ease;
}

#masthead .header-nav-main > li > a.nav-top-link::after {
    inset: auto 8px 14px;
    height: 2px;
    border-radius: 2px;
    background: var(--sg-nav-action);
    animation: none;
}

#masthead .header-nav-main > li:is(.active, .current-dropdown) > a.nav-top-link,
#masthead .header-nav-main > li > a.nav-top-link:is(:hover, :focus-visible),
body:is(.tax-product_cat, .tax-product_tag, .single-product) #masthead #menu-item-396 > a.nav-top-link {
    color: var(--sg-nav-red);
}

#masthead .header-nav-main > li:is(.active, .current-dropdown) > a.nav-top-link::after,
#masthead .header-nav-main > li > a.nav-top-link:is(:hover, :focus-visible)::after,
body:is(.tax-product_cat, .tax-product_tag, .single-product) #masthead #menu-item-396 > a.nav-top-link::after {
    transform: scaleX(1);
}

#masthead .header-nav-main > li > .nav-top-link .icon-angle-down {
    margin-left: 4px;
    color: var(--sg-nav-red);
    font-size: 12px;
    opacity: .72;
}

#masthead .header-nav-main > li.html {
    display: flex;
    align-items: center;
    margin-left: clamp(2px, .6vw, 9px);
}

#masthead .header-nav-main > li.html .ctasia {
    min-height: 44px;
    padding: 6px clamp(8px, 1.1vw, 15px);
    border: 1px solid #e9d6d1;
    border-radius: 8px;
    background: #f9eeea;
    color: var(--sg-nav-red);
    font-size: clamp(14px, 1.22vw, 18px);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    white-space: nowrap;
}

#masthead .header-nav-main > li.html a:hover .ctasia {
    border-color: var(--sg-nav-action);
    background: var(--sg-nav-action);
    color: #fff;
}

#masthead .header-nav-main > li > .nav-dropdown {
    top: 100%;
    padding: 7px;
    border: 1px solid var(--sg-nav-line);
    border-radius: 12px;
    background: var(--sg-nav-paper);
    box-shadow: 0 14px 36px rgb(59 31 22 / .14);
}

#masthead .header-nav-main > li > ul.nav-dropdown {
    min-width: 230px;
    max-width: 290px;
}

#masthead #menu-item-4148 > .nav-dropdown {
    right: 0;
    left: auto;
}

#masthead .header-nav-main > li > ul.nav-dropdown li {
    margin: 0;
}

#masthead .header-nav-main > li > ul.nav-dropdown li::after {
    display: none;
}

#masthead .header-nav-main > li > ul.nav-dropdown a {
    display: flex;
    min-height: 40px;
    margin: 0;
    align-items: center;
    padding: 8px 11px;
    border: 0;
    border-radius: 6px;
    color: var(--sg-nav-ink);
    font-size: 14px;
    line-height: 1.35;
    transform: none;
}

#masthead .header-nav-main > li > ul.nav-dropdown a:is(:hover, :focus-visible, [aria-current='page']) {
    background: #f6e9e2;
    color: var(--sg-nav-red);
}

#masthead #menu-item-396 > .nav-dropdown {
    width: min(1100px, calc(100vw - 46px));
    min-width: 0;
    padding: 0;
}

#masthead #menu-item-396 > .nav-dropdown .gift-categories {
    max-height: calc(100vh - var(--sg-nav-height) - 18px);
    max-height: calc(100dvh - var(--sg-nav-height) - 18px);
    overflow: auto;
    padding: clamp(10px, 1.45vw, 20px);
    border-radius: inherit;
    background: var(--sg-nav-paper);
    overscroll-behavior: contain;
}

#masthead #menu-item-396 .gift-categories > .row {
    display: grid;
    width: 100%;
    max-width: none;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(8px, 1vw, 14px);
    margin: 0;
}

#masthead #menu-item-396 .category-block {
    min-width: 0;
    margin: 0;
    padding: 7px;
    border: 1px solid #efe4db;
    border-radius: 9px;
    background: var(--sg-nav-panel);
}

#masthead #menu-item-396 .category-title {
    display: block;
    min-width: 0;
    margin: 0 0 4px;
    padding: 0;
    border: 0;
    border-bottom: 1px solid var(--sg-nav-line);
    text-transform: none;
}

#masthead #menu-item-396 .category-title a {
    display: flex;
    min-height: 54px;
    align-items: center;
    padding: 7px 8px;
    border-radius: 6px 6px 0 0;
    color: var(--sg-nav-red);
    font-size: clamp(13px, 1.2vw, 16px);
    font-weight: 750;
    line-height: 1.2;
    white-space: normal;
}

#masthead #menu-item-396 .category-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

#masthead #menu-item-396 .category-list li {
    margin: 0;
    padding: 0;
    border: 0;
}

#masthead #menu-item-396 .category-list li::after {
    display: none;
}

#masthead #menu-item-396 .category-list a {
    display: flex;
    min-height: 38px;
    align-items: center;
    padding: 6px 8px;
    border-radius: 6px;
    color: var(--sg-nav-ink);
    font-size: clamp(13px, 1.06vw, 15px);
    font-weight: 500;
    line-height: 1.3;
    transform: none;
}

#masthead #menu-item-396 :is(.category-title, .category-list) a:is(:hover, :focus-visible, [aria-current='page']) {
    background: #f3e4dc;
    color: var(--sg-nav-red);
}

#masthead #menu-item-396 .category-list a[href$='/set-qua-tet/'] {
    color: var(--sg-nav-red);
    font-weight: 700;
}

#masthead .sg-header-catalog__footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

#masthead .sg-header-catalog__footer a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 8px;
    padding: 6px 15px;
    border-radius: 7px;
    background: var(--sg-nav-action);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

#masthead .sg-header-catalog__footer a:hover {
    background: var(--sg-nav-red);
}

#masthead :is(.nav-top-link, .nav-dropdown a, .mobile-nav a[data-open='#main-menu']):focus-visible {
    outline: 2px solid var(--sg-nav-red);
    outline-offset: -2px;
}

body:has(#masthead .header-nav-main .current-dropdown) > .ux-body-overlay {
    background-color: rgb(45 30 24 / .13);
}

@media (min-width: 850px) {
    #masthead .header-inner > .flex-col:has(> .header-nav-main) {
        height: 100%;
        padding: 0;
    }

    #masthead #logo {
        width: clamp(155px, 16vw, 226px);
        margin-right: clamp(10px, 1.7vw, 23px);
    }
}

@media (max-width: 849px) {
    #header {
        --sg-nav-height: 70px;
    }

    #masthead #logo {
        width: clamp(156px, 47vw, 195px);
    }

    #masthead .mobile-nav a[data-open='#main-menu'] {
        display: inline-flex;
        width: 44px;
        height: 44px;
        min-height: 44px;
        margin: 0;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: 1px solid #e9d6d1;
        border-radius: 8px;
        background: #fbf0eb;
        color: var(--sg-nav-red);
    }

    #masthead .mobile-nav a[data-open='#main-menu'] .icon-menu {
        font-size: 19px;
        line-height: 1;
    }
}
