/* ============================================================
   Ventova Store — Sticky Mobile Toolbar
   Fixed bottom navigation for mobile devices
   ============================================================ */

.vs-mobile-toolbar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: var(--vs-bg-white);
    border-top: 1px solid var(--vs-border);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0);
    /* Prevent any transform/filter from ancestors breaking fixed positioning */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.vs-mobile-toolbar-inner {
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    height: 56px;
}

.vs-mobile-toolbar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 1;
    padding: 6px 4px;
    color: var(--vs-text-muted);
    font-size: 0.65rem;
    font-weight: 500;
    font-family: var(--vs-font-body);
    text-decoration: none;
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.vs-mobile-toolbar-item:hover,
.vs-mobile-toolbar-item:active {
    color: var(--vs-primary);
}

.vs-mobile-toolbar-item.active {
    color: var(--vs-primary);
}

.vs-mobile-toolbar-item i {
    font-size: 1.2rem;
    line-height: 1;
}

.vs-mobile-toolbar-item .vs-toolbar-badge {
    position: absolute;
    top: 2px;
    right: calc(50% - 16px);
    background: var(--vs-accent);
    color: var(--vs-bg-dark);
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: var(--vs-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.vs-mobile-toolbar-item .vs-toolbar-badge:empty,
.vs-mobile-toolbar-item .vs-toolbar-badge[data-count="0"] {
    display: none;
}

/* Show only on mobile */
@media (max-width: 768px) {
    .vs-mobile-toolbar {
        display: block;
    }

    /* Add bottom padding to body so content isn't hidden behind toolbar */
    body,
    body.woocommerce-page,
    body.single-product,
    body.woocommerce-cart,
    body.woocommerce-checkout,
    body.woocommerce-account {
        padding-bottom: calc(56px + env(safe-area-inset-bottom, 0)) !important;
    }

    /* Push mini-cart above the toolbar */
    .vs-minicart-dropdown {
        bottom: calc(56px + env(safe-area-inset-bottom, 0));
    }

    /* Ensure no WooCommerce sticky/fixed element overlaps the toolbar */
    .woocommerce .blockUI.blockOverlay {
        z-index: 99998 !important;
    }
}
