/* =========================================================
   ZeroMaxShop storefront header — isolated module
   Load after style.css and shop_promo_rail.css.
========================================================= */

:root {
    --zmx-header-text: #101114;
    --zmx-header-muted: #777985;
    --zmx-header-border: #e5e6eb;
    --zmx-header-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
    --zmx-header-purple: #7145d6;
    --zmx-header-purple-soft: #f5f0ff;
    --zmx-header-green: #0f9876;
}

body.shop-page .zmx-shop-header {
    position: relative;
    z-index: 1200;
    flex: 0 0 auto;
    width: 100%;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid rgba(229, 230, 235, 0.86);
    box-shadow: 0 7px 24px rgba(15, 23, 42, 0.035);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

body.shop-page .zmx-header-row {
    display: grid;
    grid-template-columns: minmax(240px, auto) minmax(320px, 760px) auto;
    align-items: center;
    gap: 24px;
    width: 100%;
    min-height: 82px;
    padding: 12px 30px;
}

body.shop-page .zmx-header-brand-side,
body.shop-page .zmx-brand,
body.shop-page .zmx-header-actions {
    display: flex;
    align-items: center;
    min-width: 0;
}

body.shop-page .zmx-header-brand-side {
    gap: 12px;
}

body.shop-page .zmx-menu-toggle {
    display: none;
    position: relative;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid var(--zmx-header-border);
    border-radius: 16px;
    background: #ffffff;
    box-shadow:
        0 7px 18px rgba(15, 23, 42, 0.045),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

body.shop-page .zmx-menu-line {
    position: absolute;
    left: 12px;
    width: 22px;
    height: 2.5px;
    border-radius: 999px;
    background: #15171b;
    transform-origin: center;
    transition:
        transform 240ms cubic-bezier(0.2, 0.75, 0.2, 1),
        opacity 160ms ease,
        top 240ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

body.shop-page .zmx-menu-line:nth-child(1) {
    top: 14px;
}

body.shop-page .zmx-menu-line:nth-child(2) {
    top: 21px;
}

body.shop-page .zmx-menu-line:nth-child(3) {
    top: 28px;
}

body.shop-page .zmx-menu-toggle.is-open .zmx-menu-line:nth-child(1) {
    top: 21px;
    transform: rotate(45deg);
}

body.shop-page .zmx-menu-toggle.is-open .zmx-menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0.3);
}

body.shop-page .zmx-menu-toggle.is-open .zmx-menu-line:nth-child(3) {
    top: 21px;
    transform: rotate(-45deg);
}

body.shop-page .zmx-brand {
    gap: 10px;
    color: var(--zmx-header-text);
    text-decoration: none;
}

body.shop-page .zmx-brand:hover {
    color: var(--zmx-header-text);
    text-decoration: none;
}

body.shop-page .zmx-brand-logo {
    display: block;
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    object-fit: contain;
}

body.shop-page .zmx-brand-name {
    display: block;
    color: #0d0e11;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 25px;
    font-weight: 900;
    letter-spacing: -0.055em;
    line-height: 1;
    white-space: nowrap;
}

body.shop-page .zmx-search-form {
    width: 100%;
    min-width: 0;
    margin: 0;
}

body.shop-page .zmx-search-inner {
    position: relative;
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 56px;
    padding: 0 8px 0 17px;
    border: 1px solid #dcdde3;
    border-radius: 20px;
    background: #ffffff;
    box-shadow:
        0 9px 24px rgba(15, 23, 42, 0.045),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        transform 180ms ease;
}

body.shop-page .zmx-search-inner:focus-within {
    border-color: #bca5f7;
    box-shadow:
        0 12px 30px rgba(113, 69, 214, 0.1),
        0 0 0 3px rgba(113, 69, 214, 0.08);
}

body.shop-page .zmx-search-icon {
    color: #111318;
    font-size: 24px;
    line-height: 1;
}

body.shop-page .zmx-search-inner input[type="search"] {
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
    height: 54px;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    color: #16181d;
    font-size: 16px;
    font-weight: 620;
    box-shadow: none !important;
    appearance: none;
    -webkit-appearance: none;
}

body.shop-page .zmx-search-inner input[type="search"]::placeholder {
    color: #8a8c94;
    opacity: 1;
}

body.shop-page .zmx-filter-toggle {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 13px !important;
    background: #f7f7fa !important;
    color: #121318 !important;
    font-size: 21px !important;
    box-shadow: none !important;
    cursor: pointer;
    transition:
        background 170ms ease,
        color 170ms ease,
        transform 170ms ease !important;
}

body.shop-page .zmx-filter-toggle:hover {
    background: var(--zmx-header-purple-soft) !important;
    color: var(--zmx-header-purple) !important;
    transform: translateY(-1px);
}

body.shop-page .zmx-filter-toggle:active {
    transform: scale(0.96);
}

body.shop-page .zmx-search-inner .search-suggestions-box {
    top: calc(100% + 9px);
    left: 0;
    right: 0;
    border-radius: 18px;
}

body.shop-page .zmx-header-actions {
    justify-content: flex-end;
    gap: 9px;
    overflow: visible;
}

body.shop-page .zmx-guest-action,
body.shop-page .zmx-admin-action {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 17px;
    border: 1px solid var(--zmx-header-border);
    border-radius: 16px;
    color: #111318;
    font-size: 14px;
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 7px 18px rgba(15, 23, 42, 0.04);
    transition:
        transform 170ms ease,
        border-color 170ms ease,
        background 170ms ease,
        box-shadow 170ms ease;
}

body.shop-page .zmx-guest-action:hover,
body.shop-page .zmx-admin-action:hover {
    color: #111318;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

body.shop-page .zmx-reviews-action {
    background: #ffffff;
}

body.shop-page .zmx-reviews-action i {
    color: var(--zmx-header-green);
    font-size: 18px;
}

body.shop-page .zmx-signup-action {
    border-color: #d7c6fb;
    background: linear-gradient(145deg, #fbf9ff, #f3edff);
    color: #472694;
}

body.shop-page .zmx-signup-action i {
    color: var(--zmx-header-purple);
    font-size: 19px;
}

body.shop-page .zmx-admin-action {
    background: #111318;
    color: #ffffff;
    border-color: #111318;
}

body.shop-page .zmx-admin-action:hover {
    color: #ffffff;
    background: #2b2d33;
}

body.shop-page .zmx-header-icon-link,
body.shop-page .zmx-profile-link {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

body.shop-page .zmx-header-icon-wrap,
body.shop-page .zmx-profile-image,
body.shop-page .zmx-profile-fallback {
    width: 42px;
    height: 42px;
    border: 1px solid var(--zmx-header-border);
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 6px 17px rgba(15, 23, 42, 0.045);
}

body.shop-page .zmx-header-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #111318;
    font-size: 21px;
    transition:
        transform 170ms ease,
        background 170ms ease,
        border-color 170ms ease;
}

body.shop-page .zmx-header-icon-link:hover .zmx-header-icon-wrap {
    transform: translateY(-2px);
    border-color: #d3c4f4;
    background: #f8f5ff;
}

body.shop-page .zmx-header-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    display: inline-flex;
    min-width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid #ffffff;
    border-radius: 999px;
    background: #e60023;
    color: #ffffff;
    font-size: 9px;
    font-weight: 950;
    line-height: 1;
}

body.shop-page .zmx-profile-image {
    display: block;
    object-fit: cover;
}

body.shop-page .zmx-profile-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #111827;
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
}

body.shop-page .zmx-header-reward {
    margin: 0 4px !important;
}

body.shop-page .zmx-header-reward .zms-topbar-wheel-window {
    --zms-reward-wheel-height: 30px;
    width: 82px !important;
}

body.shop-page .zmx-mobile-commerce-header {
    display: none;
}

/* =========================================================
   Menu and filter animation layers
========================================================= */

body.shop-page .zmx-menu-backdrop,
body.shop-page .zmx-filter-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9500;
    display: block;
    visibility: hidden;
    background: rgba(12, 14, 20, 0.42);
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    transition:
        opacity 260ms ease,
        visibility 0s linear 260ms;
}

body.shop-page .zmx-menu-backdrop.is-mounted,
body.shop-page .zmx-filter-backdrop.is-mounted {
    visibility: visible;
    transition-delay: 0s;
}

body.shop-page .zmx-menu-backdrop.is-open,
body.shop-page .zmx-filter-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

body.shop-page .zmx-menu-panel {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    z-index: 9600 !important;
    display: block !important;
    visibility: hidden;
    width: min(86vw, 340px) !important;
    height: 100dvh !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 0 24px 24px 0 !important;
    background: #ffffff !important;
    box-shadow: 18px 0 55px rgba(15, 23, 42, 0.22) !important;
    opacity: 0;
    transform: translate3d(-108%, 0, 0) !important;
    transition:
        transform 320ms cubic-bezier(0.2, 0.82, 0.2, 1),
        opacity 190ms ease,
        visibility 0s linear 320ms !important;
    will-change: transform;
}

body.shop-page .zmx-menu-panel.is-mounted {
    visibility: visible;
    transition-delay: 0s !important;
}

body.shop-page .zmx-menu-panel.is-open {
    opacity: 1;
    transform: translate3d(0, 0, 0) !important;
}

body.shop-page .zmx-menu-panel-inner {
    height: 100%;
    padding: max(18px, env(safe-area-inset-top)) 17px
        max(22px, env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
}

body.shop-page .zmx-menu-panel .mobile-menu-header {
    position: sticky;
    top: 0;
    z-index: 3;
    margin: -2px -2px 14px;
    padding: 8px 2px 14px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(14px);
}

body.shop-page .zmx-menu-panel .mobile-menu-close {
    width: 38px;
    height: 38px;
    border: 1px solid var(--zmx-header-border);
    border-radius: 13px;
    background: #ffffff;
    color: #111318;
    font-size: 16px;
    cursor: pointer;
}

body.shop-page .zmx-menu-panel .mobile-menu-section {
    border: 1px solid #ededf1;
    border-radius: 18px;
    padding: 12px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.035);
}

body.shop-page .zmx-menu-panel .mobile-menu-section + .mobile-menu-section {
    margin-top: 11px;
}

body.shop-page .zmx-menu-panel .mobile-menu-link,
body.shop-page .zmx-menu-panel .mobile-category-summary,
body.shop-page .zmx-menu-panel .mobile-category-link {
    opacity: 0;
    transform: translateX(-9px);
    transition:
        opacity 210ms ease,
        transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
        background 160ms ease;
    transition-delay: 0ms;
}

body.shop-page .zmx-menu-panel.is-open .mobile-menu-link,
body.shop-page .zmx-menu-panel.is-open .mobile-category-summary,
body.shop-page .zmx-menu-panel.is-open .mobile-category-link {
    opacity: 1;
    transform: translateX(0);
    transition-delay: calc(var(--zmx-item-index, 0) * 22ms + 70ms);
}

body.shop-page .zmx-filter-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 9700;
    display: block;
    visibility: hidden;
    width: min(390px, 94vw);
    padding: 22px;
    overflow-y: auto;
    border-left: 1px solid #e8e8ed;
    background: #ffffff;
    box-shadow: -18px 0 55px rgba(15, 23, 42, 0.2);
    opacity: 0;
    transform: translate3d(105%, 0, 0);
    transition:
        transform 310ms cubic-bezier(0.2, 0.82, 0.2, 1),
        opacity 190ms ease,
        visibility 0s linear 310ms;
}

body.shop-page .zmx-filter-panel.is-mounted {
    visibility: visible;
    transition-delay: 0s;
}

body.shop-page .zmx-filter-panel.is-open {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

body.shop-page .zmx-filter-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 18px;
    border-bottom: 1px solid #eeeeF2;
}

body.shop-page .zmx-filter-eyebrow {
    display: block;
    margin-bottom: 4px;
    color: var(--zmx-header-purple);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.shop-page .zmx-filter-header h2 {
    margin: 0;
    color: #111318;
    font-size: 25px;
    font-weight: 950;
    letter-spacing: -0.04em;
}

body.shop-page .zmx-filter-close {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--zmx-header-border);
    border-radius: 14px;
    background: #ffffff;
    color: #111318;
    font-size: 18px;
    cursor: pointer;
}

body.shop-page .zmx-filter-section {
    margin-top: 22px;
}

body.shop-page .zmx-filter-section h3 {
    margin: 0 0 11px;
    color: #111318;
    font-size: 15px;
    font-weight: 900;
}

body.shop-page .zmx-filter-category-list {
    display: grid;
    gap: 8px;
}

body.shop-page .zmx-filter-category {
    display: flex;
    min-height: 46px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 13px;
    border: 1px solid #e8e8ed;
    border-radius: 14px;
    background: #ffffff;
    color: #111318;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    transition:
        background 160ms ease,
        border-color 160ms ease,
        transform 160ms ease;
}

body.shop-page .zmx-filter-category:hover {
    border-color: #cdbbf6;
    background: #faf8ff;
    color: #111318;
    text-decoration: none;
    transform: translateX(-2px);
}

body.shop-page .zmx-filter-category.is-active {
    border-color: #111318;
    background: #111318;
    color: #ffffff;
}

body.shop-page .zmx-filter-note {
    margin: 22px 0 0;
    padding: 13px;
    border-radius: 14px;
    background: #f7f7fa;
    color: #686b75;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.45;
}

html.zmx-drawer-lock,
html.zmx-drawer-lock body {
    overflow: hidden !important;
    overscroll-behavior: none;
}

/* =========================================================
   Responsive layout
========================================================= */

@media (max-width: 1100px) {
    body.shop-page .zmx-header-row {
        grid-template-columns: minmax(205px, auto) minmax(260px, 1fr) auto;
        gap: 16px;
        padding-inline: 22px;
    }

    body.shop-page .zmx-brand-name {
        font-size: 22px;
    }

    body.shop-page .zmx-brand-logo {
        width: 43px;
        height: 43px;
    }
}

@media (max-width: 900px) {
    body.shop-page .zmx-shop-header {
        border-bottom: 0;
        box-shadow: none;
    }

    body.shop-page .zmx-header-row {
        display: flex;
        min-height: 76px;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 10px 14px 8px;
    }

    body.shop-page .zmx-header-brand-side {
        flex: 1 1 auto;
        gap: 8px;
        min-width: 0;
    }

    body.shop-page .zmx-menu-toggle {
        display: inline-block;
        width: 43px;
        height: 43px;
        border-radius: 15px;
    }

    body.shop-page .zmx-menu-line {
        left: 11px;
        width: 21px;
    }

    body.shop-page .zmx-brand {
        gap: 7px;
        min-width: 0;
    }

    body.shop-page .zmx-brand-logo {
        width: 38px;
        height: 38px;
    }

    body.shop-page .zmx-brand-name {
        max-width: 132px;
        overflow: hidden;
        font-size: 20px;
        letter-spacing: -0.05em;
        text-overflow: ellipsis;
    }

    body.shop-page .zmx-desktop-search {
        display: none !important;
    }

    body.shop-page .zmx-header-actions {
        flex: 0 0 auto;
        gap: 6px;
    }

    body.shop-page .zmx-guest-action {
        min-height: 42px;
        padding: 0 12px;
        border-radius: 14px;
        font-size: 12px;
    }

    body.shop-page .zmx-guest-action i {
        font-size: 16px;
    }

    body.shop-page .zmx-header-icon-wrap,
    body.shop-page .zmx-profile-image,
    body.shop-page .zmx-profile-fallback {
        width: 37px;
        height: 37px;
    }

    body.shop-page .zmx-header-icon-wrap {
        font-size: 18px;
    }

    body.shop-page .zmx-header-reward {
        max-width: 62px !important;
        margin-inline: 1px !important;
    }

    body.shop-page .zmx-header-reward .zms-topbar-wheel-window {
        --zms-reward-wheel-height: 27px;
        width: 58px !important;
    }

    body.shop-page .zmx-mobile-commerce-header {
        display: block;
        padding: 0 14px 4px;
    }

    body.shop-page .zmx-mobile-search {
        display: block;
    }

    body.shop-page .zmx-mobile-search .zmx-search-inner {
        min-height: 58px;
        grid-template-columns: 25px minmax(0, 1fr) 42px;
        padding-left: 16px;
        border-radius: 18px;
    }

    body.shop-page .zmx-mobile-search .zmx-search-inner input[type="search"] {
        height: 56px;
        font-size: 16px;
    }

    body.shop-page .zmx-mobile-commerce-header .zms-promo-mobile-slot {
        margin-top: 10px;
    }

    body.shop-page .zmx-filter-panel {
        top: auto;
        left: 0;
        width: 100%;
        max-height: min(76dvh, 680px);
        padding:
            18px 17px
            max(22px, env(safe-area-inset-bottom));
        border: 0;
        border-radius: 24px 24px 0 0;
        box-shadow: 0 -18px 55px rgba(15, 23, 42, 0.2);
        transform: translate3d(0, 105%, 0);
    }

    body.shop-page .zmx-filter-panel.is-open {
        transform: translate3d(0, 0, 0);
    }
}

@media (max-width: 620px) {
    body.shop-page .zmx-header-row {
        gap: 7px;
        padding-inline: 10px;
    }

    body.shop-page .zmx-menu-toggle {
        width: 41px;
        height: 41px;
    }

    body.shop-page .zmx-brand-logo {
        width: 34px;
        height: 34px;
    }

    body.shop-page .zmx-brand-name {
        max-width: 118px;
        font-size: 18px;
    }

    body.shop-page .zmx-guest-action {
        padding-inline: 10px;
    }

    body.shop-page .zmx-mobile-commerce-header {
        padding-inline: 11px;
    }
}

@media (max-width: 430px) {
    body.shop-page .zmx-header-row {
        padding-inline: 8px;
    }

    body.shop-page .zmx-header-brand-side {
        gap: 6px;
    }

    body.shop-page .zmx-brand-logo {
        width: 31px;
        height: 31px;
    }

    body.shop-page .zmx-brand-name {
        max-width: 104px;
        font-size: 17px;
    }

    body.shop-page .zmx-menu-toggle {
        width: 39px;
        height: 39px;
    }

    body.shop-page .zmx-menu-line {
        left: 10px;
        width: 19px;
    }

    body.shop-page .zmx-menu-line:nth-child(1) {
        top: 12px;
    }

    body.shop-page .zmx-menu-line:nth-child(2) {
        top: 18px;
    }

    body.shop-page .zmx-menu-line:nth-child(3) {
        top: 24px;
    }

    body.shop-page .zmx-menu-toggle.is-open .zmx-menu-line:nth-child(1),
    body.shop-page .zmx-menu-toggle.is-open .zmx-menu-line:nth-child(3) {
        top: 18px;
    }

    body.shop-page .zmx-guest-action {
        min-height: 39px;
        padding-inline: 9px;
        font-size: 11.5px;
    }

    body.shop-page .zmx-guest-action i {
        display: none;
    }

    body.shop-page .zmx-header-actions {
        gap: 4px;
    }

    body.shop-page .zmx-header-messages {
        display: none;
    }

    body.shop-page .zmx-header-icon-wrap,
    body.shop-page .zmx-profile-image,
    body.shop-page .zmx-profile-fallback {
        width: 34px;
        height: 34px;
    }

    body.shop-page .zmx-header-reward {
        max-width: 56px !important;
    }

    body.shop-page .zmx-header-reward .zms-topbar-wheel-window {
        width: 53px !important;
    }
}

@media (max-width: 365px) {
    body.shop-page .zmx-brand-name {
        max-width: 88px;
        font-size: 16px;
    }

    body.shop-page .zmx-reviews-action {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.shop-page .zmx-menu-panel,
    body.shop-page .zmx-menu-backdrop,
    body.shop-page .zmx-filter-panel,
    body.shop-page .zmx-filter-backdrop,
    body.shop-page .zmx-menu-line,
    body.shop-page .zmx-menu-panel .mobile-menu-link,
    body.shop-page .zmx-menu-panel .mobile-category-summary,
    body.shop-page .zmx-menu-panel .mobile-category-link {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}


/* =========================================================
   ZeroMaxShop header v2 refinements
========================================================= */

body.shop-page .zmx-brand-copy {
    display: grid;
    min-width: 0;
    gap: 4px;
}

body.shop-page .zmx-brand-subtitle {
    display: block;
    color: #7a7d87;
    font-size: 10.5px;
    font-weight: 750;
    letter-spacing: 0.055em;
    line-height: 1;
    text-transform: lowercase;
    white-space: nowrap;
}

body.shop-page .zmx-brand-name {
    max-width: none !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

/* Smaller, calmer desktop search. */
@media (min-width: 901px) {
    body.shop-page .zmx-header-row {
        min-height: 72px;
        padding-block: 9px;
    }

    body.shop-page .zmx-search-inner {
        min-height: 48px;
        grid-template-columns: 23px minmax(0, 1fr);
        gap: 9px;
        padding: 0 16px;
        border-radius: 17px;
    }

    body.shop-page .zmx-search-inner input[type="search"] {
        height: 46px;
        font-size: 15px;
    }

    body.shop-page .zmx-search-icon {
        font-size: 21px;
    }

    /* Desktop already has the category sidebar. */
    body.shop-page
    .zmx-desktop-search
    .zmx-filter-toggle {
        display: none !important;
    }

    body.shop-page .zmx-admin-action {
        min-height: 38px;
        padding-inline: 13px;
        border-radius: 12px;
        font-size: 12px;
    }

    body.shop-page .zmx-admin-action-list {
        border-color: #ed8c24 !important;
        background: linear-gradient(
            145deg,
            #ff9e37,
            #ef7c14
        ) !important;
        color: #ffffff !important;
        box-shadow: 0 8px 18px rgba(239, 124, 20, 0.2);
    }

    body.shop-page .zmx-admin-action-list:hover {
        border-color: #dc6e0b !important;
        background: #e97810 !important;
        color: #ffffff !important;
    }
}

/* Neutralize legacy anchor sizing so every customer icon is square. */
body.shop-page .zmx-header-actions > .zmx-header-icon-link,
body.shop-page .zmx-header-actions > .product-notification-clean-link,
body.shop-page .zmx-header-actions > .zmx-profile-link {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    max-width: 42px !important;
    max-height: 42px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: transparent !important;
    box-shadow: none !important;
    line-height: 1 !important;
}

body.shop-page .zmx-header-actions > .zmx-header-notification {
    flex: 0 0 42px !important;
}

/* Real filter controls. */
body.shop-page .zmx-filter-form {
    display: grid;
    gap: 0;
}

body.shop-page .zmx-sort-grid {
    display: grid;
    gap: 8px;
}

body.shop-page .zmx-filter-choice {
    position: relative;
    display: block;
    cursor: pointer;
}

body.shop-page .zmx-filter-choice input,
body.shop-page .zmx-size-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

body.shop-page .zmx-filter-choice span {
    display: flex;
    min-height: 45px;
    align-items: center;
    padding: 0 13px;
    border: 1px solid #e7e7ec;
    border-radius: 14px;
    background: #ffffff;
    color: #22242a;
    font-size: 13px;
    font-weight: 780;
    transition:
        border-color 160ms ease,
        background 160ms ease,
        color 160ms ease,
        transform 160ms ease;
}

body.shop-page .zmx-filter-choice input:checked + span {
    border-color: #16171b;
    background: #16171b;
    color: #ffffff;
}

body.shop-page .zmx-filter-choice:hover span {
    transform: translateX(-2px);
}

body.shop-page .zmx-filter-select {
    width: 100%;
    min-height: 46px;
    padding: 0 42px 0 13px;
    border: 1px solid #e7e7ec;
    border-radius: 14px;
    outline: 0;
    background:
        linear-gradient(45deg, transparent 50%, #202126 50%)
            calc(100% - 18px) 20px / 6px 6px no-repeat,
        linear-gradient(135deg, #202126 50%, transparent 50%)
            calc(100% - 12px) 20px / 6px 6px no-repeat,
        #ffffff;
    color: #202126;
    font: inherit;
    font-size: 13px;
    font-weight: 780;
    appearance: none;
}

body.shop-page .zmx-size-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

body.shop-page .zmx-size-choice {
    position: relative;
    cursor: pointer;
}

body.shop-page .zmx-size-choice span {
    display: inline-flex;
    min-width: 48px;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid #e5e5ea;
    border-radius: 13px;
    background: #ffffff;
    color: #292b31;
    font-size: 12px;
    font-weight: 850;
    transition:
        border-color 160ms ease,
        background 160ms ease,
        color 160ms ease,
        transform 160ms ease;
}

body.shop-page .zmx-size-choice input:checked + span {
    border-color: #7044d5;
    background: #f3edff;
    color: #4f279f;
}

body.shop-page .zmx-size-choice:hover span {
    transform: translateY(-1px);
}

body.shop-page .zmx-filter-actions {
    position: sticky;
    bottom: -22px;
    display: grid;
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
    gap: 10px;
    margin: 24px -22px -22px;
    padding: 15px 22px max(20px, env(safe-area-inset-bottom));
    border-top: 1px solid #ececf0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
}

body.shop-page .zmx-filter-reset,
body.shop-page .zmx-filter-apply {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
}

body.shop-page .zmx-filter-reset {
    border: 1px solid #dedee5;
    background: #ffffff;
    color: #202126;
}

body.shop-page .zmx-filter-apply {
    border: 1px solid #17181c;
    background: #17181c;
    color: #ffffff;
    cursor: pointer;
}

@media (max-width: 900px) {
    /* Remove the image logo on mobile and turn the name into the brand. */
    body.shop-page .zmx-brand-logo {
        display: none !important;
    }

    body.shop-page .zmx-brand-copy {
        display: block;
    }

    body.shop-page .zmx-brand-subtitle {
        display: none !important;
    }

    body.shop-page .zmx-brand-name {
        display: inline-flex;
        align-items: baseline;
        font-size: clamp(20px, 5.4vw, 25px) !important;
        font-weight: 950 !important;
        letter-spacing: -0.065em !important;
        line-height: 1 !important;
        white-space: nowrap !important;
        transform: scaleX(0.97);
        transform-origin: left center;
    }

    body.shop-page .zmx-brand-zero {
        color: #ef5b43;
    }

    body.shop-page .zmx-brand-max {
        color: #2f9ed8;
    }

    body.shop-page .zmx-brand-shop {
        color: #171b32;
    }

    body.shop-page .zmx-header-brand-side {
        min-width: 0;
    }

    body.shop-page .zmx-brand {
        min-width: 0;
    }

    /* Slightly shorter mobile search. */
    body.shop-page .zmx-mobile-search .zmx-search-inner {
        min-height: 50px;
        grid-template-columns: 22px minmax(0, 1fr) 38px;
        gap: 8px;
        padding: 0 7px 0 14px;
        border-radius: 17px;
    }

    body.shop-page
    .zmx-mobile-search
    .zmx-search-inner
    input[type="search"] {
        height: 48px;
        font-size: 15px;
    }

    body.shop-page .zmx-mobile-search .zmx-search-icon {
        font-size: 21px;
    }

    body.shop-page .zmx-mobile-search .zmx-filter-toggle {
        width: 36px;
        height: 36px;
        border-radius: 12px !important;
        font-size: 19px !important;
    }

    body.shop-page .zmx-header-actions > .zmx-header-icon-link,
    body.shop-page .zmx-header-actions > .product-notification-clean-link,
    body.shop-page .zmx-header-actions > .zmx-profile-link {
        width: 37px !important;
        height: 37px !important;
        min-width: 37px !important;
        min-height: 37px !important;
        max-width: 37px !important;
        max-height: 37px !important;
    }

    body.shop-page .zmx-header-actions > .zmx-header-notification {
        flex-basis: 37px !important;
    }

    body.shop-page .zmx-filter-actions {
        bottom: calc(-1 * max(22px, env(safe-area-inset-bottom)));
        margin:
            24px -17px
            calc(-1 * max(22px, env(safe-area-inset-bottom)));
        padding:
            14px 17px
            max(18px, env(safe-area-inset-bottom));
    }
}

@media (max-width: 430px) {
    body.shop-page .zmx-brand-name {
        font-size: clamp(18px, 5vw, 22px) !important;
    }
}

@media (max-width: 375px) {
    body.shop-page .zmx-brand-name {
        font-size: 18px !important;
        letter-spacing: -0.075em !important;
    }
}


/* =========================================================
   ZeroMaxShop desktop polish — v3
========================================================= */

/* Carry the mobile color treatment into the desktop wordmark. */
body.shop-page .zmx-brand-zero {
    color: #ef5b43;
}

body.shop-page .zmx-brand-max {
    color: #2f9ed8;
}

body.shop-page .zmx-brand-shop {
    color: #171b32;
}

/* Same font family, but a quieter secondary color. */
body.shop-page .zmx-brand-subtitle {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;
    color: #737782 !important;
    font-weight: 760;
}

/* Keep the orange List action stable in every interaction state. */
body.shop-page .zmx-admin-action-list,
body.shop-page .zmx-admin-action-list:link,
body.shop-page .zmx-admin-action-list:visited {
    border-color: #ed8c24 !important;
    background: linear-gradient(
        145deg,
        #ff9e37,
        #ef7c14
    ) !important;
    color: #ffffff !important;
    -webkit-tap-highlight-color: transparent;
}

body.shop-page .zmx-admin-action-list:hover,
body.shop-page .zmx-admin-action-list:focus {
    border-color: #dc6e0b !important;
    background: linear-gradient(
        145deg,
        #f58c26,
        #df700d
    ) !important;
    color: #ffffff !important;
    box-shadow: 0 10px 20px rgba(223, 112, 13, 0.24) !important;
}

body.shop-page .zmx-admin-action-list:focus-visible {
    border-color: #dc6e0b !important;
    background: linear-gradient(
        145deg,
        #f58c26,
        #df700d
    ) !important;
    color: #ffffff !important;
    outline: 3px solid rgba(237, 140, 36, 0.24) !important;
    outline-offset: 2px;
}

body.shop-page .zmx-admin-action-list:active {
    border-color: #cb6208 !important;
    background: #d96c0b !important;
    color: #ffffff !important;
    box-shadow: 0 5px 12px rgba(203, 98, 8, 0.2) !important;
    transform: translateY(0) scale(0.98) !important;
}


/* =========================================================
   ZeroMaxShop sticky storefront controls — v4
   Keeps the top row and search accessible while products scroll.
========================================================= */

body.shop-page .zmx-shop-header {
    position: sticky !important;
    top: 0;
    z-index: 4200;
    isolation: isolate;
    transition:
        box-shadow 180ms ease,
        border-color 180ms ease,
        background-color 180ms ease;
}

/* Slightly stronger separation only after the shopper starts scrolling. */
body.shop-page .zmx-shop-header.is-scrolled {
    border-bottom-color: rgba(215, 217, 224, 0.98);
    background: rgba(255, 255, 255, 0.985);
    box-shadow:
        0 10px 28px rgba(15, 23, 42, 0.085),
        0 1px 0 rgba(15, 23, 42, 0.04);
}

/*
   Promo cards intentionally live outside the sticky header. They remain
   near the top of the storefront but scroll away with the product page.
*/
body.shop-page .zmx-mobile-promo-host {
    display: none;
    width: 100%;
    min-width: 0;
}

@media (min-width: 901px) {
    /*
       Desktop search already lives in the main header row, so making the
       header sticky pins the brand, search, and account controls together.
    */
    body.shop-page .zmx-shop-header {
        min-height: 0;
    }
}

@media (max-width: 900px) {
    body.shop-page .zmx-shop-header {
        top: 0;
        border-bottom: 1px solid rgba(229, 230, 235, 0.9);
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 5px 18px rgba(15, 23, 42, 0.035);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
    }

    body.shop-page .zmx-shop-header.is-scrolled {
        box-shadow:
            0 9px 25px rgba(15, 23, 42, 0.105),
            0 1px 0 rgba(15, 23, 42, 0.045);
    }

    body.shop-page .zmx-mobile-commerce-header {
        padding-bottom: 9px;
        background: transparent;
    }

    body.shop-page .zmx-mobile-promo-host {
        display: block;
        padding: 0 11px;
        background: #ffffff;
    }

    body.shop-page .zmx-mobile-promo-host
    .zms-promo-mobile-slot {
        display: block;
        margin-top: 10px;
    }

    /*
       Keep search suggestions above the product grid and promo cards while
       the sticky header is active.
    */
    body.shop-page .zmx-mobile-search,
    body.shop-page .zmx-mobile-search .zmx-search-inner {
        position: relative;
        z-index: 2;
    }

    body.shop-page
    .zmx-mobile-search
    .search-suggestions-box {
        z-index: 4400;
    }
}

@media (max-width: 620px) {
    body.shop-page .zmx-mobile-promo-host {
        padding-inline: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.shop-page .zmx-shop-header {
        transition-duration: 0.01ms !important;
    }
}


/* =========================================================
   Dashboard brand consistency
========================================================= */

body.shop-page .zmx-brand-copy {
    display: grid !important;
    min-width: 0;
    justify-items: start;
    gap: 4px !important;
    text-align: left;
}

body.shop-page .zmx-brand-subtitle {
    display: block !important;
    color: #737782 !important;
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;
    font-weight: 760 !important;
}

@media (max-width: 900px) {
    body.shop-page .zmx-brand-logo {
        display: none !important;
    }

    body.shop-page .zmx-brand-copy {
        display: grid !important;
        gap: 3px !important;
    }

    body.shop-page .zmx-brand-subtitle {
        display: block !important;
        font-size: 9px !important;
        letter-spacing: 0.06em !important;
        line-height: 1 !important;
    }
}


/* =========================================================
   Filter & sort behavior fixes
========================================================= */

body.shop-page .zmx-filter-reset {
    margin: 0;
    padding: 0 14px;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition:
        border-color 150ms ease,
        background 150ms ease,
        color 150ms ease,
        transform 150ms ease;
}

body.shop-page .zmx-filter-reset:hover {
    border-color: #cfcfd7;
    background: #f7f7fa;
    color: #111318;
    transform: translateY(-1px);
}

body.shop-page .zmx-filter-reset.is-cleared {
    border-color: #bca5f7;
    background: #f5f0ff;
    color: #5630a7;
}

body.shop-page .zmx-filter-apply {
    font-family: inherit;
}

body.shop-page .zmx-filter-choice input:focus-visible + span,
body.shop-page .zmx-size-choice input:focus-visible + span,
body.shop-page .zmx-filter-select:focus-visible,
body.shop-page .zmx-filter-reset:focus-visible,
body.shop-page .zmx-filter-apply:focus-visible {
    outline: 3px solid rgba(113, 69, 214, 0.18);
    outline-offset: 2px;
}

/* ==========================================
   Slightly smaller Admin / List buttons
   Mobile only
========================================== */

@media (max-width: 900px) {
    body.shop-page .zmx-admin-action {
        min-height: 38px;
        padding: 0 12px;
        border-radius: 12px;
        font-size: 12px;
        font-weight: 850;
    }
}

@media (max-width: 430px) {
    body.shop-page .zmx-admin-action {
        min-height: 36px;
        padding: 0 11px;
        border-radius: 11px;
        font-size: 11.5px;
    }
}