/* ============================================================
   IzzieShop mobile navigation
   A compact app-style footer menu for public storefront pages.
   Hidden above 767px; the desktop header/footer remain unchanged.
   ============================================================ */

.mobile-bottom-nav {
    display: none;
}

@media (max-width: 767.98px) {
    /* Keep the layout viewport at the device width, even when a product card
       or Bootstrap column has a wide intrinsic minimum. */
    main {
        min-width: 0;
    }

    .row > [class*="col-"] {
        min-width: 0;
    }

    .all-products-grid {
        min-width: 0;
    }

    .all-products-grid > [class*="col-"] {
        min-width: 0;
    }

    .all-products-grid .product-card-modern,
    .all-products-grid .product-info,
    .all-products-grid .product-title {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .mobile-bottom-nav {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 950;
        display: block;
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
        pointer-events: none;
    }

    .mbn-shell {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        align-items: end;
        max-width: 540px;
        margin: 0 auto;
        padding: 7px 5px 6px;
        background: #ffffff;
        border: 1px solid #e2e9f2;
        border-radius: 19px;
        box-shadow: 0 10px 34px rgba(14, 31, 58, 0.16);
        pointer-events: auto;
    }

    .mbn-item {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end;
        gap: 3px;
        min-width: 0;
        min-height: 49px;
        padding: 2px 1px;
        color: #7d8899;
        font-size: 0.6rem;
        font-weight: 700;
        line-height: 1.1;
        text-align: center;
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
    }

    .mbn-item:hover,
    .mbn-item:focus {
        color: #0e1f3a;
        text-decoration: none;
    }

    .mbn-icon {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 28px;
        border-radius: 9px;
        font-size: 1.08rem;
        transition: background .18s ease, color .18s ease, transform .18s ease;
    }

    .mbn-item.is-active .mbn-icon {
        background: #eaf8ef;
        color: #0d7d3e;
    }

    .mbn-item.is-active .mbn-label {
        color: #0d7d3e;
    }

    .mbn-item:active .mbn-icon {
        transform: scale(0.92);
    }

    .mbn-badge {
        position: absolute;
        top: -5px;
        right: -7px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 17px;
        height: 17px;
        padding: 0 4px;
        background: #12a150;
        border: 2px solid #ffffff;
        border-radius: 999px;
        color: #ffffff;
        font-size: 0.56rem;
        font-weight: 800;
        line-height: 1;
    }

    .mbn-badge.is-empty {
        display: none;
    }

    /* Raised Discover key gives the bar a clear primary action. */
    .mbn-center {
        justify-content: flex-end;
        margin-top: -27px;
    }

    .mbn-center .mbn-icon {
        width: 56px;
        height: 56px;
        border: 4px solid #ffffff;
        border-radius: 50%;
        background: #12a150;
        color: #ffffff;
        font-size: 1.35rem;
        box-shadow: 0 9px 20px rgba(18, 161, 80, 0.32);
    }

    .mbn-center .mbn-label {
        margin-top: 0;
        color: #0e1f3a;
        font-size: 0.61rem;
    }

    .mbn-center.is-active .mbn-icon {
        background: #0e1f3a;
        color: #ffffff;
        box-shadow: 0 9px 20px rgba(14, 31, 58, 0.30);
    }

    .mbn-center.is-active .mbn-label {
        color: #0e1f3a;
    }

    /* Leave room above the fixed bar for footer links and content. */
    .footer-modern {
        padding-bottom: 104px !important;
    }

    .shop-page,
    .discover-page {
        padding-bottom: 92px;
    }

    .back-to-top {
        bottom: 108px !important;
    }

    #izzie-ai-wrap {
        bottom: 112px !important;
    }
}

@media (max-width: 359.98px) {
    .mbn-item {
        font-size: 0.54rem;
    }

    .mbn-center .mbn-icon {
        width: 50px;
        height: 50px;
    }

    .mbn-label {
        max-width: 54px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Creative mobile treatment for the discover + shop storefronts. */
@media (max-width: 767.98px) {
    .shop-page .shop-category-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        scroll-snap-type: x proximity;
    }

    .shop-page .shop-category-bar::-webkit-scrollbar {
        display: none;
    }

    .shop-page .shop-category-pill {
        flex: 0 0 auto;
        scroll-snap-align: start;
    }

    .shop-page .shop-hero-card {
        border-radius: 22px;
    }

    .shop-page .shop-hero-media {
        margin-bottom: 2px;
    }

    .shop-page .shop-collage {
        grid-template-columns: 1.25fr 0.75fr;
        grid-template-rows: repeat(2, 112px);
    }

    .shop-page .shop-rating-float {
        right: 10px;
        bottom: 10px;
        padding: 7px 10px;
        font-size: 0.68rem;
    }

    .shop-page .shop-trust-strip {
        grid-template-columns: 1fr 1fr;
        gap: 7px;
        margin-bottom: 18px;
    }

    .shop-page .shop-trust-item {
        min-height: 54px;
        border-radius: 12px;
    }

    .shop-page .shop-panel {
        border-radius: 16px;
    }

    .shop-page .shop-bottom-cta {
        border-radius: 18px;
    }

    .discover-page .discover-hero {
        border-radius: 22px;
    }

    .discover-page .seller-tile {
        border-radius: 16px;
    }

    .discover-page .seller-tile-media {
        grid-template-columns: 1.45fr 0.55fr;
        grid-template-rows: repeat(2, 76px);
    }

    .discover-page .seller-tile-media-empty {
        min-height: 155px;
    }

    .discover-page .seller-tile-body {
        padding: 14px;
    }
}
