/* Floating add-to-cart pill (single product). Visible only while the real button is off screen. */
.amz-sticky-cart {
    --amz-sc-red: #e31c23;
    --amz-sc-red-dark: #b8121a;
    --amz-sc-navy: #0b1c33;
    position: fixed;
    left: 50%;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 9990;
    width: min(560px, calc(100% - 32px));
    transform: translate(-50%, calc(100% + 40px));
    opacity: 0;
    pointer-events: none;
    transition: transform 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.15), opacity 0.2s ease;
}

.amz-sticky-cart.is-visible {
    transform: translate(-50%, 0);
    opacity: 1;
    pointer-events: auto;
}

.amz-sticky-cart__btn {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
    height: 60px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(100deg, var(--amz-sc-red) 0%, var(--amz-sc-red-dark) 100%);
    color: #fff;
    font: inherit;
    line-height: 1.1;
    text-align: left;
    cursor: pointer;
    box-shadow:
        0 12px 28px -8px rgba(184, 18, 26, 0.55),
        0 4px 12px rgba(11, 28, 51, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.amz-sticky-cart__btn:hover {
    filter: brightness(1.05);
}

.amz-sticky-cart__btn:active {
    transform: scale(0.98);
}

.amz-sticky-cart__btn:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

/* Navy cart chunk with a slanted edge, like the app-style split button. */
.amz-sticky-cart__icon {
    position: relative;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 92px;
    padding-right: 14px;
    background: var(--amz-sc-navy);
    clip-path: polygon(0 0, 100% 0, calc(100% - 22px) 100%, 0 100%);
    color: #fff;
}

.amz-sticky-cart__icon svg {
    width: 26px;
    height: 26px;
}

.amz-sticky-cart__body {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-width: 0;
    padding: 0 1.5rem 0 0.4rem;
}

.amz-sticky-cart__label {
    overflow: hidden;
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.amz-sticky-cart__price {
    flex: none;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 0.92rem;
    font-weight: 700;
    white-space: nowrap;
}

.amz-sticky-cart__price[hidden] {
    display: none;
}

/* Busy (submitting) and added states. */
.amz-sticky-cart__btn.is-busy {
    cursor: progress;
}

.amz-sticky-cart__btn.is-busy .amz-sticky-cart__icon svg {
    animation: amz-sc-bounce 0.7s ease-in-out infinite;
}

.amz-sticky-cart__btn.is-added .amz-sticky-cart__icon {
    background: #1f9d55;
}

.amz-sticky-cart__btn.is-disabled {
    filter: saturate(0.4);
}

@keyframes amz-sc-bounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(4px); }
}

@media (max-width: 480px) {
    .amz-sticky-cart {
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        width: calc(100% - 24px);
    }

    .amz-sticky-cart__btn {
        height: 56px;
    }

    .amz-sticky-cart__icon {
        width: 78px;
    }

    .amz-sticky-cart__body {
        padding-right: 1rem;
    }

    .amz-sticky-cart__label {
        font-size: 1rem;
    }

    .amz-sticky-cart__price {
        font-size: 0.85rem;
        padding: 0.3rem 0.55rem;
    }
}

/* Phones + tablets: the floating pill is the only add-to-cart button (JS proxies clicks to the
   hidden real one, so quantity / Livrare / Woo handlers still apply). Only once the JS is running. */
@media (max-width: 1024px) {
    .amz-sticky-cart-ready form.cart .single_add_to_cart_button {
        display: none !important;
    }
}

/* Keep page content (footer, cookie bar) reachable behind the pill. */
body.amz-sticky-cart-on {
    padding-bottom: 88px;
}

@media (prefers-reduced-motion: reduce) {
    .amz-sticky-cart,
    .amz-sticky-cart__btn {
        transition: none;
    }

    .amz-sticky-cart__btn.is-busy .amz-sticky-cart__icon svg {
        animation: none;
    }
}
