header.site-header {
    --nav-bg: rgba(255, 251, 249, 0.84);
    --nav-line: rgba(214, 188, 198, 0.32);
    --nav-line-strong: rgba(205, 168, 183, 0.44);
    --nav-text: #5a4d56;
    --nav-text-soft: #8c7a83;
    --nav-accent: #c78fa4;
    --nav-accent-soft: #efd9e1;
    --nav-cart-text: #6f5d67;
    position: sticky;
    top: 0;
    z-index: 40;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--nav-line);
    box-shadow: 0 10px 28px rgba(177, 154, 165, 0.08);
}

.header-main {
    width: var(--container);
    min-height: 88px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 32px;
}

.header-left,
.header-actions {
    display: flex;
    align-items: center;
}

.header-left {
    gap: 18px;
}

.header-actions {
    justify-content: flex-end;
    gap: 18px;
}

.menu-toggle {
    display: inline-flex;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--nav-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--nav-text);
    box-shadow: 0 8px 18px rgba(177, 154, 165, 0.08);
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.menu-toggle:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.92);
    border-color: var(--nav-line-strong);
    box-shadow: 0 12px 22px rgba(177, 154, 165, 0.1);
}

.menu-toggle span {
    position: absolute;
    width: 16px;
    height: 1.8px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle span:nth-child(1) {
    transform: translateY(-5px);
}

.menu-toggle span:nth-child(3) {
    transform: translateY(5px);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
}

.brand-block {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.brand-block:hover {
    transform: translateY(-1px);
    opacity: 0.92;
}

.brand-logo {
    display: block;
    width: auto;
    height: 34px;
    max-width: min(220px, 32vw);
    opacity: 0.96;
    filter: drop-shadow(0 1px 6px rgba(237, 214, 222, 0.42));
}

.categories-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 26px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.categories-container::-webkit-scrollbar {
    display: none;
}

.category-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 44px;
    color: var(--nav-text-soft);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: color 0.2s ease;
}

.category-link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 5px;
    height: 2px;
    background: var(--nav-accent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

.category-link:hover,
.category-link.active {
    color: #625560;
}

.category-link:hover::after,
.category-link.active::after {
    transform: scaleX(1);
}

.header-link {
    color: var(--nav-text-soft);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.header-link:hover {
    color: var(--nav-accent);
}

#cartButton {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 17px;
    border-radius: 16px;
    border: 1px solid rgba(214, 188, 198, 0.34);
    background: rgba(248, 239, 242, 0.9);
    color: var(--nav-cart-text);
    box-shadow: 0 10px 22px rgba(205, 168, 183, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

#cartButton:hover,
#cartButton.hover-effect {
    transform: translateY(-1px);
    background: rgba(245, 233, 238, 0.96);
    border-color: rgba(199, 143, 164, 0.28);
    box-shadow: 0 14px 26px rgba(205, 168, 183, 0.16);
    color: #65555e;
}

.cart-icon,
.cart-copy,
#cartCount {
    color: inherit;
}

.cart-icon {
    font-size: 0.98rem;
    color: var(--nav-accent);
    opacity: 0.92;
}

.cart-copy {
    font-size: 0.92rem;
    font-weight: 600;
}

#cartCount {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    min-height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(255, 253, 252, 0.96);
    border: 1px solid rgba(214, 188, 198, 0.28);
    box-shadow: 0 4px 10px rgba(205, 168, 183, 0.08);
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--nav-accent);
}

body.menu-open {
    overflow: hidden;
}

@media (max-width: 1100px) {
    .header-main {
        gap: 20px;
    }

    .categories-container {
        gap: 20px;
        justify-content: flex-start;
    }

    .header-link {
        display: none;
    }
}

@media (max-width: 860px) {
    .header-main {
        min-height: 76px;
        grid-template-columns: auto 1fr auto;
    }

    .categories-container {
        display: none;
    }

    .brand-logo {
        height: 31px;
        max-width: 180px;
    }
}

@media (max-width: 640px) {
    .header-main {
        min-height: 72px;
        gap: 14px;
    }

    .header-left {
        gap: 12px;
    }

    .brand-logo {
        height: 28px;
        max-width: 148px;
    }

    .brand-block {
        padding: 2px 0;
    }

    .menu-toggle {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    #cartButton {
        min-height: 42px;
        padding: 0 12px;
        border-radius: 14px;
    }

    .cart-copy {
        display: none;
    }

    #cartCount {
        min-width: 20px;
        min-height: 20px;
        font-size: 0.72rem;
    }
}
