/**
 * Gromara — Buy Now sticky CTA (mobile)
 */

@media (max-width: 991px) {
    body.single-listing {
        padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    }
}

/* ── Button ── */
.gromara-buy-now-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    min-height: 64px;
    padding: 18px 28px;
    border-radius: 16px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none !important;
    color: #fff !important;
    background: linear-gradient(180deg, #22c55e 0%, #16a34a 50%, #15803d 100%);
    border: 3px solid #bbf7d0;
    box-shadow:
        0 6px 0 #14532d,
        0 12px 40px rgba(22, 163, 74, 0.55),
        0 0 0 0 rgba(34, 197, 94, 0.5);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    position: relative;
    overflow: visible;
    animation: gromara-buy-now-glow 2s ease-in-out infinite;
}

.gromara-buy-now-btn::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 20px;
    background: linear-gradient(135deg, #4ade80, #22c55e, #16a34a, #4ade80);
    background-size: 300% 300%;
    z-index: -1;
    animation: gromara-buy-now-border-spin 3s linear infinite;
    opacity: 0.85;
}

.gromara-buy-now-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 13px;
    background: linear-gradient(
        105deg,
        transparent 35%,
        rgba(255, 255, 255, 0.45) 50%,
        transparent 65%
    );
    transform: translateX(-120%);
    animation: gromara-buy-now-shine 2.2s ease-in-out infinite;
    pointer-events: none;
}

.gromara-buy-now-btn:active {
    transform: translateY(5px) scale(0.98);
    box-shadow:
        0 1px 0 #14532d,
        0 4px 16px rgba(22, 163, 74, 0.4);
    animation: none;
}

.gromara-buy-now-btn__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.25);
    font-size: 22px;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
    animation: gromara-buy-now-icon-bounce 1.8s ease-in-out infinite;
}

.gromara-buy-now-btn__text {
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.gromara-buy-now-btn__arrow {
    position: relative;
    z-index: 1;
    font-size: 20px;
    font-weight: 900;
    opacity: 0.95;
    animation: gromara-buy-now-arrow-nudge 1.2s ease-in-out infinite;
}

/* ── Sticky bar ── */
.gromara-buy-now-sticky {
    display: none;
}

@media (max-width: 991px) {
    .gromara-buy-now-sticky {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 99999;
        padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
        background: linear-gradient(to top, #fff 70%, rgba(255, 255, 255, 0.95));
        border-top: 3px solid #22c55e;
        box-shadow: 0 -12px 48px rgba(22, 163, 74, 0.25);
        animation: gromara-buy-now-slide-up 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .gromara-buy-now-sticky__inner {
        max-width: 540px;
        margin: 0 auto;
    }

    .gromara-buy-now-btn--sticky {
        min-height: 60px;
        font-size: 21px;
    }
}

@media (min-width: 992px) {
    .gromara-buy-now-sticky {
        display: none !important;
    }
}

@keyframes gromara-buy-now-slide-up {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gromara-buy-now-shine {
    0%, 100% {
        transform: translateX(-120%);
    }
    45%, 55% {
        transform: translateX(120%);
    }
}

@keyframes gromara-buy-now-glow {
    0%, 100% {
        box-shadow:
            0 6px 0 #14532d,
            0 12px 40px rgba(22, 163, 74, 0.5),
            0 0 0 0 rgba(34, 197, 94, 0.4);
    }
    50% {
        box-shadow:
            0 6px 0 #14532d,
            0 16px 48px rgba(22, 163, 74, 0.65),
            0 0 0 10px rgba(34, 197, 94, 0);
    }
}

@keyframes gromara-buy-now-border-spin {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes gromara-buy-now-icon-bounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.12);
    }
}

@keyframes gromara-buy-now-arrow-nudge {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(6px);
    }
}
