/* ==========================================================================
   B2B Navigation & Compact Catalog Discovery
   ========================================================================== */

/* 1. Mega Menu Header (Overrides for nav#store-menu) */
body:not(:has(.admin-shell)) .app-header .header-inner {
    /* Keep the account dropdown above the catalogue bar (z-index: 900). */
    position: relative;
    z-index: 901;
    width: 100%;
    max-width: 830px;
    height: 54px;
    min-height: 54px;
    gap: clamp(16px, 2.4vw, 30px);
    padding-inline: 20px;
}
body:not(:has(.admin-shell)) .app-header .logo {
    flex-shrink: 0;
}
body:not(:has(.admin-shell)) .app-header .logo img {
    display: block;
    height: 32px;
    width: auto;
}
body:not(:has(.admin-shell)) .app-header .search-bar {
    flex: 1 1 420px;
    min-width: 220px;
    max-width: 440px;
    margin-inline: auto;
}
body:not(:has(.admin-shell)) .app-header .search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
    min-height: 38px;
    padding: 0;
    border: 1px solid #dce3ec;
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
    overflow: hidden;
    transition: border-color .15s ease, box-shadow .15s ease;
}
body:not(:has(.admin-shell)) .app-header .search-input-wrapper:hover {
    border-color: #c6cedb;
}
body:not(:has(.admin-shell)) .app-header .search-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, .15);
}
body:not(:has(.admin-shell)) .app-header #search-input {
    flex: 1;
    min-width: 0;
    height: 38px;
    padding: 0 13px;
    border: none;
    background: transparent;
    outline: none;
    font-size: .8125rem;
    color: var(--text-main);
}
body:not(:has(.admin-shell)) .app-header #search-input::placeholder {
    color: #98a2b3;
}
body:not(:has(.admin-shell)) .app-header #search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}
body:not(:has(.admin-shell)) .app-header .search-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 38px;
    padding: 0;
    border: none;
    border-left: 1px solid #dce3ec;
    border-radius: 0;
    background: #fff;
    color: #45586e;
    cursor: pointer;
    transition: background .15s ease, transform .15s ease;
}
body:not(:has(.admin-shell)) .app-header .search-submit:hover {
    background: #f3f6f9;
    color: #1768c5;
}
body:not(:has(.admin-shell)) .app-header .search-submit:focus-visible {
    outline-offset: -3px;
}

body:not(:has(.admin-shell)) .app-header .page-search-jump {
    display: none;
}

body:not(:has(.admin-shell)) .catalog-smart-search {
    position: relative;
    display: grid;
    grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    margin: 0 0 18px;
    padding: 14px;
    border: 1px solid transparent;
    border-radius: 14px;
    background:
        linear-gradient(135deg, #f8fbff, #fff) padding-box,
        linear-gradient(105deg, #78baf0 0%, #9a91e6 28%, #dea0cb 52%, #efb184 75%, #7ac9ce 100%) border-box;
    box-shadow: 0 10px 28px rgba(48, 83, 130, .09);
}

body:not(:has(.admin-shell)) .catalog-smart-search[hidden] {
    display: none;
}

body:not(:has(.admin-shell)) .catalog-smart-intro {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

body:not(:has(.admin-shell)) .catalog-smart-intro strong { font-size: 14px; color: #172033; }
body:not(:has(.admin-shell)) .catalog-smart-intro span { font-size: 12px; color: #69778b; line-height: 1.35; }
body:not(:has(.admin-shell)) .catalog-smart-form { position: relative; min-width: 0; }
body:not(:has(.admin-shell)) .catalog-smart-field {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    padding: 5px 5px 5px 15px;
    border: 1px solid transparent;
    border-radius: 11px;
    background:
        linear-gradient(#fff, #fff) padding-box,
        linear-gradient(105deg, #8bc5f0, #aca1eb 32%, #e4adcf 57%, #f0bb91 79%, #8bd3d3) border-box;
    box-shadow: 0 4px 14px rgba(31, 75, 128, .08);
}
body:not(:has(.admin-shell)) .catalog-smart-field:focus-within {
    box-shadow:
        0 0 0 4px rgba(122, 145, 229, .12),
        0 8px 24px rgba(45, 84, 140, .13);
}
body:not(:has(.admin-shell)) .catalog-smart-field > svg { width: 20px; color: #728197; }
body:not(:has(.admin-shell)) .catalog-smart-field input {
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    font-size: 14px;
}
body:not(:has(.admin-shell)) .catalog-smart-field button {
    min-height: 40px;
    padding: 0 18px;
    border: 0;
    border-radius: 8px;
    background: #2878ed;
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
body:not(:has(.admin-shell)) .catalog-smart-search .b2b-search-results[role="dialog"] { top: calc(100% + 5px); }

@media (max-width: 720px) {
    body:not(:has(.admin-shell)) .catalog-smart-search { grid-template-columns: 1fr; gap: 9px; padding: 11px; }
    body:not(:has(.admin-shell)) .catalog-smart-intro span { display: none; }
    body:not(:has(.admin-shell)) .catalog-smart-field { grid-template-columns: 20px minmax(0, 1fr); padding: 7px 10px; }
    body:not(:has(.admin-shell)) .catalog-smart-field button { grid-column: 1 / -1; width: 100%; }
}
body:not(:has(.admin-shell)) .app-header .search-submit:active {
    transform: scale(.98);
}
body:not(:has(.admin-shell)) .app-header .user-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: 0;
}
body:not(:has(.admin-shell)) .app-header .user-nav .nav-cart { order: 1; }
body:not(:has(.admin-shell)) .app-header .user-nav .nav-account-menu { order: 2; }
body:not(:has(.admin-shell)) .app-header .nav-account-menu {
    position: relative;
    flex: 0 0 auto;
}
body:not(:has(.admin-shell)) .app-header .nav-account-dropdown {
    position: absolute;
    z-index: 110;
    top: 100%;
    right: 0;
    display: grid;
    width: min(230px, calc(100vw - 24px));
    padding: 6px;
    border: 1px solid #dfe5ed;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(20, 36, 60, .14);
}
body:not(:has(.admin-shell)) .app-header .nav-account-dropdown[hidden] { display: none; }
body:not(:has(.admin-shell)) .app-header .nav-account-dropdown a,
body:not(:has(.admin-shell)) .app-header .nav-account-dropdown button {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #34465e;
    font: inherit;
    font-size: 13px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}
body:not(:has(.admin-shell)) .app-header .nav-account-dropdown a:hover,
body:not(:has(.admin-shell)) .app-header .nav-account-dropdown button:hover {
    background: #f3f8ff;
    color: #1768c5;
}
body:not(:has(.admin-shell)) .app-header .nav-account-dropdown a:focus-visible,
body:not(:has(.admin-shell)) .app-header .nav-account-dropdown button:focus-visible {
    outline: 2px solid #2878ed;
    outline-offset: -2px;
}
body:not(:has(.admin-shell)) .app-header .nav-account-dropdown .nav-account-logout {
    border-top: 1px solid #e7ebf0;
    border-radius: 0 0 6px 6px;
}

/* Keep locale switching accessible without adding another header row. */
body:not(:has(.admin-shell)) .footer-language-control {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
    margin: 0;
    padding: 4px 7px;
    border: 1px solid #dfe5ec;
    border-radius: 6px;
    background: transparent;
    color: #637287;
    box-shadow: none;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
body:not(:has(.admin-shell)) .footer-language-control:hover {
    border-color: #bac8d7;
    background: #fff;
}
body:not(:has(.admin-shell)) .footer-language-control:focus-within {
    border-color: #8aa8c7;
    box-shadow: 0 0 0 2px rgba(59, 103, 147, .13);
}
body:not(:has(.admin-shell)) .footer-language-control .language-control__icon {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    color: currentColor;
}
body:not(:has(.admin-shell)) .footer-language-control select {
    width: 30px;
    min-width: 30px;
    height: 24px;
    min-height: 24px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .04em;
    line-height: 24px;
    cursor: pointer;
    outline: none;
}
body:not(:has(.admin-shell)) .footer-language-control select option {
    color: #1d1d1f;
}
body:not(:has(.admin-shell)) .footer-language-control .language-control__chevron {
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    color: currentColor;
    pointer-events: none;
}

body:not(:has(.admin-shell)) .app-header .user-nav .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: .875rem;
    font-weight: 500;
    color: var(--text-main);
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
body:not(:has(.admin-shell)) .app-header .user-nav .nav-link:hover {
    background: #f1f4f9;
    text-decoration: none;
}
body:not(:has(.admin-shell)) .app-header .user-nav .nav-icon-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #dfe5ed;
    border-radius: 999px;
    background: #fff;
    color: #34465e;
    box-shadow: 0 1px 2px rgba(20, 36, 60, .04);
    cursor: pointer;
}
body:not(:has(.admin-shell)) .app-header .user-nav .nav-icon-action:hover {
    border-color: #bcd2ed;
    background: #f3f8ff;
    color: #1768c5;
    transform: translateY(-1px);
}
body:not(:has(.admin-shell)) .app-header .user-nav .nav-signout-action:hover {
    border-color: #edc5c8;
    background: #fff5f5;
    color: #b4232d;
}
body:not(:has(.admin-shell)) .app-header .user-nav .nav-icon-action:active {
    transform: translateY(0) scale(.97);
}
body:not(:has(.admin-shell)) .app-header .user-nav .nav-icon-action:focus-visible {
    outline: 2px solid #2878ed;
    outline-offset: 2px;
}
body:not(:has(.admin-shell)) .app-header .user-nav .nav-cart {
    flex: 0 0 36px;
    width: 36px;
    flex-direction: row;
    justify-content: center;
    gap: 8px;
    height: 36px;
    padding: 0;
    border: 1px solid #dfe5ed;
    border-radius: 999px;
    background: #fff;
    color: #34465e;
    font-size: .875rem;
    font-weight: 600;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(20, 36, 60, .04);
}
body:not(:has(.admin-shell)) .app-header .user-nav .nav-cart:hover {
    border-color: #bcd2ed;
    background: #f3f8ff;
    color: #1768c5;
    transform: translateY(-1px);
}
body:not(:has(.admin-shell)) .app-header .user-nav .nav-cart:active {
    transform: translateY(0) scale(.98);
}
body:not(:has(.admin-shell)) .app-header .user-nav .nav-cart:focus-visible {
    outline: 2px solid #2878ed;
    outline-offset: 2px;
}
body:not(:has(.admin-shell)) .app-header .user-nav .nav-cart .cart-icon-wrapper {
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
}
body:not(:has(.admin-shell)) .app-header .user-nav .nav-cart .nav-text {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip-path: none;
    white-space: nowrap;
}
body:not(:has(.admin-shell)) .app-header .user-nav .nav-signin {
    display: inline-flex;
    flex-direction: row;
    justify-content: center;
    order: 2;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #dfe5ed;
    border-radius: 50%;
    background: #fff;
    color: #344054;
    font-weight: 600;
}
body:not(:has(.admin-shell)) .app-header .user-nav .nav-signin span { display: none; }
body:not(:has(.admin-shell)) .app-header .user-nav .nav-signin:hover {
    border-color: transparent;
    background: transparent;
    color: var(--primary);
    text-decoration: none;
}
body:not(:has(.admin-shell)) .app-header .user-nav .nav-signin svg {
    flex: none;
    transition: transform .15s ease;
}
body:not(:has(.admin-shell)) .app-header .user-nav .nav-signin:hover svg {
    transform: translateY(-1px);
}
body:not(:has(.admin-shell)) .app-header .user-nav .btn-primary {
    height: 40px;
    padding: 0 22px;
    font-size: .875rem;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .06);
}
body:not(:has(.admin-shell)) .store-mega-menu {
    background: #f5f8fc;
    border-top: 1px solid #edf1f6;
    border-bottom: 1px solid #dbe3ed;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .9),
        0 2px 5px rgba(28, 50, 82, .035);
    position: relative;
    z-index: 900;
}

body:not(:has(.admin-shell)) .store-mega-menu > .container {
    position: relative;
    width: calc(100% - 48px);
}
#store-menu [hidden] {
    display: none !important;
}
#store-menu :is(button, a, input):focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
}
#store-menu .b2b-menu-error {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
    font-size: 13px;
}

body:not(:has(.admin-shell)) .b2b-nav-skeleton {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 1rem;
}
body:not(:has(.admin-shell)) .b2b-skeleton-item {
    width: 80px;
    height: 20px;
    background: #f0f0f0;
    border-radius: 4px;
    animation: pulse 1.5s infinite;
}

body:not(:has(.admin-shell)) .b2b-top-nav {
    display: flex;
    width: 100%;
    max-width: 830px;
    min-height: 36px;
    align-items: center;
    list-style: none;
    flex-wrap: wrap;
    gap: 0 10px;
    margin: 0 auto;
    padding: 0 20px;
}

body:not(:has(.admin-shell)) .b2b-top-nav-immediate {
    opacity: .92;
}

body:not(:has(.admin-shell)) .b2b-nav-link {
    display: flex;
    align-items: center;
    min-height: 34px;
    gap: 8px;
    padding: 0.25rem 13px;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    color: #46566b;
    background: transparent;
    border: 0;
    border-radius: 5px;
    white-space: nowrap;
    cursor: pointer;
    border-bottom: 0;
    text-decoration: none;
}

body:not(:has(.admin-shell)) .b2b-nav-icon {
    flex: 0 0 auto;
    color: #31516f;
}

body:not(:has(.admin-shell)) .b2b-nav-all {
    margin: 2px 4px 2px 0;
    min-height: 34px;
    padding-block: 0;
    color: #1670d5;
    background: #edf6ff;
}

/* A brand is both a destination and a panel: the label navigates, the caret opens the models. */
body:not(:has(.admin-shell)) .b2b-nav-item.has-dropdown {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

body:not(:has(.admin-shell)) .b2b-nav-link.is-linked {
    padding-right: 4px;
}

body:not(:has(.admin-shell)) .b2b-nav-caret {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    width: 28px;
    padding: 0;
    font: inherit;
    color: #5f7188;
    background: transparent;
    border: 0;
    border-bottom: 0;
    cursor: pointer;
}

body:not(:has(.admin-shell)) .b2b-nav-item.is-open > .b2b-nav-link,
body:not(:has(.admin-shell)) .b2b-nav-item.is-open > .b2b-nav-caret,
body:not(:has(.admin-shell)) .b2b-nav-item.has-dropdown:hover > .b2b-nav-link,
body:not(:has(.admin-shell)) .b2b-nav-item.has-dropdown:hover > .b2b-nav-caret,
body:not(:has(.admin-shell)) .b2b-nav-link:hover,
body:not(:has(.admin-shell)) .b2b-nav-link:focus-visible {
    color: #1768c5;
    background: #e8eef6;
    text-decoration: none;
}

body:not(:has(.admin-shell)) .b2b-nav-item.is-open > .b2b-nav-link,
body:not(:has(.admin-shell)) .b2b-nav-item.is-open > .b2b-nav-caret {
    color: #075ead;
    background: #eaf3ff;
    border-bottom-color: #075ead;
    box-shadow: inset 0 3px 0 #075ead;
}

/* Mega Dropdown */
@media (min-width: 769px) {
    body:not(:has(.admin-shell)):has(.b2b-nav-item.is-open) .app-header {
        position: relative;
    }
}

body:not(:has(.admin-shell)) .b2b-dropdown-overlay {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 18px 44px rgba(16, 55, 96, 0.2);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    height: auto;
    min-height: 0;
    border: 2px solid #2b7dcc;
    border-top-width: 3px;
    border-radius: 0 0 8px 8px;
    box-sizing: border-box;
}

body:not(:has(.admin-shell)) .b2b-nav-item.is-open > .b2b-dropdown-overlay {
    display: flex;
}

body:not(:has(.admin-shell)) .b2b-mega-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    margin: 0 auto;
    height: auto;
}

body:not(:has(.admin-shell)) .b2b-mega-families {
    width: 100%;
    flex: 0 0 auto;
    background: #f8fafc;
    border-right: 0;
    border-bottom: 1px solid var(--border-light);
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 20px;
    scrollbar-width: thin;
}

/* A family row is a destination (the label) plus a preview control (the caret). */
body:not(:has(.admin-shell)) .b2b-family-row {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

body:not(:has(.admin-shell)) .b2b-family-link {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 0.5rem 0.25rem 0.5rem 1.25rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #1d1d1f;
    text-decoration: none;
}

body:not(:has(.admin-shell)) .b2b-family-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 0 0 auto;
    min-height: 38px;
    padding: 7px 14px;
    background: #fff;
    border: 1px solid #dce3ed;
    border-radius: 999px;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #34465e;
    white-space: nowrap;
    cursor: pointer;
}

body:not(:has(.admin-shell)) .b2b-family-row:hover,
body:not(:has(.admin-shell)) .b2b-family-row:focus-within {
    background: transparent;
}

body:not(:has(.admin-shell)) .b2b-family-row.active {
    background: transparent;
    box-shadow: none;
}

body:not(:has(.admin-shell)) .b2b-family-row.active .b2b-family-link,
body:not(:has(.admin-shell)) .b2b-family-row.active .b2b-family-btn,
body:not(:has(.admin-shell)) .b2b-family-link:hover {
    font-weight: 600;
    color: var(--primary);
    border-color: #9fc3f3;
    background: #edf5ff;
    text-decoration: none;
}

body:not(:has(.admin-shell)) .b2b-mega-models {
    flex: 0 0 auto;
    min-width: 0;
    padding: 10px 20px 18px;
    overflow: visible;
    background: #fff;
}

body:not(:has(.admin-shell)) .b2b-mega-heading {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 4;
    background: #fff;
}
body:not(:has(.admin-shell)) :is(.b2b-menu-close, .b2b-menu-back, .b2b-menu-retry) {
    flex: 0 0 auto;
    align-self: flex-start;
    border: 1px solid #dbe2eb;
    border-radius: 4px;
    background: #fff;
    color: #48617e;
    padding: 7px 11px;
    min-height: 32px;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}
body:not(:has(.admin-shell)) .b2b-menu-back {
    display: none;
}
body:not(:has(.admin-shell)) .b2b-model-search-wrap {
    display: block;
    position: relative;
    width: 100%;
    max-width: 420px;
}
body:not(:has(.admin-shell)) .b2b-model-search-wrap > span {
    position: absolute;
    width: 1px;
    height: 1px;
    clip-path: inset(50%);
    overflow: hidden;
    white-space: nowrap;
}
body:not(:has(.admin-shell)) .b2b-model-status {
    margin: 0 0 8px;
    color: #64748b;
    font-size: 12px;
}
body:not(:has(.admin-shell)) .b2b-family-all {
    display: flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    font-size: 12.5px;
    font-weight: 600;
    min-height: 36px;
    padding: 8px 0 0;
    margin-top: 10px;
    color: var(--primary);
    border-top: 1px solid #edf0f5;
    text-decoration: none;
}
body:not(:has(.admin-shell)) .b2b-family-all:hover {
    text-decoration: underline;
}
body:not(:has(.admin-shell)) .b2b-family-all small {
    font-weight: 500;
    color: #64748b;
}
body:not(:has(.admin-shell)) .b2b-mega-brands {
    padding: 0 0 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid #dfe5ee;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
body:not(:has(.admin-shell)) .b2b-brand-families.active {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    min-width: max-content;
}
body:not(:has(.admin-shell)) .b2b-brand-btn {
    padding: 7px 9px;
    min-height: 34px;
    font: inherit;
    font-size: 12px;
    background: #fff;
    color: #344b66;
    border: 1px solid #d9e1ed;
    border-radius: 4px;
    cursor: pointer;
}
body:not(:has(.admin-shell)) .b2b-brand-btn.active {
    border-color: var(--primary);
    color: var(--primary);
    background: #edf5ff;
}
body:not(:has(.admin-shell)) .b2b-model-search {
    width: 100%;
    max-width: 360px;
    height: 44px;
    padding: 8px 11px;
    margin: 0;
    font: inherit;
    font-size: 13px;
    background: #fff;
    border: 2px solid #70a8e4;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(26, 91, 163, .08);
}

body:not(:has(.admin-shell)) .b2b-mega-view-all {
    font-size: 0.8125rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}
body:not(:has(.admin-shell)) .b2b-mega-view-all:hover {
    text-decoration: underline;
}

body:not(:has(.admin-shell)) .b2b-models-grid {
    display: none;
}

body:not(:has(.admin-shell)) .b2b-models-grid.active {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

body:not(:has(.admin-shell)) .b2b-model-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
    gap: 2px 16px;
    align-content: start;
}

body:not(:has(.admin-shell)) .b2b-model-series {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    align-items: start;
    gap: 10px;
}

body:not(:has(.admin-shell)) .b2b-model-series-group {
    min-width: 0;
    padding: 0;
    border: 1px solid #e4e9f0;
    border-radius: 8px;
    background: #fbfcfe;
}
body:not(:has(.admin-shell)) .b2b-model-series-group[open] { grid-column: span 1; border-color: #a9c9eb; box-shadow: 0 4px 12px rgba(24, 89, 168, .07); }
body:not(:has(.admin-shell)) .b2b-model-series-group > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 42px; padding: 9px 11px; list-style: none; cursor: pointer; color: #26384d; font-size: 13px; font-weight: 700; }
body:not(:has(.admin-shell)) .b2b-model-series-group > summary::after { content: '›'; margin-left: auto; color: #6b7f96; font-size: 18px; line-height: 1; transform: rotate(90deg); }
body:not(:has(.admin-shell)) .b2b-model-series-group > summary::-webkit-details-marker { display: none; }
body:not(:has(.admin-shell)) .b2b-model-series-group:not([open]) > .b2b-series-body { display: none; }
body:not(:has(.admin-shell)) .b2b-model-series-group > summary small { padding: 2px 6px; border-radius: 999px; background: #e9f2fc; color: #557698; font-size: 10px; }
body:not(:has(.admin-shell)) .b2b-model-series-group[open] > summary { border-bottom: 1px solid #e1e8f0; background: #eff6ff; color: #155fae; }
body:not(:has(.admin-shell)) .b2b-model-series-group[open] > summary::after { transform: rotate(-90deg); }
body:not(:has(.admin-shell)) .b2b-series-body { padding: 7px; }
body:not(:has(.admin-shell)) .b2b-series-more {
    display: inline-block;
    margin: 5px 3px 1px;
    padding: 2px 0;
    border: 0;
    background: transparent;
    color: var(--primary);
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}
body:not(:has(.admin-shell)) .b2b-series-more:hover,
body:not(:has(.admin-shell)) .b2b-series-more:focus-visible {
    text-decoration: underline;
}

body:not(:has(.admin-shell)) .b2b-model-series-group h4 {
    display: flex;
    align-items: baseline;
    gap: 7px;
    margin: 0 0 5px;
    padding: 0 2px 8px;
    border-bottom: 1px solid #e5eaf1;
    color: #26384d;
    font-size: 0.8125rem;
    font-weight: 700;
}

body:not(:has(.admin-shell)) .b2b-model-series-group .b2b-model-links {
    display: flex;
    flex-direction: column;
    gap: 1px;
    max-height: none;
    overflow-y: visible;
    overscroll-behavior: auto;
}

body:not(:has(.admin-shell)) .b2b-model-series-group .b2b-model-link {
    flex: 0 0 auto;
    min-height: 31px;
    padding: 4px 3px;
}

body:not(:has(.admin-shell)) .b2b-model-series-group h4 small {
    color: #7b8798;
    font-size: 0.6875rem;
    font-weight: 500;
}

body:not(:has(.admin-shell)) .b2b-model-link {
    font-size: 0.8125rem;
    color: #1d1d1f;
    text-decoration: none;
    display: flex;
    align-items: center;
    min-height: 34px;
    padding: 5px 8px;
    line-height: 1.4;
    border-radius: 4px;
    white-space: normal;
    overflow-wrap: anywhere;
}

body:not(:has(.admin-shell)) .b2b-model-expand {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 36px;
    padding: 7px 11px;
    margin-top: 12px;
    border: 1px solid #cfe0f4;
    border-radius: 6px;
    background: #f4f8fd;
    color: #1768bd;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
}
body:not(:has(.admin-shell)) .b2b-model-expand:hover {
    border-color: #9fc2e8;
    background: #eaf3fd;
}

body:not(:has(.admin-shell)) .b2b-model-link:hover {
    color: var(--primary);
    background: #f0f6ff;
    text-decoration: none;
}
body:not(:has(.admin-shell)) .b2b-model-link[aria-current="page"] {
    background: #e9f2ff;
    color: var(--primary);
    font-weight: 600;
}

body:not(:has(.admin-shell)) .b2b-mega-accessories {
    display: flex;
    flex-wrap: wrap;
    align-content: start;
    gap: 8px 24px;
    padding: 24px;
    width: 100%;
    overflow: auto;
}

body:not(:has(.admin-shell)) .b2b-acc-group {
    min-width: 220px;
}
body:not(:has(.admin-shell)) .b2b-acc-group h4 {
    font-size: 0.8125rem;
    text-transform: uppercase;
    color: var(--apple-muted);
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 0.25rem;
}
body:not(:has(.admin-shell)) .b2b-acc-link {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1d1d1f;
    padding: 0.25rem 0;
    text-decoration: none;
}
body:not(:has(.admin-shell)) .b2b-acc-link:hover {
    color: var(--primary);
}


/* Mobile menu handling */
body:not(:has(.admin-shell)) .b2b-mobile-toggle {
    display: none;
}
body:not(:has(.admin-shell)) .mobile-chevron {
    display: block;
    width: 12px;
    opacity: 0.55;
}
@media (min-width: 769px) and (max-width: 960px) {
    body:not(:has(.admin-shell)) .app-header .header-inner {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        height: auto;
        min-height: 0;
        gap: 10px;
        padding-block: 12px;
    }
    body:not(:has(.admin-shell)) .app-header .logo {
        grid-column: 1;
        grid-row: 1;
    }
    body:not(:has(.admin-shell)) .app-header .logo img {
        height: 30px;
    }
    body:not(:has(.admin-shell)) .app-header .user-nav {
        grid-column: 2;
        grid-row: 1;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 8px;
        min-width: 0;
    }
    body:not(:has(.admin-shell)) .app-header .search-bar {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        min-width: 0;
        max-width: none;
    }
}

@media (max-width: 768px) {
    body:not(:has(.admin-shell)) .b2b-mobile-toggle {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        background: none;
        border: none;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        font-weight: 600;
        color: #1d1d1f;
        cursor: pointer;
        width: 100%;
        text-align: left;
    }
    body:not(:has(.admin-shell)) .mobile-chevron {
        display: block;
        transition: transform 0.2s;
    }
    body:not(:has(.admin-shell)) .b2b-top-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        flex-wrap: nowrap;
        width: 100%;
        max-height: none;
        max-width: 100%;
        overflow-x: hidden;
        overflow-y: visible;
        background: #fff;
        box-shadow: 0 12px 24px #14233b26;
        border-top: 1px solid var(--border-light);
    }
    body:not(:has(.admin-shell)) .store-mega-menu > .container {
        width: calc(100% - 24px);
    }
    body:not(:has(.admin-shell)) .b2b-top-nav.mobile-open {
        display: flex;
    }
    body:not(:has(.admin-shell)) .b2b-nav-item {
        border-bottom: 1px solid var(--border-light);
    }
    body:not(:has(.admin-shell)) .b2b-nav-link {
        width: 100%;
        padding: 0.8rem 1rem;
        justify-content: flex-start;
    }
    body:not(:has(.admin-shell)) .b2b-nav-link .mobile-chevron {
        margin-left: auto;
    }
    body:not(:has(.admin-shell)) .b2b-dropdown-overlay {
        position: static;
        display: none;
        height: auto;
        box-shadow: none;
        border-top: 1px solid var(--border-light);
        border-bottom: none;
        padding: 0;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    body:not(:has(.admin-shell)) .b2b-nav-item.is-open > .b2b-dropdown-overlay {
        display: flex;
        flex-direction: column;
    }
    body:not(:has(.admin-shell)) .b2b-nav-item.is-open > .b2b-nav-link .mobile-chevron {
        transform: rotate(180deg);
    }
    body:not(:has(.admin-shell)) .b2b-mega-layout {
        flex-direction: column;
        height: auto;
        min-width: 0;
        max-width: 100%;
        overflow-x: hidden;
    }
    body:not(:has(.admin-shell)) .b2b-mega-families {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        height: auto;
        max-height: 200px;
        border-right: none;
        border-bottom: 1px solid var(--border-light);
        padding: 10px;
    }
    body:not(:has(.admin-shell)) .b2b-family-row {
        flex: 1 1 140px;
        border: 1px solid #dce3eb;
        border-radius: 4px;
        background: #fff;
    }
    body:not(:has(.admin-shell)) .b2b-family-row.active {
        border-color: var(--primary);
        background: #edf5ff;
        box-shadow: none;
    }
    body:not(:has(.admin-shell)) .b2b-family-link {
        min-height: 38px;
        padding: 8px 6px 8px 10px;
    }
    body:not(:has(.admin-shell)) .b2b-family-btn {
        flex: 1 1 auto;
        width: 100%;
        min-height: 38px;
        padding: 8px 10px;
        border: 0;
        border-radius: 4px;
    }
    body:not(:has(.admin-shell)) .b2b-nav-item.is-open > .b2b-dropdown-overlay {
        flex: 1 0 100%;
    }
    body:not(:has(.admin-shell)) .b2b-nav-link.is-linked {
        width: auto;
        flex: 1 1 auto;
    }
    body:not(:has(.admin-shell)) .b2b-nav-caret {
        width: 48px;
        min-height: 46px;
    }
    body:not(:has(.admin-shell)) .b2b-nav-item.is-open > .b2b-nav-caret .mobile-chevron {
        transform: rotate(180deg);
    }
    body:not(:has(.admin-shell)) .b2b-mega-models {
        height: auto;
        max-height: none;
        padding: 1rem;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    body:not(:has(.admin-shell)) .b2b-mega-heading {
        position: static;
    }
    body:not(:has(.admin-shell)) .b2b-model-search-wrap,
    body:not(:has(.admin-shell)) .b2b-model-search {
        max-width: none;
    }
    body:not(:has(.admin-shell)) .b2b-model-series {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    body:not(:has(.admin-shell)) .b2b-models-grid,
    body:not(:has(.admin-shell)) .b2b-model-series,
    body:not(:has(.admin-shell)) .b2b-model-series-group {
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }
    body:not(:has(.admin-shell)) .b2b-model-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4px;
    }
    body:not(:has(.admin-shell)) .b2b-model-link {
        min-height: 40px;
    }
    body:not(:has(.admin-shell)) .b2b-brand-families.active {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }
    body:not(:has(.admin-shell)) .b2b-mega-heading small {
        display: block;
        margin: 4px 0 0;
    }
    body:not(:has(.admin-shell)) .b2b-menu-back {
        display: block;
        margin-top: 14px;
    }
}

/* Narrow screens use one shared header layout for every public route. */
@media (max-width: 1023px) {
    body:not(:has(.admin-shell)) .app-header .header-inner {
        padding-inline: 16px;
    }
    body:not(:has(.admin-shell)) .app-header .search-bar {
        min-width: 0;
    }
}

@media (max-width: 768px) {
    body:not(:has(.admin-shell)) .app-header .header-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: 46px auto;
        align-items: center;
        gap: 10px 12px;
        min-height: 0;
        height: auto;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    body:not(:has(.admin-shell)) .app-header .logo {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
        justify-self: start;
    }

    body:not(:has(.admin-shell)) .app-header .logo img {
        width: auto;
        height: 42px;
        max-width: min(100%, 190px);
    }

    body:not(:has(.admin-shell)) .app-header .user-nav {
        grid-column: 2;
        grid-row: 1;
        margin: 0;
        min-width: 0;
        flex-wrap: nowrap;
        justify-content: flex-end;
        gap: 8px !important;
    }

    body:not(:has(.admin-shell)) .app-header .search-bar {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        max-width: none;
        margin: 0 !important;
    }

}

@media (max-width: 480px) {
    body:not(:has(.admin-shell)) .app-header .header-inner {
        grid-template-columns: minmax(112px, 1fr) auto;
        grid-template-rows: 40px auto;
        gap: 8px;
        padding-left: 12px;
        padding-right: 12px;
    }

    body:not(:has(.admin-shell)) .app-header .logo {
        grid-column: 1;
        grid-row: 1;
    }

    body:not(:has(.admin-shell)) .app-header .logo img {
        height: 40px;
        max-width: min(100%, 170px);
    }

    body:not(:has(.admin-shell)) .app-header .user-nav {
        grid-column: 2;
        grid-row: 1;
        width: auto;
        justify-content: flex-end;
        overflow: visible;
    }

    body:not(:has(.admin-shell)) .app-header .nav-signin {
        width: 36px;
        height: 36px;
        padding: 0;
        justify-content: center;
        border: 0;
        border-radius: 999px;
        background: transparent;
    }

    body:not(:has(.admin-shell)) .app-header .nav-signin span {
        display: none;
    }

    body:not(:has(.admin-shell)) .app-header .user-nav .nav-register {
        min-width: 0;
        max-width: 142px;
        min-height: 40px;
        padding: 0 10px;
        overflow: hidden;
        font-size: 12px;
        font-weight: 650;
        color: #1769aa;
        white-space: nowrap;
        text-overflow: ellipsis;
        border: 1px solid #bdd1e5;
        border-radius: 8px;
        background: #f7fbff;
        box-shadow: none;
    }

    body:not(:has(.admin-shell)) .app-header .user-nav .nav-register:hover,
    body:not(:has(.admin-shell)) .app-header .user-nav .nav-register:focus-visible {
        color: #0f568f;
        border-color: #82add3;
        background: #edf6fd;
        box-shadow: none;
    }

    body:not(:has(.admin-shell)) .app-header .user-nav .nav-link {
        min-width: 40px;
        min-height: 40px;
    }

    body:not(:has(.admin-shell)) .app-header .search-bar {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

/* Reflow for a 320px mobile viewport at 200% browser zoom. */
@media (max-width: 240px) {
    body:not(:has(.admin-shell)) .app-header .header-inner {
        grid-template-rows: 40px auto auto;
    }

    body:not(:has(.admin-shell)) .app-header .user-nav {
        grid-column: 1;
        grid-row: 2;
        width: 100%;
        justify-content: flex-start;
    }

    body:not(:has(.admin-shell)) .app-header .search-bar {
        grid-column: 1;
        grid-row: 3;
    }

    body:not(:has(.admin-shell)) .app-header .user-nav {
        flex-wrap: wrap;
        overflow: visible;
    }

    body:not(:has(.admin-shell)) .app-header .user-nav .btn-primary {
        width: 100%;
        max-width: none;
        height: auto;
        padding-block: 9px;
        white-space: normal;
        text-align: center;
        text-overflow: clip;
    }

    body:not(:has(.admin-shell)) .app-header .search-input-wrapper {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 42px;
        min-height: 38px;
        padding: 0;
    }

    body:not(:has(.admin-shell)) .app-header .search-submit {
        grid-column: 2;
        width: 42px;
        min-height: 38px;
        height: 38px;
        padding: 0;
    }
}

/* Pinch/page scaling keeps the layout viewport wide; mirror the visual viewport. */
body[data-header-zoomed]:not(:has(.admin-shell)) .app-header {
    width: var(--header-visual-width);
    max-width: var(--header-visual-width);
    box-sizing: border-box;
}

body[data-header-zoomed]:not(:has(.admin-shell)) .app-header .header-inner {
    width: var(--header-visual-width);
    margin-left: 0;
    margin-right: auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 40px auto auto;
    gap: 8px;
    padding-left: 12px;
    padding-right: 12px;
}

body[data-header-zoomed]:not(:has(.admin-shell)) .app-header .logo {
    grid-column: 1;
    grid-row: 1;
}

body[data-header-zoomed]:not(:has(.admin-shell)) .app-header .logo img {
    height: 40px;
    max-width: min(100%, 170px);
}

body[data-header-zoomed]:not(:has(.admin-shell)) .app-header .user-nav {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    min-width: 0;
    margin: 0;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px !important;
    overflow: visible;
}

body[data-header-zoomed]:not(:has(.admin-shell)) .app-header .nav-signin {
    width: 38px;
    height: 38px;
    padding: 0;
    justify-content: center;
}

body[data-header-zoomed]:not(:has(.admin-shell)) .app-header .nav-signin span {
    display: none;
}

body[data-header-zoomed]:not(:has(.admin-shell)) .app-header .user-nav .btn-primary {
    width: 100%;
    max-width: none;
    height: auto;
    min-height: 40px;
    padding: 9px 8px;
    white-space: normal;
    text-align: center;
    text-overflow: clip;
}

body[data-header-zoomed]:not(:has(.admin-shell)) .app-header .search-bar {
    grid-column: 1;
    grid-row: 3;
    width: 100%;
    max-width: none;
    margin: 0 !important;
}

body[data-header-zoomed]:not(:has(.admin-shell)) .app-header .search-input-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    min-height: 38px;
    padding: 0;
}

body[data-header-zoomed]:not(:has(.admin-shell)) .app-header .search-submit {
    grid-column: 2;
    width: 42px;
    min-height: 38px;
    height: 38px;
    padding: 0;
}

body[data-header-zoomed]:not(:has(.admin-shell)) .store-mega-menu > .container {
    width: calc(100% - 24px);
}


/* 2. Compact Catalog Discovery Area */
body:not(:has(.admin-shell)):has(.catalog-layout) .catalog-breadcrumb {
    display: none;
}
body:not(:has(.admin-shell)):has(.catalog-layout) .catalog-heading {
    display: none;
}
body:not(:has(.admin-shell)):has(.catalog-layout) .catalog-eyebrow {
    display: none;
}
body:not(:has(.admin-shell)) .catalog-table-model {
    color: var(--apple-text);
    font-size: 14px;
    letter-spacing: 0;
    text-transform: none;
}
body:not(:has(.admin-shell)) .catalog-table-count {
    margin-left: 8px;
    color: var(--apple-muted);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

/* Quick Categories (Pills) */

/* Category Models Selector (Make it very tight) */

/* Filter Bar (.catalog-refine-row) */
body:not(:has(.admin-shell)) .catalog-refine-row {
    display: flex;
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 8px 12px;
    background: #fff;
    border-radius: 6px;
    margin-bottom: 10px;
    border: 1px solid var(--border-light);
    box-shadow: none;
}
body:not(:has(.admin-shell)) .catalog-tool-field {
    font-size: 0.75rem;
    color: var(--apple-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
}
body:not(:has(.admin-shell)) .catalog-tool-field select {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 0.1rem 1.25rem 0.1rem 0.4rem;
    font-size: 0.8125rem;
    min-height: 32px;
    color: #1d1d1f;
}
body:not(:has(.admin-shell)) .stock-shortcut,
body:not(:has(.admin-shell)) #open-catalog-filters {
    min-height: 32px;
    padding: 0 0.5rem;
    font-size: 0.8125rem;
    border-radius: 4px;
    background: #fff;
    border: 1px solid var(--border-light);
    color: #1d1d1f;
    cursor: pointer;
    font-weight: 500;
}
body:not(:has(.admin-shell)) .stock-shortcut.active {
    background: #1d1d1f;
    color: #fff;
    border-color: #1d1d1f;
}
body:not(:has(.admin-shell)) #open-catalog-filters:hover,
body:not(:has(.admin-shell)) .stock-shortcut:hover:not(.active) {
    background: #e8e8ed;
}

/* Active Filters */
body:not(:has(.admin-shell)) .active-filters {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}
body:not(:has(.admin-shell)) .filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #eef5ff;
    border: 1px solid #cce0ff;
    color: var(--primary);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
}
body:not(:has(.admin-shell)) .filter-chip span {
    color: #8bb4e8;
    font-weight: bold;
}
body:not(:has(.admin-shell)) .filter-chip:hover {
    background: #dbeaff;
    text-decoration: none;
}
body:not(:has(.admin-shell)) .clear-filters {
    font-size: 0.75rem;
    color: var(--apple-muted);
    text-decoration: underline;
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.4rem;
}

body:not(:has(.admin-shell)) .catalog-sort {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
body:not(:has(.admin-shell)) .catalog-sort select {
    padding: 0.15rem 1.25rem 0.15rem 0.4rem;
    font-size: 0.8125rem;
    min-height: 32px;
    width: auto;
    max-width: 100%;
    color: #25364d;
    background: #fff;
    line-height: normal;
    border-radius: 4px;
    border: 1px solid var(--border-light);
}

body:not(:has(.admin-shell)) .catalog-price-notice {
    background: #f1f6fd;
    color: #3a5476;
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #dce7f5;
}
body:not(:has(.admin-shell)) .catalog-price-notice a {
    font-weight: 600;
    color: var(--primary);
}

/* Part type picker */
body:not(:has(.admin-shell)) .part-type-picker {
    margin-bottom: 1rem;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 0.75rem;
}
body:not(:has(.admin-shell)) .part-type-intro {
    display: none;
}
body:not(:has(.admin-shell)) .part-type-options {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}
body:not(:has(.admin-shell)) .part-type-option {
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
body:not(:has(.admin-shell)) .part-type-option b {
    background: rgba(0,0,0,0.05);
    padding: 0 4px;
    border-radius: 2px;
    font-weight: normal;
}
body:not(:has(.admin-shell)) .part-type-option small { display: none; }
body:not(:has(.admin-shell)) .part-type-option.active {
    background: #1d1d1f;
    color: #fff;
    border-color: #1d1d1f;
}
body:not(:has(.admin-shell)) .part-type-option.active b {
    background: rgba(255,255,255,0.2);
}

/* Desktop layout constraints */
@media (min-width: 1024px) {
    body:not(:has(.admin-shell)) .catalog-layout {
        --catalog-header-surface: #f5f5f7;
        --catalog-shell-border: var(--border-light);
        --catalog-shell-shadow: 0 2px 8px rgba(15, 23, 42, 0.035);
        display: grid !important;
        grid-template-columns: 256px minmax(0, 1fr);
        gap: 18px;
        align-items: start;
        margin-top: 12px !important;
    }
    body:not(:has(.admin-shell)) .catalog-sidebar {
        width: 256px;
        min-width: 256px;
        position: sticky;
        top: 126px;
        max-height: calc(100dvh - 142px);
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 14px;
        gap: 0;
        background: #fff;
        border: 1px solid var(--catalog-shell-border);
        border-radius: 10px;
        box-shadow: var(--catalog-shell-shadow);
        scrollbar-width: thin;
    }
    body:not(:has(.admin-shell)) .catalog-sidebar-heading {
        display: flex;
        height: 56px;
        min-height: 56px;
        flex: 0 0 56px;
        margin: -14px -14px 10px;
        padding: 0 14px;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        background: var(--catalog-header-surface);
        border-bottom: 1px solid var(--catalog-shell-border);
        border-radius: 9px 9px 0 0;
        box-sizing: border-box;
    }
    body:not(:has(.admin-shell)) .catalog-sidebar-heading span,
    body:not(:has(.admin-shell)) .catalog-desktop-filters > h3,
    body:not(:has(.admin-shell)) .catalog-sidebar-active > span {
        display: block;
        margin: 0;
        color: #64748b;
        font-size: 11px;
        font-weight: 600;
        letter-spacing: .06em;
        text-transform: uppercase;
    }
    body:not(:has(.admin-shell)) .catalog-sidebar-heading h2 {
        margin: 0;
        color: #0f172a;
        font-size: 14px;
        font-weight: 600;
        line-height: 1.25;
        letter-spacing: -0.015em;
    }
    body:not(:has(.admin-shell)) .catalog-sidebar .quick-categories {
        display: flex;
        flex-direction: column;
        gap: 2px;
        margin: 0 0 24px;
        padding: 0 0 24px;
        border-bottom: 1px solid #e2e8f0;
    }
    body:not(:has(.admin-shell)) .catalog-sidebar .quick-category {
        position: relative;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        min-height: 38px;
        padding: 4px 10px 4px 8px;
        gap: 10px;
        border: 1px solid transparent;
        border-radius: 6px;
        box-shadow: none;
        font-size: 13px;
        font-weight: 500;
        color: #475569;
        transition: background-color 0.15s ease, color 0.15s ease;
    }
    body:not(:has(.admin-shell)) .catalog-sidebar .quick-category:hover {
        transform: none;
        background: #f1f5f9;
        box-shadow: none;
        border-color: transparent;
        color: #0f172a;
    }
    body:not(:has(.admin-shell)) .catalog-sidebar .quick-category.active {
        background: #eff6ff;
        color: #1d4ed8;
        font-weight: 600;
        border-color: transparent;
    }
    body:not(:has(.admin-shell)) .catalog-sidebar .quick-category.active::before {
        content: "";
        position: absolute;
        left: -1px;
        top: 50%;
        transform: translateY(-50%);
        width: 3px;
        height: 18px;
        background: #2563eb;
        border-radius: 0 4px 4px 0;
    }
    body:not(:has(.admin-shell)) .catalog-sidebar .quick-category-thumb {
        width: 28px;
        height: 28px;
        border-radius: 4px;
        background: #fff;
        border: 1px solid #e2e8f0;
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        transition: border-color 0.15s ease;
    }
    body:not(:has(.admin-shell)) .catalog-sidebar .quick-category.active .quick-category-thumb {
        border-color: #bfdbfe;
        box-shadow: 0 1px 2px rgba(29, 78, 216, 0.05);
    }
    body:not(:has(.admin-shell)) .catalog-sidebar .quick-category-thumb img {
        max-width: 18px;
        max-height: 18px;
        object-fit: contain;
    }
    body:not(:has(.admin-shell)) .catalog-sidebar .quick-category-thumb.is-glyph svg {
        width: 16px;
        height: 16px;
        color: #64748b;
    }
    body:not(:has(.admin-shell)) .catalog-sidebar .quick-category.active .quick-category-thumb.is-glyph svg {
        color: #1d4ed8;
    }
    body:not(:has(.admin-shell)) .catalog-sidebar .quick-category span {
        text-align: left;
        -webkit-line-clamp: 2;
    }
    body:not(:has(.admin-shell)) .catalog-sidebar .quick-category small {
        display: none;
    }
    body:not(:has(.admin-shell)) .catalog-sidebar .category-models {
        display: none;
    }
    body:not(:has(.admin-shell)) .catalog-sidebar .part-type-picker {
        margin: 0 0 24px;
        padding: 0 0 24px;
        border: 0;
        border-bottom: 1px solid #e2e8f0;
        border-radius: 0;
    }
    body:not(:has(.admin-shell)) .catalog-sidebar .part-type-intro {
        display: flex;
        flex-direction: column;
        gap: 2px;
        margin: 0 0 16px;
    }
    body:not(:has(.admin-shell)) .catalog-sidebar .part-type-intro span {
        font-size: 11px;
        font-weight: 600;
        color: #64748b;
        text-transform: uppercase;
        letter-spacing: .06em;
    }
    body:not(:has(.admin-shell)) .catalog-sidebar .part-type-options {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }
    body:not(:has(.admin-shell)) .catalog-sidebar .part-type-option {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        min-height: 34px;
        padding: 4px 10px;
        border: 1px solid transparent;
        border-radius: 6px;
        background: transparent;
        color: #475569;
        font-size: 13px;
        font-weight: 500;
        transition: background-color 0.15s ease, color 0.15s ease;
    }
    body:not(:has(.admin-shell)) .catalog-sidebar .part-type-option:hover {
        background: #f1f5f9;
        color: #0f172a;
    }
    body:not(:has(.admin-shell)) .catalog-sidebar .part-type-option.active {
        background: #eff6ff;
        color: #1d4ed8;
        font-weight: 600;
    }
    body:not(:has(.admin-shell)) .catalog-sidebar .part-type-option span {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }
    body:not(:has(.admin-shell)) .catalog-sidebar .part-type-option b {
        background: rgba(0,0,0,0.04);
        padding: 2px 5px;
        border-radius: 4px;
        font-weight: 600;
        font-size: 11px;
        color: #64748b;
    }
    body:not(:has(.admin-shell)) .catalog-sidebar .part-type-option.active b {
        background: rgba(29, 78, 216, 0.1);
        color: #1d4ed8;
    }
    body:not(:has(.admin-shell)) .catalog-sidebar .part-type-option small {
        display: none;
    }
    body:not(:has(.admin-shell)) .catalog-sidebar .part-type-option strong {
        font-weight: inherit;
    }
    body:not(:has(.admin-shell)) .catalog-desktop-filters {
        padding-top: 2px;
    }
    body:not(:has(.admin-shell)) .catalog-sidebar .discovery-filters,
    body:not(:has(.admin-shell)) .catalog-sidebar .device-fields {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    body:not(:has(.admin-shell)) .catalog-sidebar .field,
    body:not(:has(.admin-shell)) .catalog-sidebar .field select {
        width: 100%;
        min-width: 0;
    }
    body:not(:has(.admin-shell)) .catalog-sidebar .advanced-filters {
        margin: 0;
        border-top: 1px solid #e8edf4;
        padding-top: 12px;
    }
    body:not(:has(.admin-shell)) .catalog-sidebar .filter-auto-hint {
        margin: 0;
        color: #78879a;
        font-size: 11px;
        line-height: 1.4;
    }
    body:not(:has(.admin-shell)) .catalog-sidebar-active {
        margin-top: 16px;
        padding-top: 14px;
        border-top: 1px solid #e8edf4;
    }
    body:not(:has(.admin-shell)) .catalog-sidebar-active .active-filters {
        margin: 0;
    }
    body:not(:has(.admin-shell)) .catalog-main {
        min-width: 0;
    }
    body:not(:has(.admin-shell)) .catalog-main .catalog-refine-row,
    body:not(:has(.admin-shell)) .catalog-main > .active-filters {
        display: none;
    }
    body:not(:has(.admin-shell)) .catalog-price-notice {
        margin-bottom: 10px;
    }
}
@media (max-width: 1023px) {
    body:not(:has(.admin-shell)) .catalog-layout {
        display: block;
        margin-top: 0;
    }
    body:not(:has(.admin-shell)) .catalog-sidebar {
        display: contents;
    }
    body:not(:has(.admin-shell)) .catalog-sidebar-heading,
    body:not(:has(.admin-shell)) .catalog-desktop-filters,
    body:not(:has(.admin-shell)) .catalog-sidebar-active {
        display: none;
    }
}
@media (max-width: 768px) {
    body:not(:has(.admin-shell)) .catalog-heading {
        flex-wrap: wrap;
        align-items: flex-start;
    }
    body:not(:has(.admin-shell)) .catalog-heading h1 {
        font-size: 20px;
        line-height: 1.3;
    }
    body:not(:has(.admin-shell)) .catalog-refine-row {
        gap: 8px;
        padding: 10px;
        align-items: center;
    }
    body:not(:has(.admin-shell)) .catalog-tool-field {
        flex-wrap: wrap;
        min-width: 0;
        flex: 1 1 110px;
    }
    body:not(:has(.admin-shell)) .catalog-tool-field select {
        max-width: 100%;
        width: 100%;
    }
    body:not(:has(.admin-shell)) :is(.quick-category, .device-family-choice, .category-model-choice, .part-type-option) {
        min-height: 38px;
    }
    body:not(:has(.admin-shell)) :is(.catalog-tool-field select, .stock-shortcut, #open-catalog-filters, #catalog-sort) {
        min-height: 38px;
    }
    body:not(:has(.admin-shell)) .catalog-sort {
        min-width: 0;
    }
    body:not(:has(.admin-shell)) .catalog-sort select {
        min-width: 0;
        flex: 1;
    }
}
@media (prefers-reduced-motion: reduce) {
    #store-menu *, #store-menu *::before, #store-menu *::after {
        animation: none;
        transition: none;
        scroll-behavior: auto;
    }
}
