/* A quiet, persistent shortcut outside the page's scrolling content. */
.floating-cart {
    position: fixed;
    right: max(22px, env(safe-area-inset-right));
    bottom: calc(22px + env(safe-area-inset-bottom));
    z-index: 1100;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    padding: 0;
    border: 1px solid rgba(255, 252, 233, .5);
    border-radius: 50%;
    background: #83521a;
    color: #fffce9;
    box-shadow: 0 7px 22px rgba(83, 53, 22, .2);
    cursor: pointer;
    text-decoration: none;
    transition: transform .18s ease, background-color .18s ease;
}
.floating-cart[hidden] { display: none; }
.floating-cart svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.floating-cart [data-cart-count] {
    position: absolute;
    top: -3px;
    right: -3px;
    display: grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    border: 1px solid rgba(131, 82, 26, .22);
    border-radius: 20px;
    background: #f4efc7;
    color: #714517;
    font: 700 11px/1 Montserrat, Arial, sans-serif;
}
.floating-cart:hover { transform: translateY(-2px); background: #714517; }
.floating-cart:focus-visible { outline: 2px solid #83521a; outline-offset: 4px; }
.floating-cart.is-cart-revealed { animation: floating-cart-appear .24s ease both; }
body:is(.store-cart-open, .store-menu-open, .is-menu-open, .is-lightbox-open) .floating-cart,
body:has(dialog[open], .checkout-form[data-payment-active="1"]) .floating-cart { visibility: hidden; pointer-events: none; }
@keyframes floating-cart-appear { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) {
    .floating-cart { width: 54px; height: 54px; right: max(16px, env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); }
    /* Keep the last page links reachable above the floating shortcut. */
    body:has(.floating-cart:not([hidden])) > footer { padding-bottom: 82px; }
}
@media (prefers-reduced-motion: reduce) {
    .floating-cart { transition: none; }
    .floating-cart.is-cart-revealed { animation: none; }
}
