.grainpill-quantity-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid rgba(34, 139, 87, 0.12);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(33, 112, 61, 0.06);
}

.grainpill-quantity-btn {
    background: transparent !important;
    border: none !important;
    color: #165f33 !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 40px !important;
    text-align: center !important;
    vertical-align: middle !important;
    border-radius: 50% !important;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease !important;
}

.grainpill-quantity-btn:hover,
.grainpill-quantity-btn:focus {
    background: rgba(76, 175, 80, 0.16) !important;
    color: #0f5132 !important;
}

.grainpill-quantity-btn:active {
    background: rgba(76, 175, 80, 0.18);
    transform: scale(0.96);
}

.grainpill-quantity-input {
    width: 52px;
    text-align: center;
    border: none;
    height: 40px;
    font-size: 16px;
    font-weight: 700;
    color: #1f4d35;
    background: transparent;
}

.grainpill-quantity-input:focus {
    outline: none;
    border-color: #007cba;
}

#grainpill-loading-overlay {
    position: fixed !important;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.70) !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 99999999 !important;
    pointer-events: auto !important;
    touch-action: none !important;
}

#grainpill-loading-overlay.active {
    display: flex !important;
}

.grainpill-loading-content {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 16px;
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.grainpill-spinner {
    width: 52px;
    height: 52px;
    border: 6px solid rgba(0, 0, 0, 0.1);
    border-top-color: #007cba;
    border-radius: 50%;
    animation: grainpill-spin 1s linear infinite;
    margin-bottom: 14px;
}

.grainpill-loading-text {
    color: #212529;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
}

@keyframes grainpill-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes grainpill-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}