
/* ============================================================
 * THEME HEADER REPLACE (Block Themes / Classic)
 * ============================================================ */
body.mh-has-master-header header.wp-block-template-part,
body.mh-has-master-header .wp-site-blocks > header,
body.mh-has-master-header header.site-header,
body.mh-has-master-header .site-header {
    display: none !important;
}

/* ============================================================
 * ROOT HEADER
 * ============================================================ */

#master-header,
.mh-header {
    width: 100%;
    position: relative;
    z-index: 999;
    box-sizing: border-box;
    font-family: inherit;
}

/* Prevent header-related overlays (drawers/modals) from creating horizontal scroll.
   100vw + scrollbar can cause a few px overflow on desktop. */
body.mh-has-master-header { overflow-x: hidden; }
@supports (overflow-x: clip) {
    body.mh-has-master-header { overflow-x: clip; }
}

/* Glass Look (optional) */
.mh-header {
    backdrop-filter: blur(12px);
    background: var(--mh-header-bg, rgba(255, 255, 255, 0.75));
    color: var(--mh-header-text, inherit);
    border-bottom: 1px solid rgba(0,0,0,.06);
}

/* ============================================================
 * INNER LAYOUT
 * ============================================================ */

.mh-inner {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 20px;
    box-sizing: border-box;
    height: 100%;
    min-width: 0; /* allow flex children to shrink instead of forcing overflow */
}

/* Optional: Multi-row header (elements may wrap into multiple lines) */
#master-header.mh-multirow {
    height: auto !important;
}

#master-header.mh-multirow .mh-inner {
    height: auto !important;
    flex-wrap: wrap;
    row-gap: 10px;
}

#master-header.mh-multirow .mh-column {
    flex-wrap: wrap;
}

/* Multi-row with explicit line assignment (per element) */
#master-header.mh-multirow .mh-column.mh-has-lines {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 10px; /* vertical gap between lines */
}

#master-header.mh-multirow .mh-column.mh-has-lines .mh-line {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex-wrap: wrap; /* safety on small screens */
}


/* ============================================================
 * MULTI-ROW: Per-Line Height (Zeilenhöhe)
 * - Values are provided as CSS variables via inline style:
 *   --mh-row1-height-desktop: 48px; etc.
 * - 0 / unset = Auto
 * ============================================================ */

#master-header.mh-device-desktop {
    --mh-row1-height: var(--mh-row1-height-desktop, auto);
    --mh-row2-height: var(--mh-row2-height-desktop, auto);
    --mh-row3-height: var(--mh-row3-height-desktop, auto);
    --mh-row4-height: var(--mh-row4-height-desktop, auto);
}

#master-header.mh-device-tablet {
    --mh-row1-height: var(--mh-row1-height-tablet, auto);
    --mh-row2-height: var(--mh-row2-height-tablet, auto);
    --mh-row3-height: var(--mh-row3-height-tablet, auto);
    --mh-row4-height: var(--mh-row4-height-tablet, auto);
}

#master-header.mh-device-mobile {
    --mh-row1-height: var(--mh-row1-height-mobile, auto);
    --mh-row2-height: var(--mh-row2-height-mobile, auto);
    --mh-row3-height: var(--mh-row3-height-mobile, auto);
    --mh-row4-height: var(--mh-row4-height-mobile, auto);
}

#master-header.mh-multirow .mh-column.mh-has-lines .mh-line-1 { min-height: var(--mh-row1-height, auto); }
#master-header.mh-multirow .mh-column.mh-has-lines .mh-line-2 { min-height: var(--mh-row2-height, auto); }
#master-header.mh-multirow .mh-column.mh-has-lines .mh-line-3 { min-height: var(--mh-row3-height, auto); }
#master-header.mh-multirow .mh-column.mh-has-lines .mh-line-4 { min-height: var(--mh-row4-height, auto); }


/* Preserve the classic left/center/right alignment per column */
#master-header.mh-multirow .mh-column:first-child .mh-line {
    justify-content: flex-start;
}
#master-header.mh-multirow .mh-column:nth-child(2) .mh-line {
    justify-content: center;
}
#master-header.mh-multirow .mh-column:last-child .mh-line {
    justify-content: flex-end;
}

/* ============================================================
 * RESPONSIVE SAFETY (prevent horizontal overflow)
 * ============================================================ */

.mh-column {
    min-width: 0; /* long items (search/button/text) can shrink */
}

.mh-column > * {
    min-width: 0;
    max-width: 100%;
}

/* On small screens allow wrapping (content adapts instead of overflowing) */
@media (max-width: 768px) {
    #master-header .mh-inner {
        flex-wrap: wrap;
        row-gap: 10px;
    }

    #master-header .mh-column {
        flex-wrap: wrap;
    }

    #master-header .mh-search {
        max-width: 100%;
    }

    #master-header .mh-search .mh-search-input {
        min-width: 0;
    }
}

/* Full width (per device layout) */
.mh-header.mh-fullwidth .mh-inner,
#master-header.mh-fullwidth .mh-inner {
    max-width: none;
}

/* ============================================================
 * COLUMNS
 * ============================================================ */

.mh-column {
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
}

.mh-column:first-child {
    justify-content: flex-start;
}

.mh-column:nth-child(2) {
    justify-content: center;
}

.mh-column:last-child {
    justify-content: flex-end;
}

/* ============================================================
 * LOGO
 * ============================================================ */

.mh-logo img {
    max-height: var(--mh-logo-max-height, 48px);
    width: auto;
    height: auto;
    display: block;
}

/* ============================================================
 * LOGO SWAP (SHRINK)
 * ============================================================ */

.mh-logo {
    position: relative;
}


.mh-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--mh-social-color, inherit);
}
.mh-logo img {
    display: block;
}

/* Shrink-Logo standardmäßig aus */
.mh-logo-shrink {
    display: none;
}

/* Beim Shrink: Swap */
#master-header.mh-shrink .mh-logo-main {
    display: none;
}

#master-header.mh-shrink .mh-logo-shrink {
    display: block;
}

/* Optional: Disable shrink logo swap (keep main logo visible in shrink state) */
.mh-logo.mh-no-shrink-logo .mh-logo-shrink {
    display: none !important;
}
#master-header.mh-shrink .mh-logo.mh-no-shrink-logo .mh-logo-main {
    display: block !important;
}
#master-header.mh-shrink .mh-logo.mh-no-shrink-logo .mh-logo-shrink {
    display: none !important;
}


/* ============================================================
 * MENU
 * ============================================================ */

.mh-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 18px;
}

.mh-menu li {
    position: relative;
}

.mh-menu a {
    text-decoration: none;
    font-weight: 500;
    color: inherit;
    padding: 6px 0;
}

/* ============================================================
 * SEARCH
 * ============================================================ */

.mh-search form {
    display: flex;
    width: 100%;
}

/* Search width control (from editor: --mh-search-width) */
.mh-search {
    width: var(--mh-search-width, auto);
    max-width: 100%;
}

.mh-search .mh-search-form {
    width: 100%;
}

.mh-search .mh-search-input {
    width: 100%;
    min-width: 0;
}

.mh-search input[type="search"] {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
}

/* ============================================================
 * BUTTONS (BASE)
 * ============================================================ */

.mh-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition:
        background .15s ease,
        color .15s ease,
        transform .15s ease,
        box-shadow .15s ease;
}

.mh-button:hover {
    transform: translateY(-1px);
}

/* ============================================================
 * BUTTON PRESETS
 * ============================================================ */

.mh-primary {
    background: var(--mh-primary-bg, #2563eb);
    color: var(--mh-primary-color, #ffffff);
}

.mh-primary:hover {
    background: var(--mh-primary-bg-hover, #1e40af);
}

.mh-secondary {
    background: var(--mh-secondary-bg, #e5e7eb);
    color: var(--mh-secondary-color, #111827);
}

.mh-secondary:hover {
    background: var(--mh-secondary-bg-hover, #d1d5db);
}

.mh-ghost {
    background: transparent;
    color: var(--mh-ghost-color, #2563eb);
}

.mh-ghost:hover {
    background: rgba(37,99,235,.08);
}

/* ============================================================
 * WOO CART
 * ============================================================ */

.mh-woo-cart a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-weight: 500;
}

/* Drawer mode uses a <button> instead of <a> */
.mh-woo-cart .mh-cart-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.mh-cart-count {
    background: #ef4444;
    color: #fff;
    border-radius: 999px;
    font-size: 11px;
    padding: 2px 6px;
}

/* Wishlist (heart icon) */
.mh-woo-wishlist .mh-wishlist-button,
.mh-woo-wishlist .mh-wishlist-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-decoration: none;
    position: relative;
}

.mh-wishlist-svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
    display: block;
}

.mh-wishlist-count {
    position: absolute;
    top: -8px;
    right: -10px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--mh-primary-bg, #2563eb);
    color: var(--mh-primary-color, #ffffff);
    font-size: 11px;
    line-height: 18px;
    text-align: center;
}


/* ============================================================
 * DEVICE STYLES
 * ============================================================ */

.mh-device-tablet .mh-inner {
    padding: 8px 16px;
}

.mh-device-mobile .mh-inner {
    padding: 6px 12px;
}

.mh-device-mobile .mh-menu {
    display: none;
}

/* Offcanvas trigger should stay visible in mobile */
.mh-device-mobile .mh-menu.mh-menu-offcanvas {
    display: inline-flex;
}

/* Default: hide offcanvas trigger on large screens (JS/CSS responsive will show it) */
.mh-menu.mh-menu-offcanvas { display: none; }
.mh-menu.mh-menu-inline { display: block; }

/* Extra robustness: some themes apply generic nav/menu rules that can accidentally
   override visibility on desktop. */
#master-header .mh-menu.mh-menu-offcanvas { display: none !important; }
@media (min-width: 1025px) {
    #master-header .mh-menu.mh-menu-inline { display: block !important; }
}

/* Viewport-based fallback (works even if server-side mobile detection is false) */
@media (max-width: 1024px) {
    #master-header .mh-menu.mh-menu-inline { display: none !important; }
    #master-header .mh-menu.mh-menu-offcanvas { display: inline-flex !important; }
}

.mh-hamburger {
    border: 1px solid rgba(0,0,0,.12);
    background: rgba(255,255,255,.85);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

/* ============================================================
 * DRAWER / OFFCANVAS (Menu + MiniCart)
 * ============================================================ */

.mh-drawer-overlay {
    position: fixed;
    inset: var(--mh-drawer-top, 0px) 0 0 0;
    background: rgba(0,0,0,.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
    z-index: 9998;
}

.mh-drawer-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

body.mh-drawer-open-body {
    overflow: hidden;
}

.mh-drawer {
    position: fixed;
    top: var(--mh-drawer-top, 0px);
    right: 0;
    height: calc(100vh - var(--mh-drawer-top, 0px));
    height: calc(100dvh - var(--mh-drawer-top, 0px));
    width: 320px;
    max-width: 92vw;
    max-height: calc(100vh - var(--mh-drawer-top, 0px) - 48px);
    max-height: calc(100dvh - var(--mh-drawer-top, 0px) - 48px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--mh-drawer-bg, #ffffff);
    color: var(--mh-drawer-text, #111827);
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    transform: translateX(105%);
    transition: transform .22s ease;
    z-index: 9999;
    display: flex;
    flex-direction: column;
}

/* Cart & Wishlist drawer: keep identical sizing (Wishlist should match Cart) */
.mh-drawer.mh-drawer-cart,
.mh-drawer.mh-drawer-wishlist {
    height: calc(75vh - var(--mh-drawer-top, 0px));
    height: calc(75dvh - var(--mh-drawer-top, 0px));
    max-height: calc(75vh - var(--mh-drawer-top, 0px));
    max-height: calc(75dvh - var(--mh-drawer-top, 0px));
    min-height: 260px;
    overflow: hidden;
}
.mh-drawer.mh-drawer-cart .mh-drawer-content,
.mh-drawer.mh-drawer-wishlist .mh-drawer-content {
    overflow: auto;
}

/* Robustness: prevent theme styles on <aside> from making drawers visible in-page
   (e.g. position/transform overrides). */
#master-header .mh-drawer {
    position: fixed !important;
    top: var(--mh-drawer-top, 0px) !important;
    right: 0 !important;
    transform: translateX(105%) !important;
    visibility: hidden !important;
    pointer-events: none !important;
}
#master-header .mh-drawer.is-open {
    transform: translateX(0) !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Enterprise desktop drawer sizing */
@media (min-width: 1025px) {
    .mh-drawer { width: 420px; }
}

.mh-drawer.is-open {
    transform: translateX(0);
}

.mh-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(0,0,0,.08);
}

.mh-drawer-title {
    font-size: 14px;
    letter-spacing: .02em;
}

.mh-drawer-close {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 10px;
}

.mh-drawer-content {
    padding: 12px 16px;
    overflow: auto;
    flex: 1 1 auto;
}

.mh-drawer-footer {
    padding: 12px 16px;
    border-top: 1px solid rgba(0,0,0,.08);
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(10px);
}

.mh-mini-cart-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
}

.mh-mini-cart-actions .mh-button {
    width: 100%;
}



/* Wishlist drawer switcher */
.mh-wishlist-switcher {
    display: grid;
    gap: 6px;
    margin-bottom: 10px;
}
.mh-wishlist-switcher-label {
    font-size: 12px;
    opacity: .8;
}
.mh-wishlist-select {
    width: 100%;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,.12);
    background: rgba(255,255,255,.92);
}
html.mh-dark .mh-wishlist-select {
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.14);
    color: var(--mh-social-color, inherit);
}


/* Mini wishlist (reuses mini-cart layout) */
.mh-mini-wishlist .mh-mini-cart-bottom {
    justify-content: flex-start;
}
.mh-mini-wishlist-qty {
    opacity: .75;
    font-size: 12px;
    white-space: nowrap;
}
.mh-mini-wishlist-item-actions {
    margin-left: auto;
}
.mh-mini-wishlist-item-actions .mh-button {
    padding: 6px 10px;
    font-size: 12px;
    white-space: nowrap;
}
.mh-mini-wishlist-empty {
    opacity: .75;
    font-size: 13px;
    margin: 6px 0;
}
/* Woo mini-cart typography (enterprise) */
.mh-mini-cart {
    font-size: 14px;
}
.mh-mini-cart .woocommerce-mini-cart {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}
.mh-mini-cart .woocommerce-mini-cart-item {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 14px;
    background: rgba(0,0,0,.02);
}
.mh-mini-cart .woocommerce-mini-cart-item a {
    text-decoration: none;
    color: var(--mh-social-color, inherit);
}
.mh-mini-cart .woocommerce-mini-cart-item img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 12px;
}
.mh-mini-cart .quantity {
    opacity: .8;
    font-size: 12px;
}
.mh-mini-cart .remove {
    font-size: 18px;
    opacity: .8;
}

/* Custom mini cart markup (v1.07.3) */
.mh-mini-cart-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}
.mh-mini-cart-item {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 10px;
    align-items: start;
    padding: 10px;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 14px;
    background: rgba(0,0,0,.02);
}
.mh-mini-cart-thumb img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 12px;
}
.mh-mini-cart-meta {
    display: grid;
    gap: 8px;
}
.mh-mini-cart-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}
.mh-mini-cart-name {
    text-decoration: none;
    color: inherit;
    font-weight: 600;
    line-height: 1.25;
}
.mh-mini-cart-remove {
    text-decoration: none;
    opacity: .75;
    font-size: 16px;
    border-radius: 10px;
    padding: 4px 8px;
}
.mh-mini-cart-remove:hover { background: rgba(0,0,0,.06); opacity: 1; }
.mh-mini-cart-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.mh-mini-cart-price { opacity: .9; font-size: 13px; }

.mh-mini-cart-qty {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(0,0,0,.10);
    border-radius: 12px;
    padding: 4px;
    background: rgba(255,255,255,.85);
}
.mh-qty-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 10px;
    font-size: 16px;
    line-height: 1;
}
.mh-qty-btn:hover { background: rgba(0,0,0,.06); }
.mh-qty-input {
    width: 48px;
    padding: 0 6px;
    height: 28px;
    border: none;
    background: transparent;
    text-align: center;
    outline: none;
}
.mh-mini-cart-totals {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed rgba(0,0,0,.14);
    display: grid;
    gap: 8px;
    font-size: 13px;
}
.mh-mini-trow {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}
.mh-mini-total {
    font-weight: 700;
    font-size: 14px;
    padding-top: 6px;
    border-top: 1px solid rgba(0,0,0,.08);
}
.mh-mini-nettotal {
    font-weight: 600;
}
.mh-mini-tax em {
    font-style: italic;
}
.mh-mini-gross {
    font-weight: 800;
    font-size: 15px;
}
.mh-mini-muted { opacity: .7; }

html.mh-dark .mh-mini-cart-item {
    background: rgba(255,255,255,.04);
    border-color: rgba(255,255,255,.14);
}
html.mh-dark .mh-mini-cart-qty {
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.14);
}
html.mh-dark .mh-mini-cart-remove:hover { background: rgba(255,255,255,.06); }
html.mh-dark .mh-mini-cart-totals { border-top-color: rgba(255,255,255,.16); }

@media (min-width: 1025px) {
    .mh-drawer {
        width: 420px;
    }
    .mh-drawer-header {
        padding: 16px 18px;
    }
    .mh-drawer-content,
    .mh-drawer-footer {
        padding-left: 18px;
        padding-right: 18px;
    }
}

.mh-mini-cart .woocommerce-mini-cart__total {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed rgba(0,0,0,.12);
    font-weight: 600;
}

.mh-offcanvas-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mh-offcanvas-list a {
    display: block;
    padding: 10px 8px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--mh-social-color, inherit);
}

.mh-offcanvas-list a:hover {
    background: rgba(0,0,0,.05);
}

.mh-offcanvas-list .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0 0 0 14px;
    display: block;
    max-height: 0;
    overflow: hidden;
    transition: max-height .18s ease;
}

.mh-offcanvas-list li.mh-sub-open > .sub-menu {
    max-height: 900px;
}

.mh-sub-toggle {
    margin-left: 8px;
    border: none;
    background: rgba(0,0,0,.06);
    border-radius: 8px;
    padding: 2px 8px;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease;
}

.mh-offcanvas-list li.mh-sub-open > .mh-sub-toggle { transform: rotate(180deg); }

.mh-cart-button {
    border: 1px solid rgba(0,0,0,.12);
    background: rgba(255,255,255,.85);
    border-radius: 12px;
    padding: 8px 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* legacy rule removed (actions are styled in drawer section above) */

/* ============================================================
 * PREVIEW MODE
 * ============================================================ */

body.mh-preview-mode > *:not(#master-header) {
    display: none !important;
}

/* ============================================================
 * THEME HEADER OVERRIDE (Frontend)
 * ============================================================ */

/* Block-Themes (z.B. Twenty Twenty-Five): Template-Part Header ausblenden */
body.mh-has-master-header .wp-site-blocks > header:not(#master-header),
body.mh-has-master-header header.wp-block-template-part:not(#master-header) {
    display: none !important;
}

/* ============================================================
 * MASTER HEADER – HEIGHT SYSTEM
 * ============================================================ */

#master-header {
    height: var(--mh-header-height, auto);
    min-height: 48px;
}

#master-header .mh-inner {
    height: 100%;
}

/* ============================================================
 * MASTER HEADER – STICKY SYSTEM
 * ============================================================ */

#master-header.mh-sticky {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--mh-header-bg, rgba(255,255,255,0.95));
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}

/* Fallback für alte Browser */
@supports not (position: sticky) {
    #master-header.mh-sticky {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
    }
}

/* ============================================================
 * PREVENT CONTENT JUMP (Frontend)
 * ============================================================ */

body.has-mh-sticky {
    padding-top: var(--mh-header-height, 0px);
}

/* Kein Offset im Preview */
body.mh-preview-mode.has-mh-sticky {
    padding-top: 0;
}

/* ============================================================
 * ACCESSIBILITY
 * ============================================================ */

.mh-button:focus,
.mh-menu a:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* ============================================================
 * AI MODES (OPTIONAL)
 * ============================================================ */

.mh-ai-highlight {
    outline: 2px dashed #22c55e;
}

/* ============================================================
 * MOBILE CHECKOUT CTA (PHASE 2)
 * ============================================================ */

@media (max-width: 768px) {
    .mh-checkout {
        position: fixed;
        bottom: 12px;
        left: 12px;
        right: 12px;
        z-index: 9999;
        box-shadow: 0 8px 30px rgba(0,0,0,.25);
    }
}
/* ============================================================
 * SHRINK HEADER – DEVICE HEIGHTS
 * ============================================================ */

/* Desktop */
#master-header.mh-shrink {
    --mh-header-height: 64px;
}

/* Tablet */
.mh-device-tablet #master-header.mh-shrink {
    --mh-header-height: 56px;
}

/* Mobile */
.mh-device-mobile #master-header.mh-shrink {
    --mh-header-height: 48px;
}

/* Inner padding shrink */
#master-header.mh-shrink .mh-inner {
    padding-top: 6px;
    padding-bottom: 6px;
}

/* Logo shrink */
#master-header.mh-shrink .mh-logo img {
    transform: scale(var(--mh-logo-scale, 0.75));
    transform-origin: left center;
    transition: transform 0.25s ease;
}

/* Safety: if shrink is disabled, never scale the logo (even if a class slips in) */
#master-header.mh-shrink-disabled.mh-shrink .mh-logo img {
    transform: none !important;
    max-height: var(--mh-logo-max-height, 48px) !important;
}


/* Buttons kompakter */
#master-header.mh-shrink .mh-button {
    font-size: 13px;
    padding-top: 6px;
    padding-bottom: 6px;
}
/* ============================================================
 * SHRINK HEADER – DEVICE SPECIFIC
 * ============================================================ */

.mh-device-desktop.mh-shrink {
    --mh-header-height: var(--mh-shrink-height, 64px);
}

.mh-device-tablet.mh-shrink {
    --mh-header-height: var(--mh-shrink-height, 56px);
}

.mh-device-mobile.mh-shrink {
    --mh-header-height: var(--mh-shrink-height, 48px);
}


/* Inner spacing */
.mh-shrink .mh-inner {
    padding-top: 6px;
    padding-bottom: 6px;
}

/* Logo scaling */
.mh-device-desktop.mh-shrink .mh-logo img {
    max-height: 40px;
}

.mh-device-tablet.mh-shrink .mh-logo img {
    max-height: 34px;
}

.mh-device-mobile.mh-shrink .mh-logo img {
    max-height: 28px;
}
/* ============================================================
 * LOGO SWITCH (NORMAL ↔ SHRINK)
 * ============================================================ */

/* Standard: nur Hauptlogo sichtbar */
.mh-logo-main {
    display: block;
}

.mh-logo-shrink {
    display: none;
}

/* Shrink aktiv → Logos tauschen */
#master-header.mh-shrink .mh-logo-main {
    display: none;
}

#master-header.mh-shrink .mh-logo-shrink {
    display: block;
}
/* ============================================================
 * LOGO CROSSFADE (NORMAL <-> SHRINK)
 * ============================================================ */

.mh-logo {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* Beide Logos übereinander */
.mh-logo img {
    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

/* Hauptlogo sichtbar */
.mh-logo-main {
    opacity: 1;
}

/* Shrink-Logo standardmäßig unsichtbar */
.mh-logo-shrink {
    opacity: 0;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

/* Im Shrink-Zustand wechseln */
#master-header.mh-shrink .mh-logo-main {
    opacity: 0;
}

#master-header.mh-shrink .mh-logo-shrink {
    opacity: 1;
}
/* ============================================================
 * SHRINK LOGO – DESKTOP ONLY
 * ============================================================ */

.mh-device-tablet #master-header.mh-shrink .mh-logo-shrink,
.mh-device-mobile #master-header.mh-shrink .mh-logo-shrink {
    display: none;
}

/* Fallback: auf Tablet/Mobile immer Hauptlogo */
.mh-device-tablet #master-header.mh-shrink .mh-logo-main,
.mh-device-mobile #master-header.mh-shrink .mh-logo-main {
    opacity: 1;
}
/* ============================================================
 * PREVIEW MODE – SHRINK SAFETY
 * ============================================================ */

.mh-preview-mode #master-header {
    transition:
        height 0.25s ease,
        box-shadow 0.25s ease;
}

/* Shrink darf im Preview aktiv sein */
.mh-preview-mode #master-header.mh-shrink {
    position: sticky;
}
/* ============================================================
 * LOGO CROSSFADE (NORMAL <-> SHRINK)
 * ============================================================ */

.mh-logo {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.mh-logo img {
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Hauptlogo */
.mh-logo-main {
    opacity: 1;
}

/* Shrink-Logo */
.mh-logo-shrink {
    opacity: 0;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

/* Wechsel im Shrink */
#master-header.mh-shrink .mh-logo-main {
    opacity: 0;
}

#master-header.mh-shrink .mh-logo-shrink {
    opacity: 1;
}

/* ============================================================
 * SHRINK LOGO – DESKTOP ONLY
 * ============================================================ */

.mh-device-tablet #master-header.mh-shrink .mh-logo-shrink,
.mh-device-mobile #master-header.mh-shrink .mh-logo-shrink {
    display: none;
}

.mh-device-tablet #master-header.mh-shrink .mh-logo-main,
.mh-device-mobile #master-header.mh-shrink .mh-logo-main {
    opacity: 1;
}

/* ============================================================
 * FALLBACK – KEIN SHRINK LOGO
 * ============================================================ */

.mh-logo-shrink:not([src]),
.mh-logo-shrink[src=""] {
    display: none !important;
}

/* ============================================================
 * PREVIEW MODE – SHRINK SAFE
 * ============================================================ */

.mh-preview-mode #master-header {
    transition: height 0.25s ease, box-shadow 0.25s ease;
}

.mh-preview-mode #master-header.mh-shrink {
    position: sticky;
}
.mh-logo-shrink {
    display: none;
}

#master-header.mh-shrink .mh-logo-main {
    display: none;
}

#master-header.mh-shrink .mh-logo-shrink {
    display: inline-block;
}


/* ============================================================
 * LOGO SIZE (ENTERPRISE)
 * ============================================================ */
#master-header.mh-shrink .mh-logo img {
    max-height: var(--mh-logo-max-height-shrink, 36px);
    transform: scale(var(--mh-logo-scale, .75));
    transform-origin: left center;
}


/* ============================================================
 * BUTTON VARIABLES (ENTERPRISE)
 * ============================================================ */
.mh-button {
    background: var(--mh-btn-bg, var(--mh-primary-bg, #2563eb));
    color: var(--mh-btn-color, var(--mh-primary-color, #ffffff));
}
.mh-button:hover {
    background: var(--mh-btn-bg-hover, var(--mh-primary-bg-hover, var(--mh-btn-bg, #2563eb)));
    color: var(--mh-btn-color-hover, var(--mh-primary-color-hover, var(--mh-btn-color, #ffffff)));
}


/* ============================================================
 * MENU DROPDOWN (ENTERPRISE)
 * ============================================================ */
.mh-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--mh-header-bg, #ffffff);
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 10px;
    padding: 8px;
    min-width: 220px;
    box-shadow: 0 20px 40px rgba(0,0,0,.12);
    z-index: 9999;
    flex-direction: column;
    gap: 8px;
}

.mh-menu li:hover > .sub-menu {
    display: flex;
}

.mh-menu .sub-menu a {
    padding: 8px 10px;
    border-radius: 8px;
}

.mh-menu .sub-menu a:hover {
    background: rgba(0,0,0,.05);
}

/* ============================================================
 * MEGA MENU (Lightweight)
 * Usage: add CSS class "mh-mega" or "mh-mega-full" to a top-level WP menu item
 * (Appearance → Menus → Screen Options → CSS Classes)
 * ============================================================ */
#master-header .mh-menu li.mh-mega > .sub-menu,
#master-header .mh-menu li.mega-menu > .sub-menu {
    min-width: 0;
    width: min(1100px, 92vw);
    left: 50%;
    transform: translateX(-50%);
    padding: 16px;
    display: none;
    flex-wrap: wrap;
    gap: 10px;
}

/* Advanced mega: generated panel replaces default submenu items */
#master-header .mh-menu li.mh-has-mega > .sub-menu > li:not(.mh-mega-generated) {
    display: none;
}

/* Mega panel layout (Elementor-like) */
.mh-mega-panel {
    width: 100%;
    display: grid;
    gap: 14px;
}

.mh-mega-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.mh-mega-col {
    display: grid;
    align-content: start;
    gap: 10px;
    min-width: 200px;
}

.mh-mega-h {
    margin: 0;
    font-size: 14px;
    letter-spacing: .02em;
}

.mh-mega-text {
    font-size: 13px;
    line-height: 1.45;
    opacity: .92;
}

.mh-mega-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
}

.mh-mega-links a {
    display: block;
    padding: 8px 10px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--mh-social-color, inherit);
}

.mh-mega-links a:hover {
    background: rgba(0,0,0,.05);
}

.mh-mega-img {
    width: 100%;
    height: auto;
    border-radius: 14px;
    display: block;
}

.mh-mega-hr {
    border: none;
    height: 1px;
    background: rgba(0,0,0,.10);
    margin: 6px 0;
}

/* Presets (10) – subtle variations */
.mh-mega-preset-1 { }
.mh-mega-preset-2 { }
.mh-mega-preset-3 { }
.mh-mega-preset-4 { }
.mh-mega-preset-5 { }
.mh-mega-preset-6 { }
.mh-mega-preset-7 { }
.mh-mega-preset-8 { }
.mh-mega-preset-9 { }
.mh-mega-preset-10 { }

#master-header .mh-menu li.mh-mega-full > .sub-menu {
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 0;
}

#master-header .mh-menu li.mh-mega > .sub-menu > li,
#master-header .mh-menu li.mega-menu > .sub-menu > li {
    width: 220px;
}

#master-header .mh-menu li:hover.mh-mega > .sub-menu,
#master-header .mh-menu li:hover.mega-menu > .sub-menu,
#master-header .mh-menu li:focus-within.mh-mega > .sub-menu,
#master-header .mh-menu li:focus-within.mega-menu > .sub-menu {
    display: flex;
}

/* ============================================================
 * MEGA MENU ADVANCED (Elementor-like)
 * - injected as <li class="mh-mega-generated"><div class="mh-mega-panel">...
 * ============================================================ */

#master-header .mh-menu li.mh-has-mega > .sub-menu {
    padding: 0;
}

#master-header .mh-menu li.mh-has-mega > .sub-menu > li:not(.mh-mega-generated) {
    display: none;
}

#master-header .mh-menu li.mh-has-mega > .sub-menu > li.mh-mega-generated {
    width: 100%;
    padding: 0;
    margin: 0;
}

.mh-mega-panel {
    width: 100%;
    display: grid;
    gap: 12px;
    padding: 18px;
    border-radius: 14px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 20px 50px rgba(0,0,0,.12);
}

.mh-mega-row {
    display: flex;
    gap: 14px;
    flex-wrap: nowrap;
}

.mh-mega-col {
    min-width: 0;
}

.mh-mega-h {
    font-size: 13px;
    letter-spacing: .03em;
    text-transform: uppercase;
    margin: 0 0 8px 0;
    opacity: .85;
}

.mh-mega-text {
    font-size: 14px;
    line-height: 1.45;
    opacity: .92;
}

.mh-mega-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.mh-mega-links a {
    display: block;
    padding: 10px 10px;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    background: rgba(0,0,0,.02);
    border: 1px solid rgba(0,0,0,.06);
}

.mh-mega-links a:hover {
    background: rgba(0,0,0,.05);
}

.mh-mega-hr {
    border: none;
    border-top: 1px solid rgba(0,0,0,.08);
    margin: 10px 0;
}

.mh-mega-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

.mh-mega-btn {
    width: 100%;
    justify-content: center;
}

/* Presets (1-10): subtle gradients/accents, Elementor-ish */
.mh-mega-preset-1 { background: rgba(255,255,255,.96); }
.mh-mega-preset-2 { background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(243,244,246,.96)); }
.mh-mega-preset-3 { background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(239,246,255,.96)); }
.mh-mega-preset-4 { background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(240,253,250,.96)); }
.mh-mega-preset-5 { background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(254,242,242,.96)); }
.mh-mega-preset-6 { background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(250,245,255,.96)); }
.mh-mega-preset-7 { background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,247,237,.96)); }
.mh-mega-preset-8 { background: rgba(17,24,39,.96); color: #f9fafb; }
.mh-mega-preset-8 .mh-mega-links a { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); }
.mh-mega-preset-8 .mh-mega-hr { border-top-color: rgba(255,255,255,.12); }
.mh-mega-preset-9 { background: rgba(2,6,23,.96); color: #e5e7eb; }
.mh-mega-preset-9 .mh-mega-links a { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); }
.mh-mega-preset-9 .mh-mega-hr { border-top-color: rgba(255,255,255,.12); }
.mh-mega-preset-10 { background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(236,254,255,.96)); }

@media (max-width: 1024px) {
    /* Advanced mega is desktop-first; in mobile use offcanvas menu */
    .mh-mega-panel { padding: 14px; }
    .mh-mega-row { flex-wrap: wrap; }
    .mh-mega-col { flex: 1 1 100% !important; }
}

/* ============================================================
 * LANGUAGE SWITCH (ENTERPRISE)
 * ============================================================ */
.mh-lang ul,
.mh-lang-list {
    list-style:none;
    display:flex;
    gap:10px;
    margin:0;
    padding:0;
}
.mh-lang a {
    text-decoration:none;
    font-weight:600;
    opacity:.9;
}
.mh-lang a:hover { opacity:1; }
.mh-lang-fallback { font-weight:600; opacity:.8; }


/* ============================================================
 * SOCIAL ICONS
 * ============================================================ */
.mh-social {
    display: inline-flex;
    align-items: center;
    gap: var(--mh-social-gap, 10px);
    color: var(--mh-social-color, inherit);
}

.mh-social-link {
    width: var(--mh-social-size, 18px);
    height: var(--mh-social-size, 18px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    text-decoration: none;
    color: inherit;
    transition: background .15s ease, transform .15s ease;
}

.mh-social-link:hover {
    background: rgba(0,0,0,.06);
    transform: translateY(-1px);
    color: var(--mh-social-hover-color, inherit);
}

/* Preview placeholders (empty links) */
.mh-social-empty {
    opacity: .35;
    pointer-events: none;
}

/* Editor-Preview: leere Platzhalter müssen anklickbar bleiben,
   damit das SocialIcons-Element im Live-Editor selektiert werden kann. */
body.mh-preview-mode .mh-social-empty {
    pointer-events: auto;
    cursor: pointer;
}

.mh-social-icon{width:100%;height:100%;display:block;}
.mh-social-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
    display: block;
}

.mh-social-icon img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

/* ============================================================
 * LOGIN / ACCOUNT
 * ============================================================ */
.mh-login {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* Icon-only (modern account icon) */
.mh-login-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0 !important;
    border-radius: 999px !important;
    line-height: 1;
}

.mh-login-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
}

.mh-login-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: none;
    stroke: currentColor;
}

.mh-login-link {
    text-decoration: none;
    font-weight: 600;
    color: inherit;
    padding: 6px 10px;
    border-radius: 10px;
}

.mh-login-link:hover {
    background: rgba(0,0,0,.06);
}

/* Inline Login/Register Panel (v1.07.3) */
.mh-login-button:not(.mh-button) { 
    border: none;
    background: transparent;
    cursor: pointer;
}
.mh-login-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    max-width: 90vw;
    background: rgba(255,255,255,.98);
    border: 1px solid rgba(0,0,0,.10);
    box-shadow: 0 18px 40px rgba(0,0,0,.18);
    border-radius: 16px;
    padding: 12px;
    z-index: 10000;
    backdrop-filter: blur(10px);
}
.mh-login { position: relative; }

/* Make sure the native [hidden] attribute always wins, even when modal styles set display:grid !important */
.mh-login-panel[hidden],
.mh-login-panel.mh-login-modal[hidden] { display: none !important; }

/* Contact panels can also use [hidden] */
.mh-contact-panel[hidden] { display: none !important; }

/* Login Modal (Desktop) (v1.07.7) */
.mh-login-panel.mh-login-modal {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    min-height: 100vh;
    max-width: none;
    top: 0;
    right: auto;
    padding: clamp(12px, 3vh, 24px);
    display: grid !important;
    place-items: center !important;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    z-index: 100000;
}
.mh-login-modal .mh-login-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.45);
}
.mh-login-modal .mh-login-dialog {
    position: relative;
    width: 360px;
    max-width: 92vw;
    box-sizing: border-box;
    background: rgba(255,255,255,.98);
    border: 1px solid rgba(0,0,0,.10);
    box-shadow: 0 18px 40px rgba(0,0,0,.22);
    border-radius: 18px;
    padding: 14px;
    backdrop-filter: blur(10px);
}

/* Ensure form controls never overflow the dialog (theme styles sometimes use content-box sizing) */
.mh-login-modal .mh-login-dialog * {
    box-sizing: border-box;
}
html.mh-dark .mh-login-modal .mh-login-dialog {
    background: rgba(17,24,39,.98);
    border-color: rgba(255,255,255,.14);
    color: #e5e7eb;
}
body.mh-modal-open-body { overflow: hidden; }

.mh-login-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}
.mh-login-tabs .mh-tab {
    border: 1px solid rgba(0,0,0,.10);
    background: rgba(0,0,0,.02);
    border-radius: 12px;
    padding: 8px 10px;
    cursor: pointer;
    font-weight: 600;
}
.mh-login-tabs .mh-tab.is-active {
    background: rgba(37,99,235,.10);
    border-color: rgba(37,99,235,.22);
}
.mh-auth-form {
    display: grid;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}

/* Two-column row inside auth forms (e.g. first/last name) */
.mh-auth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
}
.mh-auth-col { min-width: 0; }
@media (max-width: 420px) {
    .mh-auth-row { grid-template-columns: 1fr; }
}
.mh-auth-title {
    font-size: 16px;
    font-weight: 700;
    margin: 2px 0 8px;
}
.mh-auth-switch-row {
    margin-top: 10px;
    display: flex;
    justify-content: center;
}
.mh-auth-switch {
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
    padding: 6px 8px;
    color: rgba(37,99,235,1);
}
.mh-auth-switch:hover { text-decoration: underline; }
.mh-auth-label { font-size: 12px; opacity: .75; }
.mh-auth-help { font-size: 11px; opacity: .65; margin-top: 2px; }
.mh-auth-input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    display: block;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 12px;
    padding: 10px 12px;
    outline: none;
}
.mh-auth-textarea { resize: vertical; }
.mh-auth-input:focus { border-color: rgba(37,99,235,.55); box-shadow: 0 0 0 3px rgba(37,99,235,.14); }
.mh-auth-remember { font-size: 12px; opacity: .85; display: inline-flex; align-items: center; gap: 8px; }
.mh-auth-submit {
    border: none;
    background: #111827;
    color: #ffffff;
    border-radius: 12px;
    padding: 10px 12px;
    cursor: pointer;
    font-weight: 700;
    width: 100%;
    box-sizing: border-box;
}
.mh-auth-submit:hover { opacity: .92; }
.mh-auth-msg { margin-top: 8px; font-size: 12px; opacity: .85; }

html.mh-dark .mh-login-panel {
    background: rgba(17,24,39,.98);
    border-color: rgba(255,255,255,.14);
    color: #e5e7eb;
}
html.mh-dark .mh-auth-input {
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.14);
    color: #e5e7eb;
}
html.mh-dark .mh-login-tabs .mh-tab { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.14); color: #e5e7eb; }

/* ============================================================
 * CONTACT
 * ============================================================ */
.mh-contact {
    display: inline-flex;
    align-items: center;
    gap: var(--mh-contact-gap, 10px);
    font-weight: 500;
}

.mh-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--mh-social-color, inherit);
}

.mh-contact-link:hover {
    text-decoration: underline;
}

.mh-contact-sep {
    opacity: .55;
}



/* Contact Dropdown Panel (v1.07.7) */
.mh-contact { position: relative; }
.mh-contact-button { display: inline-flex; align-items: center; gap: 8px; }
.mh-contact-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 240px;
    max-width: 92vw;
    background: rgba(255,255,255,.98);
    border: 1px solid rgba(0,0,0,.10);
    box-shadow: 0 18px 40px rgba(0,0,0,.18);
    border-radius: 16px;
    padding: 10px;
    z-index: 10000;
    backdrop-filter: blur(10px);
    display: grid;
    gap: 6px;
}
.mh-contact-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--mh-social-color, inherit);
}
.mh-contact-row:hover { background: rgba(0,0,0,.06); }
.mh-contact-ico svg { width: 16px; height: 16px; display: block; }
html.mh-dark .mh-contact-panel {
    background: rgba(17,24,39,.98);
    border-color: rgba(255,255,255,.14);
    color: #e5e7eb;
}
html.mh-dark .mh-contact-row:hover { background: rgba(255,255,255,.06); }
/* ============================================================
 * DIVIDER / SPACER
 * ============================================================ */
.mh-divider {
    display: inline-block;
    width: var(--mh-divider-thickness, 1px);
    height: var(--mh-divider-height, 28px);
    background: var(--mh-divider-color, rgba(0,0,0,.22));
    border-radius: 999px;
    opacity: .85;
}

.mh-spacer {
    display: inline-block;
    width: var(--mh-spacer-width, 14px);
    height: 1px;
}



/* ============================================================
 * MENU PRESETS + HOVER/ACTIVE/GRADIENT (v1.07.0)
 * ============================================================ */

.mh-menu {
    --mh-menu-gap: 14px;
    --mh-menu-item-pad-y: 8px;
    --mh-menu-item-pad-x: 12px;
    --mh-menu-radius: 10px;

    --mh-menu-color: inherit;
    --mh-menu-hover-color: inherit;
    --mh-menu-active-color: inherit;

    --mh-menu-hover-grad1: rgba(37,99,235,.10);
    --mh-menu-hover-grad2: rgba(37,99,235,.18);

    --mh-menu-active-grad1: rgba(37,99,235,.16);
    --mh-menu-active-grad2: rgba(37,99,235,.26);
}

.mh-menu .mh-menu-list {
    gap: var(--mh-menu-gap);
}

.mh-menu .mh-menu-item > a {
    padding: var(--mh-menu-item-pad-y) var(--mh-menu-item-pad-x);
    border-radius: var(--mh-menu-radius);
    color: var(--mh-menu-color);
    transition: background .15s ease, color .15s ease, transform .15s ease;
}

.mh-menu .mh-menu-item > a:hover {
    color: var(--mh-menu-hover-color);
    background: linear-gradient(90deg, var(--mh-menu-hover-grad1), var(--mh-menu-hover-grad2));
}

.mh-menu .current-menu-item > a,
.mh-menu .current_page_item > a,
.mh-menu .current-menu-ancestor > a {
    color: var(--mh-menu-active-color);
    background: linear-gradient(90deg, var(--mh-menu-active-grad1), var(--mh-menu-active-grad2));
}

/* 10 Presets (minimal variations, can be overridden via inline CSS vars) */
.mh-menu-preset-1 { --mh-menu-hover-grad1: rgba(37,99,235,.10); --mh-menu-hover-grad2: rgba(37,99,235,.22); --mh-menu-active-grad1: rgba(37,99,235,.18); --mh-menu-active-grad2: rgba(37,99,235,.34); }
.mh-menu-preset-2 { --mh-menu-hover-grad1: rgba(16,185,129,.10); --mh-menu-hover-grad2: rgba(16,185,129,.22); --mh-menu-active-grad1: rgba(16,185,129,.18); --mh-menu-active-grad2: rgba(16,185,129,.34); }
.mh-menu-preset-3 { --mh-menu-hover-grad1: rgba(245,158,11,.12); --mh-menu-hover-grad2: rgba(245,158,11,.26); --mh-menu-active-grad1: rgba(245,158,11,.18); --mh-menu-active-grad2: rgba(245,158,11,.38); }
.mh-menu-preset-4 { --mh-menu-hover-grad1: rgba(168,85,247,.10); --mh-menu-hover-grad2: rgba(168,85,247,.22); --mh-menu-active-grad1: rgba(168,85,247,.18); --mh-menu-active-grad2: rgba(168,85,247,.34); }
.mh-menu-preset-5 { --mh-menu-hover-grad1: rgba(236,72,153,.10); --mh-menu-hover-grad2: rgba(236,72,153,.22); --mh-menu-active-grad1: rgba(236,72,153,.18); --mh-menu-active-grad2: rgba(236,72,153,.34); }
.mh-menu-preset-6 { --mh-menu-hover-grad1: rgba(15,23,42,.08); --mh-menu-hover-grad2: rgba(15,23,42,.14); --mh-menu-active-grad1: rgba(15,23,42,.12); --mh-menu-active-grad2: rgba(15,23,42,.18); }
.mh-menu-preset-7 { --mh-menu-hover-grad1: rgba(2,132,199,.10); --mh-menu-hover-grad2: rgba(2,132,199,.22); --mh-menu-active-grad1: rgba(2,132,199,.18); --mh-menu-active-grad2: rgba(2,132,199,.34); }
.mh-menu-preset-8 { --mh-menu-hover-grad1: rgba(244,63,94,.10); --mh-menu-hover-grad2: rgba(244,63,94,.22); --mh-menu-active-grad1: rgba(244,63,94,.18); --mh-menu-active-grad2: rgba(244,63,94,.34); }
.mh-menu-preset-9 { --mh-menu-hover-grad1: rgba(99,102,241,.10); --mh-menu-hover-grad2: rgba(99,102,241,.22); --mh-menu-active-grad1: rgba(99,102,241,.18); --mh-menu-active-grad2: rgba(99,102,241,.34); }
.mh-menu-preset-10{ --mh-menu-hover-grad1: rgba(20,184,166,.10); --mh-menu-hover-grad2: rgba(20,184,166,.22); --mh-menu-active-grad1: rgba(20,184,166,.18); --mh-menu-active-grad2: rgba(20,184,166,.34); }

/* ============================================================
 * SEARCH (modern, width per device via --mh-search-width) (v1.07.0)
 * ============================================================ */

.mh-search {
    --mh-search-width: auto;
    --mh-search-radius: 12px;
    --mh-search-bg: #ffffff;
    --mh-search-border: rgba(17,24,39,.14);
    --mh-search-text: #111827;
    --mh-search-placeholder: rgba(17,24,39,.55);

    --mh-search-btn-bg: #111827;
    --mh-search-btn-color: #ffffff;

    width: var(--mh-search-width);
    max-width: 100%;
    min-width: 0;
    position: relative;
}

.mh-search .mh-search-form {
    display: flex;
    align-items: center;
    width: 100%;
    border-radius: var(--mh-search-radius);
    border: 1px solid var(--mh-search-border);
    background: var(--mh-search-bg);
    overflow: hidden;
}

.mh-search .mh-search-input {
    flex: 1 1 auto;
    border: none !important;
    outline: none !important;
    background: transparent;
    color: var(--mh-search-text);
    padding: 10px 12px;
    min-width: 140px;
}

.mh-search .mh-search-input::placeholder {
    color: var(--mh-search-placeholder);
}

.mh-search .mh-search-button {
    border: none;
    cursor: pointer;
    background: var(--mh-search-btn-bg);
    color: var(--mh-search-btn-color);
    padding: 10px 12px;
    margin: 2px;
    border-radius: calc(var(--mh-search-radius) - 2px);
    transition: transform .15s ease, opacity .15s ease;
}

.mh-search .mh-search-button:hover {
    transform: translateY(-1px);
    opacity: .95;
}

/* Live search dropdown (Woo products) */
.mh-search-results {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 10px);
    background: rgba(255,255,255,.98);
    border: 1px solid rgba(0,0,0,.10);
    box-shadow: 0 18px 40px rgba(0,0,0,.18);
    border-radius: 16px;
    overflow: hidden;
    z-index: 10000;
    display: none;
}
.mh-search-results.is-open { display: block; }
.mh-search-loading,
.mh-search-empty {
    padding: 12px;
    font-size: 13px;
    opacity: .75;
}
.mh-search-item {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 12px;
    text-decoration: none;
    color: var(--mh-social-color, inherit);
}
.mh-search-item:hover { background: rgba(0,0,0,.04); }
.mh-search-img img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 12px;
}
.mh-search-ph {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(0,0,0,.04);
}
.mh-search-title { font-weight: 650; line-height: 1.2; }
.mh-search-price { font-size: 12px; opacity: .8; }
.mh-search-txt {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.mh-search-row1 {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}
.mh-search-price {
    white-space: nowrap;
    text-align: right;
}
.mh-search-desc {
    font-size: 12px;
    opacity: .75;
    line-height: 1.25;
}
@media (min-width: 1024px) {
    .mh-search-item {
        grid-template-columns: 88px 1fr;
        gap: 14px;
        padding: 14px 16px;
    }
    .mh-search-img img,
    .mh-search-ph {
        width: 88px;
        height: 88px;
        border-radius: 16px;
    }
    .mh-search-title {
        font-size: 18px;
        font-weight: 700;
    }
    .mh-search-price {
        font-size: 14px;
    }
    .mh-search-desc {
        font-size: 13px;
    }
}

.mh-search-all {
    display: block;
    padding: 10px 12px;
    text-decoration: none;
    font-weight: 650;
    border-top: 1px solid rgba(0,0,0,.08);
}

html.mh-dark .mh-search-results {
    background: rgba(17,24,39,.98);
    border-color: rgba(255,255,255,.14);
    color: #e5e7eb;
}
html.mh-dark .mh-search-item:hover { background: rgba(255,255,255,.06); }
html.mh-dark .mh-search-ph { background: rgba(255,255,255,.06); }
.mh-search-all:hover { background: rgba(0,0,0,.04); }

html.mh-dark .mh-search-results {
    background: rgba(17,24,39,.98);
    border-color: rgba(255,255,255,.14);
    color: #e5e7eb;
}
html.mh-dark .mh-search-item:hover { background: rgba(255,255,255,.06); }
html.mh-dark .mh-search-all:hover { background: rgba(255,255,255,.06); }

/* 10 Search Presets (variable defaults) */
.mh-search-preset-1 { --mh-search-btn-bg:#111827; --mh-search-border: rgba(17,24,39,.14); }
.mh-search-preset-2 { --mh-search-btn-bg:#2563eb; --mh-search-border: rgba(37,99,235,.22); }
.mh-search-preset-3 { --mh-search-btn-bg:#16a34a; --mh-search-border: rgba(22,163,74,.22); }
.mh-search-preset-4 { --mh-search-btn-bg:#f59e0b; --mh-search-border: rgba(245,158,11,.26); }
.mh-search-preset-5 { --mh-search-btn-bg:#a855f7; --mh-search-border: rgba(168,85,247,.26); }
.mh-search-preset-6 { --mh-search-btn-bg:#0ea5e9; --mh-search-border: rgba(14,165,233,.24); }
.mh-search-preset-7 { --mh-search-btn-bg:#ec4899; --mh-search-border: rgba(236,72,153,.24); }
.mh-search-preset-8 { --mh-search-btn-bg:#ef4444; --mh-search-border: rgba(239,68,68,.24); }
.mh-search-preset-9 { --mh-search-btn-bg:#14b8a6; --mh-search-border: rgba(20,184,166,.24); }
.mh-search-preset-10{ --mh-search-btn-bg:#334155; --mh-search-border: rgba(51,65,85,.24); }

/* (Search modal styles are defined further below.) */

.mh-search.mh-search-icononly {
    width: auto;
}

.mh-search-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    min-width: 40px;
    padding: 0;
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    border-radius: 999px;
    line-height: 1;
}

.mh-search-trigger svg {
    width: 22px;
    height: 22px;
    display: block;
}

.mh-search-trigger:hover {
    background: rgba(0,0,0,.06);
}
html.mh-dark .mh-search-trigger:hover {
    background: rgba(255,255,255,.08);
}

/* Modal wrapper */
.mh-search-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 64px 18px 18px;
}

/* Respect the HTML `hidden` attribute even if other rules match */
.mh-search-modal[hidden] { display: none !important; }

.mh-search-modal.is-open { display: flex; }

.mh-search-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.45);
}

.mh-search-dialog {
    position: relative;
    width: min(720px, 100%);
    max-height: calc(100vh - 92px);
    max-height: calc(100dvh - 92px);
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,.98);
    color: #111827;
    border: 1px solid rgba(0,0,0,.10);
    border-radius: 22px;
    box-shadow: 0 30px 90px rgba(0,0,0,.38);
    overflow: hidden;
}

html.mh-dark .mh-search-dialog {
    background: rgba(17,24,39,.98);
    color: #e5e7eb;
    border-color: rgba(255,255,255,.14);
}

/* Fullscreen on tablet/mobile */
@media (max-width: 1024px) {
    .mh-search-modal { padding: 0; }
    .mh-search-dialog {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        max-height: 100dvh;
        border-radius: 0;
    }
}

.mh-search-top {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 14px 10px;
    border-bottom: 1px solid rgba(0,0,0,.06);
}
html.mh-dark .mh-search-top { border-bottom-color: rgba(255,255,255,.10); }

.mh-search-modal .mh-search-form { width: 100%; }

.mh-search-field {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,.10);
    background: rgba(0,0,0,.04);
    padding: 0 10px;
}
html.mh-dark .mh-search-field {
    border-color: rgba(255,255,255,.14);
    background: rgba(255,255,255,.06);
}

.mh-search-field-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: .75;
}
.mh-search-field-icon svg { width: 18px; height: 18px; display: block; }

.mh-search-modal .mh-search-input {
    flex: 1 1 auto;
    border: none !important;
    outline: none !important;
    background: transparent;
    color: inherit;
    padding: 12px 8px;
    font-size: 16px;
    min-width: 0;
}

.mh-search-submit {
    border: none;
    cursor: pointer;
    background: var(--mh-search-btn-bg, #111827);
    color: var(--mh-search-btn-color, #ffffff);
    padding: 10px 12px;
    border-radius: 14px;
}

.mh-search-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    min-width: 40px;
    padding: 0;
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    border-radius: 999px;
    line-height: 1;
}
.mh-search-close:hover { background: rgba(0,0,0,.06); }
html.mh-dark .mh-search-close:hover { background: rgba(255,255,255,.08); }

/* Live results inside modal – subtle list */
.mh-search-modal .mh-search-results {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    margin: 12px;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,.08);
    background: rgba(255,255,255,.85);
    box-shadow: none;
    overflow: auto;
    max-height: calc(100vh - 190px);
    max-height: calc(100dvh - 190px);
}
html.mh-dark .mh-search-modal .mh-search-results {
    border-color: rgba(255,255,255,.12);
    background: rgba(17,24,39,.55);
}

.mh-search-modal .mh-search-item {
    grid-template-columns: 32px 1fr;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(0,0,0,.06);
}
html.mh-dark .mh-search-modal .mh-search-item { border-bottom-color: rgba(255,255,255,.08); }
.mh-search-modal .mh-search-item:last-child { border-bottom: none; }

.mh-search-modal .mh-search-img img {
    width: 32px;
    height: 32px;
    border-radius: 10px;
}
.mh-search-modal .mh-search-ph {
    width: 32px;
    height: 32px;
    border-radius: 10px;
}

.mh-search-modal .mh-search-title {
    font-weight: 600;
    font-size: 14px;
}
.mh-search-modal .mh-search-price {
    font-size: 12px;
    opacity: .75;
}

/* ============================================================
 * ICON ALIGNMENT (vertical centering)
 * ============================================================ */

.mh-woo-cart .mh-cart-link,
.mh-woo-cart .mh-cart-button,
.mh-woo-wishlist .mh-wishlist-button,
.mh-woo-wishlist .mh-wishlist-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 10px;
    border-radius: 999px;
    line-height: 1;
}

.mh-woo-cart .mh-cart-link:hover,
.mh-woo-cart .mh-cart-button:hover,
.mh-woo-wishlist .mh-wishlist-button:hover,
.mh-woo-wishlist .mh-wishlist-link:hover {
    background: rgba(0,0,0,.06);
}
html.mh-dark .mh-woo-cart .mh-cart-link:hover,
html.mh-dark .mh-woo-cart .mh-cart-button:hover,
html.mh-dark .mh-woo-wishlist .mh-wishlist-button:hover,
html.mh-dark .mh-woo-wishlist .mh-wishlist-link:hover {
    background: rgba(255,255,255,.08);
}

.mh-cart-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
html.mh-dark .wp-site-blocks a { color: inherit; }


html.mh-dark .mh-header {
    background: #0b1220 !important;
    color: #e5e7eb !important;
}

html.mh-dark .mh-menu {
    --mh-menu-hover-grad1: rgba(59,130,246,.18);
    --mh-menu-hover-grad2: rgba(59,130,246,.30);
    --mh-menu-active-grad1: rgba(59,130,246,.26);
    --mh-menu-active-grad2: rgba(59,130,246,.40);
}

html.mh-dark .mh-search {
    --mh-search-bg: rgba(255,255,255,.06);
    --mh-search-border: rgba(255,255,255,.16);
    --mh-search-text: #e5e7eb;
    --mh-search-placeholder: rgba(229,231,235,.55);
}

/* Dark mode toggle button */
.mh-dark-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(17,24,39,.14);
    background: rgba(255,255,255,.7);
    color: inherit;
    border-radius: 999px;
    padding: 8px 10px;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.mh-dark-toggle:hover { transform: translateY(-1px); }
html.mh-dark .mh-dark-toggle {
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.16);
}
.mh-dark-toggle .mh-dark-ico { font-size: 16px; line-height: 1; }



/* Toggle icon switching */
.mh-dark-toggle .mh-ico-on { display: none; }
html.mh-dark .mh-dark-toggle .mh-ico-on { display: inline; }
html.mh-dark .mh-dark-toggle .mh-ico-off { display: none; }
