/* Reference-style header: light top row, pill search, category strip */
:root {
    --wc-pill-bg: #eceef2;
    --wc-pill-radius: 999px;
    --wc-cat-strip-bg: #f4f5f7;
}

@media (min-width: 1280px) {
    /* Full header (logo row + category strip) sticks; not navbar-only fixed */
    body.on-scroll {
        padding-top: 0 !important;
    }

    header#header {
        position: sticky;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 100;
        background: #fff;
        box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
        margin-bottom: 0;
    }

    body.on-scroll header#header {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    }

    .on-scroll #header .navbar,
    .on-scroll #header .navbar.wc-cat-navbar {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        right: auto !important;
        width: auto !important;
        z-index: auto;
        box-shadow: none !important;
    }

    header#header .top.wc-header-top {
        background: #fff;
        padding: 14px 0;
    }

    header#header .wc-header-flex {
        display: flex;
        align-items: center;
        gap: 16px;
        flex-wrap: nowrap;
    }

    /* Align logo, search, phone, account (override common.css .search padding & .q-actions padding-top) */
    header#header .wc-header-flex > .ht-item.logo,
    header#header .wc-header-flex > .ht-item.search,
    header#header .wc-header-flex > .ht-item.q-actions {
        align-self: center;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    header#header .ht-item.logo {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    header#header .ht-item.logo .brand {
        display: flex;
        align-items: center;
        line-height: 0;
    }

    header#header .ht-item.logo .brand img {
        max-height: 44px;
        width: auto;
        height: auto;
        margin-top: 0 !important;
        vertical-align: middle;
    }

    header#header .ht-item.search,
    header#header .ht-item.search.search-box {
        flex: 1 1 auto;
        min-width: 0;
        padding: 0 !important;
        margin: 0;
        display: flex;
        align-items: center;
        position: relative;
    }

    header#header .ht-item.search .seacrh-inner-box {
        width: 100%;
        margin: 0;
    }

    .wc-search-pill.seacrh-inner-box {
        display: flex;
        align-items: center;
        background: var(--wc-pill-bg);
        border-radius: var(--wc-pill-radius);
        padding: 4px 6px 4px 12px;
        gap: 6px;
        max-width: 100%;
    }

    .wc-search-pill .wc-search-tune {
        display: flex;
        color: #555;
        flex-shrink: 0;
    }

    .wc-search-pill .wc-search-tune .material-icons {
        font-size: 22px;
    }

    .wc-search-pill input[name="search"] {
        flex: 1 1 auto;
        min-width: 0;
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        height: 40px;
        line-height: normal;
        padding: 0 8px !important;
        margin: 0 !important;
        font-size: 15px;
        color: #111;
        vertical-align: middle;
    }

    .wc-search-pill button.header-search-submit {
        position: static !important;
        transform: none !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        border: none;
        background: #111;
        cursor: pointer;
        flex-shrink: 0;
        padding: 0;
    }

    .wc-search-pill button.header-search-submit .material-icons {
        color: #fff;
        font-size: 22px;
    }

    header#header .ht-item.q-actions {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 0 0 0 10px !important;
        max-width: none;
    }

    header#header .q-actions .ac {
        padding-left: 0;
    }

    header#header .q-actions .ac * {
        color: #111;
    }

    header#header .q-actions .ac .ic i {
        color: #333;
    }

    header#header .q-actions .ac.build-pc {
        top: 0 !important;
    }

    .wc-header-quick-ic .ic {
        width: 40px !important;
        height: 40px !important;
        margin-right: 0 !important;
        background: #eceef2 !important;
        border-radius: 50% !important;
    }

    .wc-header-quick-ic .ac-content {
        display: none;
    }

    .wc-phone-block {
        display: flex;
        align-items: center;
        gap: 10px;
        text-decoration: none;
        color: #111;
        padding: 0 8px;
        border-right: 1px solid #e5e7eb;
        margin-right: 4px;
        align-self: center;
    }

    .wc-phone-block:hover {
        text-decoration: none;
        color: #111;
    }

    .wc-phone-ic {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: #eceef2;
        border-radius: 50%;
    }

    .wc-phone-ic .material-icons {
        font-size: 22px;
        color: #333;
    }

    .wc-phone-text {
        display: flex;
        flex-direction: column;
        line-height: 1.2;
    }

    .wc-phone-num {
        font-weight: 600;
        font-size: 15px;
        display: inline-flex;
        align-items: center;
        gap: 2px;
    }

    .wc-phone-sub {
        font-size: 11px;
        color: #888;
    }

    .ac.wc-account-block {
        display: flex !important;
        flex-direction: row !important;
        align-items: center;
        gap: 10px;
        padding: 0 8px;
        text-decoration: none;
        color: #111;
        flex: 0 0 auto;
    }

    .ac.wc-account-block .wc-phone-ic {
        text-decoration: none;
        color: inherit;
        flex-shrink: 0;
    }

    .ac.wc-account-block .wc-account-title {
        display: block;
        font-weight: 600;
        font-size: 15px;
        line-height: 1.2;
        color: #111;
        text-decoration: none;
    }

    .ac.wc-account-block .wc-account-title:hover {
        color: var(--s-primary, #ef4a23);
        text-decoration: none;
    }

    .ac.wc-account-block .wc-account-sub {
        display: block;
        font-size: 11px;
        line-height: 1.3;
        color: #888;
        margin-top: 2px;
    }

    .ac.wc-account-block .wc-account-sub a {
        color: #555;
        text-decoration: none;
    }

    .ac.wc-account-block .wc-account-sub a:hover {
        color: var(--s-primary, #ef4a23);
        text-decoration: underline;
    }

    .q-actions .ac.build-pc.m-hide {
        display: none !important;
    }

    /* Category strip */
    .wc-category-strip {
        background: var(--wc-cat-strip-bg);
        border-top: 1px solid #e8eaef;
    }

    .wc-category-strip-inner {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 0 !important;
    }

    .wc-cat-navbar {
        flex: 1 1 auto;
        min-width: 0;
        background: transparent !important;
        padding: 0 !important;
        box-shadow: none !important;
    }

    /* overflow visible so mega dropdowns are not clipped */
    .wc-category-scroll {
        overflow: visible;
    }

    .wc-category-list.navbar-nav {
        flex-wrap: wrap !important;
        left: 0 !important;
        width: 100% !important;
        min-width: 0;
        padding: 8px 0 10px !important;
        gap: 8px;
    }

    .wc-category-list > .nav-item {
        flex: 0 0 auto;
    }

    .wc-category-list .nav-link.wc-cat-link {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        line-height: 1.2 !important;
        padding: 8px 14px !important;
        border-radius: 999px;
        background: #fff;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
        font-size: 13px !important;
        font-weight: 600 !important;
        color: #222 !important;
    }

    .wc-category-list .nav-link.wc-cat-link:hover {
        color: var(--s-primary, #ef4a23) !important;
    }

    .wc-cat-ico {
        font-size: 20px !important;
        color: #444 !important;
    }

    .wc-cat-strip-nav {
        display: none;
    }

    .wc-cat-arrow {
        border: none;
        background: #fff;
        width: 28px;
        height: 28px;
        border-radius: 8px;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    .wc-cat-arrow .material-icons {
        font-size: 20px;
        color: #333;
    }

    .wc-cat-pager {
        font-size: 11px;
        font-weight: 600;
        color: #666;
    }

}

@media (max-width: 1279px) {
    .wc-phone-block,
    .wc-search-pill .wc-search-tune {
        display: none !important;
    }

    header#header .q-actions .ac.wc-account-block {
        flex-direction: row !important;
        align-items: center;
    }

    header#header .q-actions .ac.wc-account-block .wc-account-title {
        font-size: 10px;
        font-weight: 600;
    }

    header#header .q-actions .ac.wc-account-block .wc-account-sub {
        font-size: 9px;
        margin-top: 0;
    }

    .wc-header-quick-ic .ac-content {
        display: none;
    }

    .wc-category-strip-inner {
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .wc-category-scroll {
        flex: 1 1 auto;
        min-width: 0;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .wc-category-scroll::-webkit-scrollbar {
        display: none;
    }

    .wc-category-list.navbar-nav {
        flex-wrap: nowrap !important;
        width: max-content !important;
        min-width: 100%;
    }

    .wc-cat-strip-nav {
        flex: 0 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        padding: 4px 4px 8px;
    }
}
