.m3m-menu {
    --m3m-bg: #000;
    --m3m-text: #fff;
    --m3m-muted: #8a8a8a;
    --m3m-border: #1b1b1b;
    --m3m-topbar-h: 66px;
    --m3m-font-primary: 22px;
    --m3m-font-secondary: 18px;
    --m3m-logo-offset: 0px;
    --m3m-font-family: inherit;
    --m3m-row-height: 60px;
    --m3m-level-1-size: 17px;
    --m3m-level-1-weight: 500;
    --m3m-level-2-size: 16px;
    --m3m-level-2-weight: 500;
    --m3m-level-3-title-size: 27px;
    --m3m-level-3-title-weight: 600;
    --m3m-level-3-item-size: 15px;
    --m3m-level-3-item-weight: 400;
    --m3m-level-3-collections-size: 22px;
    --m3m-level-3-collections-weight: 600;
    --m3m-level-3-secondary-size: 16px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100vw;
    z-index: 99990;
    font-family: var(--m3m-font-family);
    isolation: isolate;
}

.m3m-menu.is-open {
    position: fixed;
    inset: 0;
    z-index: 2147483645;
}

.m3m-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: var(--m3m-topbar-h);
    padding: 14px 18px;
    background: var(--m3m-bg);
    border-bottom: 1px solid var(--m3m-border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100vw;
    z-index: 2147483647;
}

.m3m-topbar-back {
    width: 36px;
    height: 36px;
    display: none;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.m3m-topbar-back-icon {
    width: 10px;
    height: 10px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
}

.m3m-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    margin-left: var(--m3m-logo-offset);
}

.m3m-logo img {
    max-height: 34px;
    width: auto;
}

.m3m-logo span {
    color: var(--m3m-text);
    font-size: 24px;
    line-height: 1;
    font-weight: 600;
}

.m3m-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.m3m-search-btn,
.m3m-toggle-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.m3m-icon-search {
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-radius: 50%;
    position: relative;
}

.m3m-icon-search::after {
    content: '';
    position: absolute;
    right: -6px;
    bottom: -4px;
    width: 8px;
    height: 2px;
    background: #fff;
    transform: rotate(45deg);
    border-radius: 2px;
}

.m3m-icon-burger,
.m3m-icon-burger::before,
.m3m-icon-burger::after {
    content: '';
    width: 18px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    display: block;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.m3m-icon-burger {
    position: relative;
}

.m3m-icon-burger::before {
    position: absolute;
    top: -6px;
}

.m3m-icon-burger::after {
    position: absolute;
    top: 6px;
}

.m3m-menu.is-open .m3m-icon-burger {
    background: transparent;
}

.m3m-menu.is-open .m3m-icon-burger::before {
    transform: translateY(6px) rotate(45deg);
}

.m3m-menu.is-open .m3m-icon-burger::after {
    transform: translateY(-6px) rotate(-45deg);
}

.m3m-overlay {
    position: fixed;
    inset: var(--m3m-topbar-h) 0 0 0;
    background: var(--m3m-bg);
    z-index: 2147483646;
    overflow: hidden;
}

.m3m-panels {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.m3m-panel {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 20px 24px;
    background: var(--m3m-bg);
    transform: translateX(100%);
    transition: transform 0.26s ease;
}

.m3m-panel.is-active {
    transform: translateX(0);
}

.m3m-panel.is-left {
    transform: translateX(-100%);
}

.m3m-primary-links,
.m3m-link-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.m3m-menu ul,
.m3m-menu ol,
.m3m-menu li {
    list-style: none !important;
}

.m3m-menu li::before,
.m3m-menu li::after,
.m3m-menu li::marker {
    content: none !important;
}

.m3m-primary-links li {
    border-bottom: 1px solid var(--m3m-border);
}

.m3m-primary-links a,
.m3m-primary-links button {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--m3m-text);
    text-decoration: none;
    text-align: left;
    display: flex;
    align-items: center;
    min-height: var(--m3m-row-height);
    font-size: var(--m3m-level-2-size);
    font-weight: var(--m3m-level-2-weight);
    line-height: 1.2;
    letter-spacing: 0.01em;
    padding: 0;
    cursor: pointer;
    list-style: none;
}

.m3m-primary-links .m3m-next {
    position: relative;
    padding-right: 24px;
}

.m3m-panel[data-panel="root"] .m3m-primary-links a,
.m3m-panel[data-panel="root"] .m3m-primary-links button,
.m3m-panel[data-panel="root"] .m3m-primary-links .m3m-next {
    font-family: Helvetica, Arial, Lucida, sans-serif;
    font-size: var(--m3m-level-1-size);
    font-weight: var(--m3m-level-1-weight);
}

.m3m-panel[data-panel="mosaics"] .m3m-primary-links a,
.m3m-panel[data-panel="mosaics"] .m3m-primary-links button,
.m3m-panel[data-panel="mosaics"] .m3m-primary-links .m3m-next {
    font-family: Helvetica, Arial, Lucida, sans-serif;
    font-size: var(--m3m-level-2-size);
    font-weight: var(--m3m-level-2-weight);
}

.m3m-primary-links .m3m-next::after {
    content: '';
    position: absolute;
    right: 4px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
    transform: translateY(-50%) rotate(45deg);
}

.m3m-panel-head {
    display: none;
}

.m3m-panel-head h3 {
    margin: 0;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
}

.m3m-panel[data-panel="collections"] .m3m-panel-head,
.m3m-panel[data-panel="shape"] .m3m-panel-head,
.m3m-panel[data-panel="material"] .m3m-panel-head,
.m3m-panel[data-panel="color"] .m3m-panel-head {
    display: block;
    margin: 0;
    padding: 16px 0 10px;
    border-bottom: 1px solid var(--m3m-border);
}

.m3m-panel[data-panel="collections"] .m3m-panel-head .m3m-back,
.m3m-panel[data-panel="shape"] .m3m-panel-head .m3m-back,
.m3m-panel[data-panel="material"] .m3m-panel-head .m3m-back,
.m3m-panel[data-panel="color"] .m3m-panel-head .m3m-back {
    display: none !important;
}

.m3m-panel[data-panel="collections"] .m3m-panel-head h3,
.m3m-panel[data-panel="shape"] .m3m-panel-head h3,
.m3m-panel[data-panel="material"] .m3m-panel-head h3,
.m3m-panel[data-panel="color"] .m3m-panel-head h3 {
    font-family: 'ROCA-BOLD', Helvetica, Arial, Lucida, sans-serif;
    font-size: var(--m3m-level-3-title-size);
    font-weight: var(--m3m-level-3-title-weight);
    line-height: 1.08;
    letter-spacing: 0;
    margin: 0;
}

.m3m-back {
    border: 0;
    background: transparent;
    color: var(--m3m-text);
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
}

.m3m-back::before {
    content: '';
    width: 8px;
    height: 8px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
}

.m3m-panel-content .m3m-empty {
    color: var(--m3m-muted);
    margin: 10px 0 0;
}

.m3m-panel-content .m3m-link-list li {
    border-bottom: 1px solid var(--m3m-border);
    list-style: none;
}

.m3m-panel-content .m3m-link-list a {
    display: block;
    color: #fff;
    text-decoration: none;
    font-family: Helvetica, Arial, Lucida, sans-serif;
    font-size: var(--m3m-level-3-item-size);
    font-weight: var(--m3m-level-3-item-weight);
    line-height: 1.3;
    padding: 12px 0;
}

.m3m-panel[data-panel="collections"] .m3m-link-list a {
    font-family: 'ROCA-BOLD', Helvetica, Arial, Lucida, sans-serif;
    font-size: var(--m3m-level-3-collections-size) !important;
    font-weight: var(--m3m-level-3-collections-weight);
    line-height: 1.2;
    padding: 16px 0;
}

/* Detail panels item text: smaller than panel title for clearer hierarchy */
.m3m-panel[data-panel="shape"] .mosaics-menu-shortcode .mosaics-menu-link,
.m3m-panel[data-panel="material"] .mosaics-menu-shortcode .mosaics-menu-link,
.m3m-panel[data-panel="color"] .mosaics-menu-shortcode .mosaics-menu-link {
    font-size: var(--m3m-level-3-item-size) !important;
    font-weight: var(--m3m-level-3-item-weight) !important;
    line-height: 1.25;
}

/* Optional custom block for manual HTML footer inside collections panel */
.m3m-collections-footer {
    margin-top: 38px;
}

.m3m-collections-footer a,
.m3m-collections-footer p,
.m3m-collections-footer span {
    font-family: Helvetica, Arial, Lucida, sans-serif;
    font-size: var(--m3m-level-3-secondary-size);
    font-weight: 400;
    color: #f1f1f1;
    line-height: 1.35;
    text-decoration: none;
}

.m3m-panel-content ul,
.m3m-panel-content ol,
.m3m-panel-content li {
    list-style: none !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.m3m-panel-content .mosaics-menu-shortcode {
    margin: 0;
}

.m3m-fibosearch .dgwt-wcas-search-wrapp {
    margin: 0 !important;
}

.m3m-fibosearch .dgwt-wcas-search-icon {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

.m3m-fibosearch .dgwt-wcas-search-input {
    display: none !important;
}

.m3m-fibosearch .dgwt-wcas-search-form {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
    padding: 0 !important;
    margin: -1px !important;
}

body.m3m-lock {
    overflow: hidden;
}

.m3m-menu.m3m-subpanel .m3m-topbar-back {
    display: inline-flex;
}

.m3m-menu.m3m-subpanel .m3m-logo,
.m3m-menu.m3m-subpanel .m3m-search-btn,
.m3m-menu.m3m-subpanel .m3m-fibosearch {
    display: none !important;
}

.m3m-menu.m3m-subpanel .m3m-actions {
    margin-left: auto;
}

.m3m-mount-placeholder {
    width: 100%;
}

/* FiboSearch overlay – ensure it renders above the mobile menu */
.dgwt-wcas-overlay-mobile {
    z-index: 2147483647 !important;
}

.dgwt-wcas-om-bar {
    z-index: 2147483647 !important;
}

body.dgwt-wcas-overlay-mobile-on .dgwt-wcas-search-wrapp {
    z-index: 2147483647 !important;
}

.dgwt-wcas-suggestions-wrapp {
    z-index: 2147483647 !important;
}

@media (min-width: 981px) {
    .m3m-menu {
        display: none !important;
    }
}

@media (max-width: 420px) {
    .m3m-menu {
        --m3m-level-1-size: 16px;
        --m3m-level-2-size: 15px;
        --m3m-level-3-title-size: 24px;
        --m3m-level-3-item-size: 14px;
        --m3m-level-3-collections-size: 20px;
        --m3m-level-3-secondary-size: 15px;
    }
}
