.grainpill-progress-bar-container {
    --gp-surface: linear-gradient(180deg, #ffffff 0%, #f6fff9 100%);
    --gp-border: rgba(22, 120, 72, 0.16);
    --gp-text: #173f2f;
    --gp-muted: #587267;
    --gp-accent: #0e9f6e;
    --gp-accent-deep: #0b7f58;

    position: relative;
    margin: 0 0 16px;
    padding: 16px 16px 14px;
    border: 1px solid var(--gp-border);
    border-radius: 24px;
    background: radial-gradient(120% 130% at 100% 0%, rgba(27, 190, 120, 0.14) 0%, rgba(27, 190, 120, 0) 42%), var(--gp-surface);
    box-shadow: 0 18px 40px rgba(13, 86, 52, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.72);
    overflow: hidden;
}

.grainpill-progress-bar-container::before {
    content: "";
    position: absolute;
    inset: auto auto -65px -35px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(35, 178, 108, 0.16) 0%, rgba(35, 178, 108, 0) 74%);
    pointer-events: none;
}

.grainpill-progress-bar-container.is-achieved {
    border-color: rgba(17, 131, 79, 0.24);
    background: radial-gradient(120% 130% at 100% 0%, rgba(40, 197, 131, 0.2) 0%, rgba(40, 197, 131, 0) 45%), linear-gradient(180deg, #ffffff 0%, #effff5 100%);
}

.grainpill-progress-bar__head,
.grainpill-progress-bar__meta,
.grainpill-cart-delivery__rows {
    position: relative;
    z-index: 1;
}

.grainpill-progress-bar__head {
    margin-bottom: 10px;
}

.grainpill-progress-bar__eyebrow {
    margin: 0 0 6px;
    font-size: 11px;
    line-height: 1.1;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #3b6d57;
    font-weight: 800;
}

.grainpill-progress-bar__headline {
    margin: 0;
    color: var(--gp-text);
    font-size: 19px;
    line-height: 1.15;
    letter-spacing: -0.03em;
    font-weight: 800;
}

.grainpill-progress-bar {
    position: relative;
    z-index: 1;
    height: 16px;
    margin-bottom: 10px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(27, 115, 77, 0.08) 0%, rgba(27, 115, 77, 0.13) 100%);
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.grainpill-progress-bar__indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 62px;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #0b7f58;
    box-shadow: 0 8px 20px rgba(16, 95, 63, 0.16), inset 0 0 0 1px rgba(14, 159, 110, 0.14);
    backdrop-filter: blur(6px);
    font-size: 13px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 0.01em;
    transform: translate(-50%, -50%);
    white-space: nowrap;
}

.grainpill-progress-bar.near-end {
    background: linear-gradient(180deg, rgba(250, 204, 88, 0.18) 0%, rgba(247, 185, 63, 0.14) 100%);
}

.grainpill-progress-bar.near-end::before,
.grainpill-progress-bar.near-end::after {
    content: "✦";
    position: absolute;
    top: -8px;
    color: #ffd76a;
    opacity: 0;
    font-size: 16px;
    animation: grainpill-star-pop 1.15s ease-out 0.3s 1 both;
}

.grainpill-progress-bar.near-end::before {
    left: 12px;
}

.grainpill-progress-bar.near-end::after {
    right: 12px;
    animation-delay: 0.48s;
}

.grainpill-progress-fill {
    position: relative;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #63d390 0%, #32bf79 54%, #0f9d69 100%);
    transform-origin: left center;
    animation: grainpill-progress-enter 0.92s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    box-shadow: 0 10px 22px rgba(21, 172, 100, 0.2);
    will-change: transform;
}

.grainpill-progress-fill::before,
.grainpill-progress-fill::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
}

.grainpill-progress-fill::before {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0));
}

.grainpill-progress-fill::after {
    width: 42%;
    inset: -8% auto -8% -20%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
    transform: skewX(-24deg) translateX(-180%);
}

.grainpill-progress-bar-container:not(.is-achieved) .grainpill-progress-fill.grainpill-progress-glow {
    animation: grainpill-progress-enter 0.92s cubic-bezier(0.2, 0.8, 0.2, 1) both, grainpill-progress-breathe 2.6s ease-in-out 1.15s infinite;
}

.grainpill-progress-bar-container.is-achieved .grainpill-progress-fill {
    animation: grainpill-progress-enter 0.92s cubic-bezier(0.2, 0.8, 0.2, 1) both, grainpill-achieved-pulse 1.05s ease-in-out 1s 3;
}

.grainpill-progress-bar-container.is-achieved .grainpill-progress-fill::after {
    animation: grainpill-achievement-sheen 1.05s ease-in-out 0.9s 3;
}

.grainpill-progress-bar__meta {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px 18px;
    flex-wrap: wrap;
}

.grainpill-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 800;
    color: var(--gp-text);
    letter-spacing: -0.02em;
}

.grainpill-text strong {
    color: #0b7f58;
}

.grainpill-progress-bar__caption {
    margin: 0;
    color: var(--gp-muted);
    font-size: 12px;
    line-height: 1.35;
    font-weight: 600;
}

.grainpill-cart-delivery {
    position: relative;
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(14, 159, 110, 0.18);
    background: linear-gradient(160deg, #ffffff 0%, #f9fdfb 62%, #f3fbf7 100%);
    box-shadow: 0 10px 22px rgba(10, 85, 52, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.76);
    overflow: hidden;
}

.grainpill-cart-delivery__glow {
    position: absolute;
    inset: -50px -30px auto auto;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(35, 178, 108, 0.18) 0%, rgba(35, 178, 108, 0) 74%);
    pointer-events: none;
}

.grainpill-cart-delivery__title {
    margin: 4px 0 0;
    color: #143d2d;
    font-size: 16px;
    line-height: 1.18;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.grainpill-cart-delivery__title span {
    color: #0e8f5d;
}

.grainpill-cart-delivery__label {
    margin: 0;
    color: #3c6f59;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 0.11em;
}

.grainpill-cart-delivery__rows {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 8px;
}

.grainpill-cart-delivery__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(16, 112, 69, 0.11);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    color: #2c5846;
    font-size: 11px;
    line-height: 1.1;
    font-weight: 700;
    flex: 1 1 auto;
}

.grainpill-cart-delivery__row--accent {
    flex: 1 1 100%;
}

.grainpill-cart-delivery__row-label {
    color: #4f6f62;
    font-weight: 700;
}

.grainpill-cart-delivery__row-value {
    color: #0b744d;
    font-weight: 800;
    text-align: right;
}

.grainpill-cart-delivery__row--accent {
    background: linear-gradient(180deg, rgba(238, 255, 245, 0.96) 0%, rgba(228, 252, 238, 0.95) 100%);
    border-color: rgba(14, 159, 110, 0.18);
}

.grainpill-cart-delivery__timer {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: baseline;
    color: #0d8658;
    font-weight: 800;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
    white-space: nowrap;
}

.woocommerce-cart .woocommerce .cart-collaterals {
    position: relative;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.woocommerce-cart .cart-collaterals .cart_totals {
    padding: 16px;
    border-radius: 22px;
    border: 1px solid rgba(18, 72, 49, 0.12);
    background: linear-gradient(180deg, #ffffff 0%, #fcfffd 100%);
    box-shadow: 0 18px 38px rgba(10, 60, 40, 0.08);
}

.woocommerce-cart .cart-collaterals .cart_totals h2 {
    margin-bottom: 12px;
}

.woocommerce-cart .cart-collaterals .cart_totals table.shop_table {
    margin-bottom: 0;
}

.woocommerce-cart .cart-collaterals .cart_totals .wc-proceed-to-checkout {
    margin-top: 18px;
    padding-top: 18px !important;
    border-top: 1px solid rgba(18, 72, 49, 0.08);
}

@media (min-width: 992px) {
    .woocommerce-cart .woocommerce .cart-collaterals {
        position: sticky;
        top: 12px;
        align-self: flex-start;
    }

    .woocommerce-cart .woocommerce-cart-form {
        margin-top: 0 !important;
    }
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
    position: relative;
    width: 100%;
    overflow: hidden;
    isolation: isolate;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button::after {
    content: "";
    position: absolute;
    inset: -20% auto -20% -35%;
    width: 38%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0));
    transform: skewX(-24deg) translateX(-260%);
    animation: grainpill-cta-sheen 7.6s ease-in-out 2.2s infinite;
    pointer-events: none;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover {
    box-shadow: 0 18px 34px rgba(10, 118, 81, 0.28) !important;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: rgba(255, 255, 255, 0.95);
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button.is-loading {
    pointer-events: none;
    cursor: wait;
    color: transparent !important;
    text-shadow: none !important;
    background: linear-gradient(180deg, #8aa69a 0%, #79978b 100%) !important;
    box-shadow: 0 10px 20px rgba(60, 82, 73, 0.2) !important;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button.is-loading::after {
    animation: none;
    opacity: 0;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button.is-loading::before {
    opacity: 1;
    animation: grainpill-button-spin 0.65s linear infinite;
}

@media (max-width: 991px) {
    .grainpill-progress-bar-container {
        padding: 14px;
        margin-bottom: 12px;
    }

    .grainpill-progress-bar__headline {
        font-size: 17px;
    }

    .grainpill-progress-bar__indicator {
        min-width: 58px;
        height: 26px;
        font-size: 12px;
    }

    .grainpill-cart-delivery {
        padding: 10px;
        border-radius: 16px;
    }

    .grainpill-cart-delivery__title {
        font-size: 15px;
    }

    .grainpill-cart-delivery__row {
        min-height: 30px;
        padding: 0 9px;
    }

    .woocommerce-cart .cart-collaterals .cart_totals {
        padding: 14px;
        border-radius: 18px;
    }
}

@media (max-width: 640px) {
    .grainpill-progress-bar__meta {
        flex-direction: column;
        align-items: stretch;
    }

    .grainpill-progress-bar__headline {
        font-size: 16px;
    }

    .grainpill-progress-bar__indicator {
        min-width: 54px;
        height: 24px;
        padding: 0 8px;
        font-size: 11px;
    }

    .grainpill-text {
        font-size: 13px;
    }

    .grainpill-cart-delivery__title {
        font-size: 15px;
    }

    .grainpill-cart-delivery__row {
        font-size: 11px;
        min-height: 29px;
        padding: 0 8px;
    }

    .grainpill-cart-delivery__rows {
        gap: 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .grainpill-progress-fill,
    .grainpill-progress-fill::after,
    .grainpill-progress-bar.near-end::before,
    .grainpill-progress-bar.near-end::after,
    .woocommerce-cart .wc-proceed-to-checkout a.checkout-button::after {
        animation: none !important;
        transition: none !important;
    }

    .woocommerce-cart .wc-proceed-to-checkout a.checkout-button.is-loading::before {
        animation: none !important;
    }
}

@keyframes grainpill-button-spin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes grainpill-progress-enter {
    from {
        transform: scaleX(0.04);
        filter: saturate(0.88);
    }

    to {
        transform: scaleX(1);
        filter: saturate(1);
    }
}

@keyframes grainpill-progress-breathe {
    0%,
    100% {
        box-shadow: 0 10px 22px rgba(21, 172, 100, 0.18);
    }

    50% {
        box-shadow: 0 14px 28px rgba(21, 172, 100, 0.28);
    }
}

@keyframes grainpill-achieved-pulse {
    0%,
    100% {
        box-shadow: 0 10px 22px rgba(21, 172, 100, 0.2);
        filter: saturate(1);
    }

    50% {
        box-shadow: 0 16px 34px rgba(21, 172, 100, 0.32);
        filter: saturate(1.08);
    }
}

@keyframes grainpill-achievement-sheen {
    0% {
        transform: skewX(-24deg) translateX(-220%);
        opacity: 0;
    }

    18% {
        opacity: 1;
    }

    100% {
        transform: skewX(-24deg) translateX(420%);
        opacity: 0;
    }
}

@keyframes grainpill-cta-sheen {
    0%,
    76%,
    100% {
        transform: skewX(-24deg) translateX(-260%);
        opacity: 0;
    }

    82% {
        opacity: 1;
    }

    92% {
        transform: skewX(-24deg) translateX(360%);
        opacity: 0;
    }
}

@keyframes grainpill-star-pop {
    0% {
        opacity: 0;
        transform: translateY(6px) scale(0.6);
    }

    42% {
        opacity: 1;
        transform: translateY(-6px) scale(1.08);
    }

    100% {
        opacity: 0;
        transform: translateY(-15px) scale(0.92);
    }
}