/**
 * Maison des Meubles — Mobile Bottom Navigation
 * Visible uniquement sur mobile (<= 768px)
 */

.mdm-mobile-nav {
    display: none;
}

@media (max-width: 768px) {
    /* Add bottom padding to body so content isn't hidden behind nav */
    body {
        padding-bottom: 72px;
    }

    .mdm-mobile-nav {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 64px;
        background: var(--mdm-white, #fff);
        border-top: 1px solid var(--mdm-border, #E5E7EB);
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
        z-index: 9999;
    }

    .mdm-mobile-nav__item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        text-decoration: none;
        color: var(--mdm-muted, #6B7280);
        font-size: 10px;
        font-weight: 500;
        letter-spacing: 0.02em;
        position: relative;
        transition: color 0.15s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .mdm-mobile-nav__item.active,
    .mdm-mobile-nav__item:active {
        color: var(--mdm-gold, #C5A55A);
    }

    .mdm-mobile-nav__icon {
        width: 22px;
        height: 22px;
    }

    .mdm-mobile-nav__icon svg {
        width: 100%;
        height: 100%;
    }

    .mdm-mobile-nav__label {
        line-height: 1;
    }

    /* Cart badge */
    .mdm-mobile-nav__badge {
        position: absolute;
        top: 6px;
        right: calc(50% - 18px);
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        background: var(--mdm-danger, #E8523A);
        color: #fff;
        border-radius: 8px;
        font-size: 9px;
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
    }

    .mdm-mobile-nav__badge:empty {
        display: none;
    }

    /* Adjust WhatsApp floating button position above mobile nav */
    .mdm-whatsapp-float {
        bottom: 80px !important;
    }

    /* Hide on checkout to reduce distraction */
    .woocommerce-checkout .mdm-mobile-nav {
        display: none;
    }

    .woocommerce-checkout body {
        padding-bottom: 0;
    }
}
