/* MiniZshop UberSearch v3.0 — Modern, polished product search (mobile-first) */

:root {
    --mzu-primary: #dc2626;
    --mzu-primary-dark: #b91c1c;
    --mzu-primary-light: #fee2e2;
    --mzu-bg: #ffffff;
    --mzu-bg-hover: #fafafa;
    --mzu-bg-subtle: #f7f7f7;
    --mzu-border: #eaeaea;
    --mzu-border-light: #f0f0f0;
    --mzu-text: #1a1a1a;
    --mzu-text-secondary: #717171;
    --mzu-text-muted: #a0a0a0;
    --mzu-radius: 16px;
    --mzu-radius-sm: 10px;
    --mzu-radius-xs: 6px;
    --mzu-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    --mzu-shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(0, 0, 0, 0.08);
    --mzu-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.06);
    --mzu-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mzu-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --mzu-transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =================================================================
 * ANIMATIONS
 * ================================================================= */

@keyframes mzu-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes mzu-slide-up {
    from { 
        opacity: 0;
        transform: translateY(12px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes mzu-slide-down {
    from { 
        opacity: 0;
        transform: translateY(-8px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes mzu-scale-in {
    from { 
        opacity: 0;
        transform: scale(0.96);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes mzu-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes mzu-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes mzu-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes mzu-stagger-in {
    from { 
        opacity: 0;
        transform: translateY(8px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* =================================================================
 * SHORTCODE WIDGET — [ubersearch]
 * ================================================================= */

.mzu-ubersearch {
    position: relative;
    width: 100%;
    max-width: 600px;
    font-family: var(--mzu-font);
}

.mzu-search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.mzu-search-input {
    width: 100%;
    padding: 16px 52px 16px 20px;
    font-size: 16px;
    line-height: 1.5;
    border: 2px solid var(--mzu-border);
    border-radius: var(--mzu-radius);
    background: var(--mzu-bg);
    color: var(--mzu-text);
    outline: none;
    transition: all var(--mzu-transition);
}

.mzu-search-input:focus {
    border-color: var(--mzu-primary);
    box-shadow: 0 0 0 4px var(--mzu-primary-light);
}

.mzu-search-input::placeholder {
    color: var(--mzu-text-muted);
}

.mzu-search-icon,
.mzu-search-spinner {
    position: absolute;
    right: 18px;
    color: var(--mzu-text-secondary);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity var(--mzu-transition-fast);
}

.mzu-search-spinner svg {
    animation: mzu-spin 0.8s linear infinite;
}

/* =================================================================
 * RESULTS DROPDOWN
 * ================================================================= */

.mzu-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    max-height: min(75vh, 700px);
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--mzu-bg);
    border: 1px solid var(--mzu-border-light);
    border-radius: var(--mzu-radius);
    box-shadow: var(--mzu-shadow-lg);
    z-index: 999999;
    font-family: var(--mzu-font);
    scrollbar-width: thin;
    scrollbar-color: var(--mzu-border) transparent;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    transform-origin: top center;

    /* Transition-based show/hide — replaces display:none toggling */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px) scaleY(0.97);
    transition:
        opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.25s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.mzu-results.mzu-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scaleY(1);
}

.mzu-results::-webkit-scrollbar {
    width: 6px;
}

.mzu-results::-webkit-scrollbar-track {
    background: transparent;
}

.mzu-results::-webkit-scrollbar-thumb {
    background: var(--mzu-border);
    border-radius: 3px;
}

.mzu-results:empty {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Overlay-specific adjustments */
.mzu-overlay-results {
    min-width: 360px;
    width: 100%;
}

/* TranslatePress hiding */
.nasa-show-search-form .trp-language-switcher,
.nasa-search-space .trp-language-switcher,
.nasa-ajax-search-form-container .trp-language-switcher,
.search-wrapper .trp-language-switcher,
.warpper-mobile-search .trp-language-switcher {
    display: none !important;
}

.trp-language-switcher {
    z-index: 9990 !important;
}

/* Elessi theme integration */
.nasa-search-form-container .mzu-overlay-results,
.nasa-ajax-search-form-container .mzu-overlay-results,
.search-wrapper .mzu-overlay-results {
    z-index: 999999 !important;
    position: absolute;
    width: 100%;
    left: 0;
}

/* =================================================================
 * RESULT ITEM — Modern Card Style
 * ================================================================= */

.mzu-result-item {
    display: flex;
    gap: 16px;
    padding: 14px 18px;
    text-decoration: none !important;
    color: var(--mzu-text) !important;
    transition: all var(--mzu-transition);
    border-bottom: 1px solid var(--mzu-border-light);
    outline: none;
    box-sizing: border-box;
    position: relative;
    animation: mzu-stagger-in 0.3s ease-out backwards;
}

/* Staggered animation delays */
.mzu-result-item:nth-child(1) { animation-delay: 0ms; }
.mzu-result-item:nth-child(2) { animation-delay: 30ms; }
.mzu-result-item:nth-child(3) { animation-delay: 60ms; }
.mzu-result-item:nth-child(4) { animation-delay: 90ms; }
.mzu-result-item:nth-child(5) { animation-delay: 120ms; }
.mzu-result-item:nth-child(6) { animation-delay: 150ms; }
.mzu-result-item:nth-child(7) { animation-delay: 180ms; }
.mzu-result-item:nth-child(8) { animation-delay: 210ms; }

.mzu-result-item:last-child,
.mzu-result-item:last-of-type {
    border-bottom: none;
}

.mzu-result-item:hover,
.mzu-result-item:focus {
    background: linear-gradient(to right, var(--mzu-bg-hover), transparent);
    transform: translateX(4px);
}

.mzu-result-item:focus {
    background: var(--mzu-primary-light);
}

.mzu-result-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: var(--mzu-primary);
    transition: width var(--mzu-transition);
    border-radius: 0 4px 4px 0;
}

.mzu-result-item:hover::before,
.mzu-result-item:focus::before {
    width: 3px;
}

/* =================================================================
 * PRODUCT IMAGE
 * ================================================================= */

.mzu-result-image {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: var(--mzu-radius-sm);
    overflow: hidden;
    background: var(--mzu-bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform var(--mzu-transition), box-shadow var(--mzu-transition);
}

.mzu-result-item:hover .mzu-result-image {
    transform: scale(1.05);
    box-shadow: var(--mzu-shadow-hover);
}

.mzu-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--mzu-transition);
}

.mzu-result-item:hover .mzu-result-image img {
    transform: scale(1.08);
}

.mzu-result-image-placeholder {
    font-size: 28px;
    opacity: 0.3;
    color: var(--mzu-text-secondary);
}

/* =================================================================
 * PRODUCT INFO
 * ================================================================= */

.mzu-result-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
}

.mzu-result-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--mzu-text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--mzu-transition-fast);
}

.mzu-result-item:hover .mzu-result-name {
    color: var(--mzu-primary-dark);
}

.mzu-result-name mark {
    background: var(--mzu-primary-light);
    color: var(--mzu-primary-dark);
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 700;
}

/* Sub-line: SKU · Brand · Category */
.mzu-result-sub {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
    margin-top: 2px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--mzu-text-secondary);
}

.mzu-result-sub mark {
    background: var(--mzu-primary-light);
    color: var(--mzu-primary-dark);
    padding: 0 2px;
    border-radius: 2px;
    font-weight: 600;
}

.mzu-result-sku {
    font-family: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
    font-size: 11px;
    font-weight: 500;
    color: var(--mzu-text-muted);
    letter-spacing: 0.02em;
}

.mzu-result-brand {
    font-weight: 600;
    color: var(--mzu-text-secondary);
}

.mzu-result-cat-inline {
    font-weight: 400;
    color: var(--mzu-text-muted);
}

.mzu-result-sep {
    margin: 0 6px;
    color: var(--mzu-border);
    font-weight: 400;
    user-select: none;
}

/* ===== Meta Elements ===== */

.mzu-meta-separator {
    color: var(--mzu-border);
    margin: 0 2px;
}

.mzu-meta-time {
    color: var(--mzu-text-muted);
    font-weight: 400;
}

.mzu-result-desc {
    font-size: 12px;
    color: var(--mzu-text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mzu-result-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.mzu-result-price {
    font-weight: 700;
    font-size: 15px;
    color: var(--mzu-primary);
    letter-spacing: -0.02em;
}

.mzu-result-price del {
    color: var(--mzu-text-muted);
    font-weight: 400;
    font-size: 12px;
    margin-right: 4px;
    text-decoration: line-through;
}

.mzu-result-stock {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    padding: 2px 6px;
    border-radius: var(--mzu-radius-xs);
}

.mzu-result-stock.in-stock {
    color: #16a34a;
    background: #dcfce7;
}

.mzu-result-stock.in-stock.low-stock {
    color: #d97706;
    background: #fef3c7;
}

.mzu-result-stock.out-of-stock {
    color: #dc2626;
    background: #fee2e2;
}

/* Out-of-stock product row — muted */
.mzu-result-item.mzu-oos {
    opacity: 0.55;
    background: var(--mzu-bg-subtle, #f7f7f7);
}

.mzu-result-item.mzu-oos:hover {
    opacity: 0.75;
}

/* =================================================================
 * CATEGORIES
 * ================================================================= */

.mzu-result-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.mzu-result-cat {
    font-size: 10px;
    font-weight: 500;
    padding: 2px 8px;
    background: var(--mzu-bg-subtle);
    border-radius: 20px;
    color: var(--mzu-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: all var(--mzu-transition-fast);
}

.mzu-result-item:hover .mzu-result-cat {
    background: var(--mzu-border);
}

/* =================================================================
 * BADGES
 * ================================================================= */

.mzu-result-badges {
    display: flex;
    gap: 5px;
    margin-bottom: 4px;
}

.mzu-badge {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 8px;
    border-radius: 20px;
    line-height: 1.2;
}

.mzu-badge-sale {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #ffffff;
}

.mzu-badge-featured {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #ffffff;
}

/* =================================================================
 * VIEW ALL RESULTS — Prominent Button
 * ================================================================= */

.mzu-view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 20px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--mzu-primary) !important;
    text-decoration: none !important;
    background: linear-gradient(to top, var(--mzu-bg-subtle), var(--mzu-bg));
    border-top: 1px solid var(--mzu-border-light);
    transition: all var(--mzu-transition);
    outline: none;
    position: relative;
    overflow: hidden;
}

.mzu-view-all::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--mzu-primary-light), transparent);
    opacity: 0;
    transition: opacity var(--mzu-transition);
}

.mzu-view-all:hover::before,
.mzu-view-all:focus::before {
    opacity: 1;
}

.mzu-view-all:hover,
.mzu-view-all:focus {
    color: var(--mzu-primary-dark) !important;
    padding-left: 24px;
    padding-right: 24px;
}

.mzu-view-all::after {
    content: '\2192';
    font-size: 16px;
    transition: transform var(--mzu-transition);
}

.mzu-view-all:hover::after {
    transform: translateX(4px);
}

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

.mzu-search-meta {
    padding: 10px 18px;
    font-size: 12px;
    color: var(--mzu-text-muted);
    background: var(--mzu-bg-subtle);
    border: 1px solid var(--mzu-border-light);
    border-top: none;
    border-radius: 0 0 var(--mzu-radius) var(--mzu-radius);
    position: absolute;
    left: 0;
    right: 0;
    z-index: 999998;
    font-family: var(--mzu-font);
    display: flex;
    align-items: center;
    gap: 6px;
}

.mzu-search-meta strong {
    color: var(--mzu-text);
    font-weight: 600;
}

/* =================================================================
 * SEMANTIC RESULTS (PHASE 2)
 * ================================================================= */

.mzu-semantic-section {
    border-top: 1px solid var(--mzu-border);
    margin-top: 4px;
}

.mzu-semantic-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--mzu-text-muted);
}

.mzu-semantic-icon {
    flex-shrink: 0;
    opacity: 0.7;
}

.mzu-semantic-hits .mzu-result-item {
    opacity: 0;
    animation: mzu-fade-in 0.25s ease-out forwards;
}

.mzu-semantic-hits .mzu-result-item:nth-child(1) { animation-delay: 0.05s; }
.mzu-semantic-hits .mzu-result-item:nth-child(2) { animation-delay: 0.1s; }
.mzu-semantic-hits .mzu-result-item:nth-child(3) { animation-delay: 0.15s; }
.mzu-semantic-hits .mzu-result-item:nth-child(4) { animation-delay: 0.2s; }

/* =================================================================
 * NO RESULTS
 * ================================================================= */

.mzu-no-results {
    padding: 48px 24px;
    text-align: center;
    color: var(--mzu-text-secondary);
    font-size: 14px;
    animation: mzu-fade-in 0.3s ease-out;
}

.mzu-no-results-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.4;
    animation: mzu-pulse 2s ease-in-out infinite;
}

/* =================================================================
 * LOADING STATE
 * ================================================================= */

.mzu-ubersearch.mzu-is-loading .mzu-search-icon,
.mzu-ubersearch.is-loading .mzu-search-icon {
    display: none;
}

.mzu-ubersearch:not(.mzu-is-loading):not(.is-loading) .mzu-search-spinner {
    display: none;
}

/* Loading bar animation — works for both inline (parent > child) and portal (self) */
.mzu-is-loading > .mzu-overlay-results::before,
.mzu-is-loading > .mzu-results::before,
.mzu-results.mzu-portal.mzu-is-loading::before {
    content: '';
    display: block;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: linear-gradient(
        90deg,
        var(--mzu-primary) 0%,
        var(--mzu-primary-light) 30%,
        var(--mzu-primary) 50%,
        var(--mzu-primary-light) 70%,
        var(--mzu-primary) 100%
    );
    background-size: 200% 100%;
    animation: mzu-shimmer 1.2s ease-in-out infinite;
}

/* Skeleton loading placeholder */
.mzu-skeleton {
    background: linear-gradient(
        90deg,
        var(--mzu-bg-subtle) 25%,
        var(--mzu-border-light) 50%,
        var(--mzu-bg-subtle) 75%
    );
    background-size: 200% 100%;
    animation: mzu-shimmer 1.5s ease-in-out infinite;
    border-radius: var(--mzu-radius-xs);
}

/* =================================================================
 * PORTAL MODE — for Elessi overlay/mobile search
 * ================================================================= */

.mzu-portal {
    max-height: min(75vh, 700px);
    overflow-y: auto;
    background: var(--mzu-bg);
    border: 1px solid var(--mzu-border-light);
    border-radius: var(--mzu-radius);
    box-shadow: var(--mzu-shadow-lg);
    z-index: 10001 !important;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    animation: mzu-slide-down 0.25s ease-out;
}

.mzu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    animation: mzu-fade-in 0.2s ease-out;
    /* Prevent any scroll interaction */
    overscroll-behavior: contain;
    touch-action: none;
}

/* =================================================================
 * MOBILE RESPONSIVE — Full-screen results below input
 * ================================================================= */

@media (max-width: 768px) {
    .mzu-portal {
        position: fixed !important;
        /* top is set dynamically by JS based on input position */
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        /* max-height set dynamically by JS */
        border-radius: 0 !important;
        box-shadow: none !important;
        border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
        border-left: none !important;
        border-right: none !important;
        border-bottom: none !important;
        animation: none !important;
        /* iOS safe area at bottom */
        padding-bottom: env(safe-area-inset-bottom, 0px) !important;
        overflow-y: auto !important;
        display: flex;
        flex-direction: column;
    }

    .mzu-portal::before {
        /* Allow loading bar, but hide if not loading */
        position: sticky;
        top: 0;
        z-index: 1;
    }

    .mzu-portal:not(.mzu-is-loading)::before {
        display: none !important;
    }

    .mzu-results:not(.mzu-portal),
    .mzu-overlay-results:not(.mzu-portal) {
        position: fixed !important;
        /* top set dynamically by JS based on input position */
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        min-width: 0 !important;
        /* max-height set dynamically by JS */
        border-radius: 0 !important;
        box-shadow: none !important;
        border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
        z-index: 9999999 !important;
        animation: none !important;
        padding-bottom: env(safe-area-inset-bottom, 0px) !important;
        overflow-y: auto !important;
        display: flex;
        flex-direction: column;
    }

    .mzu-results:not(.mzu-portal)::before,
    .mzu-overlay-results:not(.mzu-portal)::before {
        position: sticky;
        top: 0;
        z-index: 1;
    }

    .mzu-backdrop {
        background: rgba(0, 0, 0, 0.5);
    }

    /* --- Compact product cards --- */
    .mzu-result-item {
        padding: 10px 16px;
        gap: 10px;
        border-bottom-color: rgba(0, 0, 0, 0.04);
    }

    .mzu-result-item:hover,
    .mzu-result-item:focus {
        transform: none;
    }

    .mzu-result-item:hover::before,
    .mzu-result-item:focus::before {
        width: 0;
    }

    .mzu-result-image {
        width: 56px;
        height: 56px;
        border-radius: 10px;
    }

    .mzu-result-item:hover .mzu-result-image {
        transform: none;
        box-shadow: none;
    }

    .mzu-result-item:hover .mzu-result-image img {
        transform: none;
    }

    .mzu-result-info {
        gap: 2px;
    }

    .mzu-result-name {
        font-size: 13px;
        font-weight: 500;
        -webkit-line-clamp: 2;
    }

    .mzu-result-sub {
        font-size: 11px;
        margin-top: 1px;
    }

    .mzu-result-desc {
        display: none;
    }

    .mzu-result-meta {
        margin-top: 2px;
        gap: 8px;
    }

    .mzu-result-price {
        font-size: 14px;
    }

    .mzu-result-stock {
        font-size: 9px;
        padding: 1px 5px;
    }

    /* Products section — flex-grow so it fills remaining space */
    .mzu-section-products {
        flex: 1 0 auto;
    }

    /* --- Sticky "View all" --- */
    .mzu-view-all {
        padding: 14px 16px;
        font-size: 14px;
        font-weight: 600;
        background: var(--mzu-bg, #ffffff);
        border-top: 1px solid rgba(0, 0, 0, 0.06);
        position: sticky;
        bottom: 0;
        margin: 0;
        z-index: 10;
        flex-shrink: 0;
    }

    .mzu-view-all::before {
        display: none;
    }

    .mzu-search-meta,
    .mzu-overlay-meta {
        position: sticky !important;
        bottom: 0;
        left: 0 !important;
        right: 0 !important;
        z-index: 9999999 !important;
        border-radius: 0;
        margin-top: auto;
    }

    /* Stagger animations faster on mobile */
    .mzu-result-item:nth-child(1) { animation-delay: 0ms; }
    .mzu-result-item:nth-child(2) { animation-delay: 15ms; }
    .mzu-result-item:nth-child(3) { animation-delay: 30ms; }
    .mzu-result-item:nth-child(4) { animation-delay: 45ms; }
    .mzu-result-item:nth-child(5) { animation-delay: 60ms; }
    .mzu-result-item:nth-child(6) { animation-delay: 75ms; }
    .mzu-result-item:nth-child(7) { animation-delay: 90ms; }
    .mzu-result-item:nth-child(8) { animation-delay: 105ms; }

    /* --- Badges compact --- */
    .mzu-result-badges {
        margin-bottom: 2px;
    }

    .mzu-badge {
        font-size: 8px;
        padding: 2px 6px;
    }
}

/* =================================================================
 * DARK MODE SUPPORT (follows system preference)
 * ================================================================= */

@media (prefers-color-scheme: dark) {
    .mzu-results,
    .mzu-portal {
        --mzu-bg: #1a1a1a;
        --mzu-bg-hover: #252525;
        --mzu-bg-subtle: #222222;
        --mzu-border: #333333;
        --mzu-border-light: #2a2a2a;
        --mzu-text: #f5f5f5;
        --mzu-text-secondary: #a0a0a0;
        --mzu-text-muted: #666666;
        --mzu-primary-light: rgba(220, 38, 38, 0.15);
    }
}

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

@media (prefers-reduced-motion: reduce) {
    .mzu-results,
    .mzu-portal,
    .mzu-result-item,
    .mzu-view-all,
    .mzu-backdrop {
        animation: none !important;
        transition: none !important;
    }
}

/* Focus visible for keyboard navigation */
.mzu-result-item:focus-visible,
.mzu-view-all:focus-visible {
    outline: 2px solid var(--mzu-primary);
    outline-offset: -2px;
}

/* =================================================================
 * CHAT WIDGET — Push behind search results when active
 * ================================================================= */

/* When backdrop is visible, push chat widget behind it */
body:has(.mzu-backdrop[style*="display: block"]) .mzr-chat-toggle,
body:has(.mzu-backdrop[style*="display: block"]) .mzr-chat-popup,
body:has(.mzu-portal[style*="display: block"]) .mzr-chat-toggle,
body:has(.mzu-portal[style*="display: block"]) .mzr-chat-popup,
body:has(.mzu-results:not([style*="display: none"])) .mzr-chat-toggle,
body:has(.mzu-results:not([style*="display: none"])) .mzr-chat-popup {
    z-index: 9990 !important;
    pointer-events: none;
}

/* Mobile: always push chat behind search when active */
@media (max-width: 768px) {
    body:has(.mzu-portal) .mzr-chat-toggle,
    body:has(.mzu-portal) .mzr-chat-popup,
    body:has(.mzu-backdrop) .mzr-chat-toggle,
    body:has(.mzu-backdrop) .mzr-chat-popup {
        z-index: 9990 !important;
    }
}

/* =================================================================
 * MOBILE SEARCH — Force search bar to TOP + Fancy pill input
 * ================================================================= */

@media (max-width: 768px) {
    /* FORCE Elessi mobile search panel to TOP of screen */
    .warpper-mobile-search {
        top: 0 !important;
        bottom: auto !important;
        transform: translateY(-100%) !important;
    }

    .warpper-mobile-search.nasa-active {
        transform: translateY(0) !important;
        z-index: 10002 !important;
        /* Panel chrome */
        background: #ffffff !important;
        padding: 10px 14px 14px !important;
        padding-top: max(10px, env(safe-area-inset-top, 10px)) !important;
        box-shadow: 0 6px 28px rgba(0, 0, 0, 0.10) !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    }

    .warpper-mobile-search.nasa-active .nasa-search-form-container,
    .warpper-mobile-search.nasa-active form,
    .warpper-mobile-search.nasa-active input {
        z-index: 10002 !important;
        position: relative;
    }

    /* ── Search wrapper = pill container ──────────────────────────── */
    .warpper-mobile-search .search-wrapper {
        display: flex !important;
        align-items: center !important;
        position: relative !important;
        background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%) !important;
        border: 2px solid #e2e2e2 !important;
        border-radius: 28px !important;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06),
                    inset 0 1px 2px rgba(255, 255, 255, 0.7) !important;
        transition: border-color 0.22s ease, box-shadow 0.22s ease !important;
        overflow: hidden !important;
        gap: 0 !important;
    }

    .warpper-mobile-search .search-wrapper:focus-within {
        border-color: var(--mzu-primary, #dc2626) !important;
        box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12),
                    0 2px 12px rgba(0, 0, 0, 0.07) !important;
    }

    /* ── Form inside the pill ─────────────────────────────────────── */
    .warpper-mobile-search .search-wrapper form,
    .warpper-mobile-search .search-wrapper .nasa-search-form-container,
    .warpper-mobile-search .search-wrapper .nasa-ajax-search-form-container {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        display: flex !important;
        align-items: center !important;
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
    }

    /* ── Submit button — reused as left-side search icon ──────────── */
    .warpper-mobile-search .search-wrapper form button[type="submit"],
    .warpper-mobile-search .search-wrapper form input[type="submit"],
    .warpper-mobile-search .search-wrapper form .search-submit,
    .warpper-mobile-search .search-wrapper form .nasa-search-icon {
        order: -1 !important;
        position: static !important;
        flex-shrink: 0 !important;
        width: 48px !important;
        height: 48px !important;
        min-height: 48px !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        margin: 0 !important;
        cursor: pointer !important;
        color: #bbbbbb !important;
        transition: color 0.2s ease !important;
        -webkit-tap-highlight-color: transparent !important;
        box-shadow: none !important;
    }

    .warpper-mobile-search .search-wrapper:focus-within form button[type="submit"],
    .warpper-mobile-search .search-wrapper:focus-within form .search-submit {
        color: var(--mzu-primary, #dc2626) !important;
    }

    /* Resize any icon/svg inside the submit button */
    .warpper-mobile-search .search-wrapper form button[type="submit"] svg,
    .warpper-mobile-search .search-wrapper form button[type="submit"] i,
    .warpper-mobile-search .search-wrapper form .search-submit svg,
    .warpper-mobile-search .search-wrapper form .nasa-search-icon svg {
        width: 20px !important;
        height: 20px !important;
        font-size: 20px !important;
    }

    /* ── The actual text input ────────────────────────────────────── */
    .warpper-mobile-search .live-search-input,
    .warpper-mobile-search input[name="s"],
    .warpper-mobile-search input[type="search"] {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        width: 100% !important;
        height: 48px !important;
        padding: 0 10px 0 0 !important;
        font-size: 16px !important; /* 16px prevents iOS auto-zoom */
        font-weight: 400 !important;
        letter-spacing: 0.1px !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        outline: none !important;
        box-shadow: none !important;
        color: #1a1a1a !important;
        -webkit-appearance: none !important;
        appearance: none !important;
        caret-color: var(--mzu-primary, #dc2626) !important;
    }

    .warpper-mobile-search .live-search-input::placeholder,
    .warpper-mobile-search input[name="s"]::placeholder,
    .warpper-mobile-search input[type="search"]::placeholder {
        color: #ababab !important;
        font-weight: 400 !important;
    }

    /* Remove browser's native "×" clear button — we add our own */
    .warpper-mobile-search input[type="search"]::-webkit-search-cancel-button,
    .warpper-mobile-search input[type="search"]::-webkit-search-decoration {
        -webkit-appearance: none !important;
        display: none !important;
    }

    /* ── Ghost text inside mobile pill ───────────────────────────── */
    .warpper-mobile-search .mzu-ghost-host {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        background: transparent !important;
        border-radius: 0 !important;
        padding: 0 !important;
    }

    /* ── Clear (×) button injected by UberSearch JS ──────────────── */
    .mzu-mobile-clear-btn {
        flex-shrink: 0;
        display: none;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        margin: 0 8px 0 2px;
        border: none;
        border-radius: 50%;
        background: #eeeeee;
        color: #888888;
        font-size: 15px;
        line-height: 1;
        cursor: pointer;
        transition: background 0.15s, color 0.15s;
        -webkit-tap-highlight-color: transparent;
    }

    .mzu-mobile-clear-btn.mzu-mobile-clear-visible {
        display: flex;
    }

    .mzu-mobile-clear-btn:hover,
    .mzu-mobile-clear-btn:active {
        background: rgba(220, 38, 38, 0.12);
        color: var(--mzu-primary, #dc2626);
    }

    /* ── Scan button inside pill ──────────────────────────────────── */
    .mzu-scan-btn.mzu-scan-btn-mobile {
        width: 40px !important;
        min-width: 40px !important;
        height: 40px !important;
        min-height: 40px !important;
        border-radius: 20px !important;
        margin: 0 5px !important;
        background: rgba(220, 38, 38, 0.08) !important;
        color: var(--mzu-primary, #dc2626) !important;
        flex-shrink: 0 !important;
    }

    /* Constrain the form within the pill (scan + clear buttons are siblings) */
    .warpper-mobile-search .search-wrapper:has(.mzu-scan-btn-mobile) form {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        width: auto !important;
    }

    /* Backdrop — semi-transparent behind results, no blur for speed */
    .mzu-backdrop {
        background: rgba(0, 0, 0, 0.35) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}

/* =================================================================
 * DESKTOP — Inline navbar search (no overlay)
 * ================================================================= */

@media (min-width: 769px) {
    /* Hide the Elessi slide-down overlay background on desktop */
    .nasa-show-search-form::before,
    .nasa-show-search-form .nasa-over-hide::before {
        display: none !important;
    }

    /* Make search panel inline, not overlay */
    .nasa-show-search-form {
        position: relative !important;
        background: transparent !important;
        height: auto !important;
        padding: 0 !important;
    }

    .nasa-show-search-form .nasa-search-form-container {
        position: relative !important;
        max-width: 400px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Style the search input to look inline */
    .nasa-show-search-form .live-search-input,
    .nasa-show-search-form input[name="s"] {
        height: 42px !important;
        border-radius: 21px !important;
        border: 1px solid var(--mzu-border) !important;
        padding: 0 16px !important;
        font-size: 14px !important;
        background: var(--mzu-bg) !important;
        transition: all var(--mzu-transition) !important;
    }

    .nasa-show-search-form .live-search-input:focus,
    .nasa-show-search-form input[name="s"]:focus {
        border-color: var(--mzu-primary) !important;
        box-shadow: 0 0 0 3px var(--mzu-primary-light) !important;
        outline: none !important;
    }

    /* Search results dropdown on desktop - compact and below input */
    .mzu-portal {
        max-height: 400px;
        min-width: 380px;
        border-radius: var(--mzu-radius);
    }

    /* No backdrop on desktop - cleaner look */
    .mzu-backdrop {
        display: none !important;
    }

    /* Search icon/button styling for desktop */
    .nasa-show-search-form .nasa-search-icon,
    .nasa-show-search-form button[type="submit"] {
        position: absolute !important;
        right: 8px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        background: transparent !important;
        border: none !important;
        padding: 8px !important;
        cursor: pointer !important;
    }

    /* Hide Elessi's original search elements when our inline search is active */
    .mzu-desktop-search-wrap ~ .nasa-header-icons-wrap .nasa-icon-search,
    .mzu-desktop-search-wrap + ul.header-icons .nasa-icon-search {
        display: none !important;
    }

    /* Desktop search row - separate line above navbar */
    .mzu-desktop-search-row {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        padding: 12px 0 16px 0;
        margin-bottom: 8px;
    }

    .mzu-ubersearch.mzu-desktop-inline {
        position: relative;
        width: 100%;
        max-width: 700px;
    }

    .mzu-ubersearch.mzu-desktop-inline .mzu-search-input-wrap {
        position: relative;
        display: flex;
        align-items: center;
        width: 100%;
    }

    .mzu-ubersearch.mzu-desktop-inline .mzu-search-input {
        width: 100%;
        height: 52px;
        padding: 0 58px 0 26px;
        font-size: 16px;
        font-weight: 400;
        letter-spacing: 0.2px;
        border: 2px solid #e0e0e0;
        border-radius: 26px;
        background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06), inset 0 1px 3px rgba(255, 255, 255, 0.9);
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        outline: none;
    }

    .mzu-ubersearch.mzu-desktop-inline .mzu-search-input:hover {
        border-color: #c0c0c0;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1), inset 0 1px 3px rgba(255, 255, 255, 0.9);
    }

    .mzu-ubersearch.mzu-desktop-inline .mzu-search-input:focus {
        border-color: var(--mzu-primary, #e53935);
        box-shadow: 0 0 0 4px rgba(229, 57, 53, 0.15), 0 4px 20px rgba(0, 0, 0, 0.12);
        background: #ffffff;
    }

    .mzu-ubersearch.mzu-desktop-inline .mzu-search-input::placeholder {
        color: #9e9e9e;
        font-weight: 400;
    }

    .mzu-ubersearch.mzu-desktop-inline .mzu-search-icon,
    .mzu-ubersearch.mzu-desktop-inline .mzu-search-spinner {
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        color: #757575;
        pointer-events: none;
        transition: color 0.2s ease;
    }

    .mzu-ubersearch.mzu-desktop-inline .mzu-search-icon svg,
    .mzu-ubersearch.mzu-desktop-inline .mzu-search-spinner svg {
        width: 22px;
        height: 22px;
    }

    .mzu-ubersearch.mzu-desktop-inline .mzu-search-input:focus ~ .mzu-search-icon {
        color: var(--mzu-primary, #e53935);
    }

    /* Desktop inline search results dropdown - bigger and more readable */
    .mzu-ubersearch.mzu-desktop-inline .mzu-results {
        position: absolute;
        top: calc(100% + 10px);
        left: 50%;
        transform: translateX(-50%);
        width: 750px;
        max-width: 90vw;
        max-height: min(80vh, 850px);
        overflow-y: auto;
        background: #ffffff;
        border: 1px solid #e0e0e0;
        border-radius: 16px;
        box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
        z-index: 99999;
        padding: 8px 0;
    }

    .mzu-ubersearch.mzu-desktop-inline .mzu-results .mzu-product {
        display: flex;
        align-items: center;
        gap: 18px;
        padding: 16px 24px;
        border-bottom: 1px solid #f0f0f0;
        transition: background 0.15s ease;
    }

    .mzu-ubersearch.mzu-desktop-inline .mzu-results .mzu-product:last-child {
        border-bottom: none;
    }

    .mzu-ubersearch.mzu-desktop-inline .mzu-results .mzu-product:hover {
        background: #f8f9fa;
    }

    .mzu-ubersearch.mzu-desktop-inline .mzu-results .mzu-product-image {
        width: 80px;
        height: 80px;
        border-radius: 12px;
        object-fit: cover;
        background: #f5f5f5;
        flex-shrink: 0;
    }

    .mzu-ubersearch.mzu-desktop-inline .mzu-results .mzu-product-info {
        flex: 1;
        min-width: 0;
    }

    .mzu-ubersearch.mzu-desktop-inline .mzu-results .mzu-product-title {
        font-size: 15px;
        font-weight: 500;
        color: #1a1a1a;
        line-height: 1.4;
        margin-bottom: 6px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .mzu-ubersearch.mzu-desktop-inline .mzu-results .mzu-product-title .mzu-highlight {
        color: var(--mzu-primary, #e53935);
        font-weight: 600;
    }

    .mzu-ubersearch.mzu-desktop-inline .mzu-results .mzu-product-price {
        font-size: 16px;
        font-weight: 600;
        color: var(--mzu-primary, #e53935);
    }

    .mzu-ubersearch.mzu-desktop-inline .mzu-results .mzu-product-stock {
        font-size: 13px;
        color: #4caf50;
        margin-left: 12px;
    }

    /* View all link */
    .mzu-ubersearch.mzu-desktop-inline .mzu-results .mzu-view-all {
        display: block;
        padding: 16px 24px;
        text-align: center;
        font-size: 15px;
        font-weight: 500;
        color: var(--mzu-primary, #e53935);
        background: #fafafa;
        border-top: 1px solid #f0f0f0;
        margin-top: 8px;
        transition: background 0.15s ease;
    }

    .mzu-ubersearch.mzu-desktop-inline .mzu-results .mzu-view-all:hover {
        background: #f0f0f0;
    }
}


/* =================================================================
 * BARCODE SCANNER — Scan Button
 * ================================================================= */

.mzu-scan-btn {
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--mzu-text-secondary);
    cursor: pointer;
    transition: all var(--mzu-transition);
    z-index: 2;
    -webkit-tap-highlight-color: transparent;
}

.mzu-scan-btn:hover {
    background: var(--mzu-primary-light);
    color: var(--mzu-primary);
    transform: translateY(-50%) scale(1.08);
}

.mzu-scan-btn:active {
    transform: translateY(-50%) scale(0.95);
}

/* No attention-grabbing animation — keep the button subtle */

/* Adjust input padding to make room for scan button */
.mzu-search-input-wrap:has(.mzu-scan-btn) .mzu-search-input {
    padding-right: 88px;
}

/* Mobile-specific scan button — flex sibling in Elessi .search-wrapper */
.mzu-scan-btn.mzu-scan-btn-mobile {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    width: 44px;
    min-width: 44px;
    height: 44px;
    border-radius: 10px;
    z-index: 10;
    background: rgba(220, 38, 38, 0.12);
    color: var(--mzu-primary, #dc2626);
    margin-left: 8px;
    flex-shrink: 0;
    align-self: center;
    animation: none;
}

.mzu-scan-btn.mzu-scan-btn-mobile:hover,
.mzu-scan-btn.mzu-scan-btn-mobile:active {
    background: var(--mzu-primary-light, #fee2e2);
    color: var(--mzu-primary, #dc2626);
    transform: scale(1.08);
}

/* Constrain the form so it shares flex space with the scan button */
.warpper-mobile-search .search-wrapper:has(.mzu-scan-btn-mobile) form {
    width: auto !important;
    flex: 1 1 0;
    min-width: 0;
}

/* Generic scan button (fallback for other themes) */
.mzu-scan-btn-generic {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 8px;
    z-index: 10;
}

/* Button is now a flex sibling, no extra input padding needed */

/* Desktop inline search bar scan button */
@media (min-width: 769px) {
    .mzu-ubersearch.mzu-desktop-inline .mzu-scan-btn {
        right: 54px;
        width: 38px;
        height: 38px;
    }

    .mzu-ubersearch.mzu-desktop-inline .mzu-search-input-wrap:has(.mzu-scan-btn) .mzu-search-input {
        padding-right: 100px;
    }
}

@media (max-width: 768px) {
    .mzu-scan-btn:not(.mzu-scan-btn-mobile) {
        right: 44px;
        width: 38px;
        height: 38px;
    }
}

/* =================================================================
 * BARCODE SCANNER — Overlay
 * ================================================================= */

.mzu-scanner-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mzu-scanner-overlay.mzu-scanner-active {
    opacity: 1;
    visibility: visible;
}

.mzu-scanner-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    margin: 16px;
    background: #1a1a1a;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    animation: mzu-scale-in 0.3s ease-out;
}

/* Mobile: full screen */
@media (max-width: 768px) {
    .mzu-scanner-container {
        max-width: 100%;
        max-height: 100%;
        height: 100%;
        margin: 0;
        border-radius: 0;
    }
}

/* =================================================================
 * BARCODE SCANNER — Header
 * ================================================================= */

.mzu-scanner-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #111;
    border-bottom: 1px solid #333;
    flex-shrink: 0;
}

.mzu-scanner-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--mzu-font);
}

.mzu-scanner-header-title svg {
    opacity: 0.8;
}

.mzu-scanner-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.mzu-scanner-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* =================================================================
 * BARCODE SCANNER — Video / Viewfinder
 * ================================================================= */

.mzu-scanner-video-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #000;
    overflow: hidden;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .mzu-scanner-video-wrap {
        flex: 1;
        aspect-ratio: auto;
    }
}

.mzu-scanner-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mzu-scanner-viewfinder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 75%;
    max-width: 320px;
    height: 40%;
    max-height: 140px;
    pointer-events: none;
    transition: all 0.3s ease;
}

/* Scanner corner brackets */
.mzu-scanner-corner {
    position: absolute;
    width: 28px;
    height: 28px;
    border-color: #fff;
    border-style: solid;
    border-width: 0;
    transition: border-color 0.3s ease;
}

.mzu-scanner-corner-tl {
    top: 0; left: 0;
    border-top-width: 3px;
    border-left-width: 3px;
    border-top-left-radius: 12px;
}

.mzu-scanner-corner-tr {
    top: 0; right: 0;
    border-top-width: 3px;
    border-right-width: 3px;
    border-top-right-radius: 12px;
}

.mzu-scanner-corner-bl {
    bottom: 0; left: 0;
    border-bottom-width: 3px;
    border-left-width: 3px;
    border-bottom-left-radius: 12px;
}

.mzu-scanner-corner-br {
    bottom: 0; right: 0;
    border-bottom-width: 3px;
    border-right-width: 3px;
    border-bottom-right-radius: 12px;
}

/* Scanning line animation */
.mzu-scanner-line {
    position: absolute;
    left: 8px;
    right: 8px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #dc2626 20%, #dc2626 80%, transparent);
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.5);
    border-radius: 2px;
    animation: mzu-scan-line 2.5s ease-in-out infinite;
}

@keyframes mzu-scan-line {
    0%, 100% { top: 10%; opacity: 0.4; }
    50% { top: 85%; opacity: 1; }
}

/* Detected state — viewfinder turns green */
.mzu-scanner-viewfinder.mzu-scanner-detected .mzu-scanner-corner {
    border-color: #16a34a;
}

.mzu-scanner-viewfinder.mzu-scanner-detected .mzu-scanner-line {
    animation: none;
    top: 50%;
    background: linear-gradient(90deg, transparent, #16a34a 20%, #16a34a 80%, transparent);
    box-shadow: 0 0 12px rgba(22, 163, 74, 0.6);
}

/* =================================================================
 * BARCODE SCANNER — Status
 * ================================================================= */

.mzu-scanner-status {
    padding: 16px 20px;
    text-align: center;
    flex-shrink: 0;
}

.mzu-scanner-instruction {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-family: var(--mzu-font);
    margin: 0;
}

.mzu-scanner-code-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    font-family: "SF Mono", "Fira Code", monospace;
    letter-spacing: 0.5px;
}

/* =================================================================
 * BARCODE SCANNER — Result
 * ================================================================= */

.mzu-scanner-result {
    padding: 20px;
    flex-shrink: 0;
}

/* Loading state */
.mzu-scanner-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-family: var(--mzu-font);
}

.mzu-scanner-loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: mzu-spin 0.7s linear infinite;
}

/* Product found */
.mzu-scanner-found {
    animation: mzu-slide-up 0.3s ease-out;
}

.mzu-scanner-found-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
    animation: mzu-scale-in 0.3s ease-out;
}

.mzu-scanner-found-product {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
}

.mzu-scanner-found-img {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
    background: #333;
    flex-shrink: 0;
}

.mzu-scanner-found-info {
    flex: 1;
    min-width: 0;
}

.mzu-scanner-found-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #16a34a;
    margin-bottom: 4px;
    font-family: var(--mzu-font);
}

.mzu-scanner-found-name {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: var(--mzu-font);
}

.mzu-scanner-found-price {
    font-size: 16px;
    font-weight: 700;
    color: #dc2626;
    margin-bottom: 8px;
    font-family: var(--mzu-font);
}

.mzu-scanner-found-price del {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
    font-size: 13px;
}

.mzu-scanner-found-redirect {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    font-family: var(--mzu-font);
}

/* Product not found */
.mzu-scanner-not-found {
    text-align: center;
    animation: mzu-slide-up 0.3s ease-out;
}

.mzu-scanner-not-found-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.mzu-scanner-not-found-text {
    margin-bottom: 20px;
}

.mzu-scanner-not-found-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
    font-family: var(--mzu-font);
}

.mzu-scanner-not-found-code {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    font-family: "SF Mono", "Fira Code", monospace;
}

.mzu-scanner-not-found-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Scanner buttons */
.mzu-scanner-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none !important;
    font-family: var(--mzu-font);
    -webkit-tap-highlight-color: transparent;
}

.mzu-scanner-btn-primary {
    background: #dc2626;
    color: #fff !important;
}

.mzu-scanner-btn-primary:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

.mzu-scanner-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.mzu-scanner-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* =================================================================
 * BARCODE SCANNER — Toast (unsupported browser)
 * ================================================================= */

.mzu-scanner-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999999;
    animation: mzu-slide-up 0.3s ease-out;
}

.mzu-scanner-toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #333;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    font-size: 14px;
    font-family: var(--mzu-font);
    max-width: 400px;
}

.mzu-scanner-toast-exit {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .mzu-scanner-toast {
        bottom: 16px;
        left: 16px;
        right: 16px;
        transform: none;
    }

    .mzu-scanner-toast-exit {
        transform: translateY(10px);
    }

    .mzu-scanner-toast-content {
        max-width: 100%;
    }
}

/* =================================================================
 * BARCODE SCANNER — Full-screen product-page loader
 * ================================================================= */

.mzu-fullloader {
    position: fixed;
    inset: 0;
    z-index: 10000000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.1s ease, visibility 0.1s ease;
}

.mzu-fullloader.mzu-fullloader-active {
    opacity: 1;
    visibility: visible;
}

.mzu-fullloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 32px 24px;
    max-width: 320px;
    text-align: center;
    animation: mzu-scale-in 0.35s ease-out;
}

.mzu-fullloader-img {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    object-fit: cover;
    background: #222;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.mzu-fullloader-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: #dc2626;
    border-radius: 50%;
    animation: mzu-spin 0.7s linear infinite;
}

.mzu-fullloader-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: var(--mzu-font);
}

.mzu-fullloader-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    font-family: var(--mzu-font);
}

.mzu-fullloader-code {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    font-weight: 700;
    font-family: "SF Mono", "Fira Code", monospace;
    letter-spacing: 0.5px;
}

.mzu-fullloader-check {
    animation: mzu-scale-in 0.25s ease-out;
}

/* Full-screen loader — Not Found state */

.mzu-fullloader-notfound {
    gap: 12px;
}

.mzu-fullloader-notfound-icon {
    animation: mzu-scale-in 0.3s ease-out;
}

.mzu-fullloader-notfound-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
    width: 100%;
    max-width: 300px;
}

.mzu-fullloader-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    line-height: 1;
    font-family: inherit;
    transition: background 0.15s ease, transform 0.1s ease;
}

.mzu-fullloader-btn:active {
    transform: scale(0.97);
}

.mzu-fullloader-btn svg {
    flex-shrink: 0;
}

.mzu-fullloader-btn-primary {
    background: #16a34a;
    color: #fff;
}

.mzu-fullloader-btn-primary:hover {
    background: #15803d;
}

.mzu-fullloader-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.mzu-fullloader-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.mzu-fullloader-btn-close {
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    font-weight: 400;
    padding: 8px;
}

.mzu-fullloader-btn-close:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* =================================================================
 * BARCODE SCANNER — Scan Again popup
 * ================================================================= */

.mzu-scan-again {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: #111;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mzu-scan-again.mzu-scan-again-visible {
    transform: translateY(0);
}

.mzu-scan-again-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #16a34a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
    line-height: 1;
    font-family: inherit;
}

.mzu-scan-again-btn:hover {
    background: #15803d;
    transform: scale(1.02);
}

.mzu-scan-again-btn:active {
    transform: scale(0.98);
}

.mzu-scan-again-btn svg {
    flex-shrink: 0;
}

.mzu-scan-again-close {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
    padding: 0;
}

.mzu-scan-again-close:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 480px) {
    .mzu-scan-again {
        padding: 10px 12px;
    }
    .mzu-scan-again-btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    .mzu-scan-again-close {
        right: 10px;
    }
}

/* =================================================================
 * BARCODE SCANNER — Accessibility
 * ================================================================= */

@media (prefers-reduced-motion: reduce) {
    .mzu-scanner-overlay,
    .mzu-scanner-container,
    .mzu-scanner-found,
    .mzu-scanner-not-found,
    .mzu-scanner-toast,
    .mzu-scanner-line,
    .mzu-scan-btn,
    .mzu-fullloader-content,
    .mzu-fullloader-spinner,
    .mzu-scan-again {
        animation: none !important;
        transition: none !important;
    }
}

/* =================================================================
 * SECTIONED DROPDOWN — Categories, Brands, Products, Discovery
 * ================================================================= */

.mzu-section {
    padding: 6px 0;
}

.mzu-section + .mzu-section {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.mzu-section-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    font-family: var(--mzu-font);
}

.mzu-section-icon {
    display: flex;
    align-items: center;
    color: #aaa;
}

.mzu-section-title {
    flex: 1;
}

.mzu-section-count {
    font-size: 10px;
    font-weight: 500;
    color: #bbb;
    background: rgba(0, 0, 0, 0.04);
    padding: 1px 6px;
    border-radius: 8px;
}

.mzu-section-clear {
    font-size: 10px;
    font-weight: 500;
    color: var(--mzu-primary, #4a90d9);
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.15s;
    font-family: var(--mzu-font);
}

.mzu-section-clear:hover {
    background: rgba(74, 144, 217, 0.08);
}

/* =================================================================
 * FACET PILLS — Category & Brand clickable tags
 * ================================================================= */

.mzu-facet-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 14px 8px;
}

.mzu-facet-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: #f5f5f5;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    color: #333;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
    font-family: var(--mzu-font);
    white-space: nowrap;
}

.mzu-facet-pill:hover {
    background: var(--mzu-primary, #4a90d9);
    color: #fff;
    border-color: var(--mzu-primary, #4a90d9);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(74, 144, 217, 0.25);
    text-decoration: none;
}

.mzu-facet-pill:hover .mzu-pill-count {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.mzu-pill-name {
    line-height: 1;
}

.mzu-pill-count {
    font-size: 10px;
    font-weight: 600;
    color: #999;
    background: rgba(0, 0, 0, 0.06);
    padding: 1px 5px;
    border-radius: 8px;
    line-height: 1.3;
    transition: all 0.15s ease;
}

.mzu-facet-skeleton-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 14px 8px;
}

.mzu-skeleton-pill {
    display: inline-block;
    width: 82px;
    height: 24px;
    border-radius: 16px;
    background: linear-gradient(90deg, #f0f0f0 0%, #fafafa 45%, #f0f0f0 90%);
    background-size: 220% 100%;
    animation: mzu-shimmer 1.1s ease-in-out infinite;
}

.mzu-skeleton-pill-wide {
    width: 118px;
}

.mzu-skeleton-pill-short {
    width: 58px;
}

/* =================================================================
 * SUGGESTION ITEMS — Recent & Popular searches
 * ================================================================= */

.mzu-suggestion-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.1s;
    font-family: var(--mzu-font);
}

.mzu-suggestion-item:hover,
.mzu-suggestion-item.mzu-active {
    background: rgba(0, 0, 0, 0.04);
    text-decoration: none;
    color: #333;
}

.mzu-suggestion-icon {
    flex-shrink: 0;
    color: #bbb;
}

.mzu-popular-item .mzu-suggestion-icon {
    color: #e8a838;
}

.mzu-suggestion-text {
    flex: 1;
    font-size: 13px;
    font-weight: 400;
}

.mzu-suggestion-arrow {
    flex-shrink: 0;
    color: #ccc;
    opacity: 0;
    transition: opacity 0.15s;
}

.mzu-suggestion-item:hover .mzu-suggestion-arrow {
    opacity: 1;
}

.mzu-remove-recent {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    color: #ccc;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.15s;
    opacity: 0;
    padding: 0;
    line-height: 1;
}

.mzu-suggestion-item:hover .mzu-remove-recent {
    opacity: 1;
}

.mzu-remove-recent:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.08);
}

/* Highlighted text in pill names */
.mzu-facet-pill .mzu-hl {
    font-weight: 700;
}

/* Product type pills — subtle accent to distinguish from regular category pills */
.mzu-type-pill {
    background: rgba(74, 144, 217, 0.06);
    border-color: rgba(74, 144, 217, 0.15);
}

.mzu-type-pill:hover {
    background: var(--mzu-primary, #4a90d9);
    color: #fff;
    border-color: var(--mzu-primary, #4a90d9);
}

/* =================================================================
 * DARK MODE — Section overrides
 * ================================================================= */

@media (prefers-color-scheme: dark) {
    .mzu-section + .mzu-section {
        border-color: rgba(255, 255, 255, 0.08);
    }

    .mzu-section-header {
        color: #888;
    }

    .mzu-section-count {
        background: rgba(255, 255, 255, 0.08);
        color: #777;
    }

    .mzu-facet-pill {
        background: rgba(255, 255, 255, 0.06);
        border-color: rgba(255, 255, 255, 0.1);
        color: #ddd;
    }

    .mzu-facet-pill:hover {
        background: var(--mzu-primary, #4a90d9);
        color: #fff;
        border-color: var(--mzu-primary, #4a90d9);
    }

    .mzu-pill-count {
        background: rgba(255, 255, 255, 0.1);
        color: #888;
    }

    .mzu-type-pill {
        background: rgba(74, 144, 217, 0.12);
        border-color: rgba(74, 144, 217, 0.2);
    }

    .mzu-suggestion-item {
        color: #ddd;
    }

    .mzu-suggestion-item:hover,
    .mzu-suggestion-item.mzu-active {
        background: rgba(255, 255, 255, 0.06);
        color: #ddd;
    }

    .mzu-remove-recent:hover {
        color: #e74c3c;
        background: rgba(231, 76, 60, 0.12);
    }
}

/* =================================================================
 * MOBILE — Section responsive adjustments
 * ================================================================= */

@media (max-width: 768px) {
    .mzu-section {
        padding: 4px 0;
    }

    .mzu-section + .mzu-section {
        border-top: 1px solid rgba(0, 0, 0, 0.04);
    }

    .mzu-section-header {
        padding: 6px 14px 4px;
        font-size: 10px;
        letter-spacing: 0.6px;
    }

    /* Horizontal scrolling pills on mobile — saves vertical space */
    .mzu-facet-pills {
        padding: 4px 14px 8px;
        gap: 6px;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .mzu-facet-pills::-webkit-scrollbar {
        display: none;
    }

    .mzu-facet-pill {
        padding: 6px 10px;
        font-size: 12px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .mzu-suggestion-item {
        padding: 8px 14px;
        gap: 10px;
    }

    .mzu-suggestion-text {
        font-size: 13px;
    }

    /* Always show remove button on mobile (no hover) */
    .mzu-remove-recent {
        opacity: 0.6;
    }

    /* Always show arrow on mobile */
    .mzu-suggestion-arrow {
        opacity: 0.5;
    }
}

/* =================================================================
 * GHOST TEXT AUTOCOMPLETE — inline completion hint in search input
 * ================================================================= */

.mzu-ghost-text {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    display: flex;
    align-items: center;
    z-index: 0;
}

.mzu-ghost-typed {
    visibility: hidden; /* Takes up space but invisible — mirrors typed text */
    white-space: pre;
}

.mzu-ghost-completion {
    color: var(--mzu-text-muted, #a0a0a0);
    opacity: 0.6;
    white-space: pre;
}

/* Make input background transparent so ghost text shows through */
.mzu-search-input-wrap:has(.mzu-ghost-text) .mzu-search-input,
.mzu-search-input-wrap:has(.mzu-ghost-text) input[name="s"],
.mzu-search-input-wrap:has(.mzu-ghost-text) input[type="search"],
.mzu-ghost-host input[name="s"],
.mzu-ghost-host input[type="search"],
.mzu-ghost-host .search-field,
.mzu-ghost-host .live-search-input {
    background: transparent !important;
    position: relative;
    z-index: 1;
}

/* Ghost text needs a real background behind it (on the wrapper) */
.mzu-search-input-wrap:has(.mzu-ghost-text),
.mzu-ghost-host {
    background: var(--mzu-bg, #ffffff);
    border-radius: inherit;
}

/* Desktop inline variant */
.mzu-ubersearch.mzu-desktop-inline .mzu-search-input-wrap:has(.mzu-ghost-text) {
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
    border-radius: 26px;
}

.mzu-ubersearch.mzu-desktop-inline .mzu-search-input:focus ~ .mzu-ghost-text .mzu-ghost-completion,
.mzu-search-input:focus ~ .mzu-ghost-text .mzu-ghost-completion {
    opacity: 0.5;
}

/* =================================================================
 * AUTOCOMPLETE SUGGESTIONS — search completions section in dropdown
 * ================================================================= */

.mzu-section-autocomplete {
    border-bottom: 1px solid var(--mzu-border-light, #f0f0f0);
}

.mzu-autocomplete-item .mzu-suggestion-icon {
    color: var(--mzu-primary, #dc2626);
    opacity: 0.5;
}

.mzu-autocomplete-item:hover .mzu-suggestion-icon {
    opacity: 1;
}

.mzu-autocomplete-item .mzu-suggestion-text {
    font-weight: 450;
}

.mzu-autocomplete-item .mzu-suggestion-text mark {
    background: none;
    font-weight: 700;
    color: inherit;
}

.mzu-autocomplete-item .mzu-suggestion-arrow {
    color: var(--mzu-primary, #dc2626);
    opacity: 0;
    transition: opacity 0.15s, transform 0.15s;
}

.mzu-autocomplete-item:hover .mzu-suggestion-arrow {
    opacity: 0.7;
    transform: translateX(2px);
}

/* Dark mode ghost text */
@media (prefers-color-scheme: dark) {
    .mzu-ghost-completion {
        color: #666;
        opacity: 0.5;
    }

    .mzu-search-input-wrap:has(.mzu-ghost-text) {
        background: var(--mzu-bg, #1a1a1a);
    }

    .mzu-ubersearch.mzu-desktop-inline .mzu-search-input-wrap:has(.mzu-ghost-text) {
        background: #1a1a1a;
    }

    .mzu-autocomplete-item .mzu-suggestion-text mark {
        color: #fff;
    }
}

/* Mobile autocomplete */
@media (max-width: 768px) {
    .mzu-autocomplete-item {
        padding: 6px 10px;
    }
}

/* =================================================================
 * MOBILE PORTAL RESULTS — Polished full-screen sheet, touch-ready
 * ================================================================= */

@media (max-width: 768px) {
    /* White card top edge with a subtle inset shadow */
    .mzu-portal {
        background: #ffffff !important;
        border-top: 1px solid rgba(0, 0, 0, 0.07) !important;
        border-radius: 0 !important;
        box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.04) !important;
    }

    /* Drag handle — injected by JS as .mzu-portal-handle at top of portal */
    .mzu-portal-handle {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 10px 0 6px;
        flex-shrink: 0;
        position: sticky;
        top: 0;
        z-index: 3;
        background: #ffffff;
        pointer-events: none;
    }

    .mzu-portal-handle::after {
        content: '';
        display: block;
        width: 36px;
        height: 4px;
        border-radius: 2px;
        background: rgba(0, 0, 0, 0.13);
    }

    /* ── Section headers — slightly elevated / tinted ────────────── */
    .mzu-portal .mzu-section-header {
        background: rgba(0, 0, 0, 0.018) !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
        padding: 8px 16px 7px !important;
        margin: 0 !important;
    }

    /* ── Result items — generous touch targets ───────────────────── */
    .mzu-portal .mzu-result-item {
        padding: 12px 16px !important;
        min-height: 72px;
        gap: 14px !important;
    }

    /* Product image — slightly bigger on mobile */
    .mzu-portal .mzu-result-image {
        width: 62px !important;
        height: 62px !important;
        border-radius: 12px !important;
    }

    .mzu-portal .mzu-result-name {
        font-size: 14px !important;
        font-weight: 600 !important;
        line-height: 1.35 !important;
    }

    .mzu-portal .mzu-result-price {
        font-size: 15px !important;
        font-weight: 700 !important;
    }

    /* Stock badge more compact */
    .mzu-portal .mzu-result-stock {
        font-size: 9px !important;
        padding: 1px 5px !important;
    }

    /* Sub-info line */
    .mzu-portal .mzu-result-sub {
        font-size: 11px !important;
    }

    /* ── Facet pills — more tappable, stretch horizontally ────────── */
    .mzu-portal .mzu-facet-pills {
        padding: 6px 16px 10px !important;
        gap: 7px !important;
    }

    .mzu-portal .mzu-facet-pill {
        padding: 7px 13px !important;
        font-size: 12px !important;
        border-radius: 20px !important;
        min-height: 32px !important;
        display: inline-flex !important;
        align-items: center !important;
    }

    /* ── View-all button — sticky, bold, modern ─────────────────── */
    .mzu-portal .mzu-view-all {
        padding: 16px 20px !important;
        font-size: 15px !important;
        font-weight: 700 !important;
        background: linear-gradient(to top, #f5f5f5, #ffffff) !important;
        border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
        letter-spacing: 0.1px !important;
        min-height: 52px !important;
    }

    /* Remove hover slide effect on mobile (touch) */
    .mzu-portal .mzu-view-all:hover,
    .mzu-portal .mzu-view-all:focus {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    /* ── No results state — centered and roomy ───────────────────── */
    .mzu-portal .mzu-no-results {
        padding: 48px 24px 64px !important;
    }

    /* ── Loading bar — keep sticky at top ────────────────────────── */
    .mzu-portal.mzu-is-loading::before {
        position: sticky !important;
        top: 0 !important;
        z-index: 2 !important;
        height: 3px !important;
    }
}

/* =================================================================
 * MOBILE DISCOVERY PANEL — Touch-friendly recent & popular
 * ================================================================= */

@media (max-width: 768px) {
    /* Suggestion items — bigger tap height */
    .mzu-portal .mzu-suggestion-item {
        padding: 13px 16px !important;
        min-height: 52px !important;
        gap: 12px !important;
    }

    .mzu-portal .mzu-suggestion-text {
        font-size: 14px !important;
        font-weight: 450 !important;
    }

    /* Accent bar on popular items */
    .mzu-portal .mzu-popular-item {
        position: relative;
    }

    .mzu-portal .mzu-popular-item::before {
        content: '';
        position: absolute;
        left: 0;
        top: 20%;
        bottom: 20%;
        width: 3px;
        background: linear-gradient(to bottom, #f59e0b, #ef4444);
        border-radius: 0 2px 2px 0;
        opacity: 0.55;
    }

    /* Make the popular fire icon golden */
    .mzu-portal .mzu-popular-item .mzu-suggestion-icon {
        color: #f59e0b !important;
    }

    /* Recent icon tint */
    .mzu-portal .mzu-section-recent .mzu-suggestion-icon {
        color: #888 !important;
    }

    /* Clear button always visible on mobile */
    .mzu-portal .mzu-remove-recent {
        opacity: 0.55 !important;
        width: 24px !important;
        height: 24px !important;
    }

    /* Arrow always visible on mobile */
    .mzu-portal .mzu-suggestion-arrow {
        opacity: 0.45 !important;
    }

    /* Section headers in discovery panel */
    .mzu-portal .mzu-section-recent .mzu-section-header,
    .mzu-portal .mzu-section-popular .mzu-section-header {
        font-size: 10px !important;
        letter-spacing: 0.7px !important;
    }

    /* Clear-recent button */
    .mzu-portal .mzu-section-clear {
        font-size: 11px !important;
        padding: 3px 8px !important;
        border-radius: 8px !important;
        background: rgba(0, 0, 0, 0.05) !important;
    }
}

/* =================================================================
 * MOBILE DARK MODE — Portal results
 * ================================================================= */

@media (max-width: 768px) and (prefers-color-scheme: dark) {
    .warpper-mobile-search.nasa-active {
        background: #1a1a1a !important;
        border-bottom-color: rgba(255, 255, 255, 0.07) !important;
        box-shadow: 0 6px 28px rgba(0, 0, 0, 0.4) !important;
    }

    .warpper-mobile-search .search-wrapper {
        background: linear-gradient(to bottom, #252525, #222222) !important;
        border-color: #3a3a3a !important;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3) !important;
    }

    .warpper-mobile-search .search-wrapper:focus-within {
        border-color: var(--mzu-primary, #dc2626) !important;
        box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.18),
                    0 2px 12px rgba(0, 0, 0, 0.3) !important;
    }

    .warpper-mobile-search .live-search-input,
    .warpper-mobile-search input[name="s"],
    .warpper-mobile-search input[type="search"] {
        color: #f0f0f0 !important;
    }

    .warpper-mobile-search .live-search-input::placeholder,
    .warpper-mobile-search input[name="s"]::placeholder {
        color: #666 !important;
    }

    .mzu-mobile-clear-btn {
        background: rgba(255, 255, 255, 0.1) !important;
        color: #aaa !important;
    }

    .mzu-mobile-clear-btn:hover,
    .mzu-mobile-clear-btn:active {
        background: rgba(220, 38, 38, 0.18) !important;
        color: var(--mzu-primary, #dc2626) !important;
    }

    .mzu-portal {
        background: #161616 !important;
    }

    .mzu-portal-handle {
        background: #161616 !important;
    }

    .mzu-portal-handle::after {
        background: rgba(255, 255, 255, 0.18) !important;
    }

    .mzu-portal.mzu-visible::after {
        background: rgba(255, 255, 255, 0.12) !important;
    }
}

/* =================================================================
 * MOBILE FULL-SCREEN SEARCH OVERLAY — Matches desktop experience
 * ================================================================= */

.mzu-mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 100003;
    display: flex;
    flex-direction: column;
    background: var(--mzu-bg, #ffffff);
    transform: translateY(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    overflow: hidden;
}

.mzu-mobile-overlay.mzu-mobile-overlay-active {
    transform: translateY(0);
}

/* Header bar — search input spans full width */
.mzu-mobile-overlay-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: max(8px, env(safe-area-inset-top, 8px)) 8px 6px;
    background: var(--mzu-bg, #ffffff);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
    z-index: 2;
}

/* Close (×) button — right side of header, outside the pill */
.mzu-mobile-overlay-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    flex-shrink: 0;
    border: none;
    border-radius: 50%;
    background: #f0f0f0;
    color: #666666;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s, color 0.15s;
    padding: 0;
}

.mzu-mobile-overlay-close:active {
    background: rgba(220, 38, 38, 0.12);
    color: var(--mzu-primary, #dc2626);
}

/* Search input pill */
.mzu-mobile-overlay-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0;
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%) !important;
    border: 2px solid #e2e2e2;
    border-radius: 24px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mzu-mobile-overlay-input-wrap:focus-within {
    border-color: var(--mzu-primary, #dc2626);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.mzu-mobile-overlay-input {
    flex: 1 1 0;
    min-width: 0;
    width: 100%;
    height: 40px;
    padding: 0 8px 0 14px !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    color: var(--mzu-text, #1a1a1a) !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    caret-color: var(--mzu-primary, #dc2626);
    font-family: var(--mzu-font);
}

.mzu-mobile-overlay-input::placeholder {
    color: #ababab !important;
    font-weight: 400 !important;
}

.mzu-mobile-overlay-input::-webkit-search-cancel-button,
.mzu-mobile-overlay-input::-webkit-search-decoration {
    -webkit-appearance: none !important;
    display: none !important;
}

/* Clear (×) button inside input pill */
.mzu-mobile-overlay-clear {
    display: none;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    margin-right: 8px;
    border: none;
    border-radius: 50%;
    background: #eeeeee;
    color: #888888;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s, color 0.15s;
    padding: 0;
}

.mzu-mobile-overlay-clear.mzu-mobile-overlay-clear-visible {
    display: flex;
}

.mzu-mobile-overlay-clear:active {
    background: rgba(220, 38, 38, 0.12);
    color: var(--mzu-primary, #dc2626);
}

/* Spinner inside input wrap */
.mzu-mobile-overlay-input-wrap .mzu-search-spinner {
    position: static;
    flex-shrink: 0;
    margin-right: 8px;
    color: var(--mzu-primary, #dc2626);
    pointer-events: none;
}

.mzu-mobile-overlay-input-wrap .mzu-search-spinner svg {
    animation: mzu-spin 0.8s linear infinite;
}

/* Scan button inside overlay input pill */
.mzu-mobile-overlay-input-wrap .mzu-scan-btn.mzu-scan-btn-mobile {
    position: static;
    right: auto;
    top: auto;
    transform: none;
    width: 34px;
    min-width: 34px;
    height: 34px;
    border-radius: 17px;
    margin: 0 4px 0 0;
    background: rgba(220, 38, 38, 0.08);
    color: var(--mzu-primary, #dc2626);
    flex-shrink: 0;
    animation: none;
}

.mzu-mobile-overlay-input-wrap .mzu-scan-btn.mzu-scan-btn-mobile:active {
    background: var(--mzu-primary-light, #fee2e2);
    transform: scale(0.95);
}

/* Ghost text integration inside overlay input */
.mzu-mobile-overlay-input-wrap:has(.mzu-ghost-text) {
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%) !important;
    border-radius: 24px !important;
}

/* Results area — fills remaining screen space (no mzu-results class, clean slate) */
.mzu-mobile-overlay-results {
    flex: 1 1 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background: var(--mzu-bg, #ffffff);
    padding-bottom: env(safe-area-inset-bottom, 0);
    display: flex;
    flex-direction: column;
    font-family: var(--mzu-font);
    scrollbar-width: thin;
    scrollbar-color: var(--mzu-border) transparent;
}

.mzu-mobile-overlay-results::-webkit-scrollbar {
    width: 6px;
}

.mzu-mobile-overlay-results::-webkit-scrollbar-track {
    background: transparent;
}

.mzu-mobile-overlay-results::-webkit-scrollbar-thumb {
    background: var(--mzu-border);
    border-radius: 3px;
}

/* Loading bar at top of results */
.mzu-mobile-overlay.mzu-is-loading > .mzu-mobile-overlay-results::before {
    content: '';
    display: block;
    position: sticky;
    top: 0;
    z-index: 1;
    height: 3px;
    border-radius: 0;
    background: linear-gradient(
        90deg,
        var(--mzu-primary) 0%,
        var(--mzu-primary-light) 30%,
        var(--mzu-primary) 50%,
        var(--mzu-primary-light) 70%,
        var(--mzu-primary) 100%
    );
    background-size: 200% 100%;
    animation: mzu-shimmer 1.2s ease-in-out infinite;
}

/* ── Section headers — compact ────────────────────────── */
.mzu-mobile-overlay-results .mzu-section-header {
    background: rgba(0, 0, 0, 0.018);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    padding: 5px 14px 4px;
    margin: 0;
    font-size: 10px;
}

/* ── Compact sections — reduce vertical spacing ───────── */
.mzu-mobile-overlay-results .mzu-section {
    padding: 2px 0;
}

.mzu-mobile-overlay-results .mzu-section + .mzu-section {
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

/* ── Touch-friendly result items ──────────────────────── */
.mzu-mobile-overlay-results .mzu-result-item {
    padding: 8px 14px;
    gap: 10px;
    min-height: 56px;
}

.mzu-mobile-overlay-results .mzu-result-image {
    width: 48px;
    height: 48px;
    border-radius: 10px;
}

.mzu-mobile-overlay-results .mzu-result-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.mzu-mobile-overlay-results .mzu-result-price {
    font-size: 14px;
    font-weight: 700;
}

.mzu-mobile-overlay-results .mzu-result-sub {
    font-size: 10px;
}

.mzu-mobile-overlay-results .mzu-result-stock {
    font-size: 9px;
    padding: 1px 5px;
}

.mzu-mobile-overlay-results .mzu-result-item:hover,
.mzu-mobile-overlay-results .mzu-result-item:focus {
    transform: none;
}

.mzu-mobile-overlay-results .mzu-result-item:hover::before,
.mzu-mobile-overlay-results .mzu-result-item:focus::before {
    width: 0;
}

.mzu-mobile-overlay-results .mzu-result-item:hover .mzu-result-image {
    transform: none;
    box-shadow: none;
}

/* ── Suggestion items — compact tap targets ───────────── */
.mzu-mobile-overlay-results .mzu-suggestion-item {
    padding: 9px 14px;
    min-height: 40px;
    gap: 10px;
}

.mzu-mobile-overlay-results .mzu-suggestion-text {
    font-size: 13px;
    font-weight: 450;
}

.mzu-mobile-overlay-results .mzu-remove-recent {
    opacity: 0.55;
    width: 22px;
    height: 22px;
}

.mzu-mobile-overlay-results .mzu-suggestion-arrow {
    opacity: 0.45;
}

/* Popular item accent bar */
.mzu-mobile-overlay-results .mzu-popular-item {
    position: relative;
}

.mzu-mobile-overlay-results .mzu-popular-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 3px;
    background: linear-gradient(to bottom, #f59e0b, #ef4444);
    border-radius: 0 2px 2px 0;
    opacity: 0.55;
}

.mzu-mobile-overlay-results .mzu-popular-item .mzu-suggestion-icon {
    color: #f59e0b !important;
}

.mzu-mobile-overlay-results .mzu-section-recent .mzu-suggestion-icon {
    color: #888 !important;
}

.mzu-mobile-overlay-results .mzu-section-clear {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.05);
}

/* ── Facet pills — horizontal scroll, compact ─────────── */
.mzu-mobile-overlay-results .mzu-facet-pills {
    padding: 4px 14px 6px;
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.mzu-mobile-overlay-results .mzu-facet-pills::-webkit-scrollbar {
    display: none;
}

.mzu-mobile-overlay-results .mzu-facet-pill {
    padding: 5px 10px;
    font-size: 11px;
    border-radius: 16px;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── View all — sticky at bottom ──────────────────────── */
.mzu-mobile-overlay-results .mzu-view-all {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 700;
    position: sticky;
    bottom: 0;
    background: linear-gradient(to top, #f5f5f5, #ffffff);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 10;
    min-height: 44px;
    flex-shrink: 0;
}

.mzu-mobile-overlay-results .mzu-view-all:hover,
.mzu-mobile-overlay-results .mzu-view-all:focus {
    padding-left: 16px;
    padding-right: 16px;
}

/* Products section — fill remaining space */
.mzu-mobile-overlay-results .mzu-section-products {
    flex: 1 0 auto;
}

/* Stagger animations faster */
.mzu-mobile-overlay-results .mzu-result-item:nth-child(1) { animation-delay: 0ms; }
.mzu-mobile-overlay-results .mzu-result-item:nth-child(2) { animation-delay: 15ms; }
.mzu-mobile-overlay-results .mzu-result-item:nth-child(3) { animation-delay: 30ms; }
.mzu-mobile-overlay-results .mzu-result-item:nth-child(4) { animation-delay: 45ms; }
.mzu-mobile-overlay-results .mzu-result-item:nth-child(5) { animation-delay: 60ms; }
.mzu-mobile-overlay-results .mzu-result-item:nth-child(6) { animation-delay: 75ms; }
.mzu-mobile-overlay-results .mzu-result-item:nth-child(7) { animation-delay: 90ms; }
.mzu-mobile-overlay-results .mzu-result-item:nth-child(8) { animation-delay: 105ms; }

/* ── No results state ─────────────────────────────────── */
.mzu-mobile-overlay-results .mzu-no-results {
    padding: 48px 24px 64px;
}

/* ── Dark mode ────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
    .mzu-mobile-overlay {
        background: #161616;
    }

    .mzu-mobile-overlay-header {
        background: #1a1a1a;
        border-bottom-color: rgba(255, 255, 255, 0.08);
    }

    .mzu-mobile-overlay-back {
        color: #f0f0f0;
    }

    .mzu-mobile-overlay-back:active {
        background: rgba(255, 255, 255, 0.08);
    }

    .mzu-mobile-overlay-input-wrap {
        background: linear-gradient(to bottom, #252525, #222222) !important;
        border-color: #3a3a3a;
    }

    .mzu-mobile-overlay-input-wrap:focus-within {
        border-color: var(--mzu-primary, #dc2626);
        box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.18);
    }

    .mzu-mobile-overlay-input {
        color: #f0f0f0 !important;
    }

    .mzu-mobile-overlay-input::placeholder {
        color: #666 !important;
    }

    .mzu-mobile-overlay-clear {
        background: rgba(255, 255, 255, 0.1);
        color: #aaa;
    }

    .mzu-mobile-overlay-clear:active {
        background: rgba(220, 38, 38, 0.18);
        color: var(--mzu-primary, #dc2626);
    }

    .mzu-mobile-overlay-results {
        background: #161616;
    }

    .mzu-mobile-overlay-results .mzu-view-all {
        background: linear-gradient(to top, #111111, #161616);
    }

    .mzu-mobile-overlay-input-wrap:has(.mzu-ghost-text) {
        background: linear-gradient(to bottom, #252525, #222222) !important;
    }
}

/* Hide mobile overlay on desktop */
@media (min-width: 1025px) {
    .mzu-mobile-overlay {
        display: none !important;
    }
}

/* =================================================================
 * SLOT MACHINE ANIMATED PLACEHOLDER
 * "Ik zoek naar [rotating word]" — slides up every 2s
 * ================================================================= */

.mzu-slot-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    padding: 0 58px 0 26px;
    pointer-events: none;
    overflow: hidden;
    border-radius: 26px;
    z-index: 2;
    user-select: none;
    -webkit-user-select: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mzu-slot-overlay.mzu-slot-visible {
    opacity: 1;
    pointer-events: auto;
    cursor: text;
}

.mzu-slot-overlay.mzu-slot-hidden {
    opacity: 0;
    pointer-events: none;
}

/* "Ik zoek naar" — static dark text */
.mzu-slot-static {
    font-size: 16px;
    line-height: 52px;
    color: #374151;
    font-weight: 500;
    white-space: pre;
    flex-shrink: 0;
    letter-spacing: 0.2px;
}

/* Window that clips the reel to show one word at a time */
.mzu-slot-window {
    display: inline-flex;
    overflow: hidden;
    height: 52px;
    position: relative;
    flex: 1;
    min-width: 0;
}

/* The vertical reel holding the words */
.mzu-slot-reel {
    display: inline-flex;
    flex-direction: column;
    position: relative;
    width: 100%;
    height: 52px;
}

/* Individual word */
.mzu-slot-word {
    font-size: 16px;
    line-height: 52px;
    color: #6b7280;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    letter-spacing: 0.2px;
}

/* === Slot animation states === */

/* Active word — slides in from below */
.mzu-slot-word-active {
    animation: mzu-slot-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Waiting to enter — positioned below the viewport */
.mzu-slot-word-next {
    transform: translateY(100%);
    opacity: 0;
}

/* Exiting word — slides up and out */
.mzu-slot-word-exit {
    animation: mzu-slot-out 0.4s cubic-bezier(0.55, 0, 1, 0.45) forwards;
}

@keyframes mzu-slot-in {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    60% {
        opacity: 1;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes mzu-slot-out {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    40% {
        opacity: 0.5;
    }
    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

/* === Dark mode for slot placeholder === */
@media (prefers-color-scheme: dark) {
    .mzu-slot-static {
        color: #d1d5db;
    }
    .mzu-slot-word {
        color: #9ca3af;
    }
}
