﻿.pc-site-head {
    background: #fff;
    border-bottom: 1px solid var(--pc-line);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.pc-topbar {
    border-bottom: 1px solid var(--pc-line);
    font-size: 13px;
}

@media (min-width: 901px) {
    .pc-site-head--compact .pc-topbar {
        display: none;
    }
}

.pc-topbar .pc-shell,
.pc-topbar__left,
.pc-topbar__right {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.pc-topbar a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    color: var(--pc-ink);
    font-weight: 600;
    text-decoration: none;
}

.pc-topbar i,
.pc-nav i {
    font-size: 13px;
}

.pc-mainhead {
    display: grid;
    grid-template-columns: 250px 1fr 310px;
    align-items: center;
    gap: 18px;
    padding: 22px 0 16px;
}

.pc-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: var(--pc-ink);
    text-decoration: none;
}

.pc-brand img {
    width: 150px;
    height: auto;
    max-height: 52px;
    object-fit: contain;
}

.pc-brand > span {
    display: none;
}

.pc-brand strong {
    display: block;
    color: var(--pc-blue);
    font-size: 26px;
    line-height: 1;
}

.pc-brand small {
    display: block;
    margin-top: 5px;
    color: #6b7280;
    font-size: 11px;
}

.pc-search {
    display: grid;
    grid-template-columns: 142px minmax(160px, 1fr) 132px;
    height: 52px;
    border: 1px solid #cfd7e3;
    border-radius: var(--pc-radius);
    overflow: visible;
    background: #fff;
}

.pc-search input,
.pc-search button {
    border: 0;
    background: transparent;
    font: inherit;
}

.pc-search-cat {
    position: relative;
    min-width: 0;
}

.pc-search__cat {
    width: 100%;
    height: 100%;
    border-right: 1px solid var(--pc-line) !important;
    font-weight: 700;
}

.pc-search-cat__menu {
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    z-index: 80;
    display: none;
    width: 270px;
    max-height: 430px;
    overflow-y: auto;
    border: 1px solid var(--pc-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .14);
}

.pc-search-cat.is-open .pc-search-cat__menu {
    display: block;
}

.pc-search-cat__menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 42px;
    padding: 0 14px;
    border-bottom: 1px solid #edf0f5;
    color: var(--pc-ink);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.pc-search-cat__menu a:last-child {
    border-bottom: 0;
}

.pc-search-cat__menu a:hover {
    background: #f5f9ff;
    color: var(--pc-blue);
}

.pc-search input {
    min-width: 0;
    padding: 0 18px;
}

.pc-search__submit {
    margin: 3px;
    border-radius: 6px !important;
    background: var(--pc-blue) !important;
    color: #fff;
    font-weight: 700 !important;
}

.pc-head-actions {
    display: flex;
    justify-content: flex-end;
    justify-self: end;
    gap: 10px;
    text-align: center;
}

.pc-head-actions a {
    position: relative;
    display: grid;
    place-items: center;
    gap: 5px;
    min-width: 76px;
    min-height: 54px;
    color: var(--pc-ink);
    font-size: 13px;
    text-decoration: none;
}

.pc-head-actions i {
    font-size: 24px;
}

.pc-cart-link b,
.pc-wishlist-link b {
    position: absolute;
    top: 1px;
    right: 22px;
    display: grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--pc-blue);
    color: #fff;
    font-size: 12px;
}

.pc-wishlist-link b {
    background: #ef4444;
}

.pc-nav {
    display: flex;
    align-items: center;
    gap: 42px;
    height: 48px;
    overflow: visible;
    color: var(--pc-ink);
    font-weight: 700;
}

.pc-nav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.pc-nav-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 100%;
}

.pc-nav__toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.pc-nav-submenu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 60;
    display: grid;
    gap: 2px;
    width: 280px;
    padding: 10px;
    border: 1px solid var(--pc-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .16);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .18s ease, visibility .18s ease, transform .18s ease;
}

.pc-nav-item.is-open .pc-nav-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.pc-nav-submenu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 38px;
    height: auto;
    padding: 8px 10px;
    border-radius: 6px;
    color: var(--pc-ink);
    font-size: 13px;
    line-height: 1.35;
    white-space: normal;
}

.pc-nav-submenu a:hover {
    background: #f1f6ff;
    color: var(--pc-blue);
}

.pc-nav-submenu a span {
    min-width: 0;
}

.pc-nav-submenu__all {
    margin-top: 4px;
    background: #eef5ff;
    color: var(--pc-blue) !important;
    font-weight: 800;
}

.pc-nav > a,
.pc-nav > .pc-nav-item > .pc-nav__toggle {
    position: relative;
    transition: color .2s ease;
}

.pc-nav > a:hover,
.pc-nav > a:focus-visible,
.pc-nav > .pc-nav-item > .pc-nav__toggle:hover,
.pc-nav > .pc-nav-item > .pc-nav__toggle:focus-visible,
.pc-nav > a.is-active,
.pc-nav > .pc-nav-item > .pc-nav__toggle.is-active,
.pc-nav > .pc-nav-item.is-open > .pc-nav__toggle {
    color: var(--pc-blue);
}

.pc-nav > a::after,
.pc-nav > .pc-nav-item > .pc-nav__toggle::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--pc-blue);
    content: '';
    opacity: 0;
    transform: scaleX(.35);
    transition: opacity .2s ease, transform .2s ease;
}

.pc-nav > a.is-active::after,
.pc-nav > .pc-nav-item > .pc-nav__toggle.is-active::after {
    opacity: 1;
    transform: scaleX(1);
}

.pc-nav-submenu a.is-active {
    background: #e8f1ff;
    color: var(--pc-blue);
    font-weight: 800;
}

.pc-nav-submenu a.is-active::before {
    width: 5px;
    height: 5px;
    flex: 0 0 5px;
    border-radius: 50%;
    background: currentColor;
    content: '';
}

.pc-mobile-menu {
    display: none;
    position: relative;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 8px;
    background: #fff;
    color: var(--pc-blue);
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.pc-mobile-menu i {
    opacity: 0;
}

.pc-mobile-menu::before,
.pc-mobile-menu::after,
.pc-mobile-menu span {
    content: "";
    position: absolute;
    left: 50%;
    width: 22px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transform: translateX(-50%);
    transition: top .22s ease, transform .22s ease, opacity .16s ease;
}

.pc-mobile-menu::before {
    top: 13px;
}

.pc-mobile-menu span {
    top: 19px;
}

.pc-mobile-menu::after {
    top: 25px;
}

.pc-mobile-menu.is-open::before {
    top: 19px;
    transform: translateX(-50%) rotate(45deg);
}

.pc-mobile-menu.is-open span {
    opacity: 0;
}

.pc-mobile-menu.is-open::after {
    top: 19px;
    transform: translateX(-50%) rotate(-45deg);
}

@media (min-width: 641px) and (max-width: 1199px) {
    .pc-topbar__left,
    .pc-topbar__right,
    .fpc-topbar__right {
        display: none !important;
    }
}

@media (min-width: 901px) and (max-width: 1199px) {
    .pc-topbar .pc-shell {
        justify-content: flex-end;
        min-height: 40px;
        padding-right: 360px;
    }

    .pc-mainhead {
        grid-template-columns: 220px 1fr;
        padding-top: 16px;
    }

    .pc-head-actions {
        position: absolute;
        top: 0;
        right: max(16px, calc((100vw - 1024px) / 2));
        z-index: 3;
        grid-column: auto;
        grid-template-columns: repeat(3, max-content);
        align-items: center;
        justify-content: end;
        gap: 18px;
        width: auto;
        height: 40px;
    }

    .pc-head-actions a {
        display: inline-grid;
        grid-auto-flow: column;
        grid-auto-columns: max-content;
        align-items: center;
        place-items: center;
        gap: 7px;
        min-height: 40px;
        font-size: 13px;
        font-weight: 600;
    }

    .pc-head-actions i {
        font-size: 16px;
    }

    .pc-head-actions .pc-cart-link b,
    .pc-head-actions .pc-wishlist-link b {
        top: 1px;
        right: -8px;
    }
}

@media (min-width: 641px) and (max-width: 900px) {
    .pc-nav {
        overflow: visible;
    }

    .pc-nav-submenu {
        width: 260px;
    }
}

@media (max-width: 900px) {
    .pc-mainhead {
        grid-template-columns: 44px auto minmax(0, 1fr) 44px;
        gap: 10px;
        padding: 14px 0;
    }

    .pc-brand {
        justify-content: flex-start;
    }

    .pc-mobile-menu--head {
        display: grid;
        place-items: center;
        align-self: center;
    }

    .pc-head-actions {
        position: static;
        display: grid;
        grid-template-columns: 44px;
        justify-content: end;
        width: 44px;
        grid-column: auto;
    }

    .pc-head-actions a:not(.pc-cart-link) {
        display: none;
    }

    .pc-head-actions .pc-cart-link {
        display: grid;
        place-items: center;
        width: 44px;
        min-height: 44px;
        color: #071126;
    }

    .pc-head-actions .pc-cart-link i {
        font-size: 22px;
    }

    .pc-head-actions .pc-cart-link span {
        display: none;
    }

    .pc-head-actions .pc-cart-link b {
        top: 0;
        right: 0;
    }

    .pc-nav {
        overflow-x: auto;
        gap: 26px;
        height: 44px;
        white-space: nowrap;
        scrollbar-width: none;
    }

    .pc-nav::-webkit-scrollbar {
        display: none;
    }

    .pc-nav .pc-mobile-menu {
        display: grid;
        place-items: center;
        flex: 0 0 auto;
    }
}

@media (max-width: 640px) {
    .pc-topbar {
        display: none;
    }

    .pc-brand img {
        width: 84px;
        height: auto;
        max-height: 34px;
    }

    .pc-brand span,
    .pc-brand small {
        display: none;
    }

    .pc-search {
        grid-template-columns: 1fr 46px;
        height: 42px;
        min-width: 0;
    }

    .pc-search input {
        padding: 0 12px;
        font-size: 13px;
    }

    .pc-search__cat,
    .pc-search-cat {
        display: none;
    }

    .pc-search__submit {
        width: 40px;
        min-width: 40px;
        padding: 0;
        font-size: 0 !important;
    }

    .pc-search__submit i {
        font-size: 16px;
    }

    .pc-site-head .pc-nav {
        display: none;
    }

    .pc-nav .pc-mobile-menu {
        display: none;
    }
}

@media (max-width: 640px) {
    .pc-site-head {
        position: sticky;
        top: 0;
        z-index: 9980;
    }

    .pc-mainhead {
        position: relative;
        grid-template-columns: minmax(0, 1fr) 44px;
        min-height: 58px;
        padding: 10px 14px;
    }

    .pc-mainhead .pc-mobile-menu--head {
        grid-column: 2;
        justify-self: end;
    }

    .pc-mainhead .pc-brand {
        grid-column: 1;
        justify-self: start;
        max-width: 108px;
    }

    .pc-mainhead .pc-head-actions {
        display: none;
    }

    .pc-mainhead .pc-search {
        display: none;
    }

    .pc-mainhead .pc-search input {
        min-width: 0;
        padding: 0 14px;
        font-size: 14px;
    }

    .pc-mainhead .pc-search__cat,
    .pc-mainhead .pc-search-cat {
        display: none;
    }

    .pc-mainhead .pc-search__submit {
        width: 46px;
        min-width: 46px;
        padding: 0;
        border-radius: 0 14px 14px 0;
        background: #0d6ffd;
        color: #fff;
        font-size: 0 !important;
    }

    .pc-mainhead .pc-search__submit i {
        font-size: 17px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pc-mainhead .pc-search {
        transition: none;
    }
}

/* Polished primary navigation: shared by Home and the rest of the site. */
@media (min-width: 901px) {
    .pc-site-head {
        border-bottom-color: rgba(207, 215, 227, .78);
        box-shadow: 0 8px 28px rgba(15, 35, 70, .07);
    }

    .pc-mainhead {
        padding-top: 18px;
        padding-bottom: 14px;
    }

    .pc-search {
        transition: border-color .2s ease, box-shadow .2s ease;
    }

    .pc-search:focus-within {
        border-color: var(--pc-blue);
        box-shadow: 0 0 0 3px rgba(7, 91, 216, .12);
    }

    .pc-head-actions a {
        border-radius: 10px;
        transition: color .2s ease, background-color .2s ease, transform .2s ease;
    }

    .pc-head-actions a:hover,
    .pc-head-actions a:focus-visible {
        background: #f2f7ff;
        color: var(--pc-blue);
        transform: translateY(-1px);
    }

    .pc-nav {
        gap: clamp(24px, 2.7vw, 42px);
    }

    .pc-nav > a,
    .pc-nav > .pc-nav-item > .pc-nav__toggle {
        padding: 0 2px;
    }

    .pc-nav-submenu {
        top: calc(100% + 8px);
        width: 300px;
        padding: 9px;
        border-radius: 12px;
        box-shadow: 0 22px 50px rgba(15, 35, 70, .18);
    }

    .pc-nav-submenu::before {
        position: absolute;
        right: 0;
        bottom: 100%;
        left: 0;
        height: 10px;
        content: '';
    }

    .pc-nav-submenu a {
        min-height: 42px;
        border-radius: 8px;
    }
}

.pc-nav a:focus-visible,
.pc-nav button:focus-visible,
.pc-search button:focus-visible,
.pc-head-actions a:focus-visible,
.pc-mobile-menu:focus-visible {
    outline: 3px solid rgba(7, 91, 216, .3);
    outline-offset: 3px;
}

@media (max-width: 640px) {
    .pc-site-head .pc-mainhead.pc-shell {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 44px !important;
        align-items: center !important;
        gap: 12px !important;
        min-height: 72px !important;
        padding: 12px 0 !important;
    }

    .pc-site-head .pc-mainhead .pc-brand {
        grid-column: 1 !important;
        grid-row: 1 !important;
        justify-self: start !important;
        align-self: center !important;
        display: inline-flex !important;
        max-width: 180px !important;
    }

    .pc-site-head .pc-mainhead .pc-brand img {
        width: 150px !important;
        max-width: 48vw !important;
        max-height: 46px !important;
        object-fit: contain !important;
    }

    .pc-site-head .pc-mainhead .pc-mobile-menu--head {
        grid-column: 2 !important;
        grid-row: 1 !important;
        justify-self: end !important;
        align-self: center !important;
        width: 44px !important;
        height: 44px !important;
        display: grid !important;
        place-items: center !important;
    }
}
