/* Bottom basket bar — shown only when the basket has items; replaces the credit footer */

.cart-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1045;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 52px;
    padding: 8px 14px calc(8px + env(safe-area-inset-bottom, 0px));
    border: none;
    border-radius: 16px 16px 0 0;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 -6px 18px color-mix(in srgb, var(--ink, #000) 18%, transparent);
    cursor: pointer;
    animation: cart-bar-in 220ms ease-out;
    -webkit-tap-highlight-color: transparent;
}

.cart-bar:active {
    background: color-mix(in srgb, var(--primary) 85%, #000);
}

.cart-bar:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -4px;
}

.cart-bar-count {
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    background: color-mix(in srgb, #fff 22%, transparent);
    font-size: 0.9rem;
    line-height: 28px;
    text-align: center;
}

.cart-bar-label {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95rem;
}

.cart-bar-total {
    font-size: 1rem;
    white-space: nowrap;
}

body:has(.cart-bar) .credit-footer {
    display: none;
}

body:has(.cart-bar) #backToTop {
    bottom: 64px;
}

body:has(.cart-bar) #menu-page,
body:has(.cart-bar) .focus-menu-container,
body:has(.cart-bar) .grid-menu-container {
    padding-bottom: 64px;
}

@keyframes cart-bar-in {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .cart-bar {
        animation: none;
    }
}
