/**
 * Smartphone Italia — mobile bottom navigation bar (20260704-mobile-nav)
 * Fixed tab bar ≤991px; hidden desktop ≥992px
 */

/* ── Bar ── */
@media (max-width: 991px) {
    #si-bottom-nav,
    .si-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 99999;
        display: flex;
        align-items: stretch;
        justify-content: space-around;
        width: 100%;
        min-height: var(--si-bottom-nav-height);
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: var(--si-bg-alt, #f5f5f7);
        border-top: 1px solid var(--si-line, rgba(0, 0, 0, 0.08));
        box-shadow: 0 -1px 8px rgba(0, 0, 0, 0.04);
        box-sizing: border-box;
        pointer-events: auto;
        -webkit-tap-highlight-color: transparent;
    }

    #si-bottom-nav *,
    .si-bottom-nav * {
        pointer-events: auto;
    }

    body.si-bottom-nav-active {
        padding-bottom: calc(var(--si-bottom-nav-height) + env(safe-area-inset-bottom, 0px));
    }

    body.si-bottom-nav-active #footer,
    body.si-bottom-nav-active .si-footer-container {
        padding-bottom: 0;
    }

    /* ── Items ── */
    .si-bottom-nav__item {
        flex: 1 1 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        min-width: 0;
        min-height: var(--si-bottom-nav-height);
        padding: 6px 4px 4px;
        margin: 0;
        border: none;
        background: transparent;
        color: var(--si-text-secondary, #86868b);
        font-family: var(--si-font, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
        font-size: 10px;
        font-weight: 500;
        line-height: 1.2;
        text-decoration: none;
        text-align: center;
        cursor: pointer;
        transition: color 0.2s ease;
        touch-action: manipulation;
        -webkit-user-select: none;
        user-select: none;
        -webkit-appearance: none;
        appearance: none;
    }

    .si-bottom-nav__item:hover,
    .si-bottom-nav__item:focus-visible {
        color: var(--si-text, #1d1d1f);
        outline: none;
    }

    .si-bottom-nav__item.is-active {
        color: var(--si-accent, #39b54a);
    }

    .si-bottom-nav__item.is-active .si-bottom-nav__icon svg path,
    .si-bottom-nav__item.is-active .si-bottom-nav__icon svg circle {
        stroke: var(--si-accent, #39b54a);
    }

    .si-bottom-nav__icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        flex-shrink: 0;
    }

    .si-bottom-nav__icon .material-icons {
        font-size: 24px;
        line-height: 1;
    }

    .si-bottom-nav__icon-wrap {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
    }

    .si-bottom-nav__label {
        display: block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* ── Cart badge ── */
    .si-bottom-nav__badge {
        position: absolute;
        top: -2px;
        right: -6px;
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        border-radius: 999px;
        background: var(--si-accent, #39b54a);
        color: #fff;
        font-size: 10px;
        font-weight: 600;
        line-height: 16px;
        text-align: center;
        box-sizing: border-box;
    }

    .si-bottom-nav__badge[hidden] {
        display: none !important;
    }

    /* ── Reinforce: hide redundant top header icons (bottom nav owns menu/cart/account) ── */
    #tvcms-mobile-view-header .tvmobile-sliderbar-btn,
    #tvcms-mobile-view-header .tvmobile-sliderbar-btn a,
    #tvcms-mobile-view-header .tvcmsmobile-cart-acount-text,
    #tvcms-mobile-view-header #tvmobile-cart,
    #tvcms-mobile-view-header #tvcmsmobile-account-button {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    #tvcms-mobile-view-header .tvcmsmobile-header-menu {
        flex: 0 0 0 !important;
        width: 0 !important;
        min-width: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
    }

    #tvcms-mobile-view-header .tvcmsmobile-header-logo-right-wrapper {
        flex: 1 1 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        text-align: center;
        justify-content: center;
    }

    #tvcms-mobile-view-header.mobile-header-1 .tvcmsmobile-header-menu-offer-text {
        justify-content: center !important;
    }

    #tvcms-mobile-view-header #tvcmsmobile-header-logo {
        display: flex;
        justify-content: center;
    }

}

@media (min-width: 992px) {
    .si-bottom-nav {
        display: none !important;
    }
}
