.cart-bar {
    position: fixed;
    bottom: 16px;
    left: 50%;
    z-index: 998;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: min(560px, calc(100% - 32px));
    min-height: 60px;
    padding: 0 26px;
    border-radius: 18px;
    background: #223C05;
    box-shadow: 0 10px 30px rgba(34, 60, 5, .35);
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    transform: translateX(-50%);
    transition: background .15s;
}

.cart-bar[hidden] {
    display: none;
}

.cart-bar:hover {
    background: #2f5208;
    color: #fff;
}

.cart-bar:focus-visible {
    outline: 3px solid #F7CC35;
    outline-offset: 3px;
}

.cart-bar__total {
    color: #F7CC35;
    white-space: nowrap;
}

.cart-bar.is-bumped {
    animation: cart-bar-bump .4s ease;
}

body:has(.cart-bar:not([hidden])) {
    padding-bottom: 92px;
}

@keyframes cart-bar-bump {
    40% { transform: translateX(-50%) scale(1.04); }
}

@media (min-width: 1200px) {
    .cart-bar {
        display: none;
    }

    body:has(.cart-bar) {
        padding-bottom: 0;
    }
}

@media (max-width: 640px) {
    .cart-bar {
        bottom: 10px;
        min-height: 54px;
        padding: 0 20px;
        font-size: 16px;
    }
}

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